<
aboutsummaryrefslogtreecommitdiff
path: root/gnu/services/vpn.scm
blob: cbb4a79a7b876bea83ab09f8a88550720de0d81e (about) (plain)
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
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2017 Julien Lepiller <julien@lepiller.eu>
;;; Copyright © 2017 Clément Lassieur <clement@lassieur.org>
;;; Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
;;; GNU Guix is free software; you can redistribute it and/or modify it
;;; under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 3 of the License, or (at
;;; your option) any later version.
;;;
;;; GNU Guix is distributed in the hope that it will be useful, but
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.

(define-module (gnu services vpn)
  #:use-module (gnu services)
  #:use-module (gnu services configuration)
  #:use-module (gnu services shepherd)
  #:use-module (gnu system shadow)
  #:use-module (gnu packages admin)
  #:use-module (gnu packages vpn)
  #:use-module (guix packages)
  #:use-module (guix records)
  #:use-module (guix gexp)
  #:use-module (srfi srfi-1)
  #:use-module (ice-9 match)
  #:use-module (ice-9 regex)
  #:export (openvpn-client-service
            openvpn-server-service
            openvpn-client-service-type
            openvpn-server-service-type
            openvpn-client-configuration
            openvpn-server-configuration
            openvpn-remote-configuration
            openvpn-ccd-configuration
            generate-openvpn-client-documentation
            generate-openvpn-server-documentation))

;;;
;;; OpenVPN.
;;;

