summary refs log tree commit diff
path: root/pkgs/development/ocaml-modules/enumerate/default.nix
blob: 9bedc4215108e96cdb73445ce88b78090b3668e5 (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
25
26
27
28
29
30
31
{ stdenv, lib, fetchurl, ocaml, findlib, ocamlbuild, type_conv, camlp4 }:

assert lib.versionAtLeast (lib.getVersion ocaml) "4.00";

if lib.versionAtLeast ocaml.version "4.06"
then throw "enumerate-111.08.00 is not available for OCaml ${ocaml.version}"
else

stdenv.mkDerivation rec {
  pname = "ocaml-enumerate";
  version = "111.08.00";

  src = fetchurl {
    url = "https://ocaml.janestreet.com/ocaml-core/${lib.versions.majorMinor version}.00/individual/enumerate-${version}.tar.gz";
    sha256 = "0b6mx5p01lcpimvak4wx6aj2119707wsfzd83rwgb91bhpgzh156";
  };

  nativeBuildInputs = [ ocaml findlib ocamlbuild ];
  propagatedBuildInputs = [ type_conv camlp4 ];

  strictDeps = true;

  createFindlibDestdir = true;

  meta = {
    homepage = "https://ocaml.janestreet.com/";
    description = "Quotation expanders for enumerating finite types";
    license = lib.licenses.asl20;
    platforms = ocaml.meta.platforms or [ ];
  };
}