2016-08-14 13:52:23 +02:00
|
|
|
{ stdenv, fetchurl, gtk3, pythonPackages, intltool,
|
2014-11-23 04:24:00 +01:00
|
|
|
pango, gsettings_desktop_schemas }:
|
|
|
|
|
2016-08-14 13:52:23 +02:00
|
|
|
let
|
|
|
|
inherit (pythonPackages) python buildPythonApplication;
|
|
|
|
in buildPythonApplication rec {
|
2014-11-23 04:24:00 +01:00
|
|
|
version = "4.1.1";
|
|
|
|
name = "gramps-${version}";
|
|
|
|
|
|
|
|
buildInputs = [ intltool gtk3 ];
|
|
|
|
|
|
|
|
# Currently broken
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "mirror://sourceforge/gramps/Stable/${version}/${name}.tar.gz";
|
|
|
|
sha256 = "0jdps7yx2mlma1hdj64wssvnqd824xdvw0bmn2dnal5fn3h7h060";
|
|
|
|
};
|
|
|
|
|
2016-10-14 00:03:12 +02:00
|
|
|
pythonPath = with pythonPackages; [ pygobject3 pycairo ] ++ [ pango ];
|
2014-11-23 04:24:00 +01:00
|
|
|
|
2016-02-19 13:12:11 +01:00
|
|
|
# Same installPhase as in buildPythonApplication but without --old-and-unmanageble
|
2014-11-23 04:24:00 +01: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 17:49:38 +01:00
|
|
|
license = licenses.gpl2;
|
2014-11-23 04:24:00 +01:00
|
|
|
};
|
|
|
|
}
|