From 99d3252b18a7d3e22406182a5a3b12ccb55ab8b9 Mon Sep 17 00:00:00 2001 From: Ulrik Strid Date: Tue, 29 Jun 2021 15:39:21 +0200 Subject: [PATCH] ocamlPackages.stringext: 1.4.0 -> 1.6.0 (#128598) --- .../ocaml-modules/stringext/default.nix | 30 +++++++------------ 1 file changed, 11 insertions(+), 19 deletions(-) diff --git a/pkgs/development/ocaml-modules/stringext/default.nix b/pkgs/development/ocaml-modules/stringext/default.nix index ae797815aed..8aaf36baa8b 100644 --- a/pkgs/development/ocaml-modules/stringext/default.nix +++ b/pkgs/development/ocaml-modules/stringext/default.nix @@ -1,32 +1,24 @@ -{ stdenv, lib, fetchzip, ocaml, findlib, ocamlbuild, ounit, qcheck +{ lib, fetchurl, ocaml, buildDunePackage, ounit, qtest # Optionally enable tests; test script use OCaml-4.01+ features -, doCheck ? lib.versionAtLeast (lib.getVersion ocaml) "4.01" +, doCheck ? lib.versionAtLeast ocaml.version "4.04" }: -let version = "1.4.3"; in +let version = "1.6.0"; in -stdenv.mkDerivation { - name = "ocaml${ocaml.version}-stringext-${version}"; - - src = fetchzip { - url = "https://github.com/rgrinberg/stringext/archive/v${version}.tar.gz"; - sha256 = "121k79vjazvsd254yg391fp4spsd1p32amccrahd0g6hjhf5w6sl"; +buildDunePackage { + pname = "stringext"; + version = version; + useDune2 = true; + src = fetchurl { + url = "https://github.com/rgrinberg/stringext/releases/download/${version}/stringext-${version}.tbz"; + sha256 = "1sh6nafi3i9773j5mlwwz3kxfzdjzsfqj2qibxhigawy5vazahfv"; }; - buildInputs = [ ocaml findlib ocamlbuild ounit qcheck ]; - - configurePhase = "ocaml setup.ml -configure --prefix $out" - + lib.optionalString doCheck " --enable-tests"; - buildPhase = "ocaml setup.ml -build"; + checkInputs = [ ounit qtest ]; inherit doCheck; - checkPhase = "ocaml setup.ml -test"; - installPhase = "ocaml setup.ml -install"; - - createFindlibDestdir = true; meta = { homepage = "https://github.com/rgrinberg/stringext"; - platforms = ocaml.meta.platforms or []; description = "Extra string functions for OCaml"; license = lib.licenses.mit; maintainers = with lib.maintainers; [ vbgl ];