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>
10 ;;; This file is part of GNU Guix.
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.
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.
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/>.
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))
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.
55 (uri (string-append "https://hackage.haskell.org/package/darcs/"
56 "darcs-" version ".tar.gz"))
59 "0zm2486gyhiga1amclbg92cd09bvki6vgh0ll75hv5kl72j61lb5"))
60 (modules '((guix build utils)))
61 ;; Remove time-dependent code for reproducibility.
64 (substitute* "darcs/darcs.hs"
65 (("__DATE__") "\"1970-01-01\"")
66 (("__TIME__") "\"00:00:00\""))
68 (build-system haskell-build-system)
70 `(#:configure-flags '("-fpkgconfig" "-fcurl" "-flibiconv" "-fthreaded"
71 "-fnetwork-uri" "-fhttp" "--flag=executable"
74 (modify-phases %standard-phases
75 (add-after 'patch-source-shebangs 'patch-sh
77 (substitute* "tests/issue538.sh"
78 (("/bin/sh") (which "sh")))
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)
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-random" ,ghc-random)
103 ("ghc-regex-applicative" ,ghc-regex-applicative)
104 ("ghc-regex-compat-tdfa" ,ghc-regex-compat-tdfa)
105 ("ghc-sandi" ,ghc-sandi)
106 ("ghc-shelly" ,ghc-shelly)
108 ("ghc-transformers-compat" ,ghc-transformers-compat)
109 ("ghc-unix-compat" ,ghc-unix-compat)
110 ("ghc-utf8-string" ,ghc-utf8-string)
111 ("ghc-vector" ,ghc-vector)
112 ("ghc-zip-archive" ,ghc-zip-archive)
113 ("ghc-zlib" ,ghc-zlib)
114 ("ghc-http" ,ghc-http)
119 ("libiconv" ,libiconv)
120 ("ghc-network" ,ghc-network)
121 ("ghc-network-uri" ,ghc-network-uri)))
123 `(("pkg-config" ,pkg-config)))
124 (home-page "http://darcs.net")
125 (synopsis "Distributed Revision Control System")
127 "Darcs is a revision control system. It is:
130 @item Distributed: Every user has access to the full command set, removing boundaries
131 between server and client or committer and non-committers.
132 @item Interactive: Darcs is easy to learn and efficient to use because it asks you
133 questions in response to simple commands, giving you choices in your work flow.
134 You can choose to record one change in a file, while ignoring another. As you update
135 from upstream, you can review each patch name, even the full diff for interesting
137 @item Smart: Originally developed by physicist David Roundy, darcs is based on a
138 unique algebra of patches called @url{http://darcs.net/Theory,Patchtheory}.
140 (license license:gpl2)))
142 (define-public git-annex
145 (version "6.20180926")
149 (uri (string-append "https://hackage.haskell.org/package/"
150 "git-annex/git-annex-" version ".tar.gz"))
153 "1251rj8h63y30sfqk0zh670yhz14p256y59n3590pg015pf3575d"))))
154 (build-system haskell-build-system)
157 '("--flags=-Android -Assistant -Pairing -S3 -Webapp -WebDAV")
159 (modify-phases %standard-phases
160 (add-before 'configure 'patch-shell
162 (substitute* "Utility/Shell.hs"
163 (("/bin/sh") (which "sh")))
165 (add-before 'configure 'factor-setup
167 ;; Factor out necessary build logic from the provided
168 ;; `Setup.hs' script. The script as-is does not work because
169 ;; it cannot find its dependencies, and there is no obvious way
170 ;; to tell it where to look. Note that we do not preserve the
171 ;; code that installs man pages here.
172 (call-with-output-file "PreConf.hs"
174 (format out "import qualified Build.Configure as Configure~%")
175 (format out "main = Configure.run Configure.tests~%")))
176 (call-with-output-file "Setup.hs"
178 (format out "import Distribution.Simple~%")
179 (format out "main = defaultMain~%")))
181 (add-before 'configure 'pre-configure
183 (invoke "runhaskell" "PreConf.hs")
187 ;; We need to set the path so that Git recognizes
188 ;; `git annex' as a custom command.
189 (setenv "PATH" (string-append (getenv "PATH") ":"
190 (getcwd) "/dist/build/git-annex"))
191 (with-directory-excursion "dist/build/git-annex"
192 (symlink "git-annex" "git-annex-shell"))
193 (invoke "git-annex" "test")
195 (add-after 'install 'install-symlinks
196 (lambda* (#:key outputs #:allow-other-keys)
197 (let* ((out (assoc-ref outputs "out"))
198 (bin (string-append out "/bin")))
199 (symlink (string-append bin "/git-annex")
200 (string-append bin "/git-annex-shell"))
201 (symlink (string-append bin "/git-annex")
202 (string-append bin "/git-remote-tor-annex"))
206 ("ghc-aeson" ,ghc-aeson)
207 ("ghc-async" ,ghc-async)
208 ("ghc-bloomfilter" ,ghc-bloomfilter)
209 ("ghc-byteable" ,ghc-byteable)
210 ("ghc-case-insensitive" ,ghc-case-insensitive)
211 ("ghc-crypto-api" ,ghc-crypto-api)
212 ("ghc-cryptonite" ,ghc-cryptonite)
213 ("ghc-data-default" ,ghc-data-default)
214 ("ghc-disk-free-space" ,ghc-disk-free-space)
215 ("ghc-dlist" ,ghc-dlist)
216 ("ghc-edit-distance" ,ghc-edit-distance)
217 ("ghc-esqueleto" ,ghc-esqueleto)
218 ("ghc-exceptions" ,ghc-exceptions)
219 ("ghc-feed" ,ghc-feed)
220 ("ghc-free" ,ghc-free)
221 ("ghc-hslogger" ,ghc-hslogger)
222 ("ghc-http-client" ,ghc-http-client)
223 ("ghc-http-conduit" ,ghc-http-conduit)
224 ("ghc-http-types" ,ghc-http-types)
225 ("ghc-ifelse" ,ghc-ifelse)
226 ("ghc-memory" ,ghc-memory)
227 ("ghc-monad-control" ,ghc-monad-control)
228 ("ghc-monad-logger" ,ghc-monad-logger)
229 ("ghc-network" ,ghc-network)
230 ("ghc-old-locale" ,ghc-old-locale)
231 ("ghc-optparse-applicative" ,ghc-optparse-applicative)
232 ("ghc-persistent" ,ghc-persistent)
233 ("ghc-persistent-sqlite" ,ghc-persistent-sqlite)
234 ("ghc-persistent-template" ,ghc-persistent-template)
235 ("ghc-quickcheck" ,ghc-quickcheck)
236 ("ghc-random" ,ghc-random)
237 ("ghc-regex-tdfa" ,ghc-regex-tdfa)
238 ("ghc-resourcet" ,ghc-resourcet)
239 ("ghc-safesemaphore" ,ghc-safesemaphore)
240 ("ghc-sandi" ,ghc-sandi)
241 ("ghc-securemem" ,ghc-securemem)
242 ("ghc-socks" ,ghc-socks)
243 ("ghc-split" ,ghc-split)
244 ("ghc-stm-chans" ,ghc-stm-chans)
245 ("ghc-tagsoup" ,ghc-tagsoup)
246 ("ghc-unix-compat" ,ghc-unix-compat)
247 ("ghc-unordered-containers" ,ghc-unordered-containers)
248 ("ghc-utf8-string" ,ghc-utf8-string)
249 ("ghc-uuid" ,ghc-uuid)
253 `(("ghc-tasty" ,ghc-tasty)
254 ("ghc-tasty-hunit" ,ghc-tasty-hunit)
255 ("ghc-tasty-quickcheck" ,ghc-tasty-quickcheck)
256 ("ghc-tasty-rerun" ,ghc-tasty-rerun)))
257 (home-page "https://git-annex.branchable.com/")
258 (synopsis "Manage files with Git, without checking in their contents")
259 (description "This package allows managing files with Git, without
260 checking the file contents into Git. It can store files in many places,
261 such as local hard drives and cloud storage services. It can also be
262 used to keep a folder in sync between computers.")
263 ;; The web app is released under the AGPLv3+.
264 (license (list license:gpl3+
267 (define-public ghc-sdl2
274 (uri (string-append "https://hackage.haskell.org/package/"
275 "sdl2/sdl2-" version ".tar.gz"))
278 "0p4b12fmxps0sbnkqdfy0qw19s355yrkw7fgw6xz53wzq706k991"))))
279 (build-system haskell-build-system)
280 (arguments '(#:tests? #f)) ; tests require graphical environment
282 `(("ghc-exceptions" ,ghc-exceptions)
283 ("ghc-linear" ,ghc-linear)
284 ("ghc-statevar" ,ghc-statevar)
285 ("ghc-vector" ,ghc-vector)
288 `(("ghc-weigh" ,ghc-weigh)
289 ("pkg-config" ,pkg-config)))
290 (home-page "http://hackage.haskell.org/package/sdl2")
291 (synopsis "High- and low-level bindings to the SDL library")
293 "This package contains bindings to the SDL 2 library, in both high- and
294 low-level forms. The @code{SDL} namespace contains high-level bindings, where
295 enumerations are split into sum types, and we perform automatic
296 error-checking. The @code{SDL.Raw} namespace contains an almost 1-1
297 translation of the C API into Haskell FFI calls. As such, this does not
298 contain sum types nor error checking. Thus this namespace is suitable for
299 building your own abstraction over SDL, but is not recommended for day-to-day
301 (license license:bsd-3)))
303 (define-public ghc-sdl2-mixer
305 (name "ghc-sdl2-mixer")
310 (uri (string-append "https://hackage.haskell.org/package/sdl2-mixer/"
311 "sdl2-mixer-" version ".tar.gz"))
314 "1k8avyccq5l9z7bwxigim312yaancxl1sr3q6a96bcm7pnhiak0g"))))
315 (build-system haskell-build-system)
317 `(("ghc-data-default-class" ,ghc-data-default-class)
318 ("ghc-lifted-base" ,ghc-lifted-base)
319 ("ghc-monad-control" ,ghc-monad-control)
320 ("ghc-sdl2" ,ghc-sdl2)
321 ("ghc-vector" ,ghc-vector)
322 ("sdl2-mixer" ,sdl2-mixer)))
324 `(("pkg-config" ,pkg-config)))
325 (home-page "http://hackage.haskell.org/package/sdl2-mixer")
326 (synopsis "Bindings to SDL2 mixer")
327 (description "This package provides Haskell bindings to
329 (license license:bsd-3)))
331 (define-public ghc-sdl2-image
333 (name "ghc-sdl2-image")
338 (uri (string-append "https://hackage.haskell.org/package/sdl2-image/"
339 "sdl2-image-" version ".tar.gz"))
342 "1pr6dkg73cy9z0w54lrkj9c5bhxj56nl92lxikjy8kz6nyr455rr"))))
343 (build-system haskell-build-system)
345 `(("ghc-sdl2" ,ghc-sdl2)
346 ("sdl2-image" ,sdl2-image)))
348 `(("pkg-config" ,pkg-config)))
349 (home-page "http://hackage.haskell.org/package/sdl2-image")
350 (synopsis "Bindings to SDL2_image")
351 (description "This package provides Haskell bindings to
353 (license license:expat)))
355 (define-public raincat
362 (uri (string-append "http://hackage.haskell.org/package/Raincat/"
363 "Raincat-" version ".tar.gz"))
366 "10y9zi22m6hf13c9h8zd9vg7mljpwbw0r3djb6r80bna701fdf6c"))))
367 (build-system haskell-build-system)
370 (modify-phases %standard-phases
371 (add-after 'install 'wrap-executable
372 (lambda* (#:key inputs outputs #:allow-other-keys)
373 (let ((out (assoc-ref outputs "out")))
374 (wrap-program (string-append out "/bin/raincat")
375 `("LD_LIBRARY_PATH" ":" =
376 (,(string-append (assoc-ref inputs "freeglut")
380 `(("ghc-extensible-exceptions" ,ghc-extensible-exceptions)
381 ("ghc-random" ,ghc-random)
382 ("ghc-glut" ,ghc-glut)
383 ("freeglut" ,freeglut)
384 ("ghc-opengl" ,ghc-opengl)
385 ("ghc-sdl2" ,ghc-sdl2)
386 ("ghc-sdl2-image" ,ghc-sdl2-image)
387 ("ghc-sdl2-mixer" ,ghc-sdl2-mixer)))
388 (home-page "http://www.bysusanlin.com/raincat/")
389 (synopsis "Puzzle game with a cat in lead role")
390 (description "Project Raincat is a game developed by Carnegie Mellon
391 students through GCS during the Fall 2008 semester. Raincat features game
392 play inspired from classics Lemmings and The Incredible Machine. The project
393 proved to be an excellent learning experience for the programmers. Everything
394 is programmed in Haskell.")
395 (license license:bsd-3)))