Commit Graph

473 Commits

Author SHA1 Message Date
Artturin
4d32075a0e phpPackages.mkDerivation: use lib.{fix,extends} instead of //
// on a overrideAttrs'able works badly

here we use lib.fix and lib.extends instead of overrideAttrs to have
less of a performance impact
2023-02-08 19:34:41 +02:00
Thomas Gerbet
e3bec64e7f phpExtensions.opcache: fix test environment for darwin 2023-02-06 22:47:16 +01:00
Pol Dellaiera
fb528f2237
php82: 8.2.1 -> 8.2.2 2023-02-01 21:40:01 +01:00
Bobby Rong
6efdd8b483
php.extensions.enchant: use enchant2
enchant2 is supported in PHP8+.

Co-authored-by: Jan Tojnar <jtojnar@gmail.com>
2023-01-17 17:45:16 +08:00
Thomas Gerbet
91f785d868 php81Extensions.opcache, php81Extensions.opcache: fix test 2023-01-08 19:43:53 +01:00
Stanisław Pitucha
41064f4288
Merge pull request #208084 from apeschar/phan
phpPackages.phan: init at 5.4.1
2022-12-30 09:45:59 +11:00
Pol Dellaiera
8cd511dde1
feat: add passthru flags in PHP extension builder
So they can be handled correctly by `nix-update` tool
2022-12-29 18:19:12 +01:00
Albert Peschar
c8443f71d1 phpPackages.phan: init at 5.4.1 2022-12-29 11:44:59 +02:00
figsoda
ec8cb34358 treewide: fix typos 2022-12-17 19:39:44 -05:00
Maximilian Bosch
2580440389
Merge pull request #198470 from RaitoBezarius/nc25-openssl
nextcloud25: use openssl 1.1 as a PHP extension to fix RC4 encryption
2022-11-20 18:32:41 +01:00
Elis Hirwing
21b44e792e
php.packages: Add back meta attributes 2022-11-12 08:30:42 +01:00
Maximilian Bosch
35b146ca31
nixos/nextcloud: fixup openssl compat change
Upon testing the change itself I realized that it doesn't build properly
because

* the `pname` of a php extension is `php-<name>`, not `<name>`.
* calling the extension `openssl-legacy` resulted in PHP trying to compile
  `ext/openssl-legacy` which broke since it doesn't exist:

      source root is php-8.1.12
      setting SOURCE_DATE_EPOCH to timestamp 1666719000 of file php-8.1.12/win32/wsyslog.c
      patching sources
      cdToExtensionRootPhase
      /nix/store/48mnkga4kh84xyiqwzx8v7iv090i7z66-stdenv-linux/setup: line 1399: cd: ext/openssl-legacy: No such file or directory

I didn't encounter that one before because I was mostly interested in
having a sane behavior for everyone not using this "feature" and the
documentation around this. My findings about the behavior with turning
openssl1.1 on/off are still valid because I tested this on `master` with
manually replacing `openssl` by `openssl_1_1` in `php-packages.nix`.

To work around the issue I had to slightly modify the extension
build-system for PHP:

* The attribute `extensionName` is now relevant to determine the output
  paths (e.g. `lib/openssl.so`). This is not a behavioral change for
  existing extensions because then `extensionName==name`.

  However when specifying `extName` in `php-packages.nix` this value is
  overridden and it is made sure that the extension called `extName` NOT
  `name` (i.e. `openssl` vs `openssl-legacy`) is built and installed.

  The `name` still has to be kept to keep the legacy openssl available
  as `php.extensions.openssl-legacy`.

Additionally I implemented a small VM test to check the behavior with
server-side encryption:

