tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
0
fork
atom
lol
0
fork
atom
overview
issues
pulls
pipelines
php: Use callPackages
Eelco Dolstra
10 years ago
64b3974d
e7504ebf
+313
-324
7 changed files
expand all
collapse all
unified
split
pkgs
development
interpreters
php
5.4.nix
5.5.nix
5.6.nix
7.0.nix
default.nix
generic.nix
top-level
all-packages.nix
-6
pkgs/development/interpreters/php/5.4.nix
reviewed
···
1
1
-
{ callPackage, apacheHttpd }:
2
2
-
callPackage ./generic.nix {
3
3
-
phpVersion = "5.4.44";
4
4
-
sha = "0vc5lf0yjk1fs7inri76mh0lrcmq32ji4m6yqdmg7314x5f9xmcd";
5
5
-
apacheHttpd = apacheHttpd;
6
6
-
}
-6
pkgs/development/interpreters/php/5.5.nix
reviewed
···
1
1
-
{ callPackage, apacheHttpd }:
2
2
-
callPackage ./generic.nix {
3
3
-
phpVersion = "5.5.28";
4
4
-
sha = "1wy2v5rmbiia3v6fc8nwg1y3sdkdmicksxnkadz1f3035rbjqz8r";
5
5
-
apacheHttpd = apacheHttpd;
6
6
-
}
-6
pkgs/development/interpreters/php/5.6.nix
reviewed
···
1
1
-
{ callPackage, apacheHttpd }:
2
2
-
callPackage ./generic.nix {
3
3
-
phpVersion = "5.6.12";
4
4
-
sha = "0fl5r0lzav7icg97p7gkvbxk0xk2mh7i1r45dycjlyxgf91109vg";
5
5
-
apacheHttpd = apacheHttpd;
6
6
-
}
-8
pkgs/development/interpreters/php/7.0.nix
reviewed
···
1
1
-
{ callPackage, apacheHttpd }:
2
2
-
callPackage ./generic.nix {
3
3
-
phpVersion = "7.0.0beta1";
4
4
-
url = "https://downloads.php.net/~ab/php-7.0.0beta1.tar.bz2";
5
5
-
sha = "1pj3ysfhswg2r370ivp33fv9zbcl3yvhmxgnc731k08hv6hmd984";
6
6
-
apacheHttpd = apacheHttpd;
7
7
-
php7 = true;
8
8
-
}
+308
pkgs/development/interpreters/php/default.nix
reviewed
···
1
1
+
{ lib, stdenv, fetchurl, composableDerivation, autoconf, automake, flex, bison
2
2
+
, mysql, libxml2, readline, zlib, curl, postgresql, gettext
3
3
+
, openssl, pkgconfig, sqlite, config, libjpeg, libpng, freetype
4
4
+
, libxslt, libmcrypt, bzip2, icu, openldap, cyrus_sasl, libmhash, freetds
5
5
+
, uwimap, pam, gmp, apacheHttpd }:
6
6
+
7
7
+
let
8
8
+
9
9
+
generic =
10
10
+
{ version, sha256, url ? "http://www.php.net/distributions/php-${version}.tar.bz2" }:
11
11
+
12
12
+
let php7 = lib.versionAtLeast version "7.0"; in
13
13
+
14
14
+
composableDerivation.composableDerivation {} (fixed: {
15
15
+
16
16
+
inherit version;
17
17
+
18
18
+
name = "php-${version}";
19
19
+
20
20
+
enableParallelBuilding = true;
21
21
+
22
22
+
buildInputs = [ flex bison pkgconfig ];
23
23
+
24
24
+
flags = {
25
25
+
26
26
+
# much left to do here...
27
27
+
28
28
+
# SAPI modules:
29
29
+
30
30
+
apxs2 = {
31
31
+
configureFlags = ["--with-apxs2=${apacheHttpd}/bin/apxs"];
32
32
+
buildInputs = [apacheHttpd];
33
33
+
};
34
34
+
35
35
+
# Extensions
36
36
+
imap = {
37
37
+
configureFlags = [
38
38
+
"--with-imap=${uwimap}"
39
39
+
"--with-imap-ssl"
40
40
+
];
41
41
+
buildInputs = [ uwimap openssl pam ];
42
42
+
};
43
43
+
44
44
+
ldap = {
45
45
+
configureFlags = ["--with-ldap=${openldap}"];
46
46
+
buildInputs = [openldap cyrus_sasl openssl];
47
47
+
};
48
48
+
49
49
+
mhash = {
50
50
+
configureFlags = ["--with-mhash"];
51
51
+
buildInputs = [libmhash];
52
52
+
};
53
53
+
54
54
+
curl = {
55
55
+
configureFlags = ["--with-curl=${curl}"];
56
56
+
buildInputs = [curl openssl];
57
57
+
};
58
58
+
59
59
+
curlWrappers = {
60
60
+
configureFlags = ["--with-curlwrappers"];
61
61
+
};
62
62
+
63
63
+
zlib = {
64
64
+
configureFlags = ["--with-zlib=${zlib}"];
65
65
+
buildInputs = [zlib];
66
66
+
};
67
67
+
68
68
+
libxml2 = {
69
69
+
configureFlags = [
70
70
+
"--with-libxml-dir=${libxml2}"
71
71
+
];
72
72
+
buildInputs = [ libxml2 ];
73
73
+
};
74
74
+
75
75
+
pcntl = {
76
76
+
configureFlags = [ "--enable-pcntl" ];
77
77
+
};
78
78
+
79
79
+
readline = {
80
80
+
configureFlags = ["--with-readline=${readline}"];
81
81
+
buildInputs = [ readline ];
82
82
+
};
83
83
+
84
84
+
sqlite = {
85
85
+
configureFlags = ["--with-pdo-sqlite=${sqlite}"];
86
86
+
buildInputs = [ sqlite ];
87
87
+
};
88
88
+
89
89
+
postgresql = {
90
90
+
configureFlags = ["--with-pgsql=${postgresql}"];
91
91
+
buildInputs = [ postgresql ];
92
92
+
};
93
93
+
94
94
+
pdo_pgsql = {
95
95
+
configureFlags = ["--with-pdo-pgsql=${postgresql}"];
96
96
+
buildInputs = [ postgresql ];
97
97
+
};
98
98
+
99
99
+
mysql = {
100
100
+
configureFlags = ["--with-mysql=${mysql.lib}"];
101
101
+
buildInputs = [ mysql.lib ];
102
102
+
};
103
103
+
104
104
+
mysqli = {
105
105
+
configureFlags = ["--with-mysqli=${mysql.lib}/bin/mysql_config"];
106
106
+
buildInputs = [ mysql.lib ];
107
107
+
};
108
108
+
109
109
+
mysqli_embedded = {
110
110
+
configureFlags = ["--enable-embedded-mysqli"];
111
111
+
depends = "mysqli";
112
112
+
assertion = fixed.mysqliSupport;
113
113
+
};
114
114
+
115
115
+
pdo_mysql = {
116
116
+
configureFlags = ["--with-pdo-mysql=${mysql.lib}"];
117
117
+
buildInputs = [ mysql.lib ];
118
118
+
};
119
119
+
120
120
+
bcmath = {
121
121
+
configureFlags = ["--enable-bcmath"];
122
122
+
};
123
123
+
124
124
+
gd = {
125
125
+
# FIXME: Our own gd package doesn't work, see https://bugs.php.net/bug.php?id=60108.
126
126
+
configureFlags = [
127
127
+
"--with-gd"
128
128
+
"--with-freetype-dir=${freetype}"
129
129
+
"--with-png-dir=${libpng}"
130
130
+
"--with-jpeg-dir=${libjpeg}"
131
131
+
];
132
132
+
buildInputs = [ libpng libjpeg freetype ];
133
133
+
};
134
134
+
135
135
+
gmp = {
136
136
+
configureFlags = ["--with-gmp=${gmp}"];
137
137
+
buildInputs = [ gmp ];
138
138
+
};
139
139
+
140
140
+
soap = {
141
141
+
configureFlags = ["--enable-soap"];
142
142
+
};
143
143
+
144
144
+
sockets = {
145
145
+
configureFlags = ["--enable-sockets"];
146
146
+
};
147
147
+
148
148
+
openssl = {
149
149
+
configureFlags = ["--with-openssl=${openssl}"];
150
150
+
buildInputs = [openssl];
151
151
+
};
152
152
+
153
153
+
mbstring = {
154
154
+
configureFlags = ["--enable-mbstring"];
155
155
+
};
156
156
+
157
157
+
gettext = {
158
158
+
configureFlags = ["--with-gettext=${gettext}"];
159
159
+
buildInputs = [gettext];
160
160
+
};
161
161
+
162
162
+
intl = {
163
163
+
configureFlags = ["--enable-intl"];
164
164
+
buildInputs = [icu];
165
165
+
};
166
166
+
167
167
+
exif = {
168
168
+
configureFlags = ["--enable-exif"];
169
169
+
};
170
170
+
171
171
+
xsl = {
172
172
+
configureFlags = ["--with-xsl=${libxslt}"];
173
173
+
buildInputs = [libxslt];
174
174
+
};
175
175
+
176
176
+
mcrypt = let libmcrypt' = libmcrypt.override { disablePosixThreads = true; }; in {
177
177
+
configureFlags = ["--with-mcrypt=${libmcrypt'}"];
178
178
+
buildInputs = [libmcrypt'];
179
179
+
};
180
180
+
181
181
+
bz2 = {
182
182
+
configureFlags = ["--with-bz2=${bzip2}"];
183
183
+
buildInputs = [bzip2];
184
184
+
};
185
185
+
186
186
+
zip = {
187
187
+
configureFlags = ["--enable-zip"];
188
188
+
};
189
189
+
190
190
+
ftp = {
191
191
+
configureFlags = ["--enable-ftp"];
192
192
+
};
193
193
+
194
194
+
fpm = {
195
195
+
configureFlags = ["--enable-fpm"];
196
196
+
};
197
197
+
198
198
+
mssql = stdenv.lib.optionalAttrs (!stdenv.isDarwin) {
199
199
+
configureFlags = ["--with-mssql=${freetds}"];
200
200
+
buildInputs = [freetds];
201
201
+
};
202
202
+
203
203
+
zts = {
204
204
+
configureFlags = ["--enable-maintainer-zts"];
205
205
+
};
206
206
+
207
207
+
calendar = {
208
208
+
configureFlags = ["--enable-calendar"];
209
209
+
};
210
210
+
};
211
211
+
212
212
+
cfg = {
213
213
+
imapSupport = config.php.imap or true;
214
214
+
ldapSupport = config.php.ldap or true;
215
215
+
mhashSupport = config.php.mhash or true;
216
216
+
mysqlSupport = (!php7) && (config.php.mysql or true);
217
217
+
mysqliSupport = config.php.mysqli or true;
218
218
+
pdo_mysqlSupport = config.php.pdo_mysql or true;
219
219
+
libxml2Support = config.php.libxml2 or true;
220
220
+
apxs2Support = config.php.apxs2 or true;
221
221
+
bcmathSupport = config.php.bcmath or true;
222
222
+
socketsSupport = config.php.sockets or true;
223
223
+
curlSupport = config.php.curl or true;
224
224
+
curlWrappersSupport = (!php7) && (config.php.curlWrappers or true);
225
225
+
gettextSupport = config.php.gettext or true;
226
226
+
pcntlSupport = config.php.pcntl or true;
227
227
+
postgresqlSupport = config.php.postgresql or true;
228
228
+
pdo_pgsqlSupport = config.php.pdo_pgsql or true;
229
229
+
readlineSupport = config.php.readline or true;
230
230
+
sqliteSupport = config.php.sqlite or true;
231
231
+
soapSupport = config.php.soap or true;
232
232
+
zlibSupport = config.php.zlib or true;
233
233
+
opensslSupport = config.php.openssl or true;
234
234
+
mbstringSupport = config.php.mbstring or true;
235
235
+
gdSupport = config.php.gd or true;
236
236
+
intlSupport = config.php.intl or true;
237
237
+
exifSupport = config.php.exif or true;
238
238
+
xslSupport = config.php.xsl or false;
239
239
+
mcryptSupport = config.php.mcrypt or true;
240
240
+
bz2Support = config.php.bz2 or false;
241
241
+
zipSupport = config.php.zip or true;
242
242
+
ftpSupport = config.php.ftp or true;
243
243
+
fpmSupport = config.php.fpm or true;
244
244
+
gmpSupport = config.php.gmp or true;
245
245
+
mssqlSupport = (!php7) && (config.php.mssql or (!stdenv.isDarwin));
246
246
+
ztsSupport = config.php.zts or false;
247
247
+
calendarSupport = config.php.calendar or true;
248
248
+
};
249
249
+
250
250
+
configurePhase = ''
251
251
+
# Don't record the configure flags since this causes unnecessary
252
252
+
# runtime dependencies.
253
253
+
for i in main/build-defs.h.in scripts/php-config.in; do
254
254
+
substituteInPlace $i \
255
255
+
--replace '@CONFIGURE_COMMAND@' '(omitted)' \
256
256
+
--replace '@CONFIGURE_OPTIONS@' "" \
257
257
+
--replace '@PHP_LDFLAGS@' ""
258
258
+
done
259
259
+
260
260
+
iniFile=$out/etc/php-recommended.ini
261
261
+
[[ -z "$libxml2" ]] || export PATH=$PATH:$libxml2/bin
262
262
+
./configure --with-config-file-scan-dir=/etc --with-config-file-path=$out/etc --prefix=$out $configureFlags
263
263
+
'';
264
264
+
265
265
+
installPhase = ''
266
266
+
unset installPhase; installPhase;
267
267
+
cp php.ini-production $iniFile
268
268
+
'';
269
269
+
270
270
+
src = fetchurl {
271
271
+
inherit url sha256;
272
272
+
};
273
273
+
274
274
+
meta = with stdenv.lib; {
275
275
+
description = "An HTML-embedded scripting language";
276
276
+
homepage = http://www.php.net/;
277
277
+
license = stdenv.lib.licenses.php301;
278
278
+
maintainers = with maintainers; [ globin ];
279
279
+
};
280
280
+
281
281
+
patches = if !php7 then [ ./fix-paths.patch ] else [ ./fix-paths-php7.patch ];
282
282
+
283
283
+
});
284
284
+
285
285
+
in {
286
286
+
287
287
+
php54 = generic {
288
288
+
version = "5.4.44";
289
289
+
sha256 = "0vc5lf0yjk1fs7inri76mh0lrcmq32ji4m6yqdmg7314x5f9xmcd";
290
290
+
};
291
291
+
292
292
+
php55 = generic {
293
293
+
version = "5.5.28";
294
294
+
sha256 = "1wy2v5rmbiia3v6fc8nwg1y3sdkdmicksxnkadz1f3035rbjqz8r";
295
295
+
};
296
296
+
297
297
+
php56 = generic {
298
298
+
version = "5.6.12";
299
299
+
sha256 = "0fl5r0lzav7icg97p7gkvbxk0xk2mh7i1r45dycjlyxgf91109vg";
300
300
+
};
301
301
+
302
302
+
php70 = lib.lowPrio (generic {
303
303
+
version = "7.0.0beta1";
304
304
+
url = "https://downloads.php.net/~ab/php-7.0.0beta1.tar.bz2";
305
305
+
sha256 = "1pj3ysfhswg2r370ivp33fv9zbcl3yvhmxgnc731k08hv6hmd984";
306
306
+
});
307
307
+
308
308
+
}
-291
pkgs/development/interpreters/php/generic.nix
reviewed
···
1
1
-
{ stdenv, fetchurl, composableDerivation, autoconf, automake, flex, bison
2
2
-
, mysql, libxml2, readline, zlib, curl, postgresql, gettext
3
3
-
, openssl, pkgconfig, sqlite, config, libjpeg, libpng, freetype
4
4
-
, libxslt, libmcrypt, bzip2, icu, openldap, cyrus_sasl, libmhash, freetds
5
5
-
, uwimap, pam, gmp
6
6
-
7
7
-
, phpVersion, apacheHttpd, sha
8
8
-
, php7 ? false, url ? null }:
9
9
-
10
10
-
let
11
11
-
libmcryptOverride = libmcrypt.override { disablePosixThreads = true; };
12
12
-
in
13
13
-
14
14
-
composableDerivation.composableDerivation {} ( fixed : let inherit (fixed.fixed) version; in {
15
15
-
16
16
-
version = "${phpVersion}";
17
17
-
18
18
-
name = "php-${version}";
19
19
-
20
20
-
enableParallelBuilding = true;
21
21
-
22
22
-
buildInputs = [ flex bison pkgconfig ];
23
23
-
24
24
-
flags = {
25
25
-
26
26
-
# much left to do here...
27
27
-
28
28
-
# SAPI modules:
29
29
-
30
30
-
apxs2 = {
31
31
-
configureFlags = ["--with-apxs2=${apacheHttpd}/bin/apxs"];
32
32
-
buildInputs = [apacheHttpd];
33
33
-
};
34
34
-
35
35
-
# Extensions
36
36
-
imap = {
37
37
-
configureFlags = [
38
38
-
"--with-imap=${uwimap}"
39
39
-
"--with-imap-ssl"
40
40
-
];
41
41
-
buildInputs = [ uwimap openssl pam ];
42
42
-
};
43
43
-
44
44
-
ldap = {
45
45
-
configureFlags = ["--with-ldap=${openldap}"];
46
46
-
buildInputs = [openldap cyrus_sasl openssl];
47
47
-
};
48
48
-
49
49
-
mhash = {
50
50
-
configureFlags = ["--with-mhash"];
51
51
-
buildInputs = [libmhash];
52
52
-
};
53
53
-
54
54
-
curl = {
55
55
-
configureFlags = ["--with-curl=${curl}"];
56
56
-
buildInputs = [curl openssl];
57
57
-
};
58
58
-
59
59
-
curlWrappers = {
60
60
-
configureFlags = ["--with-curlwrappers"];
61
61
-
};
62
62
-
63
63
-
zlib = {
64
64
-
configureFlags = ["--with-zlib=${zlib}"];
65
65
-
buildInputs = [zlib];
66
66
-
};
67
67
-
68
68
-
libxml2 = {
69
69
-
configureFlags = [
70
70
-
"--with-libxml-dir=${libxml2}"
71
71
-
];
72
72
-
buildInputs = [ libxml2 ];
73
73
-
};
74
74
-
75
75
-
pcntl = {
76
76
-
configureFlags = [ "--enable-pcntl" ];
77
77
-
};
78
78
-
79
79
-
readline = {
80
80
-
configureFlags = ["--with-readline=${readline}"];
81
81
-
buildInputs = [ readline ];
82
82
-
};
83
83
-
84
84
-
sqlite = {
85
85
-
configureFlags = ["--with-pdo-sqlite=${sqlite}"];
86
86
-
buildInputs = [ sqlite ];
87
87
-
};
88
88
-
89
89
-
postgresql = {
90
90
-
configureFlags = ["--with-pgsql=${postgresql}"];
91
91
-
buildInputs = [ postgresql ];
92
92
-
};
93
93
-
94
94
-
pdo_pgsql = {
95
95
-
configureFlags = ["--with-pdo-pgsql=${postgresql}"];
96
96
-
buildInputs = [ postgresql ];
97
97
-
};
98
98
-
99
99
-
mysql = {
100
100
-
configureFlags = ["--with-mysql=${mysql.lib}"];
101
101
-
buildInputs = [ mysql.lib ];
102
102
-
};
103
103
-
104
104
-
mysqli = {
105
105
-
configureFlags = ["--with-mysqli=${mysql.lib}/bin/mysql_config"];
106
106
-
buildInputs = [ mysql.lib ];
107
107
-
};
108
108
-
109
109
-
mysqli_embedded = {
110
110
-
configureFlags = ["--enable-embedded-mysqli"];
111
111
-
depends = "mysqli";
112
112
-
assertion = fixed.mysqliSupport;
113
113
-
};
114
114
-
115
115
-
pdo_mysql = {
116
116
-
configureFlags = ["--with-pdo-mysql=${mysql.lib}"];
117
117
-
buildInputs = [ mysql.lib ];
118
118
-
};
119
119
-
120
120
-
bcmath = {
121
121
-
configureFlags = ["--enable-bcmath"];
122
122
-
};
123
123
-
124
124
-
gd = {
125
125
-
# FIXME: Our own gd package doesn't work, see https://bugs.php.net/bug.php?id=60108.
126
126
-
configureFlags = [
127
127
-
"--with-gd"
128
128
-
"--with-freetype-dir=${freetype}"
129
129
-
"--with-png-dir=${libpng}"
130
130
-
"--with-jpeg-dir=${libjpeg}"
131
131
-
];
132
132
-
buildInputs = [ libpng libjpeg freetype ];
133
133
-
};
134
134
-
135
135
-
gmp = {
136
136
-
configureFlags = ["--with-gmp=${gmp}"];
137
137
-
buildInputs = [ gmp ];
138
138
-
};
139
139
-
140
140
-
soap = {
141
141
-
configureFlags = ["--enable-soap"];
142
142
-
};
143
143
-
144
144
-
sockets = {
145
145
-
configureFlags = ["--enable-sockets"];
146
146
-
};
147
147
-
148
148
-
openssl = {
149
149
-
configureFlags = ["--with-openssl=${openssl}"];
150
150
-
buildInputs = [openssl];
151
151
-
};
152
152
-
153
153
-
mbstring = {
154
154
-
configureFlags = ["--enable-mbstring"];
155
155
-
};
156
156
-
157
157
-
gettext = {
158
158
-
configureFlags = ["--with-gettext=${gettext}"];
159
159
-
buildInputs = [gettext];
160
160
-
};
161
161
-
162
162
-
intl = {
163
163
-
configureFlags = ["--enable-intl"];
164
164
-
buildInputs = [icu];
165
165
-
};
166
166
-
167
167
-
exif = {
168
168
-
configureFlags = ["--enable-exif"];
169
169
-
};
170
170
-
171
171
-
xsl = {
172
172
-
configureFlags = ["--with-xsl=${libxslt}"];
173
173
-
buildInputs = [libxslt];
174
174
-
};
175
175
-
176
176
-
mcrypt = {
177
177
-
configureFlags = ["--with-mcrypt=${libmcryptOverride}"];
178
178
-
buildInputs = [libmcryptOverride];
179
179
-
};
180
180
-
181
181
-
bz2 = {
182
182
-
configureFlags = ["--with-bz2=${bzip2}"];
183
183
-
buildInputs = [bzip2];
184
184
-
};
185
185
-
186
186
-
zip = {
187
187
-
configureFlags = ["--enable-zip"];
188
188
-
};
189
189
-
190
190
-
ftp = {
191
191
-
configureFlags = ["--enable-ftp"];
192
192
-
};
193
193
-
194
194
-
fpm = {
195
195
-
configureFlags = ["--enable-fpm"];
196
196
-
};
197
197
-
198
198
-
mssql = stdenv.lib.optionalAttrs (!stdenv.isDarwin) {
199
199
-
configureFlags = ["--with-mssql=${freetds}"];
200
200
-
buildInputs = [freetds];
201
201
-
};
202
202
-
203
203
-
zts = {
204
204
-
configureFlags = ["--enable-maintainer-zts"];
205
205
-
};
206
206
-
207
207
-
calendar = {
208
208
-
configureFlags = ["--enable-calendar"];
209
209
-
};
210
210
-
};
211
211
-
212
212
-
cfg = {
213
213
-
imapSupport = config.php.imap or true;
214
214
-
ldapSupport = config.php.ldap or true;
215
215
-
mhashSupport = config.php.mhash or true;
216
216
-
mysqlSupport = (!php7) && (config.php.mysql or true);
217
217
-
mysqliSupport = config.php.mysqli or true;
218
218
-
pdo_mysqlSupport = config.php.pdo_mysql or true;
219
219
-
libxml2Support = config.php.libxml2 or true;
220
220
-
apxs2Support = config.php.apxs2 or true;
221
221
-
bcmathSupport = config.php.bcmath or true;
222
222
-
socketsSupport = config.php.sockets or true;
223
223
-
curlSupport = config.php.curl or true;
224
224
-
curlWrappersSupport = (!php7) && (config.php.curlWrappers or true);
225
225
-
gettextSupport = config.php.gettext or true;
226
226
-
pcntlSupport = config.php.pcntl or true;
227
227
-
postgresqlSupport = config.php.postgresql or true;
228
228
-
pdo_pgsqlSupport = config.php.pdo_pgsql or true;
229
229
-
readlineSupport = config.php.readline or true;
230
230
-
sqliteSupport = config.php.sqlite or true;
231
231
-
soapSupport = config.php.soap or true;
232
232
-
zlibSupport = config.php.zlib or true;
233
233
-
opensslSupport = config.php.openssl or true;
234
234
-
mbstringSupport = config.php.mbstring or true;
235
235
-
gdSupport = config.php.gd or true;
236
236
-
intlSupport = config.php.intl or true;
237
237
-
exifSupport = config.php.exif or true;
238
238
-
xslSupport = config.php.xsl or false;
239
239
-
mcryptSupport = config.php.mcrypt or true;
240
240
-
bz2Support = config.php.bz2 or false;
241
241
-
zipSupport = config.php.zip or true;
242
242
-
ftpSupport = config.php.ftp or true;
243
243
-
fpmSupport = config.php.fpm or true;
244
244
-
gmpSupport = config.php.gmp or true;
245
245
-
mssqlSupport = (!php7) && (config.php.mssql or (!stdenv.isDarwin));
246
246
-
ztsSupport = config.php.zts or false;
247
247
-
calendarSupport = config.php.calendar or true;
248
248
-
};
249
249
-
250
250
-
configurePhase = ''
251
251
-
# Don't record the configure flags since this causes unnecessary
252
252
-
# runtime dependencies.
253
253
-
for i in main/build-defs.h.in scripts/php-config.in; do
254
254
-
substituteInPlace $i \
255
255
-
--replace '@CONFIGURE_COMMAND@' '(omitted)' \
256
256
-
--replace '@CONFIGURE_OPTIONS@' "" \
257
257
-
--replace '@PHP_LDFLAGS@' ""
258
258
-
done
259
259
-
260
260
-
iniFile=$out/etc/php-recommended.ini
261
261
-
[[ -z "$libxml2" ]] || export PATH=$PATH:$libxml2/bin
262
262
-
./configure --with-config-file-scan-dir=/etc --with-config-file-path=$out/etc --prefix=$out $configureFlags
263
263
-
'';
264
264
-
265
265
-
installPhase = ''
266
266
-
unset installPhase; installPhase;
267
267
-
cp php.ini-production $iniFile
268
268
-
'';
269
269
-
270
270
-
src = fetchurl {
271
271
-
url = if url == null then
272
272
-
"http://www.php.net/distributions/php-${version}.tar.bz2"
273
273
-
else
274
274
-
url;
275
275
-
sha256 = sha;
276
276
-
};
277
277
-
278
278
-
meta = with stdenv.lib; {
279
279
-
description = "An HTML-embedded scripting language";
280
280
-
homepage = http://www.php.net/;
281
281
-
license = stdenv.lib.licenses.php301;
282
282
-
maintainers = with maintainers; [ globin ];
283
283
-
};
284
284
-
285
285
-
patches = if !php7 then
286
286
-
[ ./fix-paths.patch ]
287
287
-
else
288
288
-
[ ./fix-paths-php7.patch ]
289
289
-
;
290
290
-
291
291
-
})
+5
-7
pkgs/top-level/all-packages.nix
reviewed
···
5017
5017
php = php55;
5018
5018
});
5019
5019
5020
5020
-
php54 = callPackage ../development/interpreters/php/5.4.nix { };
5021
5021
-
5022
5022
-
php55 = callPackage ../development/interpreters/php/5.5.nix { };
5023
5023
-
5024
5024
-
php56 = callPackage ../development/interpreters/php/5.6.nix { };
5025
5025
-
5026
5026
-
php70 = lowPrio (callPackage ../development/interpreters/php/7.0.nix { });
5020
5020
+
inherit (callPackages ../development/interpreters/php { })
5021
5021
+
php54
5022
5022
+
php55
5023
5023
+
php56
5024
5024
+
php70;
5027
5025
5028
5026
picoc = callPackage ../development/interpreters/picoc {};
5029
5027