depot/third_party/nixpkgs/pkgs/development/ocaml-modules/rresult/default.nix
Default email 4bac34ead1 Project import generated by Copybara.
GitOrigin-RevId: 724bfc0892363087709bd3a5a1666296759154b1
2023-02-09 12:40:11 +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;
};
}