2017-03-30 22:03:40 +02:00
|
|
|
/* Library of low-level helper functions for nix expressions.
|
|
|
|
*
|
|
|
|
* Please implement (mostly) exhaustive unit tests
|
|
|
|
* for new functions in `./tests.nix'.
|
|
|
|
*/
|
2016-09-15 01:21:42 +02:00
|
|
|
let
|
2006-09-25 12:07:59 +02:00
|
|
|
|
2016-09-15 01:21:42 +02:00
|
|
|
# trivial, often used functions
|
2009-02-09 17:51:03 +01:00
|
|
|
trivial = import ./trivial.nix;
|
2016-09-15 01:21:42 +02:00
|
|
|
|
|
|
|
# datatypes
|
|
|
|
attrsets = import ./attrsets.nix;
|
2009-02-09 17:51:03 +01:00
|
|
|
lists = import ./lists.nix;
|
|
|
|
strings = import ./strings.nix;
|
2009-05-25 20:22:19 +02:00
|
|
|
stringsWithDeps = import ./strings-with-deps.nix;
|
2016-09-15 01:21:42 +02:00
|
|
|
|
|
|
|
# packaging
|
|
|
|
customisation = import ./customisation.nix;
|
|
|
|
maintainers = import ./maintainers.nix;
|
|
|
|
meta = import ./meta.nix;
|
2009-02-09 17:51:03 +01:00
|
|
|
sources = import ./sources.nix;
|
2016-09-15 01:21:42 +02:00
|
|
|
|
|
|
|
# module system
|
2009-07-13 18:18:52 +02:00
|
|
|
modules = import ./modules.nix;
|
2009-02-09 17:51:03 +01:00
|
|
|
options = import ./options.nix;
|
2009-06-26 15:53:31 +02:00
|
|
|
types = import ./types.nix;
|
2016-09-15 01:21:42 +02:00
|
|
|
|
|
|
|
# constants
|
|
|
|
licenses = import ./licenses.nix;
|
2009-08-25 10:28:08 +02:00
|
|
|
platforms = import ./platforms.nix;
|
2009-11-19 18:19:39 +01:00
|
|
|
systems = import ./systems.nix;
|
2016-09-15 01:21:42 +02:00
|
|
|
|
|
|
|
# misc
|
|
|
|
debug = import ./debug.nix;
|
2016-11-06 01:51:13 +01:00
|
|
|
generators = import ./generators.nix;
|
2016-09-15 01:21:42 +02:00
|
|
|
misc = import ./deprecated.nix;
|
|
|
|
|
|
|
|
# domain-specific
|
2015-11-19 20:33:21 +01:00
|
|
|
sandbox = import ./sandbox.nix;
|
2016-09-17 21:50:01 +02:00
|
|
|
fetchers = import ./fetchers.nix;
|
2006-11-27 17:58:08 +01:00
|
|
|
|
2017-03-04 19:15:23 +01:00
|
|
|
# Eval-time filesystem handling
|
|
|
|
filesystem = import ./filesystem.nix;
|
|
|
|
|
2006-11-27 17:58:08 +01:00
|
|
|
in
|
2016-09-15 01:21:42 +02:00
|
|
|
{ inherit trivial
|
|
|
|
attrsets lists strings stringsWithDeps
|
|
|
|
customisation maintainers meta sources
|
|
|
|
modules options types
|
|
|
|
licenses platforms systems
|
2016-11-06 01:51:13 +01:00
|
|
|
debug generators misc
|
2017-03-04 19:15:23 +01:00
|
|
|
sandbox fetchers filesystem;
|
2009-07-01 17:38:55 +02:00
|
|
|
}
|
2009-02-09 17:51:03 +01:00
|
|
|
# !!! don't include everything at top-level; perhaps only the most
|
|
|
|
# commonly used functions.
|
2009-05-25 20:22:19 +02:00
|
|
|
// trivial // lists // strings // stringsWithDeps // attrsets // sources
|
2013-10-28 00:56:22 +01:00
|
|
|
// options // types // meta // debug // misc // modules
|
2009-11-19 18:19:39 +01:00
|
|
|
// systems
|
2009-11-19 17:43:58 +01:00
|
|
|
// customisation
|