···1414 lines = lib.mapAttrsToList (name: input: "${name}\t${input.url or ""}") pinnableInputs;
1515 in lib.concatStringsSep "\n" lines;
16161717+ # Collect names of inputs that are explicitly skipped (follows = "") at any nesting level.
1818+ collectSkipped =
1919+ inputMap:
2020+ lib.concatLists (
2121+ lib.mapAttrsToList (
2222+ name: input:
2323+ let
2424+ here = lib.optional (input ? follows && input.follows == "") name;
2525+ nested = if input ? inputs then collectSkipped input.inputs else [ ];
2626+ in
2727+ here ++ nested
2828+ ) inputMap
2929+ );
3030+3131+ skipSet = lib.concatStringsSep "\n" (collectSkipped inputs);
3232+1733 write-npins =
1834 pkgs:
1935 pkgs.writeShellApplication {
···2642 ];
2743 runtimeEnv = {
2844 out = flake-file.intoPath;
2929- inherit queueSeed;
4545+ inherit queueSeed skipSet;
3046 };
3147 text = builtins.readFile ./npins.bash;
3248 };
+3
modules/npins/npins.bash
···55QUEUE_FILE=$(mktemp)
66trap 'rm -f "$SEEN_FILE" "$QUEUE_FILE"' EXIT
7788+# Pre-mark skipped inputs (follows="") as seen so they are never pinned.
99+printf '%s\n' "$skipSet" | grep -v '^$' >> "$SEEN_FILE" || true
1010+811# Seed the BFS queue with all declared inputs.
912echo "$queueSeed" > "$QUEUE_FILE"
1013