tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
Merge #148163: uwsgi: fix with php 8, bump to 2.0.20
Vladimír Čunát
4 years ago
8de62ec1
b240efee
+55
-2
2 changed files
expand all
collapse all
unified
split
pkgs
servers
uwsgi
default.nix
missing-arginfo-php8.patch
+6
-2
pkgs/servers/uwsgi/default.nix
···
59
59
60
60
stdenv.mkDerivation rec {
61
61
pname = "uwsgi";
62
62
-
version = "2.0.19.1";
62
62
+
version = "2.0.20";
63
63
64
64
src = fetchurl {
65
65
url = "https://projects.unbit.it/downloads/${pname}-${version}.tar.gz";
66
66
-
sha256 = "0256v72b7zr6ds4srpaawk1px3bp0djdwm239w3wrxpw7dzk1gjn";
66
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
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
100
+
${lib.optionalString (lib.versionAtLeast php.version "8") ''
101
101
+
sed -e "s/ + php_version//" -i plugins/php/uwsgiplugin.py
102
102
+
''}
99
103
'';
100
104
101
105
configurePhase = ''
+49
pkgs/servers/uwsgi/missing-arginfo-php8.patch
···
1
1
+
diff --git a/plugins/php/php_plugin.c b/plugins/php/php_plugin.c
2
2
+
index ca0ef6c1..00c39b09 100644
3
3
+
--- a/plugins/php/php_plugin.c
4
4
+
+++ b/plugins/php/php_plugin.c
5
5
+
@@ -257,6 +257,9 @@ PHP_MINIT_FUNCTION(uwsgi_php_minit) {
6
6
+
return SUCCESS;
7
7
+
}
8
8
+
9
9
+
+ZEND_BEGIN_ARG_INFO_EX(arginfo_void, 0, 0, 0)
10
10
+
+ZEND_END_ARG_INFO()
11
11
+
+
12
12
+
PHP_FUNCTION(uwsgi_version) {
13
13
+
RETURN_STRING(UWSGI_VERSION);
14
14
+
}
15
15
+
@@ -488,20 +491,20 @@ PHP_FUNCTION(uwsgi_signal) {
16
16
+
}
17
17
+
18
18
+
zend_function_entry uwsgi_php_functions[] = {
19
19
+
- PHP_FE(uwsgi_version, NULL)
20
20
+
- PHP_FE(uwsgi_setprocname, NULL)
21
21
+
- PHP_FE(uwsgi_worker_id, NULL)
22
22
+
- PHP_FE(uwsgi_masterpid, NULL)
23
23
+
- PHP_FE(uwsgi_signal, NULL)
24
24
+
-
25
25
+
- PHP_FE(uwsgi_rpc, NULL)
26
26
+
-
27
27
+
- PHP_FE(uwsgi_cache_get, NULL)
28
28
+
- PHP_FE(uwsgi_cache_set, NULL)
29
29
+
- PHP_FE(uwsgi_cache_update, NULL)
30
30
+
- PHP_FE(uwsgi_cache_del, NULL)
31
31
+
- PHP_FE(uwsgi_cache_clear, NULL)
32
32
+
- PHP_FE(uwsgi_cache_exists, NULL)
33
33
+
+ PHP_FE(uwsgi_version, arginfo_void)
34
34
+
+ PHP_FE(uwsgi_setprocname, arginfo_void)
35
35
+
+ PHP_FE(uwsgi_worker_id, arginfo_void)
36
36
+
+ PHP_FE(uwsgi_masterpid, arginfo_void)
37
37
+
+ PHP_FE(uwsgi_signal, arginfo_void)
38
38
+
+
39
39
+
+ PHP_FE(uwsgi_rpc, arginfo_void)
40
40
+
+
41
41
+
+ PHP_FE(uwsgi_cache_get, arginfo_void)
42
42
+
+ PHP_FE(uwsgi_cache_set, arginfo_void)
43
43
+
+ PHP_FE(uwsgi_cache_update, arginfo_void)
44
44
+
+ PHP_FE(uwsgi_cache_del, arginfo_void)
45
45
+
+ PHP_FE(uwsgi_cache_clear, arginfo_void)
46
46
+
+ PHP_FE(uwsgi_cache_exists, arginfo_void)
47
47
+
{ NULL, NULL, NULL},
48
48
+
};
49
49
+