2020-04-24 23:36:52 +00:00
|
|
|
{ stdenv, fetchurl, makeWrapper, jre, lib }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "avro-tools";
|
2020-09-25 04:45:31 +00:00
|
|
|
version = "1.9.2";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url =
|
|
|
|
"https://repo1.maven.org/maven2/org/apache/avro/avro-tools/${version}/${pname}-${version}.jar";
|
2020-09-25 04:45:31 +00:00
|
|
|
sha256 = "169cv4fjsj69fa2s87gh1i7wk0xzh3l7sx5yyz3cgyjalg4a12n1";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
dontUnpack = true;
|
|
|
|
|
|
|
|
buildInputs = [ jre ];
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
sourceRoot = ".";
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/bin
|
|
|
|
mkdir -p $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/${pname}.jar"
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
homepage = "https://avro.apache.org/";
|
|
|
|
description = "Avro command-line tools and utilities";
|
|
|
|
license = lib.licenses.asl20;
|
2020-10-11 12:50:04 +00:00
|
|
|
maintainers = with lib.maintainers; [ ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|