projects/guix·blob javascript-team · refs

98 lines · 4.0 KiB

1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2019 Jesse Gibbons <[email protected]>
3;;; Copyright © 2021 Solene Rapenne <[email protected]>
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 gexp)
22 #:use-module (guix packages)
23 #:use-module (guix git-download)
24 #:use-module (guix build-system pyproject)
25 #:use-module ((guix licenses) #:prefix license:)
26 #:use-module (gnu packages bash)
27 #:use-module (gnu packages check)
28 #:use-module (gnu packages gettext)
29 #:use-module (gnu packages glib)
30 #:use-module (gnu packages gtk)
31 #:use-module (gnu packages python)
32 #:use-module (gnu packages python-build)
33 #:use-module (gnu packages python-xyz)
34 #:use-module (gnu packages webkit))
35
36(define-public rednotebook
37 (package
38 (name "rednotebook")
39 (version "2.41")
40 (source
41 (origin
42 (method git-fetch)
43 (uri (git-reference
44 (url "https://github.com/jendrikseipp/rednotebook")
45 (commit (string-append "v" version))))
46 (file-name (git-file-name name version))
47 (sha256
48 (base32 "1nljj227lykl4gq1qvvv0pj00k8pbi3njm4agz7wsfcihz6dlrxi"))))
49 (build-system pyproject-build-system)
50 (arguments
51 (list
52 #:imported-modules
53 `((guix build glib-or-gtk-build-system)
54 ,@%pyproject-build-system-modules)
55 #:modules
56 `((ice-9 match)
57 (guix build pyproject-build-system)
58 ((guix build glib-or-gtk-build-system) #:prefix glib-or-gtk:)
59 (guix build utils))
60 #:phases
61 #~(modify-phases %standard-phases
62 (add-before 'sanity-check 'configure-tests
63 (lambda _
64 (setenv "HOME" (getcwd))))
65 ;; Make sure rednotebook can find the typelibs and webkitgtk shared
66 ;; libraries.
67 (add-before 'wrap 'wrap-with-library-paths
68 (lambda* (#:key inputs outputs #:allow-other-keys)
69 (let ((webkitgtk-bin (search-input-file inputs
70 "bin/WebKitWebDriver")))
71 (wrap-program (string-append #$output "/bin/rednotebook")
72 `("GI_TYPELIB_PATH" ":" prefix
73 (,(getenv "GI_TYPELIB_PATH")))
74 `("LD_LIBRARY_PATH" ":" prefix
75 (,(string-append (dirname (dirname webkitgtk-bin))
76 "/lib"))))))))))
77 (native-inputs (list gettext-minimal python-pytest python-setuptools))
78 (inputs
79 (list bash-minimal
80 gtk+
81 gtksourceview-3
82 python-pyyaml
83 python-pygobject-3.50
84 webkitgtk-for-gtk3))
85 ;; TODO: package the following for python3 (if possible), add them as
86 ;; dependencies, and remove them from rednotebook source:
87 ;; pygtkspellcheck, elib.intl, txt2tags
88 ;; TODO: package and add pyenchant for python3 and add it as a dependency.
89 (home-page "https://www.rednotebook.app")
90 (synopsis "Daily journal with calendar, templates and keyword searching")
91 (description
92 "RedNotebook is a modern desktop journal. It lets you format, tag and
93search your entries. You can also add pictures, links and customizable
94templates, spell check your notes, and export to plain text, HTML, Latex or
95PDF.")
96 (license (list license:gpl2+ ; rednotebook, txt2tags
97 license:lgpl3+ ; elib.intl
98 license:gpl3+)))) ; pygtkspellcheck