push sheeet
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s

This commit is contained in:
Dark Steveneq
2025-10-09 14:15:47 +02:00
commit 646b892680
49168 changed files with 5897842 additions and 0 deletions

View File

@@ -0,0 +1,33 @@
{
buildPecl,
lib,
rabbitmq-c,
fetchFromGitHub,
}:
let
version = "2.1.2";
in
buildPecl {
inherit version;
pname = "amqp";
src = fetchFromGitHub {
owner = "php-amqp";
repo = "php-amqp";
rev = "v${version}";
sha256 = "sha256-jVD5dq2kgFnprj190W9hnLG+9yPLWm19AjoGBBz6v8c=";
};
buildInputs = [ rabbitmq-c ];
AMQP_DIR = rabbitmq-c;
meta = with lib; {
changelog = "https://github.com/php-amqp/php-amqp/releases/tag/v${version}";
description = "PHP extension to communicate with any AMQP compliant server";
license = licenses.php301;
homepage = "https://github.com/php-amqp/php-amqp";
teams = [ teams.php ];
};
}

View File

@@ -0,0 +1,37 @@
{
buildPecl,
lib,
pcre2,
fetchFromGitHub,
}:
let
version = "5.1.27";
in
buildPecl {
inherit version;
pname = "apcu";
src = fetchFromGitHub {
owner = "krakjoe";
repo = "apcu";
rev = "v${version}";
sha256 = "sha256-kf1d+WLpwhzQVn9pnkXtPPTXI5XaAuIAReI6rDGypB8=";
};
buildInputs = [ pcre2 ];
doCheck = true;
makeFlags = [ "phpincludedir=$(dev)/include" ];
outputs = [
"out"
"dev"
];
meta = with lib; {
changelog = "https://github.com/krakjoe/apcu/releases/tag/v${version}";
description = "Userland cache for PHP";
homepage = "https://pecl.php.net/package/APCu";
license = licenses.php301;
teams = [ teams.php ];
};
}

View File

@@ -0,0 +1,28 @@
{
buildPecl,
lib,
fetchFromGitHub,
}:
let
version = "1.1.3";
in
buildPecl {
inherit version;
pname = "ast";
src = fetchFromGitHub {
owner = "nikic";
repo = "php-ast";
rev = "v${version}";
sha256 = "sha256-TGMZA3Qe+/TwG+FIevrcQzy/ufCyN8sXKjsPrnz3K1Q=";
};
meta = with lib; {
changelog = "https://github.com/nikic/php-ast/releases/tag/v${version}";
description = "Exposes the abstract syntax tree generated by PHP";
license = licenses.bsd3;
homepage = "https://pecl.php.net/package/ast";
teams = [ teams.php ];
};
}

View File

@@ -0,0 +1,33 @@
{
lib,
php82,
fetchFromGitHub,
versionCheckHook,
}:
php82.buildComposerProject2 (finalAttrs: {
pname = "box";
version = "4.6.6";
src = fetchFromGitHub {
owner = "box-project";
repo = "box";
tag = finalAttrs.version;
hash = "sha256-giJAcH2R9hAlUTbwRi7rbmUP+WV8Nfb9XmoHHs4RcbI=";
};
vendorHash = "sha256-7oZtuQ7PhB7q9vNO2TLI46kg2q9BgdLjGUduGXAHc0E=";
doInstallCheck = true;
nativeInstallCheckInputs = [ versionCheckHook ];
versionCheckProgramArg = "--version";
meta = {
changelog = "https://github.com/box-project/box/releases/tag/${finalAttrs.version}";
description = "Application for building and managing Phars";
homepage = "https://github.com/box-project/box";
license = lib.licenses.mit;
mainProgram = "box";
teams = [ lib.teams.php ];
};
})

View File

@@ -0,0 +1,50 @@
{
lib,
fetchFromGitHub,
installShellFiles,
php,
nix-update-script,
versionCheckHook,
}:
php.buildComposerProject2 (finalAttrs: {
pname = "castor";
version = "0.27.0";
src = fetchFromGitHub {
owner = "jolicode";
repo = "castor";
tag = "v${finalAttrs.version}";
hash = "sha256-ot4akuKhNtEXukiDSy69q75phx6EvkJsL0XHAN+el+M=";
};
vendorHash = "sha256-S5NCV3wd/EA282NA0Wbtj7gbZw9YU835cr5CmpAnapc=";
nativeBuildInputs = [ installShellFiles ];
# install shell completions
postInstall = ''
installShellCompletion --cmd castor \
--bash <(php $out/bin/castor completion bash) \
--fish <(php $out/bin/castor completion fish) \
--zsh <(php $out/bin/castor completion zsh)
'';
doInstallCheck = true;
nativeInstallCheckInputs = [ versionCheckHook ];
versionCheckProgramArg = "--version";
passthru = {
updateScript = nix-update-script { };
};
meta = {
broken = lib.versionOlder php.version "8.2";
changelog = "https://github.com/jolicode/castor/blob/v${finalAttrs.version}/CHANGELOG.md";
description = "DX oriented task runner and command launcher built with PHP";
homepage = "https://github.com/jolicode/castor";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ gaelreyrol ];
mainProgram = "castor";
};
})

View File

