summary refs log tree commit diff
diff options
context:
space:
mode:
authorRobert Hensing <robert@roberthensing.nl>2023-01-18 01:37:13 +0100
committerRobert Hensing <robert@roberthensing.nl>2023-01-18 01:39:38 +0100
commit415504e8679960580660f220249ce0c2878fe95d (patch)
tree71960f1a6ae26d426b9834be57a103a04f419b29
parentaa7e3b940ad90ba58a5d8c0a2269ec557c9ecc70 (diff)
downloadnixpkgs-415504e8679960580660f220249ce0c2878fe95d.tar
nixpkgs-415504e8679960580660f220249ce0c2878fe95d.tar.gz
nixpkgs-415504e8679960580660f220249ce0c2878fe95d.tar.bz2
nixpkgs-415504e8679960580660f220249ce0c2878fe95d.tar.lz
nixpkgs-415504e8679960580660f220249ce0c2878fe95d.tar.xz
nixpkgs-415504e8679960580660f220249ce0c2878fe95d.tar.zst
nixpkgs-415504e8679960580660f220249ce0c2878fe95d.zip
lib/tests/release.nix: Make nix a parameter + strictDeps
This makes bisecting nix a bit easier.

Example reproducer, invoked from nix directory:

```bash
nix-build ../nixpkgs/lib/tests/release.nix --arg nix '(builtins.getFlake "git+file://${toString ./.}").packages.x86_64-linux.default'
```
-rw-r--r--lib/tests/release.nix10
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/tests/release.nix b/lib/tests/release.nix
index f67892ab962..dbf6683d49a 100644
--- a/lib/tests/release.nix
+++ b/lib/tests/release.nix
@@ -1,11 +1,11 @@
 { # The pkgs used for dependencies for the testing itself
   # Don't test properties of pkgs.lib, but rather the lib in the parent directory
-  pkgs ? import ../.. {} // { lib = throw "pkgs.lib accessed, but the lib tests should use nixpkgs' lib path directly!"; }
+  pkgs ? import ../.. {} // { lib = throw "pkgs.lib accessed, but the lib tests should use nixpkgs' lib path directly!"; },
+  nix ? pkgs.nix,
 }:
 
 pkgs.runCommand "nixpkgs-lib-tests" {
   buildInputs = [
-    pkgs.nix
     (import ./check-eval.nix)
     (import ./maintainers.nix {
       inherit pkgs;
@@ -19,8 +19,12 @@ pkgs.runCommand "nixpkgs-lib-tests" {
       inherit pkgs;
     })
   ];
+  nativeBuildInputs = [
+    nix
+  ];
+  strictDeps = true;
 } ''
-    datadir="${pkgs.nix}/share"
+    datadir="${nix}/share"
     export TEST_ROOT=$(pwd)/test-tmp
     export NIX_BUILD_HOOK=
     export NIX_CONF_DIR=$TEST_ROOT/etc