From 80da0a626e6dcf87c68a45fe0305c59587271c0c Mon Sep 17 00:00:00 2001 From: Ben Darwin Date: Sun, 22 Dec 2019 20:45:12 -0500 Subject: [PATCH] functoria: 2.0.2 -> 3.0.3 --- .../ocaml-modules/functoria/default.nix | 41 +++++++++---------- 1 file changed, 20 insertions(+), 21 deletions(-) diff --git a/pkgs/development/ocaml-modules/functoria/default.nix b/pkgs/development/ocaml-modules/functoria/default.nix index a174bd6a8b1..cc99b726e6e 100644 --- a/pkgs/development/ocaml-modules/functoria/default.nix +++ b/pkgs/development/ocaml-modules/functoria/default.nix @@ -1,28 +1,27 @@ -{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, topkg -, bos, cmdliner, ocamlgraph +{ stdenv, fetchurl, buildDunePackage, alcotest, cmdliner +, rresult, astring, fmt, ocamlgraph, logs, bos, fpath, ptime }: -if !stdenv.lib.versionAtLeast ocaml.version "4.03" -then throw "functoria is not available for OCaml ${ocaml.version}" else +buildDunePackage rec { + pname = "functoria"; + version = "3.0.3"; -stdenv.mkDerivation rec { - name = "ocaml${ocaml.version}-functoria-${version}"; - version = "2.0.2"; - src = fetchurl { - url = "https://github.com/mirage/functoria/releases/download/${version}/functoria-${version}.tbz"; - sha256 = "019rl4rir4lwgjyqj2wq3ylw4daih1kxxgbc6ld6kzcq66mwr747"; - }; + minimumOCamlVersion = "4.04"; - buildInputs = [ ocaml findlib ocamlbuild topkg ]; - propagatedBuildInputs = [ bos cmdliner ocamlgraph ]; + src = fetchurl { + url = "https://github.com/mirage/${pname}/releases/download/v${version}/${pname}-v${version}.tbz"; + sha256 = "08wv2890gz7ci1fa2b3z4cvqf98nqb09f89y08kcmnsirlbbzlfh"; + }; - inherit (topkg) buildPhase installPhase; + propagatedBuildInputs = [ cmdliner rresult astring fmt ocamlgraph logs bos fpath ptime ]; + checkInputs = [ alcotest ]; - meta = { - description = "A DSL to organize functor applications"; - homepage = https://github.com/mirage/functoria; - license = stdenv.lib.licenses.isc; - maintainers = [ stdenv.lib.maintainers.vbgl ]; - inherit (ocaml.meta) platforms; - }; + doCheck = true; + + meta = with stdenv.lib; { + description = "A DSL to organize functor applications"; + homepage = https://github.com/mirage/functoria; + license = licenses.isc; + maintainers = [ maintainers.vbgl ]; + }; }