mirror of
https://github.com/aviallon/nixos-lib.git
synced 2026-04-05 17:27:50 +00:00
[Lib/Optimizations] set attributes default value to be null instead of empty set
Better overrides.
This commit is contained in:
parent
4500c8d887
commit
ad8310a2a1
1 changed files with 7 additions and 2 deletions
|
|
@ -217,7 +217,7 @@ rec {
|
||||||
, overrideMap ? { }
|
, overrideMap ? { }
|
||||||
, stdenv ? null
|
, stdenv ? null
|
||||||
, lto ? false
|
, lto ? false
|
||||||
, attributes ? { }
|
, attributes ? null
|
||||||
, _depth ? 0
|
, _depth ? 0
|
||||||
, ...
|
, ...
|
||||||
}@attrs:
|
}@attrs:
|
||||||
|
|
@ -293,7 +293,12 @@ rec {
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
_pkgOptimized = addAttrs _pkg optimizedAttrs;
|
_pkgOptimized = addAttrs _pkg optimizedAttrs;
|
||||||
_pkgFinal = addAttrs _pkgOptimized attributes;
|
_pkgFinal =
|
||||||
|
if isAttrs attributes then
|
||||||
|
addAttrs _pkgOptimized (traceVal attributes)
|
||||||
|
else
|
||||||
|
_pkgOptimized
|
||||||
|
;
|
||||||
in
|
in
|
||||||
trace "Optimized ${myGetName pkg} with overrideAttrs at level '${level}' (depth: ${toString _depth}, lto: ${if lto then "true" else "false"})" _pkgFinal
|
trace "Optimized ${myGetName pkg} with overrideAttrs at level '${level}' (depth: ${toString _depth}, lto: ${if lto then "true" else "false"})" _pkgFinal
|
||||||
else if (hasAttr "name" pkg) then
|
else if (hasAttr "name" pkg) then
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue