gnu: ffmpeg@4: Build against SDL2 2.0 so 'ffplay' gets built.
[jackhill/guix/guix.git] / gnu / packages / rednotebook.scm
CommitLineData
b0985c60
JG
1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2019 Jesse Gibbons <jgibbons2357+guix@gmail.com>
74218ece 3;;; Copyright © 2021 Solene Rapenne <solene@perso.pw>
b0985c60
JG
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 rednotebook)
21 #:use-module (guix packages)
22 #:use-module (guix git-download)
23 #:use-module (guix build-system python)
24 #:use-module ((guix licenses) #:prefix license:)
25 #:use-module (gnu packages python)
26 #:use-module (gnu packages glib)
27 #:use-module (gnu packages gtk)
28 #:use-module (gnu packages webkit)
29 #:use-module (gnu packages python-xyz))
30
31(define-public rednotebook
32 (package
33 (name "rednotebook")
74218ece 34 (version "2.22")
b0985c60
JG
35 (source
36 (origin
37 (method git-fetch)
38 (uri (git-reference
b0e7b699 39 (url "https://github.com/jendrikseipp/rednotebook")
b0985c60
JG
40 (commit (string-append "v" version))))
41 (file-name (git-file-name name version))
42 (sha256
74218ece 43 (base32 "11n970ad0j57vlll5j30ngkrfyil23v1b29ickbnblcldvjbgwa5"))))
b0985c60
JG
44 (build-system python-build-system)
45 (arguments
46 ;; Tests fail to find the "_" function.
47 ;; It should be defined in rednotebook/info.py if '_' is not a member of
48 ;; 'builtins'. It is either not defined or not exported during the check
49 ;; phase. The program does not have this problem after it is installed.
50 ;; TODO: Fix tests.
51 `(#:tests? #f
52 #:imported-modules ((guix build glib-or-gtk-build-system)
53 ,@%python-build-system-modules)
54 #:modules ((ice-9 match)
55 (guix build python-build-system)
56 ((guix build glib-or-gtk-build-system) #:prefix glib-or-gtk:)
57 (guix build utils))
58 #:phases
59 (modify-phases %standard-phases
60 ;; Make sure rednotebook can find the typelibs and webkitgtk shared
61 ;; libraries.
62 (add-before 'wrap 'wrap-with-library-paths
63 (lambda* (#:key inputs outputs #:allow-other-keys)
64 (let ((out (assoc-ref outputs "out"))
65 (gi-typelib-path (getenv "GI_TYPELIB_PATH"))
66 (webkitgtk-path (string-append
67 (assoc-ref inputs "webkitgtk")
68 "/lib")))
69 (wrap-program (string-append out "/bin/rednotebook")
70 `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path))
71 `("LD_LIBRARY_PATH" ":" prefix (,webkitgtk-path)))
72 #t))))))
73 (inputs
8394619b 74 (list gtk+ gtksourceview-3 python-pyyaml python-pygobject webkitgtk))
b0985c60
JG
75 ;; TODO: package the following for python3 (if possible), add them as
76 ;; dependencies, and remove them from rednotebook source:
77 ;; pygtkspellcheck, elib.intl, msgfmt, txt2tags
78 ;; TODO: package and add pyenchant for python3 and add it as a dependency.
79 (home-page "https://www.rednotebook.app")
80 (synopsis "Daily journal with calendar, templates and keyword searching")
81 (description
82 "RedNotebook is a modern desktop journal. It lets you format, tag and
83search your entries. You can also add pictures, links and customizable
84templates, spell check your notes, and export to plain text, HTML, Latex or
85PDF.")
86 (license (list license:gpl2+ ; rednotebook, txt2tags
87 license:lgpl3+ ; elib.intl
88 license:gpl3+)))) ; pygtkspellcheck