at 21.11-pre 927 B view raw
1{ # The pkgs used for dependencies for the testing itself 2 # Don't test properties of pkgs.lib, but rather the lib in the parent directory 3 pkgs ? import ../.. {} // { lib = throw "pkgs.lib accessed, but the lib tests should use nixpkgs' lib path directly!"; } 4}: 5 6pkgs.runCommandNoCC "nixpkgs-lib-tests" { 7 buildInputs = [ 8 pkgs.nix 9 (import ./check-eval.nix) 10 (import ./maintainers.nix { 11 inherit pkgs; 12 lib = import ../.; 13 }) 14 ]; 15} '' 16 datadir="${pkgs.nix}/share" 17 export TEST_ROOT=$(pwd)/test-tmp 18 export NIX_BUILD_HOOK= 19 export NIX_CONF_DIR=$TEST_ROOT/etc 20 export NIX_LOCALSTATE_DIR=$TEST_ROOT/var 21 export NIX_LOG_DIR=$TEST_ROOT/var/log/nix 22 export NIX_STATE_DIR=$TEST_ROOT/var/nix 23 export NIX_STORE_DIR=$TEST_ROOT/store 24 export PAGER=cat 25 cacheDir=$TEST_ROOT/binary-cache 26 nix-store --init 27 28 cp -r ${../.} lib 29 bash lib/tests/modules.sh 30 31 touch $out 32''