nixpkgs-suyu/pkgs/development/ocaml-modules/sedlex/default.nix

34 lines
965 B
Nix
Raw Normal View History

{ stdenv, lib, fetchzip, ocaml, findlib, gen, ppx_tools_versioned, ocaml-migrate-parsetree }:
if !lib.versionAtLeast ocaml.version "4.02"
2017-07-15 14:13:14 +02:00
then throw "sedlex is not available for OCaml ${ocaml.version}"
else
stdenv.mkDerivation rec {
2017-07-08 10:43:28 +02:00
name = "ocaml${ocaml.version}-sedlex-${version}";
2019-08-16 14:58:46 +02:00
version = "1.99.5";
src = fetchzip {
2019-08-16 14:58:46 +02:00
url = "https://github.com/ocaml-community/sedlex/archive/fb84e1766fc4b29e79ec40029ffee5cdb37b392f.tar.gz";
sha256 = "0phnqyn6mpv5byr1kkphl24y9q9fb2k3xg9yb457h5816q6ya72n";
};
2020-04-06 16:48:42 +02:00
buildInputs = [ ocaml findlib ];
2020-04-06 16:48:42 +02:00
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 = lib.licenses.mit;
inherit (ocaml.meta) platforms;
maintainers = [ lib.maintainers.vbgl ];
};
}