gnu: Add ghcid.
[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
LC
3;;; Copyright © 2015, 2017, 2018 Ricardo Wurmus <rekado@elephly.net>
4;;; Copyright © 2016, 2017, 2018 ng0 <ng0@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>
3d45d8f1 12;;; Copyright © 2019 Kyle Meyer <kyle@kyleam.com>
6ec2450f 13;;; Copyright © 2015 John Soo <jsoo1@asu.edu>
ac1b0801 14;;; Copyright © 2019 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>
804744b3
LC
17;;;
18;;; This file is part of GNU Guix.
19;;;
20;;; GNU Guix is free software; you can redistribute it and/or modify it
21;;; under the terms of the GNU General Public License as published by
22;;; the Free Software Foundation; either version 3 of the License, or (at
23;;; your option) any later version.
24;;;
25;;; GNU Guix is distributed in the hope that it will be useful, but
26;;; WITHOUT ANY WARRANTY; without even the implied warranty of
27;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
28;;; GNU General Public License for more details.
29;;;
30;;; You should have received a copy of the GNU General Public License
31;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
32
33(define-module (gnu packages haskell-apps)
34 #:use-module (guix download)
62e42dfa 35 #:use-module (guix git-download)
804744b3
LC
36 #:use-module (guix packages)
37 #:use-module ((guix licenses) #:prefix license:)
38 #:use-module (guix build-system haskell)
39 #:use-module (gnu packages base)
40 #:use-module (gnu packages curl)
bfccae4e 41 #:use-module (gnu packages gl)
804744b3
LC
42 #:use-module (gnu packages haskell)
43 #:use-module (gnu packages haskell-check)
44 #:use-module (gnu packages haskell-crypto)
45 #:use-module (gnu packages haskell-web)
dddbc90c 46 #:use-module (gnu packages haskell-xyz)
804744b3
LC
47 #:use-module (gnu packages ncurses)
48 #:use-module (gnu packages perl)
49 #:use-module (gnu packages pkg-config)
50 #:use-module (gnu packages rsync)
51 #:use-module (gnu packages version-control))
52
841f1954
TS
53;; In Stackage LTS 14, this package is at 2.4.1.0. However, that
54;; version requires version 2.4.1.0 of the 'Cabal' package, which is
55;; provided by GHC 8.6.5 at version 2.4.0.1. Hence, we use an older
56;; version to match the compiler's library.
62e42dfa
RV
57(define-public cabal-install
58 (package
59 (name "cabal-install")
841f1954 60 (version "2.4.0.0")
62e42dfa
RV
61 (source
62 (origin
63 (method url-fetch)
64 (uri (string-append
65 "https://hackage.haskell.org/package/cabal-install/cabal-install-"
66 version
67 ".tar.gz"))
68 (sha256
841f1954 69 (base32 "1xmyl0x8wqfrnray6ky5wy0g0samv4264fbdlzxhqsvk9dbfja8k"))))
62e42dfa 70 (build-system haskell-build-system)
841f1954
TS
71 (arguments
72 `(#:cabal-revision
73 ("2" "1xil5pim6j1ckqj61zz6l7xpfxxr3rkw2hvpws2f7pr9shk645dl")
74 #:phases
75 (modify-phases %standard-phases
76 (add-before 'configure 'update-constraints
77 (lambda _
78 (substitute* "cabal-install.cabal"
79 (("zip-archive >= 0\\.3\\.2\\.5 && < 0\\.4,")
80 "zip-archive >= 0.3.2.5 && <= 0.4.1,"))
81 #t)))))
62e42dfa
RV
82 (inputs
83 `(("ghc-async" ,ghc-async)
84 ("ghc-base16-bytestring" ,ghc-base16-bytestring)
85 ("ghc-cryptohash-sha256" ,ghc-cryptohash-sha256)
86 ("ghc-echo" ,ghc-echo)
87 ("ghc-edit-distance" ,ghc-edit-distance)
88 ("ghc-hackage-security" ,ghc-hackage-security)
89 ("ghc-hashable" ,ghc-hashable)
90 ("ghc-http" ,ghc-http)
91 ("ghc-network-uri" ,ghc-network-uri)
92 ("ghc-network" ,ghc-network)
93 ("ghc-random" ,ghc-random)
94 ("ghc-resolv" ,ghc-resolv)
95 ("ghc-tar" ,ghc-tar)
841f1954 96 ("ghc-zip-archive" ,ghc-zip-archive)
62e42dfa
RV
97 ("ghc-zlib" ,ghc-zlib)))
98 (home-page "https://www.haskell.org/cabal/")
99 (synopsis "Command-line interface for Cabal and Hackage")
100 (description
101 "The cabal command-line program simplifies the process of managing
102Haskell software by automating the fetching, configuration, compilation and
103installation of Haskell libraries and programs.")
104 (license license:bsd-3)))
105
106(define-public corrode
107 (let ((commit "b6699fb2fa552a07c6091276285a44133e5c9789"))
108 (package
109 (name "corrode")
110 (version (string-append "0.0.1-" (string-take commit 7)))
111 (source
112 (origin
113 (method git-fetch)
114 (uri (git-reference
115 (url "https://github.com/jameysharp/corrode.git")
116 (commit "b6699fb2fa552a07c6091276285a44133e5c9789")))
bb90beb5 117 (file-name (git-file-name name version))
62e42dfa
RV
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
128Rust 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
157both more compatible with Haskell, and itself written in Haskell so that it
158can be distributed with compilers. This version of the C pre-processor is
159pretty-much feature-complete and compatible with traditional (K&R)
160pre-processors. Additional features include: a plain-text mode; an option to
161unlit literate code files; and an option to turn off macro-expansion.")
162 (license (list license:lgpl2.1+ license:gpl3+))))
163
804744b3
LC
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
0710797d
TS
190 `(#:cabal-revision
191 ("1" "0xl7j5cm704pbl2ms0dkydh7jvrz0ym76d725ifpg4h902m1zkhg")
192 #:configure-flags '("-fpkgconfig" "-fcurl" "-flibiconv" "-fthreaded"
804744b3
LC
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")))
0710797d
TS
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,"))
804744b3
LC
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)
804744b3
LC
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
259between server and client or committer and non-committers.
260@item Interactive: Darcs is easy to learn and efficient to use because it asks you
261questions in response to simple commands, giving you choices in your work flow.
262You can choose to record one change in a file, while ignoring another. As you update
263from upstream, you can review each patch name, even the full diff for interesting
264patches.
265@item Smart: Originally developed by physicist David Roundy, darcs is based on a
266unique algebra of patches called @url{http://darcs.net/Theory,Patchtheory}.
267@end enumerate")
268 (license license:gpl2)))
269
eea58169
ASM
270(define-public ghcid
271 (package
272 (name "ghcid")
273 (version "0.8.4")
274 (source
275 (origin
276 (method url-fetch)
277 (uri (string-append "https://hackage.haskell.org/package/ghcid/"
278 "ghcid-" version ".tar.gz"))
279 (sha256
280 (base32
281 "0wpm4ikrm1krz1ckzwk0srng091yh2skjal4fh95iz1hq3dw6qlw"))))
282 (build-system haskell-build-system)
283 (inputs
284 `(("ghc-extra" ,ghc-extra)
285 ("ghc-ansi-terminal" ,ghc-ansi-terminal)
286 ("ghc-cmdargs" ,ghc-cmdargs)
287 ("ghc-fsnotify" ,ghc-fsnotify)
288 ("ghc-terminal-size" ,ghc-terminal-size)))
289 (native-inputs
290 `(("ghc-tasty" ,ghc-tasty)
291 ("ghc-tasty-hunit" ,ghc-tasty-hunit)))
292 (home-page
293 "https://github.com/ndmitchell/ghcid#readme")
294 (synopsis "GHCi based bare bones IDE")
295 (description
296 "Either \"GHCi as a daemon\" or \"GHC + a bit of an IDE\". A very simple Haskell
297development tool which shows you the errors in your project and updates them whenever
298you save. Run @code{ghcid --topmost --command=ghci}, where @code{--topmost} makes the
299window on top of all others (Windows only) and @code{--command} is the command to start
300GHCi on your project (defaults to @code{ghci} if you have a @file{.ghci} file, or else
301to @code{cabal repl}).")
302 (license license:bsd-3)))
303
804744b3
LC
304(define-public git-annex
305 (package
306 (name "git-annex")
80b2825d 307 (version "8.20200309")
804744b3
LC
308 (source
309 (origin
310 (method url-fetch)
311 (uri (string-append "https://hackage.haskell.org/package/"
312 "git-annex/git-annex-" version ".tar.gz"))
313 (sha256
80b2825d 314 (base32 "1yjb01jh5rccqg44nqh4iyxmbpkcpm6m82lnw7s0s2vizj8891p5"))))
804744b3
LC
315 (build-system haskell-build-system)
316 (arguments
317 `(#:configure-flags
ac1b0801 318 '("--flags=-Android -Assistant -Pairing -Webapp -WebDAV")
804744b3
LC
319 #:phases
320 (modify-phases %standard-phases
3d45d8f1 321 (add-before 'configure 'patch-shell-for-tests
804744b3 322 (lambda _
3d45d8f1
KM
323 ;; Shell.hs defines "/bin/sh" that is used in Git hooks. We
324 ;; shouldn't patch hooks with Guix's current bash because the
325 ;; hooks can exist after that bash is garbage collected, but
326 ;; let's temporarily patch it so that we can run the tests.
327 (copy-file "Utility/Shell.hs" "/tmp/Shell.hs")
804744b3
LC
328 (substitute* "Utility/Shell.hs"
329 (("/bin/sh") (which "sh")))
330 #t))
331 (add-before 'configure 'factor-setup
332 (lambda _
333 ;; Factor out necessary build logic from the provided
334 ;; `Setup.hs' script. The script as-is does not work because
335 ;; it cannot find its dependencies, and there is no obvious way
336 ;; to tell it where to look. Note that we do not preserve the
337 ;; code that installs man pages here.
338 (call-with-output-file "PreConf.hs"
339 (lambda (out)
340 (format out "import qualified Build.Configure as Configure~%")
341 (format out "main = Configure.run Configure.tests~%")))
342 (call-with-output-file "Setup.hs"
343 (lambda (out)
344 (format out "import Distribution.Simple~%")
345 (format out "main = defaultMain~%")))
346 #t))
347 (add-before 'configure 'pre-configure
348 (lambda _
349 (invoke "runhaskell" "PreConf.hs")
350 #t))
351 (replace 'check
352 (lambda _
353 ;; We need to set the path so that Git recognizes
354 ;; `git annex' as a custom command.
355 (setenv "PATH" (string-append (getenv "PATH") ":"
356 (getcwd) "/dist/build/git-annex"))
357 (with-directory-excursion "dist/build/git-annex"
358 (symlink "git-annex" "git-annex-shell"))
359 (invoke "git-annex" "test")
360 #t))
3d45d8f1
KM
361 (add-after 'check 'unpatch-shell-and-rebuild
362 (lambda args
363 ;; Undo `patch-shell-for-tests'.
364 (copy-file "/tmp/Shell.hs" "Utility/Shell.hs")
365 (apply (assoc-ref %standard-phases 'build) args)))
804744b3
LC
366 (add-after 'install 'install-symlinks
367 (lambda* (#:key outputs #:allow-other-keys)
368 (let* ((out (assoc-ref outputs "out"))
369 (bin (string-append out "/bin")))
370 (symlink (string-append bin "/git-annex")
371 (string-append bin "/git-annex-shell"))
372 (symlink (string-append bin "/git-annex")
373 (string-append bin "/git-remote-tor-annex"))
374 #t))))))
375 (inputs
376 `(("curl" ,curl)
377 ("ghc-aeson" ,ghc-aeson)
378 ("ghc-async" ,ghc-async)
ac1b0801 379 ("ghc-aws" ,ghc-aws)
804744b3
LC
380 ("ghc-bloomfilter" ,ghc-bloomfilter)
381 ("ghc-byteable" ,ghc-byteable)
382 ("ghc-case-insensitive" ,ghc-case-insensitive)
a4a41a7b 383 ("ghc-concurrent-output" ,ghc-concurrent-output)
804744b3
LC
384 ("ghc-crypto-api" ,ghc-crypto-api)
385 ("ghc-cryptonite" ,ghc-cryptonite)
386 ("ghc-data-default" ,ghc-data-default)
387 ("ghc-disk-free-space" ,ghc-disk-free-space)
388 ("ghc-dlist" ,ghc-dlist)
389 ("ghc-edit-distance" ,ghc-edit-distance)
390 ("ghc-esqueleto" ,ghc-esqueleto)
391 ("ghc-exceptions" ,ghc-exceptions)
392 ("ghc-feed" ,ghc-feed)
0e5c0e46 393 ("ghc-filepath-bytestring" ,ghc-filepath-bytestring)
804744b3
LC
394 ("ghc-free" ,ghc-free)
395 ("ghc-hslogger" ,ghc-hslogger)
396 ("ghc-http-client" ,ghc-http-client)
397 ("ghc-http-conduit" ,ghc-http-conduit)
398 ("ghc-http-types" ,ghc-http-types)
399 ("ghc-ifelse" ,ghc-ifelse)
f2a3ff85 400 ("ghc-magic" ,ghc-magic)
804744b3
LC
401 ("ghc-memory" ,ghc-memory)
402 ("ghc-monad-control" ,ghc-monad-control)
403 ("ghc-monad-logger" ,ghc-monad-logger)
404 ("ghc-network" ,ghc-network)
405 ("ghc-old-locale" ,ghc-old-locale)
406 ("ghc-optparse-applicative" ,ghc-optparse-applicative)
407 ("ghc-persistent" ,ghc-persistent)
408 ("ghc-persistent-sqlite" ,ghc-persistent-sqlite)
409 ("ghc-persistent-template" ,ghc-persistent-template)
410 ("ghc-quickcheck" ,ghc-quickcheck)
411 ("ghc-random" ,ghc-random)
412 ("ghc-regex-tdfa" ,ghc-regex-tdfa)
413 ("ghc-resourcet" ,ghc-resourcet)
414 ("ghc-safesemaphore" ,ghc-safesemaphore)
415 ("ghc-sandi" ,ghc-sandi)
416 ("ghc-securemem" ,ghc-securemem)
417 ("ghc-socks" ,ghc-socks)
418 ("ghc-split" ,ghc-split)
804744b3
LC
419 ("ghc-stm-chans" ,ghc-stm-chans)
420 ("ghc-tagsoup" ,ghc-tagsoup)
804744b3
LC
421 ("ghc-unix-compat" ,ghc-unix-compat)
422 ("ghc-unordered-containers" ,ghc-unordered-containers)
423 ("ghc-utf8-string" ,ghc-utf8-string)
424 ("ghc-uuid" ,ghc-uuid)
425 ("git" ,git)
426 ("rsync" ,rsync)))
427 (native-inputs
428 `(("ghc-tasty" ,ghc-tasty)
429 ("ghc-tasty-hunit" ,ghc-tasty-hunit)
430 ("ghc-tasty-quickcheck" ,ghc-tasty-quickcheck)
431 ("ghc-tasty-rerun" ,ghc-tasty-rerun)))
432 (home-page "https://git-annex.branchable.com/")
433 (synopsis "Manage files with Git, without checking in their contents")
434 (description "This package allows managing files with Git, without
435checking the file contents into Git. It can store files in many places,
436such as local hard drives and cloud storage services. It can also be
437used to keep a folder in sync between computers.")
7e772cb6
KM
438 ;; The main author has released all his changes under AGPLv3+ as of March
439 ;; 2019 (7.20190219-187-g40ecf58d4). These are also licensed under the
440 ;; original GPLv3+ license, but going forward new changes will be under
441 ;; only AGPLv3+. The other licenses below cover code written by others.
442 ;; See git-annex's COPYRIGHT file for details on each file.
443 (license (list license:agpl3+
444 license:gpl3+
445 license:bsd-2
446 license:expat
447 license:gpl2))))
bfccae4e 448
62e42dfa
RV
449(define-public hlint
450 (package
451 (name "hlint")
cfbb0a95 452 (version "2.1.26")
62e42dfa
RV
453 (source
454 (origin
455 (method url-fetch)
456 (uri (string-append
457 "https://hackage.haskell.org/package/" name
458 "/" name "-" version ".tar.gz"))
459 (sha256
460 (base32
cfbb0a95 461 "16zkkpbfrd69853cdqf597fva969lirfc86b039i9zd7ghlrcayc"))))
62e42dfa
RV
462 (build-system haskell-build-system)
463 (inputs
464 `(("cpphs" ,cpphs)
465 ("ghc-unordered-containers" ,ghc-unordered-containers)
466 ("ghc-yaml" ,ghc-yaml)
467 ("ghc-vector" ,ghc-vector)
468 ("ghc-data-default" ,ghc-data-default)
469 ("ghc-cmdargs" ,ghc-cmdargs)
470 ("ghc-haskell-src-exts" ,ghc-haskell-src-exts)
471 ("ghc-haskell-src-exts-util" ,ghc-haskell-src-exts-util)
472 ("ghc-uniplate" ,ghc-uniplate)
473 ("ghc-ansi-terminal" ,ghc-ansi-terminal)
474 ("ghc-extra" ,ghc-extra)
475 ("ghc-refact" ,ghc-refact)
476 ("ghc-aeson" ,ghc-aeson)
cfbb0a95 477 ("ghc-lib-parser" ,ghc-lib-parser)
62e42dfa 478 ("hscolour" ,hscolour)))
19115138 479 (home-page "https://github.com/ndmitchell/hlint")
62e42dfa
RV
480 (synopsis "Suggest improvements for Haskell source code")
481 (description "HLint reads Haskell programs and suggests changes that
482hopefully make them easier to read. HLint also makes it easy to disable
483unwanted suggestions, and to add your own custom suggestions.")
484 (license license:bsd-3)))
485
6ec2450f
JS
486(define-public hoogle
487 (package
488 (name "hoogle")
12ee2d5d 489 (version "5.0.17.11")
6ec2450f
JS
490 (source
491 (origin
492 (method url-fetch)
493 (uri
494 (string-append
495 "https://hackage.haskell.org/package/hoogle/hoogle-"
496 version ".tar.gz"))
497 (sha256
498 (base32
12ee2d5d 499 "1svp8z9pad8z2j386pr0dda0ds8ddxab0salnz4gm51q877w93p1"))))
6ec2450f
JS
500 (build-system haskell-build-system)
501 (inputs
12ee2d5d 502 `(("ghc-quickcheck" ,ghc-quickcheck)
6ec2450f 503 ("ghc-aeson" ,ghc-aeson)
12ee2d5d
TS
504 ("ghc-blaze-html" ,ghc-blaze-html)
505 ("ghc-blaze-markup" ,ghc-blaze-markup)
6ec2450f
JS
506 ("ghc-cmdargs" ,ghc-cmdargs)
507 ("ghc-conduit" ,ghc-conduit)
508 ("ghc-conduit-extra" ,ghc-conduit-extra)
509 ("ghc-connection" ,ghc-connection)
510 ("ghc-extra" ,ghc-extra)
12ee2d5d 511 ("ghc-foundation" ,ghc-foundation)
6ec2450f
JS
512 ("ghc-old-locale" ,ghc-old-locale)
513 ("ghc-haskell-src-exts" ,ghc-haskell-src-exts)
514 ("ghc-http-conduit" ,ghc-http-conduit)
515 ("ghc-http-types" ,ghc-http-types)
516 ("ghc-js-flot" ,ghc-js-flot)
517 ("ghc-js-jquery" ,ghc-js-jquery)
518 ("ghc-mmap" ,ghc-mmap)
519 ("ghc-process-extras" ,ghc-process-extras)
520 ("ghc-resourcet" ,ghc-resourcet)
521 ("ghc-storable-tuple" ,ghc-storable-tuple)
522 ("ghc-tar" ,ghc-tar)
523 ("ghc-uniplate" ,ghc-uniplate)
524 ("ghc-utf8-string" ,ghc-utf8-string)
525 ("ghc-vector" ,ghc-vector)
526 ("ghc-wai" ,ghc-wai)
527 ("ghc-wai-logger" ,ghc-wai-logger)
528 ("ghc-warp" ,ghc-warp)
529 ("ghc-warp-tls" ,ghc-warp-tls)
530 ("ghc-zlib" ,ghc-zlib)))
531 (home-page "https://hoogle.haskell.org/")
532 (synopsis "Haskell API Search")
533 (description "Hoogle is a Haskell API search engine, which allows
534you to search many standard Haskell libraries by either function name,
535or by approximate type signature.")
536 (license license:bsd-3)))
537
62e42dfa
RV
538(define-public hscolour
539 (package
540 (name "hscolour")
541 (version "1.24.4")
542 (source
543 (origin
544 (method url-fetch)
545 (uri (string-append
546 "https://hackage.haskell.org/package/hscolour/hscolour-"
547 version
548 ".tar.gz"))
549 (sha256
550 (base32
551 "079jwph4bwllfp03yfr26s5zc6m6kw3nhb1cggrifh99haq34cr4"))))
552 (build-system haskell-build-system)
553 (home-page "https://hackage.haskell.org/package/hscolour")
554 (synopsis "Script to colourise Haskell code")
555 (description "HSColour is a small Haskell script to colourise Haskell
556code. It currently has six output formats: ANSI terminal codes (optionally
557XTerm-256colour codes), HTML 3.2 with font tags, HTML 4.01 with CSS, HTML 4.01
558with CSS and mouseover annotations, XHTML 1.0 with inline CSS styling, LaTeX,
559and mIRC chat codes.")
560 (license license:bsd-3)))
561
51add2a9
AG
562(define-public kmonad
563 (package
564 (name "kmonad")
15c06ad0 565 (version "0.3.0")
51add2a9
AG
566 (source
567 (origin
568 (method git-fetch)
569 (uri (git-reference
570 (url "https://github.com/david-janssen/kmonad.git")
15c06ad0 571 (commit version)))
51add2a9
AG
572 (file-name (git-file-name name version))
573 (sha256
15c06ad0 574 (base32 "1g40nkpldih6h1rlxjx5yf9iavr3qs1f2b6j0gd8135p5hkg8d8n"))))
51add2a9
AG
575 (build-system haskell-build-system)
576 (arguments
577 `(#:phases
578 (modify-phases %standard-phases
579 (delete 'haddock) ; Haddock fails to generate docs
580 (add-after 'install 'install-udev-rules
581 (lambda* (#:key outputs #:allow-other-keys)
582 (let* ((out (assoc-ref outputs "out"))
583 (rules (string-append out "/lib/udev/rules.d")))
584 (mkdir-p rules)
585 (call-with-output-file (string-append rules "/70-kmonad.rules")
586 (lambda (port)
587 (display
588 (string-append
589 "KERNEL==\"uinput\", MODE=\"0660\", "
590 "GROUP=\"input\", OPTIONS+=\"static_node=uinput\"\n")
591 port)))
592 #t)))
593 (add-after 'install-udev-rules 'install-documentation
594 (lambda* (#:key outputs #:allow-other-keys)
595 (let* ((out (assoc-ref outputs "out"))
596 (doc (string-append out "/share/doc/kmonad-" ,version)))
597 (install-file "README.md" doc)
598 (copy-recursively "doc" doc)
599 (copy-recursively "example" (string-append doc "/example"))
600 #t))))))
601 (inputs
602 `(("ghc-cereal" ,ghc-cereal)
603 ("ghc-exceptions" ,ghc-exceptions)
604 ("ghc-hashable" ,ghc-hashable)
605 ("ghc-lens" ,ghc-lens)
03b0c92e 606 ("ghc-megaparsec" ,ghc-megaparsec)
51add2a9
AG
607 ("ghc-optparse-applicative" ,ghc-optparse-applicative)
608 ("ghc-unagi-chan" ,ghc-unagi-chan)
609 ("ghc-unliftio" ,ghc-unliftio)
610 ("ghc-unordered-containers" ,ghc-unordered-containers)))
611 (home-page "https://github.com/david-janssen/kmonad")
612 (synopsis "Advanced keyboard manager")
613 (description "KMonad is a keyboard remapping utility that supports
614advanced functionality, such as custom keymap layers and modifiers, macros,
615and conditional mappings that send a different keycode when tapped or held.
616By operating at a lower level than most similar tools, it supports X11,
617Wayland, and Linux console environments alike.")
618 (license license:expat)))
619
bfccae4e
LC
620(define-public raincat
621 (package
622 (name "raincat")
623 (version "1.2.1")
624 (source
625 (origin
626 (method url-fetch)
1e5c274e 627 (uri (string-append "mirror://hackage/package/Raincat/"
bfccae4e
LC
628 "Raincat-" version ".tar.gz"))
629 (sha256
630 (base32
631 "10y9zi22m6hf13c9h8zd9vg7mljpwbw0r3djb6r80bna701fdf6c"))))
632 (build-system haskell-build-system)
633 (arguments
634 `(#:phases
635 (modify-phases %standard-phases
636 (add-after 'install 'wrap-executable
637 (lambda* (#:key inputs outputs #:allow-other-keys)
638 (let ((out (assoc-ref outputs "out")))
639 (wrap-program (string-append out "/bin/raincat")
640 `("LD_LIBRARY_PATH" ":" =
641 (,(string-append (assoc-ref inputs "freeglut")
642 "/lib"))))
643 #t))))))
644 (inputs
645 `(("ghc-extensible-exceptions" ,ghc-extensible-exceptions)
646 ("ghc-random" ,ghc-random)
647 ("ghc-glut" ,ghc-glut)
648 ("freeglut" ,freeglut)
649 ("ghc-opengl" ,ghc-opengl)
650 ("ghc-sdl2" ,ghc-sdl2)
651 ("ghc-sdl2-image" ,ghc-sdl2-image)
652 ("ghc-sdl2-mixer" ,ghc-sdl2-mixer)))
a15b4529 653 (home-page "https://www.gamecreation.org/games/raincat")
bfccae4e
LC
654 (synopsis "Puzzle game with a cat in lead role")
655 (description "Project Raincat is a game developed by Carnegie Mellon
656students through GCS during the Fall 2008 semester. Raincat features game
657play inspired from classics Lemmings and The Incredible Machine. The project
658proved to be an excellent learning experience for the programmers. Everything
659is programmed in Haskell.")
660 (license license:bsd-3)))
62e42dfa 661
6e241750
EF
662(define-public scroll
663 (package
664 (name "scroll")
665 (version "1.20180421")
666 (source
667 (origin
668 (method url-fetch)
669 (uri (string-append
670 "https://hackage.haskell.org/package/scroll/scroll-"
671 version ".tar.gz"))
672 (sha256
673 (base32
674 "0apzrvf99rskj4dbmn57jjxrsf19j436s8a09m950df5aws3a0wj"))))
675 (build-system haskell-build-system)
676 (inputs
677 `(("ghc-case-insensitive" ,ghc-case-insensitive)
678 ("ghc-data-default" ,ghc-data-default)
679 ("ghc-ifelse" ,ghc-ifelse)
680 ("ghc-monad-loops" ,ghc-monad-loops)
681 ("ghc-ncurses" ,ghc-ncurses)
682 ("ghc-optparse-applicative" ,ghc-optparse-applicative)
683 ("ghc-random" ,ghc-random)
684 ("ghc-vector" ,ghc-vector)))
685 (home-page "https://joeyh.name/code/scroll/")
686 (synopsis "scroll(6), a roguelike game")
687 (description
688 "You're a bookworm that's stuck on a scroll. You have to dodge between
689words and use spells to make your way down the page as the scroll is read. Go
690too slow and you'll get wound up in the scroll and crushed.")
691 (license license:gpl2)))
692
62e42dfa
RV
693(define-public shellcheck
694 (package
695 (name "shellcheck")
696 (version "0.7.0")
697 (source
698 (origin
699 (method url-fetch)
700 (uri (string-append
701 "https://hackage.haskell.org/package/ShellCheck/ShellCheck-"
702 version ".tar.gz"))
703 (sha256
704 (base32 "1vx895cp5k5h0680xfwj74lk97m9y627n965x6srds0gfnbkzy9s"))
705 (file-name (string-append name "-" version ".tar.gz"))))
706 (build-system haskell-build-system)
707 (inputs
708 `(("ghc-aeson" ,ghc-aeson)
709 ("ghc-diff" ,ghc-diff)
710 ("ghc-quickcheck" ,ghc-quickcheck)
711 ("ghc-regex-tdfa" ,ghc-regex-tdfa)))
712 (home-page "https://github.com/koalaman/shellcheck")
713 (synopsis "Static analysis for shell scripts")
714 (description "@code{shellcheck} provides static analysis for
715@command{bash} and @command{sh} shell scripts.
716It gives warnings and suggestions in order to:
717
718@enumerate
719@item Point out and clarify typical beginner's syntax issues that cause
720a shell to give cryptic error messages.
721@item Point out and clarify typical intermediate level semantic problems
722that cause a shell to behave strangely and counter-intuitively.
723@item Point out subtle caveats, corner cases and pitfalls that may cause an
724advanced user's otherwise working script to fail under future circumstances.
725@end enumerate")
726 (license license:gpl3+)))
83f9448e
JS
727
728(define-public stylish-haskell
729 (package
730 (name "stylish-haskell")
731 (version "0.9.2.2")
732 (source
733 (origin
734 (method url-fetch)
735 (uri
736 (string-append
737 "mirror://hackage/package/stylish-haskell/"
738 "stylish-haskell-" version ".tar.gz"))
739 (sha256
740 (base32
741 "1zs624xqp6j8vrl6pfv18dm8vz8hvz25grri65ximxhcizgwhnax"))))
742 (build-system haskell-build-system)
743 (inputs
744 `(("ghc-aeson" ,ghc-aeson)
745 ("ghc-file-embed" ,ghc-file-embed)
746 ("ghc-haskell-src-exts" ,ghc-haskell-src-exts)
747 ("ghc-semigroups" ,ghc-semigroups)
748 ("ghc-syb" ,ghc-syb)
749 ("ghc-yaml" ,ghc-yaml)
750 ("ghc-strict" ,ghc-strict)
751 ("ghc-optparse-applicative" ,ghc-optparse-applicative)
752 ("ghc-hunit" ,ghc-hunit)
753 ("ghc-test-framework" ,ghc-test-framework)
754 ("ghc-test-framework-hunit" ,ghc-test-framework-hunit)))
755 (home-page "https://github.com/jaspervdj/stylish-haskell")
756 (synopsis "Haskell code prettifier")
757 (description
758 "A simple Haskell code prettifier. The goal is not to format all of the
759code in a file, just clean up import statements and a few other tedious
760items. This tool tries to help where necessary without getting in the way.")
761 (license license:bsd-3)))