ocamlPackages.stringext: 1.4.0 -> 1.6.0 (#128598)

This commit is contained in:
Ulrik Strid 2021-06-29 15:39:21 +02:00 committed by GitHub
parent 8f353edb83
commit 99d3252b18
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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 ];