diff --git a/dev/tests/template.nix b/dev/tests/template.nix index 04671fa..fc4ff39 100644 --- a/dev/tests/template.nix +++ b/dev/tests/template.nix @@ -15,18 +15,17 @@ hci-effects.mkEffect { nix -v flake init -t ${../..} ann pointing to local sources... - sed -i flake.nix -e 's^nixpkgs.url = ".*";^nixpkgs.url = "${path}"; flake-parts.url = "${../..}";^' - # head flake.nix - grep -F ${path} flake.nix >/dev/null + + override=(--override-input flake-parts ${../..}) ann nix flake lock... - nix flake lock + nix flake lock "''${override[@]}" ann nix flake show... - nix -v flake show + nix -v flake show "''${override[@]}" ann nix build... - nix build . + nix build . "''${override[@]}" ann checking result... readlink ./result | grep hello diff --git a/template/default/flake.nix b/template/default/flake.nix index 929e34f..277e25f 100644 --- a/template/default/flake.nix +++ b/template/default/flake.nix @@ -2,6 +2,7 @@ description = "Description for the project"; inputs = { + flake-parts.url = "github:hercules-ci/flake-parts"; nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; }; diff --git a/template/multi-module/flake.nix b/template/multi-module/flake.nix index 82cd3bd..2c5d668 100644 --- a/template/multi-module/flake.nix +++ b/template/multi-module/flake.nix @@ -2,6 +2,7 @@ description = "Description for the project"; inputs = { + flake-parts.url = "github:hercules-ci/flake-parts"; nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; }; diff --git a/template/package/flake.nix b/template/package/flake.nix index 385e6cb..6cd781e 100644 --- a/template/package/flake.nix +++ b/template/package/flake.nix @@ -2,6 +2,7 @@ description = "Description for the project"; inputs = { + flake-parts.url = "github:hercules-ci/flake-parts"; nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; }; diff --git a/template/unfree/flake.nix b/template/unfree/flake.nix index 7ec00c3..33eaaf2 100644 --- a/template/unfree/flake.nix +++ b/template/unfree/flake.nix @@ -1,7 +1,10 @@ { description = "Description for the project"; - inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; + inputs = { + flake-parts.url = "github:hercules-ci/flake-parts"; + nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; + }; outputs = inputs@{ flake-parts, nixpkgs, ... }: flake-parts.lib.mkFlake { inherit inputs; } {