Update utils
This commit is contained in:
@@ -4,6 +4,10 @@
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
flake-utils.url = "github:numtide/flake-utils";
|
||||
# Shared control4-utils library
|
||||
# sync by running nix lock update control4-utils, then nix run .#sync-utils
|
||||
control4-utils.url = "git+ssh://git@git.c3c.cz/arnie/nix-config.git?dir=flakes/control4-utils";
|
||||
control4-utils.inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
outputs =
|
||||
@@ -11,6 +15,7 @@
|
||||
self,
|
||||
nixpkgs,
|
||||
flake-utils,
|
||||
control4-utils,
|
||||
}:
|
||||
let
|
||||
version = "0.0.1";
|
||||
@@ -39,16 +44,27 @@
|
||||
'';
|
||||
};
|
||||
|
||||
apps.default = {
|
||||
type = "app";
|
||||
program = "${pkgs.writeShellScript "build-c4z" ''
|
||||
set -euo pipefail
|
||||
nix build
|
||||
# Move the file into a predefined directory mounted in the Composer Pro environment
|
||||
rm -f ../compiled/${driverName}.c4z
|
||||
cp -L result/${driverName}.c4z ../compiled
|
||||
echo "Built ${gitRev}: ../compiled/${driverName}.c4z"
|
||||
''}";
|
||||
apps = {
|
||||
default = {
|
||||
type = "app";
|
||||
program = "${pkgs.writeShellScript "build-c4z" ''
|
||||
set -euo pipefail
|
||||
nix build
|
||||
# Move the file into a predefined directory mounted in the Composer Pro environment
|
||||
rm -f ../compiled/${driverName}.c4z
|
||||
cp -L result/${driverName}.c4z ../compiled
|
||||
echo "Built ${gitRev}: ../compiled/${driverName}.c4z"
|
||||
''}";
|
||||
};
|
||||
|
||||
# Replace src/control4-utils with the shared copy; run from the project root
|
||||
sync-utils = {
|
||||
type = "app";
|
||||
program = "${pkgs.writeShellScript "sync-utils" ''
|
||||
set -euo pipefail
|
||||
${control4-utils.apps.${system}.default.program} src
|
||||
''}";
|
||||
};
|
||||
};
|
||||
|
||||
packages.default = pkgs.stdenv.mkDerivation {
|
||||
|
||||
Reference in New Issue
Block a user