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