gnu: Add ocaml-base.

* gnu/packages/ocaml.scm (ocaml-base): New variable.
(ocaml4.07-base): Inherit from ocaml-base.

Signed-off-by: Julien Lepiller <julien@lepiller.eu>
This commit is contained in:
pukkamustard 2020-12-28 22:10:05 +01:00 committed by Julien Lepiller
parent adb30e517b
commit 55c2851a19
No known key found for this signature in database
GPG key ID: 53D457B2D636EE82

View file

@ -1608,7 +1608,7 @@ (define-public ocaml4.07-sqlite3
#:findlib ,ocaml4.07-findlib
#:dune ,ocaml4.07-dune))
(native-inputs
`(("ocaml-base" ,ocaml4.07-base)
`(("ocaml-base" ,(package-with-ocaml4.07 ocaml-base))
("ocaml-stdio" ,ocaml4.07-stdio)
("pkg-config" ,pkg-config)))
(inputs
@ -2561,7 +2561,7 @@ (define-public ocaml4.07-pcre
#:findlib ,ocaml4.07-findlib
#:dune ,ocaml4.07-dune))
(native-inputs
`(("ocaml-base" ,ocaml4.07-base)
`(("ocaml-base" ,(package-with-ocaml4.07 ocaml-base))
("pcre:bin" ,pcre "bin")))
(propagated-inputs `(("pcre" ,pcre)))
(home-page "https://mmottl.github.io/pcre-ocaml")
@ -3653,7 +3653,7 @@ (define-public ocaml4.07-ppx-inline-test
#:findlib ,ocaml4.07-findlib
#:dune ,ocaml4.07-dune))
(inputs
`(("ocaml-base" ,ocaml4.07-base)
`(("ocaml-base" ,(package-with-ocaml4.07 ocaml-base))
("ocaml-migrate-parsetree"
,(package-with-ocaml4.07 ocaml-migrate-parsetree))
("ocaml-compiler-libs" ,ocaml4.07-compiler-libs)
@ -3947,7 +3947,7 @@ (define-public ocaml4.07-gsl
(inputs
`(("gsl" ,gsl)))
(propagated-inputs
`(("ocaml-base" ,ocaml4.07-base)
`(("ocaml-base" ,(package-with-ocaml4.07 ocaml-base))
("ocaml-stdio" ,ocaml4.07-stdio)))
(home-page "https://mmottl.github.io/gsl-ocaml")
(synopsis "Bindings to the GNU Scientific Library")
@ -4147,38 +4147,22 @@ (define-public ocaml4.07-sexplib
functionality for parsing and pretty-printing s-expressions.")
(license license:expat)))
(define-public ocaml4.07-base
(define-public ocaml-base
(package
(name "ocaml4.07-base")
(version "0.11.1")
(name "ocaml-base")
(version "0.14.0")
(home-page "https://github.com/janestreet/base")
(source
(origin
(method git-fetch)
(uri (git-reference
(url (string-append home-page ".git"))
(commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256
(base32
"0j6xb4265jr41vw4fjzak6yr8s30qrnzapnc6rl1dxy8bjai0nir"))))
(janestreet-origin "base" version
"1rkdhsgbcv0a8p29mwvpd2ldz8cjk97pixl43izm54wyin4lp778"))
(build-system dune-build-system)
(propagated-inputs
`(("ocaml-sexplib0" ,(package-with-ocaml4.07 ocaml-sexplib0))))
(arguments
`(#:phases
(modify-phases %standard-phases
(replace 'build
;; make warnings non fatal (jbuilder behaviour)
(lambda _
(invoke "dune" "build" "@install" "--profile=release"))))
#:ocaml ,ocaml-4.07
#:findlib ,ocaml4.07-findlib
#:dune ,ocaml4.07-dune))
(synopsis
"Full standard library replacement for OCaml")
(description
"Base is a complete and portable alternative to the OCaml standard
`(("ocaml-sexplib0" ,ocaml-sexplib0)))
(properties `((ocaml4.07-variant . ,(delay ocaml4.07-base))))
(synopsis
"Full standard library replacement for OCaml")
(description
"Base is a complete and portable alternative to the OCaml standard
library. It provides all standard functionalities one would expect
from a language standard library. It uses consistent conventions
across all of its module.
@ -4187,7 +4171,36 @@ (define-public ocaml4.07-base
features such as I/O are not offered by Base. They are instead
provided by companion libraries such as
@url{https://github.com/janestreet/stdio, ocaml-stdio}.")
(license license:expat)))
(license license:expat)))
(define-public ocaml4.07-base
(package-with-ocaml4.07
(package
(inherit ocaml-base)
(name "ocaml-base")
(version "0.11.1")
(source
(origin
;; version 0.11.1 is not released on ocaml.janestreet.org.
(method git-fetch)
(uri (git-reference
(url "https://github.com/janestreet/base.git")
(commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256
(base32
"0j6xb4265jr41vw4fjzak6yr8s30qrnzapnc6rl1dxy8bjai0nir"))))
(arguments
`(#:phases
(modify-phases %standard-phases
(replace 'build
;; make warnings non fatal (jbuilder behaviour)
(lambda _
(invoke "dune" "build" "@install" "--profile=release"))))
#:ocaml ,ocaml-4.07
#:findlib ,ocaml4.07-findlib
#:dune ,ocaml4.07-dune))
(properties '()))))
(define-public ocaml4.07-compiler-libs
(package
@ -4234,7 +4247,7 @@ (define-public ocaml4.07-stdio
"1facajqhvq34g2wrg368y0ajxd6lrj5b3lyzyj0jhdmraxajjcwn"))))
(build-system dune-build-system)
(propagated-inputs
`(("ocaml-base" ,ocaml4.07-base)
`(("ocaml-base" ,(package-with-ocaml4.07 ocaml-base))
("ocaml-sexplib0" ,(package-with-ocaml4.07 ocaml-sexplib0))))
(arguments
`(#:tests? #f ;no tests
@ -4292,7 +4305,7 @@ (define-public ocaml4.07-ppxlib
"0my9x7sxb329h0lzshppdaawiyfbaw6g5f41yiy7bhl071rnlvbv"))))
(build-system dune-build-system)
(propagated-inputs
`(("ocaml-base" ,ocaml4.07-base)
`(("ocaml-base" ,(package-with-ocaml4.07 ocaml-base))
("ocaml-compiler-libs" ,ocaml4.07-compiler-libs)
("ocaml-migrate-parsetree"
,(package-with-ocaml4.07 ocaml-migrate-parsetree))
@ -4355,7 +4368,7 @@ (define-public ocaml4.07-ppx-compare
"06bq4m1bsm4jlx4g7wh5m99qky7xm4c2g52kaz6pv25hdn5agi2m"))))
(build-system dune-build-system)
(propagated-inputs
`(("ocaml-base" ,ocaml4.07-base)
`(("ocaml-base" ,(package-with-ocaml4.07 ocaml-base))
("ocaml-migrate-parsetree"
,(package-with-ocaml4.07 ocaml-migrate-parsetree))
("ocaml-ppxlib" ,ocaml4.07-ppxlib)))
@ -4394,7 +4407,7 @@ (define-public ocaml4.07-fieldslib
#:findlib ,ocaml4.07-findlib
#:dune ,ocaml4.07-dune))
(propagated-inputs
`(("ocaml-base" ,ocaml4.07-base)
`(("ocaml-base" ,(package-with-ocaml4.07 ocaml-base))
("ocaml-migrate-parsetree"
,(package-with-ocaml4.07 ocaml-migrate-parsetree))
("ocaml-ppxlib" ,ocaml4.07-ppxlib)))
@ -4426,7 +4439,7 @@ (define-public ocaml4.07-variantslib
#:findlib ,ocaml4.07-findlib
#:dune ,ocaml4.07-dune))
(propagated-inputs
`(("ocaml-base" ,ocaml4.07-base)
`(("ocaml-base" ,(package-with-ocaml4.07 ocaml-base))
("ocaml-migrate-parsetree"
,(package-with-ocaml4.07 ocaml-migrate-parsetree))
("ocaml-ppxlib" ,ocaml4.07-ppxlib)))
@ -4451,7 +4464,7 @@ (define-public ocaml4.07-ppx-fields-conv
"07zrd3qky2ppbfl55gpm90rvqa5860xgwcsvihrjmkrw6d0jirkc"))))
(build-system dune-build-system)
(propagated-inputs
`(("ocaml-base" ,ocaml4.07-base)
`(("ocaml-base" ,(package-with-ocaml4.07 ocaml-base))
("ocaml-fieldslib" ,ocaml4.07-fieldslib)
("ocaml-migrate-parsetree"
,(package-with-ocaml4.07 ocaml-migrate-parsetree))
@ -4484,7 +4497,7 @@ (define-public ocaml4.07-ppx-sexp-conv
"0pqwnqy1xp309wvdcaax4lg02yk64lq2w03mbgfvf6ps5ry4gis9"))))
(build-system dune-build-system)
(propagated-inputs
`(("ocaml-base" ,ocaml4.07-base)
`(("ocaml-base" ,(package-with-ocaml4.07 ocaml-base))
("ocaml-migrate-parsetree"
,(package-with-ocaml4.07 ocaml-migrate-parsetree))
("ocaml-ppxlib" ,ocaml4.07-ppxlib)))
@ -4514,7 +4527,7 @@ (define-public ocaml4.07-ppx-variants-conv
"1yc0gsds5m2nv39zga8nnrca2n75rkqy5dz4xj1635ybz20hhbjd"))))
(build-system dune-build-system)
(propagated-inputs
`(("ocaml-base" ,ocaml4.07-base)
`(("ocaml-base" ,(package-with-ocaml4.07 ocaml-base))
("ocaml-variantslib" ,ocaml4.07-variantslib)
("ocaml-migrate-parsetree"
,(package-with-ocaml4.07 ocaml-migrate-parsetree))
@ -4547,7 +4560,7 @@ (define-public ocaml4.07-ppx-custom-printf
"11b73smf3g3bpd9lg014pr4rx285nk9mnk6g6464ph51jv0sqzhj"))))
(build-system dune-build-system)
(propagated-inputs
`(("ocaml-base" ,ocaml4.07-base)
`(("ocaml-base" ,(package-with-ocaml4.07 ocaml-base))
("ocaml-ppx-sexp-conv" ,ocaml4.07-ppx-sexp-conv)
("ocaml-migrate-parsetree"
,(package-with-ocaml4.07 ocaml-migrate-parsetree))
@ -4577,7 +4590,7 @@ (define-public ocaml4.07-bin-prot
"1rsd91gx36prj4whi76nsiz1bzpgal9nzyw3pxdz1alv4ilk2il6"))))
(build-system dune-build-system)
(inputs
`(("ocaml-base" ,ocaml4.07-base)
`(("ocaml-base" ,(package-with-ocaml4.07 ocaml-base))
("ocaml-ppx-compare" ,ocaml4.07-ppx-compare)
("ocaml-ppx-custom-printf" ,ocaml4.07-ppx-custom-printf)
("ocaml-ppx-fields-conv" ,ocaml4.07-ppx-fields-conv)
@ -4646,7 +4659,7 @@ (define-public ocaml4.07-ppx-hash
"1p0ic6aijxlrdggpmycj12q3cy9xksbq2vq727215maz4snvlf5p"))))
(build-system dune-build-system)
(propagated-inputs
`(("ocaml-base" ,ocaml4.07-base)
`(("ocaml-base" ,(package-with-ocaml4.07 ocaml-base))
("ocaml-ppx-compare" ,ocaml4.07-ppx-compare)
("ocaml-ppx-sexp-conv" ,ocaml4.07-ppx-sexp-conv)
("ocaml-migrate-parsetree"
@ -4683,7 +4696,7 @@ (define-public ocaml4.07-ppx-enumerate
#:findlib ,ocaml4.07-findlib
#:dune ,ocaml4.07-dune))
(propagated-inputs
`(("ocaml-base" ,ocaml4.07-base)
`(("ocaml-base" ,(package-with-ocaml4.07 ocaml-base))
("ocaml-migrate-parsetree"
,(package-with-ocaml4.07 ocaml-migrate-parsetree))
("ocaml-ppxlib" ,ocaml4.07-ppxlib)))
@ -4745,7 +4758,7 @@ (define-public ocaml4.07-ppx-here
#:findlib ,ocaml4.07-findlib
#:dune ,ocaml4.07-dune))
(propagated-inputs
`(("ocaml-base" ,ocaml4.07-base)
`(("ocaml-base" ,(package-with-ocaml4.07 ocaml-base))
("ocaml-migrate-parsetree"
,(package-with-ocaml4.07 ocaml-migrate-parsetree))
("ocaml-ppxlib" ,ocaml4.07-ppxlib)))
@ -4774,7 +4787,7 @@ (define-public ocaml4.07-typerep
#:ocaml ,ocaml-4.07
#:findlib ,ocaml4.07-findlib
#:dune ,ocaml4.07-dune))
(propagated-inputs `(("ocaml-base" ,ocaml4.07-base)))
(propagated-inputs `(("ocaml-base" ,(package-with-ocaml4.07 ocaml-base))))
(home-page "https://github.com/janestreet/typerep")
(synopsis "Typerep is a library for runtime types")
(description "Typerep is a library for runtime types.")
@ -4798,7 +4811,7 @@ (define-public ocaml4.07-ppx-sexp-value
#:findlib ,ocaml4.07-findlib
#:dune ,ocaml4.07-dune))
(propagated-inputs
`(("ocaml-base" ,ocaml4.07-base)
`(("ocaml-base" ,(package-with-ocaml4.07 ocaml-base))
("ocaml-ppx-here" ,ocaml4.07-ppx-here)
("ocaml-ppx-sexp-conv" ,ocaml4.07-ppx-sexp-conv)
("ocaml-migrate-parsetree"
@ -4829,7 +4842,7 @@ (define-public ocaml4.07-ppx-sexp-message
#:findlib ,ocaml4.07-findlib
#:dune ,ocaml4.07-dune))
(propagated-inputs
`(("ocaml-base" ,ocaml4.07-base)
`(("ocaml-base" ,(package-with-ocaml4.07 ocaml-base))
("ocaml-ppx-here" ,ocaml4.07-ppx-here)
("ocaml-ppx-sexp-conv" ,ocaml4.07-ppx-sexp-conv)
("ocaml-migrate-parsetree"
@ -4894,7 +4907,7 @@ (define-public ocaml4.07-ppx-optional
#:findlib ,ocaml4.07-findlib
#:dune ,ocaml4.07-dune))
(propagated-inputs
`(("ocaml-base" ,ocaml4.07-base)
`(("ocaml-base" ,(package-with-ocaml4.07 ocaml-base))
("ocaml-migrate-parsetree"
,(package-with-ocaml4.07 ocaml-migrate-parsetree))
("ocaml-ppxlib" ,ocaml4.07-ppxlib)))
@ -4924,7 +4937,7 @@ (define-public ocaml4.07-ppx-optcomp
#:findlib ,ocaml4.07-findlib
#:dune ,ocaml4.07-dune))
(propagated-inputs
`(("ocaml-base" ,ocaml4.07-base)
`(("ocaml-base" ,(package-with-ocaml4.07 ocaml-base))
("ocaml-stdio" ,ocaml4.07-stdio)
("ocaml-ppxlib" ,ocaml4.07-ppxlib)))
(properties `((upstream-name . "ppx_optcomp")))
@ -4953,7 +4966,7 @@ (define-public ocaml4.07-ppx-let
#:findlib ,ocaml4.07-findlib
#:dune ,ocaml4.07-dune))
(propagated-inputs
`(("ocaml-base" ,ocaml4.07-base)
`(("ocaml-base" ,(package-with-ocaml4.07 ocaml-base))
("ocaml-migrate-parsetree"
,(package-with-ocaml4.07 ocaml-migrate-parsetree))
("ocaml-ppxlib" ,ocaml4.07-ppxlib)))
@ -4982,7 +4995,7 @@ (define-public ocaml4.07-ppx-fail
#:findlib ,ocaml4.07-findlib
#:dune ,ocaml4.07-dune))
(propagated-inputs
`(("ocaml-base" ,ocaml4.07-base)
`(("ocaml-base" ,(package-with-ocaml4.07 ocaml-base))
("ocaml-ppx-here" ,ocaml4.07-ppx-here)
("ocaml-migrate-parsetree"
,(package-with-ocaml4.07 ocaml-migrate-parsetree))
@ -5012,7 +5025,7 @@ (define-public ocaml4.07-ppx-assert
#:findlib ,ocaml4.07-findlib
#:dune ,ocaml4.07-dune))
(propagated-inputs
`(("ocaml-base" ,ocaml4.07-base)
`(("ocaml-base" ,(package-with-ocaml4.07 ocaml-base))
("ocaml-ppx-compare" ,ocaml4.07-ppx-compare)
("ocaml-ppx-here" ,ocaml4.07-ppx-here)
("ocaml-ppx-sexp-conv" ,ocaml4.07-ppx-sexp-conv)
@ -5045,7 +5058,7 @@ (define-public ocaml4.07-ppx-expect
#:findlib ,ocaml4.07-findlib
#:dune ,ocaml4.07-dune))
(propagated-inputs
`(("ocaml-base" ,ocaml4.07-base)
`(("ocaml-base" ,(package-with-ocaml4.07 ocaml-base))
("ocaml-ppx-assert" ,ocaml4.07-ppx-assert)
("ocaml-ppx-compare" ,ocaml4.07-ppx-compare)
("ocaml-ppx-custom-printf" ,ocaml4.07-ppx-custom-printf)
@ -5089,7 +5102,7 @@ (define-public ocaml4.07-ppx-js-style
#:findlib ,ocaml4.07-findlib
#:dune ,ocaml4.07-dune))
(propagated-inputs
`(("ocaml-base" ,ocaml4.07-base)
`(("ocaml-base" ,(package-with-ocaml4.07 ocaml-base))
("ocaml-migrate-parsetree"
,(package-with-ocaml4.07 ocaml-migrate-parsetree))
("ocaml-octavius" ,(package-with-ocaml4.07 ocaml-octavius))
@ -5122,7 +5135,7 @@ (define-public ocaml4.07-ppx-typerep-conv
#:findlib ,ocaml4.07-findlib
#:dune ,ocaml4.07-dune))
(propagated-inputs
`(("ocaml-base" ,ocaml4.07-base)
`(("ocaml-base" ,(package-with-ocaml4.07 ocaml-base))
("ocaml-typerep" ,ocaml4.07-typerep)
("ocaml-migrate-parsetree"
,(package-with-ocaml4.07 ocaml-migrate-parsetree))
@ -5191,7 +5204,7 @@ (define-public ocaml4.07-ppx-bin-prot
#:findlib ,ocaml4.07-findlib
#:dune ,ocaml4.07-dune))
(propagated-inputs
`(("ocaml-base" ,ocaml4.07-base)
`(("ocaml-base" ,(package-with-ocaml4.07 ocaml-base))
("ocaml-bin-prot" ,ocaml4.07-bin-prot)
("ocaml-ppx-here" ,ocaml4.07-ppx-here)
("ocaml-migrate-parsetree"
@ -5269,7 +5282,7 @@ (define-public ocaml4.07-splittable-random
#:findlib ,ocaml4.07-findlib
#:dune ,ocaml4.07-dune))
(propagated-inputs
`(("ocaml-base" ,ocaml4.07-base)
`(("ocaml-base" ,(package-with-ocaml4.07 ocaml-base))
("ocaml-ppx-jane" ,ocaml4.07-ppx-jane)
("ocaml-migrate-parsetree"
,(package-with-ocaml4.07 ocaml-migrate-parsetree))))
@ -5329,7 +5342,7 @@ (define-public ocaml4.07-configurator
#:findlib ,ocaml4.07-findlib
#:dune ,ocaml4.07-dune))
(propagated-inputs
`(("ocaml-base" ,ocaml4.07-base)
`(("ocaml-base" ,(package-with-ocaml4.07 ocaml-base))
("ocaml-stdio" ,ocaml4.07-stdio)))
(home-page "https://github.com/janestreet/configurator")
(synopsis "Helper library for gathering system configuration")
@ -5416,7 +5429,7 @@ (define-public ocaml4.07-core
#:findlib ,ocaml4.07-findlib
#:dune ,ocaml4.07-dune))
(propagated-inputs
`(("ocaml-base" ,ocaml4.07-base)
`(("ocaml-base" ,(package-with-ocaml4.07 ocaml-base))
("ocaml-configurator" ,ocaml4.07-configurator)
("ocaml-core-kernel" ,ocaml4.07-core-kernel)
("ocaml-ppx-assert" ,ocaml4.07-ppx-assert)
@ -5456,7 +5469,7 @@ (define-public ocaml4.07-core-kernel
#:findlib ,ocaml4.07-findlib
#:dune ,ocaml4.07-dune))
(propagated-inputs
`(("ocaml-base" ,ocaml4.07-base)
`(("ocaml-base" ,(package-with-ocaml4.07 ocaml-base))
("ocaml-bin-prot" ,ocaml4.07-bin-prot)
("ocaml-configurator" ,ocaml4.07-configurator)
("ocaml-fieldslib" ,ocaml4.07-fieldslib)
@ -5716,7 +5729,7 @@ (define-public ocaml4.07-lacaml
(native-inputs
`(("openblas" ,openblas)
("lapack" ,lapack)
("ocaml-base" ,ocaml4.07-base)
("ocaml-base" ,(package-with-ocaml4.07 ocaml-base))
("ocaml-stdio" ,ocaml4.07-stdio)))
(home-page "https://mmottl.github.io/lacaml/")
(synopsis