From 83863c03e56fdea0cee48379d32ea03c35f99f35 Mon Sep 17 00:00:00 2001 From: Erik Arvstedt Date: Mon, 13 Jan 2020 10:39:19 +0100 Subject: [PATCH] use pinned nixpkgs-unstable for the test driver --- test/make-test.nix | 12 +++--------- test/run-tests.sh | 5 +---- 2 files changed, 4 insertions(+), 13 deletions(-) diff --git a/test/make-test.nix b/test/make-test.nix index 018ab27..36be215 100644 --- a/test/make-test.nix +++ b/test/make-test.nix @@ -2,20 +2,14 @@ testArgs: let pkgs = import { config = {}; overlays = []; }; + unstable = (import ../pkgs/nixpkgs-pinned.nix).nixpkgs-unstable; # Stable nixpkgs doesn't yet include the Python testing framework. # Use unstable nixpkgs and patch it so that it uses stable nixpkgs for the VM # machine configuration. - testingPkgs = let - # unstable as of 2020-01-09 - rev = "9beb0d1ac2ebd6063efbdc4d3631f8ce137bbf90"; - src = builtins.fetchTarball { - url = "https://github.com/nixos/nixpkgs-channels/archive/${rev}.tar.gz"; - sha256 = "1v95779di35qhrz70p2v27kmwm09h8pgh74i1wc72v0zp3bdrf50"; - }; - in + testingPkgs = pkgs.runCommand "nixpkgs-testing" {} '' - cp -r ${src} $out + cp -r ${unstable} $out cd $out chmod +w -R . patch -p1 < ${./use-stable-pkgs.patch} diff --git a/test/run-tests.sh b/test/run-tests.sh index 69a969f..231ed77 100755 --- a/test/run-tests.sh +++ b/test/run-tests.sh @@ -24,10 +24,7 @@ memoryMiB=${memoryMiB:-2048} scriptDir=$(cd "${BASH_SOURCE[0]%/*}" && pwd) -getPkgs() { - nix eval --raw -f "$scriptDir/../pkgs/nixpkgs-pinned.nix" $1 -} -export NIX_PATH=nixpkgs=$(getPkgs nixpkgs):nixpkgs-unstable=$(getPkgs nixpkgs-unstable) +export NIX_PATH=nixpkgs=$(nix eval --raw -f "$scriptDir/../pkgs/nixpkgs-pinned.nix" nixpkgs) # Run the test. No temporary files are left on the host system. run() {