13 if lib.versionAtLeast ppxlib.version "0.26.0" then
16 sha256 = "sha256-5Vf1LRhSotNpTPzHmRgCMRYtrpgaspLlyzv1XdGt+u8=";
20 sha256 = "sha256:062a5dvrzvb81l3a9phljrhxfw9nlb61q341q0a6xn65hll3z2wy";
25 unicodeVersion = "15.0.0";
26 baseUrl = "https://www.unicode.org/Public/${unicodeVersion}";
28 DerivedCoreProperties = fetchurl {
29 url = "${baseUrl}/ucd/DerivedCoreProperties.txt";
30 sha256 = "sha256-02cpC8CGfmtITGg3BTC90aCLazJARgG4x6zK+D4FYo0=";
32 DerivedGeneralCategory = fetchurl {
33 url = "${baseUrl}/ucd/extracted/DerivedGeneralCategory.txt";
34 sha256 = "sha256-/imkXAiCUA5ZEUCqpcT1Bn5qXXRoBhSK80QAxIucBvk=";
37 url = "${baseUrl}/ucd/PropList.txt";
38 sha256 = "sha256-4FwKKBHRE9rkq9gyiEGZo+qNGH7huHLYJAp4ipZUC/0=";
40 atLeast31 = lib.versionAtLeast param.version "3.1";
42 buildDunePackage rec {
44 inherit (param) version;
46 minimalOCamlVersion = "4.08";
49 src = fetchFromGitHub {
50 owner = "ocaml-community";
53 inherit (param) sha256;
56 propagatedBuildInputs = [
59 ] ++ lib.optionals (!atLeast31) [
64 rm src/generator/data/dune
65 ln -s ${DerivedCoreProperties} src/generator/data/DerivedCoreProperties.txt
66 ln -s ${DerivedGeneralCategory} src/generator/data/DerivedGeneralCategory.txt
67 ln -s ${PropList} src/generator/data/PropList.txt
70 checkInputs = lib.optionals atLeast31 [
79 homepage = "https://github.com/ocaml-community/sedlex";
80 changelog = "https://github.com/ocaml-community/sedlex/raw/v${version}/CHANGES";
81 description = "An OCaml lexer generator for Unicode";
82 license = lib.licenses.mit;
83 maintainers = [ lib.maintainers.marsam ];