diff --git a/pkgs/development/php-packages/zstd/default.nix b/pkgs/development/php-packages/zstd/default.nix new file mode 100644 index 000000000000..a9428ca477a0 --- /dev/null +++ b/pkgs/development/php-packages/zstd/default.nix @@ -0,0 +1,32 @@ +{ buildPecl, lib, zstd, pkg-config, fetchFromGitHub }: + +let + version = "0.13.3"; +in buildPecl { + inherit version; + pname = "zstd"; + + src = fetchFromGitHub { + owner = "kjdev"; + repo = "php-ext-zstd"; + rev = version; + hash = "sha256-jEuL93ScF0/FlfUvib6uZafOkIe0+VkWV/frpSjTkvY="; + }; + + nativeBuildInputs = [ + pkg-config + ]; + + buildInputs = [ zstd ]; + + configureFlags = [ + "--with-libzstd" + ]; + + meta = with lib; { + description = "Zstd Extension for PHP"; + license = licenses.mit; + homepage = "https://github.com/kjdev/php-ext-zstd"; + maintainers = with lib.maintainers; [ shyim ]; + }; +} diff --git a/pkgs/top-level/php-packages.nix b/pkgs/top-level/php-packages.nix index c3ff83d20c83..345ed56b95e7 100644 --- a/pkgs/top-level/php-packages.nix +++ b/pkgs/top-level/php-packages.nix @@ -343,6 +343,8 @@ lib.makeScope pkgs.newScope (self: with self; { xdebug = callPackage ../development/php-packages/xdebug { }; yaml = callPackage ../development/php-packages/yaml { }; + + zstd = callPackage ../development/php-packages/zstd { }; } // lib.optionalAttrs config.allowAliases { php-spx = throw "php-spx is deprecated, use spx instead"; } // (