git.iko.soy/typeable/nixpkgs
on master help sign in
lib/tests/sources: update to Nix 2.4 cli syntax
commit90c1cdd93f4f1e68a70a9bc8ad0185fc97be5923 authorBernardo Meurer <bernardo@meurer.org> dateWed 3 Nov 2021, 16:19 (5 years ago) parentfd43901
2 files changed+7−3
lib/tests/release.nix+4 lib/tests/sources.sh+3−3
lib/tests/release.nix+4
@@ -23,6 +23,10 @@ pkgs.runCommand "nixpkgs-lib-tests" {
2323 export NIX_STORE_DIR=$TEST_ROOT/store
2424 export PAGER=cat
2525 cacheDir=$TEST_ROOT/binary-cache
26+
27+ mkdir -p $NIX_CONF_DIR
28+ echo "experimental-features = nix-command" >> $NIX_CONF_DIR/nix.conf
29+
2630 nix-store --init
2731
2832 cp -r ${../.} lib
lib/tests/sources.sh+3−3
@@ -26,7 +26,7 @@ touch {README.md,module.o,foo.bar}
2626# nix-instantiate doesn't write out the source, only computing the hash, so
2727# this uses the experimental nix command instead.
2828
29−dir="$(nix eval --raw '(with import <nixpkgs/lib>; "${
29+dir="$(nix eval --impure --raw --expr '(with import <nixpkgs/lib>; "${
3030 cleanSource ./.
3131}")')"
3232(cd $dir; find) | sort -f | diff -U10 - <(cat <<EOF
@@ -37,7 +37,7 @@ EOF
3737) || die "cleanSource 1"
3838
3939
40−dir="$(nix eval --raw '(with import <nixpkgs/lib>; "${
40+dir="$(nix eval --impure --raw --expr '(with import <nixpkgs/lib>; "${
4141 cleanSourceWith { src = '"$work"'; filter = path: type: ! hasSuffix ".bar" path; }
4242}")')"
4343(cd $dir; find) | sort -f | diff -U10 - <(cat <<EOF
@@ -47,7 +47,7 @@ dir="$(nix eval --raw '(with import <nixpkgs/lib>; "${
4747EOF
4848) || die "cleanSourceWith 1"
4949
50−dir="$(nix eval --raw '(with import <nixpkgs/lib>; "${
50+dir="$(nix eval --impure --raw --expr '(with import <nixpkgs/lib>; "${
5151 cleanSourceWith { src = cleanSource '"$work"'; filter = path: type: ! hasSuffix ".bar" path; }
5252}")')"
5353(cd $dir; find) | sort -f | diff -U10 - <(cat <<EOF