From 62ff6cb69c7ef076e4d797c429aaaed9bbaae433 Mon Sep 17 00:00:00 2001 From: Peter Hoeg Date: Tue, 5 Sep 2017 08:12:33 +0800 Subject: [PATCH] netalyzr: init at 57861 --- pkgs/tools/networking/netalyzr/default.nix | 34 ++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 36 insertions(+) create mode 100644 pkgs/tools/networking/netalyzr/default.nix diff --git a/pkgs/tools/networking/netalyzr/default.nix b/pkgs/tools/networking/netalyzr/default.nix new file mode 100644 index 000000000000..abc6b785c9cb --- /dev/null +++ b/pkgs/tools/networking/netalyzr/default.nix @@ -0,0 +1,34 @@ +{ stdenv, fetchurl, jre }: + +stdenv.mkDerivation rec { + name = "netalyzr-${version}"; + version = "57861"; + + # unfortunately there is not a version specific download URL + src = fetchurl { + url = "http://netalyzr.icsi.berkeley.edu/NetalyzrCLI.jar"; + sha256 = "0fa3gvgp05p1nf1d711052wgvnp0xnvhj2h2bwk1mh1ih8qn50xb"; + }; + + phases = [ "installPhase" ]; + + installPhase = '' + mkdir -p $out/{bin,share/netalyzr} + install -m644 $src $out/share/netalyzr/NetalyzrCLI.jar + cat <<_EOF >> $out/bin/netalyzr + #!${stdenv.shell} + + set -euo pipefail + + exec ${stdenv.lib.getBin jre}/bin/java -jar $out/share/netalyzr/NetalyzrCLI.jar "\$@" + _EOF + chmod 755 $out/bin/netalyzr + ''; + + meta = with stdenv.lib; { + description = "Network debugging and analysis tool"; + homepage = http://netalyzr.icsi.berkeley.edu; + maintainers = with maintainers; [ peterhoeg ]; + platforms = platforms.all; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 9a05d224a811..7b0315f58612 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -4460,6 +4460,8 @@ with pkgs; w3m = w3m-batch; }; + netalyzr = callPackage ../tools/networking/netalyzr { }; + swaks = callPackage ../tools/networking/swaks { }; swiften = callPackage ../development/libraries/swiften { };