From 54cbe35bf9b3513d5789c76a9be9a448bed24d2c Mon Sep 17 00:00:00 2001 From: Eman Resu <78693624+quatquatt@users.noreply.github.com> Date: Thu, 30 Apr 2026 10:33:31 -0400 Subject: [PATCH] lib.callPackageWith: use custom version of filterAttrs Avoids a double-negation and passing the name every time. --- lib/customisation.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/customisation.nix b/lib/customisation.nix index 2cce885dde6f..9ce5f1eece3e 100644 --- a/lib/customisation.nix +++ b/lib/customisation.nix @@ -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));