Util: Remove catText.

This commit is contained in:
Dmitry Voronin 2024-12-18 13:50:17 +03:00
parent 4583b9b65b
commit 414eefa1ee
Signed by: voronind
SSH key fingerprint: SHA256:3kBb4iV2ahufEBNq+vFbUe4QYfHt98DHQjN7QaptY9k

View file

@ -14,18 +14,12 @@
# List all files in a dir.
ls = path: map (f: "${path}/${f}") (builtins.attrNames (builtins.readDir path));
# Concat all files by `text` 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
# Concat all nix file content by `file` key.
catFile =
files: args:
builtins.foldl' (acc: mod: acc + (builtins.readFile (import mod args).file) + "\n") "" files;
# Concat all files as a set.
# TODO: REMOVE
# Concat all nix files as a set.
catSet =
files: args: builtins.foldl' (acc: mod: acc // mod) { } (map (file: import file args) files);