about summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/lang.sh2
-rw-r--r--tests/lang/eval-okay-delayed-with.exp2
-rw-r--r--tests/lang/eval-okay-delayed-with.nix9
3 files changed, 8 insertions, 5 deletions
diff --git a/tests/lang.sh b/tests/lang.sh
index cab1cfd9b05a..0d93b9215c68 100644
--- a/tests/lang.sh
+++ b/tests/lang.sh
@@ -40,7 +40,7 @@ for i in lang/eval-okay-*.nix; do
         if test -e lang/$i.flags; then
             flags=$(cat lang/$i.flags)
         fi
-        if ! NIX_PATH=lang/dir3:lang/dir4:$NIX_PATH nix-instantiate $flags --eval-only --strict lang/$i.nix > lang/$i.out; then
+        if ! NIX_PATH=lang/dir3:lang/dir4_PATH nix-instantiate $flags --eval-only --strict lang/$i.nix > lang/$i.out; then
             echo "FAIL: $i should evaluate"
             fail=1
         elif ! diff lang/$i.out lang/$i.exp; then
diff --git a/tests/lang/eval-okay-delayed-with.exp b/tests/lang/eval-okay-delayed-with.exp
index eaacb55c1aff..8e7c61ab8e77 100644
--- a/tests/lang/eval-okay-delayed-with.exp
+++ b/tests/lang/eval-okay-delayed-with.exp
@@ -1 +1 @@
-"b-overridden"
+"b-overridden b-overridden a"
diff --git a/tests/lang/eval-okay-delayed-with.nix b/tests/lang/eval-okay-delayed-with.nix
index 82934d6a9d5e..3fb023e1cd42 100644
--- a/tests/lang/eval-okay-delayed-with.nix
+++ b/tests/lang/eval-okay-delayed-with.nix
@@ -1,4 +1,5 @@
 let
+
   pkgs_ = with pkgs; {
     a = derivation {
       name = "a";
@@ -13,14 +14,16 @@ let
       system = builtins.currentSystem;
       builder = "/bin/sh";
       args = [ "-c" "touch $out" ];
+      inherit a;
     };
 
     c = b;
   };
 
-  packageOverrides = p: {
-    b = derivation (p.b.drvAttrs // { name = "b-overridden"; });
+  packageOverrides = pkgs: with pkgs; {
+    b = derivation (b.drvAttrs // { name = "${b.name}-overridden"; });
   };
 
   pkgs = pkgs_ // (packageOverrides pkgs_);
-in pkgs.a.b.name
+
+in "${pkgs.a.b.name} ${pkgs.c.name} ${pkgs.b.a.name}"