summary refs log tree commit diff
path: root/pkgs/development/tools/avro-tools
diff options
context:
space:
mode:
authorDavid Lum <david.lum91@gmail.com>2019-07-12 17:05:21 -0400
committerTim Steinbach <NeQuissimus@users.noreply.github.com>2019-07-13 17:45:41 -0400
commitd91fe04dc6fbc1e79548a3223598c66ad6092d46 (patch)
treef080c4c466166fee0ab259d209008e40b7224bcb /pkgs/development/tools/avro-tools
parent9bf7fc99450fa81075436640af68bc97590c037e (diff)
downloadnixpkgs-d91fe04dc6fbc1e79548a3223598c66ad6092d46.tar
nixpkgs-d91fe04dc6fbc1e79548a3223598c66ad6092d46.tar.gz
nixpkgs-d91fe04dc6fbc1e79548a3223598c66ad6092d46.tar.bz2
nixpkgs-d91fe04dc6fbc1e79548a3223598c66ad6092d46.tar.lz
nixpkgs-d91fe04dc6fbc1e79548a3223598c66ad6092d46.tar.xz
nixpkgs-d91fe04dc6fbc1e79548a3223598c66ad6092d46.tar.zst
nixpkgs-d91fe04dc6fbc1e79548a3223598c66ad6092d46.zip
avro-tools: init at 1.9.0
Diffstat (limited to 'pkgs/development/tools/avro-tools')
-rw-r--r--pkgs/development/tools/avro-tools/default.nix35
1 files changed, 35 insertions, 0 deletions
diff --git a/pkgs/development/tools/avro-tools/default.nix b/pkgs/development/tools/avro-tools/default.nix
new file mode 100644
index 00000000000..ee2367d28bb
--- /dev/null
+++ b/pkgs/development/tools/avro-tools/default.nix
@@ -0,0 +1,35 @@
+{ stdenv, fetchurl, makeWrapper, jre, lib }:
+
+stdenv.mkDerivation rec {
+  version = "1.9.0";
+  name = "avro-tools-${version}";
+
+  src = fetchurl {
+    url =
+    "https://repo1.maven.org/maven2/org/apache/avro/avro-tools/${version}/${name}.jar";
+    sha256 = "164mcz7ljd2ikwsq9ba98galcjar4g4n6ag7kkh466nwrpbmd2zi";
+  };
+
+  dontUnpack = true;
+
+  buildInputs = [ jre ];
+  nativeBuildInputs = [ makeWrapper ];
+  sourceRoot = ".";
+
+  installPhase = ''
+    mkdir -p $out/bin
+    mkdir -p $out/libexec/avro-tools
+    mv $src ${name}.jar
+    cp ${name}.jar $out/libexec/avro-tools
+
+    makeWrapper ${jre}/bin/java $out/bin/avro-tools \
+    --add-flags "-jar $out/libexec/avro-tools/${name}.jar"
+  '';
+
+  meta = with stdenv.lib; {
+    homepage    = https://avro.apache.org/;
+    description = "Avro command-line tools and utilities";
+    license     = lib.licenses.asl20;
+    maintainers = [ lib.maintainers.nequissimus ];
+  };
+}