From 926f1febb74c57917757ac341ac84838c4ce6a4c Mon Sep 17 00:00:00 2001 From: Erik Arvstedt Date: Fri, 3 Sep 2021 13:19:28 +0200 Subject: [PATCH 1/2] make-container: update extra-container version Keep this file in sync with the latest extra-container update. --- pkgs/extra-container/default.nix | 1 + test/lib/make-container.sh | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/pkgs/extra-container/default.nix b/pkgs/extra-container/default.nix index 07b495f..40f8308 100644 --- a/pkgs/extra-container/default.nix +++ b/pkgs/extra-container/default.nix @@ -4,6 +4,7 @@ stdenv.mkDerivation rec { pname = "extra-container"; + # Update this file when changing the version: ../../test/lib/make-container.sh version = "0.7"; src = builtins.fetchTarball { diff --git a/test/lib/make-container.sh b/test/lib/make-container.sh index af19185..70803fb 100755 --- a/test/lib/make-container.sh +++ b/test/lib/make-container.sh @@ -77,8 +77,8 @@ while [[ $# > 0 ]]; do done containerBin=$(type -P extra-container) || true -if [[ ! ($containerBin && $(realpath $containerBin) == *extra-container-0.6*) ]]; then - echo "Building extra-container. Skip this step by adding extra-container 0.6 to PATH." +if [[ ! ($containerBin && $(realpath $containerBin) == *extra-container-0.7*) ]]; then + echo "Building extra-container. Skip this step by adding extra-container 0.7 to PATH." nix-build --out-link /tmp/extra-container "$scriptDir"/../pkgs -A extra-container >/dev/null export PATH="/tmp/extra-container/bin${PATH:+:}$PATH" fi From 32ce9d0ff40dda8670a111d9b16dabf4857741d0 Mon Sep 17 00:00:00 2001 From: Erik Arvstedt Date: Fri, 3 Sep 2021 13:19:29 +0200 Subject: [PATCH 2/2] run-tests: fix 'eval' command for newer versions of nix There's no common `nix` command argument syntax for eval'ing a nix expression that supports both older and newer (flake support) versions of nix. So fall back to nix-instantiate. --- test/run-tests.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/test/run-tests.sh b/test/run-tests.sh index 241f142..ddf3eb0 100755 --- a/test/run-tests.sh +++ b/test/run-tests.sh @@ -165,8 +165,7 @@ debug() { } evalTest() { - nix eval --raw "($(vmTestNixExpr)).outPath" - echo # nix eval doesn't print a newline + nix-instantiate --eval -E "($(vmTestNixExpr)).outPath" } instantiate() {