2023-12-03 05:44:15 +00:00
|
|
|
# Adapted from lib/tests/release.nix
|
|
|
|
{ pkgs-path ? ../../..
|
|
|
|
, pkgs ? import pkgs-path {}
|
|
|
|
, lib ? pkgs.lib
|
|
|
|
, nix ? pkgs.nix
|
|
|
|
}:
|
|
|
|
|
|
|
|
#
|
|
|
|
# This verifies that release-attrpaths-superset.nix does not encounter
|
|
|
|
# infinite recursion or non-tryEval-able failures.
|
|
|
|
#
|
|
|
|
pkgs.runCommand "all-attrs-eval-under-tryEval" {
|
|
|
|
nativeBuildInputs = [
|
|
|
|
nix
|
|
|
|
pkgs.gitMinimal
|
|
|
|
] ++ lib.optional pkgs.stdenv.hostPlatform.isLinux pkgs.inotify-tools;
|
|
|
|
strictDeps = true;
|
2024-09-17 09:39:51 +00:00
|
|
|
|
|
|
|
src = with lib.fileset; toSource {
|
|
|
|
root = pkgs-path;
|
|
|
|
fileset = unions [
|
2024-09-17 09:44:23 +00:00
|
|
|
../../../default.nix
|
|
|
|
../../../doc
|
|
|
|
../../../lib
|
|
|
|
../../../maintainers
|
|
|
|
../../../nixos
|
|
|
|
../../../pkgs
|
|
|
|
../../../.version
|
2024-09-17 09:39:51 +00:00
|
|
|
];
|
|
|
|
};
|
2023-12-03 05:44:15 +00:00
|
|
|
}
|
|
|
|
''
|
|
|
|
datadir="${nix}/share"
|
|
|
|
export TEST_ROOT=$(pwd)/test-tmp
|
|
|
|
export HOME=$(mktemp -d)
|
|
|
|
export NIX_BUILD_HOOK=
|
|
|
|
export NIX_CONF_DIR=$TEST_ROOT/etc
|
|
|
|
export NIX_LOCALSTATE_DIR=$TEST_ROOT/var
|
|
|
|
export NIX_LOG_DIR=$TEST_ROOT/var/log/nix
|
|
|
|
export NIX_STATE_DIR=$TEST_ROOT/var/nix
|
|
|
|
export NIX_STORE_DIR=$TEST_ROOT/store
|
|
|
|
export PAGER=cat
|
|
|
|
cacheDir=$TEST_ROOT/binary-cache
|
|
|
|
|
|
|
|
nix-store --init
|
|
|
|
|
|
|
|
echo "Running pkgs/top-level/release-attrpaths-superset.nix"
|
2024-09-17 09:39:51 +00:00
|
|
|
nix-instantiate --eval --strict --json $src/pkgs/top-level/release-attrpaths-superset.nix -A names > /dev/null
|
2023-12-03 05:44:15 +00:00
|
|
|
|
|
|
|
mkdir $out
|
|
|
|
echo success > $out/${nix.version}
|
|
|
|
''
|