!jngDrdMgndWibPCYsR:nixos.org

Nix PHP

74 Members
A room for PHP developers running on Nix22 Servers

Load older messages


SenderMessageTime
12 Mar 2022
@drupol:matrix.orgPolI'll check phive in depth tomorrow22:27:43
@drupol:matrix.orgPolI wanted to also use phar versions of packages, but it's a bit against the practice in NixOS.22:28:49
@drupol:matrix.orgPolExample: https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/php-packages/php-parallel-lint/default.nix22:30:07
@drupol:matrix.orgPolThis tool provides a Phar, but we are building it ourselves.22:30:31
@drupol:matrix.orgPolI'm not particularly fan of this, but this is how it is. I guess there are maybe other valid reasons that I do not fully know yet.22:31:10
@ramsey:matrix.orgramseyIs that because the Nix practice is to build them from source?22:32:19
@drupol:matrix.orgPolYes22:33:05
@ramsey:matrix.orgramsey oh, I see. That runs box build 22:33:15
@drupol:matrix.orgPolYes22:33:41
@ramsey:matrix.orgramseySo, nix builds its own Phar instead of using the one provided by the maintainers. Interesting. I don't see how this is really relevant in PHP's case, since it's not packaging a binary for the target system.22:34:18
@drupol:matrix.orgPolYes22:34:55
@ramsey:matrix.orgramsey I bet grahamc (he/him) could shed some light on that 🙂 22:35:26
@drupol:matrix.orgPolOr the current PHP maintainers !22:36:35
@ramsey:matrix.orgramsey PHP maintainers wouldn’t be able to explain why Nix wants to build the Phars from source rather than use the pre-built Phars from the Composer package maintainers 22:38:01
@drupol:matrix.orgPol I think Jan Tojnar might ! 22:38:33
@ramsey:matrix.orgramseyOh. You mean the Nix PHP maintainers?22:39:09
@drupol:matrix.orgPol
In reply to @ramsey:matrix.org
I'm trying to set up a development environment with nix pkgs, and Phive is one of the tools I need in that environment 🙂
You might want to have a look at what I use everyday: https://GitHub.com/loophp/nix-shell
22:39:26
@drupol:matrix.orgPol
In reply to @ramsey:matrix.org
Oh. You mean the Nix PHP maintainers?
Yes :)
22:39:37
@ramsey:matrix.orgramseyI thought you meant the PHP internals developers 🤣22:39:54
@drupol:matrix.orgPolSorry about the confusion22:40:04
@ramsey:matrix.orgramsey No worries 22:40:44
@drupol:matrix.orgPolGoing to turn off the lights here, I'll continue tomorrow 22:42:11
@drupol:matrix.orgPolIt's midnight, I need some sleep22:42:25
@ramsey:matrix.orgramseyGood night!22:56:37
@ramsey:matrix.orgramsey So, using php80Extensions.xdebug doesn't automatically add Xdebug to the php.ini file. How would I configure that in default.nix? 23:01:44
@ramsey:matrix.orgramseyI honestly have no idea what I'm doing 😆23:13:55
@ramsey:matrix.orgramseythis hasn't really helped me get set up: https://nixos.org/manual/nixpkgs/stable/#sec-php23:14:49
@ramsey:matrix.orgramsey

'cause clearly this is wrong:

{ pkgs ? import (fetchTarball "https://github.com/NixOS/nixpkgs/archive/bacbfd713b4781a4a82c1f390f8fe21ae3b8b95b.tar.gz") {} }:

php.buildEnv {
    extensions = { all, ... }: with all; [ xdebug ];
}
23:15:35
@ramsey:matrix.orgramsey (my default.nix) 23:15:49
@jtojnar:matrix.orgJan Tojnar
In reply to @ramsey:matrix.org

'cause clearly this is wrong:

{ pkgs ? import (fetchTarball "https://github.com/NixOS/nixpkgs/archive/bacbfd713b4781a4a82c1f390f8fe21ae3b8b95b.tar.gz") {} }:

php.buildEnv {
    extensions = { all, ... }: with all; [ xdebug ];
}
that should work (though you will also want to keep the enabled)
23:34:23

Show newer messages


Back to Room ListRoom Version: 6