summary refs log tree commit diff
path: root/gnu
diff options
context:
space:
mode:
authorJohn Soo <jsoo1@asu.edu>2019-12-13 09:21:50 -0800
committerChristopher Baines <mail@cbaines.net>2020-05-08 09:58:15 +0100
commitde488b3a5fff4535471f6706da03e1b74e6a37fd (patch)
tree16c3142f7f7b3e487d7e30eca9eff8230bb91c85 /gnu
parent5c826341a3a42030b8fccaa2c220b44a3e11983b (diff)
downloadguix-de488b3a5fff4535471f6706da03e1b74e6a37fd.tar.gz
gnu: Add purescript.
* gnu/packages/purescript.scm (purescript): New variable.
* gnu/packages/patches/purescript-relax-dependencies.patch: New file.
* gnu/local.mk: Add it.

Signed-off-by: Christopher Baines <mail@cbaines.net>
Diffstat (limited to 'gnu')
-rw-r--r--gnu/local.mk1
-rw-r--r--gnu/packages/patches/purescript-relax-dependencies.patch42
-rw-r--r--gnu/packages/purescript.scm89
3 files changed, 132 insertions, 0 deletions
diff --git a/gnu/local.mk b/gnu/local.mk
index 4f618bcc17..39267f2765 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1357,6 +1357,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/psm-repro.patch				\
   %D%/packages/patches/pulseaudio-fix-mult-test.patch		\
   %D%/packages/patches/pulseaudio-longer-test-timeout.patch	\
+  %D%/packages/patches/purescript-relax-dependencies.patch	\
   %D%/packages/patches/pybugz-encode-error.patch		\
   %D%/packages/patches/pybugz-stty.patch			\
   %D%/packages/patches/pygpgme-disable-problematic-tests.patch  \
diff --git a/gnu/packages/patches/purescript-relax-dependencies.patch b/gnu/packages/patches/purescript-relax-dependencies.patch
new file mode 100644
index 0000000000..11c4a3c3fc
--- /dev/null
+++ b/gnu/packages/patches/purescript-relax-dependencies.patch
@@ -0,0 +1,42 @@
+Allow the purescript dependencies to better match the available packages in
+Guix.
+
+diff --git purescript-0.13.6/purescript.cabal purescript-0.13.6/purescript.cabal.orig
+index 7e38070..0724a0b 100644
+--- purescript-0.13.6/purescript.cabal
++++ purescript-0.13.6/purescript.cabal.orig
+@@ -1167,1 +1167,1 @@ library
+-        Glob ==0.9.*,
++        Glob ==0.10.*,
+@@ -1171,1 +1171,1 @@ library
+-        ansi-terminal >=0.7.1 && <0.9,
++        ansi-terminal ==0.9.*,
+@@ -1180,1 +1180,1 @@ library
+-        clock <0.8,
++        clock ==0.8.*,
+@@ -1246,1 +1246,1 @@ executable purs
+-        Glob ==0.9.*,
++        Glob ==0.10.*,
+@@ -1250,1 +1250,1 @@ executable purs
+-        ansi-terminal >=0.7.1 && <0.9,
++        ansi-terminal ==0.9.*,
+@@ -1260,1 +1260,1 @@ executable purs
+-        clock <0.8,
++        clock ==0.8.*,
+@@ -1281,1 +1281,1 @@ executable purs
+-        network >=3.0.1.1 && <3.1,
++        network >=2.8 && <3.1,
+@@ -1358,1 +1358,1 @@ test-suite tests
+-        Glob ==0.9.*,
++        Glob ==0.10.*,
+@@ -1363,1 +1363,1 @@ test-suite tests
+-        ansi-terminal >=0.7.1 && <0.9,
++        ansi-terminal ==0.9.*,
+@@ -1372,1 +1372,1 @@ test-suite tests
+-        clock <0.8,
++        clock ==0.8.*,
+@@ -1384,2 +1384,2 @@ test-suite tests
+-        hspec <2.7,
+-        hspec-discover <2.7,
++        hspec ==2.7.*,
++        hspec-discover ==2.7.*,
diff --git a/gnu/packages/purescript.scm b/gnu/packages/purescript.scm
index 244fe0ed7d..13cd773839 100644
--- a/gnu/packages/purescript.scm
+++ b/gnu/packages/purescript.scm
@@ -17,6 +17,7 @@
 ;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
 
 (define-module (gnu packages purescript)
+  #:use-module (gnu packages)
   #:use-module (gnu packages haskell-xyz)
   #:use-module (gnu packages haskell-check)
   #:use-module (gnu packages haskell-crypto)
@@ -42,3 +43,91 @@
        (sha256
         (base32
          "138xpxdb7x62lpmgmb6b3v3vgdqqvqn4273jaap3mjmc2gla709y"))))))
