about summary refs log tree commit diff
path: root/lib/tests
diff options
context:
space:
mode:
authorFrederik Rietdijk <fridh@fridh.nl>2019-07-10 11:45:52 +0200
committerFrederik Rietdijk <freddyrietdijk@fridh.nl>2019-07-11 18:02:05 +0200
commit8931db9f0b0ca57f3ceb8e7410a28085f7bdbe54 (patch)
treec34ca732310e4ec108acf391a8a2bc0e87cbfca4 /lib/tests
parent807413384443b3e65d8f4624b6650695f7c18e78 (diff)
downloadnixlib-8931db9f0b0ca57f3ceb8e7410a28085f7bdbe54.tar
nixlib-8931db9f0b0ca57f3ceb8e7410a28085f7bdbe54.tar.gz
nixlib-8931db9f0b0ca57f3ceb8e7410a28085f7bdbe54.tar.bz2
nixlib-8931db9f0b0ca57f3ceb8e7410a28085f7bdbe54.tar.lz
nixlib-8931db9f0b0ca57f3ceb8e7410a28085f7bdbe54.tar.xz
nixlib-8931db9f0b0ca57f3ceb8e7410a28085f7bdbe54.tar.zst
nixlib-8931db9f0b0ca57f3ceb8e7410a28085f7bdbe54.zip
make-tarball / lib-tests: reduce duplication
The misc.nix and systems.nix tests were invoked at three different
places. Let's not that.
Diffstat (limited to 'lib/tests')
-rw-r--r--lib/tests/release.nix15
1 files changed, 4 insertions, 11 deletions
diff --git a/lib/tests/release.nix b/lib/tests/release.nix
index d9a8a0067253..737d142d2532 100644
--- a/lib/tests/release.nix
+++ b/lib/tests/release.nix
@@ -1,11 +1,9 @@
 { pkgs ? import ((import ../.).cleanSource ../..) {} }:
 
-pkgs.stdenv.mkDerivation {
-  name = "nixpkgs-lib-tests";
-  buildInputs = [ pkgs.nix ];
+pkgs.runCommandNoCC "nixpkgs-lib-tests" {
+  buildInputs = [ pkgs.nix (import ./check-eval.nix) ];
   NIX_PATH="nixpkgs=${pkgs.path}";
-
-  buildCommand = ''
+} ''
     datadir="${pkgs.nix}/share"
     export TEST_ROOT=$(pwd)/test-tmp
     export NIX_BUILD_HOOK=
@@ -22,10 +20,5 @@ pkgs.stdenv.mkDerivation {
     cd ${pkgs.path}/lib/tests
     bash ./modules.sh
 
-    [[ "$(nix-instantiate --eval --strict misc.nix)" == "[ ]" ]]
-
-    [[ "$(nix-instantiate --eval --strict systems.nix)" == "[ ]" ]]
-
     touch $out
-  '';
-}
+''