gnu: Add purescript.
[jackhill/guix/guix.git] / gnu / packages / purescript.scm
CommitLineData
5c826341
JS
1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2020 John Soo <jsoo1@asu.edu>
3;;;
4;;; This file is part of GNU Guix.
5;;;
6;;; GNU Guix is free software; you can redistribute it and/or modify it
7;;; under the terms of the GNU General Public License as published by
8;;; the Free Software Foundation; either version 3 of the License, or (at
9;;; your option) any later version.
10;;;
11;;; GNU Guix is distributed in the hope that it will be useful, but
12;;; WITHOUT ANY WARRANTY; without even the implied warranty of
13;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14;;; GNU General Public License for more details.
15;;;
16;;; You should have received a copy of the GNU General Public License
17;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
18
19(define-module (gnu packages purescript)
de488b3a 20 #:use-module (gnu packages)
5c826341
JS
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
32(define ghc-happy-1.19.9
33 (package
34 (inherit ghc-happy)
35 (version "1.19.9")
36 (source
37 (origin
38 (method url-fetch)
39 (uri (string-append
40 "https://hackage.haskell.org/package/happy/happy-"
41 version
42 ".tar.gz"))
43 (sha256
44 (base32
45 "138xpxdb7x62lpmgmb6b3v3vgdqqvqn4273jaap3mjmc2gla709y"))))))
de488b3a
JS
46
47(define-public purescript
48 (package
49 (name "purescript")
50 (version "0.13.6")
51 (source
52 (origin
53 (method url-fetch)
54 (uri (string-append
55 "mirror://hackage/package/purescript/purescript-"
56 version
57 ".tar.gz"))
58 (sha256
59 (base32
60 "1xss3wpv6wb38gsh9r635s09cxzmiz81hhssdxzdba2pw6ifzx8j"))
61 (patches (search-patches "purescript-relax-dependencies.patch"))))
62 (build-system haskell-build-system)
63 (inputs
64 `(("ghc-glob" ,ghc-glob)
65 ("ghc-aeson" ,ghc-aeson)
66 ("ghc-aeson-better-errors" ,ghc-aeson-better-errors)
67 ("ghc-aeson-pretty" ,ghc-aeson-pretty)
68 ("ghc-ansi-terminal" ,ghc-ansi-terminal)
69 ("ghc-base-compat" ,ghc-base-compat)
70 ("ghc-blaze-html" ,ghc-blaze-html)
71 ("ghc-bower-json" ,ghc-bower-json)
72 ("ghc-boxes" ,ghc-boxes)
73 ("ghc-cheapskate" ,ghc-cheapskate)
74 ("ghc-clock" ,ghc-clock)
75 ("ghc-cryptonite" ,ghc-cryptonite)
76 ("ghc-data-ordlist" ,ghc-data-ordlist)
77 ("ghc-dlist" ,ghc-dlist)
78 ("ghc-edit-distance" ,ghc-edit-distance)
79 ("ghc-file-embed" ,ghc-file-embed)
80 ("ghc-fsnotify" ,ghc-fsnotify)
81 ("ghc-happy" ,ghc-happy)
82 ("ghc-language-javascript" ,ghc-language-javascript)
83 ("ghc-lifted-async" ,ghc-lifted-async)
84 ("ghc-lifted-base" ,ghc-lifted-base)
85 ("ghc-memory" ,ghc-memory)
86 ("ghc-microlens-platform" ,ghc-microlens-platform)
87 ("ghc-monad-control" ,ghc-monad-control)
88 ("ghc-monad-logger" ,ghc-monad-logger)
89 ("ghc-network" ,ghc-network)
90 ("ghc-parallel" ,ghc-parallel)
91 ("ghc-pattern-arrows" ,ghc-pattern-arrows)
92 ("ghc-protolude" ,ghc-protolude)
93 ("ghc-regex-tdfa" ,ghc-regex-tdfa)
94 ("ghc-safe" ,ghc-safe)
95 ("ghc-scientific" ,ghc-scientific)
96 ("ghc-semialign" ,ghc-semialign)
97 ("ghc-semigroups" ,ghc-semigroups)
98 ("ghc-sourcemap" ,ghc-sourcemap)
99 ("ghc-split" ,ghc-split)
100 ("ghc-stringsearch" ,ghc-stringsearch)
101 ("ghc-syb" ,ghc-syb)
102 ("ghc-these" ,ghc-these)
103 ("ghc-transformers-base" ,ghc-transformers-base)
104 ("ghc-transformers-compat" ,ghc-transformers-compat)
105 ("ghc-unordered-containers" ,ghc-unordered-containers)
106 ("ghc-utf8-string" ,ghc-utf8-string)
107 ("ghc-vector" ,ghc-vector)
108 ("ghc-ansi-wl-pprint" ,ghc-ansi-wl-pprint)
109 ("ghc-http-types" ,ghc-http-types)
110 ("ghc-network" ,ghc-network)
111 ("ghc-optparse-applicative" ,ghc-optparse-applicative)
112 ("ghc-wai" ,ghc-wai)
113 ("ghc-wai-websockets" ,ghc-wai-websockets)
114 ("ghc-warp" ,ghc-warp)
115 ("ghc-websockets" ,ghc-websockets)))
116 (native-inputs
117 `(("ghc-happy" ,ghc-happy-1.19.9) ; build fails with 1.19.12
118 ("ghc-hunit" ,ghc-hunit)
119 ("ghc-hspec" ,ghc-hspec)
120 ("hspec-discover" ,hspec-discover)
121 ("ghc-tasty" ,ghc-tasty)
122 ("ghc-tasty-golden" ,ghc-tasty-golden)
123 ("ghc-tasty-hspec" ,ghc-tasty-hspec)))
124 (arguments
125 `(;; Tests require npm
126 #:tests? #f
127 #:configure-flags '("--flags=release")))
128 (home-page "https://www.purescript.org/")
129 (synopsis "Haskell inspired programming language compiling to JavaScript")
130 (description
131 "Purescript is a small strongly, statically typed programming language with
132expressive types, inspired by Haskell and compiling to JavaScript.")
133 (license license:bsd-3)))