2021-01-11 12:49:15 +00:00
|
|
|
{ stdenv, lib, fetchFromGitHub, ocaml, findlib, ocamlbuild, camlp4 }:
|
2010-12-31 17:48:55 +00:00
|
|
|
|
|
|
|
let
|
|
|
|
pname = "ulex";
|
2017-11-29 18:58:56 +00:00
|
|
|
param =
|
2021-01-11 12:49:15 +00:00
|
|
|
if lib.versionAtLeast ocaml.version "4.02" then {
|
2017-11-29 18:58:56 +00:00
|
|
|
version = "1.2";
|
|
|
|
sha256 = "08yf2x9a52l2y4savjqfjd2xy4pjd1rpla2ylrr9qrz1drpfw4ic";
|
|
|
|
} else {
|
|
|
|
version = "1.1";
|
|
|
|
sha256 = "0cmscxcmcxhlshh4jd0lzw5ffzns12x3bj7h27smbc8waxkwffhl";
|
|
|
|
};
|
2010-12-31 17:48:55 +00:00
|
|
|
in
|
|
|
|
|
2016-10-05 07:32:30 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2017-11-29 18:58:56 +00:00
|
|
|
name = "ocaml${ocaml.version}-${pname}-${version}";
|
|
|
|
inherit (param) version;
|
2010-12-31 17:48:55 +00:00
|
|
|
|
2017-11-29 18:58:56 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "whitequark";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
|
|
|
inherit (param) sha256;
|
2010-12-31 17:48:55 +00:00
|
|
|
};
|
|
|
|
|
2011-11-27 23:58:46 +00:00
|
|
|
createFindlibDestdir = true;
|
|
|
|
|
2022-02-22 09:59:04 +00:00
|
|
|
nativeBuildInputs = [ ocaml findlib ocamlbuild camlp4 ];
|
2022-03-04 10:30:58 +00:00
|
|
|
propagatedBuildInputs = [ camlp4 ];
|
2022-02-22 09:59:04 +00:00
|
|
|
|
|
|
|
strictDeps = true;
|
2010-12-31 17:48:55 +00:00
|
|
|
|
2019-10-27 13:03:25 +00:00
|
|
|
buildFlags = [ "all" "all.opt" ];
|
2010-12-31 17:48:55 +00:00
|
|
|
|
|
|
|
meta = {
|
2017-11-29 18:58:56 +00:00
|
|
|
inherit (src.meta) homepage;
|
2015-04-30 15:05:14 +00:00
|
|
|
description = "Lexer generator for Unicode and OCaml";
|
2021-01-11 12:49:15 +00:00
|
|
|
license = lib.licenses.mit;
|
2022-05-10 17:36:58 +00:00
|
|
|
inherit (ocaml.meta) platforms;
|
2021-01-11 12:49:15 +00:00
|
|
|
maintainers = [ lib.maintainers.roconnor ];
|
2010-12-31 17:48:55 +00:00
|
|
|
};
|
|
|
|
}
|