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