about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/ocaml-modules/sedlex/default.nix
blob: d34b18bf059e74883a7e68d5c17c4e678cb9009b (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
32
33
{ stdenv, fetchzip, ocaml, findlib, gen, ppx_tools_versioned, ocaml-migrate-parsetree }:

if !stdenv.lib.versionAtLeast ocaml.version "4.02"
then throw "sedlex is not available for OCaml ${ocaml.version}"
else

stdenv.mkDerivation rec {
  name = "ocaml${ocaml.version}-sedlex-${version}";
  version = "1.99.5";

  src = fetchzip {
    url = "https://github.com/ocaml-community/sedlex/archive/fb84e1766fc4b29e79ec40029ffee5cdb37b392f.tar.gz";
    sha256 = "0phnqyn6mpv5byr1kkphl24y9q9fb2k3xg9yb457h5816q6ya72n";
  };

  buildInputs = [ ocaml findlib ];

  propagatedBuildInputs = [ gen ocaml-migrate-parsetree ppx_tools_versioned ];

  buildFlags = [ "all" "opt" ];

  createFindlibDestdir = true;

  dontStrip = true;

  meta = {
    homepage = "https://github.com/ocaml-community/sedlex";
    description = "An OCaml lexer generator for Unicode";
    license = stdenv.lib.licenses.mit;
    inherit (ocaml.meta) platforms;
    maintainers = [ stdenv.lib.maintainers.vbgl ];
  };
}