1{ buildPecl, lib, fetchFromGitHub, zlib }:
2
3let
4 version = "0.4.14";
5in buildPecl {
6 inherit version;
7 pname = "php-spx";
8
9 src = fetchFromGitHub {
10 owner = "NoiseByNorthwest";
11 repo = "php-spx";
12 rev = "v${version}";
13 hash = "sha256-LdR3ilknSUuNTAb9wfIpNGdaR3uwd4C47nZYRzfTfx8=";
14 };
15
16 configureFlags = [
17 "--with-zlib-dir=${zlib.dev}"
18 ];
19
20 preConfigure = ''
21 substituteInPlace Makefile.frag \
22 --replace '$(INSTALL_ROOT)$(prefix)/share/misc/php-spx/assets/web-ui' '${placeholder "out"}/share/misc/php-spx/assets/web-ui'
23 '';
24
25 meta = {
26 changelog = "https://github.com/NoiseByNorthwest/php-spx/releases/tag/${version}";
27 description = "A simple & straight-to-the-point PHP profiling extension with its built-in web UI";
28 homepage = "https://github.com/NoiseByNorthwest/php-spx";
29 license = lib.licenses.php301;
30 maintainers = with lib.maintainers; [ drupol ];
31 };
32}