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>2023-04-09 00:02:38 +0000
committerGitHub <noreply@github.com>2023-04-09 00:02:38 +0000
commit97afa6ec9b8d6547279aae8d6114f3b25cd74fbe (patch)
tree4b7de5571dde31eb36ba44b095f0492f73fcf24f /pkgs/build-support
parentdf6db8c5b0b94b85e578d05b37e5bf3b24555638 (diff)
parent2341c80301d63eecb06f41b69b3cd1bee2f243b9 (diff)
Merge master into staging-next
Diffstat (limited to 'pkgs/build-support')
-rw-r--r--pkgs/build-support/fetchmavenartifact/default.nix17
1 files changed, 6 insertions, 11 deletions
diff --git a/pkgs/build-support/fetchmavenartifact/default.nix b/pkgs/build-support/fetchmavenartifact/default.nix
index b1d8593e72d48..0f3cd4e64dd61 100644
--- a/pkgs/build-support/fetchmavenartifact/default.nix
+++ b/pkgs/build-support/fetchmavenartifact/default.nix
@@ -37,13 +37,8 @@ assert (url == "") || (urls == []);
 assert (repos != []) || (url != "") || (urls != []);
 
 let
-  name_ =
-    lib.concatStrings [
-      (lib.replaceStrings ["."] ["_"] groupId) "_"
-      (lib.replaceStrings ["."] ["_"] artifactId) "-"
-      version
-    ];
-  suffix = if isNull classifier then "" else "-${classifier}";
+  pname = (lib.replaceStrings [ "." ] [ "_" ] groupId) + "_" + (lib.replaceStrings [ "." ] [ "_" ] artifactId);
+  suffix = lib.optionalString (classifier != null) "-${classifier}";
   filename = "${artifactId}-${version}${suffix}.jar";
   mkJarUrl = repoUrl:
     lib.concatStringsSep "/" [
@@ -59,13 +54,13 @@ let
     else map mkJarUrl repos;
   jar =
     fetchurl (
-      builtins.removeAttrs args ["groupId" "artifactId" "version" "classifier" "repos" "url" ]
-        // { urls = urls_; name = "${name_}.jar"; }
+      builtins.removeAttrs args [ "groupId" "artifactId" "version" "classifier" "repos" "url" ]
+      // { urls = urls_; name = "${pname}-${version}.jar"; }
     );
 in
   stdenv.mkDerivation {
-    name = name_;
-    phases = "installPhase fixupPhase";
+    inherit pname version;
+    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.
     installPhase = ''