1{
2 lib,
3 buildPecl,
4 fetchFromGitHub,
5 pkg-config,
6 lua51Packages,
7}:
8
9buildPecl rec {
10 pname = "luasandbox";
11 version = "4.1.2";
12
13 src = fetchFromGitHub {
14 owner = "wikimedia";
15 repo = "mediawiki-php-luasandbox";
16 tag = version;
17 hash = "sha256-HWObytoHBvxF9+QC62yJfi6MuHOOXFbSNkhuz5zWPCY=";
18 };
19
20 nativeBuildInputs = [ pkg-config ];
21 buildInputs = [ lua51Packages.lua ];
22
23 meta = {
24 description = "Extension for PHP 7 and PHP 8 to allow safely running untrusted Lua 5.1 code from within PHP";
25 license = lib.licenses.mit;
26 homepage = "https://www.mediawiki.org/wiki/LuaSandbox";
27 maintainers = with lib.maintainers; [ georgyo ];
28 platforms = lib.platforms.linux;
29 };
30}