-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmanifest.scm
112 lines (106 loc) · 4.21 KB
/
manifest.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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
(use-modules
(guix git)
(guix packages)
(guix packages)
(guix utils)
(gnu packages emacs)
(gnu packages fonts)
(gnu packages fontutils)
(gnu packages gnome)
(gnu packages gnome)
(gnu packages gtk)
(gnu packages gtk)
(gnu packages tex))
(define gtk+-linuxfb
(package/inherit gtk+
(source (git-checkout
(url "https://github.com/wi11dey/gtk.git")
(branch "gtk3-linuxfb")
(recursive? #t)))
(name "gtk+-linuxfb")
(version "3.24.44")
(description (string-append (package-description gtk+) "
This fork adds a GDK Linux framebuffer backend."))
(native-inputs (modify-inputs (package-native-inputs gtk+)
(append vala)))))
(define gtk+->gtk+-linuxfb
(package-input-rewriting
`((,gtk+ ,gtk+-linuxfb))
(cut string-append <> "-linuxfb")))
(gtk+->gtk+-linuxfb emacs-next-pgtk-xwidgets)
(define (autohint otf-font)
(package
(inherit otf-font)
(name (string-append (package-name otf-font) "-ttf"))
(native-inputs
(cons* fontforge
ttfautohint
(package-native-inputs otf-font)))
(arguments
(substitute-keyword-arguments (package-arguments otf-font)
((#:phases phases)
#~(append #$phases
;; Steps from https://tex.stackexchange.com/a/201798:
`((ttfautohint . ,(lambda _
(let* ((fonts (string-append #$output "/share/fonts"))
(source (string-append fonts "/opentype"))
(destination (string-append fonts "/truetype")))
(mkdir destination)
(for-each (lambda (otf)
(let* ((base (string-append "/" (basename otf ".otf")))
(unhinted (string-append destination base "-unhinted.ttf"))
(ttf (string-append destination base ".ttf")))
(invoke #+(file-append fontforge "/bin/fontforge")
"-lang=ff"
"-c" "Open($1); Generate($2)"
otf unhinted)
(delete-file otf)
(invoke #+(file-append ttfautohint "/bin/ttfautohint")
unhinted ttf)
(delete-file unhinted)))
(find-files source "\\.otf$"))
(rmdir source)))))))))))
(concatenate-manifests
(list
(specifications->manifest
'("aspell"
"aspell-dict-en"
"dbus"
"dosfstools" ; Contains mkfs.fat.
"emacs-auctex"
;; "emacs-djvu3"
"emacs-pdf-tools"
"flatpak"
"font-dejavu"
"font-google-noto"
"font-google-noto-sans-cjk"
"git"
"icecat" ; TODO remove
"parted"
"perl" ; Magit expects Perl to be installed for some operations.
"scrot"
"texlive-optex"
"unzip"))
(packages->manifest
(list
(emacs->emacs-next emacs-xwidgets)
(autohint font-latin-modern)
(autohint
(package
(inherit texlive-newcomputermodern)
(name "font-newcomputermodern")
(arguments
(list
#:phases
#~(modify-phases %standard-phases
(add-after 'link-scripts 'move-fonts
(lambda _
(copy-recursively
(string-append #$output:out "/share/texmf-dist/fonts/opentype/public/newcomputermodern")
(string-append #$output:out "/share/fonts/opentype"))
(delete-file-recursively
(string-append #$output:out "/share/texmf-dist"))))
(add-after 'move-fonts 'remove-regular-weight
(lambda _
(for-each delete-file
(find-files #$output:out "NewCM(Math|(|Sans|Uncial)[0-9]{2})(-Regular|-Italic)")))))))))))))