diff --git a/flake.nix b/flake.nix index e743714..7d47c6e 100644 --- a/flake.nix +++ b/flake.nix @@ -95,27 +95,27 @@ devShells.x86_64-linux = { # It is of course perfectly OK to keep using an impure virtualenv workflow and only use uv2nix to build packages. # This devShell simply adds Python and undoes the dependency leakage done by Nixpkgs Python infrastructure. - # impure = pkgs.mkShell { - # packages = [ - # python - # pkgs.uv - # ]; - # env = - # { - # # Prevent uv from managing Python downloads - # UV_PYTHON_DOWNLOADS = "never"; - # # Force uv to use nixpkgs Python interpreter - # UV_PYTHON = python.interpreter; - # } - # // lib.optionalAttrs pkgs.stdenv.isLinux { - # # Python libraries often load native shared objects using dlopen(3). - # # Setting LD_LIBRARY_PATH makes the dynamic library loader aware of libraries without using RPATH for lookup. - # LD_LIBRARY_PATH = lib.makeLibraryPath pkgs.pythonManylinuxPackages.manylinux1; - # }; - # shellHook = '' - # unset PYTHONPATH - # ''; - # }; + impure = pkgs.mkShell { + packages = [ + python + pkgs.uv + ]; + env = + { + # Prevent uv from managing Python downloads + UV_PYTHON_DOWNLOADS = "never"; + # Force uv to use nixpkgs Python interpreter + UV_PYTHON = python.interpreter; + } + // lib.optionalAttrs pkgs.stdenv.isLinux { + # Python libraries often load native shared objects using dlopen(3). + # Setting LD_LIBRARY_PATH makes the dynamic library loader aware of libraries without using RPATH for lookup. + LD_LIBRARY_PATH = lib.makeLibraryPath pkgs.pythonManylinuxPackages.manylinux1; + }; + shellHook = '' + unset PYTHONPATH + ''; + }; # This devShell uses uv2nix to construct a virtual environment purely from Nix, using the same dependency specification as the application. # The notable difference is that we also apply another overlay here enabling editable mode ( https://setuptools.pypa.io/en/latest/userguide/development_mode.html ).