From 3314f9c931ee7ee75abb21a043820febc7137033 Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Thu, 12 Sep 2024 16:43:39 +0200 Subject: [PATCH] eval-tests: Remove getFlake calls --- dev/flake-module.nix | 4 ++-- dev/tests/eval-tests.nix | 15 +++++---------- 2 files changed, 7 insertions(+), 12 deletions(-) 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