Test the delayed with a bit more
This commit is contained in:
parent
0a470fc345
commit
7df4ef983e
3 changed files with 8 additions and 5 deletions
|
@ -40,7 +40,7 @@ for i in lang/eval-okay-*.nix; do
|
||||||
if test -e lang/$i.flags; then
|
if test -e lang/$i.flags; then
|
||||||
flags=$(cat lang/$i.flags)
|
flags=$(cat lang/$i.flags)
|
||||||
fi
|
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"
|
echo "FAIL: $i should evaluate"
|
||||||
fail=1
|
fail=1
|
||||||
elif ! diff lang/$i.out lang/$i.exp; then
|
elif ! diff lang/$i.out lang/$i.exp; then
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
"b-overridden"
|
"b-overridden b-overridden a"
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
let
|
let
|
||||||
|
|
||||||
pkgs_ = with pkgs; {
|
pkgs_ = with pkgs; {
|
||||||
a = derivation {
|
a = derivation {
|
||||||
name = "a";
|
name = "a";
|
||||||
|
@ -13,14 +14,16 @@ let
|
||||||
system = builtins.currentSystem;
|
system = builtins.currentSystem;
|
||||||
builder = "/bin/sh";
|
builder = "/bin/sh";
|
||||||
args = [ "-c" "touch $out" ];
|
args = [ "-c" "touch $out" ];
|
||||||
|
inherit a;
|
||||||
};
|
};
|
||||||
|
|
||||||
c = b;
|
c = b;
|
||||||
};
|
};
|
||||||
|
|
||||||
packageOverrides = p: {
|
packageOverrides = pkgs: with pkgs; {
|
||||||
b = derivation (p.b.drvAttrs // { name = "b-overridden"; });
|
b = derivation (b.drvAttrs // { name = "${b.name}-overridden"; });
|
||||||
};
|
};
|
||||||
|
|
||||||
pkgs = pkgs_ // (packageOverrides pkgs_);
|
pkgs = pkgs_ // (packageOverrides pkgs_);
|
||||||
in pkgs.a.b.name
|
|
||||||
|
in "${pkgs.a.b.name} ${pkgs.c.name} ${pkgs.b.a.name}"
|
||||||
|
|
Loading…
Reference in a new issue