[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
02/02: gnu: ocaml-batteries: Update to 3.3.0.
From: |
guix-commits |
Subject: |
02/02: gnu: ocaml-batteries: Update to 3.3.0. |
Date: |
Wed, 24 Nov 2021 08:53:34 -0500 (EST) |
roptat pushed a commit to branch master
in repository guix.
commit 4ac084e52d999066ce3c316f153833dd7f4769f5
Author: Julien Lepiller <julien@lepiller.eu>
AuthorDate: Wed Nov 24 14:48:21 2021 +0100
gnu: ocaml-batteries: Update to 3.3.0.
* gnu/packages/ocaml.scm (ocaml-batteries): Update to 3.3.0.
(ocaml4.07-batteries): New variable.
---
gnu/packages/ocaml.scm | 92 ++++++++++++++++++++++++++++++++++----------------
1 file changed, 63 insertions(+), 29 deletions(-)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 69d37f3..102348a 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -3208,50 +3208,36 @@ is used to determine whether the results truly differ.")
(define-public ocaml-batteries
(package
(name "ocaml-batteries")
- (version "2.10.0")
+ (version "3.3.0")
(source (origin
- (method url-fetch)
- (uri (string-append "https://github.com/ocaml-batteries-team/"
- "batteries-included/releases/download/v"
- version "/batteries-" version ".tar.gz"))
+ (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 name version))
(sha256
(base32
- "08ghw87d56h1a6y1nnh3x2wy9xj25jqfk5sp6ma9nsyd37babb0h"))))
+ "1h03nkc3vajaijqhj1dy5hw85j2hwwxdkg8rvs2fc00qaf44ad1d"))))
(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")