2021-01-15 22:18:51 +00:00
|
|
|
{ stdenv, lib, fetchurl, ocaml, findlib, ocamlbuild, topkg, result }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-02-09 11:40:11 +00:00
|
|
|
lib.throwIfNot (lib.versionAtLeast ocaml.version "4.07")
|
|
|
|
"rresult is not available for OCaml ${ocaml.version}"
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2022-02-10 20:34:41 +00:00
|
|
|
pname = "ocaml${ocaml.version}-rresult";
|
2023-02-02 18:25:31 +00:00
|
|
|
version = "0.7.0";
|
2021-02-05 17:12:51 +00:00
|
|
|
src = fetchurl {
|
|
|
|
url = "https://erratique.ch/software/rresult/releases/rresult-${version}.tbz";
|
2023-02-02 18:25:31 +00:00
|
|
|
sha256 = "sha256-Eap/W4NGDmBDHjFU4+MsBx1G4VHqV2DPJDd4Bb+XVUA=";
|
2021-02-05 17:12:51 +00:00
|
|
|
};
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-03-05 16:20:37 +00:00
|
|
|
nativeBuildInputs = [ ocaml findlib ocamlbuild topkg ];
|
|
|
|
buildInputs = [ topkg ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
propagatedBuildInputs = [ result ];
|
|
|
|
|
2022-03-05 16:20:37 +00:00
|
|
|
strictDeps = true;
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
inherit (topkg) buildPhase installPhase;
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
license = lib.licenses.isc;
|
|
|
|
homepage = "https://erratique.ch/software/rresult";
|
|
|
|
description = "Result value combinators for OCaml";
|
|
|
|
maintainers = [ lib.maintainers.vbgl ];
|
|
|
|
inherit (ocaml.meta) platforms;
|
|
|
|
};
|
2020-04-24 23:36:52 +00:00
|
|
|
}
|