Merge pull request #120699 from NorfairKing/package-php-snuffleupagus

php.extensions.snuffleupagus: init at 0.7.0
This commit is contained in:
Sandro 2021-06-01 15:47:53 +02:00 committed by GitHub
commit 3850fdb330
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 55 additions and 0 deletions

View file

@ -0,0 +1,53 @@
{ buildPecl
, lib
, php
, fetchFromGitHub
, pcre'
, fetchpatch
}:
buildPecl rec {
pname = "snuffleupagus";
version = "0.7.0";
src = fetchFromGitHub {
owner = "jvoisin";
repo = pname;
rev = "v${version}";
sha256 = "1la6wa9xznc110b7isiy502x71mkvhisq6m8llhczpq4rs4nbcw2";
};
buildInputs = [
pcre'
];
internalDeps = with php.extensions; [
session
] ++ lib.optionals (lib.versionOlder php.version "7.4") [
hash
];
patches = [
(fetchpatch {
url = "https://github.com/jvoisin/snuffleupagus/commit/3c528d9d03cec872382a6f400b5701a8fbfd59b4.patch";
sha256 = "0lnj4xcl867f477mha697d1py1nwxhl18dvvg40qgflpdbywlzns";
stripLen = 1;
})
];
sourceRoot = "source/src";
configureFlags = [
"--enable-snuffleupagus"
];
postPhpize = ''
./configure --enable-snuffleupagus
'';
meta = with lib; {
description = "Security module for php7 and php8 - Killing bugclasses and virtual-patching the rest!";
license = licenses.lgpl3Only;
homepage = "https://github.com/jvoisin/snuffleupagus";
maintainers = teams.php.members ++ [ maintainers.zupo ];
};
}

View file

@ -138,6 +138,8 @@ lib.makeScope pkgs.newScope (self: with self; {
smbclient = callPackage ../development/php-packages/smbclient { };
snuffleupagus = callPackage ../development/php-packages/snuffleupagus { };
sqlsrv = callPackage ../development/php-packages/sqlsrv { };
swoole = callPackage ../development/php-packages/swoole { };