summary refs log tree commit diff
path: root/pkgs/development/ocaml-modules/ocaml-result/default.nix
blob: 2fda6f1440be9a294a6c8638d0c8463ca32bc619 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
{ lib, buildDunePackage, fetchurl, ocaml }:

buildDunePackage rec {
  pname = "result";
  version = "1.5";

  useDune2 = lib.versionAtLeast ocaml.version "4.08";

  src = fetchurl {
    url = "https://github.com/janestreet/result/releases/download/${version}/result-${version}.tbz";
    sha256 = "0cpfp35fdwnv3p30a06wd0py3805qxmq3jmcynjc3x2qhlimwfkw";
  };

  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 = lib.licenses.bsd3;
  };
}