From c5437823ba586574be3406e79fd9cc34b7fc719e Mon Sep 17 00:00:00 2001 From: James McCorrie Date: Wed, 1 Jul 2026 13:41:41 +0100 Subject: [PATCH] fix: resolve the numpy nixos error Signed-off-by: James McCorrie --- flake.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/flake.nix b/flake.nix index d7ef03dc..291071e7 100644 --- a/flake.nix +++ b/flake.nix @@ -144,6 +144,11 @@ }; shellHook = '' unset PYTHONPATH + # The uv-managed .venv installs prebuilt PyPI wheels (numpy, + # matplotlib, ...) whose C-extensions link against system libraries + # that are not on NixOS's default loader path. Expose them so the + # wheels can be imported. + export LD_LIBRARY_PATH="${lib.makeLibraryPath [pkgs.stdenv.cc.cc.lib pkgs.zlib]}''${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}" ''; }; };