summary refs log tree commit diff
diff options
context:
space:
mode:
authorBernardo Meurer <bernardo@meurer.org>2021-11-03 16:19:30 -0700
committerBernardo Meurer <bernardo@meurer.org>2021-11-09 10:47:20 -0800
commit90c1cdd93f4f1e68a70a9bc8ad0185fc97be5923 (patch)
treefc63ff32ec9e73be99b9c4e582185592b20484ab
parentfd4390146e2ccb043bbb0a07c1cd89fe01ee1315 (diff)
downloadnixpkgs-90c1cdd93f4f1e68a70a9bc8ad0185fc97be5923.tar
nixpkgs-90c1cdd93f4f1e68a70a9bc8ad0185fc97be5923.tar.gz
nixpkgs-90c1cdd93f4f1e68a70a9bc8ad0185fc97be5923.tar.bz2
nixpkgs-90c1cdd93f4f1e68a70a9bc8ad0185fc97be5923.tar.lz
nixpkgs-90c1cdd93f4f1e68a70a9bc8ad0185fc97be5923.tar.xz
nixpkgs-90c1cdd93f4f1e68a70a9bc8ad0185fc97be5923.tar.zst
nixpkgs-90c1cdd93f4f1e68a70a9bc8ad0185fc97be5923.zip
lib/tests/sources: update to Nix 2.4 cli syntax
-rw-r--r--lib/tests/release.nix4
-rwxr-xr-xlib/tests/sources.sh6
2 files changed, 7 insertions, 3 deletions
diff --git a/lib/tests/release.nix b/lib/tests/release.nix
index 77e0e1af755..815841e0a8f 100644
--- a/lib/tests/release.nix
+++ b/lib/tests/release.nix
@@ -23,6 +23,10 @@ pkgs.runCommand "nixpkgs-lib-tests" {
     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
diff --git a/lib/tests/sources.sh b/lib/tests/sources.sh
index 71fee719cb2..1f63cac5005 100755
--- a/lib/tests/sources.sh
+++ b/lib/tests/sources.sh
@@ -26,7 +26,7 @@ touch {README.md,module.o,foo.bar}
 # 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
@@ -37,7 +37,7 @@ 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
@@ -47,7 +47,7 @@ dir="$(nix eval --raw '(with import <nixpkgs/lib>; "${
 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