1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2025-03-18 14:28:15 +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
# their values without establishing an actual dependency on the derivation
# output.
scrubDerivations = attrs:
let
scrubDerivation = name: value:
let
scrubbedValue = scrubDerivations value;
@ -23,7 +21,7 @@ let
newDrvAttrs = {
buildScript = abort "no build allowed";
outPath = builtins.traceVerbose ("${name} - got out path")
outPath = builtins.traceVerbose "${name} - got out path"
"@${lib.getName value}@";
# Prevent getOutput from descending into outputs
@ -42,7 +40,7 @@ let
scrubbedValue
else
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.
whitelist = let