depot/third_party/nixpkgs/pkgs/development/ocaml-modules/ocaml-result/default.nix
Default email 8ac5e011d6 Project import generated by Copybara.
GitOrigin-RevId: 2c3273caa153ee8eb5786bc8141b85b859e7efd7
2020-04-24 19:36:52 -04:00

30 lines
816 B
Nix

{ stdenv, fetchFromGitHub, ocaml, findlib }:
let version = "1.2"; in
stdenv.mkDerivation {
name = "ocaml${ocaml.version}-result-${version}";
src = fetchFromGitHub {
owner = "janestreet";
repo = "result";
rev = version;
sha256 = "1jwzpcmxwgkfsbjz9zl59v12hf1vv4r9kiifancn9p8gm206g3g0";
};
buildInputs = [ ocaml findlib ];
createFindlibDestdir = true;
meta = {
homepage = "https://github.com/janestreet/result";
description = "Compatibility Result module";
longDescription = ''
Projects that want to use the new result type defined in OCaml >= 4.03
while staying compatible with older version of OCaml should use the
Result module defined in this library.
'';
license = stdenv.lib.licenses.bsd3;
platforms = ocaml.meta.platforms or [];
};
}