mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-26 07:34:11 +00:00
4a7f99d55d
Part of: https://github.com/NixOS/nixpkgs/issues/108938 meta = with stdenv.lib; is a widely used pattern. We want to slowly remove the `stdenv.lib` indirection and encourage people to use `lib` directly. Thus let’s start with the meta field. This used a rewriting script to mostly automatically replace all occurances of this pattern, and add the `lib` argument to the package header if it doesn’t exist yet. The script in its current form is available at https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
39 lines
969 B
Nix
39 lines
969 B
Nix
{ lib, stdenv, fetchFromGitHub, fetchpatch, autoreconfHook }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "re2c";
|
|
version = "1.3";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "skvadrik";
|
|
repo = "re2c";
|
|
rev = version;
|
|
sha256 = "0aqlf2h6i2m3dq11dkq89p4w4c9kp4x66s5rhp84gmpz5xqv1x5h";
|
|
};
|
|
|
|
patches = [
|
|
(fetchpatch {
|
|
name = "CVE-2020-11958.patch";
|
|
url = "https://github.com/skvadrik/re2c/commit/c4603ba5ce229db83a2a4fb93e6d4b4e3ec3776a.patch";
|
|
sha256 = "1d95ahxk92g7k87sda9gxgmr3blyfzwd2y7h9jxj8zkd74knd9zh";
|
|
})
|
|
];
|
|
|
|
nativeBuildInputs = [ autoreconfHook ];
|
|
|
|
doCheck = true;
|
|
enableParallelBuilding = true;
|
|
|
|
preCheck = ''
|
|
patchShebangs run_tests.sh
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "Tool for writing very fast and very flexible scanners";
|
|
homepage = "http://re2c.org";
|
|
license = licenses.publicDomain;
|
|
platforms = platforms.all;
|
|
maintainers = with maintainers; [ thoughtpolice ];
|
|
};
|
|
}
|