From 9f6c58fa0ad62ea2d951481381772c5cda905868 Mon Sep 17 00:00:00 2001 From: Raoul Date: Fri, 24 Jul 2026 15:51:55 +0000 Subject: [PATCH] fix(nix): anchor result* source filter so result_xdr.py is packaged MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The uv2nix workspace source is filtered through `nix-gitignore.gitignoreSourcePure` to drop the `./result` nix build symlink. The pattern was written as `result*` with no leading slash, so by gitignore semantics it matched a path component named `result…` at ANY depth — including `src/komet_node/result_xdr.py`. That file was therefore stripped from the packaged source on every build (cachix included), while `server.py` imports it unconditionally, so the installed `komet-node` crashed on startup with: ModuleNotFoundError: No module named 'komet_node.result_xdr' Anchoring the pattern to the workspace root (`/result*`) still excludes the top-level build symlinks (`result`, `result-1`, …) without matching nested source files. --- nix/komet-node-pyk/default.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/nix/komet-node-pyk/default.nix b/nix/komet-node-pyk/default.nix index a25fa82..840359e 100644 --- a/nix/komet-node-pyk/default.nix +++ b/nix/komet-node-pyk/default.nix @@ -19,7 +19,12 @@ let workspaceRoot = lib.cleanSource (nix-gitignore.gitignoreSourcePure [ ../../.gitignore ".github/" - "result*" + # Anchor to the repo root so this only excludes the top-level `./result*` + # nix build symlinks. Without the leading slash the gitignore pattern + # matches any path component starting with "result" at any depth, which + # silently dropped `src/komet_node/result_xdr.py` from the packaged + # source and made the built node crash with `ModuleNotFoundError`. + "/result*" # do not include submodule directories that might be initilized empty or non-existent due to nix/git # otherwise cachix build might not match the version that is requested by `kup` # TODO: for new projects, add your submodule directories that are not required for nix builds here!