gnu: python-igraph: Update to 0.8.2.
[jackhill/guix/guix.git] / gnu / packages / haskell-apps.scm
CommitLineData
804744b3 1;;; GNU Guix --- Functional package management for GNU
62e42dfa 2;;; Copyright © 2015 Siniša Biđin <sinisa@bidin.eu>
804744b3 3;;; Copyright © 2015, 2017, 2018 Ricardo Wurmus <rekado@elephly.net>
3c986a7d 4;;; Copyright © 2016, 2017, 2018 Nikita <nikita@n0.is>
62e42dfa
RV
5;;; Copyright © 2017 Danny Milosavljevic <dannym@scratchpost.org>
6;;; Copyright © 2017, 2018 Alex Vong <alexvong1995@gmail.com>
804744b3
LC
7;;; Copyright © 2017, 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
8;;; Copyright © 2018 Timothy Sample <samplet@ngyro.com>
9;;; Copyright © 2018 Arun Isaac <arunisaac@systemreboot.net>
10;;; Copyright © 2016, 2017 Leo Famulari <leo@famulari.name>
bfccae4e 11;;; Copyright © 2015 Paul van der Walt <paul@denknerd.org>
64fc2293 12;;; Copyright © 2019, 2020 Kyle Meyer <kyle@kyleam.com>
6ec2450f 13;;; Copyright © 2015 John Soo <jsoo1@asu.edu>
5de2246f 14;;; Copyright © 2019, 2020 Efraim Flashner <efraim@flashner.co.il>
51add2a9 15;;; Copyright © 2019 Alex Griffin <a@ajgrf.com>
eea58169 16;;; Copyright © 2020 Alexandru-Sergiu Marton <brown121407@member.fsf.org>
79617a01 17;;; Copyright © 2020 Brian Leung <bkleung89@gmail.com>
804744b3
LC
18;;;
19;;; This file is part of GNU Guix.
20;;;
21;;; GNU Guix is free software; you can redistribute it and/or modify it
22;;; under the terms of the GNU General Public License as published by
23;;; the Free Software Foundation; either version 3 of the License, or (at
24;;; your option) any later version.
25;;;
26;;; GNU Guix is distributed in the hope that it will be useful, but
27;;; WITHOUT ANY WARRANTY; without even the implied warranty of
28;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
29;;; GNU General Public License for more details.
30;;;
31;;; You should have received a copy of the GNU General Public License
32;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
33
34(define-module (gnu packages haskell-apps)
35 #:use-module (guix download)
62e42dfa 36 #:use-module (guix git-download)
804744b3
LC
37 #:use-module (guix packages)
38 #:use-module ((guix licenses) #:prefix license:)
39 #:use-module (guix build-system haskell)
40 #:use-module (gnu packages base)
41 #:use-module (gnu packages curl)
bfccae4e 42 #:use-module (gnu packages gl)
804744b3
LC
43 #:use-module (gnu packages haskell)
44 #:use-module (gnu packages haskell-check)
45 #:use-module (gnu packages haskell-crypto)
46 #:use-module (gnu packages haskell-web)
dddbc90c 47 #:use-module (gnu packages haskell-xyz)
804744b3
LC
48 #:use-module (gnu packages ncurses)
49 #:use-module (gnu packages perl)
50 #:use-module (gnu packages pkg-config)
51 #:use-module (gnu packages rsync)
52 #:use-module (gnu packages version-control))
53
79617a01
BL
54(define-public apply-refact
55 (package
56 (name "apply-refact")
57 (version "0.6.0.0")
58 (source
59 (origin
60 (method url-fetch)
61 (uri (string-append
62 "https://hackage.haskell.org/package/apply-refact/apply-refact-"
63 version ".tar.gz"))
64 (sha256
65 (base32
66 "0p2mqgjcqr1zcmk8zgr0yq7g8z1agsa6l493lkj6g3ya9lyhxgig"))))
67 (build-system haskell-build-system)
68 (inputs
69 `(("ghc-refact" ,ghc-refact)
70 ("ghc-exactprint" ,ghc-exactprint)
71 ("ghc-syb" ,ghc-syb)
72 ("ghc-temporary" ,ghc-temporary)
73 ("ghc-filemanip" ,ghc-filemanip)
74 ("ghc-unix-compat" ,ghc-unix-compat)
75 ("ghc-optparse-applicative"
76 ,ghc-optparse-applicative)))
77 (native-inputs
78 `(("ghc-tasty" ,ghc-tasty)
79 ("ghc-tasty-golden" ,ghc-tasty-golden)
80 ("ghc-tasty-expected-failure"
81 ,ghc-tasty-expected-failure)
82 ("ghc-silently" ,ghc-silently)))
83 (home-page "https://hackage.haskell.org/package/apply-refact")
84 (synopsis "Perform refactorings specified by the refact library")
85 (description
86 "This package lets you perform refactorings specified by the refact
87library. It is primarily used with HLint's @code{--refactor} flag.")
88 (license license:bsd-3)))
89
841f1954
TS
90;; In Stackage LTS 14, this package is at 2.4.1.0. However, that
91;; version requires version 2.4.1.0 of the 'Cabal' package, which is
92;; provided by GHC 8.6.5 at version 2.4.0.1. Hence, we use an older
93;; version to match the compiler's library.
62e42dfa
RV
94(define-public cabal-install
95 (package
96 (name "cabal-install")
841f1954 97 (version "2.4.0.0")
62e42dfa
RV
98 (source
99 (origin
100 (method url-fetch)
101 (uri (string-append
102 "https://hackage.haskell.org/package/cabal-install/cabal-install-"
103 version
104 ".tar.gz"))
105 (sha256
841f1954 106 (base32 "1xmyl0x8wqfrnray6ky5wy0g0samv4264fbdlzxhqsvk9dbfja8k"))))
62e42dfa 107 (build-system haskell-build-system)
841f1954
TS
108 (arguments
109 `(#:cabal-revision
110 ("2" "1xil5pim6j1ckqj61zz6l7xpfxxr3rkw2hvpws2f7pr9shk645dl")
111 #:phases
112 (modify-phases %standard-phases
113 (add-before 'configure 'update-constraints
114 (lambda _
115 (substitute* "cabal-install.cabal"
116 (("zip-archive >= 0\\.3\\.2\\.5 && < 0\\.4,")
117 "zip-archive >= 0.3.2.5 && <= 0.4.1,"))
118 #t)))))
62e42dfa
RV
119 (inputs
120 `(("ghc-async" ,ghc-async)
121 ("ghc-base16-bytestring" ,ghc-base16-bytestring)
122 ("ghc-cryptohash-sha256" ,ghc-cryptohash-sha256)
123 ("ghc-echo" ,ghc-echo)
124 ("ghc-edit-distance" ,ghc-edit-distance)
125 ("ghc-hackage-security" ,ghc-hackage-security)
126 ("ghc-hashable" ,ghc-hashable)
127 ("ghc-http" ,ghc-http)
128 ("ghc-network-uri" ,ghc-network-uri)
129 ("ghc-network" ,ghc-network)
130 ("ghc-random" ,ghc-random)
131 ("ghc-resolv" ,ghc-resolv)
132 ("ghc-tar" ,ghc-tar)
841f1954 133 ("ghc-zip-archive" ,ghc-zip-archive)
62e42dfa
RV
134 ("ghc-zlib" ,ghc-zlib)))
135 (home-page "https://www.haskell.org/cabal/")
136 (synopsis "Command-line interface for Cabal and Hackage")
137 (description
138 "The cabal command-line program simplifies the process of managing
139Haskell software by automating the fetching, configuration, compilation and
140installation of Haskell libraries and programs.")
141 (license license:bsd-3)))
142
143(define-public corrode
144 (let ((commit "b6699fb2fa552a07c6091276285a44133e5c9789"))
145 (package
146 (name "corrode")
147 (version (string-append "0.0.1-" (string-take commit 7)))
148 (source
149 (origin
150 (method git-fetch)
151 (uri (git-reference
b0e7b699 152 (url "https://github.com/jameysharp/corrode")
62e42dfa 153 (commit "b6699fb2fa552a07c6091276285a44133e5c9789")))
bb90beb5 154 (file-name (git-file-name name version))
62e42dfa
RV
155 (sha256
156 (base32 "02v0yyj6sk4gpg2222wzsdqjxn8w66scbnf6b20x0kbmc69qcz4r"))))
157 (build-system haskell-build-system)
158 (inputs
159 `(("ghc-language-c" ,ghc-language-c)
160 ("ghc-markdown-unlit" ,ghc-markdown-unlit)))
161 (home-page "https://github.com/jameysharp/corrode")
162 (synopsis "Automatic semantics-preserving translation from C to Rust")
163 (description
164 "This program reads a C source file and prints an equivalent module in
165Rust syntax. It is intended to be useful for two different purposes:
166
167@enumerate
168@item Partial automation for migrating legacy code that was implemented in C.
169@item A new, complementary approach to static analysis for C programs.
170@end enumerate\n")
171 (license license:gpl2+))))
172
173(define-public cpphs
174 (package
175 (name "cpphs")
176 (version "1.20.8")
177 (source
178 (origin
179 (method url-fetch)
180 (uri (string-append
181 "https://hackage.haskell.org/package/" name "/"
182 name "-" version ".tar.gz"))
183 (sha256
184 (base32
185 "1bh524asqhk9v1s0wvipl0hgn7l63iy3js867yv0z3h5v2kn8vg5"))))
186 (build-system haskell-build-system)
187 (inputs
188 `(("ghc-polyparse" ,ghc-polyparse)
189 ("ghc-old-locale" ,ghc-old-locale)
190 ("ghc-old-time" ,ghc-old-time)))
191 (home-page "http://projects.haskell.org/cpphs/")
192 (synopsis "Liberalised re-implementation of cpp, the C pre-processor")
193 (description "Cpphs is a re-implementation of the C pre-processor that is
194both more compatible with Haskell, and itself written in Haskell so that it
195can be distributed with compilers. This version of the C pre-processor is
196pretty-much feature-complete and compatible with traditional (K&R)
197pre-processors. Additional features include: a plain-text mode; an option to
198unlit literate code files; and an option to turn off macro-expansion.")
199 (license (list license:lgpl2.1+ license:gpl3+))))
200
d93fc75e 201;; Darcs has no https support:
804744b3
LC
202;; http://darcs.net/manual/Configuring_darcs.html#SECTION00440070000000000000
203;; and results of search engines will show that if the protocol is http, https
204;; is never mentioned.
205(define-public darcs
206 (package
207 (name "darcs")
208 (version "2.14.2")
209 (source
210 (origin
211 (method url-fetch)
212 (uri (string-append "https://hackage.haskell.org/package/darcs/"
213 "darcs-" version ".tar.gz"))
214 (sha256
215 (base32
216 "0zm2486gyhiga1amclbg92cd09bvki6vgh0ll75hv5kl72j61lb5"))
217 (modules '((guix build utils)))
218 ;; Remove time-dependent code for reproducibility.
219 (snippet
220 '(begin
221 (substitute* "darcs/darcs.hs"
222 (("__DATE__") "\"1970-01-01\"")
223 (("__TIME__") "\"00:00:00\""))
224 #t))))
225 (build-system haskell-build-system)
226 (arguments
0710797d
TS
227 `(#:cabal-revision
228 ("1" "0xl7j5cm704pbl2ms0dkydh7jvrz0ym76d725ifpg4h902m1zkhg")
229 #:configure-flags '("-fpkgconfig" "-fcurl" "-flibiconv" "-fthreaded"
804744b3
LC
230 "-fnetwork-uri" "-fhttp" "--flag=executable"
231 "--flag=library")
232 #:phases
233 (modify-phases %standard-phases
234 (add-after 'patch-source-shebangs 'patch-sh
235 (lambda _
236 (substitute* "tests/issue538.sh"
237 (("/bin/sh") (which "sh")))
0710797d
TS
238 #t))
239 (add-before 'configure 'update-constraints
240 (lambda _
241 (substitute* "darcs.cabal"
242 (("QuickCheck >= 2\\.8\\.2 && < 2\\.13,")
243 "QuickCheck >= 2.8.2 && < 2.14,"))
804744b3
LC
244 #t)))))
245 (inputs
246 `(("ghc-cmdargs" ,ghc-cmdargs)
247 ("ghc-split" ,ghc-split)
248 ("ghc-test-framework-quickcheck2" ,ghc-test-framework-quickcheck2)
249 ("ghc-test-framework-hunit" ,ghc-test-framework-hunit)
250 ("ghc-test-framework" ,ghc-test-framework)
251 ("ghc-quickcheck" ,ghc-quickcheck)
252 ("ghc-findbin" ,ghc-findbin)
253 ("ghc-hunit" ,ghc-hunit)
254 ("ghc-async" ,ghc-async)
255 ("ghc-attoparsec" ,ghc-attoparsec)
256 ("ghc-base16-bytestring" ,ghc-base16-bytestring)
257 ("ghc-bytestring-builder" ,ghc-bytestring-builder)
258 ("ghc-cryptohash" ,ghc-cryptohash)
259 ("ghc-data-ordlist" ,ghc-data-ordlist)
260 ("ghc-fgl" ,ghc-fgl)
261 ("ghc-system-filepath" ,ghc-system-filepath)
262 ("ghc-graphviz" ,ghc-graphviz)
263 ("ghc-hashable" ,ghc-hashable)
264 ("ghc-html" ,ghc-html)
265 ("ghc-mmap" ,ghc-mmap)
266 ("ghc-old-time" ,ghc-old-time)
804744b3
LC
267 ("ghc-random" ,ghc-random)
268 ("ghc-regex-applicative" ,ghc-regex-applicative)
269 ("ghc-regex-compat-tdfa" ,ghc-regex-compat-tdfa)
270 ("ghc-sandi" ,ghc-sandi)
271 ("ghc-shelly" ,ghc-shelly)
272 ("ghc-tar" ,ghc-tar)
273 ("ghc-transformers-compat" ,ghc-transformers-compat)
274 ("ghc-unix-compat" ,ghc-unix-compat)
275 ("ghc-utf8-string" ,ghc-utf8-string)
276 ("ghc-vector" ,ghc-vector)
277 ("ghc-zip-archive" ,ghc-zip-archive)
278 ("ghc-zlib" ,ghc-zlib)
279 ("ghc-http" ,ghc-http)
280 ("curl" ,curl)
281 ("ghc" ,ghc)
282 ("ncurses" ,ncurses)
283 ("perl" ,perl)
284 ("libiconv" ,libiconv)
285 ("ghc-network" ,ghc-network)
286 ("ghc-network-uri" ,ghc-network-uri)))
287 (native-inputs
288 `(("pkg-config" ,pkg-config)))
289 (home-page "http://darcs.net")
290 (synopsis "Distributed Revision Control System")
291 (description
292 "Darcs is a revision control system. It is:
293
294@enumerate
295@item Distributed: Every user has access to the full command set, removing boundaries
296between server and client or committer and non-committers.
297@item Interactive: Darcs is easy to learn and efficient to use because it asks you
298questions in response to simple commands, giving you choices in your work flow.
299You can choose to record one change in a file, while ignoring another. As you update
300from upstream, you can review each patch name, even the full diff for interesting
301patches.
302@item Smart: Originally developed by physicist David Roundy, darcs is based on a
303unique algebra of patches called @url{http://darcs.net/Theory,Patchtheory}.
304@end enumerate")
305 (license license:gpl2)))
306
eea58169
ASM
307(define-public ghcid
308 (package
309 (name "ghcid")
310 (version "0.8.4")
311 (source
312 (origin
313 (method url-fetch)
314 (uri (string-append "https://hackage.haskell.org/package/ghcid/"
315 "ghcid-" version ".tar.gz"))
316 (sha256
317 (base32
318 "0wpm4ikrm1krz1ckzwk0srng091yh2skjal4fh95iz1hq3dw6qlw"))))
319 (build-system haskell-build-system)
320 (inputs
321 `(("ghc-extra" ,ghc-extra)
322 ("ghc-ansi-terminal" ,ghc-ansi-terminal)
323 ("ghc-cmdargs" ,ghc-cmdargs)
324 ("ghc-fsnotify" ,ghc-fsnotify)
325 ("ghc-terminal-size" ,ghc-terminal-size)))
326 (native-inputs
327 `(("ghc-tasty" ,ghc-tasty)
328 ("ghc-tasty-hunit" ,ghc-tasty-hunit)))
329 (home-page
330 "https://github.com/ndmitchell/ghcid#readme")
331 (synopsis "GHCi based bare bones IDE")
332 (description
333 "Either \"GHCi as a daemon\" or \"GHC + a bit of an IDE\". A very simple Haskell
334development tool which shows you the errors in your project and updates them whenever
335you save. Run @code{ghcid --topmost --command=ghci}, where @code{--topmost} makes the
336window on top of all others (Windows only) and @code{--command} is the command to start
337GHCi on your project (defaults to @code{ghci} if you have a @file{.ghci} file, or else
338to @code{cabal repl}).")
339 (license license:bsd-3)))
340
804744b3
LC
341(define-public git-annex
342 (package
343 (name "git-annex")
35e24fab 344 (version "8.20200810")
804744b3
LC
345 (source
346 (origin
347 (method url-fetch)
348 (uri (string-append "https://hackage.haskell.org/package/"
349 "git-annex/git-annex-" version ".tar.gz"))
350 (sha256
35e24fab 351 (base32 "1wy6ckcf5f6m94gakg1504h1zryail3mmj85sglq03s45vawjcg6"))))
804744b3
LC
352 (build-system haskell-build-system)
353 (arguments
354 `(#:configure-flags
ac1b0801 355 '("--flags=-Android -Assistant -Pairing -Webapp -WebDAV")
804744b3
LC
356 #:phases
357 (modify-phases %standard-phases
3d45d8f1 358 (add-before 'configure 'patch-shell-for-tests
804744b3 359 (lambda _
3d45d8f1
KM
360 ;; Shell.hs defines "/bin/sh" that is used in Git hooks. We
361 ;; shouldn't patch hooks with Guix's current bash because the
362 ;; hooks can exist after that bash is garbage collected, but
363 ;; let's temporarily patch it so that we can run the tests.
364 (copy-file "Utility/Shell.hs" "/tmp/Shell.hs")
804744b3
LC
365 (substitute* "Utility/Shell.hs"
366 (("/bin/sh") (which "sh")))
367 #t))
368 (add-before 'configure 'factor-setup
369 (lambda _
370 ;; Factor out necessary build logic from the provided
371 ;; `Setup.hs' script. The script as-is does not work because
372 ;; it cannot find its dependencies, and there is no obvious way
64fc2293 373 ;; to tell it where to look.
804744b3
LC
374 (call-with-output-file "PreConf.hs"
375 (lambda (out)
376 (format out "import qualified Build.Configure as Configure~%")
377 (format out "main = Configure.run Configure.tests~%")))
378 (call-with-output-file "Setup.hs"
379 (lambda (out)
380 (format out "import Distribution.Simple~%")
381 (format out "main = defaultMain~%")))
382 #t))
383 (add-before 'configure 'pre-configure
384 (lambda _
385 (invoke "runhaskell" "PreConf.hs")
386 #t))
64fc2293
KM
387 (add-after 'build 'build-manpages
388 (lambda _
389 ;; The Setup.hs rewrite above removed custom code for building
390 ;; the man pages. In addition to that code, git-annex's source
391 ;; tree has a file that's not included in the tarball but is used
392 ;; by the Makefile to build man pages. Copy the core bits here.
393 (call-with-output-file "Build/MakeMans.hs"
394 (lambda (out)
395 (format out "module Main where~%")
396 (format out "import Build.Mans~%")
397 (format out "main = buildMansOrWarn~%")))
398 (invoke "runhaskell" "Build/MakeMans.hs")))
804744b3
LC
399 (replace 'check
400 (lambda _
401 ;; We need to set the path so that Git recognizes
402 ;; `git annex' as a custom command.
403 (setenv "PATH" (string-append (getenv "PATH") ":"
404 (getcwd) "/dist/build/git-annex"))
405 (with-directory-excursion "dist/build/git-annex"
406 (symlink "git-annex" "git-annex-shell"))
407 (invoke "git-annex" "test")
408 #t))
3d45d8f1
KM
409 (add-after 'check 'unpatch-shell-and-rebuild
410 (lambda args
411 ;; Undo `patch-shell-for-tests'.
412 (copy-file "/tmp/Shell.hs" "Utility/Shell.hs")
413 (apply (assoc-ref %standard-phases 'build) args)))
64fc2293
KM
414 (add-after 'install 'install-manpages
415 (lambda* (#:key outputs #:allow-other-keys)
416 (let ((man (string-append (assoc-ref outputs "out")
417 "/man/man1/")))
418 (mkdir-p man)
419 (for-each (lambda (file) (install-file file man))
420 (find-files "man")))
421 #t))
804744b3
LC
422 (add-after 'install 'install-symlinks
423 (lambda* (#:key outputs #:allow-other-keys)
424 (let* ((out (assoc-ref outputs "out"))
425 (bin (string-append out "/bin")))
426 (symlink (string-append bin "/git-annex")
427 (string-append bin "/git-annex-shell"))
428 (symlink (string-append bin "/git-annex")
429 (string-append bin "/git-remote-tor-annex"))
e13fefbc
TS
430 #t)))
431 (add-after 'install 'touch-static-output
432 (lambda* (#:key outputs #:allow-other-keys)
433 ;; The Haskell build system adds a "static" output by
434 ;; default, and there is no way to override this until
435 ;; <https://issues.guix.gnu.org/41569> is fixed. Without
436 ;; this phase, the daemon complains because we do not
437 ;; create the "static" output.
438 (with-output-to-file (assoc-ref outputs "static")
439 (lambda ()
440 (display "static output not used\n"))))))))
804744b3
LC
441 (inputs
442 `(("curl" ,curl)
443 ("ghc-aeson" ,ghc-aeson)
444 ("ghc-async" ,ghc-async)
ac1b0801 445 ("ghc-aws" ,ghc-aws)
804744b3
LC
446 ("ghc-bloomfilter" ,ghc-bloomfilter)
447 ("ghc-byteable" ,ghc-byteable)
448 ("ghc-case-insensitive" ,ghc-case-insensitive)
a4a41a7b 449 ("ghc-concurrent-output" ,ghc-concurrent-output)
804744b3
LC
450 ("ghc-crypto-api" ,ghc-crypto-api)
451 ("ghc-cryptonite" ,ghc-cryptonite)
452 ("ghc-data-default" ,ghc-data-default)
453 ("ghc-disk-free-space" ,ghc-disk-free-space)
454 ("ghc-dlist" ,ghc-dlist)
455 ("ghc-edit-distance" ,ghc-edit-distance)
456 ("ghc-esqueleto" ,ghc-esqueleto)
457 ("ghc-exceptions" ,ghc-exceptions)
458 ("ghc-feed" ,ghc-feed)
0e5c0e46 459 ("ghc-filepath-bytestring" ,ghc-filepath-bytestring)
804744b3
LC
460 ("ghc-free" ,ghc-free)
461 ("ghc-hslogger" ,ghc-hslogger)
462 ("ghc-http-client" ,ghc-http-client)
463 ("ghc-http-conduit" ,ghc-http-conduit)
464 ("ghc-http-types" ,ghc-http-types)
465 ("ghc-ifelse" ,ghc-ifelse)
f2a3ff85 466 ("ghc-magic" ,ghc-magic)
804744b3
LC
467 ("ghc-memory" ,ghc-memory)
468 ("ghc-monad-control" ,ghc-monad-control)
469 ("ghc-monad-logger" ,ghc-monad-logger)
470 ("ghc-network" ,ghc-network)
471 ("ghc-old-locale" ,ghc-old-locale)
472 ("ghc-optparse-applicative" ,ghc-optparse-applicative)
473 ("ghc-persistent" ,ghc-persistent)
474 ("ghc-persistent-sqlite" ,ghc-persistent-sqlite)
475 ("ghc-persistent-template" ,ghc-persistent-template)
476 ("ghc-quickcheck" ,ghc-quickcheck)
477 ("ghc-random" ,ghc-random)
478 ("ghc-regex-tdfa" ,ghc-regex-tdfa)
479 ("ghc-resourcet" ,ghc-resourcet)
480 ("ghc-safesemaphore" ,ghc-safesemaphore)
481 ("ghc-sandi" ,ghc-sandi)
482 ("ghc-securemem" ,ghc-securemem)
483 ("ghc-socks" ,ghc-socks)
484 ("ghc-split" ,ghc-split)
804744b3
LC
485 ("ghc-stm-chans" ,ghc-stm-chans)
486 ("ghc-tagsoup" ,ghc-tagsoup)
804744b3
LC
487 ("ghc-unix-compat" ,ghc-unix-compat)
488 ("ghc-unordered-containers" ,ghc-unordered-containers)
489 ("ghc-utf8-string" ,ghc-utf8-string)
490 ("ghc-uuid" ,ghc-uuid)
491 ("git" ,git)
492 ("rsync" ,rsync)))
493 (native-inputs
494 `(("ghc-tasty" ,ghc-tasty)
495 ("ghc-tasty-hunit" ,ghc-tasty-hunit)
496 ("ghc-tasty-quickcheck" ,ghc-tasty-quickcheck)
64fc2293
KM
497 ("ghc-tasty-rerun" ,ghc-tasty-rerun)
498 ("perl" ,perl)))
804744b3
LC
499 (home-page "https://git-annex.branchable.com/")
500 (synopsis "Manage files with Git, without checking in their contents")
501 (description "This package allows managing files with Git, without
502checking the file contents into Git. It can store files in many places,
503such as local hard drives and cloud storage services. It can also be
504used to keep a folder in sync between computers.")
7e772cb6
KM
505 ;; The main author has released all his changes under AGPLv3+ as of March
506 ;; 2019 (7.20190219-187-g40ecf58d4). These are also licensed under the
507 ;; original GPLv3+ license, but going forward new changes will be under
508 ;; only AGPLv3+. The other licenses below cover code written by others.
509 ;; See git-annex's COPYRIGHT file for details on each file.
510 (license (list license:agpl3+
511 license:gpl3+
512 license:bsd-2
513 license:expat
514 license:gpl2))))
bfccae4e 515
62e42dfa
RV
516(define-public hlint
517 (package
518 (name "hlint")
cfbb0a95 519 (version "2.1.26")
62e42dfa
RV
520 (source
521 (origin
522 (method url-fetch)
523 (uri (string-append
524 "https://hackage.haskell.org/package/" name
525 "/" name "-" version ".tar.gz"))
526 (sha256
527 (base32
cfbb0a95 528 "16zkkpbfrd69853cdqf597fva969lirfc86b039i9zd7ghlrcayc"))))
62e42dfa
RV
529 (build-system haskell-build-system)
530 (inputs
531 `(("cpphs" ,cpphs)
532 ("ghc-unordered-containers" ,ghc-unordered-containers)
533 ("ghc-yaml" ,ghc-yaml)
534 ("ghc-vector" ,ghc-vector)
535 ("ghc-data-default" ,ghc-data-default)
536 ("ghc-cmdargs" ,ghc-cmdargs)
537 ("ghc-haskell-src-exts" ,ghc-haskell-src-exts)
538 ("ghc-haskell-src-exts-util" ,ghc-haskell-src-exts-util)
539 ("ghc-uniplate" ,ghc-uniplate)
540 ("ghc-ansi-terminal" ,ghc-ansi-terminal)
541 ("ghc-extra" ,ghc-extra)
542 ("ghc-refact" ,ghc-refact)
543 ("ghc-aeson" ,ghc-aeson)
cfbb0a95 544 ("ghc-lib-parser" ,ghc-lib-parser)
62e42dfa 545 ("hscolour" ,hscolour)))
19115138 546 (home-page "https://github.com/ndmitchell/hlint")
62e42dfa
RV
547 (synopsis "Suggest improvements for Haskell source code")
548 (description "HLint reads Haskell programs and suggests changes that
549hopefully make them easier to read. HLint also makes it easy to disable
550unwanted suggestions, and to add your own custom suggestions.")
551 (license license:bsd-3)))
552
6ec2450f
JS
553(define-public hoogle
554 (package
555 (name "hoogle")
12ee2d5d 556 (version "5.0.17.11")
6ec2450f
JS
557 (source
558 (origin
559 (method url-fetch)
560 (uri
561 (string-append
562 "https://hackage.haskell.org/package/hoogle/hoogle-"
563 version ".tar.gz"))
564 (sha256
565 (base32
12ee2d5d 566 "1svp8z9pad8z2j386pr0dda0ds8ddxab0salnz4gm51q877w93p1"))))
6ec2450f
JS
567 (build-system haskell-build-system)
568 (inputs
12ee2d5d 569 `(("ghc-quickcheck" ,ghc-quickcheck)
6ec2450f 570 ("ghc-aeson" ,ghc-aeson)
12ee2d5d
TS
571 ("ghc-blaze-html" ,ghc-blaze-html)
572 ("ghc-blaze-markup" ,ghc-blaze-markup)
6ec2450f
JS
573 ("ghc-cmdargs" ,ghc-cmdargs)
574 ("ghc-conduit" ,ghc-conduit)
575 ("ghc-conduit-extra" ,ghc-conduit-extra)
576 ("ghc-connection" ,ghc-connection)
577 ("ghc-extra" ,ghc-extra)
12ee2d5d 578 ("ghc-foundation" ,ghc-foundation)
6ec2450f
JS
579 ("ghc-old-locale" ,ghc-old-locale)
580 ("ghc-haskell-src-exts" ,ghc-haskell-src-exts)
581 ("ghc-http-conduit" ,ghc-http-conduit)
582 ("ghc-http-types" ,ghc-http-types)
583 ("ghc-js-flot" ,ghc-js-flot)
584 ("ghc-js-jquery" ,ghc-js-jquery)
585 ("ghc-mmap" ,ghc-mmap)
586 ("ghc-process-extras" ,ghc-process-extras)
587 ("ghc-resourcet" ,ghc-resourcet)
588 ("ghc-storable-tuple" ,ghc-storable-tuple)
589 ("ghc-tar" ,ghc-tar)
590 ("ghc-uniplate" ,ghc-uniplate)
591 ("ghc-utf8-string" ,ghc-utf8-string)
592 ("ghc-vector" ,ghc-vector)
593 ("ghc-wai" ,ghc-wai)
594 ("ghc-wai-logger" ,ghc-wai-logger)
595 ("ghc-warp" ,ghc-warp)
596 ("ghc-warp-tls" ,ghc-warp-tls)
597 ("ghc-zlib" ,ghc-zlib)))
598 (home-page "https://hoogle.haskell.org/")
599 (synopsis "Haskell API Search")
600 (description "Hoogle is a Haskell API search engine, which allows
601you to search many standard Haskell libraries by either function name,
602or by approximate type signature.")
603 (license license:bsd-3)))
604
62e42dfa
RV
605(define-public hscolour
606 (package
607 (name "hscolour")
608 (version "1.24.4")
609 (source
610 (origin
611 (method url-fetch)
612 (uri (string-append
613 "https://hackage.haskell.org/package/hscolour/hscolour-"
614 version
615 ".tar.gz"))
616 (sha256
617 (base32
618 "079jwph4bwllfp03yfr26s5zc6m6kw3nhb1cggrifh99haq34cr4"))))
619 (build-system haskell-build-system)
620 (home-page "https://hackage.haskell.org/package/hscolour")
621 (synopsis "Script to colourise Haskell code")
622 (description "HSColour is a small Haskell script to colourise Haskell
623code. It currently has six output formats: ANSI terminal codes (optionally
624XTerm-256colour codes), HTML 3.2 with font tags, HTML 4.01 with CSS, HTML 4.01
625with CSS and mouseover annotations, XHTML 1.0 with inline CSS styling, LaTeX,
626and mIRC chat codes.")
627 (license license:bsd-3)))
628
51add2a9
AG
629(define-public kmonad
630 (package
631 (name "kmonad")
15c06ad0 632 (version "0.3.0")
51add2a9
AG
633 (source
634 (origin
635 (method git-fetch)
636 (uri (git-reference
b0e7b699 637 (url "https://github.com/david-janssen/kmonad")
15c06ad0 638 (commit version)))
51add2a9
AG
639 (file-name (git-file-name name version))
640 (sha256
15c06ad0 641 (base32 "1g40nkpldih6h1rlxjx5yf9iavr3qs1f2b6j0gd8135p5hkg8d8n"))))
51add2a9
AG
642 (build-system haskell-build-system)
643 (arguments
644 `(#:phases
645 (modify-phases %standard-phases
646 (delete 'haddock) ; Haddock fails to generate docs
647 (add-after 'install 'install-udev-rules
648 (lambda* (#:key outputs #:allow-other-keys)
649 (let* ((out (assoc-ref outputs "out"))
650 (rules (string-append out "/lib/udev/rules.d")))
651 (mkdir-p rules)
652 (call-with-output-file (string-append rules "/70-kmonad.rules")
653 (lambda (port)
654 (display
655 (string-append
656 "KERNEL==\"uinput\", MODE=\"0660\", "
657 "GROUP=\"input\", OPTIONS+=\"static_node=uinput\"\n")
658 port)))
659 #t)))
660 (add-after 'install-udev-rules 'install-documentation
661 (lambda* (#:key outputs #:allow-other-keys)
662 (let* ((out (assoc-ref outputs "out"))
663 (doc (string-append out "/share/doc/kmonad-" ,version)))
664 (install-file "README.md" doc)
665 (copy-recursively "doc" doc)
666 (copy-recursively "example" (string-append doc "/example"))
667 #t))))))
668 (inputs
669 `(("ghc-cereal" ,ghc-cereal)
670 ("ghc-exceptions" ,ghc-exceptions)
671 ("ghc-hashable" ,ghc-hashable)
672 ("ghc-lens" ,ghc-lens)
03b0c92e 673 ("ghc-megaparsec" ,ghc-megaparsec)
51add2a9
AG
674 ("ghc-optparse-applicative" ,ghc-optparse-applicative)
675 ("ghc-unagi-chan" ,ghc-unagi-chan)
676 ("ghc-unliftio" ,ghc-unliftio)
677 ("ghc-unordered-containers" ,ghc-unordered-containers)))
678 (home-page "https://github.com/david-janssen/kmonad")
679 (synopsis "Advanced keyboard manager")
680 (description "KMonad is a keyboard remapping utility that supports
681advanced functionality, such as custom keymap layers and modifiers, macros,
682and conditional mappings that send a different keycode when tapped or held.
683By operating at a lower level than most similar tools, it supports X11,
684Wayland, and Linux console environments alike.")
685 (license license:expat)))
686
bfccae4e
LC
687(define-public raincat
688 (package
689 (name "raincat")
690 (version "1.2.1")
691 (source
692 (origin
693 (method url-fetch)
1e5c274e 694 (uri (string-append "mirror://hackage/package/Raincat/"
bfccae4e
LC
695 "Raincat-" version ".tar.gz"))
696 (sha256
697 (base32
698 "10y9zi22m6hf13c9h8zd9vg7mljpwbw0r3djb6r80bna701fdf6c"))))
699 (build-system haskell-build-system)
700 (arguments
701 `(#:phases
702 (modify-phases %standard-phases
703 (add-after 'install 'wrap-executable
704 (lambda* (#:key inputs outputs #:allow-other-keys)
705 (let ((out (assoc-ref outputs "out")))
706 (wrap-program (string-append out "/bin/raincat")
707 `("LD_LIBRARY_PATH" ":" =
708 (,(string-append (assoc-ref inputs "freeglut")
709 "/lib"))))
710 #t))))))
711 (inputs
712 `(("ghc-extensible-exceptions" ,ghc-extensible-exceptions)
713 ("ghc-random" ,ghc-random)
714 ("ghc-glut" ,ghc-glut)
715 ("freeglut" ,freeglut)
716 ("ghc-opengl" ,ghc-opengl)
717 ("ghc-sdl2" ,ghc-sdl2)
718 ("ghc-sdl2-image" ,ghc-sdl2-image)
719 ("ghc-sdl2-mixer" ,ghc-sdl2-mixer)))
a15b4529 720 (home-page "https://www.gamecreation.org/games/raincat")
bfccae4e
LC
721 (synopsis "Puzzle game with a cat in lead role")
722 (description "Project Raincat is a game developed by Carnegie Mellon
723students through GCS during the Fall 2008 semester. Raincat features game
724play inspired from classics Lemmings and The Incredible Machine. The project
725proved to be an excellent learning experience for the programmers. Everything
726is programmed in Haskell.")
727 (license license:bsd-3)))
62e42dfa 728
6e241750
EF
729(define-public scroll
730 (package
731 (name "scroll")
732 (version "1.20180421")
733 (source
734 (origin
735 (method url-fetch)
736 (uri (string-append
737 "https://hackage.haskell.org/package/scroll/scroll-"
738 version ".tar.gz"))
739 (sha256
740 (base32
741 "0apzrvf99rskj4dbmn57jjxrsf19j436s8a09m950df5aws3a0wj"))))
742 (build-system haskell-build-system)
743 (inputs
744 `(("ghc-case-insensitive" ,ghc-case-insensitive)
745 ("ghc-data-default" ,ghc-data-default)
746 ("ghc-ifelse" ,ghc-ifelse)
747 ("ghc-monad-loops" ,ghc-monad-loops)
748 ("ghc-ncurses" ,ghc-ncurses)
749 ("ghc-optparse-applicative" ,ghc-optparse-applicative)
750 ("ghc-random" ,ghc-random)
751 ("ghc-vector" ,ghc-vector)))
752 (home-page "https://joeyh.name/code/scroll/")
753 (synopsis "scroll(6), a roguelike game")
754 (description
755 "You're a bookworm that's stuck on a scroll. You have to dodge between
756words and use spells to make your way down the page as the scroll is read. Go
757too slow and you'll get wound up in the scroll and crushed.")
758 (license license:gpl2)))
759
62e42dfa
RV
760(define-public shellcheck
761 (package
762 (name "shellcheck")
763 (version "0.7.0")
764 (source
765 (origin
766 (method url-fetch)
767 (uri (string-append
768 "https://hackage.haskell.org/package/ShellCheck/ShellCheck-"
769 version ".tar.gz"))
770 (sha256
771 (base32 "1vx895cp5k5h0680xfwj74lk97m9y627n965x6srds0gfnbkzy9s"))
772 (file-name (string-append name "-" version ".tar.gz"))))
773 (build-system haskell-build-system)
774 (inputs
775 `(("ghc-aeson" ,ghc-aeson)
776 ("ghc-diff" ,ghc-diff)
777 ("ghc-quickcheck" ,ghc-quickcheck)
778 ("ghc-regex-tdfa" ,ghc-regex-tdfa)))
1ee45e62 779 (home-page "https://www.shellcheck.net/")
62e42dfa
RV
780 (synopsis "Static analysis for shell scripts")
781 (description "@code{shellcheck} provides static analysis for
782@command{bash} and @command{sh} shell scripts.
783It gives warnings and suggestions in order to:
784
785@enumerate
786@item Point out and clarify typical beginner's syntax issues that cause
787a shell to give cryptic error messages.
788@item Point out and clarify typical intermediate level semantic problems
789that cause a shell to behave strangely and counter-intuitively.
790@item Point out subtle caveats, corner cases and pitfalls that may cause an
791advanced user's otherwise working script to fail under future circumstances.
792@end enumerate")
793 (license license:gpl3+)))
83f9448e 794
dcfd1d2c
MB
795(define-public shelltestrunner
796 (package
797 (name "shelltestrunner")
798 (version "1.9")
799 (source (origin
800 (method url-fetch)
801 (uri (string-append "mirror://hackage/package/shelltestrunner-"
802 version "/shelltestrunner-" version ".tar.gz"))
803 (sha256
804 (base32
805 "1a5kzqbwg6990249ypw0cx6cqj6663as1kbj8nzblcky8j6kbi6b"))))
806 (build-system haskell-build-system)
807 (arguments
808 '(#:phases
809 (modify-phases %standard-phases
810 (delete 'check)
811 (add-after 'install 'check
812 (lambda* (#:key outputs tests? parallel-tests? #:allow-other-keys)
813 ;; This test is inspired by the Makefile in the upstream
814 ;; repository, which is missing in the Hackage release tarball
815 ;; along with some of the tests. The Makefile would not work
816 ;; anyway as it ties into the 'stack' build tool.
817 (let* ((out (assoc-ref outputs "out"))
818 (shelltest (string-append out "/bin/shelltest"))
819 (numjobs (if parallel-tests?
820 (number->string (parallel-job-count))
821 "1")))
822 (if tests?
823 (invoke shelltest (string-append "-j" numjobs)
824 "tests/examples")
825 (format #t "test suite not run~%"))
826 #t))))))
827 (inputs
828 `(("ghc-diff" ,ghc-diff)
829 ("ghc-cmdargs" ,ghc-cmdargs)
830 ("ghc-filemanip" ,ghc-filemanip)
831 ("ghc-hunit" ,ghc-hunit)
832 ("ghc-pretty-show" ,ghc-pretty-show)
833 ("ghc-regex-tdfa" ,ghc-regex-tdfa)
834 ("ghc-safe" ,ghc-safe)
835 ("ghc-utf8-string" ,ghc-utf8-string)
836 ("ghc-test-framework" ,ghc-test-framework)
837 ("ghc-test-framework-hunit" ,ghc-test-framework-hunit)))
838 (home-page "https://github.com/simonmichael/shelltestrunner")
839 (synopsis "Test CLI programs")
840 (description
841 "shelltestrunner (executable: @command{shelltest}) is a command-line tool
842for testing command-line programs, or general shell commands. It reads simple
843test specifications defining a command to run, some input, and the expected
844output, stderr, and exit status.")
845 (license license:gpl3+)))
846
83f9448e
JS
847(define-public stylish-haskell
848 (package
849 (name "stylish-haskell")
850 (version "0.9.2.2")
851 (source
852 (origin
853 (method url-fetch)
854 (uri
855 (string-append
856 "mirror://hackage/package/stylish-haskell/"
857 "stylish-haskell-" version ".tar.gz"))
858 (sha256
859 (base32
860 "1zs624xqp6j8vrl6pfv18dm8vz8hvz25grri65ximxhcizgwhnax"))))
861 (build-system haskell-build-system)
862 (inputs
863 `(("ghc-aeson" ,ghc-aeson)
864 ("ghc-file-embed" ,ghc-file-embed)
865 ("ghc-haskell-src-exts" ,ghc-haskell-src-exts)
866 ("ghc-semigroups" ,ghc-semigroups)
867 ("ghc-syb" ,ghc-syb)
868 ("ghc-yaml" ,ghc-yaml)
869 ("ghc-strict" ,ghc-strict)
870 ("ghc-optparse-applicative" ,ghc-optparse-applicative)
871 ("ghc-hunit" ,ghc-hunit)
872 ("ghc-test-framework" ,ghc-test-framework)
873 ("ghc-test-framework-hunit" ,ghc-test-framework-hunit)))
874 (home-page "https://github.com/jaspervdj/stylish-haskell")
875 (synopsis "Haskell code prettifier")
156b08bd
JS
876 (description "Stylish-haskell is a Haskell code prettifier. The goal is
877not to format all of the code in a file, to avoid \"getting in the way\".
878However, this tool can e.g. clean up import statements and help doing various
879tasks that get tedious very quickly. It can
880@itemize
881@item
882Align and sort @code{import} statements
883@item
884Group and wrap @code{{-# LANGUAGE #-}} pragmas, remove (some) redundant
885pragmas
886@item
887Remove trailing whitespaces
888@item
889Align branches in @code{case} and fields in records
890@item
891Convert line endings (customisable)
892@item
893Replace tabs by four spaces (turned off by default)
894@item
895Replace some ASCII sequences by their Unicode equivalent (turned off by
896default)
897@end itemize")
83f9448e 898 (license license:bsd-3)))
1e19569b
MB
899
900(define-public ghc-stylish-haskell
901 (deprecated-package "ghc-stylish-haskell" stylish-haskell))