2019-07-12 21:05:21 +00:00
|
|
|
{ stdenv, fetchurl, makeWrapper, jre, lib }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-18 20:15:53 +00:00
|
|
|
pname = "avro-tools";
|
2022-03-03 09:15:29 +00:00
|
|
|
version = "1.11.0";
|
2019-07-12 21:05:21 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url =
|
2021-11-06 01:56:39 +00:00
|
|
|
"mirror://maven/org/apache/avro/avro-tools/${version}/${pname}-${version}.jar";
|
2022-03-03 09:15:29 +00:00
|
|
|
sha256 = "sha256-XnfvND5WPojzIS8t0ntwn+3+Zjz9ABEUK2FO6aD4ulw=";
|
2019-07-12 21:05:21 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
dontUnpack = true;
|
|
|
|
|
|
|
|
buildInputs = [ jre ];
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
sourceRoot = ".";
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/bin
|
|
|
|
mkdir -p $out/libexec/avro-tools
|
2019-08-18 20:15:53 +00:00
|
|
|
cp $src $out/libexec/avro-tools/${pname}.jar
|
2019-07-12 21:05:21 +00:00
|
|
|
|
|
|
|
makeWrapper ${jre}/bin/java $out/bin/avro-tools \
|
2019-08-18 20:15:53 +00:00
|
|
|
--add-flags "-jar $out/libexec/avro-tools/${pname}.jar"
|
2019-07-12 21:05:21 +00:00
|
|
|
'';
|
|
|
|
|
2021-01-23 12:26:19 +00:00
|
|
|
meta = with lib; {
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://avro.apache.org/";
|
2019-07-12 21:05:21 +00:00
|
|
|
description = "Avro command-line tools and utilities";
|
2022-06-02 13:38:41 +00:00
|
|
|
sourceProvenance = with sourceTypes; [ binaryBytecode ];
|
2019-07-12 21:05:21 +00:00
|
|
|
license = lib.licenses.asl20;
|
2020-10-08 14:21:05 +00:00
|
|
|
maintainers = with lib.maintainers; [ ];
|
2019-07-12 21:05:21 +00:00
|
|
|
};
|
|
|
|
}
|