depot/third_party/nixpkgs/pkgs/development/tools/parsing/re2c/default.nix
Default email f34ce41345 Project import generated by Copybara.
GitOrigin-RevId: b73c2221a46c13557b1b3be9c2070cc42cf01eb3
2024-07-27 08:49:29 +02:00

54 lines
1 KiB
Nix

{ lib
, stdenv
, fetchFromGitHub
, autoreconfHook
, nix-update-script
, python3
# for passthru.tests
, ninja
, php
, spamassassin
}:
stdenv.mkDerivation rec {
pname = "re2c";
version = "3.1";
src = fetchFromGitHub {
owner = "skvadrik";
repo = "re2c";
rev = version;
sha256 = "sha256-7zZdLby7HdNoURgdkg+xnlp6VDCACcyGCTtjM43OLd4=";
};
nativeBuildInputs = [
autoreconfHook
python3
];
doCheck = true;
enableParallelBuilding = true;
preCheck = ''
patchShebangs run_tests.py
'';
passthru = {
updateScript = nix-update-script {
# Skip non-release tags like `python-experimental`.
extraArgs = [ "--version-regex" "([0-9.]+)" ];
};
tests = {
inherit ninja php spamassassin;
};
};
meta = with lib; {
description = "Tool for writing very fast and very flexible scanners";
homepage = "https://re2c.org";
license = licenses.publicDomain;
platforms = platforms.all;
maintainers = with maintainers; [ thoughtpolice ];
};
}