* For `stateVersion` below 22.11, OpenSSL 1.1 is used (in `basic.nix`
  it's checked that OpenSSL 3 is used). With that the "default"
  behavior of the module is checked.

* It is ensured that the PHP interpreter for Nextcloud's php-fpm
  actually loads the correct openssl extension.

* It is tested that (encrypted) files remain usable when (temporarily)
  installing OpenSSL3 (of course then they're not decryptable, but on a
  rollback that should still be possible).

Finally, a few more documentation changes:

* I also mentioned the issue in `nextcloud.xml` to make sure the issue
  is at least mentioned in the manual section about Nextcloud. Not too
  much detail here, but the relevant option `enableBrokenCiphersForSSE`
  is referenced.

* I fixed a few minor wording issues to also give the full context
  (we're talking about Nextcloud; we're talking about the PHP extension
  **only**; please check if you really need this even though it's
  enabled by default).

  This is because I felt that sometimes it might be hard to understand
  what's going on when e.g. an eval-warning appears without telling where
  exactly it comes from.
2022-11-11 14:45:46 +01:00
Raito Bezarius
7eefaeb5e3
nextcloud25: use openssl 1.1 as a PHP extension to fix RC4 encryption 2022-11-10 12:17:43 +01:00
Aaron Andersen
d3c9c4df6b
Merge pull request #185683 from ilkecan/phpPackages-set-meta-mainProgram
phpPackages: set meta.mainProgram
2022-11-07 08:25:02 -05:00
Pol Dellaiera
d81b7507f0 php: enable imap extension by default 2022-10-03 10:06:48 +02:00
github-actions[bot]
3a12bb0241
Merge master into staging-next 2022-08-30 00:03:00 +00:00
Martin Weinelt
51228d186f
php.extensions.inotify: init at 3.0.0
https://pecl.php.net/package/inotify
2022-08-29 22:10:42 +02:00
ajs124
80f2c05c52 php80Extensions.openssl: pin to openssl_1_1 2022-08-17 20:16:21 +02:00
ilkecan
58919907a7 phpPackages: set meta.mainProgram 2022-08-08 16:38:05 +00:00
Artturin
67d19f473c phpPackage.mkExtension: makeOverridable 2022-06-24 17:35:48 +03:00
Elis Hirwing
9ec41c8875
php: Drop special cases for versions below 8.0 2022-06-08 18:11:51 +02:00
Elis Hirwing
42b3cedbb5
php.extensions.oci8: Drop 2.2.0 for older PHP packages 2022-06-08 18:10:00 +02:00
Elis Hirwing
00fa9e195e
php.extensions.php_excel: Deinit due to broken in all attributes after php74 deprecation 2022-06-08 18:08:42 +02:00
Elis Hirwing
c2cee3f76e
php.extensions.apcu_bc: Deinit due to broken in all attributes after php74 deprecation 2022-06-08 18:08:38 +02:00
Soner Sayakci
3ef60b5ffc
phpExtensions.grpc: init at 1.45.0 2022-05-18 19:18:25 +02:00
Jan Tojnar
d4884bbc9e php.extensions: Remove fixes for abandoned PHP versions 2022-05-10 00:37:55 +02:00
Kim Lindberger
5dc982e272
Merge pull request #170962 from jtojnar/php-ext-fixes
php.extensions: improve correctness and usability
2022-05-09 18:26:21 +02:00
Elis Hirwing
64db84dbb0
Merge pull request #168149 from johanjanssens/master
phpExtensions.openswoole: init at 4.11.1
2022-05-04 15:15:51 +02:00
Johan Janssens
81b77fd384
php74Extensions.openswoole: init at 4.11.1
Request to add openswoole: https://pecl.php.net/package/openswoole

Open Swoole is a fork of [Swoole](https://github.com/johanjanssens/nixpkgs/tree/master/pkgs/development/php-packages/swoole). It is actively maintained by some of the original developers and has growing community.

- https://github.com/openswoole
- https://openswoole.com/
- https://twitter.com/openswoole
2022-05-04 14:29:00 +02:00
Jan Tojnar
9cdbd72004 php.extensions.readline: Actually use readline
Building readline extension would say:

    checking for libedit readline replacement... yes, shared

even when configuring `--without-libedit`. This is because `PHP_ARG_WITH(libedit, …)`, internally calls `PHP_ALWAYS_SHARED`, which in `phpize`-generated `configure.ac` is defined as always forcing the value to shared. This will prevent `PHP_ARG_WITH(readline, …)` from being invoked so `READLINE_DIR` variable will never be defined.

This was not an issue before we split the extension out of php.unwrapped in 282337799b, as `PHP_ALWAYS_SHARED` is empty there.

-----

Additionally, because the build script passed `-L$READLINE_DIR/lib` as a flag to the compiler on PHP < 7.4 (built by the nix-phps repository), this ended up with a FHS-like path being passed to the linker. And once we bumped GCC to 11 in 52f8cf58a4, the linker would fail:

	  gcc -shared  .libs/readline.o .libs/readline_cli.o  -Wl,--rpath -Wl,/lib -L/lib -ledit -lncurses  -Wl,-soname -Wl,readline.so -o .libs/readline.so
	  impure path `/lib' used in link
	  collect2: error: ld returned 1 exit status

This no longer happens with PHP ≥ 7.4, since they switched to getting the linker flags from pkg-config in b537203d20.

----

As a compromise, let’s make the `PHP_ALWAYS_SHARED` function force `shared` status but only for flags that are not disabled. That will allow us to remove the libedit dependency and also the nasty patch for configure script due to `--with-libedit` not being passed (which would be required for PHP < 7.4 to be able to find readline.h from libedit).

Thanks to Pol Dellaiera for both bisections.
2022-05-02 04:30:34 +02:00
Jan Tojnar
03e31c533c php.mkExtension: make source name agnostic
PHP obtained from Git contains files directly in the top-level directory,
which will be placed in Nix store. The generic builder will then copy it
to the /build sandbox as its basename with hash stripped (e.g. source/).
This breaks the assumption of `mkExtension`, which expects that PHP’s
source will be extracted into `php-«version»/` directory, since that
is what the release tarballs contain.

Let’s unset the `sourceRoot`, leaving it to `unpackPhase` to find
the source directory. Then, we will be able go to the extension
directory from there.

We use custom pre-configure phase so that both `postPatch` and
`preConfigure` is available to consumers.
2022-05-02 03:56:12 +02:00
Jan Tojnar
b2ae4d5a0e php.mkExtension: Run installPhase pre/post hooks 2022-05-02 03:55:17 +02:00
Jan Tojnar
497d46b012 php.mkExtension: Format 2022-05-02 03:55:17 +02:00
Anders Kaseorg
6920d8ca42 treewide: Simplify negated uses of versionAtLeast, versionOlder
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2022-04-25 13:35:24 -07:00
Elis Hirwing
f2fd01f3b6
Merge pull request #162376 from shayne/master
php.extensions.datadog_trace: init at 0.70.0
2022-04-08 11:10:36 +02:00
Pol Dellaiera
a6aceda140
php.packages.phive: init at 0.15.0 2022-03-13 16:37:37 +01:00
shayne
72c95f2878
php.extensions.datadog_trace: init at 0.70.0 2022-03-01 11:40:47 -05:00
Pol Dellaiera
ff2d50e1dd
php.packages.grumphp: init at 1.8.1 2022-03-01 08:07:12 +01:00
Pol Dellaiera
cdfd5b47fc
php.packages.phing: init at 2.17.1 2022-02-24 21:08:05 +01:00
Pol Dellaiera
96983152e7
php81: 8.1.2 -> 8.1.3 2022-02-20 11:07:32 +01:00
Pol Dellaiera
b94195fc84
phpExtensions.ds: init at 1.4.0 2022-01-26 22:16:26 +01:00
Pol Dellaiera
6794a2c3f6
php81: 8.1.1 -> 8.1.2 2022-01-23 18:23:57 +01:00
Elis Hirwing
e3a7c62565
Merge pull request #147411 from drupol/php/php-8.1.0
php: Init at 8.1.1
2021-12-21 12:33:07 +01:00
Stéphan Kochen
2dbf96e7cc
php81Extensions.tokenizer: fix build
(cherry picked from commit cf7f4c058e822ee8eeaa2120c45f04b5b460a5db)
2021-12-21 10:13:10 +01:00
ajs124
4e9870ffa2
php80Extensions.xmlreader: fix build
(cherry picked from commit cede244af9)
2021-12-20 15:51:00 +01:00
Konrad Borowski
0af523ae77 phpExtensions: skip performance sensitive tests 2021-12-15 20:55:31 +01:00
ajs124
cede244af9 php80Extensions.xmlreader: fix build 2021-11-25 18:18:21 +01:00
taikx4
9571ac967f
phpExtensions.gnupg: init at 1.5.0 2021-11-23 20:06:39 +01:00
Eduard Bopp
637be68d8f phpExtensions.amqp: init at 1.11.0beta 2021-10-08 18:10:44 +02:00
ajs124
4c424870e6 phpPackages.dom: drop patch
does not apply to to 7.4.21 and 8.0.8 anymore
2021-07-01 14:07:39 +02:00
Aaron Andersen
485d0fc973 php: expose mkExtension 2021-06-29 07:38:12 -04:00
Elis Hirwing
94d07b7492
php: Run nixpkgs-fmt on all php related files 2021-06-26 20:07:56 +02:00
Zhaofeng Li
1f007dd009 Use lib.meta.availableOn for optional Valgrind dependency 2021-06-12 23:17:13 -07:00
Elis Hirwing
fb644190a0
php: Drop package composer1
Composer2 has been stable for some time now.
2021-06-04 09:27:04 +02:00
Elis Hirwing
be7451bc14
php: Drop extensions (pcs, v8, v8js, zmq, pthreads)
They have been marked as broken for a long time so they shouldn't be
used by anyone really.

They don't build in any of the supported versions.
2021-06-04 09:26:57 +02:00
Elis Hirwing
68eb5305ac
php: Drop PHP 7.3 support
PHP 7.3 won't be supported by upstream for the entire life cycle of
the 21.11 release.

Also drop the pcre' alias since it isn't needed anymore since we don't
need different pcre versions anymore.
2021-06-04 09:26:54 +02:00
Sandro
bc64755cfa
Merge pull request #124603 from mjsir911/msirabella/peclCheck
php.buildPecl: Add checkPhase
2021-06-01 16:34:42 +02:00
Sandro
3850fdb330
Merge pull request #120699 from NorfairKing/package-php-snuffleupagus
php.extensions.snuffleupagus: init at 0.7.0
2021-06-01 15:47:53 +02:00
Tom Sydney Kerckhove
52248df095 php.extensions.snuffleupagus: init at 0.7.0 2021-05-31 16:15:02 +02:00
Marco Sirabella
3a66432f26
php.buildPecl: Add checkPhase
Also update phpPackages' to use NO_INTERACTION
2021-05-27 12:19:14 -04:00
Maximilian Bosch
53951c0c14
phpExtensions.dom: fix build
ZHF #122042
2021-05-23 21:26:27 +02:00
Jan Tojnar
024243bac4
php74.extensions.iconv: fix error signalling
The configure script checks whether iconv supports errno. Unfortunately, on PHP < 8, the test program includes $PHP_ICONV_H_PATH, which defaults to FHS path so it fails to build:

	conftest.c:13:10: fatal error: /usr/include/iconv.h: No such file or directory
	   13 | #include </usr/include/iconv.h>
	      |          ^~~~~~~~~~~~~~~~~~~~~~

That causes the feature check to report a false negative, leading PHP to use a degraded code that returns PHP_ICONV_ERR_UNKNOWN when error occurs, breaking granular error handling in applications.

To prevent this, let’s just include <iconv.h>.

PHP 8 just uses include path so the detection works there: 7bd1d70341
2021-05-23 00:10:02 +02:00
Aaron Andersen
1c5c5be21b php.packages.deployer: init at 6.8.0 2021-05-05 08:38:28 -04:00
talyz
30cae53dbb
v8: 7.4.255 -> 8.4.255 2021-03-29 15:25:17 +02:00
Robert Scott
96390f4286
Merge pull request #115487 from stephank/fix-darwin-php
php80: fix on darwin
2021-03-14 17:58:44 +00:00
Elis Hirwing
7b44695658
php.extensions.swoole: init at 4.6.4 2021-03-11 18:17:45 +01:00
Stéphan Kochen
da049ba377 php80: fix on darwin 2021-03-10 11:57:29 +01:00
Sandro Jäckel
af32607630
php-packages: cleanup 2021-03-08 02:01:14 +01:00
Jan Tojnar
3f4d4ee05a
Merge pull request #114210 from jtojnar/fix-optionals
top-level/php-packages: fix types
2021-03-06 22:13:01 +01:00
Maximilian Bosch
8c26eaa144
Revert "php: Add php package versions to extensions/packages pnames"
This reverts commit a081dcf86d.
2021-03-04 15:26:36 +01:00
Elis Hirwing
a081dcf86d
php: Add php package versions to extensions/packages pnames 2021-02-27 21:57:02 +01:00
Elis Hirwing
ad990d49aa
php.packages.composer2: deinit package since main package is updated 2021-02-27 12:27:18 +01:00
Elis Hirwing
89dacdd7a5
php.packages.composer1: init at 1.10.15 2021-02-27 12:26:38 +01:00
Jan Tojnar
22bf2d0331
top-level/php-packages: fix types
Passing list to `optional` wraps it in another list but we just want to return it as is.

Let’s just use `optionals` everywhere as that is much more predictable and makes such mistakes obvious.
2021-02-24 08:26:36 +01:00
Elis Hirwing
173edd9547
Merge pull request #112360 from helsinki-systems/fix/php-xls-xmlrpc
phpExtensions80: fix xls, disable xmlrpc
2021-02-10 10:35:21 +01:00
Aaron Andersen
159f0efe20
Merge pull request #111515 from aanderse/libsmbclient-php
php.extensions.smbclient: init at 1.0.4
2021-02-09 07:37:54 -05:00
Aaron Andersen
dd147bbc64 php.extensions.smbclient: init at 1.0.4 2021-02-08 23:15:12 -05:00
ajs124
b8c532e061 phpExtensions.xsl: fix build against php80 by disabling tests
they succeed on 7.3 and 7.4, but not 8.0
2021-02-08 16:07:25 +01:00
ajs124
220356309e phpExtensions.xmlrpc: disable on 8.0, as it was unbundeled in that release 2021-02-08 16:07:24 +01:00
talyz
6c32f248d0
php.extensions.xmlreader: Add internal dependency on dom 2021-01-30 16:41:14 +01:00
Jonathan Ringer
9bb3fccb5b treewide: pkgs.pkgconfig -> pkgs.pkg-config, move pkgconfig to alias.nix
continuation of #109595

pkgconfig was aliased in 2018, however, it remained in
all-packages.nix due to its wide usage. This cleans
up the remaining references to pkgs.pkgsconfig and
moves the entry to aliases.nix.

python3Packages.pkgconfig remained unchanged because
it's the canonical name of the upstream package
on pypi.
2021-01-19 01:16:25 -08:00
Jörg Thalheim
2af38d76fe
phpPackags.gettext: configureFlags should be a list 2021-01-12 13:10:35 +01:00
Elis Hirwing
58d897e812
Merge pull request #108904 from aanderse/php-oci8
php80.extensions.oci8: 2.2.0 -> 3.0.1
2021-01-10 14:23:09 +01:00
Aaron Andersen
b929911380 php80.extensions.oci8: 2.2.0 -> 3.0.1 2021-01-09 20:10:04 -05:00
Elis Hirwing
b305e4dd7e
Merge pull request #108666 from helsinki-systems/upd/php
php: 7.3.25 -> 7.3.26, 7.4.13 -> 7.4.14, 8.0.0 -> 8.0.1
2021-01-09 14:35:55 +01:00
ajs124
0f04df98a2 php80Extensions.opcache: drop patch
does not apply anymore and it compiles without it now
2021-01-08 01:29:07 +01:00
Aaron Andersen
b5707ce9c0 php.extensions.pdlib: init at 1.0.2 2020-12-28 18:38:50 -05:00
Jan Tojnar
7e8b2b7e98
phpPackages: convert to scope
This will make it easier to make overridable.

Had to rename `packages` attribute to `tools` in `php-packages.nix` because `packages` is shadowed by `makeScope`.
2020-12-15 17:57:40 +01:00
Soner Sayakci
4cd8412880
php80: init at 8.0.0 2020-12-01 11:54:42 +01:00
Elis Hirwing
3d31818f1a
php: Drop usage of isPhp73 and isPhp74
These variables have bad names that doesn't really make full sense
2020-10-11 20:10:58 +02:00
Elis Hirwing
6d0abdd9c1
phpExtensions.yaml: Move to separate directory 2020-10-11 20:00:38 +02:00
Elis Hirwing
e810b999eb
phpExtensions.xdebug: Move to separate directory 2020-10-11 19:58:03 +02:00
Elis Hirwing
a004e2ca68
phpExtensions.sqlsrv: Move to separate directory 2020-10-11 19:55:31 +02:00
Elis Hirwing
f5a4a96fad
phpExtensions.redis: Move to separate directory 2020-10-11 19:53:07 +02:00
Elis Hirwing
80ba7d0c87
phpExtensions.rdkafka: Move to separate directory 2020-10-11 19:49:28 +02:00
Elis Hirwing
b27b297c56
php73Extensions.pthreads: Move to separate directory 2020-10-11 19:45:22 +02:00
Elis Hirwing
63e150560b
phpExtensions.protobuf: Move to separate directory 2020-10-11 19:39:34 +02:00
Elis Hirwing
58c1014f5a
phpExtensions.pinba: Move to separate directory 2020-10-11 19:37:31 +02:00
Elis Hirwing
d5ea4254a4
phpExtensions.php_excel: Move to separate directory 2020-10-11 19:32:05 +02:00
Elis Hirwing
fd6db7224b
phpExtensions.pdo_sqlsrv: Move to separate directory 2020-10-11 19:24:04 +02:00