2021-01-11 07:54:33 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, fetchpatch, autoreconfHook }:
|
2012-12-01 23:25:01 +00:00
|
|
|
|
2014-08-20 07:12:21 +01:00
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "re2c";
|
2020-04-30 18:57:49 +01:00
|
|
|
version = "1.3";
|
2016-08-25 16:47:32 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2017-07-09 15:43:32 +01:00
|
|
|
owner = "skvadrik";
|
|
|
|
repo = "re2c";
|
|
|
|
rev = version;
|
2020-04-30 18:57:49 +01:00
|
|
|
sha256 = "0aqlf2h6i2m3dq11dkq89p4w4c9kp4x66s5rhp84gmpz5xqv1x5h";
|
2012-12-01 23:25:01 +00:00
|
|
|
};
|
|
|
|
|
2020-04-30 18:57:55 +01:00
|
|
|
patches = [
|
|
|
|
(fetchpatch {
|
|
|
|
name = "CVE-2020-11958.patch";
|
|
|
|
url = "https://github.com/skvadrik/re2c/commit/c4603ba5ce229db83a2a4fb93e6d4b4e3ec3776a.patch";
|
|
|
|
sha256 = "1d95ahxk92g7k87sda9gxgmr3blyfzwd2y7h9jxj8zkd74knd9zh";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2016-08-25 16:47:32 +01:00
|
|
|
nativeBuildInputs = [ autoreconfHook ];
|
|
|
|
|
2019-10-11 22:50:21 +01:00
|
|
|
doCheck = true;
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2018-08-08 22:16:27 +01:00
|
|
|
preCheck = ''
|
|
|
|
patchShebangs run_tests.sh
|
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2013-10-06 10:49:53 +01:00
|
|
|
description = "Tool for writing very fast and very flexible scanners";
|
2014-08-20 07:12:21 +01:00
|
|
|
homepage = "http://re2c.org";
|
2017-07-09 15:43:32 +01:00
|
|
|
license = licenses.publicDomain;
|
|
|
|
platforms = platforms.all;
|
|
|
|
maintainers = with maintainers; [ thoughtpolice ];
|
2012-12-01 23:25:01 +00:00
|
|
|
};
|
|
|
|
}
|