diff options
author | Alyssa Ross <hi@alyssa.is> | 2021-01-26 18:06:19 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2021-01-26 18:21:18 +0000 |
commit | 7ac6743433dd45ceaead2ca96f6356dc0d064ce6 (patch) | |
tree | b68ec89d7d2a8d2b6e6b1ff94ba26d6af4096350 /nixpkgs/pkgs/build-support/fetchmavenartifact | |
parent | c5c7451dbef37b51f52792d6395a670ef5183d27 (diff) | |
parent | 891f607d5301d6730cb1f9dcf3618bcb1ab7f10e (diff) | |
download | nixlib-7ac6743433dd45ceaead2ca96f6356dc0d064ce6.tar nixlib-7ac6743433dd45ceaead2ca96f6356dc0d064ce6.tar.gz nixlib-7ac6743433dd45ceaead2ca96f6356dc0d064ce6.tar.bz2 nixlib-7ac6743433dd45ceaead2ca96f6356dc0d064ce6.tar.lz nixlib-7ac6743433dd45ceaead2ca96f6356dc0d064ce6.tar.xz nixlib-7ac6743433dd45ceaead2ca96f6356dc0d064ce6.tar.zst nixlib-7ac6743433dd45ceaead2ca96f6356dc0d064ce6.zip |
Merge commit '891f607d5301d6730cb1f9dcf3618bcb1ab7f10e'
Diffstat (limited to 'nixpkgs/pkgs/build-support/fetchmavenartifact')
-rw-r--r-- | nixpkgs/pkgs/build-support/fetchmavenartifact/default.nix | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/nixpkgs/pkgs/build-support/fetchmavenartifact/default.nix b/nixpkgs/pkgs/build-support/fetchmavenartifact/default.nix index 42162638e72d..4274b4b52bfa 100644 --- a/nixpkgs/pkgs/build-support/fetchmavenartifact/default.nix +++ b/nixpkgs/pkgs/build-support/fetchmavenartifact/default.nix @@ -1,6 +1,6 @@ # Adaptation of the MIT-licensed work on `sbt2nix` done by Charles O'Farrell -{ fetchurl, stdenv }: +{ lib, fetchurl, stdenv }: let defaultRepos = [ "https://repo1.maven.org/maven2" @@ -36,21 +36,20 @@ assert (url == "") || (urls == []); # if repos is empty, then url or urls must be specified. assert (repos != []) || (url != "") || (urls != []); - let name_ = - with stdenv.lib; concatStrings [ - (replaceChars ["."] ["_"] groupId) "_" - (replaceChars ["."] ["_"] artifactId) "-" + lib.concatStrings [ + (lib.replaceChars ["."] ["_"] groupId) "_" + (lib.replaceChars ["."] ["_"] artifactId) "-" version ]; mkJarUrl = repoUrl: - with stdenv.lib; concatStringsSep "/" [ - (removeSuffix "/" repoUrl) - (replaceChars ["."] ["/"] groupId) + lib.concatStringsSep "/" [ + (lib.removeSuffix "/" repoUrl) + (lib.replaceChars ["."] ["/"] groupId) artifactId version - "${artifactId}-${version}${optionalString (!isNull classifier) "-${classifier}"}.jar" + "${artifactId}-${version}${lib.optionalString (!isNull classifier) "-${classifier}"}.jar" ]; urls_ = if url != "" then [url] |