diff --git a/dev/flake-module.nix b/dev/flake-module.nix index 2831151..30ee2c0 100644 --- a/dev/flake-module.nix +++ b/dev/flake-module.nix @@ -1,4 +1,4 @@ -{ config, lib, inputs, withSystem, ... }: +{ config, lib, inputs, self, withSystem, ... }: { imports = [ @@ -64,7 +64,7 @@ }; checks.eval-tests = - let tests = import ./tests/eval-tests.nix; + let tests = import ./tests/eval-tests.nix { flake-parts = self; }; in tests.runTests pkgs.emptyFile // { internals = tests; }; }; diff --git a/dev/tests/eval-tests.nix b/dev/tests/eval-tests.nix index d4816fd..5a47d8e 100644 --- a/dev/tests/eval-tests.nix +++ b/dev/tests/eval-tests.nix @@ -1,18 +1,13 @@ # Run with # -# nix build -f dev checks.x86_64-linux.eval-tests +# nix build .#checks.x86_64-linux.eval-tests +{ flake-parts }: rec { - f-p = builtins.getFlake (toString ../..); - flake-parts = f-p; - - devFlake = builtins.getFlake (toString ../.); - nixpkgs = devFlake.inputs.nixpkgs; - - f-p-lib = f-p.lib; - + nixpkgs = flake-parts.inputs.nixpkgs; + f-p-lib = flake-parts.lib; inherit (f-p-lib) mkFlake; - inherit (f-p.inputs.nixpkgs-lib) lib; + inherit (flake-parts.inputs.nixpkgs-lib) lib; pkg = system: name: derivation