1 { autoPatchelfHook, lib, maven, stdenv, src, version }:
3 stdenv.mkDerivation rec {
4 name = "skein-${version}-maven-repo";
8 nativeBuildInputs = [ maven ] ++ lib.optional stdenv.isLinux autoPatchelfHook;
15 then "linux-x86_32 linux-x86_64"
21 mvn -Dmaven.repo.local=$out dependency:get -Dartifact=com.google.protobuf:protoc:3.0.0:exe:$arch
22 mvn -Dmaven.repo.local=$out dependency:get -Dartifact=io.grpc:protoc-gen-grpc-java:1.16.0:exe:$arch
25 if ${ lib.boolToString stdenv.isLinux }
30 # We have to use maven package here as dependency:go-offline doesn't
31 # fetch every required jar.
32 mvn -f java/pom.xml -Dmaven.repo.local=$out package
34 rm $(find $out -name _remote.repositories)
35 rm $(find $out -name resolver-status.properties)
38 outputHashMode = "recursive";
39 outputHashAlgo = "sha256";
40 outputHash = if stdenv.isLinux
41 then "12f0q3444qw6y4f6qsa9540a0fz4cgi844zzi8z1phqn3k4dnl6v"
42 else "0bjbwiv17cary1isxca0m2hsvgs1i5fh18z247h1hky73lnhbrz8";
44 } // lib.optionalAttrs stdenv.isLinux { dontAutoPatchelf = true; }