Skip to content

Commit 9f6c58f

Browse files
fix(nix): anchor result* source filter so result_xdr.py is packaged
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.
1 parent f590a69 commit 9f6c58f

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

nix/komet-node-pyk/default.nix

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,12 @@ let
1919
workspaceRoot = lib.cleanSource (nix-gitignore.gitignoreSourcePure [
2020
../../.gitignore
2121
".github/"
22-
"result*"
22+
# Anchor to the repo root so this only excludes the top-level `./result*`
23+
# nix build symlinks. Without the leading slash the gitignore pattern
24+
# matches any path component starting with "result" at any depth, which
25+
# silently dropped `src/komet_node/result_xdr.py` from the packaged
26+
# source and made the built node crash with `ModuleNotFoundError`.
27+
"/result*"
2328
# do not include submodule directories that might be initilized empty or non-existent due to nix/git
2429
# otherwise cachix build might not match the version that is requested by `kup`
2530
# TODO: for new projects, add your submodule directories that are not required for nix builds here!

0 commit comments

Comments
 (0)