diff options
author | Sandro | 2022-11-09 22:24:14 +0100 |
---|---|---|
committer | GitHub | 2022-11-09 22:24:14 +0100 |
commit | 471b34c39fb5e828b529a53f3a1a54284e18fc81 (patch) | |
tree | bbc20bfc6eb633b56f666d11a9db1ce8cada79d8 /pkgs | |
parent | 1a482feca5f9e9b28804774723868d6e70c2140c (diff) | |
parent | b8f23688058053b84e25728556712a5573df0811 (diff) |
Merge pull request #198465 from gdamjan/uwsgi-2.0.21
Diffstat (limited to 'pkgs')
-rw-r--r-- | pkgs/servers/uwsgi/default.nix | 21 | ||||
-rw-r--r-- | pkgs/servers/uwsgi/missing-arginfo-php8.patch | 49 |
2 files changed, 14 insertions, 56 deletions
diff --git a/pkgs/servers/uwsgi/default.nix b/pkgs/servers/uwsgi/default.nix index 2dc2c3230a82..95b89093a880 100644 --- a/pkgs/servers/uwsgi/default.nix +++ b/pkgs/servers/uwsgi/default.nix @@ -1,4 +1,4 @@ -{ stdenv, nixosTests, lib, fetchurl, pkg-config, jansson, pcre, libxcrypt +{ stdenv, nixosTests, lib, pkg-config, jansson, pcre, libxcrypt # plugins: list of strings, eg. [ "python2" "python3" ] , plugins ? [] , pam, withPAM ? stdenv.isLinux @@ -6,6 +6,7 @@ , libcap, withCap ? stdenv.isLinux , python2, python3, ncurses , ruby, php +, makeWrapper, fetchFromGitHub }: let php-embed = php.override { @@ -59,20 +60,21 @@ in stdenv.mkDerivation rec { pname = "uwsgi"; - version = "2.0.20"; + version = "2.0.21"; - src = fetchurl { - url = "https://projects.unbit.it/downloads/${pname}-${version}.tar.gz"; - sha256 = "1yfz5h07rxzrqf1rdj5fzhk47idgglxj7kqr8zl8lgcpv1kriaw8"; + src = fetchFromGitHub { + owner = "unbit"; + repo = "uwsgi"; + rev = version; + sha256 = "sha256-TUASYDyG+p1tlhmqi+ivaC7aW6UZBrPTFQUTYys5ICE="; }; patches = [ ./no-ext-session-php_session.h-on-NixOS.patch ./additional-php-ldflags.patch - ./missing-arginfo-php8.patch # https://github.com/unbit/uwsgi/issues/2356 ]; - nativeBuildInputs = [ python3 pkg-config ]; + nativeBuildInputs = [ python3 pkg-config makeWrapper ]; buildInputs = [ jansson pcre libxcrypt ] ++ lib.optional withPAM pam @@ -126,6 +128,11 @@ stdenv.mkDerivation rec { ${lib.concatMapStringsSep "\n" (x: x.install or "") needed} ''; + postFixup = lib.optionalString (builtins.any (x: x.name == "php") needed) + '' + wrapProgram $out/bin/uwsgi --set PHP_INI_SCAN_DIR ${php-embed}/lib + ''; + meta = with lib; { homepage = "https://uwsgi-docs.readthedocs.org/en/latest/"; description = "A fast, self-healing and developer/sysadmin-friendly application container server coded in pure C"; diff --git a/pkgs/servers/uwsgi/missing-arginfo-php8.patch b/pkgs/servers/uwsgi/missing-arginfo-php8.patch deleted file mode 100644 index 98a924e40279..000000000000 --- a/pkgs/servers/uwsgi/missing-arginfo-php8.patch +++ /dev/null @@ -1,49 +0,0 @@ -diff --git a/plugins/php/php_plugin.c b/plugins/php/php_plugin.c -index ca0ef6c1..00c39b09 100644 ---- a/plugins/php/php_plugin.c -+++ b/plugins/php/php_plugin.c -@@ -257,6 +257,9 @@ PHP_MINIT_FUNCTION(uwsgi_php_minit) { - return SUCCESS; - } - -+ZEND_BEGIN_ARG_INFO_EX(arginfo_void, 0, 0, 0) -+ZEND_END_ARG_INFO() -+ - PHP_FUNCTION(uwsgi_version) { - RETURN_STRING(UWSGI_VERSION); - } -@@ -488,20 +491,20 @@ PHP_FUNCTION(uwsgi_signal) { - } - - zend_function_entry uwsgi_php_functions[] = { -- PHP_FE(uwsgi_version, NULL) -- PHP_FE(uwsgi_setprocname, NULL) -- PHP_FE(uwsgi_worker_id, NULL) -- PHP_FE(uwsgi_masterpid, NULL) -- PHP_FE(uwsgi_signal, NULL) -- -- PHP_FE(uwsgi_rpc, NULL) -- -- PHP_FE(uwsgi_cache_get, NULL) -- PHP_FE(uwsgi_cache_set, NULL) -- PHP_FE(uwsgi_cache_update, NULL) -- PHP_FE(uwsgi_cache_del, NULL) -- PHP_FE(uwsgi_cache_clear, NULL) -- PHP_FE(uwsgi_cache_exists, NULL) -+ PHP_FE(uwsgi_version, arginfo_void) -+ PHP_FE(uwsgi_setprocname, arginfo_void) -+ PHP_FE(uwsgi_worker_id, arginfo_void) -+ PHP_FE(uwsgi_masterpid, arginfo_void) -+ PHP_FE(uwsgi_signal, arginfo_void) -+ -+ PHP_FE(uwsgi_rpc, arginfo_void) -+ -+ PHP_FE(uwsgi_cache_get, arginfo_void) -+ PHP_FE(uwsgi_cache_set, arginfo_void) -+ PHP_FE(uwsgi_cache_update, arginfo_void) -+ PHP_FE(uwsgi_cache_del, arginfo_void) -+ PHP_FE(uwsgi_cache_clear, arginfo_void) -+ PHP_FE(uwsgi_cache_exists, arginfo_void) - { NULL, NULL, NULL}, - }; - |