about summary refs log tree commit diff
path: root/pkgs/build-support
diff options
context:
space:
mode:
authorgithub-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>2020-12-06 12:18:43 +0000
committerGitHub <noreply@github.com>2020-12-06 12:18:43 +0000
commit6bc7a2c81474b3577d9b15bae6586b4c078304fd (patch)
treeedf4223b316b2d8e9928cbe43f7415fa00359db6 /pkgs/build-support
parent8f67f48c0ccdb30f6421dad19deb569eb4bcbe94 (diff)
parent54c7aab7c3836205113cf098571b12e1e416bacf (diff)
downloadnixlib-6bc7a2c81474b3577d9b15bae6586b4c078304fd.tar
nixlib-6bc7a2c81474b3577d9b15bae6586b4c078304fd.tar.gz
nixlib-6bc7a2c81474b3577d9b15bae6586b4c078304fd.tar.bz2
nixlib-6bc7a2c81474b3577d9b15bae6586b4c078304fd.tar.lz
nixlib-6bc7a2c81474b3577d9b15bae6586b4c078304fd.tar.xz
nixlib-6bc7a2c81474b3577d9b15bae6586b4c078304fd.tar.zst
nixlib-6bc7a2c81474b3577d9b15bae6586b4c078304fd.zip
Merge staging-next into staging
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