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 ;;; Copyright © 2019 Kyle Meyer <kyle@kyleam.com>
11 ;;; This file is part of GNU Guix.
13 ;;; GNU Guix is free software; you can redistribute it and/or modify it
14 ;;; under the terms of the GNU General Public License as published by
15 ;;; the Free Software Foundation; either version 3 of the License, or (at
16 ;;; your option) any later version.
18 ;;; GNU Guix is distributed in the hope that it will be useful, but
19 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
20 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 ;;; GNU General Public License for more details.
23 ;;; You should have received a copy of the GNU General Public License
24 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
26 (define-module (gnu packages haskell-apps)
27 #:use-module (guix download)
28 #:use-module (guix packages)
29 #:use-module ((guix licenses) #:prefix license:)
30 #:use-module (guix build-system haskell)
31 #:use-module (gnu packages base)
32 #:use-module (gnu packages curl)
33 #:use-module (gnu packages gl)
34 #:use-module (gnu packages haskell)
35 #:use-module (gnu packages haskell-check)
36 #:use-module (gnu packages haskell-crypto)
37 #:use-module (gnu packages haskell-web)
38 #:use-module (gnu packages ncurses)
39 #:use-module (gnu packages perl)
40 #:use-module (gnu packages pkg-config)
41 #:use-module (gnu packages rsync)
42 #:use-module (gnu packages sdl)
43 #:use-module (gnu packages version-control))
45 ;; Darcs has no https support: http://irclog.perlgeek.de/darcs/2016-09-17
46 ;; http://darcs.net/manual/Configuring_darcs.html#SECTION00440070000000000000
47 ;; and results of search engines will show that if the protocol is http, https
48 ;; is never mentioned.
56 (uri (string-append "https://hackage.haskell.org/package/darcs/"
57 "darcs-" version ".tar.gz"))
60 "0zm2486gyhiga1amclbg92cd09bvki6vgh0ll75hv5kl72j61lb5"))
61 (modules '((guix build utils)))
62 ;; Remove time-dependent code for reproducibility.
65 (substitute* "darcs/darcs.hs"
66 (("__DATE__") "\"1970-01-01\"")
67 (("__TIME__") "\"00:00:00\""))
69 (build-system haskell-build-system)
71 `(#:configure-flags '("-fpkgconfig" "-fcurl" "-flibiconv" "-fthreaded"
72 "-fnetwork-uri" "-fhttp" "--flag=executable"
75 (modify-phases %standard-phases
76 (add-after 'patch-source-shebangs 'patch-sh
78 (substitute* "tests/issue538.sh"
79 (("/bin/sh") (which "sh")))
82 `(("ghc-cmdargs" ,ghc-cmdargs)
83 ("ghc-split" ,ghc-split)
84 ("ghc-test-framework-quickcheck2" ,ghc-test-framework-quickcheck2)
85 ("ghc-test-framework-hunit" ,ghc-test-framework-hunit)
86 ("ghc-test-framework" ,ghc-test-framework)
87 ("ghc-quickcheck" ,ghc-quickcheck)
88 ("ghc-findbin" ,ghc-findbin)
89 ("ghc-hunit" ,ghc-hunit)
90 ("ghc-async" ,ghc-async)
91 ("ghc-attoparsec" ,ghc-attoparsec)
92 ("ghc-base16-bytestring" ,ghc-base16-bytestring)
93 ("ghc-bytestring-builder" ,ghc-bytestring-builder)
94 ("ghc-cryptohash" ,ghc-cryptohash)
95 ("ghc-data-ordlist" ,ghc-data-ordlist)
97 ("ghc-system-filepath" ,ghc-system-filepath)
98 ("ghc-graphviz" ,ghc-graphviz)
99 ("ghc-hashable" ,ghc-hashable)
100 ("ghc-html" ,ghc-html)
101 ("ghc-mmap" ,ghc-mmap)
102 ("ghc-old-time" ,ghc-old-time)
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)
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)
120 ("libiconv" ,libiconv)
121 ("ghc-network" ,ghc-network)
122 ("ghc-network-uri" ,ghc-network-uri)))
124 `(("pkg-config" ,pkg-config)))
125 (home-page "http://darcs.net")
126 (synopsis "Distributed Revision Control System")
128 "Darcs is a revision control system. It is:
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
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}.
141 (license license:gpl2)))
143 (define-public git-annex
146 (version "7.20190708")
150 (uri (string-append "https://hackage.haskell.org/package/"
151 "git-annex/git-annex-" version ".tar.gz"))
154 "18s563swrp8mx479995pdhhmn40y3xwlbm1z3w63qsnjqmj7zlij"))))
155 (build-system haskell-build-system)
158 '("--flags=-Android -Assistant -Pairing -S3 -Webapp -WebDAV")
160 (modify-phases %standard-phases
161 (add-before 'configure 'patch-shell-for-tests
163 ;; Shell.hs defines "/bin/sh" that is used in Git hooks. We
164 ;; shouldn't patch hooks with Guix's current bash because the
165 ;; hooks can exist after that bash is garbage collected, but
166 ;; let's temporarily patch it so that we can run the tests.
167 (copy-file "Utility/Shell.hs" "/tmp/Shell.hs")
168 (substitute* "Utility/Shell.hs"
169 (("/bin/sh") (which "sh")))
171 (add-before 'configure 'factor-setup
173 ;; Factor out necessary build logic from the provided
174 ;; `Setup.hs' script. The script as-is does not work because
175 ;; it cannot find its dependencies, and there is no obvious way
176 ;; to tell it where to look. Note that we do not preserve the
177 ;; code that installs man pages here.
178 (call-with-output-file "PreConf.hs"
180 (format out "import qualified Build.Configure as Configure~%")
181 (format out "main = Configure.run Configure.tests~%")))
182 (call-with-output-file "Setup.hs"
184 (format out "import Distribution.Simple~%")
185 (format out "main = defaultMain~%")))
187 (add-before 'configure 'pre-configure
189 (invoke "runhaskell" "PreConf.hs")
193 ;; We need to set the path so that Git recognizes
194 ;; `git annex' as a custom command.
195 (setenv "PATH" (string-append (getenv "PATH") ":"
196 (getcwd) "/dist/build/git-annex"))
197 (with-directory-excursion "dist/build/git-annex"
198 (symlink "git-annex" "git-annex-shell"))
199 (invoke "git-annex" "test")
201 (add-after 'check 'unpatch-shell-and-rebuild
203 ;; Undo `patch-shell-for-tests'.
204 (copy-file "/tmp/Shell.hs" "Utility/Shell.hs")
205 (apply (assoc-ref %standard-phases 'build) args)))
206 (add-after 'install 'install-symlinks
207 (lambda* (#:key outputs #:allow-other-keys)
208 (let* ((out (assoc-ref outputs "out"))
209 (bin (string-append out "/bin")))
210 (symlink (string-append bin "/git-annex")
211 (string-append bin "/git-annex-shell"))
212 (symlink (string-append bin "/git-annex")
213 (string-append bin "/git-remote-tor-annex"))
217 ("ghc-aeson" ,ghc-aeson)
218 ("ghc-async" ,ghc-async)
219 ("ghc-bloomfilter" ,ghc-bloomfilter)
220 ("ghc-byteable" ,ghc-byteable)
221 ("ghc-case-insensitive" ,ghc-case-insensitive)
222 ("ghc-concurrent-output" ,ghc-concurrent-output)
223 ("ghc-crypto-api" ,ghc-crypto-api)
224 ("ghc-cryptonite" ,ghc-cryptonite)
225 ("ghc-data-default" ,ghc-data-default)
226 ("ghc-disk-free-space" ,ghc-disk-free-space)
227 ("ghc-dlist" ,ghc-dlist)
228 ("ghc-edit-distance" ,ghc-edit-distance)
229 ("ghc-esqueleto" ,ghc-esqueleto)
230 ("ghc-exceptions" ,ghc-exceptions)
231 ("ghc-feed" ,ghc-feed)
232 ("ghc-free" ,ghc-free)
233 ("ghc-hslogger" ,ghc-hslogger)
234 ("ghc-http-client" ,ghc-http-client)
235 ("ghc-http-conduit" ,ghc-http-conduit)
236 ("ghc-http-types" ,ghc-http-types)
237 ("ghc-ifelse" ,ghc-ifelse)
238 ("ghc-memory" ,ghc-memory)
239 ("ghc-monad-control" ,ghc-monad-control)
240 ("ghc-monad-logger" ,ghc-monad-logger)
241 ("ghc-network" ,ghc-network)
242 ("ghc-old-locale" ,ghc-old-locale)
243 ("ghc-optparse-applicative" ,ghc-optparse-applicative)
244 ("ghc-persistent" ,ghc-persistent)
245 ("ghc-persistent-sqlite" ,ghc-persistent-sqlite)
246 ("ghc-persistent-template" ,ghc-persistent-template)
247 ("ghc-quickcheck" ,ghc-quickcheck)
248 ("ghc-random" ,ghc-random)
249 ("ghc-regex-tdfa" ,ghc-regex-tdfa)
250 ("ghc-resourcet" ,ghc-resourcet)
251 ("ghc-safesemaphore" ,ghc-safesemaphore)
252 ("ghc-sandi" ,ghc-sandi)
253 ("ghc-securemem" ,ghc-securemem)
254 ("ghc-socks" ,ghc-socks)
255 ("ghc-split" ,ghc-split)
256 ("ghc-stm-chans" ,ghc-stm-chans)
257 ("ghc-tagsoup" ,ghc-tagsoup)
258 ("ghc-unix-compat" ,ghc-unix-compat)
259 ("ghc-unordered-containers" ,ghc-unordered-containers)
260 ("ghc-utf8-string" ,ghc-utf8-string)
261 ("ghc-uuid" ,ghc-uuid)
265 `(("ghc-tasty" ,ghc-tasty)
266 ("ghc-tasty-hunit" ,ghc-tasty-hunit)
267 ("ghc-tasty-quickcheck" ,ghc-tasty-quickcheck)
268 ("ghc-tasty-rerun" ,ghc-tasty-rerun)))
269 (home-page "https://git-annex.branchable.com/")
270 (synopsis "Manage files with Git, without checking in their contents")
271 (description "This package allows managing files with Git, without
272 checking the file contents into Git. It can store files in many places,
273 such as local hard drives and cloud storage services. It can also be
274 used to keep a folder in sync between computers.")
275 ;; The web app is released under the AGPLv3+.
276 (license (list license:gpl3+
279 (define-public ghc-sdl2
286 (uri (string-append "https://hackage.haskell.org/package/"
287 "sdl2/sdl2-" version ".tar.gz"))
290 "0p4b12fmxps0sbnkqdfy0qw19s355yrkw7fgw6xz53wzq706k991"))))
291 (build-system haskell-build-system)
292 (arguments '(#:tests? #f)) ; tests require graphical environment
294 `(("ghc-exceptions" ,ghc-exceptions)
295 ("ghc-linear" ,ghc-linear)
296 ("ghc-statevar" ,ghc-statevar)
297 ("ghc-vector" ,ghc-vector)
300 `(("ghc-weigh" ,ghc-weigh)
301 ("pkg-config" ,pkg-config)))
302 (home-page "http://hackage.haskell.org/package/sdl2")
303 (synopsis "High- and low-level bindings to the SDL library")
305 "This package contains bindings to the SDL 2 library, in both high- and
306 low-level forms. The @code{SDL} namespace contains high-level bindings, where
307 enumerations are split into sum types, and we perform automatic
308 error-checking. The @code{SDL.Raw} namespace contains an almost 1-1
309 translation of the C API into Haskell FFI calls. As such, this does not
310 contain sum types nor error checking. Thus this namespace is suitable for
311 building your own abstraction over SDL, but is not recommended for day-to-day
313 (license license:bsd-3)))
315 (define-public ghc-sdl2-mixer
317 (name "ghc-sdl2-mixer")
322 (uri (string-append "https://hackage.haskell.org/package/sdl2-mixer/"
323 "sdl2-mixer-" version ".tar.gz"))
326 "1k8avyccq5l9z7bwxigim312yaancxl1sr3q6a96bcm7pnhiak0g"))))
327 (build-system haskell-build-system)
329 `(("ghc-data-default-class" ,ghc-data-default-class)
330 ("ghc-lifted-base" ,ghc-lifted-base)
331 ("ghc-monad-control" ,ghc-monad-control)
332 ("ghc-sdl2" ,ghc-sdl2)
333 ("ghc-vector" ,ghc-vector)
334 ("sdl2-mixer" ,sdl2-mixer)))
336 `(("pkg-config" ,pkg-config)))
337 (home-page "http://hackage.haskell.org/package/sdl2-mixer")
338 (synopsis "Bindings to SDL2 mixer")
339 (description "This package provides Haskell bindings to
341 (license license:bsd-3)))
343 (define-public ghc-sdl2-image
345 (name "ghc-sdl2-image")
350 (uri (string-append "https://hackage.haskell.org/package/sdl2-image/"
351 "sdl2-image-" version ".tar.gz"))
354 "1pr6dkg73cy9z0w54lrkj9c5bhxj56nl92lxikjy8kz6nyr455rr"))))
355 (build-system haskell-build-system)
357 `(("ghc-sdl2" ,ghc-sdl2)
358 ("sdl2-image" ,sdl2-image)))
360 `(("pkg-config" ,pkg-config)))
361 (home-page "http://hackage.haskell.org/package/sdl2-image")
362 (synopsis "Bindings to SDL2_image")
363 (description "This package provides Haskell bindings to
365 (license license:expat)))
367 (define-public raincat
374 (uri (string-append "http://hackage.haskell.org/package/Raincat/"
375 "Raincat-" version ".tar.gz"))
378 "10y9zi22m6hf13c9h8zd9vg7mljpwbw0r3djb6r80bna701fdf6c"))))
379 (build-system haskell-build-system)
382 (modify-phases %standard-phases
383 (add-after 'install 'wrap-executable
384 (lambda* (#:key inputs outputs #:allow-other-keys)
385 (let ((out (assoc-ref outputs "out")))
386 (wrap-program (string-append out "/bin/raincat")
387 `("LD_LIBRARY_PATH" ":" =
388 (,(string-append (assoc-ref inputs "freeglut")
392 `(("ghc-extensible-exceptions" ,ghc-extensible-exceptions)
393 ("ghc-random" ,ghc-random)
394 ("ghc-glut" ,ghc-glut)
395 ("freeglut" ,freeglut)
396 ("ghc-opengl" ,ghc-opengl)
397 ("ghc-sdl2" ,ghc-sdl2)
398 ("ghc-sdl2-image" ,ghc-sdl2-image)
399 ("ghc-sdl2-mixer" ,ghc-sdl2-mixer)))
400 (home-page "http://www.bysusanlin.com/raincat/")
401 (synopsis "Puzzle game with a cat in lead role")
402 (description "Project Raincat is a game developed by Carnegie Mellon
403 students through GCS during the Fall 2008 semester. Raincat features game
404 play inspired from classics Lemmings and The Incredible Machine. The project
405 proved to be an excellent learning experience for the programmers. Everything
406 is programmed in Haskell.")
407 (license license:bsd-3)))