Merge pull request #787 from SemMulder/fix-750

Fix infinite recursion for aliases in pkgs/top-level/python-aliases.nix
This commit is contained in:
adisbladis 2022-12-07 17:02:57 +13:00 committed by GitHub
commit ce618e3bf6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 3 deletions

View file

@ -221,6 +221,16 @@ lib.makeScope pkgs.newScope (self: {
getFunctorFn
(
[
# Remove Python packages aliases with non-normalized names to avoid issues with infinite recursion (issue #750).
(self: super: lib.attrsets.mapAttrs
(
name: value:
if lib.isDerivation value && self.hasPythonModule value && (normalizePackageName name) != name
then null
else value
)
super)
(
self: super:
{

View file

@ -59,9 +59,6 @@ let
in
lib.composeManyExtensions [
# normalize all the names
(self: super: poetryLib.normalizePackageSet super)
# NixOps
(self: super:
lib.mapAttrs (_: v: addBuildSystem { inherit self; drv = v; attr = "poetry"; }) (lib.filterAttrs (n: _: lib.strings.hasPrefix "nixops" n) super)