From abfc9e2afa90f30011832e42f25feb9815990200 Mon Sep 17 00:00:00 2001 From: "Ricardo M. Correia" Date: Sat, 20 Feb 2016 15:38:30 +0100 Subject: [PATCH] ocamlPackages.result: init at 1.1 --- .../ocaml-modules/ocaml-result/default.nix | 30 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 32 insertions(+) create mode 100644 pkgs/development/ocaml-modules/ocaml-result/default.nix diff --git a/pkgs/development/ocaml-modules/ocaml-result/default.nix b/pkgs/development/ocaml-modules/ocaml-result/default.nix new file mode 100644 index 000000000000..8b6e0966f7e2 --- /dev/null +++ b/pkgs/development/ocaml-modules/ocaml-result/default.nix @@ -0,0 +1,30 @@ +{ stdenv, fetchFromGitHub, ocaml, findlib }: + +let version = "1.1"; in + +stdenv.mkDerivation { + name = "ocaml-result-${version}"; + + src = fetchFromGitHub { + owner = "janestreet"; + repo = "result"; + rev = "${version}"; + sha256 = "05y07rxdbkaxsc8cy458y00gq05i8gp35hhwg1b757mam21ccxxz"; + }; + + 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; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index b0e9b022f462..dc20729fc51f 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -4920,6 +4920,8 @@ let re2 = callPackage ../development/ocaml-modules/re2 { }; + result = callPackage ../development/ocaml-modules/ocaml-result { }; + sequence = callPackage ../development/ocaml-modules/sequence { }; tuntap = callPackage ../development/ocaml-modules/tuntap { };