purescript.scm 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168
  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. ;;; Copyright © 2021 Tobias Geerinckx-Rice <me@tobias.gr>
  5. ;;;
  6. ;;; This file is part of GNU Guix.
  7. ;;;
  8. ;;; GNU Guix is free software; you can redistribute it and/or modify it
  9. ;;; under the terms of the GNU General Public License as published by
  10. ;;; the Free Software Foundation; either version 3 of the License, or (at
  11. ;;; your option) any later version.
  12. ;;;
  13. ;;; GNU Guix is distributed in the hope that it will be useful, but
  14. ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
  15. ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. ;;; GNU General Public License for more details.
  17. ;;;
  18. ;;; You should have received a copy of the GNU General Public License
  19. ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
  20. (define-module (gnu packages purescript)
  21. #:use-module (gnu packages)
  22. #:use-module (gnu packages haskell-xyz)
  23. #:use-module (gnu packages haskell-check)
  24. #:use-module (gnu packages haskell-crypto)
  25. #:use-module (gnu packages haskell-web)
  26. #:use-module ((gnu packages python) #:select (python))
  27. #:use-module (guix download)
  28. #:use-module (guix git-download)
  29. #:use-module (guix packages)
  30. #:use-module (guix build-system haskell)
  31. #:use-module ((guix licenses) #:prefix license:))
  32. (define-public purescript
  33. (package
  34. (name "purescript")
  35. (version "0.14.5")
  36. (source
  37. (origin
  38. (method url-fetch)
  39. (uri (string-append
  40. "https://hackage.haskell.org/package/purescript/purescript-"
  41. version
  42. ".tar.gz"))
  43. (sha256
  44. (base32 "06f318hdah076vkviw1ryyg2p0gpbabsp8lbm5x03f2qv92n9j1n"))))
  45. (build-system haskell-build-system)
  46. (inputs
  47. (list ghc-glob
  48. ghc-aeson
  49. ghc-aeson-better-errors
  50. ghc-aeson-pretty
  51. ghc-ansi-terminal
  52. ghc-base-compat
  53. ghc-blaze-html
  54. ghc-bower-json
  55. ghc-boxes
  56. ghc-cborg
  57. ghc-cheapskate
  58. ghc-clock
  59. ghc-cryptonite
  60. ghc-data-ordlist
  61. ghc-dlist
  62. ghc-edit-distance
  63. ghc-file-embed
  64. ghc-fsnotify
  65. ghc-happy
  66. ghc-language-javascript
  67. ghc-lifted-async
  68. ghc-lifted-base
  69. ghc-memory
  70. ghc-microlens-platform
  71. ghc-monad-control
  72. ghc-monad-logger
  73. ghc-network
  74. ghc-parallel
  75. ghc-pattern-arrows
  76. ghc-protolude
  77. ghc-purescript-cst
  78. ghc-regex-tdfa
  79. ghc-safe
  80. ghc-scientific
  81. ghc-semialign
  82. ghc-semigroups
  83. ghc-serialise
  84. ghc-sourcemap
  85. ghc-split
  86. ghc-stringsearch
  87. ghc-syb
  88. ghc-these
  89. ghc-transformers-base
  90. ghc-transformers-compat
  91. ghc-unordered-containers
  92. ghc-utf8-string
  93. ghc-vector
  94. ghc-ansi-wl-pprint
  95. ghc-http-types
  96. ghc-network
  97. ghc-optparse-applicative-0.15.1.0 ; XXX: needs specific version
  98. ghc-wai
  99. ghc-wai-websockets
  100. ghc-warp
  101. ghc-websockets))
  102. (native-inputs
  103. (list ghc-happy
  104. ghc-hunit
  105. ghc-hspec
  106. hspec-discover
  107. ghc-tasty
  108. ghc-tasty-golden
  109. 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. (list ghc-aeson
  151. ghc-base-compat
  152. ghc-dlist
  153. ghc-microlens
  154. ghc-protolude
  155. ghc-scientific
  156. ghc-semigroups
  157. ghc-serialise
  158. ghc-vector))
  159. (native-inputs (list 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)))