python3Packages.orjson: Disable failing tests on 32 bit
[NixPkgs.git] / pkgs / development / ocaml-modules / sedlex / default.nix
blobe49f03d3f537b4ca85bde59e2139c4d2e483244c
1 { lib
2 , fetchFromGitHub
3 , fetchurl
4 , buildDunePackage
5 , ocaml
6 , gen
7 , ppxlib
8 , uchar
9 }:
11 let
12   unicodeVersion = "15.0.0";
13   baseUrl = "https://www.unicode.org/Public/${unicodeVersion}";
15   DerivedCoreProperties = fetchurl {
16     url = "${baseUrl}/ucd/DerivedCoreProperties.txt";
17     sha256 = "sha256-02cpC8CGfmtITGg3BTC90aCLazJARgG4x6zK+D4FYo0=";
18   };
19   DerivedGeneralCategory = fetchurl {
20     url = "${baseUrl}/ucd/extracted/DerivedGeneralCategory.txt";
21     sha256 = "sha256-/imkXAiCUA5ZEUCqpcT1Bn5qXXRoBhSK80QAxIucBvk=";
22   };
23   PropList = fetchurl {
24     url = "${baseUrl}/ucd/PropList.txt";
25     sha256 = "sha256-4FwKKBHRE9rkq9gyiEGZo+qNGH7huHLYJAp4ipZUC/0=";
26   };
28 buildDunePackage rec {
29   pname = "sedlex";
30   version = "2.5";
32   minimalOCamlVersion = "4.08";
34   src = fetchFromGitHub {
35     owner = "ocaml-community";
36     repo = "sedlex";
37     rev = "v${version}";
38     sha256 = "sha256:062a5dvrzvb81l3a9phljrhxfw9nlb61q341q0a6xn65hll3z2wy";
39   };
41   propagatedBuildInputs = [
42     gen uchar ppxlib
43   ];
45   preBuild = ''
46     rm src/generator/data/dune
47     ln -s ${DerivedCoreProperties} src/generator/data/DerivedCoreProperties.txt
48     ln -s ${DerivedGeneralCategory} src/generator/data/DerivedGeneralCategory.txt
49     ln -s ${PropList} src/generator/data/PropList.txt
50   '';
52   doCheck = true;
54   dontStrip = true;
56   meta = {
57     homepage = "https://github.com/ocaml-community/sedlex";
58     changelog = "https://github.com/ocaml-community/sedlex/raw/v${version}/CHANGES";
59     description = "An OCaml lexer generator for Unicode";
60     license = lib.licenses.mit;
61     maintainers = [ lib.maintainers.marsam ];
62   };