Merge branch 'master' into staging
[jackhill/guix/guix.git] / gnu / packages / haskell-apps.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2015 Siniša Biđin <sinisa@bidin.eu>
3 ;;; Copyright © 2015, 2017, 2018 Ricardo Wurmus <rekado@elephly.net>
4 ;;; Copyright © 2016, 2017, 2018 ng0 <ng0@n0.is>
5 ;;; Copyright © 2017 Danny Milosavljevic <dannym@scratchpost.org>
6 ;;; Copyright © 2017, 2018 Alex Vong <alexvong1995@gmail.com>
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>
11 ;;; Copyright © 2015 Paul van der Walt <paul@denknerd.org>
12 ;;; Copyright © 2019 Kyle Meyer <kyle@kyleam.com>
13 ;;; Copyright © 2015 John Soo <jsoo1@asu.edu>
14 ;;; Copyright © 2019 Efraim Flashner <efraim@flashner.co.il>
15 ;;; Copyright © 2019 Alex Griffin <a@ajgrf.com>
16 ;;;
17 ;;; This file is part of GNU Guix.
18 ;;;
19 ;;; GNU Guix is free software; you can redistribute it and/or modify it
20 ;;; under the terms of the GNU General Public License as published by
21 ;;; the Free Software Foundation; either version 3 of the License, or (at
22 ;;; your option) any later version.
23 ;;;
24 ;;; GNU Guix is distributed in the hope that it will be useful, but
25 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
26 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
27 ;;; GNU General Public License for more details.
28 ;;;
29 ;;; You should have received a copy of the GNU General Public License
30 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
31
32 (define-module (gnu packages haskell-apps)
33 #:use-module (guix download)
34 #:use-module (guix git-download)
35 #:use-module (guix packages)
36 #:use-module ((guix licenses) #:prefix license:)
37 #:use-module (guix build-system haskell)
38 #:use-module (gnu packages base)
39 #:use-module (gnu packages curl)
40 #:use-module (gnu packages gl)
41 #:use-module (gnu packages haskell)
42 #:use-module (gnu packages haskell-check)
43 #:use-module (gnu packages haskell-crypto)
44 #:use-module (gnu packages haskell-web)
45 #:use-module (gnu packages haskell-xyz)
46 #:use-module (gnu packages ncurses)
47 #:use-module (gnu packages perl)
48 #:use-module (gnu packages pkg-config)
49 #:use-module (gnu packages rsync)
50 #:use-module (gnu packages version-control))
51
52 ;; In Stackage LTS 14, this package is at 2.4.1.0. However, that
53 ;; version requires version 2.4.1.0 of the 'Cabal' package, which is
54 ;; provided by GHC 8.6.5 at version 2.4.0.1. Hence, we use an older
55 ;; version to match the compiler's library.
56 (define-public cabal-install
57 (package
58 (name "cabal-install")
59 (version "2.4.0.0")
60 (source
61 (origin
62 (method url-fetch)
63 (uri (string-append
64 "https://hackage.haskell.org/package/cabal-install/cabal-install-"
65 version
66 ".tar.gz"))
67 (sha256
68 (base32 "1xmyl0x8wqfrnray6ky5wy0g0samv4264fbdlzxhqsvk9dbfja8k"))))
69 (build-system haskell-build-system)
70 (arguments
71 `(#:cabal-revision
72 ("2" "1xil5pim6j1ckqj61zz6l7xpfxxr3rkw2hvpws2f7pr9shk645dl")
73 #:phases
74 (modify-phases %standard-phases
75 (add-before 'configure 'update-constraints
76 (lambda _
77 (substitute* "cabal-install.cabal"
78 (("zip-archive >= 0\\.3\\.2\\.5 && < 0\\.4,")
79 "zip-archive >= 0.3.2.5 && <= 0.4.1,"))
80 #t)))))
81 (inputs
82 `(("ghc-async" ,ghc-async)
83 ("ghc-base16-bytestring" ,ghc-base16-bytestring)
84 ("ghc-cryptohash-sha256" ,ghc-cryptohash-sha256)
85 ("ghc-echo" ,ghc-echo)
86 ("ghc-edit-distance" ,ghc-edit-distance)
87 ("ghc-hackage-security" ,ghc-hackage-security)
88 ("ghc-hashable" ,ghc-hashable)
89 ("ghc-http" ,ghc-http)
90 ("ghc-network-uri" ,ghc-network-uri)
91 ("ghc-network" ,ghc-network)
92 ("ghc-random" ,ghc-random)
93 ("ghc-resolv" ,ghc-resolv)
94 ("ghc-tar" ,ghc-tar)
95 ("ghc-zip-archive" ,ghc-zip-archive)
96 ("ghc-zlib" ,ghc-zlib)))
97 (home-page "https://www.haskell.org/cabal/")
98 (synopsis "Command-line interface for Cabal and Hackage")
99 (description
100 "The cabal command-line program simplifies the process of managing
101 Haskell software by automating the fetching, configuration, compilation and
102 installation of Haskell libraries and programs.")
103 (license license:bsd-3)))
104
105 (define-public corrode
106 (let ((commit "b6699fb2fa552a07c6091276285a44133e5c9789"))
107 (package
108 (name "corrode")
109 (version (string-append "0.0.1-" (string-take commit 7)))
110 (source
111 (origin
112 (method git-fetch)
113 (uri (git-reference
114 (url "https://github.com/jameysharp/corrode.git")
115 (commit "b6699fb2fa552a07c6091276285a44133e5c9789")))
116 (file-name
117 (string-append name "-" version "-checkout"))
118 (sha256
119 (base32 "02v0yyj6sk4gpg2222wzsdqjxn8w66scbnf6b20x0kbmc69qcz4r"))))
120 (build-system haskell-build-system)
121 (inputs
122 `(("ghc-language-c" ,ghc-language-c)
123 ("ghc-markdown-unlit" ,ghc-markdown-unlit)))
124 (home-page "https://github.com/jameysharp/corrode")
125 (synopsis "Automatic semantics-preserving translation from C to Rust")
126 (description
127 "This program reads a C source file and prints an equivalent module in
128 Rust syntax. It is intended to be useful for two different purposes:
129
130 @enumerate
131 @item Partial automation for migrating legacy code that was implemented in C.
132 @item A new, complementary approach to static analysis for C programs.
133 @end enumerate\n")
134 (license license:gpl2+))))
135
136 (define-public cpphs
137 (package
138 (name "cpphs")
139 (version "1.20.8")
140 (source
141 (origin
142 (method url-fetch)
143 (uri (string-append
144 "https://hackage.haskell.org/package/" name "/"
145 name "-" version ".tar.gz"))
146 (sha256
147 (base32
148 "1bh524asqhk9v1s0wvipl0hgn7l63iy3js867yv0z3h5v2kn8vg5"))))
149 (build-system haskell-build-system)
150 (inputs
151 `(("ghc-polyparse" ,ghc-polyparse)
152 ("ghc-old-locale" ,ghc-old-locale)
153 ("ghc-old-time" ,ghc-old-time)))
154 (home-page "http://projects.haskell.org/cpphs/")
155 (synopsis "Liberalised re-implementation of cpp, the C pre-processor")
156 (description "Cpphs is a re-implementation of the C pre-processor that is
157 both more compatible with Haskell, and itself written in Haskell so that it
158 can be distributed with compilers. This version of the C pre-processor is
159 pretty-much feature-complete and compatible with traditional (K&R)
160 pre-processors. Additional features include: a plain-text mode; an option to
161 unlit literate code files; and an option to turn off macro-expansion.")
162 (license (list license:lgpl2.1+ license:gpl3+))))
163
164 ;; Darcs has no https support: http://irclog.perlgeek.de/darcs/2016-09-17
165 ;; http://darcs.net/manual/Configuring_darcs.html#SECTION00440070000000000000
166 ;; and results of search engines will show that if the protocol is http, https
167 ;; is never mentioned.
168 (define-public darcs
169 (package
170 (name "darcs")
171 (version "2.14.2")
172 (source
173 (origin
174 (method url-fetch)
175 (uri (string-append "https://hackage.haskell.org/package/darcs/"
176 "darcs-" version ".tar.gz"))
177 (sha256
178 (base32
179 "0zm2486gyhiga1amclbg92cd09bvki6vgh0ll75hv5kl72j61lb5"))
180 (modules '((guix build utils)))
181 ;; Remove time-dependent code for reproducibility.
182 (snippet
183 '(begin
184 (substitute* "darcs/darcs.hs"
185 (("__DATE__") "\"1970-01-01\"")
186 (("__TIME__") "\"00:00:00\""))
187 #t))))
188 (build-system haskell-build-system)
189 (arguments
190 `(#:cabal-revision
191 ("1" "0xl7j5cm704pbl2ms0dkydh7jvrz0ym76d725ifpg4h902m1zkhg")
192 #:configure-flags '("-fpkgconfig" "-fcurl" "-flibiconv" "-fthreaded"
193 "-fnetwork-uri" "-fhttp" "--flag=executable"
194 "--flag=library")
195 #:phases
196 (modify-phases %standard-phases
197 (add-after 'patch-source-shebangs 'patch-sh
198 (lambda _
199 (substitute* "tests/issue538.sh"
200 (("/bin/sh") (which "sh")))
201 #t))
202 (add-before 'configure 'update-constraints
203 (lambda _
204 (substitute* "darcs.cabal"
205 (("QuickCheck >= 2\\.8\\.2 && < 2\\.13,")
206 "QuickCheck >= 2.8.2 && < 2.14,"))
207 #t)))))
208 (inputs
209 `(("ghc-cmdargs" ,ghc-cmdargs)
210 ("ghc-split" ,ghc-split)
211 ("ghc-test-framework-quickcheck2" ,ghc-test-framework-quickcheck2)
212 ("ghc-test-framework-hunit" ,ghc-test-framework-hunit)
213 ("ghc-test-framework" ,ghc-test-framework)
214 ("ghc-quickcheck" ,ghc-quickcheck)
215 ("ghc-findbin" ,ghc-findbin)
216 ("ghc-hunit" ,ghc-hunit)
217 ("ghc-async" ,ghc-async)
218 ("ghc-attoparsec" ,ghc-attoparsec)
219 ("ghc-base16-bytestring" ,ghc-base16-bytestring)
220 ("ghc-bytestring-builder" ,ghc-bytestring-builder)
221 ("ghc-cryptohash" ,ghc-cryptohash)
222 ("ghc-data-ordlist" ,ghc-data-ordlist)
223 ("ghc-fgl" ,ghc-fgl)
224 ("ghc-system-filepath" ,ghc-system-filepath)
225 ("ghc-graphviz" ,ghc-graphviz)
226 ("ghc-hashable" ,ghc-hashable)
227 ("ghc-html" ,ghc-html)
228 ("ghc-mmap" ,ghc-mmap)
229 ("ghc-old-time" ,ghc-old-time)
230 ("ghc-random" ,ghc-random)
231 ("ghc-regex-applicative" ,ghc-regex-applicative)
232 ("ghc-regex-compat-tdfa" ,ghc-regex-compat-tdfa)
233 ("ghc-sandi" ,ghc-sandi)
234 ("ghc-shelly" ,ghc-shelly)
235 ("ghc-tar" ,ghc-tar)
236 ("ghc-transformers-compat" ,ghc-transformers-compat)
237 ("ghc-unix-compat" ,ghc-unix-compat)
238 ("ghc-utf8-string" ,ghc-utf8-string)
239 ("ghc-vector" ,ghc-vector)
240 ("ghc-zip-archive" ,ghc-zip-archive)
241 ("ghc-zlib" ,ghc-zlib)
242 ("ghc-http" ,ghc-http)
243 ("curl" ,curl)
244 ("ghc" ,ghc)
245 ("ncurses" ,ncurses)
246 ("perl" ,perl)
247 ("libiconv" ,libiconv)
248 ("ghc-network" ,ghc-network)
249 ("ghc-network-uri" ,ghc-network-uri)))
250 (native-inputs
251 `(("pkg-config" ,pkg-config)))
252 (home-page "http://darcs.net")
253 (synopsis "Distributed Revision Control System")
254 (description
255 "Darcs is a revision control system. It is:
256
257 @enumerate
258 @item Distributed: Every user has access to the full command set, removing boundaries
259 between server and client or committer and non-committers.
260 @item Interactive: Darcs is easy to learn and efficient to use because it asks you
261 questions in response to simple commands, giving you choices in your work flow.
262 You can choose to record one change in a file, while ignoring another. As you update
263 from upstream, you can review each patch name, even the full diff for interesting
264 patches.
265 @item Smart: Originally developed by physicist David Roundy, darcs is based on a
266 unique algebra of patches called @url{http://darcs.net/Theory,Patchtheory}.
267 @end enumerate")
268 (license license:gpl2)))
269
270 (define-public git-annex
271 (package
272 (name "git-annex")
273 (version "7.20200202.7")
274 (source
275 (origin
276 (method url-fetch)
277 (uri (string-append "https://hackage.haskell.org/package/"
278 "git-annex/git-annex-" version ".tar.gz"))
279 (sha256
280 (base32 "1dj1ss7kp82wa0ybilhl88q6w49rj70qh61k2q8qfyx4ghliiigh"))))
281 (build-system haskell-build-system)
282 (arguments
283 `(#:configure-flags
284 '("--flags=-Android -Assistant -Pairing -Webapp -WebDAV")
285 #:phases
286 (modify-phases %standard-phases
287 (add-before 'configure 'patch-shell-for-tests
288 (lambda _
289 ;; Shell.hs defines "/bin/sh" that is used in Git hooks. We
290 ;; shouldn't patch hooks with Guix's current bash because the
291 ;; hooks can exist after that bash is garbage collected, but
292 ;; let's temporarily patch it so that we can run the tests.
293 (copy-file "Utility/Shell.hs" "/tmp/Shell.hs")
294 (substitute* "Utility/Shell.hs"
295 (("/bin/sh") (which "sh")))
296 #t))
297 (add-before 'configure 'factor-setup
298 (lambda _
299 ;; Factor out necessary build logic from the provided
300 ;; `Setup.hs' script. The script as-is does not work because
301 ;; it cannot find its dependencies, and there is no obvious way
302 ;; to tell it where to look. Note that we do not preserve the
303 ;; code that installs man pages here.
304 (call-with-output-file "PreConf.hs"
305 (lambda (out)
306 (format out "import qualified Build.Configure as Configure~%")
307 (format out "main = Configure.run Configure.tests~%")))
308 (call-with-output-file "Setup.hs"
309 (lambda (out)
310 (format out "import Distribution.Simple~%")
311 (format out "main = defaultMain~%")))
312 #t))
313 (add-before 'configure 'pre-configure
314 (lambda _
315 (invoke "runhaskell" "PreConf.hs")
316 #t))
317 (replace 'check
318 (lambda _
319 ;; We need to set the path so that Git recognizes
320 ;; `git annex' as a custom command.
321 (setenv "PATH" (string-append (getenv "PATH") ":"
322 (getcwd) "/dist/build/git-annex"))
323 (with-directory-excursion "dist/build/git-annex"
324 (symlink "git-annex" "git-annex-shell"))
325 (invoke "git-annex" "test")
326 #t))
327 (add-after 'check 'unpatch-shell-and-rebuild
328 (lambda args
329 ;; Undo `patch-shell-for-tests'.
330 (copy-file "/tmp/Shell.hs" "Utility/Shell.hs")
331 (apply (assoc-ref %standard-phases 'build) args)))
332 (add-after 'install 'install-symlinks
333 (lambda* (#:key outputs #:allow-other-keys)
334 (let* ((out (assoc-ref outputs "out"))
335 (bin (string-append out "/bin")))
336 (symlink (string-append bin "/git-annex")
337 (string-append bin "/git-annex-shell"))
338 (symlink (string-append bin "/git-annex")
339 (string-append bin "/git-remote-tor-annex"))
340 #t))))))
341 (inputs
342 `(("curl" ,curl)
343 ("ghc-aeson" ,ghc-aeson)
344 ("ghc-async" ,ghc-async)
345 ("ghc-aws" ,ghc-aws)
346 ("ghc-bloomfilter" ,ghc-bloomfilter)
347 ("ghc-byteable" ,ghc-byteable)
348 ("ghc-case-insensitive" ,ghc-case-insensitive)
349 ("ghc-concurrent-output" ,ghc-concurrent-output)
350 ("ghc-crypto-api" ,ghc-crypto-api)
351 ("ghc-cryptonite" ,ghc-cryptonite)
352 ("ghc-data-default" ,ghc-data-default)
353 ("ghc-disk-free-space" ,ghc-disk-free-space)
354 ("ghc-dlist" ,ghc-dlist)
355 ("ghc-edit-distance" ,ghc-edit-distance)
356 ("ghc-esqueleto" ,ghc-esqueleto)
357 ("ghc-exceptions" ,ghc-exceptions)
358 ("ghc-feed" ,ghc-feed)
359 ("ghc-filepath-bytestring" ,ghc-filepath-bytestring)
360 ("ghc-free" ,ghc-free)
361 ("ghc-hslogger" ,ghc-hslogger)
362 ("ghc-http-client" ,ghc-http-client)
363 ("ghc-http-conduit" ,ghc-http-conduit)
364 ("ghc-http-types" ,ghc-http-types)
365 ("ghc-ifelse" ,ghc-ifelse)
366 ("ghc-magic" ,ghc-magic)
367 ("ghc-memory" ,ghc-memory)
368 ("ghc-monad-control" ,ghc-monad-control)
369 ("ghc-monad-logger" ,ghc-monad-logger)
370 ("ghc-network" ,ghc-network)
371 ("ghc-old-locale" ,ghc-old-locale)
372 ("ghc-optparse-applicative" ,ghc-optparse-applicative)
373 ("ghc-persistent" ,ghc-persistent)
374 ("ghc-persistent-sqlite" ,ghc-persistent-sqlite)
375 ("ghc-persistent-template" ,ghc-persistent-template)
376 ("ghc-quickcheck" ,ghc-quickcheck)
377 ("ghc-random" ,ghc-random)
378 ("ghc-regex-tdfa" ,ghc-regex-tdfa)
379 ("ghc-resourcet" ,ghc-resourcet)
380 ("ghc-safesemaphore" ,ghc-safesemaphore)
381 ("ghc-sandi" ,ghc-sandi)
382 ("ghc-securemem" ,ghc-securemem)
383 ("ghc-socks" ,ghc-socks)
384 ("ghc-split" ,ghc-split)
385 ("ghc-stm-chans" ,ghc-stm-chans)
386 ("ghc-tagsoup" ,ghc-tagsoup)
387 ("ghc-unix-compat" ,ghc-unix-compat)
388 ("ghc-unordered-containers" ,ghc-unordered-containers)
389 ("ghc-utf8-string" ,ghc-utf8-string)
390 ("ghc-uuid" ,ghc-uuid)
391 ("git" ,git)
392 ("rsync" ,rsync)))
393 (native-inputs
394 `(("ghc-tasty" ,ghc-tasty)
395 ("ghc-tasty-hunit" ,ghc-tasty-hunit)
396 ("ghc-tasty-quickcheck" ,ghc-tasty-quickcheck)
397 ("ghc-tasty-rerun" ,ghc-tasty-rerun)))
398 (home-page "https://git-annex.branchable.com/")
399 (synopsis "Manage files with Git, without checking in their contents")
400 (description "This package allows managing files with Git, without
401 checking the file contents into Git. It can store files in many places,
402 such as local hard drives and cloud storage services. It can also be
403 used to keep a folder in sync between computers.")
404 ;; The main author has released all his changes under AGPLv3+ as of March
405 ;; 2019 (7.20190219-187-g40ecf58d4). These are also licensed under the
406 ;; original GPLv3+ license, but going forward new changes will be under
407 ;; only AGPLv3+. The other licenses below cover code written by others.
408 ;; See git-annex's COPYRIGHT file for details on each file.
409 (license (list license:agpl3+
410 license:gpl3+
411 license:bsd-2
412 license:expat
413 license:gpl2))))
414
415 (define-public hlint
416 (package
417 (name "hlint")
418 (version "2.1.26")
419 (source
420 (origin
421 (method url-fetch)
422 (uri (string-append
423 "https://hackage.haskell.org/package/" name
424 "/" name "-" version ".tar.gz"))
425 (sha256
426 (base32
427 "16zkkpbfrd69853cdqf597fva969lirfc86b039i9zd7ghlrcayc"))))
428 (build-system haskell-build-system)
429 (inputs
430 `(("cpphs" ,cpphs)
431 ("ghc-unordered-containers" ,ghc-unordered-containers)
432 ("ghc-yaml" ,ghc-yaml)
433 ("ghc-vector" ,ghc-vector)
434 ("ghc-data-default" ,ghc-data-default)
435 ("ghc-cmdargs" ,ghc-cmdargs)
436 ("ghc-haskell-src-exts" ,ghc-haskell-src-exts)
437 ("ghc-haskell-src-exts-util" ,ghc-haskell-src-exts-util)
438 ("ghc-uniplate" ,ghc-uniplate)
439 ("ghc-ansi-terminal" ,ghc-ansi-terminal)
440 ("ghc-extra" ,ghc-extra)
441 ("ghc-refact" ,ghc-refact)
442 ("ghc-aeson" ,ghc-aeson)
443 ("ghc-lib-parser" ,ghc-lib-parser)
444 ("hscolour" ,hscolour)))
445 (home-page "http://community.haskell.org/~ndm/hlint/")
446 (synopsis "Suggest improvements for Haskell source code")
447 (description "HLint reads Haskell programs and suggests changes that
448 hopefully make them easier to read. HLint also makes it easy to disable
449 unwanted suggestions, and to add your own custom suggestions.")
450 (license license:bsd-3)))
451
452 (define-public hoogle
453 (package
454 (name "hoogle")
455 (version "5.0.17.11")
456 (source
457 (origin
458 (method url-fetch)
459 (uri
460 (string-append
461 "https://hackage.haskell.org/package/hoogle/hoogle-"
462 version ".tar.gz"))
463 (sha256
464 (base32
465 "1svp8z9pad8z2j386pr0dda0ds8ddxab0salnz4gm51q877w93p1"))))
466 (build-system haskell-build-system)
467 (inputs
468 `(("ghc-quickcheck" ,ghc-quickcheck)
469 ("ghc-aeson" ,ghc-aeson)
470 ("ghc-blaze-html" ,ghc-blaze-html)
471 ("ghc-blaze-markup" ,ghc-blaze-markup)
472 ("ghc-cmdargs" ,ghc-cmdargs)
473 ("ghc-conduit" ,ghc-conduit)
474 ("ghc-conduit-extra" ,ghc-conduit-extra)
475 ("ghc-connection" ,ghc-connection)
476 ("ghc-extra" ,ghc-extra)
477 ("ghc-foundation" ,ghc-foundation)
478 ("ghc-old-locale" ,ghc-old-locale)
479 ("ghc-haskell-src-exts" ,ghc-haskell-src-exts)
480 ("ghc-http-conduit" ,ghc-http-conduit)
481 ("ghc-http-types" ,ghc-http-types)
482 ("ghc-js-flot" ,ghc-js-flot)
483 ("ghc-js-jquery" ,ghc-js-jquery)
484 ("ghc-mmap" ,ghc-mmap)
485 ("ghc-process-extras" ,ghc-process-extras)
486 ("ghc-resourcet" ,ghc-resourcet)
487 ("ghc-storable-tuple" ,ghc-storable-tuple)
488 ("ghc-tar" ,ghc-tar)
489 ("ghc-uniplate" ,ghc-uniplate)
490 ("ghc-utf8-string" ,ghc-utf8-string)
491 ("ghc-vector" ,ghc-vector)
492 ("ghc-wai" ,ghc-wai)
493 ("ghc-wai-logger" ,ghc-wai-logger)
494 ("ghc-warp" ,ghc-warp)
495 ("ghc-warp-tls" ,ghc-warp-tls)
496 ("ghc-zlib" ,ghc-zlib)))
497 (home-page "https://hoogle.haskell.org/")
498 (synopsis "Haskell API Search")
499 (description "Hoogle is a Haskell API search engine, which allows
500 you to search many standard Haskell libraries by either function name,
501 or by approximate type signature.")
502 (license license:bsd-3)))
503
504 (define-public hscolour
505 (package
506 (name "hscolour")
507 (version "1.24.4")
508 (source
509 (origin
510 (method url-fetch)
511 (uri (string-append
512 "https://hackage.haskell.org/package/hscolour/hscolour-"
513 version
514 ".tar.gz"))
515 (sha256
516 (base32
517 "079jwph4bwllfp03yfr26s5zc6m6kw3nhb1cggrifh99haq34cr4"))))
518 (build-system haskell-build-system)
519 (home-page "https://hackage.haskell.org/package/hscolour")
520 (synopsis "Script to colourise Haskell code")
521 (description "HSColour is a small Haskell script to colourise Haskell
522 code. It currently has six output formats: ANSI terminal codes (optionally
523 XTerm-256colour codes), HTML 3.2 with font tags, HTML 4.01 with CSS, HTML 4.01
524 with CSS and mouseover annotations, XHTML 1.0 with inline CSS styling, LaTeX,
525 and mIRC chat codes.")
526 (license license:bsd-3)))
527
528 (define-public kmonad
529 (package
530 (name "kmonad")
531 (version "0.3.0")
532 (source
533 (origin
534 (method git-fetch)
535 (uri (git-reference
536 (url "https://github.com/david-janssen/kmonad.git")
537 (commit version)))
538 (file-name (git-file-name name version))
539 (sha256
540 (base32 "1g40nkpldih6h1rlxjx5yf9iavr3qs1f2b6j0gd8135p5hkg8d8n"))))
541 (build-system haskell-build-system)
542 (arguments
543 `(#:phases
544 (modify-phases %standard-phases
545 (delete 'haddock) ; Haddock fails to generate docs
546 (add-after 'install 'install-udev-rules
547 (lambda* (#:key outputs #:allow-other-keys)
548 (let* ((out (assoc-ref outputs "out"))
549 (rules (string-append out "/lib/udev/rules.d")))
550 (mkdir-p rules)
551 (call-with-output-file (string-append rules "/70-kmonad.rules")
552 (lambda (port)
553 (display
554 (string-append
555 "KERNEL==\"uinput\", MODE=\"0660\", "
556 "GROUP=\"input\", OPTIONS+=\"static_node=uinput\"\n")
557 port)))
558 #t)))
559 (add-after 'install-udev-rules 'install-documentation
560 (lambda* (#:key outputs #:allow-other-keys)
561 (let* ((out (assoc-ref outputs "out"))
562 (doc (string-append out "/share/doc/kmonad-" ,version)))
563 (install-file "README.md" doc)
564 (copy-recursively "doc" doc)
565 (copy-recursively "example" (string-append doc "/example"))
566 #t))))))
567 (inputs
568 `(("ghc-cereal" ,ghc-cereal)
569 ("ghc-exceptions" ,ghc-exceptions)
570 ("ghc-hashable" ,ghc-hashable)
571 ("ghc-lens" ,ghc-lens)
572 ("ghc-megaparsec" ,ghc-megaparsec)
573 ("ghc-optparse-applicative" ,ghc-optparse-applicative)
574 ("ghc-unagi-chan" ,ghc-unagi-chan)
575 ("ghc-unliftio" ,ghc-unliftio)
576 ("ghc-unordered-containers" ,ghc-unordered-containers)))
577 (home-page "https://github.com/david-janssen/kmonad")
578 (synopsis "Advanced keyboard manager")
579 (description "KMonad is a keyboard remapping utility that supports
580 advanced functionality, such as custom keymap layers and modifiers, macros,
581 and conditional mappings that send a different keycode when tapped or held.
582 By operating at a lower level than most similar tools, it supports X11,
583 Wayland, and Linux console environments alike.")
584 (license license:expat)))
585
586 (define-public raincat
587 (package
588 (name "raincat")
589 (version "1.2.1")
590 (source
591 (origin
592 (method url-fetch)
593 (uri (string-append "mirror://hackage/package/Raincat/"
594 "Raincat-" version ".tar.gz"))
595 (sha256
596 (base32
597 "10y9zi22m6hf13c9h8zd9vg7mljpwbw0r3djb6r80bna701fdf6c"))))
598 (build-system haskell-build-system)
599 (arguments
600 `(#:phases
601 (modify-phases %standard-phases
602 (add-after 'install 'wrap-executable
603 (lambda* (#:key inputs outputs #:allow-other-keys)
604 (let ((out (assoc-ref outputs "out")))
605 (wrap-program (string-append out "/bin/raincat")
606 `("LD_LIBRARY_PATH" ":" =
607 (,(string-append (assoc-ref inputs "freeglut")
608 "/lib"))))
609 #t))))))
610 (inputs
611 `(("ghc-extensible-exceptions" ,ghc-extensible-exceptions)
612 ("ghc-random" ,ghc-random)
613 ("ghc-glut" ,ghc-glut)
614 ("freeglut" ,freeglut)
615 ("ghc-opengl" ,ghc-opengl)
616 ("ghc-sdl2" ,ghc-sdl2)
617 ("ghc-sdl2-image" ,ghc-sdl2-image)
618 ("ghc-sdl2-mixer" ,ghc-sdl2-mixer)))
619 (home-page "http://www.bysusanlin.com/raincat/")
620 (synopsis "Puzzle game with a cat in lead role")
621 (description "Project Raincat is a game developed by Carnegie Mellon
622 students through GCS during the Fall 2008 semester. Raincat features game
623 play inspired from classics Lemmings and The Incredible Machine. The project
624 proved to be an excellent learning experience for the programmers. Everything
625 is programmed in Haskell.")
626 (license license:bsd-3)))
627
628 (define-public scroll
629 (package
630 (name "scroll")
631 (version "1.20180421")
632 (source
633 (origin
634 (method url-fetch)
635 (uri (string-append
636 "https://hackage.haskell.org/package/scroll/scroll-"
637 version ".tar.gz"))
638 (sha256
639 (base32
640 "0apzrvf99rskj4dbmn57jjxrsf19j436s8a09m950df5aws3a0wj"))))
641 (build-system haskell-build-system)
642 (inputs
643 `(("ghc-case-insensitive" ,ghc-case-insensitive)
644 ("ghc-data-default" ,ghc-data-default)
645 ("ghc-ifelse" ,ghc-ifelse)
646 ("ghc-monad-loops" ,ghc-monad-loops)
647 ("ghc-ncurses" ,ghc-ncurses)
648 ("ghc-optparse-applicative" ,ghc-optparse-applicative)
649 ("ghc-random" ,ghc-random)
650 ("ghc-vector" ,ghc-vector)))
651 (home-page "https://joeyh.name/code/scroll/")
652 (synopsis "scroll(6), a roguelike game")
653 (description
654 "You're a bookworm that's stuck on a scroll. You have to dodge between
655 words and use spells to make your way down the page as the scroll is read. Go
656 too slow and you'll get wound up in the scroll and crushed.")
657 (license license:gpl2)))
658
659 (define-public shellcheck
660 (package
661 (name "shellcheck")
662 (version "0.7.0")
663 (source
664 (origin
665 (method url-fetch)
666 (uri (string-append
667 "https://hackage.haskell.org/package/ShellCheck/ShellCheck-"
668 version ".tar.gz"))
669 (sha256
670 (base32 "1vx895cp5k5h0680xfwj74lk97m9y627n965x6srds0gfnbkzy9s"))
671 (file-name (string-append name "-" version ".tar.gz"))))
672 (build-system haskell-build-system)
673 (inputs
674 `(("ghc-aeson" ,ghc-aeson)
675 ("ghc-diff" ,ghc-diff)
676 ("ghc-quickcheck" ,ghc-quickcheck)
677 ("ghc-regex-tdfa" ,ghc-regex-tdfa)))
678 (home-page "https://github.com/koalaman/shellcheck")
679 (synopsis "Static analysis for shell scripts")
680 (description "@code{shellcheck} provides static analysis for
681 @command{bash} and @command{sh} shell scripts.
682 It gives warnings and suggestions in order to:
683
684 @enumerate
685 @item Point out and clarify typical beginner's syntax issues that cause
686 a shell to give cryptic error messages.
687 @item Point out and clarify typical intermediate level semantic problems
688 that cause a shell to behave strangely and counter-intuitively.
689 @item Point out subtle caveats, corner cases and pitfalls that may cause an
690 advanced user's otherwise working script to fail under future circumstances.
691 @end enumerate")
692 (license license:gpl3+)))
693
694 (define-public stylish-haskell
695 (package
696 (name "stylish-haskell")
697 (version "0.9.2.2")
698 (source
699 (origin
700 (method url-fetch)
701 (uri
702 (string-append
703 "mirror://hackage/package/stylish-haskell/"
704 "stylish-haskell-" version ".tar.gz"))
705 (sha256
706 (base32
707 "1zs624xqp6j8vrl6pfv18dm8vz8hvz25grri65ximxhcizgwhnax"))))
708 (build-system haskell-build-system)
709 (inputs
710 `(("ghc-aeson" ,ghc-aeson)
711 ("ghc-file-embed" ,ghc-file-embed)
712 ("ghc-haskell-src-exts" ,ghc-haskell-src-exts)
713 ("ghc-semigroups" ,ghc-semigroups)
714 ("ghc-syb" ,ghc-syb)
715 ("ghc-yaml" ,ghc-yaml)
716 ("ghc-strict" ,ghc-strict)
717 ("ghc-optparse-applicative" ,ghc-optparse-applicative)
718 ("ghc-hunit" ,ghc-hunit)
719 ("ghc-test-framework" ,ghc-test-framework)
720 ("ghc-test-framework-hunit" ,ghc-test-framework-hunit)))
721 (home-page "https://github.com/jaspervdj/stylish-haskell")
722 (synopsis "Haskell code prettifier")
723 (description
724 "A simple Haskell code prettifier. The goal is not to format all of the
725 code in a file, just clean up import statements and a few other tedious
726 items. This tool tries to help where necessary without getting in the way.")
727 (license license:bsd-3)))