fetchMavenArtifact: fix metadata support

Fix fetchMavenArtifact to forward the "meta" attribute to mkDerivation
rather than fetchurl.
This commit is contained in:
Volker Diels-Grabsch
2025-08-15 14:17:02 +02:00
parent 19a0795896
commit f81a2dfa52

View File

@@ -31,6 +31,8 @@ args@{
# and `urls` can be specified, not both.
url ? "",
urls ? [ ],
# Metadata
meta ? { },
# The rest of the arguments are just forwarded to `fetchurl`.
...
}:
@@ -71,6 +73,7 @@ let
"classifier"
"repos"
"url"
"meta"
]
// {
urls = urls_;
@@ -79,7 +82,7 @@ let
);
in
stdenv.mkDerivation {
inherit pname version;
inherit pname version meta;
dontUnpack = true;
# By moving the jar to $out/share/java we make it discoverable by java
# packages packages that mention this derivation in their buildInputs.