2023-07-15 17:15:38 +00:00
|
|
|
{ stdenv
|
|
|
|
, buildPecl
|
2021-06-04 09:07:49 +00:00
|
|
|
, lib
|
2023-07-15 17:15:38 +00:00
|
|
|
, libiconv
|
2021-06-04 09:07:49 +00:00
|
|
|
, php
|
|
|
|
, fetchFromGitHub
|
2021-06-06 07:54:09 +00:00
|
|
|
, pcre2
|
2023-07-15 17:15:38 +00:00
|
|
|
, darwin
|
2021-06-04 09:07:49 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPecl rec {
|
|
|
|
pname = "snuffleupagus";
|
2023-07-15 17:15:38 +00:00
|
|
|
version = "0.9.0";
|
|
|
|
|
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-07-15 17:15:38 +00:00
|
|
|
hash = "sha256-1a4PYJ/j9BsoeF5V/KKGu7rqsL3YMo/FbaCBfNc4bfw=";
|
2021-06-04 09:07:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [
|
2021-06-06 07:54:09 +00:00
|
|
|
pcre2
|
2023-07-15 17:15:38 +00:00
|
|
|
] ++ 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
|
|
|
];
|
|
|
|
|
|
|
|
internalDeps = with php.extensions; [
|
|
|
|
session
|
|
|
|
];
|
|
|
|
|
2023-08-04 22:07:22 +00:00
|
|
|
sourceRoot = "${src.name}/src";
|
2021-06-04 09:07:49 +00:00
|
|
|
|
|
|
|
configureFlags = [
|
|
|
|
"--enable-snuffleupagus"
|
|
|
|
];
|
|
|
|
|
|
|
|
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
|
|
|
};
|
|
|
|
}
|