>From 0f27bcdf4c47b9e4928589ac1dc0b48225d19d05 Mon Sep 17 00:00:00 2001 From: John Soo Date: Thu, 31 Dec 2020 11:38:32 -0800 Subject: [PATCH 5/9] gnu: Add ocaml-parsexp. * gnu/packages/ocaml.scm (ocaml-parsexp): New variable. * gnu/packages/ocaml.scm (ocaml4.07-parsexp): Inherit from ocaml-parsexp. --- gnu/packages/ocaml.scm | 32 +++++++++++++++++++++++++------- 1 file changed, 25 insertions(+), 7 deletions(-) diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm index 707880dd5d..b708f9398e 100644 --- a/gnu/packages/ocaml.scm +++ b/gnu/packages/ocaml.scm @@ -4209,8 +4209,25 @@ that was developed by Jane Street, the largest industrial user of OCaml.") #:findlib ,ocaml4.07-findlib #:dune ,ocaml4.07-dune)))) +(define-public ocaml-parsexp + (package + (name "ocaml-parsexp") + (version "0.14.0") + (home-page "https://github.com/janestreet/parsexp") + (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 + "0rvbrf8ggh2imsbhqi15jzyyqbi3m5hzvy2iy2r4skx6m102mzpd")))) + (build-system dune-build-system) (inputs - `(("ocaml-sexplib0" ,ocaml4.07-sexplib0))) + `(("ocaml-base" ,ocaml-base) + ("ocaml-sexplib0" ,ocaml-sexplib0))) (synopsis "S-expression parsing library") (description "This library provides generic parsers for parsing S-expressions from @@ -4239,11 +4256,12 @@ s-expressions from files or other external sources, you should use parsexp_io.") (license license:expat))) -(define-public ocaml4.07-sexplib +(define-public ocaml4.07-parsexp (package - (name "ocaml4.07-sexplib") + (inherit ocaml-parsexp) + (name "ocaml4.07-parsexp") (version "0.11.0") - (home-page "https://github.com/janestreet/sexplib") + (home-page "https://github.com/janestreet/parsexp") (source (origin (method git-fetch) @@ -4253,12 +4271,12 @@ parsexp_io.") (file-name (git-file-name name version)) (sha256 (base32 - "1qfl0m04rpcjvc4yw1hzh6r16jpwmap0sa9ax6zjji67dz4szpyb")))) - (build-system dune-build-system) + "1nyq23s5igd8cf3n4qxprjvhbmb6ighb3fy5mw7hxl0mdgsw5fvz")))) (arguments `(#:ocaml ,ocaml-4.07 #:findlib ,ocaml4.07-findlib - #:dune ,ocaml4.07-dune)) + #:dune ,ocaml4.07-dune)))) + (propagated-inputs `(("ocaml-num" ,(package-with-ocaml4.07 ocaml-num)) ("ocaml-parsexp" ,ocaml4.07-parsexp) -- 2.29.2