1 { lib, fetchFromGitHub, gtk3, pythonPackages, intltool, gexiv2,
2 pango, gobject-introspection, wrapGAppsHook, gettext,
4 enableOSM ? true, osm-gps-map, glib-networking,
5 enableGraphviz ? true, graphviz,
6 enableGhostscript ? true, ghostscript
10 inherit (pythonPackages) python buildPythonApplication;
11 in buildPythonApplication rec {
15 nativeBuildInputs = [ wrapGAppsHook intltool gettext gobject-introspection ];
16 buildInputs = [ gtk3 pango gexiv2 ]
18 ++ lib.optionals enableOSM [ osm-gps-map glib-networking ]
20 ++ lib.optional enableGraphviz graphviz
22 ++ lib.optional enableGhostscript ghostscript
25 src = fetchFromGitHub {
26 owner = "gramps-project";
29 sha256 = "00358nzyw686ypqv45imc5k9frcqnhla0hpx9ynna3iy6iz5006x";
32 pythonPath = with pythonPackages; [ bsddb3 pyicu pygobject3 pycairo ];
34 # Same installPhase as in buildPythonApplication but without --old-and-unmanageble
39 mkdir -p "$out/lib/${python.libPrefix}/site-packages"
41 export PYTHONPATH="$out/lib/${python.libPrefix}/site-packages:$PYTHONPATH"
43 ${python}/bin/${python.executable} setup.py install \
44 --install-lib=$out/lib/${python.libPrefix}/site-packages \
47 eapth="$out/lib/${python.libPrefix}"/site-packages/easy-install.pth
48 if [ -e "$eapth" ]; then
49 # move colliding easy_install.pth to specifically named one
50 mv "$eapth" $(dirname "$eapth")/${pname}-${version}.pth
53 rm -f "$out/lib/${python.libPrefix}"/site-packages/site.py*
58 # https://github.com/NixOS/nixpkgs/issues/149812
59 # https://nixos.org/manual/nixpkgs/stable/#ssec-gnome-hooks-gobject-introspection
63 description = "Genealogy software";
64 homepage = "https://gramps-project.org";
65 license = licenses.gpl2;