purescript.scm 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190
  1. ;;; GNU Guix --- Functional package management for GNU
  2. ;;; Copyright © 2020 John Soo <jsoo1@asu.edu>
  3. ;;; Copyright © 2020 Bonface Munyoki Kilyungi <bonfacemunyoki@gmail.com>
  4. ;;;
  5. ;;; This file is part of GNU Guix.
  6. ;;;
  7. ;;; GNU Guix is free software; you can redistribute it and/or modify it
  8. ;;; under the terms of the GNU General Public License as published by
  9. ;;; the Free Software Foundation; either version 3 of the License, or (at
  10. ;;; your option) any later version.
  11. ;;;
  12. ;;; GNU Guix is distributed in the hope that it will be useful, but
  13. ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
  14. ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. ;;; GNU General Public License for more details.
  16. ;;;
  17. ;;; You should have received a copy of the GNU General Public License
  18. ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
  19. (define-module (gnu packages purescript)
  20. #:use-module (gnu packages)
  21. #:use-module (gnu packages haskell-xyz)
  22. #:use-module (gnu packages haskell-check)
  23. #:use-module (gnu packages haskell-crypto)
  24. #:use-module (gnu packages haskell-web)
  25. #:use-module ((gnu packages python) #:select (python))
  26. #:use-module (guix download)
  27. #:use-module (guix git-download)
  28. #:use-module (guix packages)
  29. #:use-module (guix build-system haskell)
  30. #:use-module ((guix licenses) #:prefix license:))
  31. (define-public purescript
  32. (package
  33. (name "purescript")
  34. (version "0.14.4")
  35. (source
  36. (origin
  37. (method url-fetch)
  38. (uri (string-append
  39. "https://hackage.haskell.org/package/purescript/purescript-"
  40. version
  41. ".tar.gz"))
  42. (sha256
  43. (base32
  44. "0qda90yycv2yyjdpfqvmsnxbyxpx55b53cfp9rgnbhbrskr0w2vk"))))
  45. (build-system haskell-build-system)
  46. (inputs
  47. `(("ghc-glob" ,ghc-glob)
  48. ("ghc-aeson" ,ghc-aeson)
  49. ("ghc-aeson-better-errors" ,ghc-aeson-better-errors)
  50. ("ghc-aeson-pretty" ,ghc-aeson-pretty)
  51. ("ghc-ansi-terminal" ,ghc-ansi-terminal)
  52. ("ghc-base-compat" ,ghc-base-compat)
  53. ("ghc-blaze-html" ,ghc-blaze-html)
  54. ("ghc-bower-json" ,ghc-bower-json)
  55. ("ghc-boxes" ,ghc-boxes)
  56. ("ghc-cborg" ,ghc-cborg)
  57. ("ghc-cheapskate" ,ghc-cheapskate)
  58. ("ghc-clock" ,ghc-clock)
  59. ("ghc-cryptonite" ,ghc-cryptonite)
  60. ("ghc-data-ordlist" ,ghc-data-ordlist)
  61. ("ghc-dlist" ,ghc-dlist)
  62. ("ghc-edit-distance" ,ghc-edit-distance)
  63. ("ghc-file-embed" ,ghc-file-embed)
  64. ("ghc-fsnotify" ,ghc-fsnotify)
  65. ("ghc-happy" ,ghc-happy)
  66. ("ghc-language-javascript" ,ghc-language-javascript)
  67. ("ghc-lifted-async" ,ghc-lifted-async)
  68. ("ghc-lifted-base" ,ghc-lifted-base)
  69. ("ghc-memory" ,ghc-memory)
  70. ("ghc-microlens-platform" ,ghc-microlens-platform)
  71. ("ghc-monad-control" ,ghc-monad-control)
  72. ("ghc-monad-logger" ,ghc-monad-logger)
  73. ("ghc-network" ,ghc-network)
  74. ("ghc-parallel" ,ghc-parallel)
  75. ("ghc-pattern-arrows" ,ghc-pattern-arrows)
  76. ("ghc-protolude" ,ghc-protolude)
  77. ("ghc-purescript-cst" ,ghc-purescript-cst)
  78. ("ghc-regex-tdfa" ,ghc-regex-tdfa)
  79. ("ghc-safe" ,ghc-safe)
  80. ("ghc-scientific" ,ghc-scientific)
  81. ("ghc-semialign" ,ghc-semialign)
  82. ("ghc-semigroups" ,ghc-semigroups)
  83. ("ghc-serialise" ,ghc-serialise)
  84. ("ghc-sourcemap" ,ghc-sourcemap)
  85. ("ghc-split" ,ghc-split)
  86. ("ghc-stringsearch" ,ghc-stringsearch)
  87. ("ghc-syb" ,ghc-syb)
  88. ("ghc-these" ,ghc-these)
  89. ("ghc-transformers-base" ,ghc-transformers-base)
  90. ("ghc-transformers-compat" ,ghc-transformers-compat)
  91. ("ghc-unordered-containers" ,ghc-unordered-containers)
  92. ("ghc-utf8-string" ,ghc-utf8-string)
  93. ("ghc-vector" ,ghc-vector)
  94. ("ghc-ansi-wl-pprint" ,ghc-ansi-wl-pprint)
  95. ("ghc-http-types" ,ghc-http-types)
  96. ("ghc-network" ,ghc-network)
  97. ("ghc-optparse-applicative" ,ghc-optparse-applicative-0.15.1.0) ; XXX: needs specific version
  98. ("ghc-wai" ,ghc-wai)
  99. ("ghc-wai-websockets" ,ghc-wai-websockets)
  100. ("ghc-warp" ,ghc-warp)
  101. ("ghc-websockets" ,ghc-websockets)))
  102. (native-inputs
  103. `(("ghc-happy" ,ghc-happy)
  104. ("ghc-hunit" ,ghc-hunit)
  105. ("ghc-hspec" ,ghc-hspec)
  106. ("hspec-discover" ,hspec-discover)
  107. ("ghc-tasty" ,ghc-tasty)
  108. ("ghc-tasty-golden" ,ghc-tasty-golden)
  109. ("ghc-tasty-hspec" ,ghc-tasty-hspec)))
  110. (arguments
  111. `(;; Tests require npm
  112. #:tests? #f
  113. #:configure-flags '("--flags=release")
  114. #:phases
  115. (modify-phases %standard-phases
  116. (add-before 'configure 'update-constraints
  117. (lambda _
  118. (substitute* "purescript.cabal"
  119. (("\\b(ansi-terminal|cryptonite|dlist|language-javascript)\\s+[^,]+" all dep)
  120. dep)))))))
  121. (home-page "https://www.purescript.org/")
  122. (synopsis "Haskell inspired programming language compiling to JavaScript")
  123. (description
  124. "Purescript is a small strongly, statically typed programming language with
  125. expressive types, inspired by Haskell and compiling to JavaScript.")
  126. (license license:bsd-3)))
  127. (define-public ghc-purescript-cst
  128. (package
  129. (name "ghc-purescript-cst")
  130. (version "0.4.0.0")
  131. (source
  132. (origin
  133. (method url-fetch)
  134. (uri (string-append
  135. "https://hackage.haskell.org/package/purescript-cst/purescript-cst-"
  136. version
  137. ".tar.gz"))
  138. (sha256
  139. (base32 "0r3f5lr9lrv9wpgkwj6nyl42lvxryj2lvr1w7ld4gki8ylq24n8g"))))
  140. (build-system haskell-build-system)
  141. (arguments
  142. `(#:phases
  143. (modify-phases %standard-phases
  144. (add-before 'configure 'update-constraints
  145. (lambda _
  146. (substitute* "purescript-cst.cabal"
  147. (("\\b(dlist)\\s+[^,]+" all dep)
  148. dep)))))))
  149. (inputs
  150. `(("ghc-aeson" ,ghc-aeson)
  151. ("ghc-base-compat" ,ghc-base-compat)
  152. ("ghc-dlist" ,ghc-dlist)
  153. ("ghc-microlens" ,ghc-microlens)
  154. ("ghc-protolude" ,ghc-protolude)
  155. ("ghc-scientific" ,ghc-scientific)
  156. ("ghc-semigroups" ,ghc-semigroups)
  157. ("ghc-serialise" ,ghc-serialise)
  158. ("ghc-vector" ,ghc-vector)))
  159. (native-inputs `(("ghc-happy" ,ghc-happy)))
  160. (home-page "https://www.purescript.org/")
  161. (synopsis "PureScript Programming Language Concrete Syntax Tree")
  162. (description
  163. "This package implements parser for the PureScript programming language.")
  164. (license license:bsd-3)))
  165. (define-public ghc-optparse-applicative-0.15.1.0
  166. (package
  167. (inherit ghc-optparse-applicative)
  168. (name "ghc-optparse-applicative")
  169. (version "0.15.1.0")
  170. (source
  171. (origin
  172. (method url-fetch)
  173. (uri (string-append
  174. "https://hackage.haskell.org/package/optparse-applicative/optparse-applicative-"
  175. version
  176. ".tar.gz"))
  177. (sha256
  178. (base32 "1ws6y3b3f6hsgv0ff0yp6lw4hba1rps4dnvry3yllng0s5gngcsd"))))
  179. (inputs
  180. `(("ghc-transformers-compat" ,ghc-transformers-compat)
  181. ("ghc-ansi-wl-pprint" ,ghc-ansi-wl-pprint)))
  182. (native-inputs `(("ghc-quickcheck" ,ghc-quickcheck)))
  183. (arguments
  184. `(#:cabal-revision
  185. ("1" "0zmhqkd96v2z1ilhqdkd9z4jgsnsxb8yi2479ind8m5zm9363zr9")))))