summary refs log tree commit diff
path: root/pkgs/build-support
diff options
context:
space:
mode:
authorLorenzo Manacorda <lorenzo@mailbox.org>2018-07-25 15:55:16 +0200
committerLorenzo Manacorda <lorenzo@mailbox.org>2018-07-25 16:00:52 +0200
commit7a1a0036e6f6108bd12f65d2473bf080e3841da4 (patch)
tree801b0eb014da03a3e447d04c18e2e8b09ffaab57 /pkgs/build-support
parent9f22576897b272300b48c312c5956cfab66acfc6 (diff)
downloadnixpkgs-7a1a0036e6f6108bd12f65d2473bf080e3841da4.tar
nixpkgs-7a1a0036e6f6108bd12f65d2473bf080e3841da4.tar.gz
nixpkgs-7a1a0036e6f6108bd12f65d2473bf080e3841da4.tar.bz2
nixpkgs-7a1a0036e6f6108bd12f65d2473bf080e3841da4.tar.lz
nixpkgs-7a1a0036e6f6108bd12f65d2473bf080e3841da4.tar.xz
nixpkgs-7a1a0036e6f6108bd12f65d2473bf080e3841da4.tar.zst
nixpkgs-7a1a0036e6f6108bd12f65d2473bf080e3841da4.zip
buildMaven: Check for authenticated attribute
The `authenticated` attribute is not always present in the
`project-info.json` produced by maven2nix[0]

We therefore check for its presence, and default it to false.

[0]: https://github.com/NixOS/mvn2nix-maven-plugin/issues/5#issuecomment-311846950
Diffstat (limited to 'pkgs/build-support')
-rw-r--r--pkgs/build-support/build-maven.nix5
1 files changed, 3 insertions, 2 deletions
diff --git a/pkgs/build-support/build-maven.nix b/pkgs/build-support/build-maven.nix
index 30df3e8e733..b9da06c43c8 100644
--- a/pkgs/build-support/build-maven.nix
+++ b/pkgs/build-support/build-maven.nix
@@ -16,10 +16,11 @@ infoFile: let
   script = writeText "build-maven-repository.sh" ''
     ${lib.concatStrings (map (dep: let
       inherit (dep)
-        url sha1 groupId artifactId version
-        authenticated metadata repository-id;
+        url sha1 groupId artifactId
+        version metadata repository-id;
 
       versionDir = dep.unresolved-version or version;
+      authenticated = dep.authenticated or false;
 
       fetch = (if authenticated then requireFile else fetchurl) {
         inherit url sha1;