>From 7dd63fafcdfb4da6d714aa1b24ca56aa6da74cd4 Mon Sep 17 00:00:00 2001 From: John Soo Date: Thu, 31 Dec 2020 11:15:17 -0800 Subject: [PATCH 2/9] gnu: Add ocaml-version. * gnu/packages/ocaml.scm (ocaml-version): New variable. --- gnu/packages/ocaml.scm | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm index 3c42505d6e..601b52648c 100644 --- a/gnu/packages/ocaml.scm +++ b/gnu/packages/ocaml.scm @@ -5933,3 +5933,37 @@ provides support to program with time varying values: declarative events and signals. React doesn't define any primitive event or signal, it lets the client chooses the concrete timeline.") (license license:lgpl2.1+))) + +(define-public ocaml-version + (package + (name "ocaml-version") + (version "3.0.0") + (source + (origin + (method url-fetch) + (uri "https://github.com/ocurrent/ocaml-version/releases/download/v3.0.0/ocaml-version-v3.0.0.tbz") + (sha256 + (base32 + "15vk8sh50p3f2mbv8z7mqnx76cffri36f2krp25zkkwix8jg7ci4")))) + (build-system dune-build-system) + (arguments + `(#:test-target "")) + (properties `((upstream-name . "ocaml-version"))) + (home-page + "https://github.com/ocurrent/ocaml-version") + (synopsis + "Manipulate, parse and generate OCaml compiler version strings") + (description + "This library provides facilities to parse version numbers of the OCaml +compiler, and enumerates the various official OCaml releases and configuration +variants. + +OCaml version numbers are of the form major.minor.patch+extra, where the patch +and extra fields are optional. This library offers the following +functionality: + +- Functions to parse and serialise OCaml compiler version numbers. +- Enumeration of official OCaml compiler version releases. +- Test compiler versions for a particular feature (e.g. the @code{bytes} type) +- Opam @url{https://opam.ocaml.org} compiler switch enumeration.") + (license license:expat))) -- 2.29.2