Commit 6acae46c authored by İlkecan Bozdoğan's avatar İlkecan Bozdoğan
Browse files

lib: don't inherit unused functions

parent e394a579
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -4,9 +4,8 @@
{ lib }:

let
  inherit (builtins) head length typeOf;
  inherit (lib.asserts) assertMsg;
  inherit (lib.trivial) oldestSupportedReleaseIsAtLeast mergeAttrs;
  inherit (builtins) head length;
  inherit (lib.trivial) mergeAttrs;
  inherit (lib.strings)
    concatStringsSep
    concatMapStringsSep
+0 −1
Original line number Diff line number Diff line
@@ -20,7 +20,6 @@ let
    take
    length
    filterAttrs
    optionalString
    flip
    head
    pipe
+0 −6
Original line number Diff line number Diff line
@@ -6,26 +6,20 @@ let
    any
    attrByPath
    attrNames
    compare
    concat
    concatMap
    elem
    filter
    foldl
    foldr
    genericClosure
    head
    imap1
    init
    isAttrs
    isFunction
    isInt
    isList
    lists
    listToAttrs
    mapAttrs
    mergeAttrs
    meta
    nameValuePair
    tail
    toList
+0 −8
Original line number Diff line number Diff line
@@ -7,7 +7,6 @@ let
    isAttrs
    isPath
    isString
    nixVersion
    pathExists
    readDir
    split
@@ -21,7 +20,6 @@ let
    attrValues
    mapAttrs
    mapAttrsToList
    optionalAttrs
    zipAttrsWith
    ;

@@ -48,7 +46,6 @@ let
    append
    splitRoot
    hasStorePathPrefix
    splitStorePath
    ;

  inherit (lib.path.subpath)
@@ -62,11 +59,6 @@ let
    substring
    stringLength
    hasSuffix
    versionAtLeast
    ;

  inherit (lib.trivial)
    inPureEvalMode
    ;
in
# Rare case of justified usage of rec:
+0 −2
Original line number Diff line number Diff line
@@ -7,14 +7,12 @@
# Tested in lib/tests/filesystem.sh
let
  inherit (builtins)
    readDir
    pathExists
    toString
    ;

  inherit (lib.filesystem)
    pathIsDirectory
    pathIsRegularFile
    pathType
    packagesFromDirectoryRecursive
    ;
Loading