forked from auxolotl/core
simplify top of lib
This commit is contained in:
parent
590b181303
commit
63c79d1b48
|
@ -28,57 +28,35 @@ in
|
||||||
#
|
#
|
||||||
# legacy lib
|
# legacy lib
|
||||||
#
|
#
|
||||||
lib = fixedPoints.makeExtensible (self: let
|
lib = fixedPoints.makeExtensible (
|
||||||
callLibs = file: import file { lib = self; };
|
self:
|
||||||
in untangledBase // {
|
untangledBase // {
|
||||||
fixedPoints = fixedPoints;
|
trivial = import ./source/trivial.nix { lib = self; };
|
||||||
# often used, or depending on very little
|
attrsets = import ./source/attrsets.nix { lib = self; };
|
||||||
trivial = callLibs ./source/trivial.nix;
|
lists = import ./source/lists.nix { lib = self; };
|
||||||
|
strings = import ./source/strings.nix { lib = self; };
|
||||||
|
stringsWithDeps = import ./source/strings-with-deps.nix { lib = self; };
|
||||||
|
customisation = import ./source/customisation.nix { lib = self; };
|
||||||
|
derivations = import ./source/derivations.nix { lib = self; };
|
||||||
|
meta = import ./source/meta.nix { lib = self; };
|
||||||
|
versions = import ./source/versions.nix { lib = self; };
|
||||||
|
modules = import ./source/modules.nix { lib = self; };
|
||||||
|
options = import ./source/options.nix { lib = self; };
|
||||||
|
types = import ./source/types.nix { lib = self; };
|
||||||
|
systems = import ./source/systems { lib = self; };
|
||||||
|
cli = import ./source/cli.nix { lib = self; };
|
||||||
|
gvariant = import ./source/gvariant.nix { lib = self; };
|
||||||
|
generators = import ./source/generators.nix { lib = self; };
|
||||||
|
asserts = import ./source/asserts.nix { lib = self; };
|
||||||
|
debug = import ./source/debug.nix { lib = self; };
|
||||||
|
fetchers = import ./source/fetchers.nix { lib = self; };
|
||||||
|
path = import ./source/path { lib = self; };
|
||||||
|
filesystem = import ./source/filesystem.nix { lib = self; };
|
||||||
|
fileset = import ./source/fileset { lib = self; };
|
||||||
|
sources = import ./source/sources.nix { lib = self; };
|
||||||
|
kernel = import ./source/kernel.nix { lib = self; };
|
||||||
|
|
||||||
# datatypes
|
platforms = self.systems.doubles; # back-compat aliases # TODO: these are not the same as system.platform, we should probably try and unify them
|
||||||
attrsets = callLibs ./source/attrsets.nix;
|
|
||||||
lists = callLibs ./source/lists.nix;
|
|
||||||
strings = callLibs ./source/strings.nix;
|
|
||||||
stringsWithDeps = callLibs ./source/strings-with-deps.nix;
|
|
||||||
|
|
||||||
# packaging
|
|
||||||
customisation = callLibs ./source/customisation.nix;
|
|
||||||
derivations = callLibs ./source/derivations.nix;
|
|
||||||
meta = callLibs ./source/meta.nix;
|
|
||||||
versions = callLibs ./source/versions.nix;
|
|
||||||
|
|
||||||
# module system
|
|
||||||
modules = callLibs ./source/modules.nix;
|
|
||||||
options = callLibs ./source/options.nix;
|
|
||||||
types = callLibs ./source/types.nix;
|
|
||||||
|
|
||||||
# constants
|
|
||||||
systems = callLibs ./source/systems;
|
|
||||||
|
|
||||||
# serialization
|
|
||||||
cli = callLibs ./source/cli.nix;
|
|
||||||
gvariant = callLibs ./source/gvariant.nix;
|
|
||||||
generators = callLibs ./source/generators.nix;
|
|
||||||
|
|
||||||
# misc
|
|
||||||
asserts = callLibs ./source/asserts.nix;
|
|
||||||
debug = callLibs ./source/debug.nix;
|
|
||||||
|
|
||||||
# domain-specific
|
|
||||||
fetchers = callLibs ./source/fetchers.nix;
|
|
||||||
|
|
||||||
# Eval-time filesystem handling
|
|
||||||
path = callLibs ./source/path;
|
|
||||||
filesystem = callLibs ./source/filesystem.nix;
|
|
||||||
fileset = callLibs ./source/fileset;
|
|
||||||
sources = callLibs ./source/sources.nix;
|
|
||||||
|
|
||||||
# TODO: these are not the same as system.platform, we should probably try and unify them
|
|
||||||
# back-compat aliases
|
|
||||||
platforms = self.systems.doubles;
|
|
||||||
|
|
||||||
# linux kernel configuration
|
|
||||||
kernel = callLibs ./source/kernel.nix;
|
|
||||||
|
|
||||||
inherit (builtins) add addErrorContext attrNames concatLists
|
inherit (builtins) add addErrorContext attrNames concatLists
|
||||||
deepSeq elem elemAt filter genericClosure genList getAttr
|
deepSeq elem elemAt filter genericClosure genList getAttr
|
||||||
|
@ -172,5 +150,6 @@ in
|
||||||
runTests testAllTrue;
|
runTests testAllTrue;
|
||||||
inherit (self.versions)
|
inherit (self.versions)
|
||||||
splitVersion;
|
splitVersion;
|
||||||
});
|
}
|
||||||
|
);
|
||||||
in lib
|
in lib
|
||||||
|
|
Loading…
Reference in a new issue