summary refs log tree commit diff
path: root/pkgs/build-support/fetchmavenartifact
diff options
context:
space:
mode:
authorPavol Rusnak <pavol@rusnak.io>2021-01-24 01:40:18 +0100
committerPavol Rusnak <pavol@rusnak.io>2021-01-24 01:49:49 +0100
commit90f73381120f7ae9e0d5f0f6dc16cb141c658494 (patch)
tree5683ff0c39f9ac901e181fc0591cf03c2b95b07a /pkgs/build-support/fetchmavenartifact
parent2f34b4b883932f0ee2c1787e704f3915786e8cca (diff)
downloadnixpkgs-90f73381120f7ae9e0d5f0f6dc16cb141c658494.tar
nixpkgs-90f73381120f7ae9e0d5f0f6dc16cb141c658494.tar.gz
nixpkgs-90f73381120f7ae9e0d5f0f6dc16cb141c658494.tar.bz2
nixpkgs-90f73381120f7ae9e0d5f0f6dc16cb141c658494.tar.lz
nixpkgs-90f73381120f7ae9e0d5f0f6dc16cb141c658494.tar.xz
nixpkgs-90f73381120f7ae9e0d5f0f6dc16cb141c658494.tar.zst
nixpkgs-90f73381120f7ae9e0d5f0f6dc16cb141c658494.zip
treewide: stdenv.lib -> lib
Diffstat (limited to 'pkgs/build-support/fetchmavenartifact')
-rw-r--r--pkgs/build-support/fetchmavenartifact/default.nix17
1 files changed, 8 insertions, 9 deletions
diff --git a/pkgs/build-support/fetchmavenartifact/default.nix b/pkgs/build-support/fetchmavenartifact/default.nix
index 42162638e72..4274b4b52bf 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]