aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/purescript.scm
blob: 244fe0ed7df7e75de95dc8ff84573c35acd480fa (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2020 John Soo <jsoo1@asu.edu>
;;;
;;; This file is part of GNU Guix.
;;;
;;; GNU Guix is free software; you can redistribute it and/or modify it
;;; under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 3 of the License, or (at
;;; your option) any later version.
;;;
;;; GNU Guix is distributed in the hope that it will be useful, but
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.

(define-module (gnu packages purescript)
  #:use-module (gnu packages haskell-xyz)
  #:use-module (gnu packages haskell-check)
  #:use-module (gnu packages haskell-crypto)
  #:use-module (gnu packages haskell-web)
  #:use-module ((gnu packages python) #:select (python))
  #:use-module (guix download)
  #:use-module (guix git-download)
  #:use-module (guix packages)
  #:use-module (guix build-system haskell)
  #:use-module ((guix licenses) #:prefix license:))

(define ghc-happy-1.19.9
  (package
    (inherit ghc-happy)
    (version "1.19.9")
    (source
     (origin
       (method url-fetch)
       (uri (string-append
             "https://hackage.haskell.org/package/happy/happy-"
             version
             ".tar.gz"))
       (sha256
        (base32
         "138xpxdb7x62lpmgmb6b3v3vgdqqvqn4273jaap3mjmc2gla709y"))))))
kc3vajaijqhj1dy5hw85j2hwwxdkg8rvs2fc00qaf44ad1d"))))
(build-system ocaml-build-system)
+ (propagated-inputs `(("ocaml-num" ,ocaml-num)))
(native-inputs
`(("ocamlbuild" ,ocamlbuild)
- ("qtest" ,ocaml-qtest)))
- (propagated-inputs
- `(("ocaml-num" ,ocaml-num)))
+ ("ocaml-benchmark" ,ocaml-benchmark)
+ ("ocaml-qcheck" ,ocaml-qcheck)
+ ("ocaml-qtest" ,ocaml-qtest)))
(arguments
`(#:phases
(modify-phases %standard-phases
- (delete 'check) ; tests are run by the build phase
+ (add-after 'unpack 'make-writable
+ (lambda _
+ (for-each make-file-writable (find-files "." "."))))
(add-before 'build 'fix-nondeterminism
(lambda _
(substitute* "setup.ml"
(("Sys.readdir dirname")
"let a = Sys.readdir dirname in Array.sort String.compare a; a"))
- #t))
- (replace 'build
- (lambda* (#:key inputs outputs #:allow-other-keys)
- (let ((files
- (map (lambda (str)
- (substring str 0 (- (string-length str) 1)))
- (append
- (find-files "src" ".*.mliv")
- (find-files "src" ".*.mlv")
- (find-files "src" ".*.mlp")))))
- (apply invoke "ocamlbuild" "-no-links" "-use-ocamlfind" "-I" "num"
- "-lflag" "-dllpath-all" files)
- (for-each (lambda (file)
- (copy-file (string-append "_build/" file) file))
- files))
- (invoke "ocamlbuild" "-no-links" "-use-ocamlfind" "-I" "num"
- "-lflag" "-dllpath-all" "build/mkconf.byte")
- (copy-file "_build/build/mkconf.byte" "build/mkconf.byte")
- (invoke "make" "all")
#t)))))
+ (properties `((ocaml4.07-variant . ,(delay ocaml4.07-batteries))))
(home-page "http://batteries.forge.ocamlcore.org/")
(synopsis "Development platform for the OCaml programming language")
(description "Define a standard set of libraries which may be expected on
@@ -3259,6 +3245,54 @@ every compliant installation of OCaml and organize these libraries into a
hierarchy of modules.")
(license license:lgpl2.1+)))
+(define-public ocaml4.07-batteries
+ (package-with-ocaml4.07
+ (package
+ (inherit ocaml-batteries)
+ (version "2.10.0")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/ocaml-batteries-team/batteries-included")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name "ocaml-batteries" version))
+ (sha256
+ (base32
+ "02fxa1nkp7rpiwfp04n0sagdp9lad4dh9bvljp95xfshm1cx7y4q"))))
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (delete 'check) ; tests are run by the build phase
+ (add-before 'build 'fix-nondeterminism
+ (lambda _
+ (substitute* "setup.ml"
+ (("Sys.readdir dirname")
+ "let a = Sys.readdir dirname in Array.sort String.compare a; a"))
+ #t))
+ (replace 'build
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let ((files
+ (map (lambda (str)
+ (substring str 0 (- (string-length str) 1)))
+ (append
+ (find-files "src" ".*.mliv")
+ (find-files "src" ".*.mlv")
+ (find-files "src" ".*.mlp")))))
+ (apply invoke "ocamlbuild" "-no-links" "-use-ocamlfind" "-I" "num"
+ "-lflag" "-dllpath-all" files)
+ (for-each (lambda (file)
+ (copy-file (string-append "_build/" file) file))
+ files))
+ (invoke "ocamlbuild" "-no-links" "-use-ocamlfind" "-I" "num"
+ "-lflag" "-dllpath-all" "build/mkconf.byte")
+ (copy-file "_build/build/mkconf.byte" "build/mkconf.byte")
+ (invoke "make" "all")
+ #t)))))
+ (native-inputs
+ `(("ocamlbuild" ,ocamlbuild)
+ ("qtest" ,ocaml-qtest)))
+ (properties '()))))
+
(define-public ocaml-pcre
(package
(name "ocaml-pcre")