+
+(define-public purescript
+  (package
+    (name "purescript")
+    (version "0.13.6")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append
+             "mirror://hackage/package/purescript/purescript-"
+             version
+             ".tar.gz"))
+       (sha256
+        (base32
+         "1xss3wpv6wb38gsh9r635s09cxzmiz81hhssdxzdba2pw6ifzx8j"))
+       (patches (search-patches "purescript-relax-dependencies.patch"))))
+    (build-system haskell-build-system)
+    (inputs
+     `(("ghc-glob" ,ghc-glob)
+       ("ghc-aeson" ,ghc-aeson)
+       ("ghc-aeson-better-errors" ,ghc-aeson-better-errors)
+       ("ghc-aeson-pretty" ,ghc-aeson-pretty)
+       ("ghc-ansi-terminal" ,ghc-ansi-terminal)
+       ("ghc-base-compat" ,ghc-base-compat)
+       ("ghc-blaze-html" ,ghc-blaze-html)
+       ("ghc-bower-json" ,ghc-bower-json)
+       ("ghc-boxes" ,ghc-boxes)
+       ("ghc-cheapskate" ,ghc-cheapskate)
+       ("ghc-clock" ,ghc-clock)
+       ("ghc-cryptonite" ,ghc-cryptonite)
+       ("ghc-data-ordlist" ,ghc-data-ordlist)
+       ("ghc-dlist" ,ghc-dlist)
+       ("ghc-edit-distance" ,ghc-edit-distance)
+       ("ghc-file-embed" ,ghc-file-embed)
+       ("ghc-fsnotify" ,ghc-fsnotify)
+       ("ghc-happy" ,ghc-happy)
+       ("ghc-language-javascript" ,ghc-language-javascript)
+       ("ghc-lifted-async" ,ghc-lifted-async)
+       ("ghc-lifted-base" ,ghc-lifted-base)
+       ("ghc-memory" ,ghc-memory)
+       ("ghc-microlens-platform" ,ghc-microlens-platform)
+       ("ghc-monad-control" ,ghc-monad-control)
+       ("ghc-monad-logger" ,ghc-monad-logger)
+       ("ghc-network" ,ghc-network)
+       ("ghc-parallel" ,ghc-parallel)
+       ("ghc-pattern-arrows" ,ghc-pattern-arrows)
+       ("ghc-protolude" ,ghc-protolude)
+       ("ghc-regex-tdfa" ,ghc-regex-tdfa)
+       ("ghc-safe" ,ghc-safe)
+       ("ghc-scientific" ,ghc-scientific)
+       ("ghc-semialign" ,ghc-semialign)
+       ("ghc-semigroups" ,ghc-semigroups)
+       ("ghc-sourcemap" ,ghc-sourcemap)
+       ("ghc-split" ,ghc-split)
+       ("ghc-stringsearch" ,ghc-stringsearch)
+       ("ghc-syb" ,ghc-syb)
+       ("ghc-these" ,ghc-these)
+       ("ghc-transformers-base" ,ghc-transformers-base)
+       ("ghc-transformers-compat" ,ghc-transformers-compat)
+       ("ghc-unordered-containers" ,ghc-unordered-containers)
+       ("ghc-utf8-string" ,ghc-utf8-string)
+       ("ghc-vector" ,ghc-vector)
+       ("ghc-ansi-wl-pprint" ,ghc-ansi-wl-pprint)
+       ("ghc-http-types" ,ghc-http-types)
+       ("ghc-network" ,ghc-network)
+       ("ghc-optparse-applicative" ,ghc-optparse-applicative)
+       ("ghc-wai" ,ghc-wai)
+       ("ghc-wai-websockets" ,ghc-wai-websockets)
+       ("ghc-warp" ,ghc-warp)
+       ("ghc-websockets" ,ghc-websockets)))
+    (native-inputs
+     `(("ghc-happy" ,ghc-happy-1.19.9) ; build fails with 1.19.12
+       ("ghc-hunit" ,ghc-hunit)
+       ("ghc-hspec" ,ghc-hspec)
+       ("hspec-discover" ,hspec-discover)
+       ("ghc-tasty" ,ghc-tasty)
+       ("ghc-tasty-golden" ,ghc-tasty-golden)
+       ("ghc-tasty-hspec" ,ghc-tasty-hspec)))
+    (arguments
+     `(;; Tests require npm
+       #:tests? #f
+       #:configure-flags '("--flags=release")))
+    (home-page "https://www.purescript.org/")
+    (synopsis "Haskell inspired programming language compiling to JavaScript")
+    (description
+     "Purescript is a small strongly, statically typed programming language with
+expressive types, inspired by Haskell and compiling to JavaScript.")
+    (license license:bsd-3)))