diff options
author | Pavol Rusnak <pavol@rusnak.io> | 2021-01-24 01:40:18 +0100 |
---|---|---|
committer | Pavol Rusnak <pavol@rusnak.io> | 2021-01-24 01:49:49 +0100 |
commit | 90f73381120f7ae9e0d5f0f6dc16cb141c658494 (patch) | |
tree | 5683ff0c39f9ac901e181fc0591cf03c2b95b07a /pkgs/build-support/fetchmavenartifact/default.nix | |
parent | 2f34b4b883932f0ee2c1787e704f3915786e8cca (diff) |
treewide: stdenv.lib -> lib
Diffstat (limited to 'pkgs/build-support/fetchmavenartifact/default.nix')
-rw-r--r-- | pkgs/build-support/fetchmavenartifact/default.nix | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/pkgs/build-support/fetchmavenartifact/default.nix b/pkgs/build-support/fetchmavenartifact/default.nix index 42162638e72d4..4274b4b52bfa5 100644 --- a/pkgs/build-support/fetchmavenartifact/default.nix +++ b/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] |