Fix `flake.nix` dev-shell install

The refreshed Nix closure no longer supplies `libz.so.1` to the
`uv` NumPy wheel, and leaves the synced `py313` env off `PATH`.

- add Nix `zlib` to `LD_LIBRARY_PATH` for native Python deps
- activate `py313` after `uv sync` so `pyqtgraph`, `piker` and
  `xonsh` resolve from the locked env

(this patch was generated in some part by `opencode` using `gpt-5.6-sol` (`openai`))
flake_update
Gud Boi 2026-07-21 15:13:35 -04:00
parent f6dc218a8e
commit 3da8900f68
1 changed files with 4 additions and 1 deletions

View File

@ -22,6 +22,7 @@
# do store-path extractions
qt6baseStorePath = lib.getLib pkgs.qt6.qtbase;
zlibStorePath = lib.getLib pkgs.zlib;
# ?TODO? can remove below since manual linking not needed?
# qt6QtWaylandStorePath = lib.getLib pkgs.qt6.qtwayland;
@ -70,6 +71,7 @@
# link-in c++ stdlib for various AOT-ext-pkgs (numpy, etc.)
LD_LIBRARY_PATH="${pkgs.stdenv.cc.cc.lib}/lib:$LD_LIBRARY_PATH"
LD_LIBRARY_PATH="${zlibStorePath}/lib:$LD_LIBRARY_PATH"
export LD_LIBRARY_PATH
@ -90,11 +92,12 @@
export UV_PROJECT_ENVIRONMENT="py313"
# sync project-env with all extras
uv sync --dev --all-extras --no-group lint
source "$UV_PROJECT_ENVIRONMENT/bin/activate"
# ------ TIPS ------
# NOTE, to launch the py-venv installed `xonsh` (like @goodboy)
# run the `nix develop` cmd with,
# >> nix develop -c uv run xonsh
# >> nix develop -c xonsh
'';
};
}