Fix optional-dependencies in mkPythonEditablePackage

The problem is that optional-dependencies looks something like:

    optional-dependencies = {
        extra1 = [ package1 package2 ];
    };

And the goal is to transform that into some JSON that works as a
pyproject file. So, its supposed to look something like:

    {
        "optional-dependencies": {
            "extra1": [ "package1" "package2" ]
        }
    }

Previously, we were trying to do that converstion with:

    optional-dependencies = lib.mapAttrs (_: lib.getName) optional-dependencies;

The problem is that we're calling lib.getName on the array of
dependencies. Instead, we convert the code to call lib.getName on each
individual dependency in the array.
This commit is contained in:
Palmer Cox 2025-01-10 23:16:32 -05:00
parent 55e0b798c5
commit a7f1305bc1

View File

@ -50,7 +50,7 @@ let
entry-points
;
dependencies = map lib.getName dependencies';
optional-dependencies = lib.mapAttrs (_: lib.getName) optional-dependencies;
optional-dependencies = lib.mapAttrs (_: map lib.getName) optional-dependencies;
};
# Allow empty package