Merge pull request #998 from abathur/pdm_static_urls

pdm: support additional index/source URLs
This commit is contained in:
Paul Haerle 2024-07-09 16:00:16 +02:00 committed by GitHub
commit a9c8595b3f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -192,12 +192,15 @@ in {
else null
);
mkDerivation = {
# TODO: handle sources outside pypi.org
src = lib.mkDefault (libpyproject-fetchers.fetchFromLegacy {
pname = name;
file = source.file;
hash = source.hash;
url = "https://pypi.org/simple";
urls =
[
"https://pypi.org/simple"
]
++ lib.optionals (lib.hasAttrByPath ["tool" "pdm" "source"] pyproject.pyproject) (builtins.map (source: source.url) pyproject.pyproject.tool.pdm.source);
});
propagatedBuildInputs =
lib.mapAttrsToList