Fix infinite recursion for aliases in pkgs/top-level/python-aliases.nix

This fixes #750.
This commit is contained in:
Sem Mulder 2022-10-31 12:32:28 +01:00
parent 54b4cf1557
commit 9dc514d294
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)