2020-04-24 23:36:52 +00:00
|
|
|
{ stdenv, fetchurl, makeWrapper, jre, lib }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "avro-tools";
|
2022-03-10 19:12:11 +00:00
|
|
|
version = "1.11.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url =
|
2021-12-06 16:07:01 +00:00
|
|
|
"mirror://maven/org/apache/avro/avro-tools/${version}/${pname}-${version}.jar";
|
2022-03-10 19:12:11 +00:00
|
|
|
sha256 = "sha256-XnfvND5WPojzIS8t0ntwn+3+Zjz9ABEUK2FO6aD4ulw=";
|
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"
|
|
|
|
'';
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
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
|
|
|
};
|
|
|
|
}
|