!jngDrdMgndWibPCYsR:nixos.org

Nix PHP

67 Members
A room for PHP developers running on Nix20 Servers

Load older messages


SenderMessageTime
12 Oct 2024
@drupol:matrix.orgPol
In reply to @patka:envs.net
Any problems with me slowly converting things to buildComposerProject2?
Absolutely not!
19:24:57
18 Oct 2024
@hansemschnokeloch:matrix.orghansemschnokeloch joined the room.12:23:12
@hansemschnokeloch:matrix.orghansemschnokelochHi, parallel extension seems not to be available on nixpkgs, how can I install this extension ? https://www.php.net/manual/en/intro.parallel.php12:25:58
@drupol:matrix.orgPol hansemschnokeloch: Have a look at the existing package extension, and try to do the same in a PR against nixpkgs ? 19:46:04
@drupol:matrix.orgPol * hansemschnokeloch: Have a look at the existing PHP extensions, and try to do the same in a PR against nixpkgs ? 19:46:14
19 Oct 2024
@hansemschnokeloch:matrix.orghansemschnokelochThx, I'll give it a try.08:58:08
@hansemschnokeloch:matrix.orghansemschnokeloch

I've following error phpize: command not found with

{ sources ? import ../npins
, nixpkgs ? sources."nixos-unstable"
, pkgs
, buildPecl ? pkgs.callPackage (nixpkgs + "/pkgs/build-support/php/build-pecl.nix") { }
,
}:

let
  versionData =
    {
      version = "1.2.4";
      sha256 = "sha256-s9W9aZpQsJLdzZ/d2E1iGDsMTAAjeWbOgWeKP6nNp0A=";
    };
in
buildPecl
{
  pname = "parallel";
  inherit (versionData) version sha256;
}
14:06:31
@hansemschnokeloch:matrix.orghansemschnokelochhow can I get phpize ?14:11:06
@hansemschnokeloch:matrix.orghansemschnokelochRedacted or Malformed Event14:21:37
@drupol:matrix.orgPolLet me give you a proper inspiration file14:34:18
@drupol:matrix.orgPolTry this? https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/php-packages/ast/default.nix14:34:42
@hansemschnokeloch:matrix.orghansemschnokelochI didn't mention that it build when I add the extension to a local version of nixpkgs. The code above is an attempt to add the extension without using my local version of nixpkgs.14:42:18
@drupol:matrix.orgPolLet me give it a quick try.18:59:16
@drupol:matrix.orgPol parallel requires PHP with ZTS enabled. The buildPecl wrapper doesn't let you customize the php. Going to fix this. 19:12:19
@drupol:matrix.orgPol I think I've got a working proof of concept, going to post this on nixpkgs soon. 19:12:35
@drupol:matrix.orgPolArgh can't get it to work... 19:48:55
@drupol:matrix.orgPol I have no clue how we could specify the PHP version to use to the buildPecl builder. 19:49:20
23 Oct 2024
@hansemschnokeloch:matrix.orghansemschnokelochI found a way to specify the php version in buildPecl, but I'm not quite sure if this is the right way to do it. My PR https://github.com/NixOS/nixpkgs/pull/35077120:05:45
24 Oct 2024
@drupol:matrix.orgPol hansemschnokeloch: Nice ! I didn't know it was php.unwrapped I was passing php. This is why it was not working. 08:14:28
@drupol:matrix.orgPolI just made a new comment, asking for changes.08:14:39
@drupol:matrix.orgPol We usually do not pass pkgs to derivations. 08:14:47
@hansemschnokeloch:matrix.orghansemschnokelochI just replyed, I've an infinite recursion if I pass php08:19:09
@drupol:matrix.orgPol

hansemschnokeloch: Try this:

diff --git i/pkgs/development/php-packages/parallel/default.nix w/pkgs/development/php-packages/parallel/default.nix
index 74296f1ec493..296fed10da94 100644
--- i/pkgs/development/php-packages/parallel/default.nix
+++ w/pkgs/development/php-packages/parallel/default.nix
@@ -1,14 +1,10 @@
 {
   buildPecl,
   lib,
-  pkgs,
+  php,
 }:
 
-let
-  # parallel requires ZTS support
-  php = pkgs.php.override { ztsSupport = true; };
-in
-(buildPecl.override { php = php.unwrapped; }) {
+(buildPecl.override { php = (php.override { ztsSupport = true; }).unwrapped; }) {
   pname = "parallel";
   version = "1.2.4";
   hash = "sha256-s9W9aZpQsJLdzZ/d2E1iGDsMTAAjeWbOgWeKP6nNp0A=";
08:21:08
@hansemschnokeloch:matrix.orghansemschnokelochCapture d’écran du 2024-10-24 10-23-21.png
Download Capture d’écran du 2024-10-24 10-23-21.png
08:23:40
@hansemschnokeloch:matrix.orghansemschnokelochdon't work either, 08:23:42
@drupol:matrix.orgPolooooh08:24:10
@drupol:matrix.orgPoldafuq is this issue08:26:41
@drupol:matrix.orgPolI don't understand it.08:26:58
@drupol:matrix.orgPol
phpWithZtsSupport = (php.overrideAttrs (oldAttrs: { ztsSupport = true; }));
08:28:16
@drupol:matrix.orgPolThis seems to work08:28:20

Show newer messages


Back to Room ListRoom Version: 6