From 504dc068bbf0bc6e9e753be47f30ff665311468c Mon Sep 17 00:00:00 2001 From: adisbladis Date: Mon, 17 Jan 2022 22:05:58 +1200 Subject: [PATCH] Add overlay that disables checks for packages inherited from nixpkgs This is a more principled fix to #510 that will hopefully prevent this entire class of errors. --- default.nix | 11 +++++++++++ overrides.nix | 5 ----- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/default.nix b/default.nix index c9b70c8..5273c7c 100644 --- a/default.nix +++ b/default.nix @@ -222,10 +222,21 @@ lib.makeScope pkgs.newScope (self: { setuptools-scm = super.setuptools_scm; } ) + + # Fix infinite recursion in a lot of packages because of checkInputs + (self: super: lib.mapAttrs + (name: value: ( + if lib.isDerivation value && lib.hasAttr "overridePythonAttrs" value + then value.overridePythonAttrs (_: { doCheck = false; }) + else value + )) + super) + # Null out any filtered packages, we don't want python.pkgs from nixpkgs (self: super: builtins.listToAttrs (builtins.map (x: { name = moduleName x.name; value = null; }) incompatible)) # Create poetry2nix layer baseOverlay + ] ++ # User provided overrides (if builtins.typeOf overrides == "list" then overrides else [ overrides ]) ); diff --git a/overrides.nix b/overrides.nix index 0cda28b..0fc41f6 100644 --- a/overrides.nix +++ b/overrides.nix @@ -1362,11 +1362,6 @@ self: super: } ); - pyparsing = super.pyparsing.overridePythonAttrs (old: { - # Prevent infinite recursion since checkInputs brings in coverage which in turn depends on pyparsing - doCheck = false; - }); - pyproject-flake8 = super.pyproject-flake8.overridePythonAttrs ( old: { buildInputs = (old.buildInputs or [ ]) ++ [ self.flit-core ];