2024-05-15 15:35:15 +00:00
|
|
|
{
|
|
|
|
stdenv,
|
|
|
|
buildPecl,
|
|
|
|
lib,
|
|
|
|
libiconv,
|
|
|
|
php,
|
|
|
|
fetchFromGitHub,
|
|
|
|
pcre2,
|
|
|
|
darwin,
|
2021-06-04 09:07:49 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPecl rec {
|
|
|
|
pname = "snuffleupagus";
|
2023-10-19 13:55:26 +00:00
|
|
|
version = "0.10.0";
|
2023-07-15 17:15:38 +00:00
|
|
|
|
2021-06-04 09:07:49 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "jvoisin";
|
2023-07-15 17:15:38 +00:00
|
|
|
repo = "snuffleupagus";
|
2021-06-04 09:07:49 +00:00
|
|
|
rev = "v${version}";
|
2023-10-19 13:55:26 +00:00
|
|
|
hash = "sha256-NwG8gBaToBaJGrZoCD7bDym7hQidWU0ArckoQCHN81o=";
|
2021-06-04 09:07:49 +00:00
|
|
|
};
|
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
buildInputs =
|
|
|
|
[ pcre2 ]
|
|
|
|
++ lib.optionals stdenv.isDarwin [
|
|
|
|
darwin.apple_sdk_11_0.frameworks.CoreFoundation
|
|
|
|
darwin.apple_sdk_11_0.Libsystem
|
|
|
|
libiconv
|
|
|
|
];
|
2021-06-04 09:07:49 +00:00
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
internalDeps = with php.extensions; [ session ];
|
2021-06-04 09:07:49 +00:00
|
|
|
|
2023-08-04 22:07:22 +00:00
|
|
|
sourceRoot = "${src.name}/src";
|
2021-06-04 09:07:49 +00:00
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
configureFlags = [ "--enable-snuffleupagus" ];
|
2021-06-04 09:07:49 +00:00
|
|
|
|
|
|
|
postPhpize = ''
|
|
|
|
./configure --enable-snuffleupagus
|
|
|
|
'';
|
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
meta = {
|
2021-06-04 09:07:49 +00:00
|
|
|
description = "Security module for php7 and php8 - Killing bugclasses and virtual-patching the rest!";
|
|
|
|
homepage = "https://github.com/jvoisin/snuffleupagus";
|
2023-07-15 17:15:38 +00:00
|
|
|
license = lib.licenses.lgpl3Only;
|
|
|
|
maintainers = lib.teams.php.members ++ [ lib.maintainers.zupo ];
|
2021-06-04 09:07:49 +00:00
|
|
|
};
|
|
|
|
}
|