2021-09-18 10:52:07 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, autoreconfHook
|
2022-02-10 20:34:41 +00:00
|
|
|
, nix-update-script
|
2021-09-18 10:52:07 +00:00
|
|
|
, python3
|
2022-05-18 14:49:53 +00:00
|
|
|
|
|
|
|
# for passthru.tests
|
|
|
|
, ninja
|
|
|
|
, php
|
|
|
|
, spamassassin
|
2021-09-18 10:52:07 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "re2c";
|
2023-08-10 07:59:29 +00:00
|
|
|
version = "3.1";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "skvadrik";
|
|
|
|
repo = "re2c";
|
|
|
|
rev = version;
|
2023-08-10 07:59:29 +00:00
|
|
|
sha256 = "sha256-7zZdLby7HdNoURgdkg+xnlp6VDCACcyGCTtjM43OLd4=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-09-18 10:52:07 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
autoreconfHook
|
|
|
|
python3
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
doCheck = true;
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
|
|
|
preCheck = ''
|
2021-09-18 10:52:07 +00:00
|
|
|
patchShebangs run_tests.py
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2022-02-10 20:34:41 +00:00
|
|
|
passthru = {
|
2024-07-27 06:49:29 +00:00
|
|
|
updateScript = nix-update-script {
|
|
|
|
# Skip non-release tags like `python-experimental`.
|
|
|
|
extraArgs = [ "--version-regex" "([0-9.]+)" ];
|
|
|
|
};
|
2022-05-18 14:49:53 +00:00
|
|
|
tests = {
|
|
|
|
inherit ninja php spamassassin;
|
|
|
|
};
|
2022-02-10 20:34:41 +00:00
|
|
|
};
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Tool for writing very fast and very flexible scanners";
|
2021-05-20 23:08:51 +00:00
|
|
|
homepage = "https://re2c.org";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.publicDomain;
|
|
|
|
platforms = platforms.all;
|
|
|
|
maintainers = with maintainers; [ thoughtpolice ];
|
|
|
|
};
|
|
|
|
}
|