diff options
Diffstat (limited to 'pkgs/lib/misc.nix')
-rw-r--r-- | pkgs/lib/misc.nix | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/pkgs/lib/misc.nix b/pkgs/lib/misc.nix index 0f4c0d0de95..19e5081009d 100644 --- a/pkgs/lib/misc.nix +++ b/pkgs/lib/misc.nix @@ -315,6 +315,8 @@ rec { ) ]; mergeAttrsByFuncDefaults = foldl mergeAttrByFunc { inherit mergeAttrBy; }; + mergeAttrsByFuncDefaultsClean = list: removeAttrs (mergeAttrsByFuncDefaults list) ["mergeAttrBy"]; + # merge attrs based on version key into mkDerivation args, see mergeAttrBy to learn about smart merge defaults # # This function is best explained by an example: @@ -356,7 +358,8 @@ rec { # sane defaults (same name as attr name so that inherit can be used) mergeAttrBy = # { buildInputs = concatList; [...]; passthru = mergeAttr; [..]; } - listToAttrs (map (n : nameValuePair n lib.concat) [ "nativeBuildInputs" "buildInputs" "propagatedBuildInputs" "configureFlags" "prePhases" "postAll" ]) + listToAttrs (map (n : nameValuePair n lib.concat) + [ "nativeBuildInputs" "buildInputs" "propagatedBuildInputs" "configureFlags" "prePhases" "postAll" "patches" ]) // listToAttrs (map (n : nameValuePair n lib.mergeAttrs) [ "passthru" "meta" "cfg" "flags" ]) // listToAttrs (map (n : nameValuePair n (a: b: "${a}\n${b}") ) [ "preConfigure" "postInstall" ]) ; |