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