about summary refs log tree commit diff
path: root/lib/customisation.nix
diff options
context:
space:
mode:
authorK900 <me@0upti.me>2023-12-03 01:28:17 +0300
committerK900 <me@0upti.me>2023-12-03 01:28:17 +0300
commit37445f3c5c1015a4f8019900e9a23528f7c6bd2a (patch)
treef225f7439b96e0eb40803493fbe1103562219e00 /lib/customisation.nix
parente2987b884f5f18d72724e44705a9db82c2f22c68 (diff)
lib/customisation: fix callPackage error messages
Diffstat (limited to 'lib/customisation.nix')
-rw-r--r--lib/customisation.nix5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/customisation.nix b/lib/customisation.nix
index 5e290230ca4e3..462a85908c06b 100644
--- a/lib/customisation.nix
+++ b/lib/customisation.nix
@@ -4,11 +4,12 @@ let
   inherit (builtins)
     intersectAttrs;
   inherit (lib)
-    functionArgs isFunction mirrorFunctionArgs isAttrs setFunctionArgs levenshteinAtMost
+    functionArgs isFunction mirrorFunctionArgs isAttrs setFunctionArgs
     optionalAttrs attrNames levenshtein filter elemAt concatStringsSep sort take length
     filterAttrs optionalString flip pathIsDirectory head pipe isDerivation listToAttrs
     mapAttrs seq flatten deepSeq warnIf isInOldestRelease extends
     ;
+  inherit (lib.strings) levenshteinAtMost;
 
 in
 rec {
@@ -198,7 +199,7 @@ rec {
         + "${loc'}${prettySuggestions (getSuggestions arg)}";
 
       # Only show the error for the first missing argument
-      error = errorForArg missingArgs.${head (attrNames missingArgs)};
+      error = errorForArg (head (attrNames missingArgs));
 
     in if missingArgs == {}
        then makeOverridable f allArgs