From c759efa5e7f825913f9a69ef20f025f50f56dc4d Mon Sep 17 00:00:00 2001 From: Pol Dellaiera Date: Sat, 4 May 2024 23:04:36 +0200 Subject: [PATCH] workflows/check-nix-format: enforce for php-packages --- .github/workflows/check-nix-format.yml | 1 + .../development/php-packages/amqp/default.nix | 10 +- .../development/php-packages/apcu/default.nix | 22 ++- pkgs/development/php-packages/ast/default.nix | 9 +- pkgs/development/php-packages/box/default.nix | 6 +- .../php-packages/castor/default.nix | 15 +- .../php-packages/composer/default.nix | 34 ++-- .../php-packages/couchbase/default.nix | 16 +- .../php-packages/datadog_trace/default.nix | 69 ++++---- .../php-packages/deployer/default.nix | 7 +- pkgs/development/php-packages/ds/default.nix | 11 +- .../php-packages/event/default.nix | 14 +- .../php-packages/gnupg/default.nix | 13 +- .../development/php-packages/grpc/default.nix | 9 +- .../php-packages/grumphp/default.nix | 7 +- .../php-packages/igbinary/default.nix | 5 +- .../php-packages/imagick/default.nix | 8 +- .../php-packages/inotify/default.nix | 4 +- .../php-packages/ioncube-loader/default.nix | 20 ++- .../php-packages/mailparse/default.nix | 6 +- .../php-packages/maxminddb/default.nix | 7 +- .../php-packages/memcache/default.nix | 17 +- .../php-packages/memcached/default.nix | 20 ++- .../php-packages/meminfo/default.nix | 6 +- .../php-packages/memprof/default.nix | 16 +- .../php-packages/mongodb/default.nix | 53 +++--- .../development/php-packages/oci8/default.nix | 33 ++-- .../php-packages/openswoole/default.nix | 12 +- .../php-packages/opentelemetry/default.nix | 9 +- .../development/php-packages/pcov/default.nix | 11 +- .../php-packages/pdlib/default.nix | 8 +- .../php-packages/pdo_sqlsrv/default.nix | 9 +- .../php-packages/phalcon/default.nix | 14 +- .../development/php-packages/phan/default.nix | 52 +++--- .../php-packages/phing/default.nix | 50 +++--- .../php-packages/phive/default.nix | 7 +- .../php-packages/php-codesniffer/default.nix | 7 +- .../php-packages/php-cs-fixer/default.nix | 7 +- .../php-parallel-lint/default.nix | 7 +- .../php-packages/phpinsights/default.nix | 7 +- .../php-packages/phpmd/default.nix | 7 +- .../php-packages/phpspy/default.nix | 13 +- .../php-packages/phpstan/default.nix | 6 +- .../php-packages/pinba/default.nix | 8 +- .../php-packages/protobuf/default.nix | 6 +- .../php-packages/psalm/default.nix | 7 +- .../php-packages/psysh/default.nix | 6 +- .../php-packages/rdkafka/default.nix | 12 +- .../php-packages/redis/default.nix | 14 +- .../php-packages/relay/default.nix | 157 +++++++++++------- pkgs/development/php-packages/rrd/default.nix | 12 +- .../php-packages/smbclient/default.nix | 7 +- .../php-packages/snuffleupagus/default.nix | 39 ++--- pkgs/development/php-packages/spx/default.nix | 14 +- .../php-packages/sqlsrv/default.nix | 12 +- .../development/php-packages/ssh2/default.nix | 6 +- .../php-packages/swoole/default.nix | 20 ++- pkgs/development/php-packages/uv/default.nix | 7 +- pkgs/development/php-packages/vld/default.nix | 12 +- .../php-packages/xdebug/default.nix | 9 +- .../development/php-packages/yaml/default.nix | 12 +- .../development/php-packages/zstd/default.nix | 19 ++- 62 files changed, 675 insertions(+), 368 deletions(-) diff --git a/.github/workflows/check-nix-format.yml b/.github/workflows/check-nix-format.yml index 7bbe36373c68..dfc39c148577 100644 --- a/.github/workflows/check-nix-format.yml +++ b/.github/workflows/check-nix-format.yml @@ -39,6 +39,7 @@ jobs: pkgs/test/cuda pkgs/top-level/cuda-packages.nix NIX_FMT_PATHS_VSCODE_EXTS: pkgs/applications/editors/vscode/extensions + NIX_FMT_PATHS_PHP_PACKAGES: pkgs/development/php-packages # Iterate over all environment variables beginning with NIX_FMT_PATHS_. run: | for env_var in "${!NIX_FMT_PATHS_@}"; do diff --git a/pkgs/development/php-packages/amqp/default.nix b/pkgs/development/php-packages/amqp/default.nix index 4d19fd758997..8891aba7cd9d 100644 --- a/pkgs/development/php-packages/amqp/default.nix +++ b/pkgs/development/php-packages/amqp/default.nix @@ -1,8 +1,14 @@ -{ buildPecl, lib, rabbitmq-c, fetchFromGitHub }: +{ + buildPecl, + lib, + rabbitmq-c, + fetchFromGitHub, +}: let version = "2.1.2"; -in buildPecl { +in +buildPecl { inherit version; pname = "amqp"; diff --git a/pkgs/development/php-packages/apcu/default.nix b/pkgs/development/php-packages/apcu/default.nix index 9aec7d660763..f8b8ff1d83b7 100644 --- a/pkgs/development/php-packages/apcu/default.nix +++ b/pkgs/development/php-packages/apcu/default.nix @@ -1,8 +1,16 @@ -{ buildPecl, lib, pcre2, fetchFromGitHub, php, fetchpatch }: +{ + buildPecl, + lib, + pcre2, + fetchFromGitHub, + php, + fetchpatch, +}: let version = "5.1.23"; -in buildPecl { +in +buildPecl { inherit version; pname = "apcu"; @@ -16,9 +24,15 @@ in buildPecl { buildInputs = [ pcre2 ]; doCheck = true; checkTarget = "test"; - checkFlagsArray = [ "REPORT_EXIT_STATUS=1" "NO_INTERACTION=1" ]; + checkFlagsArray = [ + "REPORT_EXIT_STATUS=1" + "NO_INTERACTION=1" + ]; makeFlags = [ "phpincludedir=$(dev)/include" ]; - outputs = [ "out" "dev" ]; + outputs = [ + "out" + "dev" + ]; meta = with lib; { changelog = "https://github.com/krakjoe/apcu/releases/tag/v${version}"; diff --git a/pkgs/development/php-packages/ast/default.nix b/pkgs/development/php-packages/ast/default.nix index d04ba25b7f11..662588be521c 100644 --- a/pkgs/development/php-packages/ast/default.nix +++ b/pkgs/development/php-packages/ast/default.nix @@ -1,8 +1,13 @@ -{ buildPecl, lib, fetchFromGitHub }: +{ + buildPecl, + lib, + fetchFromGitHub, +}: let version = "1.1.1"; -in buildPecl { +in +buildPecl { inherit version; pname = "ast"; diff --git a/pkgs/development/php-packages/box/default.nix b/pkgs/development/php-packages/box/default.nix index f9b77995e56e..0f13c2a09ab8 100644 --- a/pkgs/development/php-packages/box/default.nix +++ b/pkgs/development/php-packages/box/default.nix @@ -1,4 +1,8 @@ -{ lib, php82, fetchFromGitHub }: +{ + lib, + php82, + fetchFromGitHub, +}: php82.buildComposerProject (finalAttrs: { pname = "box"; diff --git a/pkgs/development/php-packages/castor/default.nix b/pkgs/development/php-packages/castor/default.nix index 1b6b3f6be9d4..c191d7978cd7 100644 --- a/pkgs/development/php-packages/castor/default.nix +++ b/pkgs/development/php-packages/castor/default.nix @@ -1,10 +1,11 @@ -{ lib -, fetchFromGitHub -, fetchpatch -, installShellFiles -, php -, nix-update-script -, testers +{ + lib, + fetchFromGitHub, + fetchpatch, + installShellFiles, + php, + nix-update-script, + testers, }: php.buildComposerProject (finalAttrs: { diff --git a/pkgs/development/php-packages/composer/default.nix b/pkgs/development/php-packages/composer/default.nix index 28606fdfa2e2..1c7a1ea5ed9c 100644 --- a/pkgs/development/php-packages/composer/default.nix +++ b/pkgs/development/php-packages/composer/default.nix @@ -1,14 +1,15 @@ -{ lib -, callPackage -, fetchFromGitHub -, php -, unzip -, _7zz -, xz -, git -, curl -, cacert -, makeBinaryWrapper +{ + lib, + callPackage, + fetchFromGitHub, + php, + unzip, + _7zz, + xz, + git, + curl, + cacert, + makeBinaryWrapper, }: php.buildComposerProject (finalAttrs: { @@ -37,7 +38,16 @@ php.buildComposerProject (finalAttrs: { postInstall = '' wrapProgram $out/bin/composer \ - --prefix PATH : ${lib.makeBinPath [ _7zz cacert curl git unzip xz ]} + --prefix PATH : ${ + lib.makeBinPath [ + _7zz + cacert + curl + git + unzip + xz + ] + } ''; vendorHash = "sha256-dNNV9fTyGyRoGeDV/vBjn0aMgkaUMsrKQv5AOoiYokQ="; diff --git a/pkgs/development/php-packages/couchbase/default.nix b/pkgs/development/php-packages/couchbase/default.nix index 2ff867348db5..e638d4c470ab 100644 --- a/pkgs/development/php-packages/couchbase/default.nix +++ b/pkgs/development/php-packages/couchbase/default.nix @@ -1,4 +1,13 @@ -{ lib, buildPecl, fetchFromGitHub, writeText, libcouchbase, zlib, php, substituteAll }: +{ + lib, + buildPecl, + fetchFromGitHub, + writeText, + libcouchbase, + zlib, + php, + substituteAll, +}: let pname = "couchbase"; version = "3.2.2"; @@ -15,7 +24,10 @@ buildPecl { configureFlags = [ "--with-couchbase" ]; - buildInputs = [ libcouchbase zlib ]; + buildInputs = [ + libcouchbase + zlib + ]; patches = [ (substituteAll { diff --git a/pkgs/development/php-packages/datadog_trace/default.nix b/pkgs/development/php-packages/datadog_trace/default.nix index 2b8b7ea4fb7f..15b16582435d 100644 --- a/pkgs/development/php-packages/datadog_trace/default.nix +++ b/pkgs/development/php-packages/datadog_trace/default.nix @@ -1,14 +1,15 @@ -{ lib -, stdenv -, buildPecl -, cargo -, rustc -, fetchFromGitHub -, rustPlatform -, curl -, pcre2 -, libiconv -, darwin +{ + lib, + stdenv, + buildPecl, + cargo, + rustc, + fetchFromGitHub, + rustPlatform, + curl, + pcre2, + libiconv, + darwin, }: buildPecl rec { @@ -32,31 +33,39 @@ buildPecl rec { env.NIX_CFLAGS_COMPILE = "-O2"; - nativeBuildInputs = [ - cargo - rustc - ] ++ lib.optionals stdenv.isLinux [ - rustPlatform.bindgenHook - rustPlatform.cargoSetupHook - ] ++ lib.optionals stdenv.isDarwin [ - darwin.apple_sdk_11_0.rustPlatform.bindgenHook - darwin.apple_sdk_11_0.rustPlatform.cargoSetupHook - ]; + nativeBuildInputs = + [ + cargo + rustc + ] + ++ lib.optionals stdenv.isLinux [ + rustPlatform.bindgenHook + rustPlatform.cargoSetupHook + ] + ++ lib.optionals stdenv.isDarwin [ + darwin.apple_sdk_11_0.rustPlatform.bindgenHook + darwin.apple_sdk_11_0.rustPlatform.cargoSetupHook + ]; - buildInputs = [ - curl - pcre2 - ] ++ lib.optionals stdenv.isDarwin [ - darwin.apple_sdk.frameworks.CoreFoundation - darwin.apple_sdk.frameworks.Security - libiconv - ]; + buildInputs = + [ + curl + pcre2 + ] + ++ lib.optionals stdenv.isDarwin [ + darwin.apple_sdk.frameworks.CoreFoundation + darwin.apple_sdk.frameworks.Security + 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 ]; + license = with lib.licenses; [ + asl20 + bsd3 + ]; maintainers = lib.teams.php.members; }; } diff --git a/pkgs/development/php-packages/deployer/default.nix b/pkgs/development/php-packages/deployer/default.nix index 44a2e97f7ab7..d50bc73060f6 100644 --- a/pkgs/development/php-packages/deployer/default.nix +++ b/pkgs/development/php-packages/deployer/default.nix @@ -1,6 +1,7 @@ -{ lib -, fetchFromGitHub -, php +{ + lib, + fetchFromGitHub, + php, }: php.buildComposerProject (finalAttrs: { diff --git a/pkgs/development/php-packages/ds/default.nix b/pkgs/development/php-packages/ds/default.nix index 7e37c8a2d3e0..6d44b0aaabcb 100644 --- a/pkgs/development/php-packages/ds/default.nix +++ b/pkgs/development/php-packages/ds/default.nix @@ -1,8 +1,15 @@ -{ buildPecl, lib, pcre2, php, fetchFromGitHub }: +{ + buildPecl, + lib, + pcre2, + php, + fetchFromGitHub, +}: let version = "1.5.0"; -in buildPecl { +in +buildPecl { inherit version; pname = "ds"; diff --git a/pkgs/development/php-packages/event/default.nix b/pkgs/development/php-packages/event/default.nix index a497d934627a..46107a446c4a 100644 --- a/pkgs/development/php-packages/event/default.nix +++ b/pkgs/development/php-packages/event/default.nix @@ -1,4 +1,11 @@ -{ buildPecl, lib, php, pkg-config, openssl, libevent }: +{ + buildPecl, + lib, + php, + pkg-config, + openssl, + libevent, +}: buildPecl { pname = "event"; @@ -19,7 +26,10 @@ buildPecl { ''; nativeBuildInputs = [ pkg-config ]; - buildInputs = [ openssl libevent ]; + buildInputs = [ + openssl + libevent + ]; internalDeps = [ php.extensions.sockets ]; meta = with lib; { diff --git a/pkgs/development/php-packages/gnupg/default.nix b/pkgs/development/php-packages/gnupg/default.nix index 1341ca2d1696..7e646e151cf2 100644 --- a/pkgs/development/php-packages/gnupg/default.nix +++ b/pkgs/development/php-packages/gnupg/default.nix @@ -1,8 +1,17 @@ -{ buildPecl, lib, gpgme, file, gnupg, php, fetchFromGitHub }: +{ + buildPecl, + lib, + gpgme, + file, + gnupg, + php, + fetchFromGitHub, +}: let version = "1.5.1"; -in buildPecl { +in +buildPecl { inherit version; pname = "gnupg"; diff --git a/pkgs/development/php-packages/grpc/default.nix b/pkgs/development/php-packages/grpc/default.nix index e70432f37ee8..5dcd2a4a33ef 100644 --- a/pkgs/development/php-packages/grpc/default.nix +++ b/pkgs/development/php-packages/grpc/default.nix @@ -1,7 +1,8 @@ -{ buildPecl -, pkg-config -, lib -, grpc +{ + buildPecl, + pkg-config, + lib, + grpc, }: buildPecl { diff --git a/pkgs/development/php-packages/grumphp/default.nix b/pkgs/development/php-packages/grumphp/default.nix index 4d1b2438950c..5a585bdca7d7 100644 --- a/pkgs/development/php-packages/grumphp/default.nix +++ b/pkgs/development/php-packages/grumphp/default.nix @@ -1,6 +1,7 @@ -{ fetchFromGitHub -, lib -, php +{ + fetchFromGitHub, + lib, + php, }: php.buildComposerProject (finalAttrs: { diff --git a/pkgs/development/php-packages/igbinary/default.nix b/pkgs/development/php-packages/igbinary/default.nix index b2f8c270c4e2..6b8d426c379f 100644 --- a/pkgs/development/php-packages/igbinary/default.nix +++ b/pkgs/development/php-packages/igbinary/default.nix @@ -7,7 +7,10 @@ buildPecl { configureFlags = [ "--enable-igbinary" ]; makeFlags = [ "phpincludedir=$(dev)/include" ]; - outputs = [ "out" "dev" ]; + outputs = [ + "out" + "dev" + ]; meta = { description = "Binary serialization for PHP"; diff --git a/pkgs/development/php-packages/imagick/default.nix b/pkgs/development/php-packages/imagick/default.nix index 5150833945b0..d8570ee24ba8 100644 --- a/pkgs/development/php-packages/imagick/default.nix +++ b/pkgs/development/php-packages/imagick/default.nix @@ -1,4 +1,10 @@ -{ buildPecl, lib, imagemagick, pkg-config, pcre2 }: +{ + buildPecl, + lib, + imagemagick, + pkg-config, + pcre2, +}: buildPecl { pname = "imagick"; diff --git a/pkgs/development/php-packages/inotify/default.nix b/pkgs/development/php-packages/inotify/default.nix index 4296df1d81ba..b68af7ec6e80 100644 --- a/pkgs/development/php-packages/inotify/default.nix +++ b/pkgs/development/php-packages/inotify/default.nix @@ -1,6 +1,4 @@ -{ buildPecl -, lib -}: +{ buildPecl, lib }: buildPecl { pname = "inotify"; diff --git a/pkgs/development/php-packages/ioncube-loader/default.nix b/pkgs/development/php-packages/ioncube-loader/default.nix index 290abdffbedd..4c691a913ddd 100644 --- a/pkgs/development/php-packages/ioncube-loader/default.nix +++ b/pkgs/development/php-packages/ioncube-loader/default.nix @@ -1,7 +1,8 @@ -{ stdenv -, lib -, fetchzip -, php +{ + stdenv, + lib, + fetchzip, + php, }: let @@ -42,7 +43,9 @@ stdenv.mkDerivation { installPhase = '' mkdir -p $out/lib/php/extensions - cp $src/ioncube_loader_${variant.${stdenv.hostPlatform.system}.prefix}_${phpVersion}.so $out/lib/php/extensions/ioncube-loader.so + cp $src/ioncube_loader_${ + variant.${stdenv.hostPlatform.system}.prefix + }_${phpVersion}.so $out/lib/php/extensions/ioncube-loader.so ''; meta = with lib; { @@ -52,6 +55,11 @@ stdenv.mkDerivation { sourceProvenance = [ sourceTypes.binaryNativeCode ]; license = licenses.unfree; maintainers = with maintainers; [ neverbehave ]; - platforms = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ]; + platforms = [ + "x86_64-linux" + "aarch64-linux" + "x86_64-darwin" + "aarch64-darwin" + ]; }; } diff --git a/pkgs/development/php-packages/mailparse/default.nix b/pkgs/development/php-packages/mailparse/default.nix index c6d0975d7bcf..e0dba768aa80 100644 --- a/pkgs/development/php-packages/mailparse/default.nix +++ b/pkgs/development/php-packages/mailparse/default.nix @@ -1,4 +1,8 @@ -{ buildPecl, lib, php }: +{ + buildPecl, + lib, + php, +}: buildPecl { pname = "mailparse"; diff --git a/pkgs/development/php-packages/maxminddb/default.nix b/pkgs/development/php-packages/maxminddb/default.nix index 80f54c567683..33c9fba690d6 100644 --- a/pkgs/development/php-packages/maxminddb/default.nix +++ b/pkgs/development/php-packages/maxminddb/default.nix @@ -1,4 +1,9 @@ -{ buildPecl, lib, fetchFromGitHub, libmaxminddb }: +{ + buildPecl, + lib, + fetchFromGitHub, + libmaxminddb, +}: let pname = "maxminddb"; version = "1.11.1"; diff --git a/pkgs/development/php-packages/memcache/default.nix b/pkgs/development/php-packages/memcache/default.nix index 6cb205c61ff6..30180ed16723 100644 --- a/pkgs/development/php-packages/memcache/default.nix +++ b/pkgs/development/php-packages/memcache/default.nix @@ -1,4 +1,11 @@ -{ buildPecl, lib, fetchFromGitHub, php, zlib, pkg-config }: +{ + buildPecl, + lib, + fetchFromGitHub, + php, + zlib, + pkg-config, +}: buildPecl rec { pname = "memcache"; @@ -11,13 +18,9 @@ buildPecl rec { hash = "sha256-77GvQ59XUpIZmdYZP6IhtjdkYwXKuNBSG+LBScz2BtI="; }; - internalDeps = [ - php.extensions.session - ]; + internalDeps = [ php.extensions.session ]; - configureFlags = [ - "--with-zlib-dir=${zlib.dev}" - ]; + configureFlags = [ "--with-zlib-dir=${zlib.dev}" ]; nativeBuildInputs = [ pkg-config ]; buildInputs = [ zlib ]; diff --git a/pkgs/development/php-packages/memcached/default.nix b/pkgs/development/php-packages/memcached/default.nix index 9724904d52b3..bbf4f9856f3d 100644 --- a/pkgs/development/php-packages/memcached/default.nix +++ b/pkgs/development/php-packages/memcached/default.nix @@ -1,4 +1,13 @@ -{ buildPecl, lib, fetchFromGitHub, php, cyrus_sasl, zlib, pkg-config, libmemcached }: +{ + buildPecl, + lib, + fetchFromGitHub, + php, + cyrus_sasl, + zlib, + pkg-config, + libmemcached, +}: buildPecl rec { pname = "memcached"; @@ -11,9 +20,7 @@ buildPecl rec { sha256 = "sha256-g9IzGSZUxLlOE32o9ZJOa3erb5Qs1ntR8nzS3kRd/EU="; }; - internalDeps = [ - php.extensions.session - ]; + internalDeps = [ php.extensions.session ]; configureFlags = [ "--with-zlib-dir=${zlib.dev}" @@ -21,7 +28,10 @@ buildPecl rec { ]; nativeBuildInputs = [ pkg-config ]; - buildInputs = [ cyrus_sasl zlib ]; + buildInputs = [ + cyrus_sasl + zlib + ]; meta = with lib; { description = "PHP extension for interfacing with memcached via libmemcached library"; diff --git a/pkgs/development/php-packages/meminfo/default.nix b/pkgs/development/php-packages/meminfo/default.nix index d170243be20c..d7cca10ba328 100644 --- a/pkgs/development/php-packages/meminfo/default.nix +++ b/pkgs/development/php-packages/meminfo/default.nix @@ -1,4 +1,8 @@ -{ buildPecl, lib, fetchFromGitHub }: +{ + buildPecl, + lib, + fetchFromGitHub, +}: buildPecl rec { version = "unstable-2022-03-25"; diff --git a/pkgs/development/php-packages/memprof/default.nix b/pkgs/development/php-packages/memprof/default.nix index 04ef8e6be590..f5839e9663e9 100644 --- a/pkgs/development/php-packages/memprof/default.nix +++ b/pkgs/development/php-packages/memprof/default.nix @@ -1,12 +1,14 @@ -{ buildPecl -, lib -, fetchFromGitHub -, judy +{ + buildPecl, + lib, + fetchFromGitHub, + judy, }: let version = "3.0.2"; -in buildPecl { +in +buildPecl { inherit version; pname = "memprof"; @@ -17,9 +19,7 @@ in buildPecl { hash = "sha256-K8YcvCobErBkaWFTkVGLXXguQPOLIgQuRGWJF+HAIRA="; }; - configureFlags = [ - "--with-judy-dir=${judy}" - ]; + configureFlags = [ "--with-judy-dir=${judy}" ]; doCheck = true; diff --git a/pkgs/development/php-packages/mongodb/default.nix b/pkgs/development/php-packages/mongodb/default.nix index 02771c90167e..f74153ca28f7 100644 --- a/pkgs/development/php-packages/mongodb/default.nix +++ b/pkgs/development/php-packages/mongodb/default.nix @@ -1,16 +1,17 @@ -{ stdenv -, buildPecl -, fetchFromGitHub -, lib -, libiconv -, pcre2 -, pkg-config -, cyrus_sasl -, icu64 -, openssl -, snappy -, zlib -, darwin +{ + stdenv, + buildPecl, + fetchFromGitHub, + lib, + libiconv, + pcre2, + pkg-config, + cyrus_sasl, + icu64, + openssl, + snappy, + zlib, + darwin, }: buildPecl rec { @@ -26,18 +27,20 @@ buildPecl rec { }; nativeBuildInputs = [ pkg-config ]; - buildInputs = [ - cyrus_sasl - icu64 - openssl - snappy - zlib - pcre2 - ] ++ lib.optionals stdenv.isDarwin [ - darwin.apple_sdk_11_0.frameworks.Security - darwin.apple_sdk_11_0.Libsystem - libiconv - ]; + buildInputs = + [ + cyrus_sasl + icu64 + openssl + snappy + zlib + pcre2 + ] + ++ lib.optionals stdenv.isDarwin [ + darwin.apple_sdk_11_0.frameworks.Security + darwin.apple_sdk_11_0.Libsystem + libiconv + ]; meta = { description = "The Official MongoDB PHP driver"; diff --git a/pkgs/development/php-packages/oci8/default.nix b/pkgs/development/php-packages/oci8/default.nix index 495d511f3aae..bd0fe21e2401 100644 --- a/pkgs/development/php-packages/oci8/default.nix +++ b/pkgs/development/php-packages/oci8/default.nix @@ -1,16 +1,27 @@ -{ buildPecl, lib, oracle-instantclient, php }: +{ + 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.3.0"; - sha256 = "sha256-0y5VnRKspJYE6xWeBcX2OG2pJTNbB+27GMywDv4gzwQ="; - }; + 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.3.0"; + sha256 = "sha256-0y5VnRKspJYE6xWeBcX2OG2pJTNbB+27GMywDv4gzwQ="; + }; in buildPecl { pname = "oci8"; diff --git a/pkgs/development/php-packages/openswoole/default.nix b/pkgs/development/php-packages/openswoole/default.nix index dd0dd17b244d..83c59fb3212c 100644 --- a/pkgs/development/php-packages/openswoole/default.nix +++ b/pkgs/development/php-packages/openswoole/default.nix @@ -1,8 +1,16 @@ -{ lib, stdenv, buildPecl, valgrind, pcre2, fetchFromGitHub }: +{ + lib, + stdenv, + buildPecl, + valgrind, + pcre2, + fetchFromGitHub, +}: let version = "22.1.2"; -in buildPecl { +in +buildPecl { inherit version; pname = "openswoole"; diff --git a/pkgs/development/php-packages/opentelemetry/default.nix b/pkgs/development/php-packages/opentelemetry/default.nix index 6770ecb432a6..98410f6b3fb3 100644 --- a/pkgs/development/php-packages/opentelemetry/default.nix +++ b/pkgs/development/php-packages/opentelemetry/default.nix @@ -1,8 +1,13 @@ -{ lib, buildPecl, fetchFromGitHub }: +{ + lib, + buildPecl, + fetchFromGitHub, +}: let version = "1.0.2"; -in buildPecl rec { +in +buildPecl rec { inherit version; pname = "opentelemetry"; diff --git a/pkgs/development/php-packages/pcov/default.nix b/pkgs/development/php-packages/pcov/default.nix index a25479893dbf..ccce782c168a 100644 --- a/pkgs/development/php-packages/pcov/default.nix +++ b/pkgs/development/php-packages/pcov/default.nix @@ -1,8 +1,15 @@ -{ buildPecl, lib, php, pcre2, fetchFromGitHub }: +{ + buildPecl, + lib, + php, + pcre2, + fetchFromGitHub, +}: let version = "1.0.11"; -in buildPecl { +in +buildPecl { inherit version; pname = "pcov"; diff --git a/pkgs/development/php-packages/pdlib/default.nix b/pkgs/development/php-packages/pdlib/default.nix index 19312ef985c0..b6b86b13393b 100644 --- a/pkgs/development/php-packages/pdlib/default.nix +++ b/pkgs/development/php-packages/pdlib/default.nix @@ -1,4 +1,10 @@ -{ buildPecl, fetchFromGitHub, lib, pkg-config, dlib }: +{ + buildPecl, + fetchFromGitHub, + lib, + pkg-config, + dlib, +}: let pname = "pdlib"; version = "1.1.0"; diff --git a/pkgs/development/php-packages/pdo_sqlsrv/default.nix b/pkgs/development/php-packages/pdo_sqlsrv/default.nix index c8411a1e8ee0..7da343ac5564 100644 --- a/pkgs/development/php-packages/pdo_sqlsrv/default.nix +++ b/pkgs/development/php-packages/pdo_sqlsrv/default.nix @@ -1,4 +1,11 @@ -{ stdenv, buildPecl, lib, libiconv, unixODBC, php }: +{ + stdenv, + buildPecl, + lib, + libiconv, + unixODBC, + php, +}: buildPecl { pname = "pdo_sqlsrv"; diff --git a/pkgs/development/php-packages/phalcon/default.nix b/pkgs/development/php-packages/phalcon/default.nix index 07854fdf3b11..a8d19fa96b0a 100644 --- a/pkgs/development/php-packages/phalcon/default.nix +++ b/pkgs/development/php-packages/phalcon/default.nix @@ -1,4 +1,11 @@ -{ buildPecl, lib, pcre2, fetchFromGitHub, php, pkg-config }: +{ + buildPecl, + lib, + pcre2, + fetchFromGitHub, + php, + pkg-config, +}: buildPecl rec { pname = "phalcon"; @@ -11,7 +18,10 @@ buildPecl rec { hash = "sha256-AgyV9pxyXcXuhrRgozN2p67u8xZMepbWrzYaBZMFn6k="; }; - internalDeps = [ php.extensions.session php.extensions.pdo ]; + internalDeps = [ + php.extensions.session + php.extensions.pdo + ]; nativeBuildInputs = [ pkg-config ]; buildInputs = [ pcre2 ]; diff --git a/pkgs/development/php-packages/phan/default.nix b/pkgs/development/php-packages/phan/default.nix index e390389eef22..af95847c37bf 100644 --- a/pkgs/development/php-packages/phan/default.nix +++ b/pkgs/development/php-packages/phan/default.nix @@ -1,30 +1,32 @@ -{ lib -, fetchFromGitHub -, php +{ + lib, + fetchFromGitHub, + php, }: -(php.withExtensions({ enabled, all }: enabled ++ (with all; [ ast ]))).buildComposerProject (finalAttrs: { - pname = "phan"; - version = "5.4.3"; +(php.withExtensions ({ enabled, all }: enabled ++ (with all; [ ast ]))).buildComposerProject + (finalAttrs: { + pname = "phan"; + version = "5.4.3"; - src = fetchFromGitHub { - owner = "phan"; - repo = "phan"; - rev = finalAttrs.version; - hash = "sha256-O0dtnDsz6X99B99VbRQf3Wr/xJfsJqd+2l5Z5iWxHyU="; - }; + src = fetchFromGitHub { + owner = "phan"; + repo = "phan"; + rev = finalAttrs.version; + hash = "sha256-O0dtnDsz6X99B99VbRQf3Wr/xJfsJqd+2l5Z5iWxHyU="; + }; - vendorHash = "sha256-yE85MBseJa0VGV5EbjT0te4QT3697YvtumGkMMfZtxI="; + vendorHash = "sha256-yE85MBseJa0VGV5EbjT0te4QT3697YvtumGkMMfZtxI="; - 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 ] ++ lib.teams.php.members; - }; -}) + 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 ] ++ lib.teams.php.members; + }; + }) diff --git a/pkgs/development/php-packages/phing/default.nix b/pkgs/development/php-packages/phing/default.nix index 9c0a155ff726..dfda99220f9b 100644 --- a/pkgs/development/php-packages/phing/default.nix +++ b/pkgs/development/php-packages/phing/default.nix @@ -1,29 +1,31 @@ -{ lib -, fetchFromGitHub -, php +{ + lib, + fetchFromGitHub, + php, }: -(php.withExtensions({ enabled, all }: enabled ++ (with all; [ xsl ]))).buildComposerProject (finalAttrs: { - pname = "phing"; - version = "3.0.0-rc6"; +(php.withExtensions ({ enabled, all }: enabled ++ (with all; [ xsl ]))).buildComposerProject + (finalAttrs: { + pname = "phing"; + version = "3.0.0-rc6"; - src = fetchFromGitHub { - owner = "phingofficial"; - repo = "phing"; - rev = finalAttrs.version; - hash = "sha256-pOt6uQaz69WuHKYZhq6FFbjyHGrEc+Bf0Sw9uCS3Nrc="; - }; + src = fetchFromGitHub { + owner = "phingofficial"; + repo = "phing"; + rev = finalAttrs.version; + hash = "sha256-pOt6uQaz69WuHKYZhq6FFbjyHGrEc+Bf0Sw9uCS3Nrc="; + }; - # TODO: Open a PR against https://github.com/phingofficial/phing - # Their `composer.lock` is out of date therefore, we need to provide one - composerLock = ./composer.lock; - vendorHash = "sha256-ueTbbz3FGyRcRvlcJNirHdC77Tko4RKtYMFB3+4JdnQ="; + # TODO: Open a PR against https://github.com/phingofficial/phing + # Their `composer.lock` is out of date therefore, we need to provide one + composerLock = ./composer.lock; + vendorHash = "sha256-ueTbbz3FGyRcRvlcJNirHdC77Tko4RKtYMFB3+4JdnQ="; - meta = { - description = "PHing Is Not GNU make; it's a PHP project build system or build tool based on Apache Ant"; - homepage = "https://github.com/phingofficial/phing"; - license = lib.licenses.lgpl3; - mainProgram = "phing"; - maintainers = lib.teams.php.members; - }; -}) + meta = { + description = "PHing Is Not GNU make; it's a PHP project build system or build tool based on Apache Ant"; + homepage = "https://github.com/phingofficial/phing"; + license = lib.licenses.lgpl3; + mainProgram = "phing"; + maintainers = lib.teams.php.members; + }; + }) diff --git a/pkgs/development/php-packages/phive/default.nix b/pkgs/development/php-packages/phive/default.nix index f8efa3621ede..82b5681cb168 100644 --- a/pkgs/development/php-packages/phive/default.nix +++ b/pkgs/development/php-packages/phive/default.nix @@ -1,6 +1,7 @@ -{ lib -, fetchFromGitHub -, php +{ + lib, + fetchFromGitHub, + php, }: php.buildComposerProject (finalAttrs: { diff --git a/pkgs/development/php-packages/php-codesniffer/default.nix b/pkgs/development/php-packages/php-codesniffer/default.nix index 0075c387d6e3..5ea2977be6f9 100644 --- a/pkgs/development/php-packages/php-codesniffer/default.nix +++ b/pkgs/development/php-packages/php-codesniffer/default.nix @@ -1,6 +1,7 @@ -{ fetchFromGitHub -, lib -, php +{ + fetchFromGitHub, + lib, + php, }: php.buildComposerProject (finalAttrs: { diff --git a/pkgs/development/php-packages/php-cs-fixer/default.nix b/pkgs/development/php-packages/php-cs-fixer/default.nix index 351d2e4d7b90..92f61c96166c 100644 --- a/pkgs/development/php-packages/php-cs-fixer/default.nix +++ b/pkgs/development/php-packages/php-cs-fixer/default.nix @@ -1,6 +1,7 @@ -{ lib -, fetchFromGitHub -, php +{ + lib, + fetchFromGitHub, + php, }: php.buildComposerProject (finalAttrs: { diff --git a/pkgs/development/php-packages/php-parallel-lint/default.nix b/pkgs/development/php-packages/php-parallel-lint/default.nix index fbd6e264e1af..dc14ac21981e 100644 --- a/pkgs/development/php-packages/php-parallel-lint/default.nix +++ b/pkgs/development/php-packages/php-parallel-lint/default.nix @@ -1,6 +1,7 @@ -{ fetchFromGitHub -, lib -, php +{ + fetchFromGitHub, + lib, + php, }: php.buildComposerProject (finalAttrs: { diff --git a/pkgs/development/php-packages/phpinsights/default.nix b/pkgs/development/php-packages/phpinsights/default.nix index dd5b1ebce02b..36b877d2413d 100644 --- a/pkgs/development/php-packages/phpinsights/default.nix +++ b/pkgs/development/php-packages/phpinsights/default.nix @@ -1,6 +1,7 @@ -{ lib -, fetchFromGitHub -, php +{ + lib, + fetchFromGitHub, + php, }: php.buildComposerProject (finalAttrs: { diff --git a/pkgs/development/php-packages/phpmd/default.nix b/pkgs/development/php-packages/phpmd/default.nix index 4c08728ae7bb..ae190e9102a4 100644 --- a/pkgs/development/php-packages/phpmd/default.nix +++ b/pkgs/development/php-packages/phpmd/default.nix @@ -1,6 +1,7 @@ -{ lib -, fetchFromGitHub -, php +{ + lib, + fetchFromGitHub, + php, }: php.buildComposerProject (finalAttrs: { diff --git a/pkgs/development/php-packages/phpspy/default.nix b/pkgs/development/php-packages/phpspy/default.nix index 4ae9f22c1a10..5cc936a63dd8 100644 --- a/pkgs/development/php-packages/phpspy/default.nix +++ b/pkgs/development/php-packages/phpspy/default.nix @@ -1,9 +1,10 @@ -{ lib -, stdenv -, fetchFromGitHub -, php -, testers -, phpPackages +{ + lib, + stdenv, + fetchFromGitHub, + php, + testers, + phpPackages, }: stdenv.mkDerivation (finalAttrs: { diff --git a/pkgs/development/php-packages/phpstan/default.nix b/pkgs/development/php-packages/phpstan/default.nix index c206a881eb15..20fc867fd977 100644 --- a/pkgs/development/php-packages/phpstan/default.nix +++ b/pkgs/development/php-packages/phpstan/default.nix @@ -1,4 +1,8 @@ -{ fetchFromGitHub, lib, php }: +{ + fetchFromGitHub, + lib, + php, +}: php.buildComposerProject (finalAttrs: { pname = "phpstan"; diff --git a/pkgs/development/php-packages/pinba/default.nix b/pkgs/development/php-packages/pinba/default.nix index 7d4e020f406b..759d02b9c352 100644 --- a/pkgs/development/php-packages/pinba/default.nix +++ b/pkgs/development/php-packages/pinba/default.nix @@ -1,4 +1,8 @@ -{ buildPecl, lib, fetchFromGitHub }: +{ + buildPecl, + lib, + fetchFromGitHub, +}: buildPecl rec { pname = "pinba"; @@ -7,7 +11,7 @@ buildPecl rec { src = fetchFromGitHub { owner = "tony2001"; repo = "pinba_extension"; - rev = "RELEASE_${lib.replaceStrings ["."] ["_"] version}"; + rev = "RELEASE_${lib.replaceStrings [ "." ] [ "_" ] version}"; sha256 = "0wqcqq6sb51wiawa37hbd1h9dbvmyyndzdvz87xqji7lpr9vn8jy"; }; diff --git a/pkgs/development/php-packages/protobuf/default.nix b/pkgs/development/php-packages/protobuf/default.nix index 94c15c95946a..4d84d9183214 100644 --- a/pkgs/development/php-packages/protobuf/default.nix +++ b/pkgs/development/php-packages/protobuf/default.nix @@ -1,4 +1,8 @@ -{ buildPecl, lib, pcre2 }: +{ + buildPecl, + lib, + pcre2, +}: buildPecl { pname = "protobuf"; diff --git a/pkgs/development/php-packages/psalm/default.nix b/pkgs/development/php-packages/psalm/default.nix index b20bbbf301c6..842b96a828fa 100644 --- a/pkgs/development/php-packages/psalm/default.nix +++ b/pkgs/development/php-packages/psalm/default.nix @@ -1,6 +1,7 @@ -{ lib -, fetchFromGitHub -, php +{ + lib, + fetchFromGitHub, + php, }: php.buildComposerProject (finalAttrs: { diff --git a/pkgs/development/php-packages/psysh/default.nix b/pkgs/development/php-packages/psysh/default.nix index 1f443f136578..1e75910a496c 100644 --- a/pkgs/development/php-packages/psysh/default.nix +++ b/pkgs/development/php-packages/psysh/default.nix @@ -1,4 +1,8 @@ -{ fetchFromGitHub, lib, php }: +{ + fetchFromGitHub, + lib, + php, +}: php.buildComposerProject (finalAttrs: { pname = "psysh"; diff --git a/pkgs/development/php-packages/rdkafka/default.nix b/pkgs/development/php-packages/rdkafka/default.nix index f07bc87dd39b..71d411b594e9 100644 --- a/pkgs/development/php-packages/rdkafka/default.nix +++ b/pkgs/development/php-packages/rdkafka/default.nix @@ -1,4 +1,9 @@ -{ buildPecl, lib, rdkafka, pcre2 }: +{ + buildPecl, + lib, + rdkafka, + pcre2, +}: buildPecl { pname = "rdkafka"; @@ -6,7 +11,10 @@ buildPecl { version = "6.0.3"; sha256 = "sha256-Euqrl21JaX4x8WOLR4ietexhrbdYcIlBESsVf47H3Ug="; - buildInputs = [ rdkafka pcre2 ]; + buildInputs = [ + rdkafka + pcre2 + ]; postPhpize = '' substituteInPlace configure \ diff --git a/pkgs/development/php-packages/redis/default.nix b/pkgs/development/php-packages/redis/default.nix index 4fc9d9464793..b5219da07da3 100644 --- a/pkgs/development/php-packages/redis/default.nix +++ b/pkgs/development/php-packages/redis/default.nix @@ -1,8 +1,14 @@ -{ buildPecl, lib, php, fetchFromGitHub }: +{ + buildPecl, + lib, + php, + fetchFromGitHub, +}: let version = "6.0.2"; -in buildPecl { +in +buildPecl { inherit version; pname = "redis"; @@ -13,9 +19,7 @@ in buildPecl { hash = "sha256-Ie31zak6Rqxm2+jGXWg6KN4czHe9e+190jZRQ5VoB+M="; }; - internalDeps = with php.extensions; [ - session - ]; + internalDeps = with php.extensions; [ session ]; meta = with lib; { changelog = "https://github.com/phpredis/phpredis/releases/tag/${version}"; diff --git a/pkgs/development/php-packages/relay/default.nix b/pkgs/development/php-packages/relay/default.nix index ee393c91d568..3120607482c7 100644 --- a/pkgs/development/php-packages/relay/default.nix +++ b/pkgs/development/php-packages/relay/default.nix @@ -1,15 +1,16 @@ -{ stdenv -, lib -, fetchurl -, php -, openssl -, hiredis -, zstd -, lz4 -, autoPatchelfHook -, writeShellScript -, curl -, common-updater-scripts +{ + stdenv, + lib, + fetchurl, + php, + openssl, + hiredis, + zstd, + lz4, + autoPatchelfHook, + writeShellScript, + curl, + common-updater-scripts, }: let @@ -53,11 +54,19 @@ let }; }; - 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}"); - }; + 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; @@ -68,50 +77,65 @@ stdenv.mkDerivation (finalAttrs: { system = stdenv.hostPlatform.system; phpMajor = lib.versions.majorMinor php.version; }; - nativeBuildInputs = lib.optionals (!stdenv.isDarwin) [ - autoPatchelfHook - ]; + nativeBuildInputs = lib.optionals (!stdenv.isDarwin) [ autoPatchelfHook ]; buildInputs = lib.optionals (!stdenv.isDarwin) [ openssl zstd lz4 ]; - installPhase = '' - runHook preInstall - - mkdir -p $out/lib/php/extensions - cp relay-pkg.so $out/lib/php/extensions/relay.so - chmod +w $out/lib/php/extensions/relay.so - '' + (if stdenv.isDarwin then - let - args = lib.strings.concatMapStrings - (v: " -change ${v.name}" + " ${lib.strings.makeLibraryPath [ v.value ]}/${builtins.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/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 + installPhase = '' - 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 preInstall - runHook postInstall - ''; + mkdir -p $out/lib/php/extensions + cp relay-pkg.so $out/lib/php/extensions/relay.so + chmod +w $out/lib/php/extensions/relay.so + '' + + ( + if stdenv.isDarwin then + let + args = + lib.strings.concatMapStrings + ( + v: + " -change ${v.name}" + " ${lib.strings.makeLibraryPath [ v.value ]}/${builtins.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/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 ]}" + export PATH="$PATH:${ + lib.makeBinPath [ + curl + common-updater-scripts + ] + }" NEW_VERSION=$(curl --silent https://builds.r2.relay.so/meta/builds | tail -n1 | cut -c2-) if [[ "${version}" = "$NEW_VERSION" ]]; then @@ -129,23 +153,22 @@ stdenv.mkDerivation (finalAttrs: { updateables = builtins.listToAttrs # Collect all leaf attributes (containing hashes). - (lib.collect - (attrs: attrs ? name) - # create an attr containing - (lib.mapAttrsRecursive + ( + lib.collect (attrs: attrs ? name) + # create an attr containing ( - path: _value: - lib.nameValuePair - (builtins.replaceStrings [ "." ] [ "_" ] (lib.concatStringsSep "_" path)) - (finalAttrs.finalPackage.overrideAttrs (attrs: { + 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) ) - (lib.filterAttrsRecursive (name: _value: name != "platform") hashes) - ) ); }; @@ -155,7 +178,15 @@ stdenv.mkDerivation (finalAttrs: { 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" ]; + maintainers = with maintainers; [ + tillkruss + ostrolucky + ]; + platforms = [ + "x86_64-linux" + "aarch64-linux" + "x86_64-darwin" + "aarch64-darwin" + ]; }; }) diff --git a/pkgs/development/php-packages/rrd/default.nix b/pkgs/development/php-packages/rrd/default.nix index a89f9a3b71b1..6df71d4be53e 100644 --- a/pkgs/development/php-packages/rrd/default.nix +++ b/pkgs/development/php-packages/rrd/default.nix @@ -1,4 +1,9 @@ -{ buildPecl, lib, pkg-config, rrdtool }: +{ + buildPecl, + lib, + pkg-config, + rrdtool, +}: buildPecl { pname = "rrd"; @@ -6,7 +11,10 @@ buildPecl { version = "2.0.3"; hash = "sha256-pCFh5YzcioU7cs/ymJidy96CsPdkVt1ZzgKFTJK3MPc="; - nativeBuildInputs = [ pkg-config rrdtool ]; + nativeBuildInputs = [ + pkg-config + rrdtool + ]; meta = { description = "PHP bindings to RRD tool system"; diff --git a/pkgs/development/php-packages/smbclient/default.nix b/pkgs/development/php-packages/smbclient/default.nix index 65cfad9ea3ad..02654068666e 100644 --- a/pkgs/development/php-packages/smbclient/default.nix +++ b/pkgs/development/php-packages/smbclient/default.nix @@ -1,4 +1,9 @@ -{ buildPecl, lib, samba, pkg-config }: +{ + buildPecl, + lib, + samba, + pkg-config, +}: buildPecl { pname = "smbclient"; version = "1.0.6"; diff --git a/pkgs/development/php-packages/snuffleupagus/default.nix b/pkgs/development/php-packages/snuffleupagus/default.nix index c3b5d84ff195..aa5faa665afb 100644 --- a/pkgs/development/php-packages/snuffleupagus/default.nix +++ b/pkgs/development/php-packages/snuffleupagus/default.nix @@ -1,11 +1,12 @@ -{ stdenv -, buildPecl -, lib -, libiconv -, php -, fetchFromGitHub -, pcre2 -, darwin +{ + stdenv, + buildPecl, + lib, + libiconv, + php, + fetchFromGitHub, + pcre2, + darwin, }: buildPecl rec { @@ -19,23 +20,19 @@ buildPecl rec { hash = "sha256-NwG8gBaToBaJGrZoCD7bDym7hQidWU0ArckoQCHN81o="; }; - buildInputs = [ - pcre2 - ] ++ lib.optionals stdenv.isDarwin [ - darwin.apple_sdk_11_0.frameworks.CoreFoundation - darwin.apple_sdk_11_0.Libsystem - libiconv - ]; + buildInputs = + [ pcre2 ] + ++ lib.optionals stdenv.isDarwin [ + darwin.apple_sdk_11_0.frameworks.CoreFoundation + darwin.apple_sdk_11_0.Libsystem + libiconv + ]; - internalDeps = with php.extensions; [ - session - ]; + internalDeps = with php.extensions; [ session ]; sourceRoot = "${src.name}/src"; - configureFlags = [ - "--enable-snuffleupagus" - ]; + configureFlags = [ "--enable-snuffleupagus" ]; postPhpize = '' ./configure --enable-snuffleupagus diff --git a/pkgs/development/php-packages/spx/default.nix b/pkgs/development/php-packages/spx/default.nix index b6f7598ffe5a..10bf66272615 100644 --- a/pkgs/development/php-packages/spx/default.nix +++ b/pkgs/development/php-packages/spx/default.nix @@ -1,8 +1,14 @@ -{ buildPecl, lib, fetchFromGitHub, zlib }: +{ + buildPecl, + lib, + fetchFromGitHub, + zlib, +}: let version = "0.4.15"; -in buildPecl { +in +buildPecl { inherit version; pname = "spx"; @@ -13,9 +19,7 @@ in buildPecl { hash = "sha256-gw6wbPt1Qy0vNfT0flq7bxpnGU3SgJvPVhk8H0Imvx4="; }; - configureFlags = [ - "--with-zlib-dir=${zlib.dev}" - ]; + configureFlags = [ "--with-zlib-dir=${zlib.dev}" ]; preConfigure = '' substituteInPlace Makefile.frag \ diff --git a/pkgs/development/php-packages/sqlsrv/default.nix b/pkgs/development/php-packages/sqlsrv/default.nix index 6bbf7cc4f6d1..303f2327d1e5 100644 --- a/pkgs/development/php-packages/sqlsrv/default.nix +++ b/pkgs/development/php-packages/sqlsrv/default.nix @@ -1,4 +1,10 @@ -{ stdenv, buildPecl, lib, unixODBC, libiconv }: +{ + stdenv, + buildPecl, + lib, + unixODBC, + libiconv, +}: buildPecl { pname = "sqlsrv"; @@ -6,9 +12,7 @@ buildPecl { version = "5.10.1"; sha256 = "sha256-XNrttNiihjQ+azuZmS2fy0So+2ndAqpde8IOsupeWdI="; - buildInputs = [ - unixODBC - ] ++ lib.optionals stdenv.isDarwin [ libiconv ]; + buildInputs = [ unixODBC ] ++ lib.optionals stdenv.isDarwin [ libiconv ]; meta = with lib; { description = "Microsoft Drivers for PHP for SQL Server"; diff --git a/pkgs/development/php-packages/ssh2/default.nix b/pkgs/development/php-packages/ssh2/default.nix index 058702d65c0b..d3ff860de3ad 100644 --- a/pkgs/development/php-packages/ssh2/default.nix +++ b/pkgs/development/php-packages/ssh2/default.nix @@ -1,4 +1,8 @@ -{ buildPecl, lib, libssh2 }: +{ + buildPecl, + lib, + libssh2, +}: buildPecl rec { version = "1.3.1"; diff --git a/pkgs/development/php-packages/swoole/default.nix b/pkgs/development/php-packages/swoole/default.nix index f9dcb781c0e9..f519522a8357 100644 --- a/pkgs/development/php-packages/swoole/default.nix +++ b/pkgs/development/php-packages/swoole/default.nix @@ -1,15 +1,17 @@ -{ lib -, stdenv -, buildPecl -, php -, valgrind -, pcre2 -, fetchFromGitHub - }: +{ + lib, + stdenv, + buildPecl, + php, + valgrind, + pcre2, + fetchFromGitHub, +}: let version = "5.1.2"; -in buildPecl { +in +buildPecl { inherit version; pname = "swoole"; diff --git a/pkgs/development/php-packages/uv/default.nix b/pkgs/development/php-packages/uv/default.nix index d681113ec6bc..1bbc6450d0b2 100644 --- a/pkgs/development/php-packages/uv/default.nix +++ b/pkgs/development/php-packages/uv/default.nix @@ -1,4 +1,9 @@ -{ buildPecl, lib, fetchFromGitHub, libuv }: +{ + buildPecl, + lib, + fetchFromGitHub, + libuv, +}: buildPecl rec { pname = "uv"; diff --git a/pkgs/development/php-packages/vld/default.nix b/pkgs/development/php-packages/vld/default.nix index 8e5f7dec4039..6ae6a60005f2 100644 --- a/pkgs/development/php-packages/vld/default.nix +++ b/pkgs/development/php-packages/vld/default.nix @@ -1,11 +1,13 @@ -{ lib -, buildPecl -, fetchFromGitHub +{ + lib, + buildPecl, + fetchFromGitHub, }: let version = "0.18.0"; -in buildPecl { +in +buildPecl { inherit version; pname = "vld"; @@ -20,7 +22,7 @@ in buildPecl { # Tests relies on PHP 7.0 doCheck = false; - meta = { + meta = { changelog = "https://github.com/derickr/vld/releases/tag/${version}"; description = "The Vulcan Logic Dumper hooks into the Zend Engine and dumps all the opcodes (execution units) of a script."; homepage = "https://github.com/derickr/vld"; diff --git a/pkgs/development/php-packages/xdebug/default.nix b/pkgs/development/php-packages/xdebug/default.nix index 3b5caffb963d..83e6950b0fe7 100644 --- a/pkgs/development/php-packages/xdebug/default.nix +++ b/pkgs/development/php-packages/xdebug/default.nix @@ -1,8 +1,13 @@ -{ buildPecl, lib, fetchFromGitHub }: +{ + buildPecl, + lib, + fetchFromGitHub, +}: let version = "3.3.2"; -in buildPecl { +in +buildPecl { inherit version; pname = "xdebug"; diff --git a/pkgs/development/php-packages/yaml/default.nix b/pkgs/development/php-packages/yaml/default.nix index aa825107715d..e3fec9a5d885 100644 --- a/pkgs/development/php-packages/yaml/default.nix +++ b/pkgs/development/php-packages/yaml/default.nix @@ -1,4 +1,9 @@ -{ buildPecl, lib, pkg-config, libyaml }: +{ + buildPecl, + lib, + pkg-config, + libyaml, +}: buildPecl { pname = "yaml"; @@ -8,7 +13,10 @@ buildPecl { configureFlags = [ "--with-yaml=${libyaml.dev}" ]; - nativeBuildInputs = [ pkg-config libyaml ]; + nativeBuildInputs = [ + pkg-config + libyaml + ]; meta = { description = "YAML-1.1 parser and emitter"; diff --git a/pkgs/development/php-packages/zstd/default.nix b/pkgs/development/php-packages/zstd/default.nix index a9428ca477a0..73334f675c3d 100644 --- a/pkgs/development/php-packages/zstd/default.nix +++ b/pkgs/development/php-packages/zstd/default.nix @@ -1,8 +1,15 @@ -{ buildPecl, lib, zstd, pkg-config, fetchFromGitHub }: +{ + buildPecl, + lib, + zstd, + pkg-config, + fetchFromGitHub, +}: let version = "0.13.3"; -in buildPecl { +in +buildPecl { inherit version; pname = "zstd"; @@ -13,15 +20,11 @@ in buildPecl { hash = "sha256-jEuL93ScF0/FlfUvib6uZafOkIe0+VkWV/frpSjTkvY="; }; - nativeBuildInputs = [ - pkg-config - ]; + nativeBuildInputs = [ pkg-config ]; buildInputs = [ zstd ]; - configureFlags = [ - "--with-libzstd" - ]; + configureFlags = [ "--with-libzstd" ]; meta = with lib; { description = "Zstd Extension for PHP";