!jngDrdMgndWibPCYsR:nixos.org

Nix PHP

76 Members
A room for PHP developers running on Nix22 Servers

Load older messages


SenderMessageTime
23 Jul 2023
@drupol:matrix.orgPol

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
@drupol:matrix.orgPol *

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
@drupol:matrix.orgPol *

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
@drupol:matrix.orgPol Maybe Stéphan ? ** 15:11:21
@drupol:matrix.orgPol * Maybe Stéphan ? ^^ 15:11:37
@drupol:matrix.orgPolI've describe the procedure here: https://github.com/fossar/nix-phps/pull/28215:13:42
@drupol:matrix.orgPolThe issue has been found by the Darwin maintainer team16:44:44
@drupol:matrix.orgPolApparently, there are two different version of OpenSSL 3 and this patch should fix the issue: https://github.com/fossar/nix-phps/pull/282/commits/6712008dcaccb7f74a7b7c5bc376713d01f64e8516:45:25
25 Jul 2023
@drupol:matrix.orgPol There has been an update of libxml2 in nixpkgs and it's breaking some tests in the PHP dom extension. Do you think this approach to fix the issue is the best one ?
https://github.com/fossar/nix-phps/pull/286#issuecomment-1649651146 Comments are welcome.
14:28:20
@pederbs:pvv.ntnu.nopbsds changed their display name from pbsds to pbsds (UTC+1).19:03:43
27 Jul 2023
@ribosomerocker:matrix.orgribosomerocker joined the room.03:04:31
29 Jul 2023
@lstrojny:matrix.orgLars StrojnyHow is the PHP interpreter selected that is used inside of the pecl script? Certain commands like pecl package require an extension, in this case, zlib but building PHP with zlib extension enabled doesn’t change the interpreter. Any way to fix that?09:26:34
@lstrojny:matrix.orgLars Strojny This is my PHP: pkgs.php82.withExtensions ({ enabled, all }: enabled ++ [ all.zlib all.gd ])) 09:26:57
@lstrojny:matrix.orgLars Strojny But still pecl package complains about missing zlib 09:27:08
@lstrojny:matrix.orgLars Strojny I found a workaround by setting PHP_PEAR_PHP_BIN=which php`` but that’s not ideal 09:28:49
@lstrojny:matrix.orgLars Strojny * I found a workaround by setting PHP_PEAR_PHP_BIN=\which php`` but that’s not ideal 09:29:02
@lstrojny:matrix.orgLars Strojny * I found a workaround by setting `PHP_PEAR_PHP_BIN=``which php``` but that’s not ideal09:29:18
@lstrojny:matrix.orgLars Strojny * I found a workaround by setting PHP_PEAR_PHP_BIN=which php but that’s not ideal 09:29:39
@drupol:matrix.orgPol
In reply to @lstrojny:matrix.org
But still pecl package complains about missing zlib
What is doing that command, I don't know it yet.
10:49:32
@lstrojny:matrix.orgLars Strojny Pol: it’s for package maintainers to generate new release archives for PECL extensions 12:36:27
@drupol:matrix.orgPolCan I have a look at this command ? 14:00:32
@lstrojny:matrix.orgLars Strojny
In reply to @drupol:matrix.org
Can I have a look at this command ?
What do you mean?
16:05:39
@drupol:matrix.orgPolIt's soirce16:20:07
@drupol:matrix.orgPol* It's sources16:20:15
@drupol:matrix.orgPolSo I can reproduce the issue16:20:23
1 Aug 2023
@wriver4:matrix.orgwriver4 joined the room.15:15:32
4 Aug 2023
@drupol:matrix.orgPolI've extracted the PHP builder I've been working on in a flake at https://github.com/loophp/nix-php-composer-builder/tree/main16:46:03
@drupol:matrix.orgPol Feel free to tell me if I'm doing things right, and eventually send PR to that repo, I'll backport everything in nixpkgs on a monthly basis. 17:46:00
5 Aug 2023
@drupol:matrix.orgPolSee how easy it is to package Drupal in Nix with this new builder: https://github.com/loophp/nix-php-composer-builder/#packaging-drupal06:19:59
7 Aug 2023
@drupol:matrix.orgPol Having fun with Flake and welcomeText of Nix flake template ! 13:14:26

Show newer messages


Back to Room ListRoom Version: 6