Merge pull request #66848 from mmahut/avro-tools

avro-tools: properly installing the jar file
This commit is contained in:
Sarah Brofeldt 2019-08-18 23:17:25 +02:00 committed by GitHub
commit ce24ce04ac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1,12 +1,12 @@
{ stdenv, fetchurl, makeWrapper, jre, lib }:
stdenv.mkDerivation rec {
pname = "avro-tools";
version = "1.9.0";
name = "avro-tools-${version}";
src = fetchurl {
url =
"https://repo1.maven.org/maven2/org/apache/avro/avro-tools/${version}/${name}.jar";
"https://repo1.maven.org/maven2/org/apache/avro/avro-tools/${version}/${pname}-${version}.jar";
sha256 = "164mcz7ljd2ikwsq9ba98galcjar4g4n6ag7kkh466nwrpbmd2zi";
};
@ -19,11 +19,10 @@ stdenv.mkDerivation rec {
installPhase = ''
mkdir -p $out/bin
mkdir -p $out/libexec/avro-tools
mv $src ${name}.jar
cp ${name}.jar $out/libexec/avro-tools
cp $src $out/libexec/avro-tools/${pname}.jar
makeWrapper ${jre}/bin/java $out/bin/avro-tools \
--add-flags "-jar $out/libexec/avro-tools/${name}.jar"
--add-flags "-jar $out/libexec/avro-tools/${pname}.jar"
'';
meta = with stdenv.lib; {