nixpkgs-suyu/pkgs/applications/misc/gramps/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

64 lines
1.9 KiB
Nix
Raw Normal View History

{ lib, fetchFromGitHub, gtk3, pythonPackages, intltool, gexiv2,
2019-04-05 11:28:06 +02:00
pango, gobject-introspection, wrapGAppsHook, gettext,
# Optional packages:
2021-12-27 23:48:28 +01:00
enableOSM ? true, osm-gps-map, glib-networking,
enableGraphviz ? true, graphviz,
enableGhostscript ? true, ghostscript
}:
let
inherit (pythonPackages) python buildPythonApplication;
in buildPythonApplication rec {
2021-07-27 05:03:42 +02:00
version = "5.1.4";
pname = "gramps";
nativeBuildInputs = [ wrapGAppsHook intltool gettext ];
buildInputs = [ gtk3 gobject-introspection pango gexiv2 ]
# Map support
2021-12-27 23:48:28 +01:00
++ lib.optionals enableOSM [ osm-gps-map glib-networking ]
# Graphviz support
2021-01-15 06:42:41 +01:00
++ lib.optional enableGraphviz graphviz
# Ghostscript support
2021-01-15 06:42:41 +01:00
++ lib.optional enableGhostscript ghostscript
;
src = fetchFromGitHub {
owner = "gramps-project";
repo = "gramps";
rev = "v${version}";
2021-07-27 05:03:42 +02:00
sha256 = "00358nzyw686ypqv45imc5k9frcqnhla0hpx9ynna3iy6iz5006x";
};
pythonPath = with pythonPackages; [ bsddb3 PyICU pygobject3 pycairo ];
# Same installPhase as in buildPythonApplication but without --old-and-unmanageble
# install flag.
installPhase = ''
runHook preInstall
mkdir -p "$out/lib/${python.libPrefix}/site-packages"
export PYTHONPATH="$out/lib/${python.libPrefix}/site-packages:$PYTHONPATH"
${python}/bin/${python.executable} setup.py install \
--install-lib=$out/lib/${python.libPrefix}/site-packages \
--prefix="$out"
eapth="$out/lib/${python.libPrefix}"/site-packages/easy-install.pth
if [ -e "$eapth" ]; then
# move colliding easy_install.pth to specifically named one
mv "$eapth" $(dirname "$eapth")/${pname}-${version}.pth
fi
rm -f "$out/lib/${python.libPrefix}"/site-packages/site.py*
runHook postInstall
'';
meta = with lib; {
description = "Genealogy software";
homepage = "https://gramps-project.org";
2014-11-23 17:49:38 +01:00
license = licenses.gpl2;
};
}