summary refs log tree commit diff
path: root/pkgs/applications/graphics/zgrviewer/default.nix
blob: 4eefd5749b65327f9ec08125b57483f0c020af9a (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
{stdenv, fetchurl, jre, unzip}:
stdenv.mkDerivation rec {
  version = "0.8.2";
  pname = "zgrviewer";
  name="${pname}-${version}";
  src = fetchurl {
    url = "mirror://sourceforge/zvtm/${pname}/${version}/${name}.zip";
    sha256 = "a76b9865c1490a6cfc08911592a19c15fe5972bf58e017cb31db580146f069bb";
  };
  buildInputs = [jre unzip];
  buildPhase = "";
  installPhase = ''
    mkdir -p "$out"/{bin,share/java/zvtm/plugins,share/doc/zvtm}

    cp overview.html *.license.* "$out/share/doc/zvtm"

    cp -r target/* "$out/share/java/zvtm/"

    echo '#!/bin/sh' > "$out/bin/zgrviewer"
    echo "java -jar '$out/share/java/zvtm/zgrviewer-${version}.jar'" >> "$out/bin/zgrviewer"
    chmod a+x "$out/bin/zgrviewer"
  '';
  meta = {
    # Quicker to unpack locally than load Hydra
    hydraPlatforms = [];
    maintainers = with stdenv.lib.maintainers; [raskin];
    license = with stdenv.lib.licenses; lgpl21Plus;
    description = "GraphViz graph viewer/navigator";
  };
}