at 24.11-pre 36 lines 972 B view raw
1{ stdenv, fetchurl, makeWrapper, jre, lib }: 2 3stdenv.mkDerivation rec { 4 pname = "avro-tools"; 5 version = "1.11.3"; 6 7 src = fetchurl { 8 url = 9 "mirror://maven/org/apache/avro/avro-tools/${version}/${pname}-${version}.jar"; 10 sha256 = "sha256-dPaV1rZxxE+G/gB7hEDyiMI7ZbzkTpNEtexp/Y6hrPI="; 11 }; 12 13 dontUnpack = true; 14 15 buildInputs = [ jre ]; 16 nativeBuildInputs = [ makeWrapper ]; 17 sourceRoot = "."; 18 19 installPhase = '' 20 mkdir -p $out/bin 21 mkdir -p $out/libexec/avro-tools 22 cp $src $out/libexec/avro-tools/${pname}.jar 23 24 makeWrapper ${jre}/bin/java $out/bin/avro-tools \ 25 --add-flags "-jar $out/libexec/avro-tools/${pname}.jar" 26 ''; 27 28 meta = with lib; { 29 homepage = "https://avro.apache.org/"; 30 description = "Avro command-line tools and utilities"; 31 mainProgram = "avro-tools"; 32 sourceProvenance = with sourceTypes; [ binaryBytecode ]; 33 license = lib.licenses.asl20; 34 maintainers = with lib.maintainers; [ ]; 35 }; 36}