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