lib/tests/sources: update to Nix 2.4 cli syntax

Changed files
+7 -3
lib
+4
lib/tests/release.nix
···
export NIX_STORE_DIR=$TEST_ROOT/store
export PAGER=cat
cacheDir=$TEST_ROOT/binary-cache
+
+
mkdir -p $NIX_CONF_DIR
+
echo "experimental-features = nix-command" >> $NIX_CONF_DIR/nix.conf
+
nix-store --init
cp -r ${../.} lib
+3 -3
lib/tests/sources.sh
···
# nix-instantiate doesn't write out the source, only computing the hash, so
# 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 ./.
}")')"
(cd $dir; find) | sort -f | diff -U10 - <(cat <<EOF
···
) || 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; }
}")')"
(cd $dir; find) | sort -f | diff -U10 - <(cat <<EOF
···
EOF
) || 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; }
}")')"
(cd $dir; find) | sort -f | diff -U10 - <(cat <<EOF