nixpkgs-suyu/pkgs/development/ocaml-modules/rresult/default.nix
2023-02-08 07:01:45 +01:00

30 lines
884 B
Nix

{ stdenv, lib, fetchurl, ocaml, findlib, ocamlbuild, topkg, result }:
lib.throwIfNot (lib.versionAtLeast ocaml.version "4.07")
"rresult is not available for OCaml ${ocaml.version}"
stdenv.mkDerivation rec {
pname = "ocaml${ocaml.version}-rresult";
version = "0.7.0";
src = fetchurl {
url = "https://erratique.ch/software/rresult/releases/rresult-${version}.tbz";
sha256 = "sha256-Eap/W4NGDmBDHjFU4+MsBx1G4VHqV2DPJDd4Bb+XVUA=";
};
nativeBuildInputs = [ ocaml findlib ocamlbuild topkg ];
buildInputs = [ topkg ];
propagatedBuildInputs = [ result ];
strictDeps = true;
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;
};
}