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>
This commit is contained in:
John Soo 2019-12-13 09:21:50 -08:00 committed by Christopher Baines
parent 5c826341a3
commit de488b3a5f
No known key found for this signature in database
GPG key ID: 5E28A33B0B84F577
3 changed files with 132 additions and 0 deletions

View file

@ -1357,6 +1357,7 @@ dist_patch_DATA = \
%D%/packages/patches/psm-repro.patch \ %D%/packages/patches/psm-repro.patch \
%D%/packages/patches/pulseaudio-fix-mult-test.patch \ %D%/packages/patches/pulseaudio-fix-mult-test.patch \
%D%/packages/patches/pulseaudio-longer-test-timeout.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-encode-error.patch \
%D%/packages/patches/pybugz-stty.patch \ %D%/packages/patches/pybugz-stty.patch \
%D%/packages/patches/pygpgme-disable-problematic-tests.patch \ %D%/packages/patches/pygpgme-disable-problematic-tests.patch \

View file

@ -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.*,

View file

@ -17,6 +17,7 @@
;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
(define-module (gnu packages purescript) (define-module (gnu packages purescript)
#:use-module (gnu packages)
#:use-module (gnu packages haskell-xyz) #:use-module (gnu packages haskell-xyz)
#:use-module (gnu packages haskell-check) #:use-module (gnu packages haskell-check)
#:use-module (gnu packages haskell-crypto) #:use-module (gnu packages haskell-crypto)
@ -42,3 +43,91 @@ (define ghc-happy-1.19.9
(sha256 (sha256
(base32 (base32
"138xpxdb7x62lpmgmb6b3v3vgdqqvqn4273jaap3mjmc2gla709y")))))) "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)))