about summary refs log tree commit diff
path: root/pkgs/applications/misc/genesys/default.nix
blob: 9624111b5707df7dc2b41c6bcb796077b02b3d44 (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
35
36
37
38
{ lib, stdenv, fetchurl, jre, graphviz, makeWrapper }:

stdenv.mkDerivation (finalAttrs: {
  pname = "genesys";
  version = "1.0.7";

  src = fetchurl {
    url = "https://github.com/mrlem/genesys/releases/download/v${finalAttrs.version}/${finalAttrs.pname}-${finalAttrs.version}.tar.gz";
    hash = "sha256-I1lEVvwRiGf1f4zUtqKhSb+it/nC8WAmw5S6edquOj8=";
  };

  nativeBuildInputs = [ makeWrapper ];

  # The package is distributed as a prebuilt JAVA binary
  dontConfigure = true;
  dontBuild = true;

  installPhase = ''
    runHook preInstall

    mkdir -p $out
    mv bin lib $out
    wrapProgram $out/bin/${finalAttrs.pname} \
      --set JAVA_HOME "${jre.home}" \
      --prefix PATH : "${graphviz}/bin"

    runHook postInstall
  '';

  meta = {
    description = "Simple family tree generator that scales";
    homepage = "https://github.com/mrlem/genesys";
    license = lib.licenses.gpl3;
    maintainers = with lib.maintainers; [ rogarb ];
    platforms = lib.platforms.all;
  };
})