wlib.types set documentation
wlib.types.dalOf
A DAG LIST or (DAL) or dependency list of some inner type
Arguments:
elemType:type
Accepts a LIST of elements
The elements should be of type elemType
or sets of the type { data, name ? null, before ? [], after ? [] }
where the data field is of type elemType
If a name is not given, it cannot be targeted by other values.
Can be used in conjunction with wlib.dag.topoSort and wlib.dag.sortAndUnwrap
Note, if the element type is a submodule then the name argument
will always be set to the string "data" since it picks up the
internal structure of the DAG values. To give access to the
"actual" attribute name a new submodule argument is provided with
the name dagName.
The config.optionname value from the associated option
will be normalized such that all items are DAG entries
If you wish to alter the type, you may provide different options
to wlib.dag.dalWith by updating this type wlib.types.dalOf // { strict = false; }
wlib.types.dagOf
A directed acyclic graph of some inner type.
Arguments:
elemType:type
Accepts an attrset of elements
The elements should be of type elemType
or sets of the type { data, name ? null, before ? [], after ? [] }
where the data field is of type elemType
name defaults to the key in the set.
Can be used in conjunction with wlib.dag.topoSort and wlib.dag.sortAndUnwrap
Note, if the element type is a submodule then the name argument
will always be set to the string "data" since it picks up the
internal structure of the DAG values. To give access to the
"actual" attribute name a new submodule argument is provided with
the name dagName.
The config.optionname value from the associated option
will be normalized such that all items are DAG entries
If you wish to alter the type, you may provide different options
to wlib.dag.dagWith by updating this type wlib.types.dagOf // { strict = false; }
wlib.types.dalWithEsc
same as dalOf except with an extra field esc-fn
esc-fn is to be null, or a function that returns a string
used by wlib.modules.makeWrapper
wlib.types.dagWithEsc
same as dagOf except with an extra field esc-fn
esc-fn is to be null, or a function that returns a string
used by wlib.modules.makeWrapper
wlib.types.stringable
Type for a value that can be converted to string "${like_this}"
used by wlib.modules.makeWrapper
wlib.types.fixedList
Arguments:
length:int,elemType:type
It's a list, but it rejects lists of the wrong length.
Still has regular list merge across multiple definitions, best used inside another list
wlib.types.wrapperFlags
Arguments:
length:int,
len: wlib.types.dalOf (wlib.types.fixedList len wlib.types.stringable)
wlib.types.wrapperFlag
DAL (list) of (stringable or list of stringable)
More flexible than wlib.types.wrapperFlags, allows single items, or lists of items of varied length
wlib.types.file
File type with content and path options
Arguments:
pkgs: nixpkgs instance
Fields:
content: File contents as stringpath: Derived path using pkgs.writeText
wlib.types.attrsRecursive
Like lib.types.anything, but allows contained lists to also be merged
wlib.types.withPackagesType
The kind of type you would provide to pkgs.lua.withPackages or pkgs.python3.withPackages
This type is a function from a set of packages to a list of packages.
If you set it in multiple files, it will merge the resulting lists according to normal module rules for a listOf package.