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