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