From 8881ad3bae61577d29d9f5e104727256d4d72729 Mon Sep 17 00:00:00 2001 From: Bernardo Magri Date: Wed, 10 Jun 2026 17:53:11 +0100 Subject: [PATCH] fix(install): rewrite follows paths when grafting the upstream lock MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Lock follows paths are absolute from the root node; nomarchy's nodes move one level down in the composed downstream lock, so ["nixpkgs"] must become ["nomarchy","nixpkgs"] — otherwise every follows dangles ("input 'nomarchy/home-manager/nixpkgs' follows a non-existent input"). Verified: the composed lock now resolves the full input tree with `nix flake metadata --offline`. Co-Authored-By: Claude Fable 5 --- pkgs/nomarchy-install/compose-lock.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pkgs/nomarchy-install/compose-lock.py b/pkgs/nomarchy-install/compose-lock.py index a97f6b5..c8f8193 100644 --- a/pkgs/nomarchy-install/compose-lock.py +++ b/pkgs/nomarchy-install/compose-lock.py @@ -40,6 +40,15 @@ def main() -> None: if "nomarchy" in nodes: sys.exit("compose-lock: upstream lock already has a 'nomarchy' node") + # Follows paths (list-valued inputs) are absolute from the lock's + # root; the copied nodes now live one level down, so ["nixpkgs"] + # must become ["nomarchy", "nixpkgs"]. Plain string values reference + # node keys directly and stay as they are. + for node in nodes.values(): + for name, ref in node.get("inputs", {}).items(): + if isinstance(ref, list): + node["inputs"][name] = ["nomarchy"] + ref + nodes["nomarchy"] = { "inputs": nomarchy_inputs, "locked": locked,