gnu: cabal-install: Update to 2.4.0.0.
[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 `(#:configure-flags '("-fpkgconfig" "-fcurl" "-flibiconv" "-fthreaded"
191 "-fnetwork-uri" "-fhttp" "--flag=executable"
192 "--flag=library")
193 #:phases
194 (modify-phases %standard-phases
195 (add-after 'patch-source-shebangs 'patch-sh
196 (lambda _
197 (substitute* "tests/issue538.sh"
198 (("/bin/sh") (which "sh")))
199 #t)))))
200 (inputs
201 `(("ghc-cmdargs" ,ghc-cmdargs)
202 ("ghc-split" ,ghc-split)
203 ("ghc-test-framework-quickcheck2" ,ghc-test-framework-quickcheck2)
204 ("ghc-test-framework-hunit" ,ghc-test-framework-hunit)
205 ("ghc-test-framework" ,ghc-test-framework)
206 ("ghc-quickcheck" ,ghc-quickcheck)
207 ("ghc-findbin" ,ghc-findbin)
208 ("ghc-hunit" ,ghc-hunit)
209 ("ghc-async" ,ghc-async)
210 ("ghc-attoparsec" ,ghc-attoparsec)
211 ("ghc-base16-bytestring" ,ghc-base16-bytestring)
212 ("ghc-bytestring-builder" ,ghc-bytestring-builder)
213 ("ghc-cryptohash" ,ghc-cryptohash)
214 ("ghc-data-ordlist" ,ghc-data-ordlist)
215 ("ghc-fgl" ,ghc-fgl)
216 ("ghc-system-filepath" ,ghc-system-filepath)
217 ("ghc-graphviz" ,ghc-graphviz)
218 ("ghc-hashable" ,ghc-hashable)
219 ("ghc-html" ,ghc-html)
220 ("ghc-mmap" ,ghc-mmap)
221 ("ghc-old-time" ,ghc-old-time)
222 ("ghc-random" ,ghc-random)
223 ("ghc-regex-applicative" ,ghc-regex-applicative)
224 ("ghc-regex-compat-tdfa" ,ghc-regex-compat-tdfa)
225 ("ghc-sandi" ,ghc-sandi)
226 ("ghc-shelly" ,ghc-shelly)
227 ("ghc-tar" ,ghc-tar)
228 ("ghc-transformers-compat" ,ghc-transformers-compat)
229 ("ghc-unix-compat" ,ghc-unix-compat)
230 ("ghc-utf8-string" ,ghc-utf8-string)
231 ("ghc-vector" ,ghc-vector)
232 ("ghc-zip-archive" ,ghc-zip-archive)
233 ("ghc-zlib" ,ghc-zlib)
234 ("ghc-http" ,ghc-http)
235 ("curl" ,curl)
236 ("ghc" ,ghc)
237 ("ncurses" ,ncurses)
238 ("perl" ,perl)
239 ("libiconv" ,libiconv)
240 ("ghc-network" ,ghc-network)
241 ("ghc-network-uri" ,ghc-network-uri)))
242 (native-inputs
243 `(("pkg-config" ,pkg-config)))
244 (home-page "http://darcs.net")
245 (synopsis "Distributed Revision Control System")
246 (description
247 "Darcs is a revision control system. It is:
248
249 @enumerate
250 @item Distributed: Every user has access to the full command set, removing boundaries
251 between server and client or committer and non-committers.
252 @item Interactive: Darcs is easy to learn and efficient to use because it asks you
253 questions in response to simple commands, giving you choices in your work flow.
254 You can choose to record one change in a file, while ignoring another. As you update
255 from upstream, you can review each patch name, even the full diff for interesting
256 patches.
257 @item Smart: Originally developed by physicist David Roundy, darcs is based on a
258 unique algebra of patches called @url{http://darcs.net/Theory,Patchtheory}.
259 @end enumerate")
260 (license license:gpl2)))
261
262 (define-public git-annex
263 (package
264 (name "git-annex")
265 (version "7.20191114")
266 (source
267 (origin
268 (method url-fetch)
269 (uri (string-append "https://hackage.haskell.org/package/"
270 "git-annex/git-annex-" version ".tar.gz"))
271 (sha256
272 (base32 "1afrn5g3b80f3n6ncfph6pmf9jdpc7a6ay55k2pmkn96pyv4hfmm"))))
273 (build-system haskell-build-system)
274 (arguments
275 `(#:configure-flags
276 '("--flags=-Android -Assistant -Pairing -Webapp -WebDAV")
277 #:phases
278 (modify-phases %standard-phases
279 (add-before 'configure 'patch-shell-for-tests
280 (lambda _
281 ;; Shell.hs defines "/bin/sh" that is used in Git hooks. We
282 ;; shouldn't patch hooks with Guix's current bash because the
283 ;; hooks can exist after that bash is garbage collected, but
284 ;; let's temporarily patch it so that we can run the tests.
285 (copy-file "Utility/Shell.hs" "/tmp/Shell.hs")
286 (substitute* "Utility/Shell.hs"
287 (("/bin/sh") (which "sh")))
288 #t))
289 (add-before 'configure 'factor-setup
290 (lambda _
291 ;; Factor out necessary build logic from the provided
292 ;; `Setup.hs' script. The script as-is does not work because
293 ;; it cannot find its dependencies, and there is no obvious way
294 ;; to tell it where to look. Note that we do not preserve the
295 ;; code that installs man pages here.
296 (call-with-output-file "PreConf.hs"
297 (lambda (out)
298 (format out "import qualified Build.Configure as Configure~%")
299 (format out "main = Configure.run Configure.tests~%")))
300 (call-with-output-file "Setup.hs"
301 (lambda (out)
302 (format out "import Distribution.Simple~%")
303 (format out "main = defaultMain~%")))
304 #t))
305 (add-before 'configure 'pre-configure
306 (lambda _
307 (invoke "runhaskell" "PreConf.hs")
308 #t))
309 (replace 'check
310 (lambda _
311 ;; We need to set the path so that Git recognizes
312 ;; `git annex' as a custom command.
313 (setenv "PATH" (string-append (getenv "PATH") ":"
314 (getcwd) "/dist/build/git-annex"))
315 (with-directory-excursion "dist/build/git-annex"
316 (symlink "git-annex" "git-annex-shell"))
317 (invoke "git-annex" "test")
318 #t))
319 (add-after 'check 'unpatch-shell-and-rebuild
320 (lambda args
321 ;; Undo `patch-shell-for-tests'.
322 (copy-file "/tmp/Shell.hs" "Utility/Shell.hs")
323 (apply (assoc-ref %standard-phases 'build) args)))
324 (add-after 'install 'install-symlinks
325 (lambda* (#:key outputs #:allow-other-keys)
326 (let* ((out (assoc-ref outputs "out"))
327 (bin (string-append out "/bin")))
328 (symlink (string-append bin "/git-annex")
329 (string-append bin "/git-annex-shell"))
330 (symlink (string-append bin "/git-annex")
331 (string-append bin "/git-remote-tor-annex"))
332 #t))))))
333 (inputs
334 `(("curl" ,curl)
335 ("ghc-aeson" ,ghc-aeson)
336 ("ghc-async" ,ghc-async)
337 ("ghc-aws" ,ghc-aws)
338 ("ghc-bloomfilter" ,ghc-bloomfilter)
339 ("ghc-byteable" ,ghc-byteable)
340 ("ghc-case-insensitive" ,ghc-case-insensitive)
341 ("ghc-concurrent-output" ,ghc-concurrent-output)
342 ("ghc-crypto-api" ,ghc-crypto-api)
343 ("ghc-cryptonite" ,ghc-cryptonite)
344 ("ghc-data-default" ,ghc-data-default)
345 ("ghc-disk-free-space" ,ghc-disk-free-space)
346 ("ghc-dlist" ,ghc-dlist)
347 ("ghc-edit-distance" ,ghc-edit-distance)
348 ("ghc-esqueleto" ,ghc-esqueleto)
349 ("ghc-exceptions" ,ghc-exceptions)
350 ("ghc-feed" ,ghc-feed)
351 ("ghc-free" ,ghc-free)
352 ("ghc-hslogger" ,ghc-hslogger)
353 ("ghc-http-client" ,ghc-http-client)
354 ("ghc-http-conduit" ,ghc-http-conduit)
355 ("ghc-http-types" ,ghc-http-types)
356 ("ghc-ifelse" ,ghc-ifelse)
357 ("ghc-magic" ,ghc-magic)
358 ("ghc-memory" ,ghc-memory)
359 ("ghc-monad-control" ,ghc-monad-control)
360 ("ghc-monad-logger" ,ghc-monad-logger)
361 ("ghc-network" ,ghc-network)
362 ("ghc-old-locale" ,ghc-old-locale)
363 ("ghc-optparse-applicative" ,ghc-optparse-applicative)
364 ("ghc-persistent" ,ghc-persistent)
365 ("ghc-persistent-sqlite" ,ghc-persistent-sqlite)
366 ("ghc-persistent-template" ,ghc-persistent-template)
367 ("ghc-quickcheck" ,ghc-quickcheck)
368 ("ghc-random" ,ghc-random)
369 ("ghc-regex-tdfa" ,ghc-regex-tdfa)
370 ("ghc-resourcet" ,ghc-resourcet)
371 ("ghc-safesemaphore" ,ghc-safesemaphore)
372 ("ghc-sandi" ,ghc-sandi)
373 ("ghc-securemem" ,ghc-securemem)
374 ("ghc-socks" ,ghc-socks)
375 ("ghc-split" ,ghc-split)
376 ("ghc-stm-chans" ,ghc-stm-chans)
377 ("ghc-tagsoup" ,ghc-tagsoup)
378 ("ghc-unix-compat" ,ghc-unix-compat)
379 ("ghc-unordered-containers" ,ghc-unordered-containers)
380 ("ghc-utf8-string" ,ghc-utf8-string)
381 ("ghc-uuid" ,ghc-uuid)
382 ("git" ,git)
383 ("rsync" ,rsync)))
384 (native-inputs
385 `(("ghc-tasty" ,ghc-tasty)
386 ("ghc-tasty-hunit" ,ghc-tasty-hunit)
387 ("ghc-tasty-quickcheck" ,ghc-tasty-quickcheck)
388 ("ghc-tasty-rerun" ,ghc-tasty-rerun)))
389 (home-page "https://git-annex.branchable.com/")
390 (synopsis "Manage files with Git, without checking in their contents")
391 (description "This package allows managing files with Git, without
392 checking the file contents into Git. It can store files in many places,
393 such as local hard drives and cloud storage services. It can also be
394 used to keep a folder in sync between computers.")
395 ;; The main author has released all his changes under AGPLv3+ as of March
396 ;; 2019 (7.20190219-187-g40ecf58d4). These are also licensed under the
397 ;; original GPLv3+ license, but going forward new changes will be under
398 ;; only AGPLv3+. The other licenses below cover code written by others.
399 ;; See git-annex's COPYRIGHT file for details on each file.
400 (license (list license:agpl3+
401 license:gpl3+
402 license:bsd-2
403 license:expat
404 license:gpl2))))
405
406 (define-public hlint
407 (package
408 (name "hlint")
409 (version "2.1.26")
410 (source
411 (origin
412 (method url-fetch)
413 (uri (string-append
414 "https://hackage.haskell.org/package/" name
415 "/" name "-" version ".tar.gz"))
416 (sha256
417 (base32
418 "16zkkpbfrd69853cdqf597fva969lirfc86b039i9zd7ghlrcayc"))))
419 (build-system haskell-build-system)
420 (inputs
421 `(("cpphs" ,cpphs)
422 ("ghc-unordered-containers" ,ghc-unordered-containers)
423 ("ghc-yaml" ,ghc-yaml)
424 ("ghc-vector" ,ghc-vector)
425 ("ghc-data-default" ,ghc-data-default)
426 ("ghc-cmdargs" ,ghc-cmdargs)
427 ("ghc-haskell-src-exts" ,ghc-haskell-src-exts)
428 ("ghc-haskell-src-exts-util" ,ghc-haskell-src-exts-util)
429 ("ghc-uniplate" ,ghc-uniplate)
430 ("ghc-ansi-terminal" ,ghc-ansi-terminal)
431 ("ghc-extra" ,ghc-extra)
432 ("ghc-refact" ,ghc-refact)
433 ("ghc-aeson" ,ghc-aeson)
434 ("ghc-lib-parser" ,ghc-lib-parser)
435 ("hscolour" ,hscolour)))
436 (home-page "http://community.haskell.org/~ndm/hlint/")
437 (synopsis "Suggest improvements for Haskell source code")
438 (description "HLint reads Haskell programs and suggests changes that
439 hopefully make them easier to read. HLint also makes it easy to disable
440 unwanted suggestions, and to add your own custom suggestions.")
441 (license license:bsd-3)))
442
443 (define-public hoogle
444 (package
445 (name "hoogle")
446 (version "5.0.17.3")
447 (source
448 (origin
449 (method url-fetch)
450 (uri
451 (string-append
452 "https://hackage.haskell.org/package/hoogle/hoogle-"
453 version ".tar.gz"))
454 (sha256
455 (base32
456 "174gp41v0krzj37m75pnr3aawyhkbk2wq4q6zk2z3zh0avvvmgk6"))))
457 (build-system haskell-build-system)
458 (inputs
459 `(("ghc-network-uri" ,ghc-network-uri)
460 ("ghc-network" ,ghc-network)
461 ("ghc-quickcheck" ,ghc-quickcheck)
462 ("ghc-aeson" ,ghc-aeson)
463 ("ghc-cmdargs" ,ghc-cmdargs)
464 ("ghc-conduit" ,ghc-conduit)
465 ("ghc-conduit-extra" ,ghc-conduit-extra)
466 ("ghc-connection" ,ghc-connection)
467 ("ghc-extra" ,ghc-extra)
468 ("ghc-old-locale" ,ghc-old-locale)
469 ("ghc-haskell-src-exts" ,ghc-haskell-src-exts)
470 ("ghc-http-conduit" ,ghc-http-conduit)
471 ("ghc-http-types" ,ghc-http-types)
472 ("ghc-js-flot" ,ghc-js-flot)
473 ("ghc-js-jquery" ,ghc-js-jquery)
474 ("ghc-mmap" ,ghc-mmap)
475 ("ghc-process-extras" ,ghc-process-extras)
476 ("ghc-resourcet" ,ghc-resourcet)
477 ("ghc-storable-tuple" ,ghc-storable-tuple)
478 ("ghc-tar" ,ghc-tar)
479 ("ghc-uniplate" ,ghc-uniplate)
480 ("ghc-utf8-string" ,ghc-utf8-string)
481 ("ghc-vector" ,ghc-vector)
482 ("ghc-wai" ,ghc-wai)
483 ("ghc-wai-logger" ,ghc-wai-logger)
484 ("ghc-warp" ,ghc-warp)
485 ("ghc-warp-tls" ,ghc-warp-tls)
486 ("ghc-zlib" ,ghc-zlib)))
487 (home-page "https://hoogle.haskell.org/")
488 (synopsis "Haskell API Search")
489 (description "Hoogle is a Haskell API search engine, which allows
490 you to search many standard Haskell libraries by either function name,
491 or by approximate type signature.")
492 (license license:bsd-3)))
493
494 (define-public hscolour
495 (package
496 (name "hscolour")
497 (version "1.24.4")
498 (source
499 (origin
500 (method url-fetch)
501 (uri (string-append
502 "https://hackage.haskell.org/package/hscolour/hscolour-"
503 version
504 ".tar.gz"))
505 (sha256
506 (base32
507 "079jwph4bwllfp03yfr26s5zc6m6kw3nhb1cggrifh99haq34cr4"))))
508 (build-system haskell-build-system)
509 (home-page "https://hackage.haskell.org/package/hscolour")
510 (synopsis "Script to colourise Haskell code")
511 (description "HSColour is a small Haskell script to colourise Haskell
512 code. It currently has six output formats: ANSI terminal codes (optionally
513 XTerm-256colour codes), HTML 3.2 with font tags, HTML 4.01 with CSS, HTML 4.01
514 with CSS and mouseover annotations, XHTML 1.0 with inline CSS styling, LaTeX,
515 and mIRC chat codes.")
516 (license license:bsd-3)))
517
518 (define-public kmonad
519 (package
520 (name "kmonad")
521 (version "0.2.0")
522 (source
523 (origin
524 (method git-fetch)
525 (uri (git-reference
526 (url "https://github.com/david-janssen/kmonad.git")
527 (commit "06d7b8c709efa695be35df9bde91275cbb2ba099")))
528 (file-name (git-file-name name version))
529 (sha256
530 (base32 "1rjr4h5yq63x3kad6yn4p8v26389sd9dgr5n2w73s1chafapzwwd"))))
531 (build-system haskell-build-system)
532 (arguments
533 `(#:phases
534 (modify-phases %standard-phases
535 (delete 'haddock) ; Haddock fails to generate docs
536 (add-after 'install 'install-udev-rules
537 (lambda* (#:key outputs #:allow-other-keys)
538 (let* ((out (assoc-ref outputs "out"))
539 (rules (string-append out "/lib/udev/rules.d")))
540 (mkdir-p rules)
541 (call-with-output-file (string-append rules "/70-kmonad.rules")
542 (lambda (port)
543 (display
544 (string-append
545 "KERNEL==\"uinput\", MODE=\"0660\", "
546 "GROUP=\"input\", OPTIONS+=\"static_node=uinput\"\n")
547 port)))
548 #t)))
549 (add-after 'install-udev-rules 'install-documentation
550 (lambda* (#:key outputs #:allow-other-keys)
551 (let* ((out (assoc-ref outputs "out"))
552 (doc (string-append out "/share/doc/kmonad-" ,version)))
553 (install-file "README.md" doc)
554 (copy-recursively "doc" doc)
555 (copy-recursively "example" (string-append doc "/example"))
556 #t))))))
557 (inputs
558 `(("ghc-cereal" ,ghc-cereal)
559 ("ghc-exceptions" ,ghc-exceptions)
560 ("ghc-hashable" ,ghc-hashable)
561 ("ghc-lens" ,ghc-lens)
562 ("ghc-megaparsec" ,ghc-megaparsec)
563 ("ghc-optparse-applicative" ,ghc-optparse-applicative)
564 ("ghc-unagi-chan" ,ghc-unagi-chan)
565 ("ghc-unliftio" ,ghc-unliftio)
566 ("ghc-unordered-containers" ,ghc-unordered-containers)))
567 (home-page "https://github.com/david-janssen/kmonad")
568 (synopsis "Advanced keyboard manager")
569 (description "KMonad is a keyboard remapping utility that supports
570 advanced functionality, such as custom keymap layers and modifiers, macros,
571 and conditional mappings that send a different keycode when tapped or held.
572 By operating at a lower level than most similar tools, it supports X11,
573 Wayland, and Linux console environments alike.")
574 (license license:expat)))
575
576 (define-public raincat
577 (package
578 (name "raincat")
579 (version "1.2.1")
580 (source
581 (origin
582 (method url-fetch)
583 (uri (string-append "mirror://hackage/package/Raincat/"
584 "Raincat-" version ".tar.gz"))
585 (sha256
586 (base32
587 "10y9zi22m6hf13c9h8zd9vg7mljpwbw0r3djb6r80bna701fdf6c"))))
588 (build-system haskell-build-system)
589 (arguments
590 `(#:phases
591 (modify-phases %standard-phases
592 (add-after 'install 'wrap-executable
593 (lambda* (#:key inputs outputs #:allow-other-keys)
594 (let ((out (assoc-ref outputs "out")))
595 (wrap-program (string-append out "/bin/raincat")
596 `("LD_LIBRARY_PATH" ":" =
597 (,(string-append (assoc-ref inputs "freeglut")
598 "/lib"))))
599 #t))))))
600 (inputs
601 `(("ghc-extensible-exceptions" ,ghc-extensible-exceptions)
602 ("ghc-random" ,ghc-random)
603 ("ghc-glut" ,ghc-glut)
604 ("freeglut" ,freeglut)
605 ("ghc-opengl" ,ghc-opengl)
606 ("ghc-sdl2" ,ghc-sdl2)
607 ("ghc-sdl2-image" ,ghc-sdl2-image)
608 ("ghc-sdl2-mixer" ,ghc-sdl2-mixer)))
609 (home-page "http://www.bysusanlin.com/raincat/")
610 (synopsis "Puzzle game with a cat in lead role")
611 (description "Project Raincat is a game developed by Carnegie Mellon
612 students through GCS during the Fall 2008 semester. Raincat features game
613 play inspired from classics Lemmings and The Incredible Machine. The project
614 proved to be an excellent learning experience for the programmers. Everything
615 is programmed in Haskell.")
616 (license license:bsd-3)))
617
618 (define-public scroll
619 (package
620 (name "scroll")
621 (version "1.20180421")
622 (source
623 (origin
624 (method url-fetch)
625 (uri (string-append
626 "https://hackage.haskell.org/package/scroll/scroll-"
627 version ".tar.gz"))
628 (sha256
629 (base32
630 "0apzrvf99rskj4dbmn57jjxrsf19j436s8a09m950df5aws3a0wj"))))
631 (build-system haskell-build-system)
632 (inputs
633 `(("ghc-case-insensitive" ,ghc-case-insensitive)
634 ("ghc-data-default" ,ghc-data-default)
635 ("ghc-ifelse" ,ghc-ifelse)
636 ("ghc-monad-loops" ,ghc-monad-loops)
637 ("ghc-ncurses" ,ghc-ncurses)
638 ("ghc-optparse-applicative" ,ghc-optparse-applicative)
639 ("ghc-random" ,ghc-random)
640 ("ghc-vector" ,ghc-vector)))
641 (home-page "https://joeyh.name/code/scroll/")
642 (synopsis "scroll(6), a roguelike game")
643 (description
644 "You're a bookworm that's stuck on a scroll. You have to dodge between
645 words and use spells to make your way down the page as the scroll is read. Go
646 too slow and you'll get wound up in the scroll and crushed.")
647 (license license:gpl2)))
648
649 (define-public shellcheck
650 (package
651 (name "shellcheck")
652 (version "0.7.0")
653 (source
654 (origin
655 (method url-fetch)
656 (uri (string-append
657 "https://hackage.haskell.org/package/ShellCheck/ShellCheck-"
658 version ".tar.gz"))
659 (sha256
660 (base32 "1vx895cp5k5h0680xfwj74lk97m9y627n965x6srds0gfnbkzy9s"))
661 (file-name (string-append name "-" version ".tar.gz"))))
662 (build-system haskell-build-system)
663 (inputs
664 `(("ghc-aeson" ,ghc-aeson)
665 ("ghc-diff" ,ghc-diff)
666 ("ghc-quickcheck" ,ghc-quickcheck)
667 ("ghc-regex-tdfa" ,ghc-regex-tdfa)))
668 (home-page "https://github.com/koalaman/shellcheck")
669 (synopsis "Static analysis for shell scripts")
670 (description "@code{shellcheck} provides static analysis for
671 @command{bash} and @command{sh} shell scripts.
672 It gives warnings and suggestions in order to:
673
674 @enumerate
675 @item Point out and clarify typical beginner's syntax issues that cause
676 a shell to give cryptic error messages.
677 @item Point out and clarify typical intermediate level semantic problems
678 that cause a shell to behave strangely and counter-intuitively.
679 @item Point out subtle caveats, corner cases and pitfalls that may cause an
680 advanced user's otherwise working script to fail under future circumstances.
681 @end enumerate")
682 (license license:gpl3+)))
683
684 (define-public stylish-haskell
685 (package
686 (name "stylish-haskell")
687 (version "0.9.2.2")
688 (source
689 (origin
690 (method url-fetch)
691 (uri
692 (string-append
693 "mirror://hackage/package/stylish-haskell/"
694 "stylish-haskell-" version ".tar.gz"))
695 (sha256
696 (base32
697 "1zs624xqp6j8vrl6pfv18dm8vz8hvz25grri65ximxhcizgwhnax"))))
698 (build-system haskell-build-system)
699 (inputs
700 `(("ghc-aeson" ,ghc-aeson)
701 ("ghc-file-embed" ,ghc-file-embed)
702 ("ghc-haskell-src-exts" ,ghc-haskell-src-exts)
703 ("ghc-semigroups" ,ghc-semigroups)
704 ("ghc-syb" ,ghc-syb)
705 ("ghc-yaml" ,ghc-yaml)
706 ("ghc-strict" ,ghc-strict)
707 ("ghc-optparse-applicative" ,ghc-optparse-applicative)
708 ("ghc-hunit" ,ghc-hunit)
709 ("ghc-test-framework" ,ghc-test-framework)
710 ("ghc-test-framework-hunit" ,ghc-test-framework-hunit)))
711 (home-page "https://github.com/jaspervdj/stylish-haskell")
712 (synopsis "Haskell code prettifier")
713 (description
714 "A simple Haskell code prettifier. The goal is not to format all of the
715 code in a file, just clean up import statements and a few other tedious
716 items. This tool tries to help where necessary without getting in the way.")
717 (license license:bsd-3)))