From 0a753eb2d96b2deb7059bce0be6846f6623a85e4 Mon Sep 17 00:00:00 2001 From: divoplade Date: Wed, 30 Dec 2020 18:45:28 +0100 Subject: [PATCH 1/5] gnu: Add ocaml-compiler-libs * gnu/packages/ocaml.scm (ocaml-compiler-libs): New variable. (ocaml4.07-compiler-libs): Inherit from ocaml-compiler-libs. --- gnu/packages/ocaml.scm | 45 +++++++++++++++++++++++++++++++----------- 1 file changed, 33 insertions(+), 12 deletions(-) diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm index 2df16e7cd2..4b1ed09a79 100644 --- a/gnu/packages/ocaml.scm +++ b/gnu/packages/ocaml.scm @@ -3683,7 +3683,7 @@ syntax checking on dedukti files.") `(("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) + ("ocaml-compiler-libs" ,(package-with-ocaml4.07 ocaml-compiler-libs)) ("ocaml-sexplib0" ,(package-with-ocaml4.07 ocaml-sexplib0)) ("ocaml-stdio" ,ocaml4.07-stdio) ("ocaml-ppxlib" ,ocaml4.07-ppxlib))) @@ -4285,10 +4285,10 @@ provided by companion libraries such as #:dune ,ocaml4.07-dune)) (properties '())))) -(define-public ocaml4.07-compiler-libs +(define-public ocaml-compiler-libs (package - (name "ocaml4.07-compiler-libs") - (version "0.11.0") + (name "ocaml-compiler-libs") + (version "0.12.3") (home-page "https://github.com/janestreet/ocaml-compiler-libs") (source (origin @@ -4299,20 +4299,41 @@ provided by companion libraries such as (file-name (git-file-name name version)) (sha256 (base32 - "03jds7bszh8wwpfwxb3dg0gyr1j1872wxwx1xqhry5ir0i84bg0s")))) + "00nrar7h2pyflbdiq6wwwrb4k5jh9iff0jllihzm6ms8d5pspsg5")))) (build-system dune-build-system) - (arguments - `(#:tests? #f ;no tests - #:ocaml ,ocaml-4.07 - #:findlib ,ocaml4.07-findlib - #:dune ,ocaml4.07-dune)) - (properties `((upstream-name . "ocaml-compiler-libs"))) + (arguments `(#:tests? #f)) + (properties `((upstream-name . "ocaml-compiler-libs") + (ocaml4.07-variant . ,(delay ocaml4.07-compiler-libs)))) (synopsis "Compiler libraries repackaged") (description "This package simply repackages the OCaml compiler libraries so they don't expose everything at toplevel. For instance, @code{Ast_helper} is now @code{Ocaml_common.Ast_helper}.") (license license:expat))) +(define-public ocaml4.07-compiler-libs + (package-with-ocaml4.07 + (package + (inherit ocaml-compiler-libs) + (name "ocaml4.07-compiler-libs") + (version "0.11.0") + (source + (origin + (method git-fetch) + (uri (git-reference + (url (string-append (package-home-page ocaml-compiler-libs) + ".git")) + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "03jds7bszh8wwpfwxb3dg0gyr1j1872wxwx1xqhry5ir0i84bg0s")))) + (arguments + `(#:tests? #f ;no tests + #:ocaml ,ocaml-4.07 + #:findlib ,ocaml4.07-findlib + #:dune ,ocaml4.07-dune)) + (properties '())))) + (define-public ocaml4.07-stdio (package (name "ocaml4.07-stdio") @@ -4389,7 +4410,7 @@ as part of the same ocaml-migrate-parsetree driver.") (build-system dune-build-system) (propagated-inputs `(("ocaml-base" ,(package-with-ocaml4.07 ocaml-base)) - ("ocaml-compiler-libs" ,ocaml4.07-compiler-libs) + ("ocaml-compiler-libs" ,(package-with-ocaml4.07 ocaml-compiler-libs)) ("ocaml-migrate-parsetree" ,(package-with-ocaml4.07 ocaml-migrate-parsetree)) ("ocaml-ppx-derivers" ,(package-with-ocaml4.07 ocaml-ppx-derivers)) -- 2.29.2