lib.callPackageWith: use custom version of filterAttrs
Avoids a double-negation and passing the name every time.
This commit is contained in:
@@ -19,7 +19,6 @@ let
|
||||
sortOn
|
||||
take
|
||||
length
|
||||
filterAttrs
|
||||
head
|
||||
pipe
|
||||
isDerivation
|
||||
@@ -265,6 +264,7 @@ rec {
|
||||
*/
|
||||
callPackageWith =
|
||||
let
|
||||
filterTrueAttrs = set: removeAttrs set (filter (name: set.${name}) (attrNames set));
|
||||
makeErrorMessage =
|
||||
autoArgs: fn: args: fargs: arg:
|
||||
let
|
||||
@@ -311,7 +311,7 @@ rec {
|
||||
# wouldn't be passed to it
|
||||
missingArgs =
|
||||
# Filter out arguments that have a default value
|
||||
filterAttrs (name: value: !value)
|
||||
filterTrueAttrs
|
||||
# Filter out arguments that would be passed
|
||||
(removeAttrs fargs (attrNames allArgs));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user