From 73d9da471bb444e2698b58fd1568d003a23159bd Mon Sep 17 00:00:00 2001 From: superherointj <5861043+superherointj@users.noreply.github.com> Date: Sat, 5 Jun 2021 22:37:28 -0300 Subject: [PATCH] ocamlPackages.octavius: 0.2.0 -> 1.2.2 --- .../ocaml-modules/octavius/default.nix | 29 ++++++++++--------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/pkgs/development/ocaml-modules/octavius/default.nix b/pkgs/development/ocaml-modules/octavius/default.nix index c71c8f35f4b..a4124df6664 100644 --- a/pkgs/development/ocaml-modules/octavius/default.nix +++ b/pkgs/development/ocaml-modules/octavius/default.nix @@ -1,24 +1,25 @@ -{ stdenv, lib, fetchurl, ocaml, findlib, ocamlbuild, topkg }: +{ lib, fetchFromGitHub, buildDunePackage, ocaml }: -if !lib.versionAtLeast ocaml.version "4.03" -then throw "octavius is not available for OCaml ${ocaml.version}" else +buildDunePackage rec { + pname = "octavius"; + version = "1.2.2"; -stdenv.mkDerivation { - name = "ocaml${ocaml.version}-octavius-0.2.0"; - src = fetchurl { - url = "https://github.com/ocaml-doc/octavius/releases/download/v0.2.0/octavius-0.2.0.tbz"; - sha256 = "02milzzlr4xk5aymg2fjz27f528d5pyscqvld3q0dm41zcpkz5ml"; + src = fetchFromGitHub { + owner = "ocaml-doc"; + repo = "octavius"; + rev = "v${version}"; + sha256 = "sha256-/S6WpIo1c5J9uM3xgtAM/elhnsl0XimnIFsKy3ootbA="; }; - buildInputs = [ ocaml findlib ocamlbuild topkg ]; + minimumOCamlVersion = "4.03"; + useDune2 = lib.versionAtLeast ocaml.version "4.08"; - inherit (topkg) buildPhase installPhase; + doCheck = true; - meta = { + meta = with lib; { description = "Ocamldoc comment syntax parser"; homepage = "https://github.com/ocaml-doc/octavius"; - license = lib.licenses.isc; - maintainers = [ lib.maintainers.vbgl ]; - inherit (ocaml.meta) platforms; + license = licenses.isc; + maintainers = with maintainers; [ vbgl ]; }; }