Merge #148163: uwsgi: fix with php 8, bump to 2.0.20

+55 -2
+6 -2
pkgs/servers/uwsgi/default.nix
··· 59 59 60 60 stdenv.mkDerivation rec { 61 61 pname = "uwsgi"; 62 - version = "2.0.19.1"; 62 + version = "2.0.20"; 63 63 64 64 src = fetchurl { 65 65 url = "https://projects.unbit.it/downloads/${pname}-${version}.tar.gz"; 66 - sha256 = "0256v72b7zr6ds4srpaawk1px3bp0djdwm239w3wrxpw7dzk1gjn"; 66 + sha256 = "1yfz5h07rxzrqf1rdj5fzhk47idgglxj7kqr8zl8lgcpv1kriaw8"; 67 67 }; 68 68 69 69 patches = [ 70 70 ./no-ext-session-php_session.h-on-NixOS.patch 71 71 ./additional-php-ldflags.patch 72 + ./missing-arginfo-php8.patch # https://github.com/unbit/uwsgi/issues/2356 72 73 ]; 73 74 74 75 nativeBuildInputs = [ python3 pkg-config ]; ··· 96 97 substituteInPlace "$f" \ 97 98 --replace pkg-config "$PKG_CONFIG" 98 99 done 100 + ${lib.optionalString (lib.versionAtLeast php.version "8") '' 101 + sed -e "s/ + php_version//" -i plugins/php/uwsgiplugin.py 102 + ''} 99 103 ''; 100 104 101 105 configurePhase = ''
+49
pkgs/servers/uwsgi/missing-arginfo-php8.patch
··· 1 + diff --git a/plugins/php/php_plugin.c b/plugins/php/php_plugin.c 2 + index ca0ef6c1..00c39b09 100644 3 + --- a/plugins/php/php_plugin.c 4 + +++ b/plugins/php/php_plugin.c 5 + @@ -257,6 +257,9 @@ PHP_MINIT_FUNCTION(uwsgi_php_minit) { 6 + return SUCCESS; 7 + } 8 + 9 + +ZEND_BEGIN_ARG_INFO_EX(arginfo_void, 0, 0, 0) 10 + +ZEND_END_ARG_INFO() 11 + + 12 + PHP_FUNCTION(uwsgi_version) { 13 + RETURN_STRING(UWSGI_VERSION); 14 + } 15 + @@ -488,20 +491,20 @@ PHP_FUNCTION(uwsgi_signal) { 16 + } 17 + 18 + zend_function_entry uwsgi_php_functions[] = { 19 + - PHP_FE(uwsgi_version, NULL) 20 + - PHP_FE(uwsgi_setprocname, NULL) 21 + - PHP_FE(uwsgi_worker_id, NULL) 22 + - PHP_FE(uwsgi_masterpid, NULL) 23 + - PHP_FE(uwsgi_signal, NULL) 24 + - 25 + - PHP_FE(uwsgi_rpc, NULL) 26 + - 27 + - PHP_FE(uwsgi_cache_get, NULL) 28 + - PHP_FE(uwsgi_cache_set, NULL) 29 + - PHP_FE(uwsgi_cache_update, NULL) 30 + - PHP_FE(uwsgi_cache_del, NULL) 31 + - PHP_FE(uwsgi_cache_clear, NULL) 32 + - PHP_FE(uwsgi_cache_exists, NULL) 33 + + PHP_FE(uwsgi_version, arginfo_void) 34 + + PHP_FE(uwsgi_setprocname, arginfo_void) 35 + + PHP_FE(uwsgi_worker_id, arginfo_void) 36 + + PHP_FE(uwsgi_masterpid, arginfo_void) 37 + + PHP_FE(uwsgi_signal, arginfo_void) 38 + + 39 + + PHP_FE(uwsgi_rpc, arginfo_void) 40 + + 41 + + PHP_FE(uwsgi_cache_get, arginfo_void) 42 + + PHP_FE(uwsgi_cache_set, arginfo_void) 43 + + PHP_FE(uwsgi_cache_update, arginfo_void) 44 + + PHP_FE(uwsgi_cache_del, arginfo_void) 45 + + PHP_FE(uwsgi_cache_clear, arginfo_void) 46 + + PHP_FE(uwsgi_cache_exists, arginfo_void) 47 + { NULL, NULL, NULL}, 48 + }; 49 +