2020-04-24 23:36:52 +00:00
|
|
|
{ stdenv, fetchurl, makeWrapper, jre, lib }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "avro-tools";
|
2022-08-21 13:32:41 +00:00
|
|
|
version = "1.11.1";
|
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-08-21 13:32:41 +00:00
|
|
|
sha256 = "sha256-uVTnWXbCS3JQkHWxopixhNue/ihzvukJ0CNDL5gm24g=";
|
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";
|
2022-06-16 17:23:12 +00:00
|
|
|
sourceProvenance = with sourceTypes; [ binaryBytecode ];
|
2020-04-24 23:36:52 +00:00
|
|
|
license = lib.licenses.asl20;
|
2020-10-11 12:50:04 +00:00
|
|
|
maintainers = with lib.maintainers; [ ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|