gnu: Add ghc-zlib-bindings.
[jackhill/guix/guix.git] / gnu / packages / haskell-xyz.scm
CommitLineData
6b34d01c
RV
1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2019 Robert Vollmert <rob@vllmrt.net>
3;;;
4;;; This file is part of GNU Guix.
5;;;
6;;; GNU Guix is free software; you can redistribute it and/or modify it
7;;; under the terms of the GNU General Public License as published by
8;;; the Free Software Foundation; either version 3 of the License, or (at
9;;; your option) any later version.
10;;;
11;;; GNU Guix is distributed in the hope that it will be useful, but
12;;; WITHOUT ANY WARRANTY; without even the implied warranty of
13;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14;;; GNU General Public License for more details.
15;;;
16;;; You should have received a copy of the GNU General Public License
17;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
18
19(define-module (gnu packages haskell-xyz)
20 #:use-module (gnu packages)
efb96749
RV
21 #:use-module (gnu packages haskell)
22 #:use-module (gnu packages haskell-check)
6b34d01c
RV
23 #:use-module (guix build-system haskell)
24 #:use-module (guix download)
25 #:use-module ((guix licenses) #:prefix license:)
26 #:use-module (guix packages))
27
efb96749
RV
28(define-public ghc-concurrent-extra
29 (package
30 (name "ghc-concurrent-extra")
31 (version "0.7.0.12")
32 (source
33 (origin
34 (method url-fetch)
35 (uri (string-append "https://hackage.haskell.org/package/"
36 "concurrent-extra/concurrent-extra-"
37 version ".tar.gz"))
38 (sha256
39 (base32
40 "1y8xk460fvnw0idzdiylmm874sjny4q9jxb1js9fjz8lw2wns3h4"))))
41 (build-system haskell-build-system)
42 (arguments
43 ;; XXX: The ReadWriteLock 'stressTest' fails.
44 `(#:tests? #f))
45 (inputs
46 `(("ghc-unbounded-delays" ,ghc-unbounded-delays)))
47 (native-inputs
48 `(("ghc-async" ,ghc-async)
49 ("ghc-hunit" ,ghc-hunit)
50 ("ghc-random" ,ghc-random)
51 ("ghc-test-framework" ,ghc-test-framework)
52 ("ghc-test-framework-hunit" ,ghc-test-framework-hunit)))
53 (home-page "https://github.com/basvandijk/concurrent-extra")
54 (synopsis "Extra concurrency primitives")
55 (description "This Haskell library offers (among other things) the
56following selection of synchronisation primitives:
57
58@itemize
59@item @code{Broadcast}: Wake multiple threads by broadcasting a value.
60@item @code{Event}: Wake multiple threads by signalling an event.
61@item @code{Lock}: Enforce exclusive access to a resource. Also known
62as a binary semaphore or mutex. The package additionally provides an
63alternative that works in the STM monad.
64@item @code{RLock}: A lock which can be acquired multiple times by the
65same thread. Also known as a reentrant mutex.
66@item @code{ReadWriteLock}: Multiple-reader, single-writer locks. Used
67to protect shared resources which may be concurrently read, but only
68sequentially written.
69@item @code{ReadWriteVar}: Concurrent read, sequential write variables.
70@end itemize
71
72Please consult the API documentation of the individual modules for more
73detailed information.
74
75This package was inspired by the concurrency libraries of Java and
76Python.")
77 (license license:bsd-3)))
78
79fcc5e5
RV
79(define-public ghc-language-glsl
80 (package
81 (name "ghc-language-glsl")
82 (version "0.3.0")
83 (source
84 (origin
85 (method url-fetch)
86 (uri (string-append "https://hackage.haskell.org/package/"
87 "language-glsl/language-glsl-" version ".tar.gz"))
88 (sha256
89 (base32
90 "0hdg67ainlqpjjghg3qin6fg4p783m0zmjqh4rd5gyizwiplxkp1"))))
91 (build-system haskell-build-system)
92 (inputs `(("ghc-prettyclass" ,ghc-prettyclass)))
93 (arguments
94 `(#:tests? #f
95 #:cabal-revision
96 ("1" "10ac9pk4jy75k03j1ns4b5136l4kw8krr2d2nw2fdmpm5jzyghc5")))
97 (home-page "http://hackage.haskell.org/package/language-glsl")
98 (synopsis "GLSL abstract syntax tree, parser, and pretty-printer")
99 (description "This package is a Haskell library for the
100representation, parsing, and pretty-printing of GLSL 1.50 code.")
101 (license license:bsd-3)))
102
6b34d01c
RV
103(define-public ghc-prettyclass
104 (package
105 (name "ghc-prettyclass")
106 (version "1.0.0.0")
107 (source
108 (origin
109 (method url-fetch)
110 (uri (string-append "https://hackage.haskell.org/package/"
111 "prettyclass/prettyclass-" version ".tar.gz"))
112 (sha256
113 (base32
114 "11l9ajci7nh1r547hx8hgxrhq8mh5gdq30pdf845wvilg9p48dz5"))))
115 (build-system haskell-build-system)
116 (home-page "http://hackage.haskell.org/package/prettyclass")
117 (synopsis "Pretty printing class similar to Show")
118 (description "This package provides a pretty printing class similar
119to @code{Show}, based on the HughesPJ pretty printing library. It
120provides the pretty printing class and instances for the Prelude
121types.")
122 (license license:bsd-3)))
b57e99f5
RV
123
124(define-public ghc-readable
125 (package
126 (name "ghc-readable")
127 (version "0.3.1")
128 (source
129 (origin
130 (method url-fetch)
131 (uri (string-append "https://hackage.haskell.org/package/"
132 "readable/readable-" version ".tar.gz"))
133 (sha256
134 (base32
135 "1ja39cg26wy2fs00gi12x7iq5k8i366pbqi3p916skfa5jnkfc3h"))))
136 (build-system haskell-build-system)
137 (home-page "https://github.com/mightybyte/readable")
138 (synopsis "Type class for reading from Text and ByteString")
139 (description "This package provides a @code{Readable} type class for
140reading data types from @code{ByteString} and @code{Text}. It also
141includes efficient implementations for common data types.")
142 (license license:bsd-3)))
bbf8bf31
RV
143
144(define-public ghc-threads
145 (package
146 (name "ghc-threads")
147 (version "0.5.1.6")
148 (source
149 (origin
150 (method url-fetch)
151 (uri (string-append "https://hackage.haskell.org/package/"
152 "threads/threads-" version ".tar.gz"))
153 (sha256
154 (base32
155 "0bjnjhnq3km6xqk0fn1fgyz5xdw4h6lylbwwbcmkkfzwcz0c76hk"))))
156 (build-system haskell-build-system)
157 (native-inputs
158 `(("ghc-concurrent-extra" ,ghc-concurrent-extra)
159 ("ghc-hunit" ,ghc-hunit)
160 ("ghc-test-framework" ,ghc-test-framework)
161 ("ghc-test-framework-hunit" ,ghc-test-framework-hunit)))
162 (home-page "https://github.com/basvandijk/threads")
163 (synopsis "Fork threads and wait for their result")
164 (description "This package provides functions to fork threads and
165wait for their result, whether it's an exception or a normal value.
166Besides waiting for the termination of a single thread this package also
167provides functions to wait for a group of threads to terminate. This
168package is similar to the @code{threadmanager}, @code{async} and
169@code{spawn} packages. The advantages of this package are:
170
171@itemize
172@item Simpler API.
173@item More efficient in both space and time.
174@item No space-leak when forking a large number of threads.
175@item Correct handling of asynchronous exceptions.
176@item GHC specific functionality like @code{forkOn} and
177@code{forkIOWithUnmask}.
178@end itemize")
179 (license license:bsd-3)))
14e41996
RV
180
181(define-public ghc-zlib-bindings
182 (package
183 (name "ghc-zlib-bindings")
184 (version "0.1.1.5")
185 (source
186 (origin
187 (method url-fetch)
188 (uri (string-append "https://hackage.haskell.org/package/"
189 "zlib-bindings/zlib-bindings-" version ".tar.gz"))
190 (sha256
191 (base32
192 "02ciywlz4wdlymgc3jsnicz9kzvymjw1www2163gxidnz4wb8fy8"))))
193 (build-system haskell-build-system)
194 (inputs
195 `(("ghc-zlib" ,ghc-zlib)))
196 (native-inputs
197 `(("ghc-hspec" ,ghc-hspec)
198 ("ghc-quickcheck" ,ghc-quickcheck)))
199 (arguments
200 `(#:cabal-revision
201 ("2" "0fq49694gqkab8m0vq4i879blswczwd66n7xh4r4gwiahf0ryvqc")))
202 (home-page "https://github.com/snapframework/zlib-bindings")
203 (synopsis "Low-level bindings to the @code{zlib} package")
204 (description "This package provides low-level bindings to the
205@code{zlib} package.")
206 (license license:bsd-3)))