Merge branch 'master' into staging
[jackhill/guix/guix.git] / gnu / packages / genealogy.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2019 Guillaume Le Vaillant <glv@posteo.net>
3 ;;;
4 ;;; This file is part of GNU Guix.
5 ;;;
6 ;;; GNU Guix is free software; you can redistribute it and/or modify it
7 ;;; under the terms of the GNU General Public License as published by
8 ;;; the Free Software Foundation; either version 3 of the License, or (at
9 ;;; your option) any later version.
10 ;;;
11 ;;; GNU Guix is distributed in the hope that it will be useful, but
12 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
13 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 ;;; GNU General Public License for more details.
15 ;;;
16 ;;; You should have received a copy of the GNU General Public License
17 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
18
19 (define-module (gnu packages genealogy)
20 #:use-module (guix build-system python)
21 #:use-module (guix git-download)
22 #:use-module ((guix licenses) #:prefix license:)
23 #:use-module (guix packages)
24 #:use-module (gnu packages fonts)
25 #:use-module (gnu packages freedesktop)
26 #:use-module (gnu packages geo)
27 #:use-module (gnu packages gettext)
28 #:use-module (gnu packages ghostscript)
29 #:use-module (gnu packages glib)
30 #:use-module (gnu packages gnome)
31 #:use-module (gnu packages graphviz)
32 #:use-module (gnu packages gtk)
33 #:use-module (gnu packages python)
34 #:use-module (gnu packages python-xyz)
35 #:use-module (gnu packages sqlite)
36 #:use-module (gnu packages version-control))
37
38 (define-public gramps
39 (package
40 (name "gramps")
41 (version "5.0.1")
42 (source
43 (origin
44 (method git-fetch)
45 (uri (git-reference
46 (url "https://github.com/gramps-project/gramps.git")
47 (commit (string-append "v" version))))
48 (file-name (git-file-name name version))
49 (sha256
50 (base32
51 "1jz1fbjj6byndvir7qxzhd2ryirrd5h2kwndxpp53xdc05z1i8g7"))))
52 (build-system python-build-system)
53 (native-inputs
54 `(("gettext" ,gettext-minimal)
55 ("intltool" ,intltool)))
56 (inputs
57 `(("font-gnu-freefont-ttf" ,font-gnu-freefont-ttf)
58 ("geocode-glib" ,geocode-glib)
59 ("gexiv2" ,gexiv2)
60 ("ghostscript" ,ghostscript)
61 ("gobject-introspection" ,gobject-introspection)
62 ("gtk+" ,gtk+)
63 ("gtkspell3" ,gtkspell3)
64 ("graphviz" ,graphviz)
65 ("librsvg" ,librsvg)
66 ("osm-gps-map" ,osm-gps-map)
67 ("pango" ,pango)
68 ("python-bsddb3" ,python-bsddb3)
69 ("python-pillow" ,python-pillow)
70 ("python-pycairo" ,python-pycairo)
71 ("python-pygobject" ,python-pygobject)
72 ("python-pyicu" ,python-pyicu)
73 ("rcs" ,rcs)
74 ("sqlite" ,sqlite)
75 ("xdg-utils" ,xdg-utils)))
76 (arguments
77 `(#:imported-modules ((guix build glib-or-gtk-build-system)
78 ,@%python-build-system-modules)
79 #:modules ((ice-9 match)
80 (guix build python-build-system)
81 ((guix build glib-or-gtk-build-system) #:prefix glib-or-gtk:)
82 (guix build utils))
83 #:phases
84 (modify-phases %standard-phases
85 (add-before 'check 'set-home-for-tests
86 (lambda _
87 (setenv "HOME" (getenv "TMPDIR"))
88 #t))
89 (add-before 'wrap 'wrap-with-GI_TYPELIB_PATH
90 (lambda* (#:key inputs outputs #:allow-other-keys)
91 (let ((out (assoc-ref outputs "out"))
92 (paths (map (match-lambda
93 ((output . directory)
94 (let ((girepodir (string-append
95 directory
96 "/lib/girepository-1.0")))
97 (if (file-exists? girepodir)
98 girepodir
99 #f))))
100 inputs)))
101 (wrap-program (string-append out "/bin/gramps")
102 `("GI_TYPELIB_PATH" ":" prefix ,(filter identity paths))))
103 #t))
104 (add-after 'wrap 'glib-or-gtk-wrap
105 (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-wrap)))))
106 (home-page "https://gramps-project.org")
107 (synopsis "Genealogical research software")
108 (description
109 "Gramps is a free software project and community striving to produce
110 a genealogy program that is both intuitive for hobbyists and feature-complete
111 for professional genealogists.")
112 (license license:gpl2+)))