1{
2 lib,
3 stdenv,
4 fetchurl,
5 jre,
6 makeWrapper,
7}:
8
9stdenv.mkDerivation rec {
10 pname = "jnetmap";
11 version = "0.5.5";
12 versionSuffix = "-703";
13
14 src = fetchurl {
15 url = "mirror://sourceforge/project/jnetmap/jNetMap%20${version}/jNetMap-${version}${versionSuffix}.jar";
16 sha256 = "sha256-e4Ssm2Sq/v1YZ7ZudAqgQ7Cz2ffwWbSmLFoKhaZvTPg=";
17 };
18
19 nativeBuildInputs = [ makeWrapper ];
20 buildInputs = [ jre ];
21
22 dontUnpack = true;
23
24 installPhase = ''
25 runHook preInstall
26
27 mkdir -p "$out/bin"
28 mkdir -p "$out/lib"
29
30 cp "${src}" "$out/lib/jnetmap.jar"
31 makeWrapper "${jre}/bin/java" "$out/bin/jnetmap" \
32 --add-flags "-jar \"$out/lib/jnetmap.jar\""
33
34 runHook postInstall
35 '';
36
37 meta = with lib; {
38 description = "Graphical network monitoring and documentation tool";
39 mainProgram = "jnetmap";
40 homepage = "http://www.rakudave.ch/jnetmap/";
41 sourceProvenance = with sourceTypes; [ binaryBytecode ];
42 license = licenses.gpl3Plus;
43 # Upstream supports macOS and Windows too.
44 platforms = platforms.linux;
45 maintainers = [ maintainers.bjornfor ];
46 };
47}