fix nix build
1 file changed, 57 insertions(+), 21 deletions(-)
changed files
M flake.nix → flake.nix
@@ -24,15 +24,17 @@ }; }; outputs = - { self - , nixpkgs - , flake-utils - , uv2nix - , pyproject-nix - , pyproject-build-systems - , ... - }: flake-utils.lib.eachDefaultSystem - (system: + { + self, + nixpkgs, + flake-utils, + uv2nix, + pyproject-nix, + pyproject-build-systems, + ... + }: + flake-utils.lib.eachDefaultSystem ( + system: let inherit (nixpkgs) lib;@@ -63,7 +65,42 @@ # This is an additional overlay implementing build fixups. # See: # - https://pyproject-nix.github.io/uv2nix/FAQ.html pyprojectOverrides = final: prev: { + aiohttp = prev.aiohttp.overrideAttrs (old: { + nativeBuildInputs = + (old.nativeBuildInputs or [ ]) + ++ final.resolveBuildSystem { + setuptools = [ ]; + }; + }); + httptools = prev.httptools.overrideAttrs (old: { + nativeBuildInputs = + (old.nativeBuildInputs or [ ]) + ++ final.resolveBuildSystem { + setuptools = [ ]; + }; + }); + markupsafe = prev.markupsafe.overrideAttrs (old: { + nativeBuildInputs = + (old.nativeBuildInputs or [ ]) + ++ final.resolveBuildSystem { + setuptools = [ ]; + }; + }); + pyyaml = prev.pyyaml.overrideAttrs (old: { + nativeBuildInputs = + (old.nativeBuildInputs or [ ]) + ++ final.resolveBuildSystem { + setuptools = [ ]; + }; + }); toml-dataclass = prev.toml-dataclass.overrideAttrs (old: { + nativeBuildInputs = + (old.nativeBuildInputs or [ ]) + ++ final.resolveBuildSystem { + setuptools = [ ]; + }; + }); + uvloop = prev.uvloop.overrideAttrs (old: { nativeBuildInputs = (old.nativeBuildInputs or [ ]) ++ final.resolveBuildSystem {@@ -103,18 +140,17 @@ python pyPkgs.python-lsp-server ]; inputsFrom = [ self.packages.${system}.default ]; - 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; - }; + 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 '';