From eba3900781ef0abd0a8eb478820280851d1e0fbb Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Wed, 15 Mar 2017 20:04:40 +0000 Subject: [PATCH] ocamlPackages.rresult: init at 0.5.0 Rresult is an OCaml module for handling computation results and errors in an explicit and declarative manner without resorting to exceptions. Homepage: http://erratique.ch/software/rresult --- .../ocaml-modules/rresult/default.nix | 24 +++++++++++++++++++ pkgs/top-level/ocaml-packages.nix | 2 ++ 2 files changed, 26 insertions(+) create mode 100644 pkgs/development/ocaml-modules/rresult/default.nix diff --git a/pkgs/development/ocaml-modules/rresult/default.nix b/pkgs/development/ocaml-modules/rresult/default.nix new file mode 100644 index 000000000000..f9951b56da2d --- /dev/null +++ b/pkgs/development/ocaml-modules/rresult/default.nix @@ -0,0 +1,24 @@ +{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, opam, topkg }: + +stdenv.mkDerivation rec { + name = "ocaml${ocaml.version}-rresult-${version}"; + version = "0.5.0"; + src = fetchurl { + url = "http://erratique.ch/software/rresult/releases/rresult-${version}.tbz"; + sha256 = "1xxycxhdhaq8p9vhwi93s2mlxjwgm44fcxybx5vghzgbankz9yhm"; + }; + + unpackCmd = "tar xjf $src"; + + buildInputs = [ ocaml findlib ocamlbuild topkg opam ]; + + inherit (topkg) buildPhase installPhase; + + meta = { + license = stdenv.lib.licenses.isc; + homepage = http://erratique.ch/software/rresult; + description = "Result value combinators for OCaml"; + maintainers = [ stdenv.lib.maintainers.vbgl ]; + inherit (ocaml.meta) platforms; + }; +} diff --git a/pkgs/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix index 2a59dbd3293f..aeef0a2859bb 100644 --- a/pkgs/top-level/ocaml-packages.nix +++ b/pkgs/top-level/ocaml-packages.nix @@ -494,6 +494,8 @@ let re = callPackage ../development/ocaml-modules/re { }; + rresult = callPackage ../development/ocaml-modules/rresult { }; + safepass = callPackage ../development/ocaml-modules/safepass { }; sedlex = callPackage ../development/ocaml-modules/sedlex { };