make-tarball / lib-tests: reduce duplication

The misc.nix and systems.nix tests were invoked at three different
places. Let's not that.
This commit is contained in:
Frederik Rietdijk
2019-07-10 11:45:52 +02:00
committed by Frederik Rietdijk
parent 8074133844
commit 8931db9f0b
2 changed files with 6 additions and 26 deletions

View File

@@ -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
'';
}
''