aboutsummaryrefslogtreecommitdiff
path: root/pkgs/build-support
diff options
context:
space:
mode:
authorJörg Thalheim <Mic92@users.noreply.github.com>2020-12-06 08:37:15 +0000
committerGitHub <noreply@github.com>2020-12-06 08:37:15 +0000
commit1df84d17b9e0ddc8067e29d67130b8efd1f9afb9 (patch)
treee34585962804936e0fa0faffa29f7f6f9d82ff12 /pkgs/build-support
parent5b7667a1c5ee0ae33fdea89bf2ea8ce65d5677a1 (diff)
parent38ad37822813692de906c87f47801370ac1bcf1a (diff)
Merge pull request #103755 from hlolli/feature/fetchmaven-classifiers
Diffstat (limited to 'pkgs/build-support')
-rw-r--r--pkgs/build-support/fetchmavenartifact/default.nix6
1 files changed, 4 insertions, 2 deletions
diff --git a/pkgs/build-support/fetchmavenartifact/default.nix b/pkgs/build-support/fetchmavenartifact/default.nix
index 583a9ea396cf..42ad7603a8f7 100644
--- a/pkgs/build-support/fetchmavenartifact/default.nix
+++ b/pkgs/build-support/fetchmavenartifact/default.nix
@@ -17,6 +17,8 @@ args@
artifactId
, # Example: "4.3.6"
version
+, # Example: "jdk11"
+ classifier ? null
, # List of maven repositories from where to fetch the artifact.
# Example: [ http://oss.sonatype.org/content/repositories/public ].
repos ? defaultRepos
@@ -48,7 +50,7 @@ let
(replaceChars ["."] ["/"] groupId)
artifactId
version
- "${artifactId}-${version}.jar"
+ "${artifactId}-${version}-${optionalString (!isNull classifier) "-${classifier}"}.jar"
];
urls_ =
if url != "" then [url]
@@ -56,7 +58,7 @@ let
else map mkJarUrl repos;
jar =
fetchurl (
- builtins.removeAttrs args ["groupId" "artifactId" "version" "repos" "url" ]
+ builtins.removeAttrs args ["groupId" "artifactId" "version" "classifier" "repos" "url" ]
// { urls = urls_; name = "${name_}.jar"; }
);
in