| 10 Jul 2023 |
Pol | When doing this: https://github.com/NixOS/nixpkgs/blob/fb8cc2484eb3cfff4934b834d6d9cd6b80426d23/pkgs/development/php-packages/mongodb/default.nix#L17 | 14:18:56 |
Pol | Basically, I'm calling buildPecl from php. | 14:19:08 |
Pol | However, when used in fossar/nix-phps as such: nix build .#php74.extensions.mongodb, the PHP version in use is always 8.2. | 14:19:36 |
Pol | I changed the way the builder is called, from: buildPecl rec {...} to php.buildPecl rec {...}. At first I though that the behavior would be the same as the original one, but it's not. The php version is always the same, no matter wich one I specify: nix build .#php81.extensions.mongodb or nix build .#php83.extensions.mongodb. It is still picking PHP 8.2. How can I do to use the old behavior and just use buildPecl rec {...} ? I tried and I get this issue:
❯ nix build .#php83.extensions.mongodb -L
error: evaluation aborted with the following error message: 'Function called without required argument "buildPecl" at /nix/store/ij8r2bhqxjqahyrn09wb69hy871d6ssg-source/pkgs/development/php-packages/mongodb/default.nix:2'
~/C/N/nixpkgs > php/extension/bump-mongodb-extension +2 -2 [!] ✘
| 14:31:59 |
Pol | A solution has been found, PR is up at https://github.com/NixOS/nixpkgs/pull/242655 | 15:14:03 |
Pol | Hey got some news ! https://phpconference.com/web-development/leveraging-nix-php-ecosystem/ | 16:05:27 |
Pol | Going to have some fun :) | 16:18:02 |
Shyim | nice one! :D if you need help or something let me know! | 16:34:28 |
Pol | Oh thanks :) | 16:34:55 |
Pol | I will most probably | 16:35:00 |
Shyim |  Download image.png | 16:36:08 |
Shyim | Did someone discovered too that php-fpm is ignoring signals? | 16:36:11 |
Shyim | * Did someone discovered too that php-fpm is ignoring signals? We didn't updated I guess for 1-2 months our flake.lock. It's hard to find what causes it 😅 | 16:36:35 |
Pol | Wow... no clue | 16:43:05 |
Shyim | okay it was devenv related 😅 https://github.com/cachix/devenv/pull/712 | 17:47:25 |
| 23 Jul 2023 |
Pol | Hey, I've got a weird behavior in a Nix project of mine. The project aim to maintain old versions of the PHP language.
For some reason, the builds running on Darwin are picking the newest version of OpenSSL (3), not the old one (1) despite the fact that we are doing it (https://github.com/fossar/nix-phps/blob/9d00fd85709bcd48c80530cc71fbace99c375038/pkgs/package-overrides.nix#L510).
See the Github actions run, almost all the Darwin builds are failing for the same reason: https://github.com/loophp/nix-shell/actions/runs/5635189875
Do you have a clue what it could be? | 07:56:08 |
Pol | I was not having the issue before: https://github.com/loophp/nix-shell/actions/runs/5563477289 | 07:58:53 |
Pol | To reproduce the issue on a Darwin machine: nix build github:loophp/nix-shell/update_flake_lock_action#php56 | 08:04:57 |
Pol | Problem solved. | 09:04:02 |
Pol | The problem is the mysqlnd which requires openssl. | 09:04:13 |
Pol | OpenSSL version 1! Not 3. | 09:04:23 |
Pol | Going to push a patch to fossar/nix-phps. | 09:04:33 |
Pol | False alarm. Compiling openssl extension with PHP 5.6 on Darwin still requires Openssl 3. Weird. | 09:41:36 |
Jan Tojnar | In reply to @drupol:matrix.org Hey, I've got a weird behavior in a Nix project of mine. The project aim to maintain old versions of the PHP language. For some reason, the builds running on Darwin are picking the newest version of OpenSSL (3), not the old one (1) despite the fact that we are doing it (https://github.com/fossar/nix-phps/blob/9d00fd85709bcd48c80530cc71fbace99c375038/pkgs/package-overrides.nix#L510). See the Github actions run, almost all the Darwin builds are failing for the same reason: https://github.com/loophp/nix-shell/actions/runs/5635189875
Do you have a clue what it could be? Maybe try using builtins.trace for debugging | 10:25:56 |
Pol | I opened an issue in nix-phps, I can reproduce the issue there | 10:35:26 |
Pol | If anyone with a Darwin machine could have a look at https://github.com/fossar/nix-phps/pull/282 it would be nice. | 14:45:38 |
Pol | In reply to @jtojnar:matrix.org Maybe try using builtins.trace for debugging Without Darwin machine, it's a bit complicated :( | 14:50:34 |
Pol | I applied this patch:
diff --git i/pkgs/package-overrides.nix w/pkgs/package-overrides.nix
index 6cd988d..1691c5e 100644
--- i/pkgs/package-overrides.nix
+++ w/pkgs/package-overrides.nix
@@ -507,17 +507,21 @@ in
in
ourPatches ++ upstreamPatches;
- buildInputs =
- let
- replaceOpenssl = pkg:
- if pkg == pkgs.openssl && lib.versionOlder prev.php.version "8.1" then
- pkgs.openssl_1_1.overrideAttrs (old: {
- meta = builtins.removeAttrs old.meta [ "knownVulnerabilities" ];
- })
- else
- pkg;
- in
- builtins.map replaceOpenssl attrs.buildInputs;
+ buildInputs =let
+ a =
+ let
+ replaceOpenssl = pkg:
+ if pkg == pkgs.openssl && lib.versionOlder prev.php.version "8.1" then
+ pkgs.openssl_1_1.overrideAttrs (old: {
+ meta = builtins.removeAttrs old.meta [ "knownVulnerabilities" ];
+ })
+ else
+ pkg;
+ in
+ builtins.map replaceOpenssl attrs.buildInputs;
+ b = (lib.elemAt a 0).version;
+ in
+ builtins.trace b a;
});
openswoole =
And then I run: nix build .#php74.extensions.openssl -L
I can see: 1.1.1u.
It would be nice to do the same on a Darwin machine.
| 14:59:56 |
Pol | * I applied this patch:
diff --git i/pkgs/package-overrides.nix w/pkgs/package-overrides.nix
index 6cd988d..1691c5e 100644
--- i/pkgs/package-overrides.nix
+++ w/pkgs/package-overrides.nix
@@ -507,17 +507,21 @@ in
in
ourPatches ++ upstreamPatches;
- buildInputs =
- let
- replaceOpenssl = pkg:
- if pkg == pkgs.openssl && lib.versionOlder prev.php.version "8.1" then
- pkgs.openssl_1_1.overrideAttrs (old: {
- meta = builtins.removeAttrs old.meta [ "knownVulnerabilities" ];
- })
- else
- pkg;
- in
- builtins.map replaceOpenssl attrs.buildInputs;
+ buildInputs =let
+ a =
+ let
+ replaceOpenssl = pkg:
+ if pkg == pkgs.openssl && lib.versionOlder prev.php.version "8.1" then
+ pkgs.openssl_1_1.overrideAttrs (old: {
+ meta = builtins.removeAttrs old.meta [ "knownVulnerabilities" ];
+ })
+ else
+ pkg;
+ in
+ builtins.map replaceOpenssl attrs.buildInputs;
+ b = (lib.elemAt a 0).name
+ in
+ builtins.trace b a;
});
openswoole =
And then I run: nix build .#php74.extensions.openssl -L
I can see: 1.1.1u.
It would be nice to do the same on a Darwin machine.
| 15:04:32 |
Pol | * I applied this patch:
diff --git i/pkgs/package-overrides.nix w/pkgs/package-overrides.nix
index 6cd988d..1691c5e 100644
--- i/pkgs/package-overrides.nix
+++ w/pkgs/package-overrides.nix
@@ -507,17 +507,21 @@ in
in
ourPatches ++ upstreamPatches;
- buildInputs =
- let
- replaceOpenssl = pkg:
- if pkg == pkgs.openssl && lib.versionOlder prev.php.version "8.1" then
- pkgs.openssl_1_1.overrideAttrs (old: {
- meta = builtins.removeAttrs old.meta [ "knownVulnerabilities" ];
- })
- else
- pkg;
- in
- builtins.map replaceOpenssl attrs.buildInputs;
+ buildInputs =let
+ a =
+ let
+ replaceOpenssl = pkg:
+ if pkg == pkgs.openssl && lib.versionOlder prev.php.version "8.1" then
+ pkgs.openssl_1_1.overrideAttrs (old: {
+ meta = builtins.removeAttrs old.meta [ "knownVulnerabilities" ];
+ })
+ else
+ pkg;
+ in
+ builtins.map replaceOpenssl attrs.buildInputs;
+ b = (lib.elemAt a 0).name
+ in
+ builtins.trace b a;
});
openswoole =
And then I run: nix build .#php74.extensions.openssl -L
I can see: openssl-1.1.1u, so the replacement works. But it seems it is not on Darwin... any available to verify ?
It would be nice to do the same on a Darwin machine.
| 15:05:08 |