1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2025-03-18 22:33:00 +00:00

tests: expose scrubDerivation

Will use it with darwin scrubbing
This commit is contained in:
Austin Horstman 2025-03-09 00:11:21 -06:00
parent 72580374c8
commit b74402e4e8

View file

@ -14,8 +14,6 @@ let
# `"@package-name@"`. This allows the tests to refer to derivations through # `"@package-name@"`. This allows the tests to refer to derivations through
# their values without establishing an actual dependency on the derivation # their values without establishing an actual dependency on the derivation
# output. # output.
scrubDerivations = attrs:
let
scrubDerivation = name: value: scrubDerivation = name: value:
let let
scrubbedValue = scrubDerivations value; scrubbedValue = scrubDerivations value;
@ -23,7 +21,7 @@ let
newDrvAttrs = { newDrvAttrs = {
buildScript = abort "no build allowed"; buildScript = abort "no build allowed";
outPath = builtins.traceVerbose ("${name} - got out path") outPath = builtins.traceVerbose "${name} - got out path"
"@${lib.getName value}@"; "@${lib.getName value}@";
# Prevent getOutput from descending into outputs # Prevent getOutput from descending into outputs
@ -42,7 +40,7 @@ let
scrubbedValue scrubbedValue
else else
value; value;
in lib.mapAttrs scrubDerivation attrs; scrubDerivations = attrs: let in lib.mapAttrs scrubDerivation attrs;
# Globally unscrub a few selected packages that are used by a wide selection of tests. # Globally unscrub a few selected packages that are used by a wide selection of tests.
whitelist = let whitelist = let