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