Commit 684306b2 authored by Mario Rodas's avatar Mario Rodas Committed by Vincent Laporte
Browse files
parent 14d6f279
Loading
Loading
Loading
Loading
+19 −5
Original line number Diff line number Diff line
@@ -6,13 +6,19 @@
, gen
, ppxlib
, uchar
, ppx_expect
}:

let param =
  if lib.versionAtLeast ppxlib.version "0.26.0" then {
  if lib.versionAtLeast ppxlib.version "0.26.0" then
    if lib.versionAtLeast ocaml.version "4.14" then {
      version = "3.1";
      sha256 = "sha256-qG8Wxd/ATwoogeKJDyt5gkGhP5Wvc0j0mMqcoVDkeq4=";
    } else {
      version = "3.0";
      sha256 = "sha256-+4ggynMznVfjviMBjXil8CXdMByq4kSmDz6P2PyEETA=";
  } else {
    }
  else {
    version = "2.5";
    sha256 = "sha256:062a5dvrzvb81l3a9phljrhxfw9nlb61q341q0a6xn65hll3z2wy";
  }
@@ -34,6 +40,7 @@ let
    url = "${baseUrl}/ucd/PropList.txt";
    sha256 = "sha256-4FwKKBHRE9rkq9gyiEGZo+qNGH7huHLYJAp4ipZUC/0=";
  };
  atLeast31 = lib.versionAtLeast param.version "3.1";
in
buildDunePackage rec {
  pname = "sedlex";
@@ -49,7 +56,10 @@ buildDunePackage rec {
  };

  propagatedBuildInputs = [
    gen uchar ppxlib
    gen
    ppxlib
  ] ++ lib.optionals (!atLeast31) [
    uchar
  ];

  preBuild = ''
@@ -59,6 +69,10 @@ buildDunePackage rec {
    ln -s ${PropList} src/generator/data/PropList.txt
  '';

  checkInputs = lib.optionals atLeast31 [
    ppx_expect
  ];

  doCheck = true;

  dontStrip = true;