Merge pull request #309112 from drupol/nixfmt/php-packages

workflows/check-nix-format: enforce for PHP

authored by Pol Dellaiera and committed by GitHub b8fb460d 508a8e68

+903 -510
+2
.github/workflows/check-nix-format.yml
··· 39 39 pkgs/test/cuda 40 40 pkgs/top-level/cuda-packages.nix 41 41 NIX_FMT_PATHS_VSCODE_EXTS: pkgs/applications/editors/vscode/extensions 42 + NIX_FMT_PATHS_PHP_PACKAGES: pkgs/development/php-packages 43 + NIX_FMT_PATHS_BUILD_SUPPORT_PHP: pkgs/build-support/php 42 44 # Iterate over all environment variables beginning with NIX_FMT_PATHS_. 43 45 run: | 44 46 for env_var in "${!NIX_FMT_PATHS_@}"; do
+48 -29
pkgs/build-support/php/build-composer-project.nix
··· 1 - { callPackage, stdenvNoCC, lib, writeTextDir, php, makeBinaryWrapper, fetchFromGitHub, fetchurl }: 1 + { 2 + callPackage, 3 + stdenvNoCC, 4 + lib, 5 + writeTextDir, 6 + php, 7 + makeBinaryWrapper, 8 + fetchFromGitHub, 9 + fetchurl, 10 + }: 2 11 3 12 let 4 - buildComposerProjectOverride = finalAttrs: previousAttrs: 13 + buildComposerProjectOverride = 14 + finalAttrs: previousAttrs: 5 15 6 16 let 7 17 phpDrv = finalAttrs.php or php; ··· 22 32 phpDrv.composerHooks.composerInstallHook 23 33 ]; 24 34 25 - buildInputs = (previousAttrs.buildInputs or [ ]) ++ [ 26 - phpDrv 27 - ]; 35 + buildInputs = (previousAttrs.buildInputs or [ ]) ++ [ phpDrv ]; 28 36 29 37 patches = previousAttrs.patches or [ ]; 30 38 strictDeps = previousAttrs.strictDeps or true; 31 39 32 40 # Should we keep these empty phases? 33 - configurePhase = previousAttrs.configurePhase or '' 34 - runHook preConfigure 41 + configurePhase = 42 + previousAttrs.configurePhase or '' 43 + runHook preConfigure 35 44 36 - runHook postConfigure 37 - ''; 45 + runHook postConfigure 46 + ''; 38 47 39 - buildPhase = previousAttrs.buildPhase or '' 40 - runHook preBuild 48 + buildPhase = 49 + previousAttrs.buildPhase or '' 50 + runHook preBuild 41 51 42 - runHook postBuild 43 - ''; 52 + runHook postBuild 53 + ''; 44 54 45 55 doCheck = previousAttrs.doCheck or true; 46 - checkPhase = previousAttrs.checkPhase or '' 47 - runHook preCheck 56 + checkPhase = 57 + previousAttrs.checkPhase or '' 58 + runHook preCheck 48 59 49 - runHook postCheck 50 - ''; 60 + runHook postCheck 61 + ''; 51 62 52 - installPhase = previousAttrs.installPhase or '' 53 - runHook preInstall 63 + installPhase = 64 + previousAttrs.installPhase or '' 65 + runHook preInstall 54 66 55 - runHook postInstall 56 - ''; 67 + runHook postInstall 68 + ''; 57 69 58 70 doInstallCheck = previousAttrs.doInstallCheck or false; 59 - installCheckPhase = previousAttrs.installCheckPhase or '' 60 - runHook preInstallCheck 71 + installCheckPhase = 72 + previousAttrs.installCheckPhase or '' 73 + runHook preInstallCheck 61 74 62 - runHook postInstallCheck 63 - ''; 75 + runHook postInstallCheck 76 + ''; 64 77 65 78 composerRepository = phpDrv.mkComposerRepository { 66 79 inherit composer composer-local-repo-plugin; 67 - inherit (finalAttrs) patches pname src vendorHash version; 80 + inherit (finalAttrs) 81 + patches 82 + pname 83 + src 84 + vendorHash 85 + version 86 + ; 68 87 69 88 composerLock = previousAttrs.composerLock or null; 70 89 composerNoDev = previousAttrs.composerNoDev or true; ··· 73 92 composerStrictValidation = previousAttrs.composerStrictValidation or true; 74 93 }; 75 94 76 - COMPOSER_CACHE_DIR="/dev/null"; 77 - COMPOSER_DISABLE_NETWORK="1"; 78 - COMPOSER_MIRROR_PATH_REPOS="1"; 95 + COMPOSER_CACHE_DIR = "/dev/null"; 96 + COMPOSER_DISABLE_NETWORK = "1"; 97 + COMPOSER_MIRROR_PATH_REPOS = "1"; 79 98 80 99 meta = previousAttrs.meta or { } // { 81 100 platforms = lib.platforms.all;
+51 -26
pkgs/build-support/php/build-composer-repository.nix
··· 1 - { callPackage, stdenvNoCC, lib, writeTextDir, fetchFromGitHub, php }: 1 + { 2 + callPackage, 3 + stdenvNoCC, 4 + lib, 5 + writeTextDir, 6 + fetchFromGitHub, 7 + php, 8 + }: 2 9 3 10 let 4 11 mkComposerRepositoryOverride = ··· 22 29 composer-local-repo-plugin = callPackage ./pkgs/composer-local-repo-plugin.nix { }; 23 30 in 24 31 assert (lib.assertMsg (previousAttrs ? src) "mkComposerRepository expects src argument."); 25 - assert (lib.assertMsg (previousAttrs ? vendorHash) "mkComposerRepository expects vendorHash argument."); 32 + assert ( 33 + lib.assertMsg (previousAttrs ? vendorHash) "mkComposerRepository expects vendorHash argument." 34 + ); 26 35 assert (lib.assertMsg (previousAttrs ? version) "mkComposerRepository expects version argument."); 27 36 assert (lib.assertMsg (previousAttrs ? pname) "mkComposerRepository expects pname argument."); 28 - assert (lib.assertMsg (previousAttrs ? composerNoDev) "mkComposerRepository expects composerNoDev argument."); 29 - assert (lib.assertMsg (previousAttrs ? composerNoPlugins) "mkComposerRepository expects composerNoPlugins argument."); 30 - assert (lib.assertMsg (previousAttrs ? composerNoScripts) "mkComposerRepository expects composerNoScripts argument."); 37 + assert ( 38 + lib.assertMsg (previousAttrs ? composerNoDev) "mkComposerRepository expects composerNoDev argument." 39 + ); 40 + assert ( 41 + lib.assertMsg ( 42 + previousAttrs ? composerNoPlugins 43 + ) "mkComposerRepository expects composerNoPlugins argument." 44 + ); 45 + assert ( 46 + lib.assertMsg ( 47 + previousAttrs ? composerNoScripts 48 + ) "mkComposerRepository expects composerNoScripts argument." 49 + ); 31 50 { 32 51 composerNoDev = previousAttrs.composerNoDev or true; 33 52 composerNoPlugins = previousAttrs.composerNoPlugins or true; ··· 51 70 strictDeps = previousAttrs.strictDeps or true; 52 71 53 72 # Should we keep these empty phases? 54 - configurePhase = previousAttrs.configurePhase or '' 55 - runHook preConfigure 73 + configurePhase = 74 + previousAttrs.configurePhase or '' 75 + runHook preConfigure 56 76 57 - runHook postConfigure 58 - ''; 77 + runHook postConfigure 78 + ''; 59 79 60 - buildPhase = previousAttrs.buildPhase or '' 61 - runHook preBuild 80 + buildPhase = 81 + previousAttrs.buildPhase or '' 82 + runHook preBuild 62 83 63 - runHook postBuild 64 - ''; 84 + runHook postBuild 85 + ''; 65 86 66 87 doCheck = previousAttrs.doCheck or true; 67 - checkPhase = previousAttrs.checkPhase or '' 68 - runHook preCheck 88 + checkPhase = 89 + previousAttrs.checkPhase or '' 90 + runHook preCheck 69 91 70 - runHook postCheck 71 - ''; 92 + runHook postCheck 93 + ''; 72 94 73 - installPhase = previousAttrs.installPhase or '' 74 - runHook preInstall 95 + installPhase = 96 + previousAttrs.installPhase or '' 97 + runHook preInstall 75 98 76 - runHook postInstall 77 - ''; 99 + runHook postInstall 100 + ''; 78 101 79 102 doInstallCheck = previousAttrs.doInstallCheck or false; 80 - installCheckPhase = previousAttrs.installCheckPhase or '' 81 - runHook preInstallCheck 103 + installCheckPhase = 104 + previousAttrs.installCheckPhase or '' 105 + runHook preInstallCheck 82 106 83 - runHook postInstallCheck 84 - ''; 107 + runHook postInstallCheck 108 + ''; 85 109 86 110 COMPOSER_CACHE_DIR = "/dev/null"; 87 111 COMPOSER_MIRROR_PATH_REPOS = "1"; ··· 89 113 COMPOSER_DISABLE_NETWORK = "0"; 90 114 91 115 outputHashMode = "recursive"; 92 - outputHashAlgo = if (finalAttrs ? vendorHash && finalAttrs.vendorHash != "") then null else "sha256"; 116 + outputHashAlgo = 117 + if (finalAttrs ? vendorHash && finalAttrs.vendorHash != "") then null else "sha256"; 93 118 outputHash = finalAttrs.vendorHash or ""; 94 119 }; 95 120 in
+61 -37
pkgs/build-support/php/build-pecl.nix
··· 1 - { stdenv, lib, php, autoreconfHook, fetchurl, re2c, nix-update-script }: 1 + { 2 + stdenv, 3 + lib, 4 + php, 5 + autoreconfHook, 6 + fetchurl, 7 + re2c, 8 + nix-update-script, 9 + }: 2 10 3 - { pname 4 - , version 5 - , internalDeps ? [ ] 6 - , peclDeps ? [ ] 7 - , buildInputs ? [ ] 8 - , nativeBuildInputs ? [ ] 9 - , postPhpize ? "" 10 - , makeFlags ? [ ] 11 - , src ? fetchurl ({ 12 - url = "https://pecl.php.net/get/${pname}-${version}.tgz"; 13 - } // lib.filterAttrs (attrName: _: lib.elem attrName [ "sha256" "hash" ]) args) 14 - , passthru ? { } 15 - , ... 11 + { 12 + pname, 13 + version, 14 + internalDeps ? [ ], 15 + peclDeps ? [ ], 16 + buildInputs ? [ ], 17 + nativeBuildInputs ? [ ], 18 + postPhpize ? "", 19 + makeFlags ? [ ], 20 + src ? fetchurl ( 21 + { 22 + url = "https://pecl.php.net/get/${pname}-${version}.tgz"; 23 + } 24 + // lib.filterAttrs ( 25 + attrName: _: 26 + lib.elem attrName [ 27 + "sha256" 28 + "hash" 29 + ] 30 + ) args 31 + ), 32 + passthru ? { }, 33 + ... 16 34 }@args: 17 35 18 - stdenv.mkDerivation (args // { 19 - name = "php-${pname}-${version}"; 20 - extensionName = pname; 36 + stdenv.mkDerivation ( 37 + args 38 + // { 39 + name = "php-${pname}-${version}"; 40 + extensionName = pname; 21 41 22 - inherit src; 42 + inherit src; 23 43 24 - nativeBuildInputs = [ autoreconfHook re2c ] ++ nativeBuildInputs; 25 - buildInputs = [ php ] ++ peclDeps ++ buildInputs; 44 + nativeBuildInputs = [ 45 + autoreconfHook 46 + re2c 47 + ] ++ nativeBuildInputs; 48 + buildInputs = [ php ] ++ peclDeps ++ buildInputs; 26 49 27 - makeFlags = [ "EXTENSION_DIR=$(out)/lib/php/extensions" ] ++ makeFlags; 50 + makeFlags = [ "EXTENSION_DIR=$(out)/lib/php/extensions" ] ++ makeFlags; 28 51 29 - autoreconfPhase = '' 30 - phpize 31 - ${postPhpize} 32 - ${lib.concatMapStringsSep "\n" 33 - (dep: "mkdir -p ext; ln -s ${dep.dev}/include ext/${dep.extensionName}") 34 - internalDeps} 35 - ''; 36 - checkPhase = "NO_INTERACTON=yes make test"; 52 + autoreconfPhase = '' 53 + phpize 54 + ${postPhpize} 55 + ${lib.concatMapStringsSep "\n" ( 56 + dep: "mkdir -p ext; ln -s ${dep.dev}/include ext/${dep.extensionName}" 57 + ) internalDeps} 58 + ''; 59 + checkPhase = "NO_INTERACTON=yes make test"; 37 60 38 - passthru = passthru // { 39 - # Thes flags were introduced for `nix-update` so that it can update 40 - # PHP extensions correctly. 41 - # See the corresponding PR: https://github.com/Mic92/nix-update/pull/123 42 - isPhpExtension = true; 43 - updateScript = nix-update-script {}; 44 - }; 45 - }) 61 + passthru = passthru // { 62 + # Thes flags were introduced for `nix-update` so that it can update 63 + # PHP extensions correctly. 64 + # See the corresponding PR: https://github.com/Mic92/nix-update/pull/123 65 + isPhpExtension = true; 66 + updateScript = nix-update-script { }; 67 + }; 68 + } 69 + )
+34 -27
pkgs/build-support/php/hooks/default.nix
··· 1 - { lib 2 - , makeSetupHook 3 - , diffutils 4 - , jq 5 - , writeShellApplication 6 - , moreutils 7 - , cacert 8 - , buildPackages 1 + { 2 + lib, 3 + makeSetupHook, 4 + diffutils, 5 + jq, 6 + writeShellApplication, 7 + moreutils, 8 + cacert, 9 + buildPackages, 9 10 }: 10 11 11 12 let ··· 16 17 }; 17 18 in 18 19 { 19 - composerRepositoryHook = makeSetupHook 20 - { 21 - name = "composer-repository-hook.sh"; 22 - propagatedBuildInputs = [ jq moreutils cacert ]; 23 - substitutions = { 24 - phpScriptUtils = lib.getExe php-script-utils; 25 - }; 26 - } ./composer-repository-hook.sh; 20 + composerRepositoryHook = makeSetupHook { 21 + name = "composer-repository-hook.sh"; 22 + propagatedBuildInputs = [ 23 + jq 24 + moreutils 25 + cacert 26 + ]; 27 + substitutions = { 28 + phpScriptUtils = lib.getExe php-script-utils; 29 + }; 30 + } ./composer-repository-hook.sh; 27 31 28 - composerInstallHook = makeSetupHook 29 - { 30 - name = "composer-install-hook.sh"; 31 - propagatedBuildInputs = [ jq moreutils cacert ]; 32 - substitutions = { 33 - # Specify the stdenv's `diff` by abspath to ensure that the user's build 34 - # inputs do not cause us to find the wrong `diff`. 35 - cmp = "${lib.getBin buildPackages.diffutils}/bin/cmp"; 36 - phpScriptUtils = lib.getExe php-script-utils; 37 - }; 38 - } ./composer-install-hook.sh; 32 + composerInstallHook = makeSetupHook { 33 + name = "composer-install-hook.sh"; 34 + propagatedBuildInputs = [ 35 + jq 36 + moreutils 37 + cacert 38 + ]; 39 + substitutions = { 40 + # Specify the stdenv's `diff` by abspath to ensure that the user's build 41 + # inputs do not cause us to find the wrong `diff`. 42 + cmp = "${lib.getBin buildPackages.diffutils}/bin/cmp"; 43 + phpScriptUtils = lib.getExe php-script-utils; 44 + }; 45 + } ./composer-install-hook.sh; 39 46 }
+11 -10
pkgs/build-support/php/pkgs/composer-local-repo-plugin.nix
··· 1 - { php, callPackage, stdenvNoCC, lib, fetchFromGitHub, makeBinaryWrapper }: 1 + { 2 + php, 3 + callPackage, 4 + stdenvNoCC, 5 + lib, 6 + fetchFromGitHub, 7 + makeBinaryWrapper, 8 + }: 2 9 3 10 let 4 - composer = callPackage ./composer-phar.nix { 5 - inherit (php.packages.composer) version pharHash; 6 - }; 11 + composer = callPackage ./composer-phar.nix { inherit (php.packages.composer) version pharHash; }; 7 12 8 13 composerKeys = stdenvNoCC.mkDerivation (finalComposerKeysAttrs: { 9 14 pname = "composer-keys"; ··· 43 48 COMPOSER_HTACCESS_PROTECT = "0"; 44 49 COMPOSER_DISABLE_NETWORK = "1"; 45 50 46 - nativeBuildInputs = [ 47 - makeBinaryWrapper 48 - ]; 51 + nativeBuildInputs = [ makeBinaryWrapper ]; 49 52 50 - buildInputs = [ 51 - composer 52 - ]; 53 + buildInputs = [ composer ]; 53 54 54 55 configurePhase = '' 55 56 runHook preConfigure
+23 -14
pkgs/build-support/php/pkgs/composer-phar.nix
··· 1 1 { 2 - _7zz 3 - , cacert 4 - , curl 5 - , fetchurl 6 - , git 7 - , lib 8 - , makeBinaryWrapper 9 - , php 10 - , stdenvNoCC 11 - , unzip 12 - , xz 13 - , version 14 - , pharHash 2 + _7zz, 3 + cacert, 4 + curl, 5 + fetchurl, 6 + git, 7 + lib, 8 + makeBinaryWrapper, 9 + php, 10 + stdenvNoCC, 11 + unzip, 12 + xz, 13 + version, 14 + pharHash, 15 15 }: 16 16 17 17 stdenvNoCC.mkDerivation (finalAttrs: { ··· 34 34 install -D $src $out/libexec/composer/composer.phar 35 35 makeWrapper ${php}/bin/php $out/bin/composer \ 36 36 --add-flags "$out/libexec/composer/composer.phar" \ 37 - --prefix PATH : ${lib.makeBinPath [ _7zz cacert curl git unzip xz ]} 37 + --prefix PATH : ${ 38 + lib.makeBinPath [ 39 + _7zz 40 + cacert 41 + curl 42 + git 43 + unzip 44 + xz 45 + ] 46 + } 38 47 39 48 runHook postInstall 40 49 '';
+8 -2
pkgs/development/php-packages/amqp/default.nix
··· 1 - { buildPecl, lib, rabbitmq-c, fetchFromGitHub }: 1 + { 2 + buildPecl, 3 + lib, 4 + rabbitmq-c, 5 + fetchFromGitHub, 6 + }: 2 7 3 8 let 4 9 version = "2.1.2"; 5 - in buildPecl { 10 + in 11 + buildPecl { 6 12 inherit version; 7 13 pname = "amqp"; 8 14
+18 -4
pkgs/development/php-packages/apcu/default.nix
··· 1 - { buildPecl, lib, pcre2, fetchFromGitHub, php, fetchpatch }: 1 + { 2 + buildPecl, 3 + lib, 4 + pcre2, 5 + fetchFromGitHub, 6 + php, 7 + fetchpatch, 8 + }: 2 9 3 10 let 4 11 version = "5.1.23"; 5 - in buildPecl { 12 + in 13 + buildPecl { 6 14 inherit version; 7 15 pname = "apcu"; 8 16 ··· 16 24 buildInputs = [ pcre2 ]; 17 25 doCheck = true; 18 26 checkTarget = "test"; 19 - checkFlagsArray = [ "REPORT_EXIT_STATUS=1" "NO_INTERACTION=1" ]; 27 + checkFlagsArray = [ 28 + "REPORT_EXIT_STATUS=1" 29 + "NO_INTERACTION=1" 30 + ]; 20 31 makeFlags = [ "phpincludedir=$(dev)/include" ]; 21 - outputs = [ "out" "dev" ]; 32 + outputs = [ 33 + "out" 34 + "dev" 35 + ]; 22 36 23 37 meta = with lib; { 24 38 changelog = "https://github.com/krakjoe/apcu/releases/tag/v${version}";
+7 -2
pkgs/development/php-packages/ast/default.nix
··· 1 - { buildPecl, lib, fetchFromGitHub }: 1 + { 2 + buildPecl, 3 + lib, 4 + fetchFromGitHub, 5 + }: 2 6 3 7 let 4 8 version = "1.1.1"; 5 - in buildPecl { 9 + in 10 + buildPecl { 6 11 inherit version; 7 12 pname = "ast"; 8 13
+5 -1
pkgs/development/php-packages/box/default.nix
··· 1 - { lib, php82, fetchFromGitHub }: 1 + { 2 + lib, 3 + php82, 4 + fetchFromGitHub, 5 + }: 2 6 3 7 php82.buildComposerProject (finalAttrs: { 4 8 pname = "box";
+8 -7
pkgs/development/php-packages/castor/default.nix
··· 1 - { lib 2 - , fetchFromGitHub 3 - , fetchpatch 4 - , installShellFiles 5 - , php 6 - , nix-update-script 7 - , testers 1 + { 2 + lib, 3 + fetchFromGitHub, 4 + fetchpatch, 5 + installShellFiles, 6 + php, 7 + nix-update-script, 8 + testers, 8 9 }: 9 10 10 11 php.buildComposerProject (finalAttrs: {
+22 -12
pkgs/development/php-packages/composer/default.nix
··· 1 - { lib 2 - , callPackage 3 - , fetchFromGitHub 4 - , php 5 - , unzip 6 - , _7zz 7 - , xz 8 - , git 9 - , curl 10 - , cacert 11 - , makeBinaryWrapper 1 + { 2 + lib, 3 + callPackage, 4 + fetchFromGitHub, 5 + php, 6 + unzip, 7 + _7zz, 8 + xz, 9 + git, 10 + curl, 11 + cacert, 12 + makeBinaryWrapper, 12 13 }: 13 14 14 15 php.buildComposerProject (finalAttrs: { ··· 37 38 38 39 postInstall = '' 39 40 wrapProgram $out/bin/composer \ 40 - --prefix PATH : ${lib.makeBinPath [ _7zz cacert curl git unzip xz ]} 41 + --prefix PATH : ${ 42 + lib.makeBinPath [ 43 + _7zz 44 + cacert 45 + curl 46 + git 47 + unzip 48 + xz 49 + ] 50 + } 41 51 ''; 42 52 43 53 vendorHash = "sha256-dNNV9fTyGyRoGeDV/vBjn0aMgkaUMsrKQv5AOoiYokQ=";
+14 -2
pkgs/development/php-packages/couchbase/default.nix
··· 1 - { lib, buildPecl, fetchFromGitHub, writeText, libcouchbase, zlib, php, substituteAll }: 1 + { 2 + lib, 3 + buildPecl, 4 + fetchFromGitHub, 5 + writeText, 6 + libcouchbase, 7 + zlib, 8 + php, 9 + substituteAll, 10 + }: 2 11 let 3 12 pname = "couchbase"; 4 13 version = "3.2.2"; ··· 15 24 16 25 configureFlags = [ "--with-couchbase" ]; 17 26 18 - buildInputs = [ libcouchbase zlib ]; 27 + buildInputs = [ 28 + libcouchbase 29 + zlib 30 + ]; 19 31 20 32 patches = [ 21 33 (substituteAll {
+39 -30
pkgs/development/php-packages/datadog_trace/default.nix
··· 1 - { lib 2 - , stdenv 3 - , buildPecl 4 - , cargo 5 - , rustc 6 - , fetchFromGitHub 7 - , rustPlatform 8 - , curl 9 - , pcre2 10 - , libiconv 11 - , darwin 1 + { 2 + lib, 3 + stdenv, 4 + buildPecl, 5 + cargo, 6 + rustc, 7 + fetchFromGitHub, 8 + rustPlatform, 9 + curl, 10 + pcre2, 11 + libiconv, 12 + darwin, 12 13 }: 13 14 14 15 buildPecl rec { ··· 32 33 33 34 env.NIX_CFLAGS_COMPILE = "-O2"; 34 35 35 - nativeBuildInputs = [ 36 - cargo 37 - rustc 38 - ] ++ lib.optionals stdenv.isLinux [ 39 - rustPlatform.bindgenHook 40 - rustPlatform.cargoSetupHook 41 - ] ++ lib.optionals stdenv.isDarwin [ 42 - darwin.apple_sdk_11_0.rustPlatform.bindgenHook 43 - darwin.apple_sdk_11_0.rustPlatform.cargoSetupHook 44 - ]; 36 + nativeBuildInputs = 37 + [ 38 + cargo 39 + rustc 40 + ] 41 + ++ lib.optionals stdenv.isLinux [ 42 + rustPlatform.bindgenHook 43 + rustPlatform.cargoSetupHook 44 + ] 45 + ++ lib.optionals stdenv.isDarwin [ 46 + darwin.apple_sdk_11_0.rustPlatform.bindgenHook 47 + darwin.apple_sdk_11_0.rustPlatform.cargoSetupHook 48 + ]; 45 49 46 - buildInputs = [ 47 - curl 48 - pcre2 49 - ] ++ lib.optionals stdenv.isDarwin [ 50 - darwin.apple_sdk.frameworks.CoreFoundation 51 - darwin.apple_sdk.frameworks.Security 52 - libiconv 53 - ]; 50 + buildInputs = 51 + [ 52 + curl 53 + pcre2 54 + ] 55 + ++ lib.optionals stdenv.isDarwin [ 56 + darwin.apple_sdk.frameworks.CoreFoundation 57 + darwin.apple_sdk.frameworks.Security 58 + libiconv 59 + ]; 54 60 55 61 meta = { 56 62 changelog = "https://github.com/DataDog/dd-trace-php/blob/${src.rev}/CHANGELOG.md"; 57 63 description = "Datadog Tracing PHP Client"; 58 64 homepage = "https://github.com/DataDog/dd-trace-php"; 59 - license = with lib.licenses; [ asl20 bsd3 ]; 65 + license = with lib.licenses; [ 66 + asl20 67 + bsd3 68 + ]; 60 69 maintainers = lib.teams.php.members; 61 70 }; 62 71 }
+4 -3
pkgs/development/php-packages/deployer/default.nix
··· 1 - { lib 2 - , fetchFromGitHub 3 - , php 1 + { 2 + lib, 3 + fetchFromGitHub, 4 + php, 4 5 }: 5 6 6 7 php.buildComposerProject (finalAttrs: {
+9 -2
pkgs/development/php-packages/ds/default.nix
··· 1 - { buildPecl, lib, pcre2, php, fetchFromGitHub }: 1 + { 2 + buildPecl, 3 + lib, 4 + pcre2, 5 + php, 6 + fetchFromGitHub, 7 + }: 2 8 3 9 let 4 10 version = "1.5.0"; 5 - in buildPecl { 11 + in 12 + buildPecl { 6 13 inherit version; 7 14 pname = "ds"; 8 15
+12 -2
pkgs/development/php-packages/event/default.nix
··· 1 - { buildPecl, lib, php, pkg-config, openssl, libevent }: 1 + { 2 + buildPecl, 3 + lib, 4 + php, 5 + pkg-config, 6 + openssl, 7 + libevent, 8 + }: 2 9 buildPecl { 3 10 pname = "event"; 4 11 ··· 19 26 ''; 20 27 21 28 nativeBuildInputs = [ pkg-config ]; 22 - buildInputs = [ openssl libevent ]; 29 + buildInputs = [ 30 + openssl 31 + libevent 32 + ]; 23 33 internalDeps = [ php.extensions.sockets ]; 24 34 25 35 meta = with lib; {
+11 -2
pkgs/development/php-packages/gnupg/default.nix
··· 1 - { buildPecl, lib, gpgme, file, gnupg, php, fetchFromGitHub }: 1 + { 2 + buildPecl, 3 + lib, 4 + gpgme, 5 + file, 6 + gnupg, 7 + php, 8 + fetchFromGitHub, 9 + }: 2 10 3 11 let 4 12 version = "1.5.1"; 5 - in buildPecl { 13 + in 14 + buildPecl { 6 15 inherit version; 7 16 pname = "gnupg"; 8 17
+5 -4
pkgs/development/php-packages/grpc/default.nix
··· 1 - { buildPecl 2 - , pkg-config 3 - , lib 4 - , grpc 1 + { 2 + buildPecl, 3 + pkg-config, 4 + lib, 5 + grpc, 5 6 }: 6 7 7 8 buildPecl {
+4 -3
pkgs/development/php-packages/grumphp/default.nix
··· 1 - { fetchFromGitHub 2 - , lib 3 - , php 1 + { 2 + fetchFromGitHub, 3 + lib, 4 + php, 4 5 }: 5 6 6 7 php.buildComposerProject (finalAttrs: {
+4 -1
pkgs/development/php-packages/igbinary/default.nix
··· 7 7 8 8 configureFlags = [ "--enable-igbinary" ]; 9 9 makeFlags = [ "phpincludedir=$(dev)/include" ]; 10 - outputs = [ "out" "dev" ]; 10 + outputs = [ 11 + "out" 12 + "dev" 13 + ]; 11 14 12 15 meta = { 13 16 description = "Binary serialization for PHP";
+7 -1
pkgs/development/php-packages/imagick/default.nix
··· 1 - { buildPecl, lib, imagemagick, pkg-config, pcre2 }: 1 + { 2 + buildPecl, 3 + lib, 4 + imagemagick, 5 + pkg-config, 6 + pcre2, 7 + }: 2 8 3 9 buildPecl { 4 10 pname = "imagick";
+1 -3
pkgs/development/php-packages/inotify/default.nix
··· 1 - { buildPecl 2 - , lib 3 - }: 1 + { buildPecl, lib }: 4 2 5 3 buildPecl { 6 4 pname = "inotify";
+14 -6
pkgs/development/php-packages/ioncube-loader/default.nix
··· 1 - { stdenv 2 - , lib 3 - , fetchzip 4 - , php 1 + { 2 + stdenv, 3 + lib, 4 + fetchzip, 5 + php, 5 6 }: 6 7 7 8 let ··· 42 43 43 44 installPhase = '' 44 45 mkdir -p $out/lib/php/extensions 45 - cp $src/ioncube_loader_${variant.${stdenv.hostPlatform.system}.prefix}_${phpVersion}.so $out/lib/php/extensions/ioncube-loader.so 46 + cp $src/ioncube_loader_${ 47 + variant.${stdenv.hostPlatform.system}.prefix 48 + }_${phpVersion}.so $out/lib/php/extensions/ioncube-loader.so 46 49 ''; 47 50 48 51 meta = with lib; { ··· 52 55 sourceProvenance = [ sourceTypes.binaryNativeCode ]; 53 56 license = licenses.unfree; 54 57 maintainers = with maintainers; [ neverbehave ]; 55 - platforms = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ]; 58 + platforms = [ 59 + "x86_64-linux" 60 + "aarch64-linux" 61 + "x86_64-darwin" 62 + "aarch64-darwin" 63 + ]; 56 64 }; 57 65 }
+5 -1
pkgs/development/php-packages/mailparse/default.nix
··· 1 - { buildPecl, lib, php }: 1 + { 2 + buildPecl, 3 + lib, 4 + php, 5 + }: 2 6 3 7 buildPecl { 4 8 pname = "mailparse";
+6 -1
pkgs/development/php-packages/maxminddb/default.nix
··· 1 - { buildPecl, lib, fetchFromGitHub, libmaxminddb }: 1 + { 2 + buildPecl, 3 + lib, 4 + fetchFromGitHub, 5 + libmaxminddb, 6 + }: 2 7 let 3 8 pname = "maxminddb"; 4 9 version = "1.11.1";
+10 -7
pkgs/development/php-packages/memcache/default.nix
··· 1 - { buildPecl, lib, fetchFromGitHub, php, zlib, pkg-config }: 1 + { 2 + buildPecl, 3 + lib, 4 + fetchFromGitHub, 5 + php, 6 + zlib, 7 + pkg-config, 8 + }: 2 9 3 10 buildPecl rec { 4 11 pname = "memcache"; ··· 11 18 hash = "sha256-77GvQ59XUpIZmdYZP6IhtjdkYwXKuNBSG+LBScz2BtI="; 12 19 }; 13 20 14 - internalDeps = [ 15 - php.extensions.session 16 - ]; 21 + internalDeps = [ php.extensions.session ]; 17 22 18 - configureFlags = [ 19 - "--with-zlib-dir=${zlib.dev}" 20 - ]; 23 + configureFlags = [ "--with-zlib-dir=${zlib.dev}" ]; 21 24 22 25 nativeBuildInputs = [ pkg-config ]; 23 26 buildInputs = [ zlib ];
+15 -5
pkgs/development/php-packages/memcached/default.nix
··· 1 - { buildPecl, lib, fetchFromGitHub, php, cyrus_sasl, zlib, pkg-config, libmemcached }: 1 + { 2 + buildPecl, 3 + lib, 4 + fetchFromGitHub, 5 + php, 6 + cyrus_sasl, 7 + zlib, 8 + pkg-config, 9 + libmemcached, 10 + }: 2 11 3 12 buildPecl rec { 4 13 pname = "memcached"; ··· 11 20 sha256 = "sha256-g9IzGSZUxLlOE32o9ZJOa3erb5Qs1ntR8nzS3kRd/EU="; 12 21 }; 13 22 14 - internalDeps = [ 15 - php.extensions.session 16 - ]; 23 + internalDeps = [ php.extensions.session ]; 17 24 18 25 configureFlags = [ 19 26 "--with-zlib-dir=${zlib.dev}" ··· 21 28 ]; 22 29 23 30 nativeBuildInputs = [ pkg-config ]; 24 - buildInputs = [ cyrus_sasl zlib ]; 31 + buildInputs = [ 32 + cyrus_sasl 33 + zlib 34 + ]; 25 35 26 36 meta = with lib; { 27 37 description = "PHP extension for interfacing with memcached via libmemcached library";
+5 -1
pkgs/development/php-packages/meminfo/default.nix
··· 1 - { buildPecl, lib, fetchFromGitHub }: 1 + { 2 + buildPecl, 3 + lib, 4 + fetchFromGitHub, 5 + }: 2 6 3 7 buildPecl rec { 4 8 version = "unstable-2022-03-25";
+8 -8
pkgs/development/php-packages/memprof/default.nix
··· 1 - { buildPecl 2 - , lib 3 - , fetchFromGitHub 4 - , judy 1 + { 2 + buildPecl, 3 + lib, 4 + fetchFromGitHub, 5 + judy, 5 6 }: 6 7 7 8 let 8 9 version = "3.0.2"; 9 - in buildPecl { 10 + in 11 + buildPecl { 10 12 inherit version; 11 13 pname = "memprof"; 12 14 ··· 17 19 hash = "sha256-K8YcvCobErBkaWFTkVGLXXguQPOLIgQuRGWJF+HAIRA="; 18 20 }; 19 21 20 - configureFlags = [ 21 - "--with-judy-dir=${judy}" 22 - ]; 22 + configureFlags = [ "--with-judy-dir=${judy}" ]; 23 23 24 24 doCheck = true; 25 25
+28 -25
pkgs/development/php-packages/mongodb/default.nix
··· 1 - { stdenv 2 - , buildPecl 3 - , fetchFromGitHub 4 - , lib 5 - , libiconv 6 - , pcre2 7 - , pkg-config 8 - , cyrus_sasl 9 - , icu64 10 - , openssl 11 - , snappy 12 - , zlib 13 - , darwin 1 + { 2 + stdenv, 3 + buildPecl, 4 + fetchFromGitHub, 5 + lib, 6 + libiconv, 7 + pcre2, 8 + pkg-config, 9 + cyrus_sasl, 10 + icu64, 11 + openssl, 12 + snappy, 13 + zlib, 14 + darwin, 14 15 }: 15 16 16 17 buildPecl rec { ··· 26 27 }; 27 28 28 29 nativeBuildInputs = [ pkg-config ]; 29 - buildInputs = [ 30 - cyrus_sasl 31 - icu64 32 - openssl 33 - snappy 34 - zlib 35 - pcre2 36 - ] ++ lib.optionals stdenv.isDarwin [ 37 - darwin.apple_sdk_11_0.frameworks.Security 38 - darwin.apple_sdk_11_0.Libsystem 39 - libiconv 40 - ]; 30 + buildInputs = 31 + [ 32 + cyrus_sasl 33 + icu64 34 + openssl 35 + snappy 36 + zlib 37 + pcre2 38 + ] 39 + ++ lib.optionals stdenv.isDarwin [ 40 + darwin.apple_sdk_11_0.frameworks.Security 41 + darwin.apple_sdk_11_0.Libsystem 42 + libiconv 43 + ]; 41 44 42 45 meta = { 43 46 description = "The Official MongoDB PHP driver";
+22 -11
pkgs/development/php-packages/oci8/default.nix
··· 1 - { buildPecl, lib, oracle-instantclient, php }: 1 + { 2 + buildPecl, 3 + lib, 4 + oracle-instantclient, 5 + php, 6 + }: 2 7 3 8 let 4 - versionData = if (lib.versionOlder php.version "8.1") then { 5 - version = "3.0.1"; 6 - sha256 = "108ds92620dih5768z19hi0jxfa7wfg5hdvyyvpapir87c0ap914"; 7 - } else if (lib.versionOlder php.version "8.2") then { 8 - version = "3.2.1"; 9 - sha256 = "sha256-zyF703DzRZDBhlNFFt/dknmZ7layqhgjG1/ZDN+PEsg="; 10 - } else { 11 - version = "3.3.0"; 12 - sha256 = "sha256-0y5VnRKspJYE6xWeBcX2OG2pJTNbB+27GMywDv4gzwQ="; 13 - }; 9 + versionData = 10 + if (lib.versionOlder php.version "8.1") then 11 + { 12 + version = "3.0.1"; 13 + sha256 = "108ds92620dih5768z19hi0jxfa7wfg5hdvyyvpapir87c0ap914"; 14 + } 15 + else if (lib.versionOlder php.version "8.2") then 16 + { 17 + version = "3.2.1"; 18 + sha256 = "sha256-zyF703DzRZDBhlNFFt/dknmZ7layqhgjG1/ZDN+PEsg="; 19 + } 20 + else 21 + { 22 + version = "3.3.0"; 23 + sha256 = "sha256-0y5VnRKspJYE6xWeBcX2OG2pJTNbB+27GMywDv4gzwQ="; 24 + }; 14 25 in 15 26 buildPecl { 16 27 pname = "oci8";
+10 -2
pkgs/development/php-packages/openswoole/default.nix
··· 1 - { lib, stdenv, buildPecl, valgrind, pcre2, fetchFromGitHub }: 1 + { 2 + lib, 3 + stdenv, 4 + buildPecl, 5 + valgrind, 6 + pcre2, 7 + fetchFromGitHub, 8 + }: 2 9 3 10 let 4 11 version = "22.1.2"; 5 - in buildPecl { 12 + in 13 + buildPecl { 6 14 inherit version; 7 15 pname = "openswoole"; 8 16
+7 -2
pkgs/development/php-packages/opentelemetry/default.nix
··· 1 - { lib, buildPecl, fetchFromGitHub }: 1 + { 2 + lib, 3 + buildPecl, 4 + fetchFromGitHub, 5 + }: 2 6 3 7 let 4 8 version = "1.0.2"; 5 - in buildPecl rec { 9 + in 10 + buildPecl rec { 6 11 inherit version; 7 12 pname = "opentelemetry"; 8 13
+9 -2
pkgs/development/php-packages/pcov/default.nix
··· 1 - { buildPecl, lib, php, pcre2, fetchFromGitHub }: 1 + { 2 + buildPecl, 3 + lib, 4 + php, 5 + pcre2, 6 + fetchFromGitHub, 7 + }: 2 8 3 9 let 4 10 version = "1.0.11"; 5 - in buildPecl { 11 + in 12 + buildPecl { 6 13 inherit version; 7 14 pname = "pcov"; 8 15
+7 -1
pkgs/development/php-packages/pdlib/default.nix
··· 1 - { buildPecl, fetchFromGitHub, lib, pkg-config, dlib }: 1 + { 2 + buildPecl, 3 + fetchFromGitHub, 4 + lib, 5 + pkg-config, 6 + dlib, 7 + }: 2 8 let 3 9 pname = "pdlib"; 4 10 version = "1.1.0";
+8 -1
pkgs/development/php-packages/pdo_sqlsrv/default.nix
··· 1 - { stdenv, buildPecl, lib, libiconv, unixODBC, php }: 1 + { 2 + stdenv, 3 + buildPecl, 4 + lib, 5 + libiconv, 6 + unixODBC, 7 + php, 8 + }: 2 9 3 10 buildPecl { 4 11 pname = "pdo_sqlsrv";
+12 -2
pkgs/development/php-packages/phalcon/default.nix
··· 1 - { buildPecl, lib, pcre2, fetchFromGitHub, php, pkg-config }: 1 + { 2 + buildPecl, 3 + lib, 4 + pcre2, 5 + fetchFromGitHub, 6 + php, 7 + pkg-config, 8 + }: 2 9 3 10 buildPecl rec { 4 11 pname = "phalcon"; ··· 11 18 hash = "sha256-AgyV9pxyXcXuhrRgozN2p67u8xZMepbWrzYaBZMFn6k="; 12 19 }; 13 20 14 - internalDeps = [ php.extensions.session php.extensions.pdo ]; 21 + internalDeps = [ 22 + php.extensions.session 23 + php.extensions.pdo 24 + ]; 15 25 16 26 nativeBuildInputs = [ pkg-config ]; 17 27 buildInputs = [ pcre2 ];
+27 -25
pkgs/development/php-packages/phan/default.nix
··· 1 - { lib 2 - , fetchFromGitHub 3 - , php 1 + { 2 + lib, 3 + fetchFromGitHub, 4 + php, 4 5 }: 5 6 6 - (php.withExtensions({ enabled, all }: enabled ++ (with all; [ ast ]))).buildComposerProject (finalAttrs: { 7 - pname = "phan"; 8 - version = "5.4.3"; 7 + (php.withExtensions ({ enabled, all }: enabled ++ (with all; [ ast ]))).buildComposerProject 8 + (finalAttrs: { 9 + pname = "phan"; 10 + version = "5.4.3"; 9 11 10 - src = fetchFromGitHub { 11 - owner = "phan"; 12 - repo = "phan"; 13 - rev = finalAttrs.version; 14 - hash = "sha256-O0dtnDsz6X99B99VbRQf3Wr/xJfsJqd+2l5Z5iWxHyU="; 15 - }; 12 + src = fetchFromGitHub { 13 + owner = "phan"; 14 + repo = "phan"; 15 + rev = finalAttrs.version; 16 + hash = "sha256-O0dtnDsz6X99B99VbRQf3Wr/xJfsJqd+2l5Z5iWxHyU="; 17 + }; 16 18 17 - vendorHash = "sha256-yE85MBseJa0VGV5EbjT0te4QT3697YvtumGkMMfZtxI="; 19 + vendorHash = "sha256-yE85MBseJa0VGV5EbjT0te4QT3697YvtumGkMMfZtxI="; 18 20 19 - meta = { 20 - description = "Static analyzer for PHP"; 21 - homepage = "https://github.com/phan/phan"; 22 - license = lib.licenses.mit; 23 - longDescription = '' 24 - Phan is a static analyzer for PHP. Phan prefers to avoid false-positives 25 - and attempts to prove incorrectness rather than correctness. 26 - ''; 27 - mainProgram = "phan"; 28 - maintainers = with lib.maintainers; [ apeschar ] ++ lib.teams.php.members; 29 - }; 30 - }) 21 + meta = { 22 + description = "Static analyzer for PHP"; 23 + homepage = "https://github.com/phan/phan"; 24 + license = lib.licenses.mit; 25 + longDescription = '' 26 + Phan is a static analyzer for PHP. Phan prefers to avoid false-positives 27 + and attempts to prove incorrectness rather than correctness. 28 + ''; 29 + mainProgram = "phan"; 30 + maintainers = with lib.maintainers; [ apeschar ] ++ lib.teams.php.members; 31 + }; 32 + })
+26 -24
pkgs/development/php-packages/phing/default.nix
··· 1 - { lib 2 - , fetchFromGitHub 3 - , php 1 + { 2 + lib, 3 + fetchFromGitHub, 4 + php, 4 5 }: 5 6 6 - (php.withExtensions({ enabled, all }: enabled ++ (with all; [ xsl ]))).buildComposerProject (finalAttrs: { 7 - pname = "phing"; 8 - version = "3.0.0-rc6"; 7 + (php.withExtensions ({ enabled, all }: enabled ++ (with all; [ xsl ]))).buildComposerProject 8 + (finalAttrs: { 9 + pname = "phing"; 10 + version = "3.0.0-rc6"; 9 11 10 - src = fetchFromGitHub { 11 - owner = "phingofficial"; 12 - repo = "phing"; 13 - rev = finalAttrs.version; 14 - hash = "sha256-pOt6uQaz69WuHKYZhq6FFbjyHGrEc+Bf0Sw9uCS3Nrc="; 15 - }; 12 + src = fetchFromGitHub { 13 + owner = "phingofficial"; 14 + repo = "phing"; 15 + rev = finalAttrs.version; 16 + hash = "sha256-pOt6uQaz69WuHKYZhq6FFbjyHGrEc+Bf0Sw9uCS3Nrc="; 17 + }; 16 18 17 - # TODO: Open a PR against https://github.com/phingofficial/phing 18 - # Their `composer.lock` is out of date therefore, we need to provide one 19 - composerLock = ./composer.lock; 20 - vendorHash = "sha256-ueTbbz3FGyRcRvlcJNirHdC77Tko4RKtYMFB3+4JdnQ="; 19 + # TODO: Open a PR against https://github.com/phingofficial/phing 20 + # Their `composer.lock` is out of date therefore, we need to provide one 21 + composerLock = ./composer.lock; 22 + vendorHash = "sha256-ueTbbz3FGyRcRvlcJNirHdC77Tko4RKtYMFB3+4JdnQ="; 21 23 22 - meta = { 23 - description = "PHing Is Not GNU make; it's a PHP project build system or build tool based on Apache Ant"; 24 - homepage = "https://github.com/phingofficial/phing"; 25 - license = lib.licenses.lgpl3; 26 - mainProgram = "phing"; 27 - maintainers = lib.teams.php.members; 28 - }; 29 - }) 24 + meta = { 25 + description = "PHing Is Not GNU make; it's a PHP project build system or build tool based on Apache Ant"; 26 + homepage = "https://github.com/phingofficial/phing"; 27 + license = lib.licenses.lgpl3; 28 + mainProgram = "phing"; 29 + maintainers = lib.teams.php.members; 30 + }; 31 + })
+4 -3
pkgs/development/php-packages/phive/default.nix
··· 1 - { lib 2 - , fetchFromGitHub 3 - , php 1 + { 2 + lib, 3 + fetchFromGitHub, 4 + php, 4 5 }: 5 6 6 7 php.buildComposerProject (finalAttrs: {
+4 -3
pkgs/development/php-packages/php-codesniffer/default.nix
··· 1 - { fetchFromGitHub 2 - , lib 3 - , php 1 + { 2 + fetchFromGitHub, 3 + lib, 4 + php, 4 5 }: 5 6 6 7 php.buildComposerProject (finalAttrs: {
+4 -3
pkgs/development/php-packages/php-cs-fixer/default.nix
··· 1 - { lib 2 - , fetchFromGitHub 3 - , php 1 + { 2 + lib, 3 + fetchFromGitHub, 4 + php, 4 5 }: 5 6 6 7 php.buildComposerProject (finalAttrs: {
+4 -3
pkgs/development/php-packages/php-parallel-lint/default.nix
··· 1 - { fetchFromGitHub 2 - , lib 3 - , php 1 + { 2 + fetchFromGitHub, 3 + lib, 4 + php, 4 5 }: 5 6 6 7 php.buildComposerProject (finalAttrs: {
+4 -3
pkgs/development/php-packages/phpinsights/default.nix
··· 1 - { lib 2 - , fetchFromGitHub 3 - , php 1 + { 2 + lib, 3 + fetchFromGitHub, 4 + php, 4 5 }: 5 6 6 7 php.buildComposerProject (finalAttrs: {
+4 -3
pkgs/development/php-packages/phpmd/default.nix
··· 1 - { lib 2 - , fetchFromGitHub 3 - , php 1 + { 2 + lib, 3 + fetchFromGitHub, 4 + php, 4 5 }: 5 6 6 7 php.buildComposerProject (finalAttrs: {
+7 -6
pkgs/development/php-packages/phpspy/default.nix
··· 1 - { lib 2 - , stdenv 3 - , fetchFromGitHub 4 - , php 5 - , testers 6 - , phpPackages 1 + { 2 + lib, 3 + stdenv, 4 + fetchFromGitHub, 5 + php, 6 + testers, 7 + phpPackages, 7 8 }: 8 9 9 10 stdenv.mkDerivation (finalAttrs: {
+5 -1
pkgs/development/php-packages/phpstan/default.nix
··· 1 - { fetchFromGitHub, lib, php }: 1 + { 2 + fetchFromGitHub, 3 + lib, 4 + php, 5 + }: 2 6 3 7 php.buildComposerProject (finalAttrs: { 4 8 pname = "phpstan";
+6 -2
pkgs/development/php-packages/pinba/default.nix
··· 1 - { buildPecl, lib, fetchFromGitHub }: 1 + { 2 + buildPecl, 3 + lib, 4 + fetchFromGitHub, 5 + }: 2 6 3 7 buildPecl rec { 4 8 pname = "pinba"; ··· 7 11 src = fetchFromGitHub { 8 12 owner = "tony2001"; 9 13 repo = "pinba_extension"; 10 - rev = "RELEASE_${lib.replaceStrings ["."] ["_"] version}"; 14 + rev = "RELEASE_${lib.replaceStrings [ "." ] [ "_" ] version}"; 11 15 sha256 = "0wqcqq6sb51wiawa37hbd1h9dbvmyyndzdvz87xqji7lpr9vn8jy"; 12 16 }; 13 17
+5 -1
pkgs/development/php-packages/protobuf/default.nix
··· 1 - { buildPecl, lib, pcre2 }: 1 + { 2 + buildPecl, 3 + lib, 4 + pcre2, 5 + }: 2 6 3 7 buildPecl { 4 8 pname = "protobuf";
+4 -3
pkgs/development/php-packages/psalm/default.nix
··· 1 - { lib 2 - , fetchFromGitHub 3 - , php 1 + { 2 + lib, 3 + fetchFromGitHub, 4 + php, 4 5 }: 5 6 6 7 php.buildComposerProject (finalAttrs: {
+5 -1
pkgs/development/php-packages/psysh/default.nix
··· 1 - { fetchFromGitHub, lib, php }: 1 + { 2 + fetchFromGitHub, 3 + lib, 4 + php, 5 + }: 2 6 3 7 php.buildComposerProject (finalAttrs: { 4 8 pname = "psysh";
+10 -2
pkgs/development/php-packages/rdkafka/default.nix
··· 1 - { buildPecl, lib, rdkafka, pcre2 }: 1 + { 2 + buildPecl, 3 + lib, 4 + rdkafka, 5 + pcre2, 6 + }: 2 7 3 8 buildPecl { 4 9 pname = "rdkafka"; ··· 6 11 version = "6.0.3"; 7 12 sha256 = "sha256-Euqrl21JaX4x8WOLR4ietexhrbdYcIlBESsVf47H3Ug="; 8 13 9 - buildInputs = [ rdkafka pcre2 ]; 14 + buildInputs = [ 15 + rdkafka 16 + pcre2 17 + ]; 10 18 11 19 postPhpize = '' 12 20 substituteInPlace configure \
+9 -5
pkgs/development/php-packages/redis/default.nix
··· 1 - { buildPecl, lib, php, fetchFromGitHub }: 1 + { 2 + buildPecl, 3 + lib, 4 + php, 5 + fetchFromGitHub, 6 + }: 2 7 3 8 let 4 9 version = "6.0.2"; 5 - in buildPecl { 10 + in 11 + buildPecl { 6 12 inherit version; 7 13 pname = "redis"; 8 14 ··· 13 19 hash = "sha256-Ie31zak6Rqxm2+jGXWg6KN4czHe9e+190jZRQ5VoB+M="; 14 20 }; 15 21 16 - internalDeps = with php.extensions; [ 17 - session 18 - ]; 22 + internalDeps = with php.extensions; [ session ]; 19 23 20 24 meta = with lib; { 21 25 changelog = "https://github.com/phpredis/phpredis/releases/tag/${version}";
+93 -62
pkgs/development/php-packages/relay/default.nix
··· 1 - { stdenv 2 - , lib 3 - , fetchurl 4 - , php 5 - , openssl 6 - , hiredis 7 - , zstd 8 - , lz4 9 - , autoPatchelfHook 10 - , writeShellScript 11 - , curl 12 - , common-updater-scripts 1 + { 2 + stdenv, 3 + lib, 4 + fetchurl, 5 + php, 6 + openssl, 7 + hiredis, 8 + zstd, 9 + lz4, 10 + autoPatchelfHook, 11 + writeShellScript, 12 + curl, 13 + common-updater-scripts, 13 14 }: 14 15 15 16 let ··· 53 54 }; 54 55 }; 55 56 56 - makeSource = { system, phpMajor }: fetchurl { 57 - url = "https://builds.r2.relay.so/v${version}/relay-v${version}-php" 58 - + phpMajor + "-" + hashes.${system}.platform + ".tar.gz"; 59 - sha256 = hashes.${system}.hash.${phpMajor} or (throw "Unsupported PHP version for relay ${phpMajor} on ${system}"); 60 - }; 57 + makeSource = 58 + { system, phpMajor }: 59 + fetchurl { 60 + url = 61 + "https://builds.r2.relay.so/v${version}/relay-v${version}-php" 62 + + phpMajor 63 + + "-" 64 + + hashes.${system}.platform 65 + + ".tar.gz"; 66 + sha256 = 67 + hashes.${system}.hash.${phpMajor} 68 + or (throw "Unsupported PHP version for relay ${phpMajor} on ${system}"); 69 + }; 61 70 in 62 71 stdenv.mkDerivation (finalAttrs: { 63 72 inherit version; ··· 68 77 system = stdenv.hostPlatform.system; 69 78 phpMajor = lib.versions.majorMinor php.version; 70 79 }; 71 - nativeBuildInputs = lib.optionals (!stdenv.isDarwin) [ 72 - autoPatchelfHook 73 - ]; 80 + nativeBuildInputs = lib.optionals (!stdenv.isDarwin) [ autoPatchelfHook ]; 74 81 buildInputs = lib.optionals (!stdenv.isDarwin) [ 75 82 openssl 76 83 zstd 77 84 lz4 78 85 ]; 79 - installPhase = '' 80 - runHook preInstall 86 + installPhase = 87 + '' 88 + runHook preInstall 81 89 82 - mkdir -p $out/lib/php/extensions 83 - cp relay-pkg.so $out/lib/php/extensions/relay.so 84 - chmod +w $out/lib/php/extensions/relay.so 85 - '' + (if stdenv.isDarwin then 86 - let 87 - args = lib.strings.concatMapStrings 88 - (v: " -change ${v.name}" + " ${lib.strings.makeLibraryPath [ v.value ]}/${builtins.baseNameOf v.name}") 89 - (with lib.attrsets; [ 90 - (nameValuePair "/opt/homebrew/opt/hiredis/lib/libhiredis.1.1.0.dylib" hiredis) 91 - (nameValuePair "/opt/homebrew/opt/hiredis/lib/libhiredis_ssl.dylib.1.1.0" hiredis) 92 - (nameValuePair "/opt/homebrew/opt/openssl@3/lib/libssl.3.dylib" openssl) 93 - (nameValuePair "/opt/homebrew/opt/openssl@3/lib/libcrypto.3.dylib" openssl) 94 - (nameValuePair "/opt/homebrew/opt/zstd/lib/libzstd.1.dylib" zstd) 95 - (nameValuePair "/opt/homebrew/opt/lz4/lib/liblz4.1.dylib" lz4) 96 - ]); 97 - in 98 - # fixDarwinDylibNames can't be used here because we need to completely remap .dylibs, not just add absolute paths 90 + mkdir -p $out/lib/php/extensions 91 + cp relay-pkg.so $out/lib/php/extensions/relay.so 92 + chmod +w $out/lib/php/extensions/relay.so 99 93 '' 100 - install_name_tool${args} $out/lib/php/extensions/relay.so 101 - '' 102 - else 103 - "") + '' 104 - # Random UUID that's required by the extension. Can be anything, but must be different from default. 105 - sed -i "s/00000000-0000-0000-0000-000000000000/aced680f-30e9-40cc-a868-390ead14ba0c/" $out/lib/php/extensions/relay.so 106 - chmod -w $out/lib/php/extensions/relay.so 94 + + ( 95 + if stdenv.isDarwin then 96 + let 97 + args = 98 + lib.strings.concatMapStrings 99 + ( 100 + v: 101 + " -change ${v.name}" + " ${lib.strings.makeLibraryPath [ v.value ]}/${builtins.baseNameOf v.name}" 102 + ) 103 + ( 104 + with lib.attrsets; 105 + [ 106 + (nameValuePair "/opt/homebrew/opt/hiredis/lib/libhiredis.1.1.0.dylib" hiredis) 107 + (nameValuePair "/opt/homebrew/opt/hiredis/lib/libhiredis_ssl.dylib.1.1.0" hiredis) 108 + (nameValuePair "/opt/homebrew/opt/openssl@3/lib/libssl.3.dylib" openssl) 109 + (nameValuePair "/opt/homebrew/opt/openssl@3/lib/libcrypto.3.dylib" openssl) 110 + (nameValuePair "/opt/homebrew/opt/zstd/lib/libzstd.1.dylib" zstd) 111 + (nameValuePair "/opt/homebrew/opt/lz4/lib/liblz4.1.dylib" lz4) 112 + ] 113 + ); 114 + in 115 + # fixDarwinDylibNames can't be used here because we need to completely remap .dylibs, not just add absolute paths 116 + '' 117 + install_name_tool${args} $out/lib/php/extensions/relay.so 118 + '' 119 + else 120 + "" 121 + ) 122 + + '' 123 + # Random UUID that's required by the extension. Can be anything, but must be different from default. 124 + sed -i "s/00000000-0000-0000-0000-000000000000/aced680f-30e9-40cc-a868-390ead14ba0c/" $out/lib/php/extensions/relay.so 125 + chmod -w $out/lib/php/extensions/relay.so 107 126 108 - runHook postInstall 109 - ''; 127 + runHook postInstall 128 + ''; 110 129 111 130 passthru = { 112 131 updateScript = writeShellScript "update-${finalAttrs.pname}" '' 113 132 set -o errexit 114 - export PATH="$PATH:${lib.makeBinPath [ curl common-updater-scripts ]}" 133 + export PATH="$PATH:${ 134 + lib.makeBinPath [ 135 + curl 136 + common-updater-scripts 137 + ] 138 + }" 115 139 NEW_VERSION=$(curl --silent https://builds.r2.relay.so/meta/builds | tail -n1 | cut -c2-) 116 140 117 141 if [[ "${version}" = "$NEW_VERSION" ]]; then ··· 129 153 updateables = 130 154 builtins.listToAttrs 131 155 # Collect all leaf attributes (containing hashes). 132 - (lib.collect 133 - (attrs: attrs ? name) 134 - # create an attr containing 135 - (lib.mapAttrsRecursive 156 + ( 157 + lib.collect (attrs: attrs ? name) 158 + # create an attr containing 136 159 ( 137 - path: _value: 138 - lib.nameValuePair 139 - (builtins.replaceStrings [ "." ] [ "_" ] (lib.concatStringsSep "_" path)) 140 - (finalAttrs.finalPackage.overrideAttrs (attrs: { 160 + lib.mapAttrsRecursive ( 161 + path: _value: 162 + lib.nameValuePair (builtins.replaceStrings [ "." ] [ "_" ] (lib.concatStringsSep "_" path)) ( 163 + finalAttrs.finalPackage.overrideAttrs (attrs: { 141 164 src = makeSource { 142 165 system = builtins.head path; 143 166 phpMajor = builtins.head (builtins.tail (builtins.tail path)); 144 167 }; 145 - })) 168 + }) 169 + ) 170 + ) (lib.filterAttrsRecursive (name: _value: name != "platform") hashes) 146 171 ) 147 - (lib.filterAttrsRecursive (name: _value: name != "platform") hashes) 148 - ) 149 172 ); 150 173 }; 151 174 ··· 155 178 homepage = "https://relay.so/"; 156 179 sourceProvenance = [ sourceTypes.binaryNativeCode ]; 157 180 license = licenses.unfree; 158 - maintainers = with maintainers; [ tillkruss ostrolucky ]; 159 - platforms = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ]; 181 + maintainers = with maintainers; [ 182 + tillkruss 183 + ostrolucky 184 + ]; 185 + platforms = [ 186 + "x86_64-linux" 187 + "aarch64-linux" 188 + "x86_64-darwin" 189 + "aarch64-darwin" 190 + ]; 160 191 }; 161 192 })
+10 -2
pkgs/development/php-packages/rrd/default.nix
··· 1 - { buildPecl, lib, pkg-config, rrdtool }: 1 + { 2 + buildPecl, 3 + lib, 4 + pkg-config, 5 + rrdtool, 6 + }: 2 7 3 8 buildPecl { 4 9 pname = "rrd"; ··· 6 11 version = "2.0.3"; 7 12 hash = "sha256-pCFh5YzcioU7cs/ymJidy96CsPdkVt1ZzgKFTJK3MPc="; 8 13 9 - nativeBuildInputs = [ pkg-config rrdtool ]; 14 + nativeBuildInputs = [ 15 + pkg-config 16 + rrdtool 17 + ]; 10 18 11 19 meta = { 12 20 description = "PHP bindings to RRD tool system";
+6 -1
pkgs/development/php-packages/smbclient/default.nix
··· 1 - { buildPecl, lib, samba, pkg-config }: 1 + { 2 + buildPecl, 3 + lib, 4 + samba, 5 + pkg-config, 6 + }: 2 7 buildPecl { 3 8 pname = "smbclient"; 4 9 version = "1.0.6";
+18 -21
pkgs/development/php-packages/snuffleupagus/default.nix
··· 1 - { stdenv 2 - , buildPecl 3 - , lib 4 - , libiconv 5 - , php 6 - , fetchFromGitHub 7 - , pcre2 8 - , darwin 1 + { 2 + stdenv, 3 + buildPecl, 4 + lib, 5 + libiconv, 6 + php, 7 + fetchFromGitHub, 8 + pcre2, 9 + darwin, 9 10 }: 10 11 11 12 buildPecl rec { ··· 19 20 hash = "sha256-NwG8gBaToBaJGrZoCD7bDym7hQidWU0ArckoQCHN81o="; 20 21 }; 21 22 22 - buildInputs = [ 23 - pcre2 24 - ] ++ lib.optionals stdenv.isDarwin [ 25 - darwin.apple_sdk_11_0.frameworks.CoreFoundation 26 - darwin.apple_sdk_11_0.Libsystem 27 - libiconv 28 - ]; 23 + buildInputs = 24 + [ pcre2 ] 25 + ++ lib.optionals stdenv.isDarwin [ 26 + darwin.apple_sdk_11_0.frameworks.CoreFoundation 27 + darwin.apple_sdk_11_0.Libsystem 28 + libiconv 29 + ]; 29 30 30 - internalDeps = with php.extensions; [ 31 - session 32 - ]; 31 + internalDeps = with php.extensions; [ session ]; 33 32 34 33 sourceRoot = "${src.name}/src"; 35 34 36 - configureFlags = [ 37 - "--enable-snuffleupagus" 38 - ]; 35 + configureFlags = [ "--enable-snuffleupagus" ]; 39 36 40 37 postPhpize = '' 41 38 ./configure --enable-snuffleupagus
+9 -5
pkgs/development/php-packages/spx/default.nix
··· 1 - { buildPecl, lib, fetchFromGitHub, zlib }: 1 + { 2 + buildPecl, 3 + lib, 4 + fetchFromGitHub, 5 + zlib, 6 + }: 2 7 3 8 let 4 9 version = "0.4.15"; 5 - in buildPecl { 10 + in 11 + buildPecl { 6 12 inherit version; 7 13 pname = "spx"; 8 14 ··· 13 19 hash = "sha256-gw6wbPt1Qy0vNfT0flq7bxpnGU3SgJvPVhk8H0Imvx4="; 14 20 }; 15 21 16 - configureFlags = [ 17 - "--with-zlib-dir=${zlib.dev}" 18 - ]; 22 + configureFlags = [ "--with-zlib-dir=${zlib.dev}" ]; 19 23 20 24 preConfigure = '' 21 25 substituteInPlace Makefile.frag \
+8 -4
pkgs/development/php-packages/sqlsrv/default.nix
··· 1 - { stdenv, buildPecl, lib, unixODBC, libiconv }: 1 + { 2 + stdenv, 3 + buildPecl, 4 + lib, 5 + unixODBC, 6 + libiconv, 7 + }: 2 8 3 9 buildPecl { 4 10 pname = "sqlsrv"; ··· 6 12 version = "5.10.1"; 7 13 sha256 = "sha256-XNrttNiihjQ+azuZmS2fy0So+2ndAqpde8IOsupeWdI="; 8 14 9 - buildInputs = [ 10 - unixODBC 11 - ] ++ lib.optionals stdenv.isDarwin [ libiconv ]; 15 + buildInputs = [ unixODBC ] ++ lib.optionals stdenv.isDarwin [ libiconv ]; 12 16 13 17 meta = with lib; { 14 18 description = "Microsoft Drivers for PHP for SQL Server";
+5 -1
pkgs/development/php-packages/ssh2/default.nix
··· 1 - { buildPecl, lib, libssh2 }: 1 + { 2 + buildPecl, 3 + lib, 4 + libssh2, 5 + }: 2 6 3 7 buildPecl rec { 4 8 version = "1.3.1";
+11 -9
pkgs/development/php-packages/swoole/default.nix
··· 1 - { lib 2 - , stdenv 3 - , buildPecl 4 - , php 5 - , valgrind 6 - , pcre2 7 - , fetchFromGitHub 8 - }: 1 + { 2 + lib, 3 + stdenv, 4 + buildPecl, 5 + php, 6 + valgrind, 7 + pcre2, 8 + fetchFromGitHub, 9 + }: 9 10 10 11 let 11 12 version = "5.1.2"; 12 - in buildPecl { 13 + in 14 + buildPecl { 13 15 inherit version; 14 16 pname = "swoole"; 15 17
+6 -1
pkgs/development/php-packages/uv/default.nix
··· 1 - { buildPecl, lib, fetchFromGitHub, libuv }: 1 + { 2 + buildPecl, 3 + lib, 4 + fetchFromGitHub, 5 + libuv, 6 + }: 2 7 3 8 buildPecl rec { 4 9 pname = "uv";
+7 -5
pkgs/development/php-packages/vld/default.nix
··· 1 - { lib 2 - , buildPecl 3 - , fetchFromGitHub 1 + { 2 + lib, 3 + buildPecl, 4 + fetchFromGitHub, 4 5 }: 5 6 6 7 let 7 8 version = "0.18.0"; 8 - in buildPecl { 9 + in 10 + buildPecl { 9 11 inherit version; 10 12 11 13 pname = "vld"; ··· 20 22 # Tests relies on PHP 7.0 21 23 doCheck = false; 22 24 23 - meta = { 25 + meta = { 24 26 changelog = "https://github.com/derickr/vld/releases/tag/${version}"; 25 27 description = "The Vulcan Logic Dumper hooks into the Zend Engine and dumps all the opcodes (execution units) of a script."; 26 28 homepage = "https://github.com/derickr/vld";
+7 -2
pkgs/development/php-packages/xdebug/default.nix
··· 1 - { buildPecl, lib, fetchFromGitHub }: 1 + { 2 + buildPecl, 3 + lib, 4 + fetchFromGitHub, 5 + }: 2 6 3 7 let 4 8 version = "3.3.2"; 5 - in buildPecl { 9 + in 10 + buildPecl { 6 11 inherit version; 7 12 8 13 pname = "xdebug";
+10 -2
pkgs/development/php-packages/yaml/default.nix
··· 1 - { buildPecl, lib, pkg-config, libyaml }: 1 + { 2 + buildPecl, 3 + lib, 4 + pkg-config, 5 + libyaml, 6 + }: 2 7 3 8 buildPecl { 4 9 pname = "yaml"; ··· 8 13 9 14 configureFlags = [ "--with-yaml=${libyaml.dev}" ]; 10 15 11 - nativeBuildInputs = [ pkg-config libyaml ]; 16 + nativeBuildInputs = [ 17 + pkg-config 18 + libyaml 19 + ]; 12 20 13 21 meta = { 14 22 description = "YAML-1.1 parser and emitter";
+11 -8
pkgs/development/php-packages/zstd/default.nix
··· 1 - { buildPecl, lib, zstd, pkg-config, fetchFromGitHub }: 1 + { 2 + buildPecl, 3 + lib, 4 + zstd, 5 + pkg-config, 6 + fetchFromGitHub, 7 + }: 2 8 3 9 let 4 10 version = "0.13.3"; 5 - in buildPecl { 11 + in 12 + buildPecl { 6 13 inherit version; 7 14 pname = "zstd"; 8 15 ··· 13 20 hash = "sha256-jEuL93ScF0/FlfUvib6uZafOkIe0+VkWV/frpSjTkvY="; 14 21 }; 15 22 16 - nativeBuildInputs = [ 17 - pkg-config 18 - ]; 23 + nativeBuildInputs = [ pkg-config ]; 19 24 20 25 buildInputs = [ zstd ]; 21 26 22 - configureFlags = [ 23 - "--with-libzstd" 24 - ]; 27 + configureFlags = [ "--with-libzstd" ]; 25 28 26 29 meta = with lib; { 27 30 description = "Zstd Extension for PHP";