@@ -0,0 +1,72 @@
{
"_readme": [
"This file locks the dependencies of your project to a known state",
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "04664aa86ba468bc6c83825839823dd7",
"packages": [
{
"name": "nix-community/composer-local-repo-plugin",
"version": "1.1.0",
"dist": {
"type": "path",
"url": "./src",
"reference": "56bd0f1fb990aa295ca43fc23141b7147a3b5490"
},
"require": {
"composer-plugin-api": "^2",
"php": ">= 7.2"
},
"require-dev": {
"composer/composer": "^2.6 || ^2.7",
"phpunit/phpunit": "^8"
},
"type": "composer-plugin",
"extra": {
"class": "NixCommunity\\ComposerLocalRepoPlugin\\Plugin"
},
"autoload": {
"psr-4": {
"NixCommunity\\ComposerLocalRepoPlugin\\": "src"
}
},
"autoload-dev": {
"psr-4": {
"test\\NixCommunity\\ComposerLocalRepoPlugin\\": "test"
}
},
"scripts": {
"changelog-unreleased": [
"auto-changelog -c .auto-changelog -u"
],
"changelog-version": [
"auto-changelog -c .auto-changelog -v"
]
},
"license": [
"MIT"
],
"description": "A plugin for Composer which provides a command to create local Composer repository for your projects.",
"homepage": "https://github.com/nix-community/composer-local-repo-plugin",
"funding": [
{
"type": "github",
"url": "https://github.com/drupol"
}
],
"transport-options": {
"relative": true
}
}
],
"packages-dev": [],
"aliases": [],
"minimum-stability": "stable",
"stability-flags": [],
"prefer-stable": false,
"prefer-lowest": false,
"platform": [],
"platform-dev": [],
"plugin-api-version": "2.6.0"
}

View File

@@ -0,0 +1,33 @@
{
lib,
fetchFromGitHub,
php,
}:
let
version = "1.1.0";
in
php.buildComposerWithPlugin {
pname = "nix-community/composer-local-repo-plugin";
inherit version;
src = fetchFromGitHub {
owner = "nix-community";
repo = "composer-local-repo-plugin";
rev = version;
hash = "sha256-edbn07r/Uc1g0qOuVBZBs6N1bMN5kIfA1b4FCufdw5M=";
};
composerLock = ./composer.lock;
vendorHash = "sha256-SL3HiYTVaUwcEfnRO932MWgOP1VRkxTl3lxLbW0qiTY=";
meta = {
changelog = "https://github.com/nix-community/composer-local-repo-plugin/releases/tag/${version}";
description = "Composer plugin that facilitates the creation of a local composer type repository";
homepage = "https://github.com/nix-community/composer-local-repo-plugin";
license = lib.licenses.mit;
mainProgram = "composer";
maintainers = [ ];
platforms = lib.platforms.all;
};
}

View File

@@ -0,0 +1,126 @@
{
lib,
stdenvNoCC,
fetchFromGitHub,
callPackage,
php,
unzip,
_7zz,
xz,
gitMinimal,
curl,
cacert,
makeBinaryWrapper,
versionCheckHook,
}:
stdenvNoCC.mkDerivation (finalAttrs: {
pname = "composer";
version = "2.8.12";
# Hash used by ../../../build-support/php/pkgs/composer-phar.nix to
# use together with the version from this package to keep the
# bootstrap phar file up-to-date together with the end user composer
# package.
passthru.pharHash = "sha256-9EbqcZcIu4X8v07xje9dBRXx+bTXA/bYIMnBZW4QovI=";
composer = callPackage ../../../build-support/php/pkgs/composer-phar.nix {
inherit (finalAttrs) version;
inherit (finalAttrs.passthru) pharHash;
};
src = fetchFromGitHub {
owner = "composer";
repo = "composer";
tag = finalAttrs.version;
hash = "sha256-UHCsdJmoE7X2ZiiBAWfC004FUMqHyd0URt+v8R3hn70=";
};
nativeBuildInputs = [ makeBinaryWrapper ];
buildInputs = [ php ];
vendor = stdenvNoCC.mkDerivation {
pname = "${finalAttrs.pname}-vendor";
inherit (finalAttrs) src version;
nativeBuildInputs = [
cacert
finalAttrs.composer
];
dontPatchShebangs = true;
doCheck = true;
buildPhase = ''
runHook preBuild
composer install --no-dev --no-interaction --no-progress --optimize-autoloader
runHook postBuild
'';
checkPhase = ''
runHook preCheck
composer validate
runHook postCheck
'';
installPhase = ''
runHook preInstall
cp -ar . $out/
runHook postInstall
'';
env = {
COMPOSER_CACHE_DIR = "/dev/null";
COMPOSER_DISABLE_NETWORK = "0";
COMPOSER_HTACCESS_PROTECT = "0";
COMPOSER_MIRROR_PATH_REPOS = "1";
COMPOSER_ROOT_VERSION = finalAttrs.version;
};
outputHashMode = "recursive";
outputHashAlgo = "sha256";
outputHash = "sha256-gnCPcp+c2dFL+9MJf0JRCQ5E95/dET1F0ZZAYj/rWq4=";
};
installPhase = ''
runHook preInstall
mkdir -p $out
cp -ar ${finalAttrs.vendor}/* $out/
chmod +w $out/bin
wrapProgram $out/bin/composer \
--prefix PATH : ${
lib.makeBinPath [
_7zz
curl
gitMinimal
unzip
xz
]
}
runHook postInstall
'';
doInstallCheck = true;
nativeInstallCheckInputs = [ versionCheckHook ];
versionCheckProgramArg = "--version";
meta = {
changelog = "https://github.com/composer/composer/releases/tag/${finalAttrs.version}";
description = "Dependency Manager for PHP";
homepage = "https://getcomposer.org/";
license = lib.licenses.mit;
mainProgram = "composer";
teams = [ lib.teams.php ];
};
})

View File

@@ -0,0 +1,45 @@
{
lib,
buildPecl,
fetchFromGitHub,
libcouchbase,
zlib,
replaceVars,
php,
}:
let
pname = "couchbase";
version = "3.2.2";
in
buildPecl {
inherit pname version;
src = fetchFromGitHub {
owner = "couchbase";
repo = "php-couchbase";
rev = "v${version}";
sha256 = "sha256-JpzLR4NcyShl2VTivj+15iAsTTsZmdMIdZYc3dLCbIA=";
};
configureFlags = [ "--with-couchbase" ];
buildInputs = [
libcouchbase
zlib
];
patches = [
(replaceVars ./libcouchbase.patch {
inherit libcouchbase;
})
];
meta = with lib; {
changelog = "https://github.com/couchbase/php-couchbase/releases/tag/v${version}";
description = "Couchbase Server PHP extension";
license = licenses.asl20;
homepage = "https://docs.couchbase.com/php-sdk/current/project-docs/sdk-release-notes.html";
teams = [ teams.php ];
broken = lib.versionAtLeast php.version "8.3";
};
}

View File

@@ -0,0 +1,11 @@
--- a/config.m4
+++ b/config.m4
@@ -28,7 +28,7 @@ if test "$PHP_COUCHBASE" != "no"; then
dnl fallback on standard directory
else
- for i in /usr/local /usr; do
+ for i in @libcouchbase@; do
if test -r $i/include/libcouchbase/couchbase.h; then
LIBCOUCHBASE_DIR=$i
AC_MSG_RESULT(found in $i)

View File

@@ -0,0 +1,571 @@
{
"_readme": [
"This file locks the dependencies of your project to a known state",
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "c949500f008befd2980bd7f80454c43b",
"packages": [
{
"name": "composer/spdx-licenses",
"version": "1.5.8",
"source": {
"type": "git",
"url": "https://github.com/composer/spdx-licenses.git",
"reference": "560bdcf8deb88ae5d611c80a2de8ea9d0358cc0a"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/composer/spdx-licenses/zipball/560bdcf8deb88ae5d611c80a2de8ea9d0358cc0a",
"reference": "560bdcf8deb88ae5d611c80a2de8ea9d0358cc0a",
"shasum": ""
},
"require": {
"php": "^5.3.2 || ^7.0 || ^8.0"
},
"require-dev": {
"phpstan/phpstan": "^0.12.55",
"symfony/phpunit-bridge": "^4.2 || ^5"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-main": "1.x-dev"
}
},
"autoload": {
"psr-4": {
"Composer\\Spdx\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Nils Adermann",
"email": "naderman@naderman.de",
"homepage": "http://www.naderman.de"
},
{
"name": "Jordi Boggiano",
"email": "j.boggiano@seld.be",
"homepage": "http://seld.be"
},
{
"name": "Rob Bast",
"email": "rob.bast@gmail.com",
"homepage": "http://robbast.nl"
}
],
"description": "SPDX licenses list and validation library.",
"keywords": [
"license",
"spdx",
"validator"
],
"support": {
"irc": "ircs://irc.libera.chat:6697/composer",
"issues": "https://github.com/composer/spdx-licenses/issues",
"source": "https://github.com/composer/spdx-licenses/tree/1.5.8"
},
"funding": [
{
"url": "https://packagist.com",
"type": "custom"
},
{
"url": "https://github.com/composer",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/composer/composer",
"type": "tidelift"
}
],
"time": "2023-11-20T07:44:33+00:00"
},
{
"name": "cyclonedx/cyclonedx-library",
"version": "v3.3.1",
"source": {
"type": "git",
"url": "https://github.com/CycloneDX/cyclonedx-php-library.git",
"reference": "cad0f92b36c85f36b3d3c11ff96002af5f20cd10"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/CycloneDX/cyclonedx-php-library/zipball/cad0f92b36c85f36b3d3c11ff96002af5f20cd10",
"reference": "cad0f92b36c85f36b3d3c11ff96002af5f20cd10",
"shasum": ""
},
"require": {
"composer/spdx-licenses": "^1.5",
"ext-dom": "*",
"ext-json": "*",
"ext-libxml": "*",
"opis/json-schema": "^2.0",
"package-url/packageurl-php": "^1.0",
"php": "^8.1"
},
"require-dev": {
"ext-simplexml": "*",
"roave/security-advisories": "dev-latest"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "3.x-dev"
},
"composer-normalize": {
"indent-size": 4,
"indent-style": "space"
}
},
"autoload": {
"psr-4": {
"CycloneDX\\Core\\": "src/Core/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"Apache-2.0"
],
"authors": [
{
"name": "Jan Kowalleck",
"email": "jan.kowalleck@gmail.com",
"homepage": "https://github.com/jkowalleck"
}
],
"description": "Work with CycloneDX documents.",
"homepage": "https://github.com/CycloneDX/cyclonedx-php-library/#readme",
"keywords": [
"CycloneDX",
"HBOM",
"OBOM",
"SBOM",
"SaaSBOM",
"bill-of-materials",
"bom",
"models",
"normalizer",
"owasp",
"package-url",
"purl",
"serializer",
"software-bill-of-materials",
"spdx",
"validator",
"vdr",
"vex"
],
"support": {
"docs": "https://cyclonedx-php-library.readthedocs.io",
"issues": "https://github.com/CycloneDX/cyclonedx-php-library/issues",
"source": "https://github.com/CycloneDX/cyclonedx-php-library/"
},
"funding": [
{
"url": "https://owasp.org/donate/?reponame=www-project-cyclonedx&title=OWASP+CycloneDX",
"type": "other"
}
],
"time": "2024-05-06T13:34:55+00:00"
},
{
"name": "cyclonedx/cyclonedx-php-composer",
"version": "5.2.0",
"dist": {
"type": "path",
"url": "./src",
"reference": "88ae6a60b882d72668d409b0d4fcc9bfa0c66259"
},
"require": {
"composer-plugin-api": "^2.3",
"cyclonedx/cyclonedx-library": "^3.3",
"package-url/packageurl-php": "^1.0",
"php": "^8.1"
},
"require-dev": {
"composer/composer": "^2.3.0",
"roave/security-advisories": "dev-latest"
},
"type": "composer-plugin",
"extra": {
"branch-alias": {
"dev-master": "4.x-dev"
},
"class": "CycloneDX\\Composer\\Plugin",
"composer-normalize": {
"indent-size": 4,
"indent-style": "space"
}
},
"autoload": {
"psr-4": {
"CycloneDX\\Composer\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"CycloneDX\\Tests\\": "tests/"
}
},
"scripts": {
"clean": [
"rm -rf reports",
"@php tools/psalm/vendor/vimeo/psalm/psalm --clear-cache",
"@php tools/psalm/vendor/vimeo/psalm/psalm --clear-global-cache",
"rm -rf .*.cache",
"rm -rf .tmp"
],
"cs-fix": [
"@php tools/php-cs-fixer/vendor/friendsofphp/php-cs-fixer/php-cs-fixer fix --diff"
],
"dev-setup": [
"@composer -d tools/composer-normalize update",
"@composer -d tools/composer-require-checker update",
"@composer -d tools/composer-unused update",
"@composer -d tools/php-cs-fixer update",
"@composer -d tools/psalm update",
"@composer -d tools/phpunit update",
"@composer update"
],
"normalize": [
"@composer -d tools/composer-normalize normalize --diff $PWD/composer.json"
],
"test": [
"@composer validate",
"@test:psalm",
"@test:phpunit",
"@test:cs-fixer",
"@test:composer-unused",
"@test:composer-require-checker",
"@test:composer-normalize"
],
"test:composer-normalize": [
"@composer -d tools/composer-normalize normalize --dry-run $PWD/composer.json"
],
"test:composer-require-checker": [
"@putenv XDEBUG_MODE=off",
"@php tools/composer-require-checker/vendor/maglnet/composer-require-checker/bin/composer-require-checker check"
],
"test:composer-unused": [
"@php tools/composer-unused/vendor/icanhazstring/composer-unused/bin/composer-unused --excludeDir=tools"
],
"test:cs-fixer": [
"@php tools/php-cs-fixer/vendor/friendsofphp/php-cs-fixer/php-cs-fixer fix --dry-run --diff"
],
"test:phpunit": [
"@php -d zend.assertions=1 -d assert.exception=1 -d display_errors=On -d error_reporting=-1 -d log_errors_max_len=0 -d memory_limit=-1 tools/phpunit/vendor/phpunit/phpunit/phpunit"
],
"test:psalm": [
"@php tools/psalm/vendor/vimeo/psalm/psalm"
]
},
"license": [
"Apache-2.0"
],
"authors": [
{
"name": "Jan Kowalleck",
"email": "jan.kowalleck@gmail.com",
"homepage": "https://github.com/jkowalleck"
}
],
"description": "Creates CycloneDX Software Bill-of-Materials (SBOM) from PHP Composer projects",
"homepage": "https://github.com/CycloneDX/cyclonedx-php-composer/#readme",
"keywords": [
"BOM",
"CycloneDX",
"PURL",
"SBOM",
"SPDX",
"bill-of-materials",
"composer",
"package-url",
"software-bill-of-materials"
],
"support": {
"issues": "https://github.com/CycloneDX/cyclonedx-php-composer/issues",
"source": "https://github.com/CycloneDX/cyclonedx-php-composer/"
},
"funding": [
{
"type": "other",
"url": "https://owasp.org/donate/?reponame=www-project-cyclonedx&title=OWASP+CycloneDX"
}
],
"transport-options": {
"relative": true
}
},
{
"name": "opis/json-schema",
"version": "2.3.0",
"source": {
"type": "git",
"url": "https://github.com/opis/json-schema.git",
"reference": "c48df6d7089a45f01e1c82432348f2d5976f9bfb"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/opis/json-schema/zipball/c48df6d7089a45f01e1c82432348f2d5976f9bfb",
"reference": "c48df6d7089a45f01e1c82432348f2d5976f9bfb",
"shasum": ""
},
"require": {
"ext-json": "*",
"opis/string": "^2.0",
"opis/uri": "^1.0",
"php": "^7.4 || ^8.0"
},
"require-dev": {
"ext-bcmath": "*",
"ext-intl": "*",
"phpunit/phpunit": "^9.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.x-dev"
}
},
"autoload": {
"psr-4": {
"Opis\\JsonSchema\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"Apache-2.0"
],
"authors": [
{
"name": "Sorin Sarca",
"email": "sarca_sorin@hotmail.com"
},
{
"name": "Marius Sarca",
"email": "marius.sarca@gmail.com"
}
],
"description": "Json Schema Validator for PHP",
"homepage": "https://opis.io/json-schema",
"keywords": [
"json",
"json-schema",
"schema",
"validation",
"validator"
],
"support": {
"issues": "https://github.com/opis/json-schema/issues",
"source": "https://github.com/opis/json-schema/tree/2.3.0"
},
"time": "2022-01-08T20:38:03+00:00"
},
{
"name": "opis/string",
"version": "2.0.1",
"source": {
"type": "git",
"url": "https://github.com/opis/string.git",
"reference": "9ebf1a1f873f502f6859d11210b25a4bf5d141e7"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/opis/string/zipball/9ebf1a1f873f502f6859d11210b25a4bf5d141e7",
"reference": "9ebf1a1f873f502f6859d11210b25a4bf5d141e7",
"shasum": ""
},
"require": {
"ext-iconv": "*",
"ext-json": "*",
"php": "^7.4 || ^8.0"
},
"require-dev": {
"phpunit/phpunit": "^9.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.x-dev"
}
},
"autoload": {
"psr-4": {
"Opis\\String\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"Apache-2.0"
],
"authors": [
{
"name": "Marius Sarca",
"email": "marius.sarca@gmail.com"
},
{
"name": "Sorin Sarca",
"email": "sarca_sorin@hotmail.com"
}
],
"description": "Multibyte strings as objects",
"homepage": "https://opis.io/string",
"keywords": [
"multi-byte",
"opis",
"string",
"string manipulation",
"utf-8"
],
"support": {
"issues": "https://github.com/opis/string/issues",
"source": "https://github.com/opis/string/tree/2.0.1"
},
"time": "2022-01-14T15:42:23+00:00"
},
{
"name": "opis/uri",
"version": "1.1.0",
"source": {
"type": "git",
"url": "https://github.com/opis/uri.git",
"reference": "0f3ca49ab1a5e4a6681c286e0b2cc081b93a7d5a"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/opis/uri/zipball/0f3ca49ab1a5e4a6681c286e0b2cc081b93a7d5a",
"reference": "0f3ca49ab1a5e4a6681c286e0b2cc081b93a7d5a",
"shasum": ""
},
"require": {
"opis/string": "^2.0",
"php": "^7.4 || ^8.0"
},
"require-dev": {
"phpunit/phpunit": "^9"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.x-dev"
}
},
"autoload": {
"psr-4": {
"Opis\\Uri\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"Apache-2.0"
],
"authors": [
{
"name": "Marius Sarca",
"email": "marius.sarca@gmail.com"
},
{
"name": "Sorin Sarca",
"email": "sarca_sorin@hotmail.com"
}
],
"description": "Build, parse and validate URIs and URI-templates",
"homepage": "https://opis.io",
"keywords": [
"URI Template",
"parse url",
"punycode",
"uri",
"uri components",
"url",
"validate uri"
],
"support": {
"issues": "https://github.com/opis/uri/issues",
"source": "https://github.com/opis/uri/tree/1.1.0"
},
"time": "2021-05-22T15:57:08+00:00"
},
{
"name": "package-url/packageurl-php",
"version": "1.1.2",
"source": {
"type": "git",
"url": "https://github.com/package-url/packageurl-php.git",
"reference": "32058ad61f0d8b457fa26e7860bbd8b903196d3f"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/package-url/packageurl-php/zipball/32058ad61f0d8b457fa26e7860bbd8b903196d3f",
"reference": "32058ad61f0d8b457fa26e7860bbd8b903196d3f",
"shasum": ""
},
"require": {
"php": "^7.3 || ^8.0"
},
"require-dev": {
"ext-json": "*",
"phpunit/phpunit": "9.6.16",
"roave/security-advisories": "dev-latest"
},
"type": "library",
"extra": {
"composer-normalize": {
"indent-size": 4,
"indent-style": "space"
}
},
"autoload": {
"psr-4": {
"PackageUrl\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Jan Kowalleck",
"email": "jan.kowalleck@gmail.com",
"homepage": "https://github.com/jkowalleck"
}
],
"description": "Builder and parser based on the package URL (purl) specification.",
"homepage": "https://github.com/package-url/packageurl-php#readme",
"keywords": [
"package",
"package-url",
"packageurl",
"purl",
"url"
],
"support": {
"issues": "https://github.com/package-url/packageurl-php/issues",
"source": "https://github.com/package-url/packageurl-php/tree/1.1.2"
},
"funding": [
{
"url": "https://github.com/sponsors/jkowalleck",
"type": "github"
}
],
"time": "2024-02-05T11:20:07+00:00"
}
],
"packages-dev": [],
"aliases": [],
"minimum-stability": "stable",
"stability-flags": [],
"prefer-stable": false,
"prefer-lowest": false,
"platform": [],
"platform-dev": [],
"plugin-api-version": "2.6.0"
}

View File

@@ -0,0 +1,33 @@
{
lib,
fetchFromGitHub,
php,
}:
let
version = "5.2.0";
in
php.buildComposerWithPlugin {
pname = "cyclonedx/cyclonedx-php-composer";
inherit version;
src = fetchFromGitHub {
owner = "CycloneDX";
repo = "cyclonedx-php-composer";
rev = "v${version}";
hash = "sha256-0fb1QiuVJqcB7CAEyB0y60/O9iiibT06mccZYe52dFQ=";
};
composerLock = ./composer.lock;
vendorHash = "sha256-QPlHWXXksetNSsv3olmCtPA/VsFVPV09rYQEsPezZoE=";
meta = {
changelog = "https://github.com/CycloneDX/cyclonedx-php-composer/releases/tag/v${version}";
description = "Composer plugin that facilitates the creation of a CycloneDX Software Bill of Materials (SBOM) from PHP Composer projects";
homepage = "https://github.com/CycloneDX/cyclonedx-php-composer";
license = lib.licenses.asl20;
mainProgram = "composer";
maintainers = [ ];
platforms = lib.platforms.all;
};
}

View File

@@ -0,0 +1,60 @@
{
lib,
stdenv,
buildPecl,
cargo,
rustc,
fetchFromGitHub,
rustPlatform,
curl,
pcre2,
libiconv,
php,
}:
buildPecl rec {
pname = "ddtrace";
version = "0.97.0";
src = fetchFromGitHub {
owner = "DataDog";
repo = "dd-trace-php";
rev = version;
fetchSubmodules = true;
hash = "sha256-Kx2HaWvRT+mFIs0LAAptx6nm9DQ83QEuyHNcEPEr7A4=";
};
cargoDeps = rustPlatform.fetchCargoVendor {
inherit src;
hash = "sha256-cwhE6M8r8QnrIiNgEekI25GcKTByySrZsigPd9/Fq7o=";
};
env.NIX_CFLAGS_COMPILE = "-O2";
nativeBuildInputs = [
cargo
rustc
rustPlatform.bindgenHook
rustPlatform.cargoSetupHook
];
buildInputs = [
curl
pcre2
]
++ lib.optionals stdenv.hostPlatform.isDarwin [
libiconv
];
meta = {
changelog = "https://github.com/DataDog/dd-trace-php/blob/${src.rev}/CHANGELOG.md";
description = "Datadog Tracing PHP Client";
homepage = "https://github.com/DataDog/dd-trace-php";
license = with lib.licenses; [
asl20
bsd3
];
teams = [ lib.teams.php ];
broken = lib.versionAtLeast php.version "8.4";
};
}

View File

@@ -0,0 +1,26 @@
{
buildPecl,
lib,
mpdecimal,
php,
}:
let
version = "1.5.0";
in
buildPecl {
pname = "decimal";
version = version;
hash = "sha256-it8w8hOLYwtCZoDYhaP5k5TD/pQLtj37K2lSESF80ok=";
buildInputs = [ mpdecimal ];
configureFlags = [ "--with-libmpdec-path=${mpdecimal}" ];
meta = {
description = "Arbitrary-precision decimal arithmetic for PHP";
homepage = "https://php-decimal.github.io";
changelog = "https://pecl.php.net/package-changelog.php?package=decimal&release=${version}";
license = lib.licenses.mit;
teams = [ lib.teams.php ];
};
}

View File

@@ -0,0 +1,32 @@
{
buildPecl,
lib,
pcre2,
php,
fetchFromGitHub,
}:
let
version = "1.6.0";
in
buildPecl {
inherit version;
pname = "ds";
src = fetchFromGitHub {
owner = "php-ds";
repo = "ext-ds";
rev = "v${version}";
sha256 = "sha256-c7MIqaPwIgdzKHRqR2km1uTQRrrr3OzDzopTbz5rLnE=";
};
buildInputs = [ pcre2 ];
meta = with lib; {
changelog = "https://github.com/php-ds/ext-ds/releases/tag/v${version}";
description = "Extension providing efficient data structures for PHP";
license = licenses.mit;
homepage = "https://github.com/php-ds/ext-ds";
teams = [ teams.php ];
};
}

View File

@@ -0,0 +1,41 @@
{
buildPecl,
lib,
php,
pkg-config,
openssl,
libevent,
}:
buildPecl {
pname = "event";
version = "3.1.4";
sha256 = "sha256-XEyqc7wtzu4xCS/5GSE53yjpqA8RR63g3+hp2y5N39M=";
configureFlags = [
"--with-event-libevent-dir=${libevent.dev}"
"--with-event-core"
"--with-event-extra"
"--with-event-pthreads"
];
postPhpize = ''
substituteInPlace configure --replace \
'as_fn_error $? "Couldn'\'''t find $phpincludedir/sockets/php_sockets.h. Please check if sockets extension installed" "$LINENO" 5' \
':'
'';
nativeBuildInputs = [ pkg-config ];
buildInputs = [
openssl
libevent
];
internalDeps = [ php.extensions.sockets ];
meta = with lib; {
description = "Efficiently schedule I/O, time and signal based events using the best I/O notification mechanism available";
license = licenses.php301;
homepage = "https://bitbucket.org/osmanov/pecl-event/";
teams = [ teams.php ];
};
}

View File

@@ -0,0 +1,28 @@
{
buildPecl,
lib,
fetchFromGitHub,
}:
let
version = "1.2.5";
in
buildPecl {
inherit version;
pname = "excimer";
src = fetchFromGitHub {
owner = "wikimedia";
repo = "mediawiki-php-excimer";
tag = version;
hash = "sha256-xFnyqofazXtPfwp/4xNYwrPEW9vWzz5akXjCOiyP4nw=";
};
meta = {
changelog = "https://pecl.php.net/package-changelog.php?package=excimer&release=${version}";
description = "PHP extension that provides an interrupting timer and a low-overhead sampling profiler";
license = lib.licenses.asl20;
homepage = "https://mediawiki.org/wiki/Excimer";
teams = [ lib.teams.php ];
};
}

View File

@@ -0,0 +1,62 @@
{
buildPecl,
lib,
gpgme,
file,
gnupg,
php,
fetchFromGitHub,
}:
let
version = "1.5.4";
in
buildPecl {
inherit version;
pname = "gnupg";
src = fetchFromGitHub {
owner = "php-gnupg";
repo = "php-gnupg";
rev = "gnupg-${version}";
fetchSubmodules = true;
hash = "sha256-g9w0v9qc/Q5qjB9/ekZyheQ1ClIEqMEoBc32nGWhXYA=";
};
buildInputs = [ gpgme ];
nativeCheckInputs = [ gnupg ];
postPhpize = ''
substituteInPlace configure \
--replace-fail '/usr/bin/file' '${file}/bin/file' \
--replace-fail 'SEARCH_PATH="/usr/local /usr /opt /opt/homebrew"' 'SEARCH_PATH="${gpgme.dev}"'
'';
postConfigure = ''
substituteInPlace Makefile \
--replace-fail 'run-tests.php' 'run-tests.php -q --offline'
substituteInPlace tests/gnupg_res_init_file_name.phpt \
--replace-fail '/usr/bin/gpg' '${gnupg}/bin/gpg' \
--replace-fail 'string(12)' 'string(${toString (lib.stringLength "${gnupg}/bin/gpg")})'
substituteInPlace tests/gnupg_oo_init_file_name.phpt \
--replace-fail '/usr/bin/gpg' '${gnupg}/bin/gpg' \
--replace-fail 'string(12)' 'string(${toString (lib.stringLength "${gnupg}/bin/gpg")})'
'';
patches = [
# https://github.com/php-gnupg/php-gnupg/issues/62
./missing-new-line-test.patch
];
doCheck = true;
meta = {
changelog = "https://github.com/php-gnupg/php-gnupg/releases/tag/gnupg-${version}";
broken = lib.versionOlder php.version "8.1"; # Broken on PHP older than 8.1.
description = "PHP wrapper for GpgME library that provides access to GnuPG";
license = lib.licenses.bsd3;
homepage = "https://pecl.php.net/package/gnupg";
maintainers = with lib.maintainers; [ taikx4 ];
teams = [ lib.teams.php ];
};
}

View File

@@ -0,0 +1,28 @@
diff --git a/tests/gnupg_oo_sign_clear.phpt b/tests/gnupg_oo_sign_clear.phpt
index 4f9b79c..05fda25 100644
--- a/tests/gnupg_oo_sign_clear.phpt
+++ b/tests/gnupg_oo_sign_clear.phpt
@@ -38,8 +38,7 @@ array(1) {
int(0)
}
}
-string(8) "foo bar
-"
+string(7) "foo bar"
--CLEAN--
<?php
require_once "gnupgt.inc";
diff --git a/tests/gnupg_res_sign_clear.phpt b/tests/gnupg_res_sign_clear.phpt
index 71dd6c2..74fd26d 100644
--- a/tests/gnupg_res_sign_clear.phpt
+++ b/tests/gnupg_res_sign_clear.phpt
@@ -36,8 +36,7 @@ array(1) {
int(0)
}
}
-string(8) "foo bar
-"
+string(7) "foo bar"
--CLEAN--
<?php
require_once "gnupgt.inc";

View File

@@ -0,0 +1,30 @@
{
buildPecl,
pkg-config,
lib,
grpc,
}:
buildPecl {
pname = "grpc";
inherit (grpc) version src;
sourceRoot = "${grpc.src.name}/src/php/ext/grpc";
patches = [
./use-pkgconfig.patch # https://github.com/grpc/grpc/pull/35404
./skip-darwin-test.patch # https://github.com/grpc/grpc/pull/35403
];
nativeBuildInputs = [ pkg-config ];
buildInputs = [ grpc ];
doCheck = true;
meta = {
description = "High performance, open source, general RPC framework that puts mobile and HTTP/2 first";
homepage = "https://github.com/grpc/grpc/tree/master/src/php/ext/grpc";
license = lib.licenses.asl20;
teams = [ lib.teams.php ];
};
}

View File

@@ -0,0 +1,22 @@
From b1fa212d0bc29dcc72107ad67fb99d4ef573942a Mon Sep 17 00:00:00 2001
From: Shyim <github@shyim.de>
Date: Thu, 28 Dec 2023 10:28:21 +0100
Subject: [PATCH] php: skip epoll1 test on darwin
---
tests/grpc-set-ini.phpt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/grpc-set-ini.phpt b/tests/grpc-set-ini.phpt
index 55c18ee526e24..b39348ea2e685 100644
--- a/tests/grpc-set-ini.phpt
+++ b/tests/grpc-set-ini.phpt
@@ -1,7 +1,7 @@
--TEST--
Ensure ini settings are handled
--SKIPIF--
-<?php if (!extension_loaded("grpc")) print "skip"; ?>
+<?php if (!extension_loaded("grpc") || PHP_OS === "Darwin") print "skip"; ?>
--INI--
grpc.enable_fork_support = 1
grpc.poll_strategy = epoll1

View File

@@ -0,0 +1,82 @@
From 24b4e273bd503760a485e92ca418e4699767ec51 Mon Sep 17 00:00:00 2001
From: Shyim <github@shyim.de>
Date: Thu, 28 Dec 2023 10:38:42 +0100
Subject: [PATCH] [php]: add with-grpc-dir to configure and add pkg-config
support
---
config.m4 | 48 +++++++++++++++++++++++++-------------
1 file changed, 32 insertions(+), 16 deletions(-)
diff --git a/config.m4 b/config.m4
index 5600df34ccfa3..c2186a41d21f5 100755
--- a/config.m4
+++ b/config.m4
@@ -7,35 +7,51 @@ PHP_ARG_ENABLE(coverage, whether to include code coverage symbols,
PHP_ARG_ENABLE(tests, whether to compile helper methods for tests,
[ --enable-tests Enable tests methods], no, no)
+PHP_ARG_WITH(grpc-dir, for grpc,
+[ --with-grpc-dir[=DIR] Set the path to grpc install prefix.], yes)
+
dnl Check whether to enable tests
if test "$PHP_TESTS" != "no"; then
CPPFLAGS="$CPPFLAGS -DGRPC_PHP_DEBUG"
fi
if test "$PHP_GRPC" != "no"; then
- dnl Write more examples of tests here...
-
- dnl # --with-grpc -> check with-path
- SEARCH_PATH="/usr/local /usr" # you might want to change this
- SEARCH_FOR="include/grpc/grpc.h" # you most likely want to change this
- if test -r $PHP_GRPC/$SEARCH_FOR; then # path given as parameter
- GRPC_DIR=$PHP_GRPC
- else # search default path list
+ AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
+
+ if test "$PHP_GRPC_DIR" = "yes" -a -x $PKG_CONFIG; then
+ AC_MSG_CHECKING([for grpc using pkg-config])
+
+ if ! $PKG_CONFIG --exists grpc ; then
+ AC_MSG_ERROR([grpc not found])
+ fi
+
+ GRPC_VERSION=`$PKG_CONFIG grpc --modversion`
+ AC_MSG_RESULT([found version $GRPC_VERSION])
+
+ PHP_GRPC_LIBS=`$PKG_CONFIG grpc --libs`
+ PHP_GRPC_INCS=`$PKG_CONFIG grpc --cflags`
+
+ PHP_EVAL_LIBLINE($PHP_GRPC_LIBS, AMQP_SHARED_LIBADD)
+ PHP_EVAL_INCLINE($PHP_GRPC_INCS)
+ else
AC_MSG_CHECKING([for grpc files in default path])
+
+ SEARCH_PATH="$PHP_GRPC_DIR /usr/local /usr"
+
for i in $SEARCH_PATH ; do
- if test -r $i/$SEARCH_FOR; then
+ if test -r $i/include/grpc/grpc.h; then
GRPC_DIR=$i
AC_MSG_RESULT(found in $i)
fi
done
- fi
- if test -z "$GRPC_DIR"; then
- AC_MSG_RESULT([not found])
- AC_MSG_ERROR([Please reinstall the grpc distribution])
- fi
- dnl # --with-grpc -> add include path
- PHP_ADD_INCLUDE($GRPC_DIR/include)
+ if test -z "$GRPC_DIR"; then
+ AC_MSG_RESULT([not found])
+ AC_MSG_ERROR([Please reinstall the grpc distribution])
+ fi
+
+ PHP_ADD_INCLUDE($GRPC_DIR/include)
+ fi
LIBS="-lpthread $LIBS"

View File

@@ -0,0 +1,33 @@
{
fetchFromGitHub,
lib,
php,
versionCheckHook,
}:
php.buildComposerProject2 (finalAttrs: {
pname = "grumphp";
version = "2.15.0";
src = fetchFromGitHub {
owner = "phpro";
repo = "grumphp";
rev = "v${finalAttrs.version}";
hash = "sha256-48seCSiYvlNWPu9xP1kGKNwK+98F6wf602dxMjYLVio=";
};
vendorHash = "sha256-1sDvUuB5XsCqD23IDI4kVFZUiYhaqrwDg4xQgb2kC38=";
doInstallCheck = true;
nativeInstallCheckInputs = [ versionCheckHook ];
versionCheckProgramArg = "--version";
meta = {
changelog = "https://github.com/phpro/grumphp/releases/tag/v${finalAttrs.version}";
description = "PHP code-quality tool";
homepage = "https://github.com/phpro/grumphp";
license = lib.licenses.mit;
mainProgram = "grumphp";
teams = [ lib.teams.php ];
};
})

View File

@@ -0,0 +1,21 @@
{ buildPecl, lib }:
buildPecl {
pname = "igbinary";
version = "3.2.14";
sha256 = "sha256-YzcUek+4iAclZmdIN72pko7gbufwEUtDOLhsgWIykl0=";
configureFlags = [ "--enable-igbinary" ];
makeFlags = [ "phpincludedir=$(dev)/include" ];
outputs = [
"out"
"dev"
];
meta = {
description = "Binary serialization for PHP";
homepage = "https://github.com/igbinary/igbinary/";
license = lib.licenses.bsd3;
teams = [ lib.teams.php ];
};
}

View File

@@ -0,0 +1,27 @@
{
buildPecl,
fetchpatch,
lib,
imagemagick,
pkg-config,
pcre2,
php,
}:
buildPecl {
pname = "imagick";
version = "3.8.0";
sha256 = "sha256-vaZ0YchU8g1hBXgrdpxST8NziLddRIHZUWRNIWf/7sY=";
configureFlags = [ "--with-imagick=${imagemagick.dev}" ];
nativeBuildInputs = [ pkg-config ];
buildInputs = [ pcre2 ];
meta = with lib; {
description = "Imagick is a native php extension to create and modify images using the ImageMagick API";
license = licenses.php301;
homepage = "https://pecl.php.net/package/imagick";
teams = [ teams.php ];
};
}

View File

@@ -0,0 +1,60 @@
{
buildPecl,
fetchFromGitHub,
fetchpatch,
lib,
libkrb5,
openssl,
pam,
pcre2,
pkg-config,
uwimap,
}:
let
version = "1.0.2";
in
buildPecl {
inherit version;
pname = "imap";
src = fetchFromGitHub {
owner = "php";
repo = "pecl-mail-imap";
rev = version;
hash = "sha256-QVeimxm3rfWMvMpSgadhMKd24yPdDGVuhXIOs8668do=";
};
patches = [
# Fix compilation with PHP 8.4.
(fetchpatch {
url = "https://github.com/php/pecl-mail-imap/commit/4fc9970a29c205ec328f36edc8c119c158129324.patch";
hash = "sha256-MxEaEe4YVeP7W5gDSNJb0thwAhxDj/yRr3qvjlJjRL4=";
})
];
nativeBuildInputs = [ pkg-config ];
buildInputs = [
uwimap
openssl
pam
pcre2
libkrb5
];
configureFlags = [
"--with-imap=${uwimap}"
"--with-imap-ssl"
"--with-kerberos"
];
doCheck = true;
meta = with lib; {
description = "PHP extension for checking the spelling of a word";
homepage = "https://pecl.php.net/package/imap";
license = licenses.php301;
teams = [ teams.php ];
};
}

View File

@@ -0,0 +1,18 @@
{ buildPecl, lib }:
buildPecl {
pname = "inotify";
version = "3.0.0";
sha256 = "sha256-xxt4ZEwBFVecx5T1jnhEFEF1HXgEC52dGiI9Ppwtcj0=";
doCheck = true;
meta = {
description = "Inotify bindings for PHP";
homepage = "https://github.com/arnaud-lb/php-inotify";
license = lib.licenses.php301;
teams = [ lib.teams.php ];
platforms = lib.platforms.linux;
};
}

View File

@@ -0,0 +1,58 @@
{
stdenv,
lib,
fetchurl,
php,
}:
let
source =
{
"aarch64-darwin" = {
url = "https://web.archive.org/web/20250614103627/https://downloads.ioncube.com/loader_downloads/ioncube_loaders_dar_arm64.tar.gz";
sha256 = "sha256-Dji4PIX5GqU6mOC7ZrSEu3dAZtsiVVuvKQ9Z5aGiuQ4=";
};
"aarch64-linux" = {
url = "https://web.archive.org/web/20250614103715/https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_aarch64.tar.gz";
sha256 = "sha256-zushkH7g3L62bDdjgTZamWcxOp35xQisOjSG6e2EEHg=";
};
"x86_64-linux" = {
url = "https://web.archive.org/web/20250614103238/https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz";
sha256 = "sha256-W8AXulfQx2nkT9nznCCx2lrayKA3R+n2TyhU1ScNjMg=";
};
}
.${stdenv.hostPlatform.system};
phpVersion = lib.versions.majorMinor php.version;
systemPrefix = lib.substring 0 3 stdenv.hostPlatform.parsed.kernel.name; # lin, dar, fre
filename = "ioncube_loader_${systemPrefix}_${phpVersion}${lib.optionalString php.ztsSupport "_ts"}.so";
in
stdenv.mkDerivation {
pname = "ioncube-loader";
version = "14.4.1";
extensionName = "ioncube-loader";
src = fetchurl source;
installPhase = ''
runHook preInstall
install -Dm755 '${filename}' $out/lib/php/extensions/ioncube-loader.so
runHook postInstall
'';
meta = with lib; {
description = "Use ionCube-encoded files on a web server";
changelog = "https://www.ioncube.com/loaders.php";
homepage = "https://www.ioncube.com";
sourceProvenance = [ sourceTypes.binaryNativeCode ];
license = licenses.unfree;
maintainers = with maintainers; [ neverbehave ];
platforms = [
"x86_64-linux"
"aarch64-linux"
"aarch64-darwin"
];
};
}

View File

@@ -0,0 +1,30 @@
{
lib,
buildPecl,
fetchFromGitHub,
pkg-config,
lua51Packages,
}:
buildPecl rec {
pname = "luasandbox";
version = "4.1.2";
src = fetchFromGitHub {
owner = "wikimedia";
repo = "mediawiki-php-luasandbox";
tag = version;
hash = "sha256-HWObytoHBvxF9+QC62yJfi6MuHOOXFbSNkhuz5zWPCY=";
};
nativeBuildInputs = [ pkg-config ];
buildInputs = [ lua51Packages.lua ];
meta = {
description = "Extension for PHP 7 and PHP 8 to allow safely running untrusted Lua 5.1 code from within PHP";
license = lib.licenses.mit;
homepage = "https://www.mediawiki.org/wiki/LuaSandbox";
maintainers = with lib.maintainers; [ georgyo ];
platforms = lib.platforms.linux;
};
}

View File

@@ -0,0 +1,24 @@
{
buildPecl,
lib,
php,
}:
buildPecl {
pname = "mailparse";
version = "3.1.8";
hash = "sha256-Wb6rTvhRdwxJW6egcmq0DgmBNUaaEdnI5mWwiclu/C8=";
internalDeps = [ php.extensions.mbstring ];
postConfigure = ''
echo "#define HAVE_MBSTRING 1" >> config.h
'';
meta = with lib; {
description = "Mailparse is an extension for parsing and working with email messages";
license = licenses.php301;
homepage = "https://pecl.php.net/package/mailparse";
teams = [ lib.teams.php ];
};
}

View File

@@ -0,0 +1,36 @@
{
buildPecl,
lib,
fetchFromGitHub,
libmaxminddb,
}:
let
pname = "maxminddb";
version = "1.12.1";
in
buildPecl {
inherit pname version;
src = fetchFromGitHub {
owner = "maxmind";
repo = "MaxMind-DB-Reader-php";
rev = "v${version}";
sha256 = "sha256-VsQOztF4TN3XgJjf3mZa1/Y5+6ounbkLRAzawLSX+BI=";
};
prePatch = ''
cd ext
'';
buildInputs = [ libmaxminddb ];
meta = with lib; {
description = "C extension that is a drop-in replacement for MaxMind\\Db\\Reader";
license = with licenses; [ asl20 ];
homepage = "https://github.com/maxmind/MaxMind-DB-Reader-php";
teams = [
teams.helsinki-systems
teams.php
];
};
}

View File

@@ -0,0 +1,35 @@
{
buildPecl,
lib,
fetchFromGitHub,
php,
zlib,
pkg-config,
}:
buildPecl rec {
pname = "memcache";
version = "8.2";
src = fetchFromGitHub {
owner = "websupport-sk";
repo = "pecl-memcache";
rev = version;
hash = "sha256-77GvQ59XUpIZmdYZP6IhtjdkYwXKuNBSG+LBScz2BtI=";
};
internalDeps = [ php.extensions.session ];
configureFlags = [ "--with-zlib-dir=${zlib.dev}" ];
nativeBuildInputs = [ pkg-config ];
buildInputs = [ zlib ];
meta = with lib; {
description = "PHP extension for interfacing with memcached";
license = licenses.php301;
homepage = "https://github.com/websupport-sk/pecl-memcache";
maintainers = [ maintainers.krzaczek ];
teams = [ teams.php ];
};
}

View File

@@ -0,0 +1,42 @@
{
buildPecl,
lib,
fetchFromGitHub,
php,
cyrus_sasl,
zlib,
pkg-config,
libmemcached,
}:
buildPecl rec {
pname = "memcached";
version = "3.3.0";
src = fetchFromGitHub {
owner = "php-memcached-dev";
repo = "php-memcached";
rev = "v${version}";
sha256 = "sha256-V4d6bY0m1nuEfjZjt3qio4/HOBcSlD9+XMEl1GPfbhs=";
};
internalDeps = [ php.extensions.session ];
configureFlags = [
"--with-zlib-dir=${zlib.dev}"
"--with-libmemcached-dir=${libmemcached}"
];
nativeBuildInputs = [ pkg-config ];
buildInputs = [
cyrus_sasl
zlib
];
meta = with lib; {
description = "PHP extension for interfacing with memcached via libmemcached library";
license = licenses.php301;
homepage = "https://github.com/php-memcached-dev/php-memcached";
teams = [ teams.php ];
};
}

View File

@@ -0,0 +1,29 @@
{
buildPecl,
lib,
fetchFromGitHub,
nix-update-script,
}:
buildPecl rec {
version = "1.1.1-unstable-2022-03-25";
pname = "meminfo";
src = fetchFromGitHub {
owner = "BitOne";
repo = "php-meminfo";
rev = "0ab7f5aea96c4dafce27c7e215b4907db2a2f493";
hash = "sha256-MO+B+ZNg6OAnxkOtdA15o+G41XbsG1N1WBz7thMCjck=";
};
sourceRoot = "${src.name}/extension";
passthru.updateScript = nix-update-script { extraArgs = [ "--version=branch" ]; };
meta = {
description = "PHP extension to get insight about memory usage";
homepage = "https://github.com/BitOne/php-meminfo";
license = lib.licenses.mit;
maintainers = [ ];
};
}

View File

@@ -0,0 +1,33 @@
{
buildPecl,
lib,
fetchFromGitHub,
judy,
}:
let
version = "3.1.0";
in
buildPecl {
inherit version;
pname = "memprof";
src = fetchFromGitHub {
owner = "arnaud-lb";
repo = "php-memory-profiler";
rev = version;
hash = "sha256-gq+txAU2Fw+Zm1aIu0lwPUHRqtccNcHFpp0fm3f7BnQ=";
};
configureFlags = [ "--with-judy-dir=${judy}" ];
doCheck = true;
meta = {
changelog = "https://github.com/arnaud-lb/php-memory-profiler/releases/tag/${version}";
description = "Memory profiler for PHP. Helps finding memory leaks in PHP scripts";
homepage = "https://github.com/arnaud-lb/php-memory-profiler";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ gaelreyrol ];
};
}

View File

@@ -0,0 +1,47 @@
{
stdenv,
buildPecl,
fetchFromGitHub,
lib,
libiconv,
pcre2,
pkg-config,
cyrus_sasl,
icu64,
openssl,
snappy,
zlib,
}:
buildPecl rec {
pname = "mongodb";
version = "2.1.1";
src = fetchFromGitHub {
owner = "mongodb";
repo = "mongo-php-driver";
rev = version;
hash = "sha256-qvylwn4wHBWUcyqGWKUt7MMmTsttDQGmN5ySj1pHnkU=";
fetchSubmodules = true;
};
nativeBuildInputs = [ pkg-config ];
buildInputs = [
cyrus_sasl
icu64
openssl
snappy
zlib
pcre2
]
++ lib.optionals stdenv.hostPlatform.isDarwin [
libiconv
];
meta = {
description = "Official MongoDB PHP driver";
homepage = "https://github.com/mongodb/mongo-php-driver";
license = lib.licenses.asl20;
teams = [ lib.teams.php ];
};
}

View File

@@ -0,0 +1,17 @@
{ buildPecl, lib }:
buildPecl rec {
version = "3.0.0";
pname = "msgpack";
sha256 = "sha256-VTBqhHl9OZxrJpGB7EhGNPGL6hMwu9nXQFBDxZfeac0=";
meta = {
changelog = "https://pecl.php.net/package-info.php?package=msgpack&version=${version}";
description = "PHP extension for interfacing with MessagePack";
homepage = "https://github.com/msgpack/msgpack-php";
license = lib.licenses.bsd3;
maintainers = [ lib.maintainers.ostrolucky ];
teams = [ lib.teams.php ];
};
}

View File

@@ -0,0 +1,44 @@
{
buildPecl,
lib,
oracle-instantclient,
php,
}:
let
versionData =
if (lib.versionOlder php.version "8.1") then
{
version = "3.0.1";
sha256 = "108ds92620dih5768z19hi0jxfa7wfg5hdvyyvpapir87c0ap914";
}
else if (lib.versionOlder php.version "8.2") then
{
version = "3.2.1";
sha256 = "sha256-zyF703DzRZDBhlNFFt/dknmZ7layqhgjG1/ZDN+PEsg=";
}
else
{
version = "3.4.0";
sha256 = "sha256-YPXDijyQxGHZbWHFEpx4xTq3hCJU3ANVIi5t0OqMEag=";
};
in
buildPecl {
pname = "oci8";
inherit (versionData) version sha256;
buildInputs = [ oracle-instantclient ];
configureFlags = [ "--with-oci8=shared,instantclient,${oracle-instantclient.lib}/lib" ];
postPatch = ''
sed -i -e 's|OCISDKMANINC=`.*$|OCISDKMANINC="${oracle-instantclient.dev}/include"|' config.m4
'';
meta = with lib; {
description = "Extension for Oracle Database";
license = licenses.php301;
homepage = "https://pecl.php.net/package/oci8";
teams = [ teams.php ];
};
}

View File

@@ -0,0 +1,40 @@
{
lib,
stdenv,
buildPecl,
valgrind,
pcre2,
fetchFromGitHub,
php,
}:
let
version = "25.2.0";
in
buildPecl {
inherit version;
pname = "openswoole";
src = fetchFromGitHub {
owner = "openswoole";
repo = "swoole-src";
rev = "v${version}";
hash = "sha256-1Bq/relLhjPRROikpCzSzzrelxW3AiMA5G17Ln2lg34=";
};
buildInputs = [ pcre2 ] ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [ valgrind ];
meta = with lib; {
changelog = "https://github.com/openswoole/swoole-src/releases/tag/v${version}";
description = "Coroutine-based concurrency library and high performance programmatic server for PHP";
homepage = "https://www.openswoole.com/";
license = licenses.asl20;
longDescription = ''
Open Swoole allows you to build high-performance, async multi-tasking webservices and applications using an easy to use Coroutine API.\nOpen Swoole is a complete async solution that has built-in support for async programming via coroutines.
It offers a range of multi-threaded I/O modules (HTTP Server, WebSockets, TaskWorkers, Process Pools) out of the box and support for popular PHP clients like PDO for MySQL, and CURL.
You can use the sync or async, Coroutine API to write whole applications or create thousands of light weight Coroutines within one Linux process.
'';
teams = [ teams.php ];
broken = lib.versionOlder php.version "8.2";
};
}

View File

@@ -0,0 +1,34 @@
{
lib,
buildPecl,
fetchFromGitHub,
}:
let
version = "1.2.1";
in
buildPecl rec {
inherit version;
pname = "opentelemetry";
src = fetchFromGitHub {
owner = "open-telemetry";
repo = "opentelemetry-php-instrumentation";
rev = version;
hash = "sha256-zUrcikGB3O44ihcw2zOAhInfgF+sXT+Xl2lF7XJphzY=";
};
sourceRoot = "${src.name}/ext";
env.NIX_CFLAGS_COMPILE = "-Wno-parentheses-equality";
doCheck = true;
meta = with lib; {
changelog = "https://github.com/open-telemetry/opentelemetry-php-instrumentation/releases/tag/${version}";
description = "OpenTelemetry PHP auto-instrumentation extension";
homepage = "https://opentelemetry.io/";
license = licenses.asl20;
maintainers = with maintainers; [ gaelreyrol ];
};
}

View File

@@ -0,0 +1,20 @@
{
buildPecl,
lib,
php,
}:
buildPecl {
pname = "parallel";
version = "1.2.6";
hash = "sha256-tFQUbRxEb7gJlec0447akrngkJ0UZqojz5QNfXqvDcA=";
meta = {
description = "Parallel concurrency API";
# parallel extension requires PHP with ZTS enabled
# we mark extension as broken if ZTS support isn't enabled
broken = !php.ztsSupport;
homepage = "https://pecl.php.net/package/parallel";
license = lib.licenses.php301;
teams = [ lib.teams.php ];
};
}

View File

@@ -0,0 +1,40 @@
{
buildPecl,
lib,
pcre2,
fetchFromGitHub,
fetchpatch,
}:
let
version = "1.0.12";
in
buildPecl {
inherit version;
pname = "pcov";
src = fetchFromGitHub {
owner = "krakjoe";
repo = "pcov";
tag = "v${version}";
hash = "sha256-lyY17Y9chpTO8oeWmDGSh0YSnipYqCuy1qmn9su5Eu8=";
};
buildInputs = [ pcre2 ];
patches = [
# Allow building for PHP 8.4
(fetchpatch {
url = "https://github.com/krakjoe/pcov/commit/7d764c7c2555e8287351961d72be3ebec4d8743f.patch";
hash = "sha256-5wIHrrCwUXQpPdUg+3Kwyop5yvOzQQ3qc4pQXU8q2OM=";
})
];
meta = {
changelog = "https://github.com/krakjoe/pcov/releases/tag/v${version}";
description = "Self contained php-code-coverage compatible driver for PHP";
license = lib.licenses.php301;
homepage = "https://github.com/krakjoe/pcov";
teams = [ lib.teams.php ];
};
}

View File

@@ -0,0 +1,31 @@
{
buildPecl,
fetchFromGitHub,
lib,
pkg-config,
dlib,
}:
let
pname = "pdlib";
version = "1.1.0";
in
buildPecl {
inherit pname version;
src = fetchFromGitHub {
owner = "goodspb";
repo = "pdlib";
rev = "v${version}";
sha256 = "sha256-AKZ3F2XzEQCeZkacSXBinxeGQrHBmqjP7mDGQ3RBAiE=";
};
nativeBuildInputs = [ pkg-config ];
buildInputs = [ (dlib.override { guiSupport = true; }) ];
meta = with lib; {
description = "PHP extension for Dlib";
license = with licenses; [ mit ];
homepage = "https://github.com/goodspb/pdlib";
teams = [ lib.teams.php ];
};
}

View File

@@ -0,0 +1,29 @@
{
buildPecl,
lib,
oracle-instantclient,
php,
}:
buildPecl {
version = "1.1.0";
pname = "pdo_oci";
hash = "sha256-XKtpWH6Rn8s19Wlu15eb/6dcCpJ7Bc/pr9Pxi8L4S8c=";
buildInputs = [ oracle-instantclient ];
configureFlags = [ "--with-pdo-oci=instantclient,${oracle-instantclient.lib}/lib" ];
internalDeps = [ php.extensions.pdo ];
postPatch = ''
sed -i -e 's|OCISDKMANINC=`.*$|OCISDKMANINC="${oracle-instantclient.dev}/include"|' config.m4
'';
meta = {
changelog = "https://pecl.php.net/package-changelog.php?package=PDO_OCI";
description = "PHP PDO_OCI extension lets you access Oracle Database";
license = lib.licenses.php301;
homepage = "https://pecl.php.net/package/pdo_oci";
teams = [ lib.teams.php ];
};
}

View File

@@ -0,0 +1,26 @@
{
stdenv,
buildPecl,
lib,
libiconv,
unixODBC,
php,
}:
buildPecl {
pname = "pdo_sqlsrv";
version = "5.10.1";
sha256 = "sha256-x4VBlqI2vINQijRvjG7x35mbwh7rvYOL2wUTIV4GKK0=";
internalDeps = [ php.extensions.pdo ];
buildInputs = [ unixODBC ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ libiconv ];
meta = with lib; {
description = "Microsoft Drivers for PHP for SQL Server";
license = licenses.mit;
homepage = "https://github.com/Microsoft/msphpsql";
teams = [ teams.php ];
};
}

View File

@@ -0,0 +1,42 @@
{
buildPecl,
lib,
pcre2,
fetchFromGitHub,
php,
pkg-config,
}:
buildPecl rec {
pname = "phalcon";
version = "5.9.3";
src = fetchFromGitHub {
owner = "phalcon";
repo = "cphalcon";
rev = "v${version}";
hash = "sha256-1+8+kIaKvgQCE+qvZOkYOW/RdDv4ln0njC5VzL9jvnQ=";
};
internalDeps = [
php.extensions.session
php.extensions.pdo
];
# Fix GCC 14 build.
# from incompatible pointer type [-Wincompatible-pointer-types]
env.NIX_CFLAGS_COMPILE = "-Wno-error=incompatible-pointer-types";
nativeBuildInputs = [ pkg-config ];
buildInputs = [ pcre2 ];
sourceRoot = "${src.name}/build/phalcon";
meta = with lib; {
description = "Phalcon is a full stack PHP framework offering low resource consumption and high performance";
license = licenses.bsd3;
homepage = "https://phalcon.io";
maintainers = [ maintainers.krzaczek ];
teams = [ teams.php ];
};
}

View File

@@ -0,0 +1,33 @@
{
lib,
fetchFromGitHub,
php,
}:
(php.withExtensions ({ enabled, all }: enabled ++ (with all; [ ast ]))).buildComposerProject
(finalAttrs: {
pname = "phan";
version = "5.5.1";
src = fetchFromGitHub {
owner = "phan";
repo = "phan";
rev = finalAttrs.version;
hash = "sha256-G17ORkHmu6nkfJ8UrGzcaybPOKPrq1Q+LXVS56aVOZ8=";
};
vendorHash = "sha256-Ake5/7IyoweC2ONDuWt9jJSbG0JbnU9lmCRu2p6uUQM=";
meta = {
description = "Static analyzer for PHP";
homepage = "https://github.com/phan/phan";
license = lib.licenses.mit;
longDescription = ''
Phan is a static analyzer for PHP. Phan prefers to avoid false-positives
and attempts to prove incorrectness rather than correctness.
'';
mainProgram = "phan";
maintainers = with lib.maintainers; [ apeschar ];
teams = [ lib.teams.php ];
};
})

View File

@@ -0,0 +1,36 @@
{
lib,
fetchgit,
php,
versionCheckHook,
}:
(php.withExtensions ({ enabled, all }: enabled ++ (with all; [ xsl ]))).buildComposerProject2
(finalAttrs: {
pname = "phing";
version = "3.1.0";
# Upstream no longer provides the composer.lock in their release artifact
src = fetchgit {
url = "https://github.com/phingofficial/phing";
tag = finalAttrs.version;
hash = "sha256-gY6ocmkd7eJIMaBrewfxYL7gTr+1qNHTkuAp+w9ApUU=";
};
vendorHash = "sha256-3frpoQzHtJA2/jJpZT+yIRatEwiY6LIUGzEZBa8hXbM=";
nativeInstallCheckInputs = [
versionCheckHook
];
versionCheckProgramArg = "-version";
doInstallCheck = true;
meta = {
description = "PHing Is Not GNU make; it's a PHP project build system or build tool based on Apache Ant";
changelog = "https://github.com/phingofficial/phing/releases/tag/${finalAttrs.version}";
homepage = "https://github.com/phingofficial/phing";
license = lib.licenses.lgpl3;
mainProgram = "phing";
teams = [ lib.teams.php ];
};
})

View File

@@ -0,0 +1,28 @@
{
lib,
fetchFromGitHub,
php,
}:
php.buildComposerProject2 (finalAttrs: {
pname = "phive";
version = "0.16.0";
src = fetchFromGitHub {
owner = "phar-io";
repo = "phive";
tag = finalAttrs.version;
hash = "sha256-dv9v1KCLNheFmrRQ7cID5WFvoiH0OWVPWSrN023dEqA=";
};
vendorHash = "sha256-H1QJ+ML0tbZzEBKknP0GHhUhw+ujiIH/QNmEgA2zSmM=";
meta = {
changelog = "https://github.com/phar-io/phive/releases/tag/${finalAttrs.version}";
description = "Phar Installation and Verification Environment (PHIVE)";
homepage = "https://github.com/phar-io/phive";
license = lib.licenses.bsd3;
mainProgram = "phive";
teams = [ lib.teams.php ];
};
})

View File

@@ -0,0 +1,28 @@
{
fetchFromGitHub,
lib,
php,
}:
php.buildComposerProject2 (finalAttrs: {
pname = "php-codesniffer";
version = "4.0.0";
src = fetchFromGitHub {
owner = "PHPCSStandards";
repo = "PHP_CodeSniffer";
tag = finalAttrs.version;
hash = "sha256-2fubJMn44pS+++QgK66vm4YTT+0zdgtAJVHKvvWO/QA=";
};
vendorHash = "sha256-SswaHYkDhuW2HZX7QiBd7K6wTmt42z2/TpB7HP68b7k=";
meta = {
changelog = "https://github.com/PHPCSStandards/PHP_CodeSniffer/releases/tag/${finalAttrs.version}";
description = "PHP coding standard tool";
license = lib.licenses.bsd3;
homepage = "https://github.com/PHPCSStandards/PHP_CodeSniffer/";
maintainers = with lib.maintainers; [ javaguirre ];
teams = [ lib.teams.php ];
};
})

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,35 @@
{
lib,
fetchFromGitHub,
php,
versionCheckHook,
}:
php.buildComposerProject2 (finalAttrs: {
pname = "php-cs-fixer";
version = "3.87.2";
src = fetchFromGitHub {
owner = "PHP-CS-Fixer";
repo = "PHP-CS-Fixer";
tag = "v${finalAttrs.version}";
hash = "sha256-IPBMi8Bln99zcCxkNPGKWSUQMvtxHlRq4BwuoMCXkYw=";
};
composerLock = ./composer.lock;
vendorHash = "sha256-I4F6WDnWDEmLJFRGMS2QV62jaNAtZoTNQBoH3gT3OAw=";
doInstallCheck = true;
nativeInstallCheckInputs = [ versionCheckHook ];
versionCheckProgramArg = "--version";
meta = {
broken = lib.versionOlder php.version "8.2";
changelog = "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/releases/tag/v${finalAttrs.version}";
description = "Tool to automatically fix PHP coding standards issues";
homepage = "https://cs.symfony.com/";
license = lib.licenses.mit;
mainProgram = "php-cs-fixer";
maintainers = [ lib.maintainers.patka ];
};
})

View File

@@ -0,0 +1,278 @@
{
"_readme": [
"This file locks the dependencies of your project to a known state",
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "6af3d2163a5c70028dd91fd6716df630",
"packages": [],
"packages-dev": [
{
"name": "nette/tester",
"version": "v2.5.2",
"source": {
"type": "git",
"url": "https://github.com/nette/tester.git",
"reference": "328d7b64579cdbc82e0e01d92ea9c58b9cf0a327"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/nette/tester/zipball/328d7b64579cdbc82e0e01d92ea9c58b9cf0a327",
"reference": "328d7b64579cdbc82e0e01d92ea9c58b9cf0a327",
"shasum": ""
},
"require": {
"php": ">=8.0 <8.4"
},
"require-dev": {
"ext-simplexml": "*",
"phpstan/phpstan": "^1.0"
},
"bin": [
"src/tester"
],
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.5-dev"
}
},
"autoload": {
"classmap": [
"src/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause",
"GPL-2.0-only",
"GPL-3.0-only"
],
"authors": [
{
"name": "David Grudl",
"homepage": "https://davidgrudl.com"
},
{
"name": "Miloslav Hůla",
"homepage": "https://github.com/milo"
},
{
"name": "Nette Community",
"homepage": "https://nette.org/contributors"
}
],
"description": "Nette Tester: enjoyable unit testing in PHP with code coverage reporter. 🍏🍏🍎🍏",
"homepage": "https://tester.nette.org",
"keywords": [
"Xdebug",
"assertions",
"clover",
"code coverage",
"nette",
"pcov",
"phpdbg",
"phpunit",
"testing",
"unit"
],
"support": {
"issues": "https://github.com/nette/tester/issues",
"source": "https://github.com/nette/tester/tree/v2.5.2"
},
"time": "2024-01-08T11:41:26+00:00"
},
{
"name": "php-parallel-lint/php-console-color",
"version": "v1.0.1",
"source": {
"type": "git",
"url": "https://github.com/php-parallel-lint/PHP-Console-Color.git",
"reference": "7adfefd530aa2d7570ba87100a99e2483a543b88"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/php-parallel-lint/PHP-Console-Color/zipball/7adfefd530aa2d7570ba87100a99e2483a543b88",
"reference": "7adfefd530aa2d7570ba87100a99e2483a543b88",
"shasum": ""
},
"require": {
"php": ">=5.3.2"
},
"replace": {
"jakub-onderka/php-console-color": "*"
},
"require-dev": {
"php-parallel-lint/php-code-style": "^2.0",
"php-parallel-lint/php-parallel-lint": "^1.0",
"php-parallel-lint/php-var-dump-check": "0.*",
"phpunit/phpunit": "^4.8.36 || ^5.7.21 || ^6.0 || ^7.0 || ^8.0 || ^9.0"
},
"type": "library",
"autoload": {
"psr-4": {
"PHP_Parallel_Lint\\PhpConsoleColor\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-2-Clause"
],
"authors": [
{
"name": "Jakub Onderka",
"email": "jakub.onderka@gmail.com"
}
],
"description": "Simple library for creating colored console ouput.",
"support": {
"issues": "https://github.com/php-parallel-lint/PHP-Console-Color/issues",
"source": "https://github.com/php-parallel-lint/PHP-Console-Color/tree/v1.0.1"
},
"time": "2021-12-25T06:49:29+00:00"
},
{
"name": "php-parallel-lint/php-console-highlighter",
"version": "v1.0.0",
"source": {
"type": "git",
"url": "https://github.com/php-parallel-lint/PHP-Console-Highlighter.git",
"reference": "5b4803384d3303cf8e84141039ef56c8a123138d"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/php-parallel-lint/PHP-Console-Highlighter/zipball/5b4803384d3303cf8e84141039ef56c8a123138d",
"reference": "5b4803384d3303cf8e84141039ef56c8a123138d",
"shasum": ""
},
"require": {
"ext-tokenizer": "*",
"php": ">=5.3.2",
"php-parallel-lint/php-console-color": "^1.0.1"
},
"replace": {
"jakub-onderka/php-console-highlighter": "*"
},
"require-dev": {
"php-parallel-lint/php-code-style": "^2.0",
"php-parallel-lint/php-parallel-lint": "^1.0",
"php-parallel-lint/php-var-dump-check": "0.*",
"phpunit/phpunit": "^4.8.36 || ^5.7.21 || ^6.0 || ^7.0 || ^8.0 || ^9.0"
},
"type": "library",
"autoload": {
"psr-4": {
"PHP_Parallel_Lint\\PhpConsoleHighlighter\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Jakub Onderka",
"email": "acci@acci.cz",
"homepage": "http://www.acci.cz/"
}
],
"description": "Highlight PHP code in terminal",
"support": {
"issues": "https://github.com/php-parallel-lint/PHP-Console-Highlighter/issues",
"source": "https://github.com/php-parallel-lint/PHP-Console-Highlighter/tree/v1.0.0"
},
"time": "2022-02-18T08:23:19+00:00"
},
{
"name": "squizlabs/php_codesniffer",
"version": "3.10.1",
"source": {
"type": "git",
"url": "https://github.com/PHPCSStandards/PHP_CodeSniffer.git",
"reference": "8f90f7a53ce271935282967f53d0894f8f1ff877"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/8f90f7a53ce271935282967f53d0894f8f1ff877",
"reference": "8f90f7a53ce271935282967f53d0894f8f1ff877",
"shasum": ""
},
"require": {
"ext-simplexml": "*",
"ext-tokenizer": "*",
"ext-xmlwriter": "*",
"php": ">=5.4.0"
},
"require-dev": {
"phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0 || ^8.0 || ^9.3.4"
},
"bin": [
"bin/phpcbf",
"bin/phpcs"
],
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "3.x-dev"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Greg Sherwood",
"role": "Former lead"
},
{
"name": "Juliette Reinders Folmer",
"role": "Current lead"
},
{
"name": "Contributors",
"homepage": "https://github.com/PHPCSStandards/PHP_CodeSniffer/graphs/contributors"
}
],
"description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.",
"homepage": "https://github.com/PHPCSStandards/PHP_CodeSniffer",
"keywords": [
"phpcs",
"standards",
"static analysis"
],
"support": {
"issues": "https://github.com/PHPCSStandards/PHP_CodeSniffer/issues",
"security": "https://github.com/PHPCSStandards/PHP_CodeSniffer/security/policy",
"source": "https://github.com/PHPCSStandards/PHP_CodeSniffer",
"wiki": "https://github.com/PHPCSStandards/PHP_CodeSniffer/wiki"
},
"funding": [
{
"url": "https://github.com/PHPCSStandards",
"type": "github"
},
{
"url": "https://github.com/jrfnl",
"type": "github"
},
{
"url": "https://opencollective.com/php_codesniffer",
"type": "open_collective"
}
],
"time": "2024-05-22T21:24:41+00:00"
}
],
"aliases": [],
"minimum-stability": "stable",
"stability-flags": [],
"prefer-stable": false,
"prefer-lowest": false,
"platform": {
"php": ">=5.3.0",
"ext-json": "*"
},
"platform-dev": [],
"plugin-api-version": "2.6.0"
}

View File

@@ -0,0 +1,33 @@
{
fetchFromGitHub,
lib,
php,
versionCheckHook,
}:
php.buildComposerProject2 (finalAttrs: {
pname = "php-parallel-lint";
version = "1.4.0";
src = fetchFromGitHub {
owner = "php-parallel-lint";
repo = "PHP-Parallel-Lint";
tag = "v${finalAttrs.version}";
hash = "sha256-g5e/yfvfq55MQDux3JRDvhaYEay68Q4u1VfIwDRgv7I=";
};
composerLock = ./composer.lock;
vendorHash = "sha256-ySdLlqlGKZ6LgmAOBMkBNoCAqWrgMwE/Cj6ZEPEsCko=";
nativeInstallCheckInputs = [ versionCheckHook ];
doInstallCheck = true;
versionCheckProgram = "${placeholder "out"}/bin/${finalAttrs.meta.mainProgram}";
meta = {
description = "Tool to check syntax of PHP files faster than serial check with fancier output";
homepage = "https://github.com/php-parallel-lint/PHP-Parallel-Lint";
license = lib.licenses.bsd2;
mainProgram = "parallel-lint";
teams = [ lib.teams.php ];
};
})

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,37 @@
{
lib,
fetchFromGitHub,
php,
versionCheckHook,
}:
php.buildComposerProject2 (finalAttrs: {
pname = "phpinsights";
version = "2.12.0";
src = fetchFromGitHub {
owner = "nunomaduro";
repo = "phpinsights";
tag = "v${finalAttrs.version}";
hash = "sha256-XuvwO/MkGBMWo2hjDPDDYS3JmfWJH75mbNn6oKsMWps=";
};
composerLock = ./composer.lock;
vendorHash = "sha256-CwIfRmwJREz24Qj6J2PKQp+ix+/ZXo1oamcHc1fPUoc=";
nativeInstallCheckInputs = [
versionCheckHook
];
versionCheckProgramArg = "--version";
doInstallCheck = true;
meta = {
broken = lib.versionOlder php.version "8.2";
changelog = "https://github.com/nunomaduro/phpinsights/releases/tag/v${finalAttrs.version}";
description = "Instant PHP quality checks from your console";
homepage = "https://phpinsights.com/";
license = lib.licenses.mit;
mainProgram = "phpinsights";
teams = [ lib.teams.php ];
};
})

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,36 @@
{
lib,
fetchFromGitHub,
php,
versionCheckHook,
}:
php.buildComposerProject2 (finalAttrs: {
pname = "phpmd";
version = "2.15.0";
src = fetchFromGitHub {
owner = "phpmd";
repo = "phpmd";
tag = finalAttrs.version;
hash = "sha256-nTuJGzOZnkqrfE9R9Vujz/zGJRLlj8+yRZmmnxWrieQ=";
};
# Missing `composer.lock` from the repository.
# Issue open at https://github.com/phpmd/phpmd/issues/1056
composerLock = ./composer.lock;
vendorHash = "sha256-AahAs3Gq1OQ+CW3+rU8NnWcR3hKzVNq7s3llsO4mQ38=";
nativeInstallCheckInputs = [ versionCheckHook ];
versionCheckProgramArg = "--version";
doInstallCheck = true;
meta = {
changelog = "https://github.com/phpmd/phpmd/releases/tag/${finalAttrs.version}";
description = "PHP code quality analyzer";
homepage = "https://phpmd.org/";
license = lib.licenses.bsd3;
mainProgram = "phpmd";
teams = [ lib.teams.php ];
};
})

View File

@@ -0,0 +1,73 @@
{
lib,
stdenv,
fetchFromGitHub,
fetchpatch,
gnugrep,
binutils,
makeBinaryWrapper,
php,
testers,
phpPackages,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "phpspy";
version = "0.7.0";
src = fetchFromGitHub {
owner = "adsr";
repo = "phpspy";
rev = "v${finalAttrs.version}";
hash = "sha256-QphoDdnSFPVRvEro0WDUC/yRsOf4I5p5BpHq32olqJI=";
fetchSubmodules = true;
};
patches = [
(fetchpatch {
url = "https://github.com/adsr/phpspy/commit/8854e60ac38cfd2455d4a3d797f283eb3940cb7b.patch";
hash = "sha256-IMO9GV0Z8PDEAVhLevg5jGh/PHcbNq3f3fMGFaKoLL4=";
})
];
nativeBuildInputs = [
makeBinaryWrapper
php.unwrapped
];
env.USE_ZEND = 1;
installPhase = ''
runHook preInstall
install -Dt "$out/bin" phpspy stackcollapse-phpspy.pl
runHook postInstall
'';
postFixup = ''
wrapProgram "$out/bin/phpspy" \
--prefix PATH : "${
lib.makeBinPath [
gnugrep
# for objdump
binutils
]
}"
'';
passthru.tests.version = testers.testVersion {
version = "v${finalAttrs.version}";
package = phpPackages.phpspy;
command = "phpspy -v";
};
meta = with lib; {
description = "Low-overhead sampling profiler for PHP";
homepage = "https://github.com/adsr/phpspy";
license = licenses.mit;
mainProgram = "phpspy";
maintainers = with maintainers; [ gaelreyrol ];
platforms = [ "x86_64-linux" ];
};
})

View File

@@ -0,0 +1,41 @@
{
fetchFromGitHub,
lib,
php,
versionCheckHook,
}:
php.buildComposerProject2 (finalAttrs: {
pname = "phpstan";
version = "2.1.29";
src = fetchFromGitHub {
owner = "phpstan";
repo = "phpstan-src";
tag = finalAttrs.version;
hash = "sha256-8HPMXJ64qkV6fXfdr6fZTp2m1EhcWiq0cE51VQHuyro=";
};
vendorHash = "sha256-mSlxWkqhniphYUOjE0zucOqN9gKe3Th0GEikB7DyYVY=";
composerStrictValidation = false;
doInstallCheck = true;
nativeInstallCheckInputs = [ versionCheckHook ];
versionCheckProgramArg = "--version";
meta = {
changelog = "https://github.com/phpstan/phpstan/releases/tag/${finalAttrs.version}";
description = "PHP Static Analysis Tool";
homepage = "https://github.com/phpstan/phpstan";
longDescription = ''
PHPStan focuses on finding errors in your code without actually
running it. It catches whole classes of bugs even before you write
tests for the code. It moves PHP closer to compiled languages in the
sense that the correctness of each line of the code can be checked
before you run the actual line.
'';
license = lib.licenses.mit;
mainProgram = "phpstan";
maintainers = [ lib.maintainers.patka ];
};
})

View File

@@ -0,0 +1,32 @@
{
buildPecl,
lib,
fetchFromGitHub,
}:
buildPecl rec {
pname = "pinba";
version = "1.1.2";
src = fetchFromGitHub {
owner = "tony2001";
repo = "pinba_extension";
rev = "RELEASE_${lib.replaceStrings [ "." ] [ "_" ] version}";
sha256 = "0wqcqq6sb51wiawa37hbd1h9dbvmyyndzdvz87xqji7lpr9vn8jy";
};
# Fix GCC 14 build.
# from incompatible pointer type [-Wincompatible-pointer-types
env.NIX_CFLAGS_COMPILE = "-Wno-error=incompatible-pointer-types";
meta = with lib; {
description = "PHP extension for Pinba";
longDescription = ''
Pinba is a MySQL storage engine that acts as a realtime monitoring and
statistics server for PHP using MySQL as a read-only interface.
'';
license = licenses.lgpl2Plus;
homepage = "http://pinba.org/";
teams = [ teams.php ];
};
}

View File

@@ -0,0 +1,21 @@
{
buildPecl,
lib,
pcre2,
}:
buildPecl {
pname = "protobuf";
version = "3.21.9";
sha256 = "05zlq9k6c45wj1286850nl31024ik158jnj1f5kskr1pchknnsf3";
buildInputs = [ pcre2 ];
meta = with lib; {
description = "Google's language-neutral, platform-neutral, extensible mechanism for serializing structured data";
license = licenses.bsd3;
homepage = "https://developers.google.com/protocol-buffers/";
teams = [ teams.php ];
};
}

View File

@@ -0,0 +1,49 @@
{
lib,
fetchurl,
fetchFromGitHub,
php,
versionCheckHook,
runCommand,
}:
let
version = "6.13.1";
# The PHAR file is only required to get the `composer.lock` file
psalm-phar = fetchurl {
url = "https://github.com/vimeo/psalm/releases/download/${version}/psalm.phar";
hash = "sha256-bOxm5LYiQDCY0hU998Wnnp2+x44sidfCf/OqlQ+1gvA=";
};
in
php.buildComposerProject2 (finalAttrs: {
pname = "psalm";
inherit version;
src = fetchFromGitHub {
owner = "vimeo";
repo = "psalm";
tag = finalAttrs.version;
hash = "sha256-QsANvg/QXJucjxwM6IF20mZu4DPw/RcBJV6+5tJkZB0=";
};
composerLock = runCommand "composer.lock" { } ''
${lib.getExe php} -r '$phar = new Phar("${psalm-phar}"); $phar->extractTo(".", "composer.lock");'
cp composer.lock $out
'';
vendorHash = "sha256-18FAMuOO6rWAQEIJOLGxj/Avr5ZQRuI4ao2RL2nJlYc=";
doInstallCheck = true;
nativeInstallCheckInputs = [ versionCheckHook ];
versionCheckProgramArg = "--version";
meta = {
broken = lib.versionOlder php.version "8.2";
changelog = "https://github.com/vimeo/psalm/releases/tag/${finalAttrs.version}";
description = "Static analysis tool for finding errors in PHP applications";
homepage = "https://github.com/vimeo/psalm";
license = lib.licenses.mit;
mainProgram = "psalm";
maintainers = [ lib.maintainers.patka ];
};
})

View File

@@ -0,0 +1,32 @@
{
aspell,
buildPecl,
fetchFromGitHub,
lib,
}:
let
version = "1.0.1";
in
buildPecl {
inherit version;
pname = "pspell";
src = fetchFromGitHub {
owner = "php";
repo = "pecl-text-pspell";
rev = version;
hash = "sha256-IVBuEVsUKah8W+oVpIPT9Iln6MFox0e5/5Y14/Kgcg4=";
};
configureFlags = [ "--with-pspell=${aspell}" ];
doCheck = true;
meta = with lib; {
description = "PHP extension for checking the spelling of a word";
homepage = "https://pecl.php.net/package/pspell";
license = licenses.php301;
teams = [ teams.php ];
};
}

View File

@@ -0,0 +1,29 @@
{
buildPecl,
lib,
rdkafka,
pcre2,
}:
buildPecl {
pname = "rdkafka";
version = "6.0.5";
hash = "sha256-Cva2ZcljyMfREJzsc4A0N42ciGPL9hLAvTI15RmnCPE=";
buildInputs = [
rdkafka
pcre2
];
postPhpize = ''
substituteInPlace configure \
--replace-fail 'SEARCH_PATH="/usr/local /usr"' 'SEARCH_PATH=${lib.getInclude rdkafka}'
'';
meta = {
description = "Kafka client based on librdkafka";
license = lib.licenses.mit;
homepage = "https://github.com/arnaud-lb/php-rdkafka";
teams = [ lib.teams.php ];
};
}

View File

@@ -0,0 +1,31 @@
{
buildPecl,
lib,
php,
fetchFromGitHub,
}:
let
version = "6.2.0";
in
buildPecl {
inherit version;
pname = "redis";
src = fetchFromGitHub {
repo = "phpredis";
owner = "phpredis";
rev = version;
hash = "sha256-uUnH+AS4PgIm+uias5T5+W7X5Pzq4hx4c6zAl4OYk1g=";
};
internalDeps = with php.extensions; [ session ];
meta = with lib; {
changelog = "https://github.com/phpredis/phpredis/releases/tag/${version}";
description = "PHP extension for interfacing with Redis";
license = licenses.php301;
homepage = "https://github.com/phpredis/phpredis/";
teams = [ teams.php ];
};
}

View File

@@ -0,0 +1,183 @@
{
stdenv,
lib,
fetchurl,
php,
openssl,
hiredis,
libck,
zstd,
lz4,
autoPatchelfHook,
writeShellScript,
curl,
common-updater-scripts,
}:
let
version = "0.12.0";
hashes = {
"aarch64-darwin" = {
platform = "darwin-arm64";
hash = {
"8.1" = "sha256-AH8FzXjIPojCxTQqDChuZPUTDnVPeOeS5a0wNXjlyEk=";
"8.2" = "sha256-SdivilTHbr28fHaYxK7o1QIT+sWZGHQDjWC2EgtkBbM=";
"8.3" = "RUnmwI5q4jXHkiRuR/PwqnztEX/7y59DA/L7BelreVk=";
"8.4" = "sha256-y76rICDyrA/ogRxK+4C3JvJ4ch1fNLBrY01zMmcldnw=";
"8.5" = "W7BwODGEcRc6E7jpX1nojak7jDV5X+0tjgk32F82wvQ=";
};
};
"aarch64-linux" = {
platform = "debian-aarch64+libssl3";
hash = {
"8.1" = "sha256-Zg1DdzJKfovGwA+cTR5hDQ1Or8oPRrtsyBu3Zt+/6yg=";
"8.2" = "sha256-tV7aoi9aiUrpOufmN4pQKi0Q0Ad6wrajq9SnaeZGlKg=";
"8.3" = "sha256-zJN+RSzFXjOB3Uajk1Adrphbz7NAbWMcuB88RRK7SlY=";
"8.4" = "qvXUg3GqqN3UUtDPQz1H2BiG/b8SomGLyIPR1NIkFUA=";
"8.5" = "GZZa4a+MfoQPlpIA6zOEnD4UdErh/9fLhMp20rOmGIE=";
};
};
"x86_64-linux" = {
platform = "debian-x86-64+libssl3";
hash = {
"8.1" = "sha256-NTCRrTuiPDbKBauY+9nQm4oJn9TwHQvNfynSKk/bZ7w=";
"8.2" = "sha256-9GwMHf0GIErr0vZieCH5D5tvJiekpOdBo/u1P30L9lc=";
"8.3" = "sha256-180n5Naz6dQRCQCj7r0CJhRqfmEHjM7jgkmWRAvyFaY=";
"8.4" = "nGgvhtuita+rTtns+33xDDEaIXcd3aYiCAClizWtE1E=";
"8.5" = "wvxZ7jUrqXImzH1LEUmvxpxKL4NE0tAtu9M25P82d0w=";
};
};
};
makeSource =
{ system, phpMajor }:
fetchurl {
url =
"https://builds.r2.relay.so/v${version}/relay-v${version}-php"
+ phpMajor
+ "-"
+ hashes.${system}.platform
+ ".tar.gz";
sha256 =
hashes.${system}.hash.${phpMajor}
or (throw "Unsupported PHP version for relay ${phpMajor} on ${system}");
};
in
stdenv.mkDerivation (finalAttrs: {
inherit version;
pname = "relay";
extensionName = "relay";
src = makeSource {
system = stdenv.hostPlatform.system;
phpMajor = lib.versions.majorMinor php.version;
};
nativeBuildInputs = lib.optionals (!stdenv.hostPlatform.isDarwin) [ autoPatchelfHook ];
buildInputs = lib.optionals (!stdenv.hostPlatform.isDarwin) [
hiredis
libck
openssl
zstd
lz4
];
internalDeps = [ php.extensions.session ];
installPhase = ''
runHook preInstall
install -Dm755 relay.so -t $out/lib/php/extensions
''
+ (
if stdenv.hostPlatform.isDarwin then
let
args =
lib.strings.concatMapStrings
(v: " -change ${v.name}" + " ${lib.strings.makeLibraryPath [ v.value ]}/${baseNameOf v.name}")
(
with lib.attrsets;
[
(nameValuePair "/opt/homebrew/opt/hiredis/lib/libhiredis.1.1.0.dylib" hiredis)
(nameValuePair "/opt/homebrew/opt/hiredis/lib/libhiredis_ssl.dylib.1.1.0" hiredis)
(nameValuePair "/opt/homebrew/opt/concurrencykit/lib/libck.0.dylib" libck)
(nameValuePair "/opt/homebrew/opt/openssl@3/lib/libssl.3.dylib" openssl)
(nameValuePair "/opt/homebrew/opt/openssl@3/lib/libcrypto.3.dylib" openssl)
(nameValuePair "/opt/homebrew/opt/zstd/lib/libzstd.1.dylib" zstd)
(nameValuePair "/opt/homebrew/opt/lz4/lib/liblz4.1.dylib" lz4)
]
);
in
# fixDarwinDylibNames can't be used here because we need to completely remap .dylibs, not just add absolute paths
''
install_name_tool${args} $out/lib/php/extensions/relay.so
''
else
""
)
+ ''
# Random UUID that's required by the extension. Can be anything, but must be different from default.
sed -i "s/00000000-0000-0000-0000-000000000000/aced680f-30e9-40cc-a868-390ead14ba0c/" $out/lib/php/extensions/relay.so
chmod -w $out/lib/php/extensions/relay.so
runHook postInstall
'';
passthru = {
updateScript = writeShellScript "update-${finalAttrs.pname}" ''
set -o errexit
export PATH="$PATH:${
lib.makeBinPath [
curl
common-updater-scripts
]
}"
NEW_VERSION=$(curl --silent https://builds.r2.relay.so/meta/builds | sort -V | tail -n1 | cut -c2-)
if [[ "${version}" = "$NEW_VERSION" ]]; then
echo "The new version same as the old version."
exit 0
fi
for source in ${lib.concatStringsSep " " (builtins.attrNames finalAttrs.passthru.updateables)}; do
update-source-version "$UPDATE_NIX_ATTR_PATH.updateables.$source" "$NEW_VERSION" --ignore-same-version --ignore-same-hash --print-changes
done
'';
# All sources for updating by the update script.
updateables =
builtins.listToAttrs
# Collect all leaf attributes (containing hashes).
(
lib.collect (attrs: attrs ? name)
# create an attr containing
(
lib.mapAttrsRecursive (
path: _value:
lib.nameValuePair (builtins.replaceStrings [ "." ] [ "_" ] (lib.concatStringsSep "_" path)) (
finalAttrs.finalPackage.overrideAttrs (attrs: {
src = makeSource {
system = builtins.head path;
phpMajor = builtins.head (builtins.tail (builtins.tail path));
};
})
)
) (lib.filterAttrsRecursive (name: _value: name != "platform") hashes)
)
);
};
meta = with lib; {
description = "Next-generation Redis extension for PHP";
changelog = "https://github.com/cachewerk/relay/releases/tag/v${version}";
homepage = "https://relay.so/";
sourceProvenance = [ sourceTypes.binaryNativeCode ];
license = licenses.unfree;
maintainers = with maintainers; [
tillkruss
ostrolucky
];
platforms = [
"x86_64-linux"
"aarch64-linux"
"x86_64-darwin"
"aarch64-darwin"
];
};
})

View File

@@ -0,0 +1,32 @@
{
buildPecl,
lib,
pkg-config,
rrdtool,
}:
buildPecl {
pname = "rrd";
version = "2.0.3";
hash = "sha256-pCFh5YzcioU7cs/ymJidy96CsPdkVt1ZzgKFTJK3MPc=";
buildInputs = [
rrdtool
];
nativeBuildInputs = [
pkg-config
];
# Fix GCC 14 build.
# from incompatible pointer type [-Wincompatible-pointer-types
env.NIX_CFLAGS_COMPILE = "-Wno-error=incompatible-pointer-types";
meta = {
description = "PHP bindings to RRD tool system";
license = lib.licenses.bsd0;
homepage = "https://github.com/php/pecl-processing-rrd";
teams = [ lib.teams.wdz ];
};
}

View File

@@ -0,0 +1,24 @@
{
buildPecl,
lib,
samba,
pkg-config,
}:
buildPecl {
pname = "smbclient";
version = "1.1.2";
sha256 = "sha256-Hmp0RWOqxwCBXlca2YsRNahOhA1E5qxnmXSUx4Cpzec=";
# TODO: remove this when upstream merges a fix - https://github.com/eduardok/libsmbclient-php/pull/66
LIBSMBCLIENT_INCDIR = "${samba.dev}/include/samba-4.0";
nativeBuildInputs = [ pkg-config ];
buildInputs = [ samba ];
meta = with lib; {
description = "PHP wrapper for libsmbclient";
license = licenses.bsd2;
homepage = "https://github.com/eduardok/libsmbclient-php";
teams = [ teams.php ];
};
}

View File

@@ -0,0 +1,46 @@
{
stdenv,
buildPecl,
lib,
libiconv,
php,
fetchFromGitHub,
pcre2,
}:
buildPecl rec {
pname = "snuffleupagus";
version = "0.12.0";
src = fetchFromGitHub {
owner = "jvoisin";
repo = "snuffleupagus";
rev = "v${version}";
hash = "sha256-xTLdP71x3NevkjKff8hb0JE4TGfuYB0jGjDQJfFPC9Y=";
};
buildInputs = [
pcre2
]
++ lib.optionals stdenv.hostPlatform.isDarwin [
libiconv
];
internalDeps = with php.extensions; [ session ];
sourceRoot = "${src.name}/src";
configureFlags = [ "--enable-snuffleupagus" ];
postPhpize = ''
./configure --enable-snuffleupagus
'';
meta = {
description = "Security module for php7 and php8 - Killing bugclasses and virtual-patching the rest";
homepage = "https://github.com/jvoisin/snuffleupagus";
license = lib.licenses.lgpl3Only;
maintainers = [ lib.maintainers.zupo ];
teams = [ lib.teams.php ];
};
}

View File

@@ -0,0 +1,34 @@
{
buildPecl,
lib,
fetchFromGitHub,
zlib,
}:
let
version = "0.4.20";
in
buildPecl {
inherit version;
pname = "spx";
src = fetchFromGitHub {
owner = "NoiseByNorthwest";
repo = "php-spx";
rev = "v${version}";
hash = "sha256-2MOl9waWY3zK5NzQ19TJKK8kE7xC4K+e9AwV+wyAHZc=";
};
configureFlags = [
"--with-zlib-dir=${zlib.dev}"
"--with-spx-assets-dir=${placeholder "out"}/share/misc/php-spx/assets/"
];
meta = {
changelog = "https://github.com/NoiseByNorthwest/php-spx/releases/tag/${version}";
description = "Simple & straight-to-the-point PHP profiling extension with its built-in web UI";
homepage = "https://github.com/NoiseByNorthwest/php-spx";
license = lib.licenses.php301;
maintainers = with lib.maintainers; [ piotrkwiecinski ];
};
}

View File

@@ -0,0 +1,23 @@
{
stdenv,
buildPecl,
lib,
unixODBC,
libiconv,
}:
buildPecl {
pname = "sqlsrv";
version = "5.12.0";
sha256 = "sha256-qeu4gLKlWNPWaE9uaALFPFv/pJ4e5g0Uc6cST8nLcq0=";
buildInputs = [ unixODBC ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ libiconv ];
meta = with lib; {
description = "Microsoft Drivers for PHP for SQL Server";
license = licenses.mit;
homepage = "https://github.com/Microsoft/msphpsql";
teams = [ teams.php ];
};
}

View File

@@ -0,0 +1,24 @@
{
buildPecl,
lib,
libssh2,
}:
buildPecl rec {
version = "1.4.1";
pname = "ssh2";
sha256 = "sha256-e8pbI/cx252O0K6l25uxXaj/EzsPu6lhArguldpNh2Q=";
buildInputs = [ libssh2 ];
configureFlags = [ "--with-ssh2=${libssh2.dev}" ];
meta = with lib; {
changelog = "https://pecl.php.net/package-info.php?package=ssh2&version=${version}";
description = "PHP bindings for the libssh2 library";
license = licenses.php301;
homepage = "https://github.com/php/pecl-networking-ssh2";
maintainers = [ maintainers.ostrolucky ];
teams = [ teams.php ];
};
}

View File

@@ -0,0 +1,37 @@
{
lib,
stdenv,
buildPecl,
php,
valgrind,
pcre2,
fetchFromGitHub,
}:
let
version = "6.0.2";
in
buildPecl {
inherit version;
pname = "swoole";
src = fetchFromGitHub {
owner = "swoole";
repo = "swoole-src";
rev = "v${version}";
hash = "sha256-mCJj0vLpJinxK/EfPq+CeVWnoxouqClOKYbrgj7GNDc=";
};
buildInputs = [ pcre2 ] ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [ valgrind ];
# tests require internet access
doCheck = false;
meta = {
changelog = "https://github.com/swoole/swoole-src/releases/tag/v${version}";
description = "Coroutine-based concurrency library for PHP";
homepage = "https://www.swoole.com";
license = lib.licenses.asl20;
teams = [ lib.teams.php ];
};
}

View File

@@ -0,0 +1,54 @@
{
buildPecl,
fetchFromGitHub,
fetchpatch,
lib,
php,
runCommand,
systemd,
}:
buildPecl {
pname = "systemd";
version = "0.1.2-unstable-2018-06-11";
src = fetchFromGitHub {
owner = "systemd";
repo = "php-systemd";
rev = "22cf92a6b54ef4c5c13c301fc97d7a7b1615ee62";
hash = "sha256-UhpE9QXChqKLBqutpQ2Y6neo/ULlJGNojf9DCYJfQMU=";
};
patches = [
# Add missing arginfo to suppress the warning
# https://github.com/systemd/php-systemd/issues/9
(fetchpatch {
url = "https://github.com/systemd/php-systemd/commit/0f25ec9aab7747e85445a48213020ea6adda3658.diff";
hash = "sha256-SNRYDRxaeP9LlHxfZOak0OSqZ3AJA+I9Ln0k+yO0DvE=";
})
# Define SD_JOURNAL_SUPPRESS_LOCATION so that the php source code location is used, instead of the C one
# https://github.com/systemd/php-systemd/issues/2
(fetchpatch {
url = "https://github.com/systemd/php-systemd/commit/23575461b8cc55fa9c4132a58393b6438c2aff5c.diff";
hash = "sha256-KBGWdNE7spXpqbeS4c2D5IU3Dz8zGxx4r22FDOA0KzM=";
})
];
buildInputs = [ systemd.dev ];
configureFlags = [ "--with-systemd=${systemd.dev}" ];
# php will exit with a non-zero exit code, if the extension is not loaded
passthru.tests.smokeTest = runCommand "php-systemd-smoke-test" { } ''
echo "<?php sd_journal_send('MESSAGE=Hello world.'); ?>" |
${lib.getExe (php.withExtensions ({ all, ... }: [ all.systemd ]))}
echo ok > $out
'';
meta = {
description = "PHP extension allowing native interaction with systemd and its journal";
homepage = "https://github.com/systemd/php-systemd";
license = lib.licenses.mit;
teams = [ lib.teams.php ];
};
}

View File

@@ -0,0 +1,90 @@
{
stdenvNoCC,
lib,
fetchurl,
autoPatchelfHook,
php,
writeShellApplication,
curl,
gnugrep,
common-updater-scripts,
}:
let
soFile =
{
"8.0" = "tideways-php-8.0.so";
"8.1" = "tideways-php-8.1.so";
"8.2" = "tideways-php-8.2.so";
"8.3" = "tideways-php-8.3.so";
}
.${lib.versions.majorMinor php.version} or (throw "Unsupported PHP version.");
in
stdenvNoCC.mkDerivation (finalAttrs: {
pname = "tideways-php";
extensionName = "tideways";
version = "5.20.0";
src =
finalAttrs.passthru.sources.${stdenvNoCC.hostPlatform.system}
or (throw "Unsupported platform for tideways-php: ${stdenvNoCC.hostPlatform.system}");
nativeBuildInputs = lib.optionals stdenvNoCC.hostPlatform.isLinux [
autoPatchelfHook
];
installPhase = ''
runHook preInstall
install -D ${soFile} $out/lib/php/extensions/tideways.so
runHook postInstall
'';
passthru = {
sources = {
"x86_64-linux" = fetchurl {
url = "https://s3-eu-west-1.amazonaws.com/tideways/extension/${finalAttrs.version}/tideways-php-${finalAttrs.version}-x86_64.tar.gz";
hash = "sha256-uAmsmz+4tsCGw4jlzyZbUNjuzBU/HcIDWrHCC+0t4Xw=";
};
"aarch64-linux" = fetchurl {
url = "https://s3-eu-west-1.amazonaws.com/tideways/extension/${finalAttrs.version}/tideways-php-${finalAttrs.version}-arm64.tar.gz";
hash = "sha256-gPhr32G6h/U1uR/aaeIWpOaDV9HF8EbQF7p1kJ5SDis=";
};
"aarch64-darwin" = fetchurl {
url = "https://s3-eu-west-1.amazonaws.com/tideways/extension/${finalAttrs.version}/tideways-php-${finalAttrs.version}-macos-arm.tar.gz";
hash = "sha256-VfgX1SNYKoFR290gRoRXfD5CoLhDPkK+3+4o13P1kiM=";
};
};
updateScript = "${
writeShellApplication {
name = "update-tideways-probe";
runtimeInputs = [
curl
gnugrep
common-updater-scripts
];
text = ''
NEW_VERSION=$(curl --fail -L https://tideways.com/profiler/downloads | grep -E 'https://tideways.s3.amazonaws.com/extension/[0-9]+\.[0-9]+\.[0-9]+/tideways-php-[0-9]+\.[0-9]+\.[0-9]+-x86_64.tar.gz' | grep -oP 'extension/\K[0-9]+\.[0-9]+\.[0-9]+')
if [[ "${finalAttrs.version}" = "$NEW_VERSION" ]]; then
echo "The new version same as the old version."
exit 0
fi
for platform in ${lib.escapeShellArgs finalAttrs.meta.platforms}; do
update-source-version "php82Extensions.tideways" "$NEW_VERSION" --ignore-same-version --source-key="sources.$platform"
done
'';
}
}/bin/update-tideways-probe";
};
meta = with lib; {
description = "Tideways PHP Probe";
homepage = "https://tideways.com/";
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
license = licenses.unfree;
maintainers = with maintainers; [ shyim ];
platforms = lib.attrNames finalAttrs.passthru.sources;
};
})

View File

@@ -0,0 +1,36 @@
{
buildPecl,
lib,
libuuid,
fetchFromGitHub,
}:
let
version = "1.3.0";
in
buildPecl {
inherit version;
pname = "uuid";
src = fetchFromGitHub {
owner = "php";
repo = "pecl-networking-uuid";
tag = "v${version}";
hash = "sha256-00zJ//O1xqKTedRYThzeXOuL25wKLMZXjJWm/eXLkC4=";
};
buildInputs = [ libuuid ];
makeFlags = [ "phpincludedir=$(dev)/include" ];
doCheck = true;
env.PHP_UUID_DIR = libuuid;
meta = {
changelog = "https://github.com/php/pecl-networking-uuid/releases/tag/v${version}";
description = "Wrapper around Universally Unique IDentifier library (libuuid)";
license = lib.licenses.php301;
homepage = "https://github.com/php/pecl-networking-uuid";
teams = [ lib.teams.php ];
platforms = lib.platforms.linux;
};
}

View File

@@ -0,0 +1,28 @@
{
buildPecl,
lib,
fetchFromGitHub,
libuv,
}:
buildPecl rec {
pname = "uv";
version = "0.3.0";
src = fetchFromGitHub {
owner = "amphp";
repo = "ext-uv";
rev = "v${version}";
hash = "sha256-RYb7rszHbdTLfBi66o9hVkFwX+7RlcxH5PAw5frjpFg=";
};
buildInputs = [ libuv ];
meta = with lib; {
description = "Interface to libuv for php";
license = licenses.php301;
homepage = "https://github.com/amphp/ext-uv";
teams = [ teams.php ];
platforms = platforms.linux;
};
}

View File

@@ -0,0 +1,35 @@
{
lib,
buildPecl,
fetchFromGitHub,
nix-update-script,
php,
}:
let
version = "0.19.0";
in
buildPecl {
pname = "vld";
inherit version;
src = fetchFromGitHub {
owner = "derickr";
repo = "vld";
tag = version;
hash = "sha256-pQ1KIdGtV7bN5nROOJHR7C1eFMqVioTNLPAsJzH86NI=";
};
# Tests relies on PHP 7.0
doCheck = false;
passthru.updateScript = nix-update-script { extraArgs = [ "--version=branch" ]; };
meta = {
description = "Vulcan Logic Dumper hooks into the Zend Engine and dumps all the opcodes (execution units) of a script";
homepage = "https://github.com/derickr/vld";
license = lib.licenses.bsd2;
maintainers = with lib.maintainers; [ gaelreyrol ];
broken = lib.versionOlder php.version "8.2";
};
}

View File

@@ -0,0 +1,29 @@
{
lib,
buildPecl,
fetchFromGitHub,
pkg-config,
libthai,
}:
buildPecl rec {
pname = "wikidiff2";
version = "1.14.1";
src = fetchFromGitHub {
owner = "wikimedia";
repo = "mediawiki-php-wikidiff2";
tag = version;
hash = "sha256-UTOfLXv2QWdjThxfrPQDLB8Mqo4js6LzOKXePivdp9k=";
};
nativeBuildInputs = [ pkg-config ];
buildInputs = [ libthai ];
meta = {
description = "PHP extension which formats changes between two input texts, producing HTML or JSON";
license = lib.licenses.gpl2;
homepage = "https://www.mediawiki.org/wiki/Wikidiff2";
maintainers = with lib.maintainers; [ georgyo ];
};
}

View File

@@ -0,0 +1,33 @@
{
buildPecl,
lib,
fetchFromGitHub,
}:
let
version = "3.4.5";
in
buildPecl {
inherit version;
pname = "xdebug";
src = fetchFromGitHub {
owner = "xdebug";
repo = "xdebug";
rev = version;
hash = "sha256-tJNN1GNEH3z/bsmzNMPoF6TAgOQ4EiM4QheqmhCQzM4=";
};
doCheck = true;
zendExtension = true;
meta = {
changelog = "https://github.com/xdebug/xdebug/releases/tag/${version}";
description = "Provides functions for function traces and profiling";
homepage = "https://xdebug.org/";
license = lib.licenses.php301;
teams = [ lib.teams.php ];
};
}

View File

@@ -0,0 +1,25 @@
{
buildPecl,
lib,
libyaml,
}:
buildPecl {
pname = "yaml";
version = "2.2.5";
sha256 = "sha256-DHUbSJdJ+/AgcdWwxr/rJsS4Y8Zo74lxHs+VBzkb33E=";
configureFlags = [ "--with-yaml=${libyaml.dev}" ];
buildInputs = [
libyaml
];
meta = {
description = "YAML-1.1 parser and emitter";
license = lib.licenses.mit;
homepage = "https://github.com/php/pecl-file_formats-yaml";
teams = [ lib.teams.php ];
};
}

View File

@@ -0,0 +1,35 @@
{
buildPecl,
lib,
zstd,
pkg-config,
fetchFromGitHub,
}:
let
version = "0.15.2";
in
buildPecl {
inherit version;
pname = "zstd";
src = fetchFromGitHub {
owner = "kjdev";
repo = "php-ext-zstd";
rev = version;
hash = "sha256-NGbrbvW2kNhgj3nqqjGLqowcp9EKqYffR1DOBIzdXeA=";
};
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 = [ ];
};
}