aboutsummaryrefslogtreecommitdiff
path: root/src/org/euandre/packages.scm
blob: e1adef97df856304981b37ec1058ae4d81fe8fb4 (plain) (blame)
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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
(define-module (org euandre packages)
  #:use-module ((im papo packages) #:prefix pkgs:)
  #:use-module ((guix licenses) #:prefix licenses:)
  #:use-module (gnu)
  #:use-module (guix build-system gnu)
  #:use-module (guix build-system trivial)
  #:use-module (guix git-download)
  #:use-module (guix packages)
  #:use-module (guix utils)
  #:export ())
(use-package-modules
  compiler-tools
  gcc
  video
  xml)
(use-service-modules)




;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Config ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

(define +working-dir+
  (dirname (dirname (dirname (current-source-directory)))))

(define +tld+
  (string-trim-right
   (pkgs:slurp
    (pkgs:str +working-dir+ "/tld.txt"))))




;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;; Package definition functions ;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

(define (hunspell-dictionary-utf8 dict-name)
  (package
    (name
      (string-append "hunspell-dict-" dict-name "-utf8"))
    (version "630b34e6f8f3cbe7aa7b27b6d8ab118e27252fd1")
    (source
      (origin
        (method git-fetch)
        (uri
          (git-reference
            (url "https://github.com/wooorm/dictionaries")
            (commit version)))
        (file-name
          (git-file-name "hunspell-dictionary-utf8" version))
        (sha256
          (base32 "1iknwzh5h04m067ddw9hlzc1qqj4mr9mdkcfapsnay304laaiyn5"))))
    (build-system trivial-build-system)
    (arguments
      `(#:modules ((guix build utils))
        #:builder
        (begin
          (use-modules (guix build utils))
          (let ((source-prefix (string-append (assoc-ref %build-inputs "source")
                                              "/dictionaries/"
                                              ,dict-name
                                              "/index"))
                (install-prefix (string-append %output "/share/hunspell/")))
            (mkdir-p install-prefix)
            (copy-file (string-append source-prefix ".aff")
                       (string-append install-prefix ,dict-name ".aff"))
            (copy-file (string-append source-prefix ".dic")
                       (string-append install-prefix ,dict-name ".dic"))))))
    (synopsis    (string-append "Hunspell " dict-name " dictionary in UTF-8"))
    (description (string-append "Hunspell " dict-name " dictionary in UTF-8"))
    (license licenses:expat)
    (home-page "https://github.com/wooorm/dictionaries")))




;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Inherited packages ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

(define-public gm2
  (package
    (inherit gcc)
    (name "gm2")
    (arguments
      (substitute-keyword-arguments (package-arguments gcc)
        ((#:modules modules %default-gnu-modules)
         (append '((ice-9 regex))
                 modules))
        ((#:configure-flags flags)
         #~(append
            '("--enable-languages=m2")
            (filter (lambda (s)
                      (not (string-match "--enable-languages.*" s)))
                    #$flags)))))
    (native-inputs
      (modify-inputs (package-native-inputs gcc)
        (append flex)))))

(define-public ffmpegx
  (package
    (inherit ffmpeg)
    (name "ffmpegx")
    (arguments
      (substitute-keyword-arguments (package-arguments ffmpeg)
        ((#:configure-flags flags)
         #~(append
            #$flags
            '("--enable-libxml2")))))
    (inputs
      (modify-inputs (package-inputs ffmpeg)
        (append libxml2)))))

(define-public mpvx
  (package
    (inherit mpv)
    (name "mpvx")
    (propagated-inputs
      (modify-inputs (package-propagated-inputs mpv)
        (replace "ffmpeg" ffmpegx)))))




;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Our packages ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

(define-public euandre.org
  (pkgs:mkwbpkg
   +tld+
   "euandre.org"
   (list pkgs:eslaides pkgs:eut pkgs:mktorrent pkgs:mkwb pkgs:xadoc)
   '(ghostscript gnupg imagemagick lilypond moreutils ruby-asciidoctor
     tidy-html)
   "7c016c48b6356147c567a9222de45dd50dd8a405"
   "18fx5ww67hligr2mfgcvcmn4pdwjnr4qqgkbh306ia7rd2km8yyw"
   ""
   ""))

(define-public hunspell-dict-en-utf8
  (hunspell-dictionary-utf8 "en"))

(define-public hunspell-dict-pt-utf8
  (hunspell-dictionary-utf8 "pt"))

(define-public hunspell-dict-fr-utf8
  (hunspell-dictionary-utf8 "fr"))

(define-public hunspell-dict-eo-utf8
  (hunspell-dictionary-utf8 "eo"))

(define-public hunspell-dict-es-utf8
  (hunspell-dictionary-utf8 "es"))

(define-public hunspell-dict-de-utf8
  (hunspell-dictionary-utf8 "de"))

(define-public hunspell-dict-it-utf8
  (hunspell-dictionary-utf8 "it"))



(list
 gm2
 ffmpegx
 mpvx
 euandre.org
 hunspell-dict-en-utf8
 hunspell-dict-pt-utf8
 hunspell-dict-fr-utf8
 hunspell-dict-eo-utf8
 hunspell-dict-es-utf8
 hunspell-dict-de-utf8
 hunspell-dict-it-utf8)