about summary refs log tree commit diff
path: root/pkgs/applications/misc/gramps
diff options
context:
space:
mode:
authorEduard Bachmakov <e.bachmakov@gmail.com>2014-11-22 22:24:00 -0500
committerEduard Bachmakov <e.bachmakov@gmail.com>2014-11-22 22:24:00 -0500
commit1ac091712f81573c96442021fc1a571fb4e2af6d (patch)
treedf93472c3cd6bc62d25c388627b32cba2f3c74c6 /pkgs/applications/misc/gramps
parentc347f1c26fecf83546a48c5b0d6c549be8020c7e (diff)
downloadnixlib-1ac091712f81573c96442021fc1a571fb4e2af6d.tar
nixlib-1ac091712f81573c96442021fc1a571fb4e2af6d.tar.gz
nixlib-1ac091712f81573c96442021fc1a571fb4e2af6d.tar.bz2
nixlib-1ac091712f81573c96442021fc1a571fb4e2af6d.tar.lz
nixlib-1ac091712f81573c96442021fc1a571fb4e2af6d.tar.xz
nixlib-1ac091712f81573c96442021fc1a571fb4e2af6d.tar.zst
nixlib-1ac091712f81573c96442021fc1a571fb4e2af6d.zip
Add gramps package.
Basic functionality works. No plugins yet (TODO: GExiv2, pyICU, webkit,
osmgsmmap).

Gives error messages about errors in GTK installation regarding
localization. No impact other than the messages visible.
Diffstat (limited to 'pkgs/applications/misc/gramps')
-rw-r--r--pkgs/applications/misc/gramps/default.nix56
1 files changed, 56 insertions, 0 deletions
diff --git a/pkgs/applications/misc/gramps/default.nix b/pkgs/applications/misc/gramps/default.nix
new file mode 100644
index 000000000000..4e6aac0afb0e
--- /dev/null
+++ b/pkgs/applications/misc/gramps/default.nix
@@ -0,0 +1,56 @@
+{ stdenv, fetchurl, gtk3, pythonPackages, python, pycairo, pygobject3, intltool,
+  pango, gsettings_desktop_schemas }:
+
+pythonPackages.buildPythonPackage rec {
+  version = "4.1.1";
+  name = "gramps-${version}";
+  namePrefix = "";
+
+  buildInputs = [ intltool gtk3 ];
+
+  # Currently broken
+  doCheck = false;
+
+  src = fetchurl {
+    url = "mirror://sourceforge/gramps/Stable/${version}/${name}.tar.gz";
+    sha256 = "0jdps7yx2mlma1hdj64wssvnqd824xdvw0bmn2dnal5fn3h7h060";
+  };
+
+  pythonPath = [ pygobject3 pango pycairo pythonPackages.bsddb ];
+
+  # Same installPhase as in buildPythonPackage 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")/${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;
+  };
+}