about summary refs log tree commit diff
path: root/lib
diff options
context:
space:
mode:
authorPhilip Taron <philip.taron@gmail.com>2024-03-14 13:14:26 -0700
committerPhilip Taron <philip.taron@gmail.com>2024-03-16 11:19:38 -0700
commita7b4ee2dbef41e9e7ca09ea9625911d8e5e90325 (patch)
tree43529d9df60c426178add0e9c15f9ec37a3d1dfb /lib
parent8422fe83b9576da478f5d66ddb0da4b00b215558 (diff)
lib: use names from `lib` in `lib/generators.nix`, rather than `builtins` or submodules of `lib`
There's not a lot of rhyme to which names are exported from which module,
as I see it, but everything is found somewhere.
Diffstat (limited to 'lib')
-rw-r--r--lib/generators.nix60
1 files changed, 24 insertions, 36 deletions
diff --git a/lib/generators.nix b/lib/generators.nix
index c7b1b7fc75f95..5f42a98de7098 100644
--- a/lib/generators.nix
+++ b/lib/generators.nix
@@ -16,67 +16,55 @@
 { lib }:
 
 let
-  inherit (builtins)
+  inherit (lib)
     addErrorContext
+    assertMsg
     attrNames
     concatLists
+    concatMapStringsSep
+    concatStrings
     concatStringsSep
+    const
     elem
+    escape
     filter
+    flatten
+    foldl
+    functionArgs  # Note: not the builtin; considers `__functor` in attrsets.
+    gvariant
+    hasInfix
     head
+    id
+    init
     isAttrs
     isBool
+    isDerivation
     isFloat
+    isFunction    # Note: not the builtin; considers `__functor` in attrsets.
     isInt
     isList
     isPath
     isString
+    last
     length
     mapAttrs
-    match
-    replaceStrings
-    split
-    tail
-    toJSON
-    typeOf
-    ;
-
-  inherit (lib.attrsets)
-    isDerivation
     mapAttrsToList
-    recursiveUpdate
-    ;
-
-  inherit (lib.lists)
-    init
-    flatten
-    foldl
-    last
     optionals
+    recursiveUpdate
+    replaceStrings
     reverseList
+    splitString
+    tail
     toList
     ;
 
   inherit (lib.strings)
-    concatMapStringsSep
-    concatStrings
-    escape
     escapeNixIdentifier
     floatToString
-    hasInfix
-    splitString
-    ;
-
-  inherit (lib.trivial)
-    const
-    id
-    isFunction    # Note: not the builtin, considers `__functor` in attrsets.
-    functionArgs  # Note: not the builtin; considers `__functor` in attrsets.
-    ;
-
-  inherit (lib)
-    assertMsg
-    gvariant
+    match
+    split
+    toJSON
+    typeOf
     ;
 
   ## -- HELPER FUNCTIONS & DEFAULTS --