gnu: git-annex: Update to 7.20190708.
[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 ;;; Copyright © 2019 Kyle Meyer <kyle@kyleam.com>
10 ;;;
11 ;;; This file is part of GNU Guix.
12 ;;;
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.
17 ;;;
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.
22 ;;;
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/>.
25
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))
44
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.
49 (define-public darcs
50 (package
51 (name "darcs")
52 (version "2.14.2")
53 (source
54 (origin
55 (method url-fetch)
56 (uri (string-append "https://hackage.haskell.org/package/darcs/"
57 "darcs-" version ".tar.gz"))
58 (sha256
59 (base32
60 "0zm2486gyhiga1amclbg92cd09bvki6vgh0ll75hv5kl72j61lb5"))
61 (modules '((guix build utils)))
62 ;; Remove time-dependent code for reproducibility.
63 (snippet
64 '(begin
65 (substitute* "darcs/darcs.hs"
66 (("__DATE__") "\"1970-01-01\"")
67 (("__TIME__") "\"00:00:00\""))
68 #t))))
69 (build-system haskell-build-system)
70 (arguments
71 `(#:configure-flags '("-fpkgconfig" "-fcurl" "-flibiconv" "-fthreaded"
72 "-fnetwork-uri" "-fhttp" "--flag=executable"
73 "--flag=library")
74 #:phases
75 (modify-phases %standard-phases
76 (add-after 'patch-source-shebangs 'patch-sh
77 (lambda _
78 (substitute* "tests/issue538.sh"
79 (("/bin/sh") (which "sh")))
80 #t)))))
81 (inputs
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)
96 ("ghc-fgl" ,ghc-fgl)
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)
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 "7.20190708")
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 "18s563swrp8mx479995pdhhmn40y3xwlbm1z3w63qsnjqmj7zlij"))))
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-for-tests
162 (lambda _
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")))
170 #t))
171 (add-before 'configure 'factor-setup
172 (lambda _
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"
179 (lambda (out)
180 (format out "import qualified Build.Configure as Configure~%")
181 (format out "main = Configure.run Configure.tests~%")))
182 (call-with-output-file "Setup.hs"
183 (lambda (out)
184 (format out "import Distribution.Simple~%")
185 (format out "main = defaultMain~%")))
186 #t))
187 (add-before 'configure 'pre-configure
188 (lambda _
189 (invoke "runhaskell" "PreConf.hs")
190 #t))
191 (replace 'check
192 (lambda _
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")
200 #t))
201 (add-after 'check 'unpatch-shell-and-rebuild
202 (lambda args
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"))
214 #t))))))
215 (inputs
216 `(("curl" ,curl)
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)
262 ("git" ,git)
263 ("rsync" ,rsync)))
264 (native-inputs
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+
277 license:agpl3+))))
278
279 (define-public ghc-sdl2
280 (package
281 (name "ghc-sdl2")
282 (version "2.4.1.0")
283 (source
284 (origin
285 (method url-fetch)
286 (uri (string-append "https://hackage.haskell.org/package/"
287 "sdl2/sdl2-" version ".tar.gz"))
288 (sha256
289 (base32
290 "0p4b12fmxps0sbnkqdfy0qw19s355yrkw7fgw6xz53wzq706k991"))))
291 (build-system haskell-build-system)
292 (arguments '(#:tests? #f)) ; tests require graphical environment
293 (inputs
294 `(("ghc-exceptions" ,ghc-exceptions)
295 ("ghc-linear" ,ghc-linear)
296 ("ghc-statevar" ,ghc-statevar)
297 ("ghc-vector" ,ghc-vector)
298 ("sdl2" ,sdl2)))
299 (native-inputs
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")
304 (description
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
312 programming.")
313 (license license:bsd-3)))
314
315 (define-public ghc-sdl2-mixer
316 (package
317 (name "ghc-sdl2-mixer")
318 (version "1.1.0")
319 (source
320 (origin
321 (method url-fetch)
322 (uri (string-append "https://hackage.haskell.org/package/sdl2-mixer/"
323 "sdl2-mixer-" version ".tar.gz"))
324 (sha256
325 (base32
326 "1k8avyccq5l9z7bwxigim312yaancxl1sr3q6a96bcm7pnhiak0g"))))
327 (build-system haskell-build-system)
328 (inputs
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)))
335 (native-inputs
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
340 @code{SDL2_mixer}.")
341 (license license:bsd-3)))
342
343 (define-public ghc-sdl2-image
344 (package
345 (name "ghc-sdl2-image")
346 (version "2.0.0")
347 (source
348 (origin
349 (method url-fetch)
350 (uri (string-append "https://hackage.haskell.org/package/sdl2-image/"
351 "sdl2-image-" version ".tar.gz"))
352 (sha256
353 (base32
354 "1pr6dkg73cy9z0w54lrkj9c5bhxj56nl92lxikjy8kz6nyr455rr"))))
355 (build-system haskell-build-system)
356 (inputs
357 `(("ghc-sdl2" ,ghc-sdl2)
358 ("sdl2-image" ,sdl2-image)))
359 (native-inputs
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
364 @code{SDL2_image}.")
365 (license license:expat)))
366
367 (define-public raincat
368 (package
369 (name "raincat")
370 (version "1.2.1")
371 (source
372 (origin
373 (method url-fetch)
374 (uri (string-append "http://hackage.haskell.org/package/Raincat/"
375 "Raincat-" version ".tar.gz"))
376 (sha256
377 (base32
378 "10y9zi22m6hf13c9h8zd9vg7mljpwbw0r3djb6r80bna701fdf6c"))))
379 (build-system haskell-build-system)
380 (arguments
381 `(#:phases
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")
389 "/lib"))))
390 #t))))))
391 (inputs
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)))