Commit a7f1305b authored by Palmer Cox's avatar Palmer Cox
Browse files

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.
parent 55e0b798
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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