nixpkgs/pkgs/development/ocaml-modules/ocaml-result/default.nix

31 lines
819 B
Nix
Raw Normal View History

2016-02-20 14:38:30 +00:00
{ stdenv, fetchFromGitHub, ocaml, findlib }:
2017-07-10 18:20:55 +00:00
let version = "1.2"; in
2016-02-20 14:38:30 +00:00
stdenv.mkDerivation {
2017-07-10 18:20:55 +00:00
name = "ocaml${ocaml.version}-result-${version}";
2016-02-20 14:38:30 +00:00
src = fetchFromGitHub {
owner = "janestreet";
repo = "result";
rev = "${version}";
2017-07-10 18:20:55 +00:00
sha256 = "1jwzpcmxwgkfsbjz9zl59v12hf1vv4r9kiifancn9p8gm206g3g0";
2016-02-20 14:38:30 +00:00
};
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 [];
2016-02-20 14:38:30 +00:00
};
}