(define (uglify-field-name name)
  (match name
    ('verbosity "verb")
    (_ (let ((str (symbol->string name)))
         (if (string-suffix? "?" str)
             (substring str 0 (1- (string-length str)))
             str)))))

(define (serialize-field field-name val)
  (if (eq? field-name 'pid-file)
      (format #t "")
      (format #t "~a ~a\n" (uglify-field-name field-name) val)))
(define serialize-string serialize-field)
(define (serialize-boolean field-name val)
  (if val
      (serialize-field field-name val)
      (format #t "")))

(define (ip-mask? val)
  (and (string? val)
       (if (string-match "^([0-9]+\\.){3}[0-9]+ ([0-9]+\\.){3}[0-9]+$" val)
           (let ((numbers (string-tokenize val char-set:digit)))
             (all-lte numbers (list 255 255 255 255 255 255 255 255)))
           #f)))
(define serialize-ip-mask serialize-string)

(define-syntax define-enumerated-field-type
  (lambda (x)
    (define (id-append ctx . parts)
      (datum->syntax ctx (apply symbol-append (map syntax->datum parts))))
    (syntax-case x ()
      ((_ name (option ...))
       #`(begin
           (define (#,(id-append #'name #'name #'?) x)
             (memq x '(option ...)))
           (define (#,(id-append #'name #'serialize- #'name) field-name val)
             (serialize-field field-name val)))))))

(define-enumerated-field-type proto
  (udp tcp udp6 tcp6))
(define-enumerated-field-type dev
  (tun tap))

(define key-usage? boolean?)
(define (serialize-key-usage field-name value)
  (if value
      (format #t "remote-cert-tls server\n")
      #f))

(define bind? boolean?)
(define (serialize-bind field-name value)
  (if value
      #f
      (format #t "nobind\n")))

(define resolv-retry? boolean?)
(define (serialize-resolv-retry field-name value)
  (if value
      (format #t "resolv-retry infinite\n")
      #f))

(define (serialize-tls-auth role location)
  (if location
      (serialize-field 'tls-auth
                       (string-append location " " (match role
                                                     ('server "0")
                                                     ('client "1"))))
      #f))
(define (tls-auth? val)
  (or (eq? val #f)
      (string? val)))
(define (serialize-tls-auth-server field-name val)
  (serialize-tls-auth 'server val))
(define (serialize-tls-auth-client field-name val)
  (serialize-tls-auth 'client val))
(define tls-auth-server? tls-auth?)
(define tls-auth-client? tls-auth?)

(define (serialize-number field-name val)
  (serialize-field field-name (number->string val)))

(define (all-lte left right)
  (if (eq? left '())
      (eq? right '())
      (and (<= (string->number (car left)) (car right))
           (all-lte (cdr left) (cdr right)))))

(define (cidr4? val)
  (if (string? val)
      (if (string-match "^([0-9]+\\.){3}[0-9]+/[0-9]+$" val)
          (let ((numbers (string-tokenize val char-set:digit)))
            (all-lte numbers (list 255 255 255 255 32)))
          #f)
      (eq? val #f)))

(define (cidr6? val)
  (if (string? val)
      (string-match "^([0-9a-f]{0,4}:){0,8}/[0-9]{1,3}$" val)
      (eq? val #f)))

(define (serialize-cidr4 field-name val)
  (if (eq? val #f) #f (serialize-field field-name val)))

(define (serialize-cidr6 field-name val)
  (if (eq? val #f) #f (serialize-field field-name val)))

(define (ip? val)
  (if (string? val)
      (if (string-match "^([0-9]+\\.){3}[0-9]+$" val)
          (let ((numbers (string-tokenize val char-set:digit)))
            (all-lte numbers (list 255 255 255 255)))
          #f)
      (eq? val #f)))
(define (serialize-ip field-name val)
  (if (eq? val #f) #f (serialize-field field-name val)))

(define (keepalive? val)
  (and (list? val)
       (and (number? (car val))
            (number? (car (cdr val))))))
(define (serialize-keepalive field-name val)
  (format #t "~a ~a ~a\n" (uglify-field-name field-name)
          (number->string (car val)) (number->string (car (cdr val)))))

(define gateway? boolean?)
(define (serialize-gateway field-name val)
  (and val
       (format #t "push \"redirect-gateway\"\n")))


(define-configuration openvpn-remote-configuration
  (name
   (string "my-server")
   "Server name.")
  (port
   (number 1194)
   "Port number the server listens to."))

(define-configuration openvpn-ccd-configuration
  (name
   (string "client")
   "Client name.")
  (iroute
   (ip-mask #f)
   "Client own network")
  (ifconfig-push
   (ip-mask #f)
   "Client VPN IP."))

(define (openvpn-remote-list? val)
  (and (list? val)
       (or (eq? val '())
           (and (openvpn-remote-configuration? (car val))
                (openvpn-remote-list? (cdr val))))))
(define (serialize-openvpn-remote-list field-name val)
  (for-each (lambda (remote)
              (format #t "remote ~a ~a\n" (openvpn-remote-configuration-name remote)
                      (number->string (openvpn-remote-configuration-port remote))))
            val))

(define (openvpn-ccd-list? val)
  (and (list? val)
       (or (eq? val '())
           (and (openvpn-ccd-configuration? (car val))
                (openvpn-ccd-list? (cdr val))))))
(define (serialize-openvpn-ccd-list field-name val)
  #f)

(define (create-ccd-directory val)
  "Create a ccd directory containing files for the ccd configuration option
of OpenVPN.  Each file in this directory represents particular settings for a
client.  Each file is named after the name of the client."
  (let ((files (map (lambda (ccd)
                      (list (openvpn-ccd-configuration-name ccd)
                            (with-output-to-string
                              (lambda ()
                                (serialize-configuration
                                 ccd openvpn-ccd-configuration-fields)))))
                    val)))
    (computed-file "ccd"
                   (with-imported-modules '((guix build utils))
                     #~(begin
                         (use-modules (guix build utils))
                         (use-modules (ice-9 match))
                         (mkdir-p #$output)
                         (for-each
                          (lambda (ccd)
                            (match ccd
                              ((name config-string)
                               (call-with-output-file
                                   (string-append #$output "/" name)
                                 (lambda (port) (display config-string port))))))
                          '#$files))))))

(define-syntax define-split-configuration
  (lambda (x)
    (syntax-case x ()
      ((_ name1 name2 (common-option ...) (first-option ...) (second-option ...))
       #`(begin
           (define-configuration #,#'name1
             common-option ...
             first-option ...)
           (define-configuration #,#'name2
             common-option ...
             second-option ...))))))

(define-split-configuration openvpn-client-configuration
  openvpn-server-configuration
  ((openvpn
    (package openvpn)
    "The OpenVPN package.")

   (pid-file
    (string "/var/run/openvpn/openvpn.pid")
    "The OpenVPN pid file.")

   (proto
    (proto 'udp)
    "The protocol (UDP or TCP) used to open a channel between clients and
servers.")

   (dev
    (dev 'tun)
    "The device type used to represent the VPN connection.")

   (ca
    (string "/etc/openvpn/ca.crt")
    "The certificate authority to check connections against.")

   (cert
    (string "/etc/openvpn/client.crt")
    "The certificate of the machine the daemon is running on. It should be signed
by the authority given in @code{ca}.")

   (key
    (string "/etc/openvpn/client.key")
    "The key of the machine the daemon is running on. It must be the key whose
certificate is @code{cert}.")

   (comp-lzo?
    (boolean #t)
    "Whether to use the lzo compression algorithm.")

   (persist-key?
    (boolean #t)
    "Don't re-read key files across SIGUSR1 or --ping-restart.")

   (persist-tun?
    (boolean #t)
    "Don't close and reopen TUN/TAP device or run up/down scripts across
SIGUSR1 or --ping-restart restarts.")

   (verbosity
    (number 3)
    "Verbosity level."))
  ;; client-specific configuration
  ((tls-auth
    (tls-auth-client #f)
    "Add an additional layer of HMAC authentication on top of the TLS control
channel to protect against DoS attacks.")

   (verify-key-usage?
    (key-usage #t)
    "Whether to check the server certificate has server usage extension.")

   (bind?
    (bind #f)
    "Bind to a specific local port number.")

   (resolv-retry?
    (resolv-retry #t)
    "Retry resolving server address.")

   (remote
    (openvpn-remote-list '())
    "A list of remote servers to connect to."))
  ;; server-specific configuration
  ((tls-auth
    (tls-auth-server #f)
    "Add an additional layer of HMAC authentication on top of the TLS control
channel to protect against DoS attacks.")

   (port
    (number 1194)
    "Specifies the port number on which the server listens.")

   (server
    (ip-mask "10.8.0.0 255.255.255.0")
    "An ip and mask specifying the subnet inside the virtual network.")

   (server-ipv6
    (cidr6 #f)
    "A CIDR notation specifying the IPv6 subnet inside the virtual network.")

   (dh
    (string "/etc/openvpn/dh2048.pem")
    "The Diffie-Hellman parameters file.")

   (ifconfig-pool-persist
    (string "/etc/openvpn/ipp.txt")
    "The file that records client IPs.")

   (redirect-gateway?
    (gateway #f)
    "When true, the server will act as a gateway for its clients.")

   (client-to-client?
    (boolean #f)
    "When true, clients are allowed to talk to each other inside the VPN.")

   (keepalive
    (keepalive '(10 120))
    "Causes ping-like messages to be sent back and forth over the link so that
each side knows when the other side has gone down. @code{keepalive} requires
a pair. The first element is the period of the ping sending, and the second
element is the timeout before considering the other side down.")

   (max-clients
    (number 100)
    "The maximum number of clients.")

   (status
    (string "/var/run/openvpn/status")
    "The status file. This file shows a small report on current connection. It
is truncated and rewritten every minute.")

   (client-config-dir
    (openvpn-ccd-list '())
    "The list of configuration for some clients.")))

(define (openvpn-config-file role config)
  (let ((config-str
         (with-output-to-string
           (lambda ()
             (serialize-configuration config
                                      (match role
                                        ('server
                                         openvpn-server-configuration-fields)
                                        ('client
                                         openvpn-client-configuration-fields))))))
        (ccd-dir (match role
                   ('server (create-ccd-directory
                             (openvpn-server-configuration-client-config-dir
                              config)))
                   ('client #f))))
    (computed-file "openvpn.conf"
                   #~(begin
                       (use-modules (ice-9 match))
                       (call-with-output-file #$output
                         (lambda (port)
                           (match '#$role
                             ('server (display "" port))
                             ('client (display "client\n" port)))
                           (display #$config-str port)
                           (match '#$role
                             ('server (display
                                       (string-append "client-config-dir "
                                                      #$ccd-dir "\n") port))
                             ('client (display "" port)))))))))

(define (openvpn-shepherd-service role)
  (lambda (config)
    (let* ((config-file (openvpn-config-file role config))
           (pid-file ((match role
                        ('server openvpn-server-configuration-pid-file)
                        ('client openvpn-client-configuration-pid-file))
                      config))
           (openvpn ((match role
                       ('server openvpn-server-configuration-openvpn)
                       ('client openvpn-client-configuration-openvpn))
                     config))
           (log-file (match role
                       ('server "/var/log/openvpn-server.log")
                       ('client "/var/log/openvpn-client.log"))))
      (list (shepherd-service
             (documentation (string-append "Run the OpenVPN "
                                           (match role
                                             ('server "server")
                                             ('client "client"))
                                           " daemon."))
             (provision (match role
                          ('server '(vpn-server))
                          ('client '(vpn-client))))
             (requirement '(networking))
             (start #~(make-forkexec-constructor
                       (list (string-append #$openvpn "/sbin/openvpn")
                             "--writepid" #$pid-file "--config" #$config-file
                             "--daemon")
                       #:pid-file #$pid-file))
             (stop #~(make-kill-destructor)))))))

(define %openvpn-accounts
  (list (user-group (name "openvpn") (system? #t))
        (user-account
         (name "openvpn")
         (group "openvpn")
         (system? #t)
         (comment "Openvpn daemon user")
         (home-directory "/var/empty")
         (shell (file-append shadow "/sbin/nologin")))))

(define %openvpn-activation
  #~(begin
      (use-modules (guix build utils))
      (mkdir-p "/var/run/openvpn")))

(define openvpn-server-service-type
  (service-type (name 'openvpn-server)
                (extensions
                 (list (service-extension shepherd-root-service-type
                                          (openvpn-shepherd-service 'server))
                       (service-extension account-service-type
                                          (const %openvpn-accounts))
                       (service-extension activation-service-type
                                          (const %openvpn-activation))))))

(define openvpn-client-service-type
  (service-type (name 'openvpn-client)
                (extensions
                 (list (service-extension shepherd-root-service-type
                                          (openvpn-shepherd-service 'client))
                       (service-extension account-service-type
                                          (const %openvpn-accounts))
                       (service-extension activation-service-type
                                          (const %openvpn-activation))))))

(define* (openvpn-client-service #:key (config (openvpn-client-configuration)))
  (validate-configuration config openvpn-client-configuration-fields)
  (service openvpn-client-service-type config))

(define* (openvpn-server-service #:key (config (openvpn-server-configuration)))
  (validate-configuration config openvpn-server-configuration-fields)
  (service openvpn-server-service-type config))

(define (generate-openvpn-server-documentation)
  (generate-documentation
   `((openvpn-server-configuration
      ,openvpn-server-configuration-fields
      (ccd openvpn-ccd-configuration))
     (openvpn-ccd-configuration ,openvpn-ccd-configuration-fields))
   'openvpn-server-configuration))

(define (generate-openvpn-client-documentation)
  (generate-documentation
   `((openvpn-client-configuration
      ,openvpn-client-configuration-fields
      (remote openvpn-remote-configuration))
     (openvpn-remote-configuration ,openvpn-remote-configuration-fields))
   'openvpn-client-configuration))
t; version)) (sha256 (base32 "1lkipa4v73z3l5lqs6sdhl898iq41kyxv2jb9agsajzgd58l6cha")))) (build-system haskell-build-system) (properties '((upstream-name . "mime-types"))) (home-page "https://github.com/yesodweb/wai") (synopsis "Basic MIME type handling types and functions") (description "This library provides basic MIME type handling types and functions.") (license license:expat))) (define-public ghc-modern-uri (package (name "ghc-modern-uri") (version "0.3.6.1") (source (origin (method url-fetch) (uri (hackage-uri "modern-uri" version)) (sha256 (base32 "1sag8l91qd7xs56rlx8r6dz9zxxmqsnfw0v47az7l8nirv7zjih2")))) (build-system haskell-build-system) (properties '((upstream-name . "modern-uri"))) (inputs (list ghc-quickcheck ghc-hashable ghc-megaparsec ghc-profunctors ghc-reflection ghc-tagged)) (native-inputs (list ghc-hspec ghc-hspec-megaparsec ghc-hspec-discover)) (arguments `(#:cabal-revision ("1" "0c0mr8aqs963nmy7i8yfih24snaijgwkxim2q2khw12capshac0q"))) (home-page "https://github.com/mrkkrp/modern-uri") (synopsis "Library for working with URIs") (description "This is a library for working with URIs in Haskell as per RFC 3986.") (license license:bsd-3))) (define-public ghc-html (package (name "ghc-html") (version "1.0.1.2") (source (origin (method url-fetch) (uri (hackage-uri "html" version)) (sha256 (base32 "0q9hmfii62kc82ijlg238fxrzxhsivn42x5wd6ffcr9xldg4jd8c")))) (build-system haskell-build-system) (properties '((upstream-name . "html"))) (home-page "https://hackage.haskell.org/package/html") (synopsis "HTML combinator library") (description "This package contains a combinator library for constructing HTML documents.") (license license:bsd-3))) (define-public ghc-html-conduit (package (name "ghc-html-conduit") (version "1.3.2.2") (source (origin (method url-fetch) (uri (hackage-uri "html-conduit" version)) (sha256 (base32 "09bwrdam3y47kqllgg6w098ghqb8jb10dp4wxirsvx5ddpx9zpi6")))) (build-system haskell-build-system) (properties '((upstream-name . "html-conduit"))) (inputs (list ghc-resourcet ghc-conduit ghc-xml-conduit ghc-xml-types ghc-attoparsec ghc-conduit-extra)) (native-inputs (list ghc-hspec ghc-hunit)) (home-page "https://github.com/snoyberg/xml") (synopsis "Parse HTML documents using xml-conduit datatypes") (description "This package provides a parser for HTML documents that uses tagstream-conduit. It automatically balances mismatched tags, so that there shouldn't be any parse failures. It does not handle a full HTML document rendering, such as adding missing html and head tags. Note that, since version 1.3.1, it uses an inlined copy of tagstream-conduit with entity decoding bugfixes applied.") (license license:expat))) (define-public ghc-blaze-html (package (name "ghc-blaze-html") (version "0.9.1.2") (source (origin (method url-fetch) (uri (hackage-uri "blaze-html" version)) (sha256 (base32 "0k1r1hddjgqighazcazxrx6xfhvy2gm8il8l82ainv3cai13yl30")))) (build-system haskell-build-system) (properties '((upstream-name . "blaze-html"))) (arguments `(#:tests? #f ; TODO: Depends on quickcheck<2.14 #:cabal-revision ("1" "0wvlfb3rd9cm3p894p5rl9kggrsr5da3n8x9ydrbagx91yvkxns9"))) (inputs (list ghc-blaze-builder ghc-blaze-markup)) (native-inputs (list ghc-hunit ghc-quickcheck ghc-test-framework ghc-test-framework-hunit ghc-test-framework-quickcheck2)) (home-page "https://jaspervdj.be/blaze") (synopsis "Fast HTML combinator library") (description "This library provides HTML combinators for Haskell.") (license license:bsd-3))) (define-public ghc-aeson (package (name "ghc-aeson") (version "2.0.3.0") (source (origin (method url-fetch) (uri (hackage-uri "aeson" version)) (sha256 (base32 "09dk0j33n262dm75vff3y3i9fm6lh06dyqswwv7a6kvnhhmhlxhr")) (patches (search-patches "ghc-aeson-encodeDouble.patch")))) (build-system haskell-build-system) (properties '((upstream-name . "aeson"))) (inputs (list ghc-base-compat-batteries ghc-time-compat ghc-attoparsec ghc-data-fix ghc-dlist ghc-hashable ghc-indexed-traversable ghc-onetuple ghc-primitive ghc-quickcheck ghc-scientific ghc-semialign ghc-strict ghc-tagged ghc-text-short ghc-th-abstraction ghc-these ghc-unordered-containers ghc-uuid-types ghc-vector ghc-witherable)) (native-inputs (list ghc-base-compat ghc-base-orphans ghc-base16-bytestring ghc-diff ghc-generic-deriving ghc-integer-logarithms ghc-quickcheck-instances ghc-tasty ghc-tasty-golden ghc-tasty-hunit ghc-tasty-quickcheck)) (arguments `(#:cabal-revision ("1" "1zrgn63jzrpk3n3vd44zkzgw7kb5qxlvhx4nk6g3sswwrsz5j32i"))) (home-page "https://github.com/haskell/aeson") (synopsis "Fast JSON parsing and encoding") (description "This package provides a JSON parsing and encoding library for Haskell, optimized for ease of use and high performance. (A note on naming: in Greek mythology, Aeson was the father of Jason.)") (license license:bsd-3))) (define-public ghc-aeson-pretty (package (name "ghc-aeson-pretty") (version "0.8.9") (source (origin (method url-fetch) (uri (hackage-uri "aeson-pretty" version)) (sha256 (base32 "021az9az6xik9c9s3rnar5fr1lgy2h3igibf5ixnc7ps3m2lzg2x")))) (build-system haskell-build-system) (properties '((upstream-name . "aeson-pretty"))) (inputs (list ghc-aeson ghc-base-compat ghc-scientific ghc-vector ghc-unordered-containers ghc-attoparsec ghc-cmdargs)) (home-page "https://github.com/informatikr/aeson-pretty") (synopsis "JSON pretty-printing library and command-line tool") (description "This package provides a JSON pretty-printing library compatible with aeson as well as a command-line tool to improve readability of streams of JSON data. The library provides the function @code{encodePretty}. It is a drop-in replacement for aeson's @code{encode} function, producing JSON-ByteStrings for human readers. The command-line tool reads JSON from stdin and writes prettified JSON to stdout. It also offers a complementary \"compact\"-mode, essentially the opposite of pretty-printing.") (license license:bsd-3))) (define-public ghc-aeson-qq (package (name "ghc-aeson-qq") (version "0.8.4") (source (origin (method url-fetch) (uri (hackage-uri "aeson-qq" version)) (sha256 (base32 "0dpklq2xdhrkg1rdc7zfdjnzm6c3qxx2i1xskrqdxpqi84ffnlyh")))) (build-system haskell-build-system) (properties '((upstream-name . "aeson-qq"))) (inputs (list ghc-base-compat ghc-attoparsec ghc-scientific ghc-vector ghc-aeson ghc-haskell-src-meta)) (native-inputs (list ghc-hspec hspec-discover)) (home-page "https://github.com/zalora/aeson-qq") (synopsis "JSON quasiquoter for Haskell") (description "aeson-qq provides a JSON quasiquoter for Haskell. This package exposes the function @code{aesonQQ} that compile-time converts a string representation of a JSON value into a @code{Data.Aeson.Value}.") (license license:expat))) (define-public ghc-aeson-better-errors (package (name "ghc-aeson-better-errors") (version "0.9.1.1") (source (origin (method url-fetch) (uri (hackage-uri "aeson-better-errors" version)) (sha256 (base32 "05yibq9kqbjb8rh84n12sbax05amvd8jccpja0hyadz58pjy4jnk")))) (build-system haskell-build-system) (properties '((upstream-name . "aeson-better-errors"))) (inputs (list ghc-aeson ghc-unordered-containers ghc-dlist ghc-scientific ghc-vector ghc-transformers-compat ghc-void)) (arguments `(#:cabal-revision ("1" "0wzvrmhn5q2x1mcv43cyxhlck815ldkhx7c7gz5ijjyva1iicgn2"))) (home-page "https://github.com/hdgarrood/aeson-better-errors") (synopsis "Better error messages when decoding JSON values in Haskell") (description "Gives you the tools to build parsers to decode JSON values, and gives good error messages when parsing fails. See also @url{http://harry.garrood.me/blog/aeson-better-errors/}.") (license license:expat))) (define-public ghc-multipart (package (name "ghc-multipart") (version "0.2.1") (source (origin (method url-fetch) (uri (hackage-uri "multipart" version)) (sha256 (base32 "0p6n4knxpjv70nbl6cmd6x7gkdjsjqp4ya7fz00bfrqp7jvhlivn")))) (build-system haskell-build-system) (properties '((upstream-name . "multipart"))) (inputs (list ghc-stringsearch)) (arguments `(#:cabal-revision ("1" "03gaapwnvn843hpm5qwdci9df1wf383msd42p8w9ghilpfjj4qy9"))) (home-page "http://www.github.com/silkapp/multipart") (synopsis "HTTP multipart library") (description "HTTP multipart split out of the cgi package, for Haskell.") (license license:bsd-3))) (define-public ghc-uri-encode (package (name "ghc-uri-encode") (version "1.5.0.7") (source (origin (method url-fetch) (uri (hackage-uri "uri-encode" version)) (sha256 (base32 "0lj2h701af12539p957rw24bxr07mfqd5r4h52i42f43ax165767")))) (build-system haskell-build-system) (properties '((upstream-name . "uri-encode"))) (inputs (list ghc-utf8-string ghc-network-uri)) (arguments `(#:cabal-revision ("2" "03pmvbi56gmg1z2wr3glncc7dbyh666bqp565inh31qzsp9zwmgj"))) (home-page "https://hackage.haskell.org/package/uri-encode") (synopsis "Unicode aware uri-encoding") (description "Unicode aware uri-encoding for Haskell.") (license license:bsd-3))) (define-public ghc-path-pieces (package (name "ghc-path-pieces") (version "0.2.1") (source (origin (method url-fetch) (uri (hackage-uri "path-pieces" version)) (sha256 (base32 "0vx3sivcsld76058925hym2j6hm3g71f0qjr7v59f1g2afgx82q8")))) (build-system haskell-build-system) (properties '((upstream-name . "path-pieces"))) (native-inputs (list ghc-hunit ghc-hspec ghc-quickcheck)) (home-page "https://github.com/yesodweb/path-pieces") (synopsis "Used in Yesod to automatically marshall data in the request path") (description "This Haskell package provides two typeclasses for converting Haskell data types to and from route pieces.") (license license:bsd-3))) (define-public ghc-skein (package (name "ghc-skein") (version "1.0.9.4") (source (origin (method url-fetch) (uri (hackage-uri "skein" version)) (sha256 (base32 "1jdqdk0rz2wnvw735clnj8jh0a9rkrbqjg7vk3w6wczdql6cm0pq")))) (build-system haskell-build-system) (properties '((upstream-name . "skein"))) (inputs (list ghc-cereal ghc-tagged ghc-crypto-api)) (native-inputs (list ghc-hspec)) (home-page "https://github.com/yesodweb/path-pieces") (synopsis "Skein family of cryptographic hash functions for Haskell") (description "@uref{(http://www.skein-hash.info, Skein} is a family of fast secure cryptographic hash functions designed by Niels Ferguson, Stefan Lucks, Bruce Schneier, Doug Whiting, Mihir Bellare, Tadayoshi Kohno, Jon Callas and Jesse Walker. This Haskell package uses bindings to the optimized C implementation of Skein.") (license license:bsd-3))) (define-public ghc-clientsession (package (name "ghc-clientsession") (version "0.9.1.2") (source (origin (method url-fetch) (uri (hackage-uri "clientsession" version)) (sha256 (base32 "0s6h4ykj16mpf7nlw2iqn2ji0p8g1fn5ni0s7yqaili6vv2as5ar")))) (build-system haskell-build-system) (properties '((upstream-name . "clientsession"))) (inputs (list ghc-cereal ghc-tagged ghc-crypto-api ghc-skein ghc-base64-bytestring ghc-entropy ghc-cprng-aes ghc-cipher-aes ghc-crypto-random ghc-setenv)) (native-inputs (list ghc-hunit ghc-hspec ghc-quickcheck)) (home-page "https://github.com/yesodweb/clientsession/tree/master") (synopsis "Haskell library for securely store session data in a client-side cookie") (description "This Haskell package achieves security through AES-CTR encryption and Skein-MAC-512-256 authentication. Uses Base64 encoding to avoid any issues with characters.") (license license:expat))) (define-public ghc-yesod-core (package (name "ghc-yesod-core") (version "1.6.24.2") (source (origin (method url-fetch) (uri (hackage-uri "yesod-core" version)) (sha256 (base32 "0cql4gk83ya0lyv0nyrp387nljpab4dwwy288rzp8klq9z5r2a7j")))) (build-system haskell-build-system) (properties '((upstream-name . "yesod-core"))) (inputs (list ghc-aeson ghc-auto-update ghc-blaze-html ghc-blaze-markup ghc-case-insensitive ghc-cereal ghc-clientsession ghc-conduit ghc-conduit-extra ghc-cookie ghc-entropy ghc-fast-logger ghc-http-types ghc-memory ghc-monad-logger ghc-path-pieces ghc-primitive ghc-random ghc-resourcet ghc-shakespeare ghc-unix-compat ghc-unliftio ghc-unordered-containers ghc-vector ghc-wai ghc-wai-extra ghc-wai-logger ghc-warp ghc-word8)) (native-inputs (list ghc-hspec ghc-hunit ghc-async ghc-hspec ghc-hspec-expectations ghc-network ghc-streaming-commons)) (home-page "http://www.yesodweb.com/") (synopsis "Core package for the Yesod web framework") (description "This Haskell package provides all core functionality, for Yesod, on which other packages can be built. It provides dispatch, handler functions, widgets, etc.") (license license:expat))) (define-public ghc-yesod-persistent (package (name "ghc-yesod-persistent") (version "1.6.0.8") (source (origin (method url-fetch) (uri (hackage-uri "yesod-persistent" version)) (sha256 (base32 "02vm0qm0yxqn6x61iir81wf6ibwnf8gkia8lw71fgpxgav154ig6")))) (build-system haskell-build-system) (properties '((upstream-name . "yesod-persistent"))) (inputs (list ghc-yesod-core ghc-persistent ghc-persistent-template ghc-blaze-builder ghc-conduit ghc-resourcet ghc-resource-pool)) (native-inputs (list ghc-hspec ghc-wai-extra ghc-persistent-sqlite hspec-discover)) (home-page "http://www.yesodweb.com/") (synopsis "Helpers for using Persistent from Yesod") (description "This Haskell package provides helpers for using Persistent from Yesod.") (license license:expat))) (define-public ghc-yesod-form (package (name "ghc-yesod-form") (version "1.7.4") (source (origin (method url-fetch) (uri (hackage-uri "yesod-form" version)) (sha256 (base32 "012w6pq0zznwqn19nx5h30rmd7dazcd0d75a6426d7brxvf9vn98")))) (build-system haskell-build-system) (properties '((upstream-name . "yesod-form"))) (inputs (list ghc-aeson ghc-attoparsec ghc-blaze-builder ghc-blaze-html ghc-blaze-markup ghc-byteable ghc-data-default ghc-email-validate ghc-persistent ghc-resourcet ghc-shakespeare ghc-wai ghc-xss-sanitize ghc-yesod-core ghc-yesod-persistent ghc-network-uri)) (native-inputs (list ghc-hspec)) (home-page "http://www.yesodweb.com/") (synopsis "Form handling support for Yesod Web Framework") (description "This Haskell package provides a set of basic form inputs such as text, number, time, checkbox, select, textarea, etc through the @code{Yesod.Form.Fields} module. Also, there is @code{Yesod.Form.Nic} module providing richtext field using Nic editor.") (license license:expat))) (define-public ghc-yesod (package (name "ghc-yesod") (version "1.6.2.1") (source (origin (method url-fetch) (uri (hackage-uri "yesod" version)) (sha256 (base32 "1qglaxqx96c7wi4817ff67c9g2fxlnjzdpgic458i80khpdlmb5c")))) (build-system haskell-build-system) (properties '((upstream-name . "yesod"))) (inputs (list ghc-aeson ghc-conduit ghc-data-default-class ghc-fast-logger ghc-file-embed ghc-monad-logger ghc-shakespeare ghc-streaming-commons ghc-unordered-containers ghc-wai ghc-wai-extra ghc-wai-logger ghc-warp ghc-yaml ghc-yesod-core ghc-yesod-form ghc-yesod-persistent)) (home-page "http://www.yesodweb.com/") (synopsis "Framework for creating type-safe, RESTful web applications") (description "The Haskell package package groups together the various Yesod related packages into one cohesive whole. This is the version of Yesod, whereas most of the core code lives in @code{ghc-yesod-core}.") (license license:expat))) (define-public ghc-hxt-charproperties (package (name "ghc-hxt-charproperties") (version "9.5.0.0") (source (origin (method url-fetch) (uri (hackage-uri "hxt-charproperties" version)) (sha256 (base32 "0jm98jddbsd60jc2bz8wa71rslagbaqf00ia7fvfsaiaa54nk0r8")))) (build-system haskell-build-system) (properties '((upstream-name . "hxt-charproperties"))) (home-page "https://github.com/UweSchmidt/hxt") (synopsis "Character properties and classes for XML and Unicode") (description "The modules provided by this package contain predicates for Unicode blocks and char properties and character predicates defined by XML. The supported Unicode version is 7.0.0") (license license:expat))) (define-public ghc-hxt-unicode (package (name "ghc-hxt-unicode") (version "9.0.2.4") (source (origin (method url-fetch) (uri (hackage-uri "hxt-unicode" version)) (sha256 (base32 "0rj48cy8z4fl3zpg5bpa458kqr83adav6jnqv4i71dclpprj6n3v")))) (build-system haskell-build-system) (properties '((upstream-name . "hxt-unicode"))) (inputs (list ghc-hxt-charproperties)) (home-page "http://www.fh-wedel.de/~si/HXmlToolbox/index.html https://github.com/UweSchmidt/hxt") (synopsis "Unicode en-/decoding functions for utf8, iso-latin-* and other encodings") (description "This package provides Unicode encoding and decoding functions for encodings used in the Haskell XML Toolbox. ISO Latin 1-16, utf8, utf16, ASCII are supported. Decoding is done with lazy functions, errors may be detected or ignored.") (license license:expat))) (define-public ghc-hxt-regex-xmlschema (package (name "ghc-hxt-regex-xmlschema") (version "9.2.0.7") (source (origin (method url-fetch) (uri (hackage-uri "hxt-regex-xmlschema" version)) (sha256 (base32 "0ynrf65m7abq2fjnarlwq6i1r99pl89npibxx05rlplcgpybrdmr")))) (build-system haskell-build-system) (properties '((upstream-name . "hxt-regex-xmlschema"))) (inputs (list ghc-hxt-charproperties ghc-hunit)) (home-page "https://wiki.haskell.org/Regular_expressions_for_XML_Schema") (synopsis "Regular expression library for W3C XML Schema regular expressions") (description "This library supports full W3C XML Schema regular expressions inclusive all Unicode character sets and blocks. It is implemented by the technique of derivations of regular expressions.") (license license:expat))) (define-public ghc-hxt (package (name "ghc-hxt") (version "9.3.1.22") (source (origin (method url-fetch) (uri (hackage-uri "hxt" version)) (sha256 (base32 "1n9snbdl46x23ka7bbsls1vsn0plpmfmbpbl0msjfm92fkk2yq7g")))) (build-system haskell-build-system) (properties '((upstream-name . "hxt"))) (outputs '("out" "static" "doc")) (inputs (list ghc-hxt-charproperties ghc-hxt-unicode ghc-hxt-regex-xmlschema ghc-network-uri)) (home-page "https://github.com/UweSchmidt/hxt") (synopsis "Collection of tools for processing XML with Haskell") (description "The Haskell XML Toolbox bases on the ideas of HaXml and HXML, but introduces a more general approach for processing XML with Haskell.") (license license:expat))) (define-public ghc-hxt-xpath (package (name "ghc-hxt-xpath") (version "9.1.2.2") (source (origin (method url-fetch) (uri (hackage-uri "hxt-xpath" version)) (sha256 (base32 "0wlq9s01icalnvjkkilx5zaqp3ff4v5limj1xy8i18qpzjspqdsh")))) (build-system haskell-build-system) (properties '((upstream-name . "hxt-xpath"))) (inputs (list ghc-hxt)) (home-page "https://github.com/UweSchmidt/hxt") (synopsis "The XPath modules for HXT") (description "This extension for the Haskell XML Toolbox defines data types to represent XPath, navigation trees and primitives to select and edit subtrees from them. Some primitives have both a functional and an arrow interface.") (license license:expat))) (define-public ghc-http-common (package (name "ghc-http-common") (version "0.8.3.4") (source (origin (method url-fetch) (uri (hackage-uri "http-common" version)) (sha256 (base32 "1xpbnfac0fqa5r670ggwm4kq3cmz9jpaw9bx40j9w9qiw6xi4i28")))) (build-system haskell-build-system) (properties '((upstream-name . "http-common"))) (inputs (list ghc-base64-bytestring ghc-blaze-builder ghc-case-insensitive ghc-network ghc-random ghc-unordered-containers)) (home-page "https://github.com/afcowie/http-streams/") (synopsis "Common types for HTTP clients and servers") (description "Base types used by a variety of HTTP clients and servers. See http-streams @code{Network.Http.Client} or pipes-http @code{Pipes.Http.Client} for full documentation. You can import @code{Network.Http.Types} if you like, but both http-streams and pipes-http re-export this package's types and functions.") (license license:bsd-3))) (define-public ghc-http-streams (package (name "ghc-http-streams") (version "0.8.9.6") (source (origin (method url-fetch) (uri (hackage-uri "http-streams" version)) (sha256 (base32 "1h8nnp1y4ngv6mwr3fxv428kcvrd3ming179sza8fkn49pcwdlxs")))) (build-system haskell-build-system) (properties '((upstream-name . "http-streams"))) (inputs (list ghc-attoparsec ghc-base64-bytestring ghc-blaze-builder ghc-case-insensitive ghc-io-streams ghc-hsopenssl ghc-openssl-streams ghc-unordered-containers ghc-aeson ghc-http-common ghc-network-uri ghc-network)) (native-inputs (list ghc-hunit ghc-lifted-base ghc-aeson-pretty ghc-hspec ghc-hspec-expectations ghc-random ghc-snap-core ghc-snap-server)) (home-page "https://github.com/aesiniath/http-streams/") (synopsis "HTTP client using io-streams") (description "An HTTP client using the Snap Framework's io-streams library to handle the streaming IO. The API is optimized for ease of use for the rather common case of code needing to query web services and deal with the result.") (license license:bsd-3))) ;; Breaks cycle between ghc-http-streams and ghc-snap-server (define-public ghc-http-streams-bootstrap (package (inherit ghc-http-streams) (name "ghc-http-streams-bootstrap") (arguments `(#:tests? #f)) (native-inputs '()) (properties '((hidden? #t))))) (define-public ghc-snap-core (package (name "ghc-snap-core") (version "1.0.5.0") (source (origin (method url-fetch) (uri (hackage-uri "snap-core" version)) (sha256 (base32 "0hf671g7h4nikfvi05q3mmcxhfcsh874dkansssn0mc68k9fsak4")))) (build-system haskell-build-system) (properties '((upstream-name . "snap-core"))) (arguments `(#:cabal-revision ("3" "02r6plphl4vqig3xap9amdib0qjd98nqpn5jhy6hsbiwh3p7cy9b"))) (inputs (list ghc-old-locale ghc-hunit ghc-attoparsec ghc-bytestring-builder ghc-case-insensitive ghc-lifted-base ghc-io-streams ghc-hashable ghc-monad-control ghc-random ghc-readable ghc-regex-posix ghc-transformers-base ghc-unix-compat ghc-unordered-containers ghc-vector ghc-network-uri ghc-network)) (native-inputs (list ghc-quickcheck ghc-parallel ghc-test-framework ghc-test-framework-hunit ghc-test-framework-quickcheck2 ghc-zlib)) (home-page "http://snapframework.com/") (synopsis "Haskell Web Framework (core interfaces and types)") (description "Snap is a simple and fast web development framework and server written in Haskell. For more information, you can visit the Snap project website at @uref{http://snapframework.com/}. This library contains the core definitions and types for the Snap framework.") (license license:bsd-3))) (define-public ghc-snap-server (package (name "ghc-snap-server") (version "1.1.2.0") (source (origin (method url-fetch) (uri (hackage-uri "snap-server" version)) (sha256 (base32 "0w4yv9a5ilpma0335ariwap2iscmdbaaif88lq3cm7px910nyc4j")))) (build-system haskell-build-system) (properties '((upstream-name . "snap-server"))) (inputs (list ghc-attoparsec ghc-blaze-builder ghc-bytestring-builder ghc-case-insensitive ghc-clock ghc-io-streams ghc-io-streams-haproxy ghc-lifted-base ghc-network ghc-old-locale ghc-snap-core ghc-unix-compat ghc-vector)) (native-inputs (list ghc-base16-bytestring ghc-monad-control ghc-random ghc-threads ghc-hunit ghc-quickcheck ghc-http-streams-bootstrap ghc-http-common ghc-parallel ghc-test-framework ghc-test-framework-hunit ghc-test-framework-quickcheck2)) (arguments `(#:phases (modify-phases %standard-phases (add-before 'configure 'update-constraints (lambda _ (substitute* "snap-server.cabal" (("\\b(attoparsec|base|bytestring|time)\\s+[^,]+" all dep) dep))))))) (home-page "http://snapframework.com/") (synopsis "Web server for the Snap Framework") (description "Snap is a simple and fast web development framework and server written in Haskell. For more information, you can visit the Snap project website at @uref{http://snapframework.com/}. The Snap HTTP server is a high performance web server library written in Haskell. Together with the snap-core library upon which it depends, it provides a clean and efficient Haskell programming interface to the HTTP protocol.") (license license:bsd-3))) (define-public ghc-js-jquery (package (name "ghc-js-jquery") (version "3.3.1") (source (origin (method url-fetch) (uri (hackage-uri "js-jquery" version)) (sha256 (base32 "16q68jzbs7kp07dnq8cprdcc8fd41rim38039vg0w4x11lgniq70")))) (build-system haskell-build-system) (properties '((upstream-name . "js-jquery"))) (arguments `(#:tests? #f)) ; tests do network IO (home-page "https://github.com/ndmitchell/js-jquery") (synopsis "Obtain minified jQuery code") (description "This package bundles the minified @url{http://jquery.com/, jQuery} code into a Haskell package, so it can be depended upon by Cabal packages. The first three components of the version number match the upstream jQuery version. The package is designed to meet the redistribution requirements of downstream users (e.g. Debian).") (license license:expat))) (define-public ghc-js-flot (package (name "ghc-js-flot") (version "0.8.3") (source (origin (method url-fetch) (uri (hackage-uri "js-flot" version)) (sha256 (base32 "0yjyzqh3qzhy5h3nql1fckw0gcfb0f4wj9pm85nafpfqp2kg58hv")))) (build-system haskell-build-system) (properties '((upstream-name . "js-flot"))) (inputs (list ghc-http)) (home-page "https://github.com/ndmitchell/js-flot") (synopsis "Obtain minified flot code") (description "This package bundles the minified @url{http://www.flotcharts.org/, Flot} code (a jQuery plotting library) into a Haskell package, so it can be depended upon by Cabal packages. The first three components of the version number match the upstream flot version. The package is designed to meet the redistribution requirements of downstream users (e.g. Debian).") (license license:expat))) (define-public ghc-happstack-server (package (name "ghc-happstack-server") (version "7.7.2") (source (origin (method url-fetch) (uri (hackage-uri "happstack-server" version)) (sha256 (base32 "175aal1l4g558y89skck3s04db0bjblkxp77bijf1s9iyc07n669")))) (build-system haskell-build-system) (properties '((upstream-name . "happstack-server"))) (inputs (list ghc-network ghc-network-uri ghc-base64-bytestring ghc-blaze-html ghc-extensible-exceptions ghc-hslogger ghc-html ghc-monad-control ghc-old-locale ghc-semigroups ghc-sendfile ghc-system-filepath ghc-syb ghc-threads ghc-transformers-base ghc-transformers-compat ghc-utf8-string ghc-zlib)) (native-inputs (list ghc-hunit)) (home-page "https://happstack.com") (synopsis "Web related tools and services for Haskell") (description "Happstack Server provides an HTTP server and a rich set of functions for routing requests, handling query parameters, generating responses, working with cookies, serving files, and more.") (license license:bsd-3))) (define-public ghc-sendfile (package (name "ghc-sendfile") (version "0.7.11.4") (source (origin (method url-fetch) (uri (hackage-uri "sendfile" version)) (sha256 (base32 "1i2i0w18l2ysambyylv93jzy0adiiqwwnhg7zagqb7p2srybxc3k")))) (build-system haskell-build-system) (properties '((upstream-name . "sendfile"))) (inputs (list ghc-network)) (home-page "https://github.com/Happstack/sendfile") (synopsis "Portable sendfile library for Haskell") (description "Haskell library which exposes zero-copy sendfile functionality in a portable way.") (license license:bsd-3))) (define-public ghc-scalpel-core (package (name "ghc-scalpel-core") (version "0.6.2.1") (source (origin (method url-fetch) (uri (hackage-uri "scalpel-core" version)) (sha256 (base32 "1yl1lsi5xm3qdlww2sb6vyppjiisj54f4yzvffv3qg8dgkfjfdra")))) (build-system haskell-build-system) (properties '((upstream-name . "scalpel-core"))) (inputs (list ghc-data-default ghc-fail ghc-pointedlist ghc-regex-base ghc-regex-tdfa ghc-tagsoup ghc-vector)) (native-inputs (list ghc-hunit)) (home-page "https://github.com/fimad/scalpel") (synopsis "High level web scraping library for Haskell") (description "Scalpel core provides a subset of the scalpel web scraping library that is intended to have lightweight dependencies and to be free of all non-Haskell dependencies.") (license license:asl2.0))) (define-public ghc-scalpel (package (name "ghc-scalpel") (version "0.6.2.1") (source (origin (method url-fetch) (uri (hackage-uri "scalpel" version)) (sha256 (base32 "0w3l38czfsgbyd3x6yir7qw9bl8nmhclrbpbwfyhs39728jlscnc")))) (build-system haskell-build-system) (properties '((upstream-name . "scalpel"))) (inputs (list ghc-scalpel-core ghc-case-insensitive ghc-data-default ghc-http-client ghc-http-client-tls ghc-tagsoup)) (home-page "https://github.com/fimad/scalpel") (synopsis "High level web scraping library for Haskell") (description "Scalpel is a web scraping library inspired by libraries like Parsec and Perl's @code{Web::Scraper}. Scalpel builds on top of TagSoup to provide a declarative and monadic interface.") (license license:asl2.0))) (define-public ghc-sourcemap (package (name "ghc-sourcemap") (version "0.1.7") (source (origin (method url-fetch) (uri (hackage-uri "sourcemap" version)) (sha256 (base32 "09i340mhzlfi5ayy9cb0378glnygdmpdhhsgikm3zrvwf2wmwr2h")))) (build-system haskell-build-system) (properties '((upstream-name . "sourcemap"))) (inputs (list ghc-aeson ghc-unordered-containers ghc-attoparsec ghc-utf8-string)) ;(native-inputs (list node)) (arguments (list #:tests? #f)) ; Needs node and module source-map. (home-page "https://hackage.haskell.org/package/sourcemap") (synopsis "Implementation of source maps as proposed by Google and Mozilla") (description "Sourcemap provides an implementation of source maps, revision 3, proposed by Google and Mozilla here @url{https://wiki.mozilla.org/DevTools/Features/SourceMap}.") (license license:bsd-3))) (define-public ghc-language-javascript (package (name "ghc-language-javascript") (version "0.7.1.0") (source (origin (method url-fetch) (uri (hackage-uri "language-javascript" version)) (sha256 (base32 "0s6igb54cxm2jywgc3sq53f52gcsc39wd3g78yisfzvl9jm3d86i")))) (build-system haskell-build-system) (properties '((upstream-name . "language-javascript"))) (inputs (list ghc-blaze-builder ghc-utf8-string)) (native-inputs (list ghc-alex ghc-quickcheck ghc-happy ghc-hspec ghc-utf8-light)) (home-page "https://github.com/erikd/language-javascript") (synopsis "Parser for JavaScript") (description "Parses Javascript into an Abstract Syntax Tree (AST). Initially intended as frontend to hjsmin.") (license license:bsd-3))) (define-public ghc-bower-json (package (name "ghc-bower-json") (version "1.1.0.0") (source (origin (method url-fetch) (uri (hackage-uri "bower-json" version)) (sha256 (base32 "0lnhcgivg38nicncb6czkkk3z2mk3jbifv1b4r51lk3p9blzydfl")))) (build-system haskell-build-system) (properties '((upstream-name . "bower-json"))) (inputs (list ghc-aeson ghc-aeson-better-errors ghc-scientific ghc-transformers ghc-unordered-containers)) (native-inputs (list ghc-tasty ghc-tasty-hunit)) (home-page "https://github.com/hdgarrood/bower-json") (synopsis "Read bower.json from Haskell") (description "This package provides a data type and ToJSON/FromJSON instances for Bower's package manifest file, bower.json.") (license license:expat))) (define-public ghc-dav (package (name "ghc-dav") (version "1.3.4") (source (origin (method url-fetch) (uri (hackage-uri "DAV" version)) (sha256 (base32 "1isvi4fahq70lzxfz23as7qzkc01g7kba568l6flrgd0j1984fsy")))) (build-system haskell-build-system) (properties '((upstream-name . "DAV"))) (inputs (list ghc-case-insensitive ghc-data-default ghc-exceptions ghc-http-client ghc-http-client-tls ghc-http-types ghc-lens ghc-transformers-base ghc-transformers-compat ghc-utf8-string ghc-xml-conduit ghc-xml-hamlet ghc-network ghc-network-uri ghc-optparse-applicative)) (home-page "http://floss.scru.org/hDAV") (synopsis "RFC 4918 WebDAV support") (description "This package provides a library for the Web Distributed Authoring and Versioning (WebDAV) extensions to HTTP as well an executable, @command{hdav}, for command-line operation.") (license license:gpl3))) (define-public ghc-yesod-test (package (name "ghc-yesod-test") (version "1.6.15") (source (origin (method url-fetch) (uri (hackage-uri "yesod-test" version)) (sha256 (base32 "16q4f1l3m4l8iy5vmaa8c0vm2iiqhpghf3kykymlh41xy96mqpn3")))) (build-system haskell-build-system) (properties '((upstream-name . "yesod-test"))) (inputs (list ghc-hunit ghc-aeson ghc-attoparsec ghc-blaze-builder ghc-blaze-html ghc-case-insensitive ghc-conduit ghc-cookie ghc-hspec-core ghc-html-conduit ghc-http-types ghc-network ghc-memory ghc-pretty-show ghc-wai ghc-wai-extra ghc-xml-conduit ghc-xml-types ghc-yesod-core ghc-blaze-markup)) (native-inputs (list ghc-hspec ghc-yesod-form ghc-unliftio ghc-unliftio-core)) (home-page "http://www.yesodweb.com") (synopsis "Integration testing for WAI/Yesod Applications") (description "This package's main goal is to encourage integration and system testing of web applications by making everything easy to test. Tests are like browser sessions that keep track of cookies and the last visited page. You can perform assertions on the content of HTML responses using CSS selectors.") (license license:expat))) (define-public ghc-wai-app-static (package (name "ghc-wai-app-static") (version "3.1.7.4") (source (origin (method url-fetch) (uri (hackage-uri "wai-app-static" version)) (sha256 (base32 "1h8zy3dprqjxvlqxrids65yg5qf1h4f63ddspwxrbp0r9d28hwb4")))) (build-system haskell-build-system) (properties '((upstream-name . "wai-app-static"))) (inputs (list ghc-wai ghc-http-types ghc-unix-compat ghc-old-locale ghc-file-embed ghc-http-date ghc-blaze-html ghc-blaze-markup ghc-mime-types ghc-unordered-containers ghc-zlib ghc-wai-extra ghc-optparse-applicative ghc-warp ghc-cryptonite ghc-memory)) (native-inputs (list ghc-hspec ghc-network ghc-temporary ghc-mockery)) (home-page "http://www.yesodweb.com/book/web-application-interface") (synopsis "WAI application for static serving") (description "This package provides a Web Application Interface (WAI) application for static serving. It also provides some helper functions and datatypes for use outside of WAI.") (license license:expat))) (define-public ghc-hjsmin (package (name "ghc-hjsmin") (version "0.2.0.4") (source (origin (method url-fetch) (uri (hackage-uri "hjsmin" version)) (sha256 (base32 "1r2p5rjdjr25j3w4s57q5hxw2c3ymw12x7ms18yvglnq2ivr9fc1")))) (build-system haskell-build-system) (properties '((upstream-name . "hjsmin"))) (arguments `(#:cabal-revision ("2" "184g49wsj2sfm8d75kgr7ylfw29gbyrqbqp4syyz30ch047jd0af") #:phases (modify-phases %standard-phases (add-before 'build 'fix-dist-directory-for-tests (lambda _ (substitute* '("test/test-cli.hs" "test/cli/core/runner") (("dist-newstyle") "dist"))))))) (inputs (list ghc-language-javascript ghc-optparse-applicative)) (native-inputs (list ghc-extra)) (home-page "https://github.com/erikd/hjsmin") (synopsis "Haskell implementation of a JavaScript minifier") (description "This library provides tools reduce the size of JavaScript files by stripping out extraneous whitespace and other syntactic elements, without changing the semantics.") (license license:bsd-3))) (define-public ghc-yesod-static (package (name "ghc-yesod-static") (version "1.6.1.0") (source (origin (method url-fetch) (uri (hackage-uri "yesod-static" version)) (sha256 (base32 "18f5hm9ncvkzl8bkn39cg841z0k5iqs5w45afsyk9y6k98pjd54p")))) (build-system haskell-build-system) (properties '((upstream-name . "yesod-static"))) (inputs (list ghc-async ghc-attoparsec ghc-base64-bytestring ghc-blaze-builder ghc-conduit ghc-cryptonite ghc-cryptonite-conduit ghc-css-text ghc-data-default ghc-file-embed ghc-hashable ghc-hjsmin ghc-http-types ghc-memory ghc-mime-types ghc-unix-compat ghc-unordered-containers ghc-wai ghc-wai-app-static ghc-yesod-core)) (native-inputs (list ghc-hspec ghc-yesod-test ghc-wai-extra ghc-hunit ghc-rio)) (home-page "https://www.yesodweb.com/") (synopsis "Static file serving subsite for Yesod") (description "This package provides a static file serving subsite for the Yesod Web Framework.") (license license:expat))) (define-public ghc-wai-handler-launch (package (name "ghc-wai-handler-launch") (version "3.0.3.1") (source (origin (method url-fetch) (uri (hackage-uri "wai-handler-launch" version)) (sha256 (base32 "1ifqgyc1ccig5angh5l1iq7vyms4lvi8wzvysg5dw82nml49n02m")))) (build-system haskell-build-system) (properties '((upstream-name . "wai-handler-launch"))) (inputs (list ghc-wai ghc-warp ghc-http-types ghc-streaming-commons ghc-async)) (home-page "https://hackage.haskell.org/package/wai-handler-launch") (synopsis "Launch a Web application in the default browser") (description "This package handles cross-platform Web browser launching and inserts JavaScript code to ping the server. When the server no longer receives pings, it shuts down.") (license license:expat))) (define-public ghc-wai-cors (package (name "ghc-wai-cors") (version "0.2.7") (source (origin (method url-fetch) (uri (hackage-uri "wai-cors" version)) (sha256 (base32 "10gv3jjlkcb13031frr818p56v2s0qf6dqjsfpwlhwdxdssvx5r5")))) (build-system haskell-build-system) (properties '((upstream-name . "wai-cors"))) (arguments `(#:phases (modify-phases %standard-phases ;; As of version 0.2.7, there are two test suites: "unit-tests" ;; and "phantomjs". Since we do not have a PhantomJS package, ;; we only run the unit tests. (replace 'check (lambda _ (invoke "runhaskell" "Setup.hs" "test" "unit-tests")))))) (inputs (list ghc-attoparsec ghc-base-unicode-symbols ghc-case-insensitive ghc-http-types ghc-wai)) (native-inputs (list ghc-network ghc-wai-websockets ghc-warp ghc-websockets ghc-tasty ghc-tasty-hunit ghc-wai-extra ghc-wai-websockets ghc-warp ghc-websockets)) (home-page "https://github.com/larskuhtz/wai-cors") (synopsis "Cross-Origin Resource Sharing (CORS) for WAI") (description "This package provides an implementation of Cross-Origin Resource Sharing (CORS) for the Web Application Framework (WAI) that aims to be compliant with @url{https://www.w3.org/TR/cors}.") (license license:expat))) (define-public ghc-network-run (package (name "ghc-network-run") (version "0.2.5") (source (origin (method url-fetch) (uri (hackage-uri "network-run" version)) (sha256 (base32 "08662w7ja9w4a4fwikaawxnxcszkd0mdmaajmshas2dd25xyikwi")))) (build-system haskell-build-system) (properties '((upstream-name . "network-run"))) (inputs (list ghc-network)) (home-page "https://hackage.haskell.org/package/network-run") (synopsis "Simple network runner library") (description "This package provides a simple network runner library in Haskell.") (license license:bsd-3)))