| 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 | |
| 21 | (define-module (gnu packages purescript) |
| 22 | #:use-module (gnu packages) |
| 23 | #:use-module (gnu packages haskell-xyz) |
| 24 | #:use-module (gnu packages haskell-check) |
| 25 | #:use-module (gnu packages haskell-crypto) |
| 26 | #:use-module (gnu packages haskell-web) |
| 27 | #:use-module ((gnu packages python) #:select (python)) |
| 28 | #:use-module (guix download) |
| 29 | #:use-module (guix git-download) |
| 30 | #:use-module (guix packages) |
| 31 | #:use-module (guix build-system haskell) |
| 32 | #:use-module ((guix licenses) #:prefix license:)) |
| 33 | |
| 34 | (define-public purescript |
| 35 | (package |
| 36 | (name "purescript") |
| 37 | (version "0.14.5") |
| 38 | (source |
| 39 | (origin |
| 40 | (method url-fetch) |
| 41 | (uri (string-append |
| 42 | "https://hackage.haskell.org/package/purescript/purescript-" |
| 43 | version |
| 44 | ".tar.gz")) |
| 45 | (sha256 |
| 46 | (base32 "06f318hdah076vkviw1ryyg2p0gpbabsp8lbm5x03f2qv92n9j1n")))) |
| 47 | (build-system haskell-build-system) |
| 48 | (inputs |
| 49 | (list ghc-glob |
| 50 | ghc-aeson |
| 51 | ghc-aeson-better-errors |
| 52 | ghc-aeson-pretty |
| 53 | ghc-ansi-terminal |
| 54 | ghc-base-compat |
| 55 | ghc-blaze-html |
| 56 | ghc-bower-json |
| 57 | ghc-boxes |
| 58 | ghc-cborg |
| 59 | ghc-cheapskate |
| 60 | ghc-clock |
| 61 | ghc-cryptonite |
| 62 | ghc-data-ordlist |
| 63 | ghc-dlist |
| 64 | ghc-edit-distance |
| 65 | ghc-file-embed |
| 66 | ghc-fsnotify |
| 67 | ghc-happy |
| 68 | ghc-language-javascript |
| 69 | ghc-lifted-async |
| 70 | ghc-lifted-base |
| 71 | ghc-memory |
| 72 | ghc-microlens-platform |
| 73 | ghc-monad-control |
| 74 | ghc-monad-logger |
| 75 | ghc-network |
| 76 | ghc-parallel |
| 77 | ghc-pattern-arrows |
| 78 | ghc-protolude |
| 79 | ghc-purescript-cst |
| 80 | ghc-regex-tdfa |
| 81 | ghc-safe |
| 82 | ghc-scientific |
| 83 | ghc-semialign |
| 84 | ghc-semigroups |
| 85 | ghc-serialise |
| 86 | ghc-sourcemap |
| 87 | ghc-split |
| 88 | ghc-stringsearch |
| 89 | ghc-syb |
| 90 | ghc-these |
| 91 | ghc-transformers-base |
| 92 | ghc-transformers-compat |
| 93 | ghc-unordered-containers |
| 94 | ghc-utf8-string |
| 95 | ghc-vector |
| 96 | ghc-ansi-wl-pprint |
| 97 | ghc-http-types |
| 98 | ghc-network |
| 99 | ghc-optparse-applicative-0.15.1.0 ; XXX: needs specific version |
| 100 | ghc-wai |
| 101 | ghc-wai-websockets |
| 102 | ghc-warp |
| 103 | ghc-websockets)) |
| 104 | (native-inputs |
| 105 | (list ghc-happy |
| 106 | ghc-hunit |
| 107 | ghc-hspec |
| 108 | hspec-discover |
| 109 | ghc-tasty |
| 110 | ghc-tasty-golden |
| 111 | ghc-tasty-hspec)) |
| 112 | (arguments |
| 113 | `(;; Tests require npm |
| 114 | #:tests? #f |
| 115 | #:configure-flags '("--flags=release") |
| 116 | #:phases |
| 117 | (modify-phases %standard-phases |
| 118 | (add-before 'configure 'update-constraints |
| 119 | (lambda _ |
| 120 | (substitute* "purescript.cabal" |
| 121 | (("\\b(ansi-terminal|cryptonite|dlist|language-javascript)\\s+[^,]+" all dep) |
| 122 | dep))))))) |
| 123 | (home-page "https://www.purescript.org/") |
| 124 | (synopsis "Haskell inspired programming language compiling to JavaScript") |
| 125 | (description |
| 126 | "Purescript is a small strongly, statically typed programming language with |
| 127 | expressive types, inspired by Haskell and compiling to JavaScript.") |
| 128 | (license license:bsd-3))) |
| 129 | |
| 130 | (define-public ghc-purescript-cst |
| 131 | (package |
| 132 | (name "ghc-purescript-cst") |
| 133 | (version "0.4.0.0") |
| 134 | (source |
| 135 | (origin |
| 136 | (method url-fetch) |
| 137 | (uri (string-append |
| 138 | "https://hackage.haskell.org/package/purescript-cst/purescript-cst-" |
| 139 | version |
| 140 | ".tar.gz")) |
| 141 | (sha256 |
| 142 | (base32 "0r3f5lr9lrv9wpgkwj6nyl42lvxryj2lvr1w7ld4gki8ylq24n8g")))) |
| 143 | (build-system haskell-build-system) |
| 144 | (arguments |
| 145 | `(#:phases |
| 146 | (modify-phases %standard-phases |
| 147 | (add-before 'configure 'update-constraints |
| 148 | (lambda _ |
| 149 | (substitute* "purescript-cst.cabal" |
| 150 | (("\\b(dlist)\\s+[^,]+" all dep) |
| 151 | dep))))))) |
| 152 | (inputs |
| 153 | (list ghc-aeson |
| 154 | ghc-base-compat |
| 155 | ghc-dlist |
| 156 | ghc-microlens |
| 157 | ghc-protolude |
| 158 | ghc-scientific |
| 159 | ghc-semigroups |
| 160 | ghc-serialise |
| 161 | ghc-vector)) |
| 162 | (native-inputs (list ghc-happy)) |
| 163 | (home-page "https://www.purescript.org/") |
| 164 | (synopsis "PureScript Programming Language Concrete Syntax Tree") |
| 165 | (description |
| 166 | "This package implements parser for the PureScript programming language.") |
| 167 | (license license:bsd-3))) |