IT WORKS
This commit is contained in:
parent
da509d97c7
commit
3765e918d6
18 changed files with 348 additions and 226 deletions
|
|
@ -18,6 +18,19 @@ in lib.fix (self: {
|
|||
/** Either a list of strings, or a dotted string that will be split. */
|
||||
convenientAttrPath = t.coercedTo t.str (lib.splitString ".") (t.listOf t.str);
|
||||
|
||||
executablePathInStore = lib.mkOptionType {
|
||||
name = "exepath";
|
||||
description = "executable path in the Nix store";
|
||||
descriptionClass = "noun";
|
||||
merge = lib.mergeEqualOption;
|
||||
functor = lib.defaultFunctor "exepath";
|
||||
check = x: if lib.isDerivation x then (
|
||||
x.meta.mainProgram or null != null
|
||||
) else (
|
||||
lib.pathInStore.check x
|
||||
);
|
||||
};
|
||||
|
||||
concatFoldl = f: list: lib.foldl' (acc: value: acc ++ (f value)) [ ] list;
|
||||
recUpdateFoldl = f: list: lib.foldl' (acc: value: lib.recursiveUpdate acc (f value)) { } list;
|
||||
recUpdateFoldlAttrs = f: attrs: lib.foldlAttrs (acc: name: value: lib.recursiveUpdate acc (f name value)) { } attrs;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue