You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

278 lines
12 KiB

gnu: Move non-compilers out of haskell.scm. * gnu/packages/haskell.scm (ghc-abstract-deque, ghc-abstract-par, ghc-adjunctions, ghc-aeson-compat, ghc-alex, ghc-alsa-core, ghc-annotated-wl-pprint, ghc-ansi-terminal, ghc-ansi-wl-pprint, ghc-appar, ghc-async, ghc-atomic-write, ghc-attoparsec, ghc-attoparsec-bootstrap, ghc-attoparsec-iso8601, ghc-auto-update, ghc-aws, ghc-base16-bytestring, ghc-base64-bytestring, ghc-base-compat, ghc-basement, ghc-base-orphans, ghc-base-prelude, ghc-base-unicode-symbols, ghc-bifunctors, ghc-bindings-dsl, ghc-blaze-builder, ghc-blaze-markup, ghc-bloomfilter, ghc-boxes, ghc-byteable, ghc-byteorder, ghc-bytes, ghc-bytestring-builder, ghc-bytestring-handle, ghc-bytestring-lexing, ghc-bzlib-conduit, ghc-c2hs, ghc-cairo, ghc-call-stack, ghc-call-stack-boot, ghc-case-insensitive, ghc-cereal, ghc-cereal-conduit, ghc-cgi, ghc-charset, ghc-chart, ghc-chart-cairo, ghc-chasingbottoms, ghc-cheapskate, ghc-chell, ghc-chell-quickcheck, ghc-chunked-data, ghc-clock, ghc-clock-bootstrap, ghc-cmark, ghc-cmark-gfm, ghc-cmdargs, ghc-code-page, ghc-colour, ghc-comonad, ghc-concatenative, ghc-concurrent-output, ghc-conduit, ghc-conduit-algorithms, ghc-conduit-combinators, ghc-conduit-extra, ghc-configurator, ghc-connection, ghc-constraints, ghc-contravariant, ghc-contravariant-extras, ghc-convertible, ghc-data-accessor, ghc-data-accessor-transformers, ghc-data-default, ghc-data-default-class, ghc-data-default-instances-base, ghc-data-default-instances-containers, ghc-data-default-instances-dlist, ghc-data-default-instances-old-locale, ghc-data-hash, ghc-data-ordlist, ghc-deepseq-generics, ghc-descriptive, ghc-diff, ghc-disk-free-space, ghc-distributive, ghc-dlist, ghc-doctemplates, ghc-doctest, ghc-double-conversion, ghc-easy-file, ghc-easyplot, ghc-echo, ghc-edisonapi, ghc-edisoncore, ghc-edit-distance, ghc-either, ghc-email-validate, ghc-enclosed-exceptions, ghc-equivalence, ghc-erf, ghc-errorcall-eq-instance, ghc-errors, ghc-esqueleto, ghc-exactprint, ghc-exceptions, ghc-executable-path, ghc-extensible-exceptions, ghc-extra, ghc-fail, ghc-fast-logger, ghc-feed, ghc-fgl, ghc-fgl-arbitrary, ghc-file-embed, ghc-filemanip, ghc-findbin, ghc-fingertree, ghc-fixed, ghc-foldl, ghc-foundation, ghc-free, ghc-fsnotify, ghc-generic-deriving, ghc-generics-sop, ghc-geniplate-mirror, ghc-genvalidity, ghc-genvalidity-property, ghc-gitrev, ghc-glob, ghc-gluraw, ghc-glut, ghc-gnuplot, ghc-graphviz, ghc-gtk2hs-buildtools, ghc-hackage-security, ghc-haddock, ghc-haddock-api, ghc-haddock-library, ghc-half, ghc-happy, ghc-hashable, ghc-hashable-bootstrap, ghc-hashable-time, ghc-hashtables, ghc-haskell-lexer, ghc-haskell-src, ghc-haskell-src-exts, ghc-haskell-src-exts-util, ghc-haskell-src-meta, ghc-hasktags, ghc-hex, ghc-highlighting-kate, ghc-hindent, ghc-hinotify, ghc-hmatrix, ghc-hmatrix-gsl, ghc-hmatrix-gsl-stats, ghc-hmatrix-special, ghc-hostname, ghc-hourglass, ghc-hpack, ghc-hs-bibutils, ghc-hslogger, ghc-hslua, ghc-hslua-module-text, ghc-http-api-data, ghc-ieee754, ghc-ifelse, ghc-indents, ghc-inline-c, ghc-inline-c-cpp, ghc-integer-logarithms, ghc-integer-logarithms-bootstrap, ghc-interpolate, ghc-intervalmap, ghc-invariant, ghc-iproute, ghc-iwlib, ghc-json, ghc-juicypixels, ghc-kan-extensions, ghc-language-c, ghc-language-haskell-extract, ghc-lens, ghc-libffi, ghc-libmpd, ghc-libxml, ghc-lifted-async, ghc-lifted-base, ghc-linear, ghc-logging-facade, ghc-logict, ghc-lzma, ghc-lzma-conduit, ghc-markdown-unlit, ghc-math-functions, ghc-megaparsec, ghc-memory, ghc-memotrie, ghc-microlens, ghc-microlens-ghc, ghc-microlens-mtl, ghc-microlens-platform, ghc-microlens-th, ghc-missingh, ghc-mmap, ghc-mmorph, ghc-mockery, ghc-monad-control, ghc-monad-logger, ghc-monad-loops, ghc-monad-par, ghc-monad-par-extras, ghc-monadplus, ghc-monadrandom, ghc-monads-tf, ghc-mono-traversable, ghc-murmur-hash, ghc-mwc-random, ghc-nats, ghc-nats-bootstrap, ghc-network, ghc-network-info, ghc-network-uri, ghc-newtype-generics, ghc-objectname, ghc-old-locale, ghc-old-time, ghc-opengl, ghc-openglraw, ghc-operational, ghc-options, ghc-optparse-applicative, ghc-pandoc, ghc-pandoc-citeproc, ghc-pandoc-types, ghc-parallel, ghc-parsec-numbers, ghc-parser-combinators, ghc-parsers, ghc-path, ghc-path-io, ghc-paths, ghc-patience, ghc-pcre-light, ghc-persistent, ghc-persistent-sqlite, ghc-persistent-template, ghc-polyparse, ghc-pqueue, ghc-prelude-extras, ghc-pretty-hex, ghc-pretty-show, ghc-primitive, ghc-profunctors, ghc-psqueues, ghc-random, ghc-raw-strings-qq, ghc-rebase, ghc-reducers, ghc-refact, ghc-reflection, ghc-regex, ghc-regex-applicative, ghc-regex-base, ghc-regex-compat, ghc-regex-compat-tdfa, ghc-regex-pcre-builtin, ghc-regex-posix, ghc-regex-tdfa, ghc-regex-tdfa-text, ghc-rerebase, ghc-resolv, ghc-resource-pool, ghc-resourcet, ghc-rfc5051, ghc-rio, ghc-safe, ghc-safe-exceptions, ghc-safeio, ghc-safesemaphore, ghc-sandi, ghc-scientific, ghc-scientific-bootstrap, ghc-sdl, ghc-sdl-image, ghc-sdl-mixer, ghc-securemem, ghc-semigroupoids, ghc-semigroups, ghc-semigroups-bootstrap, ghc-setenv, ghc-setlocale, ghc-shakespeare, ghc-shelly, ghc-silently, ghc-simple-reflect, ghc-simple-sendfile, ghc-skylighting-core, ghc-skylighting, ghc-smallcheck, ghc-socks, ghc-split, ghc-statevar, ghc-statistics, ghc-stm-chans, ghc-stm-conduit, ghc-stmonadtrans, ghc-storable-complex, ghc-streaming-commons, ghc-strict, ghc-stringbuilder, ghc-string-qq, ghc-stringsearch, ghc-stylish-haskell, ghc-syb, ghc-system-fileio, ghc-system-filepath, ghc-tagged, ghc-tar, ghc-temporary, ghc-temporary-rc, ghc-terminal-size, ghc-texmath, ghc-text-binary, ghc-tf-random, ghc-th-abstraction, ghc-th-expand-syns, ghc-th-lift, ghc-th-lift-instances, ghc-th-orphans, ghc-th-reify-many, ghc-time-locale-compat, ghc-tldr, ghc-transformers-base, ghc-transformers-compat, ghc-tree-diff, ghc-trifecta, ghc-tuple-th, ghc-typed-process, ghc-unbounded-delays, ghc-unexceptionalio, ghc-union-find, ghc-uniplate, ghc-unix-compat, ghc-unix-time, ghc-unliftio, ghc-unliftio-core, ghc-unordered-containers, ghc-unordered-containers-bootstrap, ghc-uri-bytestring, ghc-utf8-string, ghc-utility-ht, ghc-uuid, ghc-uuid-types, ghc-validation, ghc-validity, ghc-vault, ghc-vector, ghc-vector-algorithms, ghc-vector-binary-instances, ghc-vector-builder, ghc-vector-th-unbox, ghc-void, ghc-wave, ghc-wcwidth, ghc-wcwidth-bootstrap, ghc-weigh, ghc-wl-pprint, ghc-wl-pprint-annotated, ghc-wl-pprint-text, ghc-word8, ghc-x11, ghc-x11-xft, ghc-xdg-basedir, ghc-xml, ghc-xml-conduit, ghc-xml-types, ghc-yaml, ghc-zip-archive, ghc-zlib): Move variables from here... * gnu/packages/haskell-xyz.scm: ...to here. * gnu/packages/agda.scm, gnu/packages/bioconductor.scm, gnu/packages/bioinformatics.scm, gnu/packages/cran.scm, gnu/packages/emacs-xyz.scm, gnu/packages/games.scm, gnu/packages/graphics.scm, gnu/packages/haskell-apps.scm, gnu/packages/haskell-check.scm, gnu/packages/idris.scm, gnu/packages/statistics.scm, gnu/packages/wm.scm: Update module references. Co-authored-by: Timothy Sample <samplet@ngyro.com>
2 years ago
  1. ;;; GNU Guix --- Functional package management for GNU
  2. ;;; Copyright © 2015 Paul van der Walt <paul@denknerd.org>
  3. ;;; Copyright © 2016, 2017 David Craven <david@craven.ch>
  4. ;;; Copyright © 2018 Alex ter Weele <alex.ter.weele@gmail.com>
  5. ;;; Copyright © 2019 Eric Bavier <bavier@member.fsf.org>
  6. ;;;
  7. ;;; This file is part of GNU Guix.
  8. ;;;
  9. ;;; GNU Guix is free software; you can redistribute it and/or modify it
  10. ;;; under the terms of the GNU General Public License as published by
  11. ;;; the Free Software Foundation; either version 3 of the License, or (at
  12. ;;; your option) any later version.
  13. ;;;
  14. ;;; GNU Guix is distributed in the hope that it will be useful, but
  15. ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
  16. ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  17. ;;; GNU General Public License for more details.
  18. ;;;
  19. ;;; You should have received a copy of the GNU General Public License
  20. ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
  21. (define-module (gnu packages idris)
  22. #:use-module (gnu packages)
  23. #:use-module (gnu packages haskell-check)
  24. #:use-module (gnu packages haskell-web)
  25. #:use-module (gnu packages haskell-xyz)
  26. #:use-module (gnu packages libffi)
  27. #:use-module (gnu packages multiprecision)
  28. #:use-module (gnu packages ncurses)
  29. #:use-module (gnu packages perl)
  30. #:use-module (guix build-system gnu)
  31. #:use-module (guix build-system haskell)
  32. #:use-module (guix download)
  33. #:use-module (guix git-download)
  34. #:use-module ((guix licenses) #:prefix license:)
  35. #:use-module (guix packages))
  36. (define-public idris
  37. (package
  38. (name "idris")
  39. (version "1.3.2")
  40. (source (origin
  41. (method url-fetch)
  42. (uri (string-append
  43. "https://hackage.haskell.org/package/"
  44. "idris-" version "/idris-" version ".tar.gz"))
  45. (sha256
  46. (base32
  47. "0wychzkg0yghd2pp8fqz78vp1ayzks191knfpl7mhh8igsmb6bc7"))))
  48. (build-system haskell-build-system)
  49. (native-inputs ;For tests
  50. `(("perl" ,perl)
  51. ("ghc-tasty" ,ghc-tasty)
  52. ("ghc-tasty-golden" ,ghc-tasty-golden)
  53. ("ghc-tasty-rerun" ,ghc-tasty-rerun)))
  54. (inputs
  55. `(("gmp" ,gmp)
  56. ("ncurses" ,ncurses)
  57. ("ghc-aeson" ,ghc-aeson)
  58. ("ghc-annotated-wl-pprint" ,ghc-annotated-wl-pprint)
  59. ("ghc-ansi-terminal" ,ghc-ansi-terminal)
  60. ("ghc-ansi-wl-pprint" ,ghc-ansi-wl-pprint)
  61. ("ghc-async" ,ghc-async)
  62. ("ghc-base64-bytestring" ,ghc-base64-bytestring)
  63. ("ghc-blaze-html" ,ghc-blaze-html)
  64. ("ghc-blaze-markup" ,ghc-blaze-markup)
  65. ("ghc-cheapskate" ,ghc-cheapskate)
  66. ("ghc-code-page" ,ghc-code-page)
  67. ("ghc-fingertree" ,ghc-fingertree)
  68. ("ghc-fsnotify" ,ghc-fsnotify)
  69. ("ghc-ieee754" ,ghc-ieee754)
  70. ("ghc-libffi" ,ghc-libffi)
  71. ("ghc-megaparsec" ,ghc-megaparsec)
  72. ("ghc-network" ,ghc-network)
  73. ("ghc-optparse-applicative" ,ghc-optparse-applicative)
  74. ("ghc-regex-tdfa" ,ghc-regex-tdfa)
  75. ("ghc-safe" ,ghc-safe)
  76. ("ghc-split" ,ghc-split)
  77. ("ghc-terminal-size" ,ghc-terminal-size)
  78. ("ghc-uniplate" ,ghc-uniplate)
  79. ("ghc-unordered-containers" ,ghc-unordered-containers)
  80. ("ghc-utf8-string" ,ghc-utf8-string)
  81. ("ghc-vector" ,ghc-vector)
  82. ("ghc-vector-binary-instances" ,ghc-vector-binary-instances)
  83. ("ghc-zip-archive" ,ghc-zip-archive)))
  84. (arguments
  85. `(#:configure-flags
  86. (list (string-append "--datasubdir="
  87. (assoc-ref %outputs "out") "/lib/idris")
  88. "-fFFI" "-fGMP")
  89. #:phases
  90. (modify-phases %standard-phases
  91. (add-after 'unpack 'update-constraints
  92. (lambda _
  93. (substitute* "idris.cabal"
  94. (("ansi-terminal < 0\\.9") "ansi-terminal < 0.10"))
  95. #t))
  96. (add-before 'configure 'set-cc-command
  97. (lambda _
  98. (setenv "CC" "gcc")
  99. #t))
  100. (add-after 'install 'fix-libs-install-location
  101. (lambda* (#:key outputs #:allow-other-keys)
  102. (let* ((out (assoc-ref outputs "out"))
  103. (lib (string-append out "/lib/idris"))
  104. (modules (string-append lib "/libs")))
  105. (for-each
  106. (lambda (module)
  107. (symlink (string-append modules "/" module)
  108. (string-append lib "/" module)))
  109. '("prelude" "base" "contrib" "effects" "pruviloj")))))
  110. (delete 'check) ;Run check later
  111. (add-after 'install 'check
  112. (lambda* (#:key outputs #:allow-other-keys #:rest args)
  113. (let ((out (assoc-ref outputs "out")))
  114. (setenv "TASTY_NUM_THREADS" (number->string (parallel-job-count)))
  115. (setenv "IDRIS_CC" "gcc") ;Needed for creating executables
  116. (setenv "PATH" (string-append out "/bin:" (getenv "PATH")))
  117. (apply (assoc-ref %standard-phases 'check) args)))))))
  118. (native-search-paths
  119. (list (search-path-specification
  120. (variable "IDRIS_LIBRARY_PATH")
  121. (files '("lib/idris")))))
  122. (home-page "https://www.idris-lang.org")
  123. (synopsis "General purpose language with full dependent types")
  124. (description "Idris is a general purpose language with full dependent
  125. types. It is compiled, with eager evaluation. Dependent types allow types to
  126. be predicated on values, meaning that some aspects of a program's behaviour
  127. can be specified precisely in the type. The language is closely related to
  128. Epigram and Agda.")
  129. (license license:bsd-3)))
  130. ;; Idris modules use the gnu-build-system so that the IDRIS_LIBRARY_PATH is set.
  131. (define (idris-default-arguments name)
  132. `(#:modules ((guix build gnu-build-system)
  133. (guix build utils)
  134. (ice-9 ftw)
  135. (ice-9 match))
  136. #:phases
  137. (modify-phases %standard-phases
  138. (delete 'configure)
  139. (delete 'build)
  140. (delete 'check)
  141. (replace 'install
  142. (lambda* (#:key inputs outputs #:allow-other-keys)
  143. (let* ((out (assoc-ref outputs "out"))
  144. (idris (assoc-ref inputs "idris"))
  145. (idris-bin (string-append idris "/bin/idris"))
  146. (idris-libs (string-append idris "/lib/idris/libs"))
  147. (module-name (and (string-prefix? "idris-" ,name)
  148. (substring ,name 6)))
  149. (ibcsubdir (string-append out "/lib/idris/" module-name))
  150. (ipkg (string-append module-name ".ipkg"))
  151. (idris-library-path (getenv "IDRIS_LIBRARY_PATH"))
  152. (idris-path (string-split idris-library-path #\:))
  153. (idris-path-files (apply append
  154. (map (lambda (path)
  155. (map (lambda (dir)
  156. (string-append path "/" dir))
  157. (scandir path))) idris-path)))
  158. (idris-path-subdirs (filter (lambda (path)
  159. (and path (match (stat:type (stat path))
  160. ('directory #t)
  161. (_ #f))))
  162. idris-path-files))
  163. (install-cmd (cons* idris-bin
  164. "--ibcsubdir" ibcsubdir
  165. "--build" ipkg
  166. ;; only trigger a build, as --ibcsubdir
  167. ;; already installs .ibc files.
  168. (apply append (map (lambda (path)
  169. (list "--idrispath"
  170. path))
  171. idris-path-subdirs)))))
  172. ;; FIXME: Seems to be a bug in idris that causes a dubious failure.
  173. (apply system* install-cmd)
  174. #t))))))
  175. (define-public idris-lightyear
  176. (let ((commit "6d65ad111b4bed2bc131396f8385528fc6b3678a"))
  177. (package
  178. (name "idris-lightyear")
  179. (version (git-version "0.1" "1" commit))
  180. (source (origin
  181. (method git-fetch)
  182. (uri (git-reference
  183. (url "https://github.com/ziman/lightyear")
  184. (commit commit)))
  185. (file-name (git-file-name name version))
  186. (sha256
  187. (base32
  188. "1pkxnn3ryr0v0cin4nasw7kgkc9dnnpja1nfbj466mf3qv5s98af"))))
  189. (build-system gnu-build-system)
  190. (native-inputs
  191. `(("idris" ,idris)))
  192. (arguments (idris-default-arguments name))
  193. (home-page "https://github.com/ziman/lightyear")
  194. (synopsis "Lightweight parser combinator library for Idris")
  195. (description "Lightweight parser combinator library for Idris, inspired
  196. by Parsec. This package is used (almost) the same way as Parsec, except for one
  197. difference: backtracking.")
  198. (license license:bsd-2))))
  199. (define-public idris-wl-pprint
  200. (let ((commit "1d365fcf4ba075859844dbc5eb96a90f57b9f338"))
  201. (package
  202. (name "idris-wl-pprint")
  203. (version (git-version "0.1" "1" commit))
  204. (source (origin
  205. (method git-fetch)
  206. (uri (git-reference
  207. (url "https://github.com/shayan-najd/wl-pprint")
  208. (commit commit)))
  209. (file-name (git-file-name name version))
  210. (sha256
  211. (base32
  212. "0g7c3y9smifdz4sivi3qmvymhdr7v9kfq45fmfmmvkqcrix0spzn"))))
  213. (build-system gnu-build-system)
  214. (native-inputs
  215. `(("idris" ,idris)))
  216. (arguments (idris-default-arguments name))
  217. (home-page "https://github.com/shayan-najd/wl-pprint")
  218. (synopsis "Pretty printing library")
  219. (description "A pretty printing library for Idris based on Phil Wadler's
  220. paper A Prettier Printer and on Daan Leijen's extensions in the Haskell
  221. wl-pprint library.")
  222. (license license:bsd-2))))
  223. (define-public idris-bifunctors
  224. (let ((commit "53d06a6ccfe70c49c9ae8c8a4135981dd2173202"))
  225. (package
  226. (name "idris-bifunctors")
  227. (version (git-version "0.1" "1" commit))
  228. (source (origin
  229. (method git-fetch)
  230. (uri (git-reference
  231. (url "https://github.com/HuwCampbell/Idris-Bifunctors")
  232. (commit commit)))
  233. (file-name (string-append name "-" version "-checkout"))
  234. (sha256
  235. (base32
  236. "02vbsd3rmgnj0l1qq787709qcxjbr9890cbad4ykn27f77jk81h4"))))
  237. (build-system gnu-build-system)
  238. (native-inputs
  239. `(("idris" ,idris)))
  240. (arguments (idris-default-arguments name))
  241. (home-page "https://github.com/HuwCampbell/Idris-Bifunctors")
  242. (synopsis "Bifunctor library")
  243. (description "This is a bifunctor library for Idris based off the
  244. excellent Haskell Bifunctors package from Edward Kmett.")
  245. (license license:bsd-3))))
  246. (define-public idris-lens
  247. (let ((commit "26f012005f6849806cea630afe317e42cae97f29"))
  248. (package
  249. (name "idris-lens")
  250. (version (git-version "0.1" "1" commit))
  251. (source (origin
  252. (method git-fetch)
  253. (uri (git-reference
  254. (url "https://github.com/HuwCampbell/idris-lens")
  255. (commit commit)))
  256. (file-name (git-file-name name version))
  257. (sha256
  258. (base32
  259. "06jzfj6rad08rk92w8jk5byi79svmyg0mrcqhibgx8rkjjy6vmai"))))
  260. (build-system gnu-build-system)
  261. (native-inputs
  262. `(("idris" ,idris)))
  263. (propagated-inputs
  264. `(("idris-bifunctors" ,idris-bifunctors)))
  265. (arguments (idris-default-arguments name))
  266. (home-page "https://github.com/HuwCampbell/idris-lens")
  267. (synopsis "Van Laarhoven lenses for Idris")
  268. (description "Lenses are composable functional references. They allow
  269. accessing and modifying data within a structure.")
  270. (license license:bsd-3))))