summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/default.nix4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/default.nix b/lib/default.nix
index 56348bb..196b76b 100644
--- a/lib/default.nix
+++ b/lib/default.nix
@@ -12,4 +12,8 @@ lib: prev: with lib; {
concatLists
listToAttrs
];
+
+ # Collects the inputs of a flake recursively (with possible duplicates).
+ collectFlakeInputs = input:
+ [ input ] ++ concatMap collectFlakeInputs (builtins.attrValues (input.inputs or {}));
}