lib/tests/sources: update to Nix 2.4 cli syntax
This commit is contained in:
@@ -23,6 +23,10 @@ pkgs.runCommand "nixpkgs-lib-tests" {
|
|||||||
export NIX_STORE_DIR=$TEST_ROOT/store
|
export NIX_STORE_DIR=$TEST_ROOT/store
|
||||||
export PAGER=cat
|
export PAGER=cat
|
||||||
cacheDir=$TEST_ROOT/binary-cache
|
cacheDir=$TEST_ROOT/binary-cache
|
||||||
|
|
||||||
|
mkdir -p $NIX_CONF_DIR
|
||||||
|
echo "experimental-features = nix-command" >> $NIX_CONF_DIR/nix.conf
|
||||||
|
|
||||||
nix-store --init
|
nix-store --init
|
||||||
|
|
||||||
cp -r ${../.} lib
|
cp -r ${../.} lib
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ touch {README.md,module.o,foo.bar}
|
|||||||
# nix-instantiate doesn't write out the source, only computing the hash, so
|
# nix-instantiate doesn't write out the source, only computing the hash, so
|
||||||
# this uses the experimental nix command instead.
|
# this uses the experimental nix command instead.
|
||||||
|
|
||||||
dir="$(nix eval --raw '(with import <nixpkgs/lib>; "${
|
dir="$(nix eval --impure --raw --expr '(with import <nixpkgs/lib>; "${
|
||||||
cleanSource ./.
|
cleanSource ./.
|
||||||
}")')"
|
}")')"
|
||||||
(cd $dir; find) | sort -f | diff -U10 - <(cat <<EOF
|
(cd $dir; find) | sort -f | diff -U10 - <(cat <<EOF
|
||||||
@@ -37,7 +37,7 @@ EOF
|
|||||||
) || die "cleanSource 1"
|
) || die "cleanSource 1"
|
||||||
|
|
||||||
|
|
||||||
dir="$(nix eval --raw '(with import <nixpkgs/lib>; "${
|
dir="$(nix eval --impure --raw --expr '(with import <nixpkgs/lib>; "${
|
||||||
cleanSourceWith { src = '"$work"'; filter = path: type: ! hasSuffix ".bar" path; }
|
cleanSourceWith { src = '"$work"'; filter = path: type: ! hasSuffix ".bar" path; }
|
||||||
}")')"
|
}")')"
|
||||||
(cd $dir; find) | sort -f | diff -U10 - <(cat <<EOF
|
(cd $dir; find) | sort -f | diff -U10 - <(cat <<EOF
|
||||||
@@ -47,7 +47,7 @@ dir="$(nix eval --raw '(with import <nixpkgs/lib>; "${
|
|||||||
EOF
|
EOF
|
||||||
) || die "cleanSourceWith 1"
|
) || die "cleanSourceWith 1"
|
||||||
|
|
||||||
dir="$(nix eval --raw '(with import <nixpkgs/lib>; "${
|
dir="$(nix eval --impure --raw --expr '(with import <nixpkgs/lib>; "${
|
||||||
cleanSourceWith { src = cleanSource '"$work"'; filter = path: type: ! hasSuffix ".bar" path; }
|
cleanSourceWith { src = cleanSource '"$work"'; filter = path: type: ! hasSuffix ".bar" path; }
|
||||||
}")')"
|
}")')"
|
||||||
(cd $dir; find) | sort -f | diff -U10 - <(cat <<EOF
|
(cd $dir; find) | sort -f | diff -U10 - <(cat <<EOF
|
||||||
|
|||||||
Reference in New Issue
Block a user