gnu: emacs-consult: Fix grammar.
[jackhill/guix/guix.git] / gnu / packages / elm.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2019 Robert Vollmert <rob@vllmrt.net>
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 elm)
20 #:use-module (gnu packages)
21 #:use-module (gnu packages haskell)
22 #:use-module (gnu packages haskell-check)
23 #:use-module (gnu packages haskell-crypto)
24 #:use-module (gnu packages haskell-xyz)
25 #:use-module (gnu packages haskell-web)
26 #:use-module (guix build-system haskell)
27 #:use-module (guix git-download)
28 #:use-module ((guix licenses) #:prefix license:)
29 #:use-module (guix packages))
30
31 ;; The full elm build calls out to itself via Template Haskell to
32 ;; compile the elm reactor web app. elm reactor isn't required to
33 ;; compile elm applications, so we take this part out of this
34 ;; bootstrap package.
35 (define-public elm-compiler
36 (package
37 (name "elm-compiler")
38 (version "0.19.0")
39 (source
40 (origin
41 (method git-fetch)
42 (file-name (git-file-name name version))
43 (uri (git-reference
44 (url "https://github.com/elm/compiler/")
45 (commit version)))
46 (sha256
47 (base32 "0s93z9vr0vp5w894ghc5s34nsq09sg1msf59zfiba87sid5vgjqy"))
48 (patches
49 (search-patches "elm-compiler-disable-reactor.patch"
50 "elm-compiler-fix-map-key.patch"))))
51 (build-system haskell-build-system)
52 (arguments
53 `(#:phases
54 (modify-phases %standard-phases
55 (add-after 'unpack 'update-constraints
56 (lambda _
57 (substitute* "elm.cabal"
58 (("ansi-terminal >= 0\\.8 && < 0\\.9,")
59 "ansi-terminal >= 0.8 && < 0.10,")
60 (("containers >= 0\\.5\\.8\\.2 && < 0\\.6,")
61 "containers >= 0.5.8.2 && < 0.7,")
62 (("http-client >= 0\\.5 && < 0\\.6,")
63 "http-client >= 0.5 && < 0.7,")
64 (("language-glsl >= 0\\.0\\.2 && < 0\\.3,")
65 "language-glsl >= 0.0.2 && < 0.4,")
66 (("network >= 2\\.4 && < 2\\.7,")
67 "network >= 2.4 && < 2.9,"))
68 #t)))))
69 (inputs
70 `(("ghc-ansi-terminal" ,ghc-ansi-terminal)
71 ("ghc-ansi-wl-pprint" ,ghc-ansi-wl-pprint)
72 ("ghc-edit-distance" ,ghc-edit-distance)
73 ("ghc-file-embed" ,ghc-file-embed)
74 ("ghc-http" ,ghc-http)
75 ("ghc-http-client" ,ghc-http-client)
76 ("ghc-http-client-tls" ,ghc-http-client-tls)
77 ("ghc-http-types" ,ghc-http-types)
78 ("ghc-language-glsl" ,ghc-language-glsl)
79 ("ghc-logict" ,ghc-logict)
80 ("ghc-network" ,ghc-network)
81 ("ghc-raw-strings-qq" ,ghc-raw-strings-qq)
82 ("ghc-scientific" ,ghc-scientific)
83 ("ghc-sha" ,ghc-sha)
84 ("ghc-snap-core" ,ghc-snap-core)
85 ("ghc-snap-server" ,ghc-snap-server)
86 ("ghc-unordered-containers"
87 ,ghc-unordered-containers)
88 ("ghc-utf8-string" ,ghc-utf8-string)
89 ("ghc-vector" ,ghc-vector)
90 ("ghc-zip-archive" ,ghc-zip-archive)))
91 (home-page "https://elm-lang.org")
92 (synopsis "Programming language for Web applications")
93 (description
94 "This package provides Elm, a statically-typed functional programming
95 language for the browser. It includes commands for developers such as
96 @command{elm make} and @command{elm repl}.")
97 (license license:bsd-3)))