-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcn-foliate.scm
91 lines (89 loc) · 3.55 KB
/
cn-foliate.scm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
;;; Copyright © 2023 pat-hwaki
;;; Copyright © 2023 Zheng Junjie <873216071@qq.com>
(define-module (cn-foliate)
#:use-module (gnu packages freedesktop)
#:use-module (gnu packages gettext)
#:use-module (gnu packages glib)
#:use-module (gnu packages gnome)
#:use-module (gnu packages gtk)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages python)
#:use-module (gnu packages webkit)
#:use-module (guix build utils)
#:use-module (guix build-system meson)
#:use-module (guix gexp)
#:use-module (guix git-download)
#:use-module (guix packages)
#:use-module (guix utils)
#:use-module ((guix licenses) #:prefix license:))
(define-public cn-foliate
(let* ((commit "34b9079a1b7a325febfb3728f632e636d402a372")
(revision "0")
(version* (git-version "3.2.1" revision commit))
(foliate-js
(origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/johnfactotum/foliate-js")
(commit "34b9079a1b7a325febfb3728f632e636d402a372")))
(file-name
(git-file-name "foliate-js" version*))
(sha256
(base32
"01l4adg41cm934ssif0amajq4ka9xi1clkjryisixkhzsmxzcljv")))))
(package
(name "cn-foliate")
(version version*)
(source (origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/johnfactotum/foliate.git")
(commit "afc4b033e76904f1d20604640b2727a58a2e8106")))
(file-name (git-file-name name version))
(sha256
(base32
"1g2jxa3jm0mfj4jx45gw5vq5rimdsyjym3lgw2dvhns7nb42ik8j"))))
(build-system meson-build-system)
(arguments
(list #:glib-or-gtk? #t
#:phases
#~(modify-phases %standard-phases
(add-after 'unpack 'copy-foliate-js
(lambda _
(copy-recursively #$foliate-js "src/foliate-js")))
(add-after 'unpack 'skip-gtk-update-icon-cache
(lambda _
(substitute* "meson.build"
(("gtk_update_icon_cache: true")
"gtk_update_icon_cache: false"))))
(add-after 'glib-or-gtk-wrap 'wrap-program
(lambda* (#:key outputs #:allow-other-keys)
(let ((prog (string-append (assoc-ref outputs "out")
"/bin/foliate")))
;; Put existing typelibs before sushi's deps, so as to
;; correctly infer gdk-pixbuf.
(wrap-program prog
`("GI_TYPELIB_PATH" suffix
(,(getenv "GI_TYPELIB_PATH")))
;; for icon.
`("GDK_PIXBUF_MODULE_FILE" =
(,(getenv "GDK_PIXBUF_MODULE_FILE"))))))))))
(native-inputs
(list pkg-config
`(,glib "bin")
gettext-minimal
gobject-introspection
desktop-file-utils
foliate-js))
(inputs
(list libadwaita
glib
glib-networking
webkitgtk
gtk
gjs))
(home-page "https://johnfactotum.github.io/foliate/")
(synopsis "Read books in style")
(description "A simple and modern GTK e-book reader")
;; foliate foliate-js
(license (list license:gpl3 license:expat)))))