Skip to content

Commit

Permalink
Disable icontract's doInstallCheck
Browse files Browse the repository at this point in the history
  • Loading branch information
thiagokokada committed Nov 1, 2023
1 parent e2163f3 commit 47aae7c
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 5 deletions.
1 change: 0 additions & 1 deletion default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};
Expand Down
20 changes: 16 additions & 4 deletions nix-alien.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand All @@ -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
Expand All @@ -45,7 +57,7 @@ python3.pkgs.buildPythonApplication {
--subst-var-by nixpkgsHash ${nixpkgs-src.narHash}
'';

nativeCheckInputs = with python3.pkgs; [
nativeCheckInputs = with python3'.pkgs; [
pytestCheckHook
];

Expand Down

0 comments on commit 47aae7c

Please sign in to comment.