2021-08-19 16:10:35 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, autoreconfHook
|
2022-01-27 09:00:23 +00:00
|
|
|
, nix-update-script
|
2021-08-19 16:10:35 +00:00
|
|
|
, python3
|
2022-04-16 13:37:42 +00:00
|
|
|
|
|
|
|
# for passthru.tests
|
|
|
|
, ninja
|
|
|
|
, php
|
|
|
|
, spamassassin
|
2021-08-19 16:10:35 +00:00
|
|
|
}:
|
2012-12-01 23:25:01 +00:00
|
|
|
|
2014-08-20 06:12:21 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "re2c";
|
2022-01-27 09:00:23 +00:00
|
|
|
version = "3.0";
|
2016-08-25 15:47:32 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2017-07-09 14:43:32 +00:00
|
|
|
owner = "skvadrik";
|
|
|
|
repo = "re2c";
|
|
|
|
rev = version;
|
2022-01-27 09:00:23 +00:00
|
|
|
sha256 = "sha256-ovwmltu97fzNQT0oZHefrAo4yV9HV1NwcY4PTSM5Bro=";
|
2012-12-01 23:25:01 +00:00
|
|
|
};
|
|
|
|
|
2021-08-19 16:10:35 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
autoreconfHook
|
|
|
|
python3
|
|
|
|
];
|
2016-08-25 15:47:32 +00:00
|
|
|
|
2019-10-11 21:50:21 +00:00
|
|
|
doCheck = true;
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2018-08-08 21:16:27 +00:00
|
|
|
preCheck = ''
|
2021-08-19 16:10:35 +00:00
|
|
|
patchShebangs run_tests.py
|
2018-08-08 21:16:27 +00:00
|
|
|
'';
|
|
|
|
|
2022-01-27 09:00:23 +00:00
|
|
|
passthru = {
|
|
|
|
updateScript = nix-update-script {
|
|
|
|
attrPath = pname;
|
|
|
|
};
|
2022-04-16 13:37:42 +00:00
|
|
|
tests = {
|
|
|
|
inherit ninja php spamassassin;
|
|
|
|
};
|
2022-01-27 09:00:23 +00:00
|
|
|
};
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2013-10-06 09:49:53 +00:00
|
|
|
description = "Tool for writing very fast and very flexible scanners";
|
2021-04-16 09:03:18 +00:00
|
|
|
homepage = "https://re2c.org";
|
2017-07-09 14:43:32 +00:00
|
|
|
license = licenses.publicDomain;
|
|
|
|
platforms = platforms.all;
|
|
|
|
maintainers = with maintainers; [ thoughtpolice ];
|
2012-12-01 23:25:01 +00:00
|
|
|
};
|
|
|
|
}
|