blob: abc6b785c9cb4b05fdc417742ac47f3c6ce19635 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
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;
};
}
|