gnu: r-fastseg: Update to 1.30.0.
[jackhill/guix/guix.git] / gnu / packages / haskell-apps.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2015, 2017, 2018 Ricardo Wurmus <rekado@elephly.net>
3 ;;; Copyright © 2016, 2017, 2018 ng0 <ng0@n0.is>
4 ;;; Copyright © 2017, 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
5 ;;; Copyright © 2018 Timothy Sample <samplet@ngyro.com>
6 ;;; Copyright © 2018 Arun Isaac <arunisaac@systemreboot.net>
7 ;;; Copyright © 2016, 2017 Leo Famulari <leo@famulari.name>
8 ;;; Copyright © 2015 Paul van der Walt <paul@denknerd.org>
9 ;;;
10 ;;; This file is part of GNU Guix.
11 ;;;
12 ;;; GNU Guix is free software; you can redistribute it and/or modify it
13 ;;; under the terms of the GNU General Public License as published by
14 ;;; the Free Software Foundation; either version 3 of the License, or (at
15 ;;; your option) any later version.
16 ;;;
17 ;;; GNU Guix is distributed in the hope that it will be useful, but
18 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
19 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 ;;; GNU General Public License for more details.
21 ;;;
22 ;;; You should have received a copy of the GNU General Public License
23 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
24
25 (define-module (gnu packages haskell-apps)
26 #:use-module (guix download)
27 #:use-module (guix packages)
28 #:use-module ((guix licenses) #:prefix license:)
29 #:use-module (guix build-system haskell)
30 #:use-module (gnu packages base)
31 #:use-module (gnu packages curl)
32 #:use-module (gnu packages gl)
33 #:use-module (gnu packages haskell)
34 #:use-module (gnu packages haskell-check)
35 #:use-module (gnu packages haskell-crypto)
36 #:use-module (gnu packages haskell-web)
37 #:use-module (gnu packages ncurses)
38 #:use-module (gnu packages perl)
39 #:use-module (gnu packages pkg-config)
40 #:use-module (gnu packages rsync)
41 #:use-module (gnu packages sdl)
42 #:use-module (gnu packages version-control))
43
44 ;; Darcs has no https support: http://irclog.perlgeek.de/darcs/2016-09-17
45 ;; http://darcs.net/manual/Configuring_darcs.html#SECTION00440070000000000000
46 ;; and results of search engines will show that if the protocol is http, https
47 ;; is never mentioned.
48 (define-public darcs
49 (package
50 (name "darcs")
51 (version "2.14.2")
52 (source
53 (origin
54 (method url-fetch)
55 (uri (string-append "https://hackage.haskell.org/package/darcs/"
56 "darcs-" version ".tar.gz"))
57 (sha256
58 (base32
59 "0zm2486gyhiga1amclbg92cd09bvki6vgh0ll75hv5kl72j61lb5"))
60 (modules '((guix build utils)))
61 ;; Remove time-dependent code for reproducibility.
62 (snippet
63 '(begin
64 (substitute* "darcs/darcs.hs"
65 (("__DATE__") "\"1970-01-01\"")
66 (("__TIME__") "\"00:00:00\""))
67 #t))))
68 (build-system haskell-build-system)
69 (arguments
70 `(#:configure-flags '("-fpkgconfig" "-fcurl" "-flibiconv" "-fthreaded"
71 "-fnetwork-uri" "-fhttp" "--flag=executable"
72 "--flag=library")
73 #:phases
74 (modify-phases %standard-phases
75 (add-after 'patch-source-shebangs 'patch-sh
76 (lambda _
77 (substitute* "tests/issue538.sh"
78 (("/bin/sh") (which "sh")))
79 #t)))))
80 (inputs
81 `(("ghc-cmdargs" ,ghc-cmdargs)
82 ("ghc-split" ,ghc-split)
83 ("ghc-test-framework-quickcheck2" ,ghc-test-framework-quickcheck2)
84 ("ghc-test-framework-hunit" ,ghc-test-framework-hunit)
85 ("ghc-test-framework" ,ghc-test-framework)
86 ("ghc-quickcheck" ,ghc-quickcheck)
87 ("ghc-findbin" ,ghc-findbin)
88 ("ghc-hunit" ,ghc-hunit)
89 ("ghc-async" ,ghc-async)
90 ("ghc-attoparsec" ,ghc-attoparsec)
91 ("ghc-base16-bytestring" ,ghc-base16-bytestring)
92 ("ghc-bytestring-builder" ,ghc-bytestring-builder)
93 ("ghc-cryptohash" ,ghc-cryptohash)
94 ("ghc-data-ordlist" ,ghc-data-ordlist)
95 ("ghc-fgl" ,ghc-fgl)
96 ("ghc-system-filepath" ,ghc-system-filepath)
97 ("ghc-graphviz" ,ghc-graphviz)
98 ("ghc-hashable" ,ghc-hashable)
99 ("ghc-html" ,ghc-html)
100 ("ghc-mmap" ,ghc-mmap)
101 ("ghc-old-time" ,ghc-old-time)
102 ("ghc-parsec" ,ghc-parsec)
103 ("ghc-random" ,ghc-random)
104 ("ghc-regex-applicative" ,ghc-regex-applicative)
105 ("ghc-regex-compat-tdfa" ,ghc-regex-compat-tdfa)
106 ("ghc-sandi" ,ghc-sandi)
107 ("ghc-shelly" ,ghc-shelly)
108 ("ghc-tar" ,ghc-tar)
109 ("ghc-transformers-compat" ,ghc-transformers-compat)
110 ("ghc-unix-compat" ,ghc-unix-compat)
111 ("ghc-utf8-string" ,ghc-utf8-string)
112 ("ghc-vector" ,ghc-vector)
113 ("ghc-zip-archive" ,ghc-zip-archive)
114 ("ghc-zlib" ,ghc-zlib)
115 ("ghc-http" ,ghc-http)
116 ("curl" ,curl)
117 ("ghc" ,ghc)
118 ("ncurses" ,ncurses)
119 ("perl" ,perl)
120 ("libiconv" ,libiconv)
121 ("ghc-network" ,ghc-network)
122 ("ghc-network-uri" ,ghc-network-uri)))
123 (native-inputs
124 `(("pkg-config" ,pkg-config)))
125 (home-page "http://darcs.net")
126 (synopsis "Distributed Revision Control System")
127 (description
128 "Darcs is a revision control system. It is:
129
130 @enumerate
131 @item Distributed: Every user has access to the full command set, removing boundaries
132 between server and client or committer and non-committers.
133 @item Interactive: Darcs is easy to learn and efficient to use because it asks you
134 questions in response to simple commands, giving you choices in your work flow.
135 You can choose to record one change in a file, while ignoring another. As you update
136 from upstream, you can review each patch name, even the full diff for interesting
137 patches.
138 @item Smart: Originally developed by physicist David Roundy, darcs is based on a
139 unique algebra of patches called @url{http://darcs.net/Theory,Patchtheory}.
140 @end enumerate")
141 (license license:gpl2)))
142
143 (define-public git-annex
144 (package
145 (name "git-annex")
146 (version "6.20180926")
147 (source
148 (origin
149 (method url-fetch)
150 (uri (string-append "https://hackage.haskell.org/package/"
151 "git-annex/git-annex-" version ".tar.gz"))
152 (sha256
153 (base32
154 "1251rj8h63y30sfqk0zh670yhz14p256y59n3590pg015pf3575d"))))
155 (build-system haskell-build-system)
156 (arguments
157 `(#:configure-flags
158 '("--flags=-Android -Assistant -Pairing -S3 -Webapp -WebDAV")
159 #:phases
160 (modify-phases %standard-phases
161 (add-before 'configure 'patch-shell
162 (lambda _
163 (substitute* "Utility/Shell.hs"
164 (("/bin/sh") (which "sh")))
165 #t))
166 (add-before 'configure 'factor-setup
167 (lambda _
168 ;; Factor out necessary build logic from the provided
169 ;; `Setup.hs' script. The script as-is does not work because
170 ;; it cannot find its dependencies, and there is no obvious way
171 ;; to tell it where to look. Note that we do not preserve the
172 ;; code that installs man pages here.
173 (call-with-output-file "PreConf.hs"
174 (lambda (out)
175 (format out "import qualified Build.Configure as Configure~%")
176 (format out "main = Configure.run Configure.tests~%")))
177 (call-with-output-file "Setup.hs"
178 (lambda (out)
179 (format out "import Distribution.Simple~%")
180 (format out "main = defaultMain~%")))
181 #t))
182 (add-before 'configure 'pre-configure
183 (lambda _
184 (invoke "runhaskell" "PreConf.hs")
185 #t))
186 (replace 'check
187 (lambda _
188 ;; We need to set the path so that Git recognizes
189 ;; `git annex' as a custom command.
190 (setenv "PATH" (string-append (getenv "PATH") ":"
191 (getcwd) "/dist/build/git-annex"))
192 (with-directory-excursion "dist/build/git-annex"
193 (symlink "git-annex" "git-annex-shell"))
194 (invoke "git-annex" "test")
195 #t))
196 (add-after 'install 'install-symlinks
197 (lambda* (#:key outputs #:allow-other-keys)
198 (let* ((out (assoc-ref outputs "out"))
199 (bin (string-append out "/bin")))
200 (symlink (string-append bin "/git-annex")
201 (string-append bin "/git-annex-shell"))
202 (symlink (string-append bin "/git-annex")
203 (string-append bin "/git-remote-tor-annex"))
204 #t))))))
205 (inputs
206 `(("curl" ,curl)
207 ("ghc-aeson" ,ghc-aeson)
208 ("ghc-async" ,ghc-async)
209 ("ghc-bloomfilter" ,ghc-bloomfilter)
210 ("ghc-byteable" ,ghc-byteable)
211 ("ghc-case-insensitive" ,ghc-case-insensitive)
212 ("ghc-crypto-api" ,ghc-crypto-api)
213 ("ghc-cryptonite" ,ghc-cryptonite)
214 ("ghc-data-default" ,ghc-data-default)
215 ("ghc-disk-free-space" ,ghc-disk-free-space)
216 ("ghc-dlist" ,ghc-dlist)
217 ("ghc-edit-distance" ,ghc-edit-distance)
218 ("ghc-esqueleto" ,ghc-esqueleto)
219 ("ghc-exceptions" ,ghc-exceptions)
220 ("ghc-feed" ,ghc-feed)
221 ("ghc-free" ,ghc-free)
222 ("ghc-hslogger" ,ghc-hslogger)
223 ("ghc-http-client" ,ghc-http-client)
224 ("ghc-http-conduit" ,ghc-http-conduit)
225 ("ghc-http-types" ,ghc-http-types)
226 ("ghc-ifelse" ,ghc-ifelse)
227 ("ghc-memory" ,ghc-memory)
228 ("ghc-monad-control" ,ghc-monad-control)
229 ("ghc-monad-logger" ,ghc-monad-logger)
230 ("ghc-network" ,ghc-network)
231 ("ghc-old-locale" ,ghc-old-locale)
232 ("ghc-optparse-applicative" ,ghc-optparse-applicative)
233 ("ghc-persistent" ,ghc-persistent)
234 ("ghc-persistent-sqlite" ,ghc-persistent-sqlite)
235 ("ghc-persistent-template" ,ghc-persistent-template)
236 ("ghc-quickcheck" ,ghc-quickcheck)
237 ("ghc-random" ,ghc-random)
238 ("ghc-regex-tdfa" ,ghc-regex-tdfa)
239 ("ghc-resourcet" ,ghc-resourcet)
240 ("ghc-safesemaphore" ,ghc-safesemaphore)
241 ("ghc-sandi" ,ghc-sandi)
242 ("ghc-securemem" ,ghc-securemem)
243 ("ghc-socks" ,ghc-socks)
244 ("ghc-split" ,ghc-split)
245 ("ghc-stm" ,ghc-stm)
246 ("ghc-stm-chans" ,ghc-stm-chans)
247 ("ghc-tagsoup" ,ghc-tagsoup)
248 ("ghc-text" ,ghc-text)
249 ("ghc-unix-compat" ,ghc-unix-compat)
250 ("ghc-unordered-containers" ,ghc-unordered-containers)
251 ("ghc-utf8-string" ,ghc-utf8-string)
252 ("ghc-uuid" ,ghc-uuid)
253 ("git" ,git)
254 ("rsync" ,rsync)))
255 (native-inputs
256 `(("ghc-tasty" ,ghc-tasty)
257 ("ghc-tasty-hunit" ,ghc-tasty-hunit)
258 ("ghc-tasty-quickcheck" ,ghc-tasty-quickcheck)
259 ("ghc-tasty-rerun" ,ghc-tasty-rerun)))
260 (home-page "https://git-annex.branchable.com/")
261 (synopsis "Manage files with Git, without checking in their contents")
262 (description "This package allows managing files with Git, without
263 checking the file contents into Git. It can store files in many places,
264 such as local hard drives and cloud storage services. It can also be
265 used to keep a folder in sync between computers.")
266 ;; The web app is released under the AGPLv3+.
267 (license (list license:gpl3+
268 license:agpl3+))))
269
270 (define-public ghc-sdl2
271 (package
272 (name "ghc-sdl2")
273 (version "2.4.1.0")
274 (source
275 (origin
276 (method url-fetch)
277 (uri (string-append "https://hackage.haskell.org/package/"
278 "sdl2/sdl2-" version ".tar.gz"))
279 (sha256
280 (base32
281 "0p4b12fmxps0sbnkqdfy0qw19s355yrkw7fgw6xz53wzq706k991"))))
282 (build-system haskell-build-system)
283 (arguments '(#:tests? #f)) ; tests require graphical environment
284 (inputs
285 `(("ghc-exceptions" ,ghc-exceptions)
286 ("ghc-linear" ,ghc-linear)
287 ("ghc-statevar" ,ghc-statevar)
288 ("ghc-text" ,ghc-text)
289 ("ghc-vector" ,ghc-vector)
290 ("sdl2" ,sdl2)))
291 (native-inputs
292 `(("ghc-weigh" ,ghc-weigh)
293 ("pkg-config" ,pkg-config)))
294 (home-page "http://hackage.haskell.org/package/sdl2")
295 (synopsis "High- and low-level bindings to the SDL library")
296 (description
297 "This package contains bindings to the SDL 2 library, in both high- and
298 low-level forms. The @code{SDL} namespace contains high-level bindings, where
299 enumerations are split into sum types, and we perform automatic
300 error-checking. The @code{SDL.Raw} namespace contains an almost 1-1
301 translation of the C API into Haskell FFI calls. As such, this does not
302 contain sum types nor error checking. Thus this namespace is suitable for
303 building your own abstraction over SDL, but is not recommended for day-to-day
304 programming.")
305 (license license:bsd-3)))
306
307 (define-public ghc-sdl2-mixer
308 (package
309 (name "ghc-sdl2-mixer")
310 (version "1.1.0")
311 (source
312 (origin
313 (method url-fetch)
314 (uri (string-append "https://hackage.haskell.org/package/sdl2-mixer/"
315 "sdl2-mixer-" version ".tar.gz"))
316 (sha256
317 (base32
318 "1k8avyccq5l9z7bwxigim312yaancxl1sr3q6a96bcm7pnhiak0g"))))
319 (build-system haskell-build-system)
320 (inputs
321 `(("ghc-data-default-class" ,ghc-data-default-class)
322 ("ghc-lifted-base" ,ghc-lifted-base)
323 ("ghc-monad-control" ,ghc-monad-control)
324 ("ghc-sdl2" ,ghc-sdl2)
325 ("ghc-vector" ,ghc-vector)
326 ("sdl2-mixer" ,sdl2-mixer)))
327 (native-inputs
328 `(("pkg-config" ,pkg-config)))
329 (home-page "http://hackage.haskell.org/package/sdl2-mixer")
330 (synopsis "Bindings to SDL2 mixer")
331 (description "This package provides Haskell bindings to
332 @code{SDL2_mixer}.")
333 (license license:bsd-3)))
334
335 (define-public ghc-sdl2-image
336 (package
337 (name "ghc-sdl2-image")
338 (version "2.0.0")
339 (source
340 (origin
341 (method url-fetch)
342 (uri (string-append "https://hackage.haskell.org/package/sdl2-image/"
343 "sdl2-image-" version ".tar.gz"))
344 (sha256
345 (base32
346 "1pr6dkg73cy9z0w54lrkj9c5bhxj56nl92lxikjy8kz6nyr455rr"))))
347 (build-system haskell-build-system)
348 (inputs
349 `(("ghc-sdl2" ,ghc-sdl2)
350 ("ghc-text" ,ghc-text)
351 ("sdl2-image" ,sdl2-image)))
352 (native-inputs
353 `(("pkg-config" ,pkg-config)))
354 (home-page "http://hackage.haskell.org/package/sdl2-image")
355 (synopsis "Bindings to SDL2_image")
356 (description "This package provides Haskell bindings to
357 @code{SDL2_image}.")
358 (license license:expat)))
359
360 (define-public raincat
361 (package
362 (name "raincat")
363 (version "1.2.1")
364 (source
365 (origin
366 (method url-fetch)
367 (uri (string-append "http://hackage.haskell.org/package/Raincat/"
368 "Raincat-" version ".tar.gz"))
369 (sha256
370 (base32
371 "10y9zi22m6hf13c9h8zd9vg7mljpwbw0r3djb6r80bna701fdf6c"))))
372 (build-system haskell-build-system)
373 (arguments
374 `(#:phases
375 (modify-phases %standard-phases
376 (add-after 'install 'wrap-executable
377 (lambda* (#:key inputs outputs #:allow-other-keys)
378 (let ((out (assoc-ref outputs "out")))
379 (wrap-program (string-append out "/bin/raincat")
380 `("LD_LIBRARY_PATH" ":" =
381 (,(string-append (assoc-ref inputs "freeglut")
382 "/lib"))))
383 #t))))))
384 (inputs
385 `(("ghc-extensible-exceptions" ,ghc-extensible-exceptions)
386 ("ghc-random" ,ghc-random)
387 ("ghc-glut" ,ghc-glut)
388 ("freeglut" ,freeglut)
389 ("ghc-opengl" ,ghc-opengl)
390 ("ghc-sdl2" ,ghc-sdl2)
391 ("ghc-sdl2-image" ,ghc-sdl2-image)
392 ("ghc-sdl2-mixer" ,ghc-sdl2-mixer)))
393 (home-page "http://www.bysusanlin.com/raincat/")
394 (synopsis "Puzzle game with a cat in lead role")
395 (description "Project Raincat is a game developed by Carnegie Mellon
396 students through GCS during the Fall 2008 semester. Raincat features game
397 play inspired from classics Lemmings and The Incredible Machine. The project
398 proved to be an excellent learning experience for the programmers. Everything
399 is programmed in Haskell.")
400 (license license:bsd-3)))