2017-10-07 19:37:09 +01:00
|
|
|
{ stdenv, fetchFromGitHub, gtk3, pythonPackages, intltool,
|
2018-02-25 02:23:58 +00:00
|
|
|
pango, gsettings-desktop-schemas,
|
2017-10-07 19:37:09 +01:00
|
|
|
# Optional packages:
|
|
|
|
enableOSM ? true, osm-gps-map
|
|
|
|
}:
|
2014-11-23 03:24:00 +00:00
|
|
|
|
2016-08-14 12:52:23 +01:00
|
|
|
let
|
|
|
|
inherit (pythonPackages) python buildPythonApplication;
|
|
|
|
in buildPythonApplication rec {
|
2017-10-07 19:37:09 +01:00
|
|
|
version = "4.2.6";
|
2014-11-23 03:24:00 +00:00
|
|
|
name = "gramps-${version}";
|
|
|
|
|
2017-10-07 19:37:09 +01:00
|
|
|
buildInputs = [ intltool gtk3 ]
|
|
|
|
# Map support
|
|
|
|
++ stdenv.lib.optional enableOSM osm-gps-map
|
|
|
|
;
|
2014-11-23 03:24:00 +00:00
|
|
|
|
|
|
|
# Currently broken
|
|
|
|
doCheck = false;
|
|
|
|
|
2017-10-07 19:37:09 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "gramps-project";
|
|
|
|
repo = "gramps";
|
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "0k0bx6msc2kvkg0nwa9v2mp3qy7lmnxjd97n6a1zdzlq8yzw29f1";
|
2014-11-23 03:24:00 +00:00
|
|
|
};
|
|
|
|
|
2017-10-07 19:37:09 +01:00
|
|
|
pythonPath = with pythonPackages; [ bsddb3 PyICU pygobject3 pycairo ] ++ [ pango ];
|
2014-11-23 03:24:00 +00:00
|
|
|
|
2016-02-19 12:12:11 +00:00
|
|
|
# Same installPhase as in buildPythonApplication but without --old-and-unmanageble
|
2014-11-23 03:24:00 +00:00
|
|
|
# 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")/${name}.pth
|
|
|
|
fi
|
|
|
|
|
|
|
|
rm -f "$out/lib/${python.libPrefix}"/site-packages/site.py*
|
|
|
|
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
|
|
|
# gobjectIntrospection package, wrap accordingly
|
|
|
|
preFixup = ''
|
|
|
|
wrapProgram $out/bin/gramps \
|
|
|
|
--prefix GI_TYPELIB_PATH : "$GI_TYPELIB_PATH" \
|
|
|
|
--prefix XDG_DATA_DIRS : "$GSETTINGS_SCHEMAS_PATH:$out/share"
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Genealogy software";
|
|
|
|
homepage = http://gramps-project.org;
|
2014-11-23 16:49:38 +00:00
|
|
|
license = licenses.gpl2;
|
2014-11-23 03:24:00 +00:00
|
|
|
};
|
|
|
|
}
|