diff --git a/default.nix b/default.nix index d40adc7..813c294 100644 --- a/default.nix +++ b/default.nix @@ -11,7 +11,6 @@ in nix-alien = pkgs.callPackage ./nix-alien.nix { inherit version; inherit (self.inputs) nix-filter; - python3 = pkgs.python310; nix-index = self.inputs.nix-index-database.packages.${pkgs.system}.nix-index-with-db; nixpkgs-src = self.inputs.nix-index-database.inputs.nixpkgs.sourceInfo; }; diff --git a/nix-alien.nix b/nix-alien.nix index 080ec40..14fc77a 100644 --- a/nix-alien.nix +++ b/nix-alien.nix @@ -13,8 +13,20 @@ let deps = (lib.importTOML ./pyproject.toml).project.dependencies; + python3' = python3.override { + packageOverrides = final: prev: { + icontract = prev.icontract.overrideAttrs (oldAttrs: { + # icontract is a dependency of pylddwrap, that has complex check + # dependencies (astor, deal, numpy...) but almost no runtime + # dependencies + # Disable its tests because it often breaks builds while bringing + # no actual advantage here + doInstallCheck = false; + }); + }; + }; in -python3.pkgs.buildPythonApplication { +python3'.pkgs.buildPythonApplication { inherit version; pname = "nix-alien"; format = "pyproject"; @@ -32,10 +44,10 @@ python3.pkgs.buildPythonApplication { nativeBuildInputs = [ fzf ]; - propagatedBuildInputs = with python3.pkgs; [ + propagatedBuildInputs = with python3'.pkgs; [ nix-index setuptools - ] ++ (lib.attrVals deps python3.pkgs); + ] ++ (lib.attrVals deps python3'.pkgs); preBuild = '' echo "__version__ = \"${version}\"" > nix_alien/_version.py @@ -45,7 +57,7 @@ python3.pkgs.buildPythonApplication { --subst-var-by nixpkgsHash ${nixpkgs-src.narHash} ''; - nativeCheckInputs = with python3.pkgs; [ + nativeCheckInputs = with python3'.pkgs; [ pytestCheckHook ];