Util: Remove catText.
This commit is contained in:
parent
4583b9b65b
commit
414eefa1ee
10
lib/Util.nix
10
lib/Util.nix
|
@ -14,18 +14,12 @@
|
||||||
# List all files in a dir.
|
# List all files in a dir.
|
||||||
ls = path: map (f: "${path}/${f}") (builtins.attrNames (builtins.readDir path));
|
ls = path: map (f: "${path}/${f}") (builtins.attrNames (builtins.readDir path));
|
||||||
|
|
||||||
# Concat all files by `text` key.
|
# Concat all nix file content by `file` key.
|
||||||
# TODO: REMOVE
|
|
||||||
catText = files: args: builtins.foldl' (acc: mod: acc + (import mod args).text) "" files;
|
|
||||||
|
|
||||||
# Concat all file paths by `file` key.
|
|
||||||
# TODO: REMOVE
|
|
||||||
catFile =
|
catFile =
|
||||||
files: args:
|
files: args:
|
||||||
builtins.foldl' (acc: mod: acc + (builtins.readFile (import mod args).file) + "\n") "" files;
|
builtins.foldl' (acc: mod: acc + (builtins.readFile (import mod args).file) + "\n") "" files;
|
||||||
|
|
||||||
# Concat all files as a set.
|
# Concat all nix files as a set.
|
||||||
# TODO: REMOVE
|
|
||||||
catSet =
|
catSet =
|
||||||
files: args: builtins.foldl' (acc: mod: acc // mod) { } (map (file: import file args) files);
|
files: args: builtins.foldl' (acc: mod: acc // mod) { } (map (file: import file args) files);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue