| 12 Mar 2022 |
Pol | It's fine :D we're both newcomers! | 20:00:29 |
Pol | If you need anything, just ask, I'll try to help as best as I can. | 20:00:41 |
ramsey | Pol: Just stumbled across this PR: https://github.com/NixOS/nixpkgs/pull/158098 | 22:17:06 |
ramsey | I think it would be great to add Phive to the list of PHP tools (along with Composer) | 22:17:23 |
ramsey | I'm trying to set up a development environment with nix pkgs, and Phive is one of the tools I need in that environment 🙂 | 22:18:18 |
ramsey | Phive cannot be installed via Composer, so I have to manually download an install it | 22:19:11 |
ramsey | * Phive cannot be installed via Composer, so I have to manually download and install it | 22:19:19 |
ramsey | Also, it's becoming increasingly popular (and more reliable) to use the Phar versions of tools like PHPUnit, Psalm, PHPStan, etc., but the phar versions can't be added to require-dev and installed using Composer, so you have to download them individually for your dev environment | 22:22:29 |
ramsey | Phive helps us do this, so I'd be fine excluding PHPUnit, Psalm, PHPStan, etc. from Nix packages, as long as Phive is provided, so that we can easily download them for the environment | 22:23:20 |
ramsey | Although, there is this, which might allow installing Phars with Composer: https://packagist.org/packages/phar-io/composer-plugin | 22:24:38 |
Pol | I will focus on this tomorrow, it was on my to-do list! | 22:24:39 |
ramsey | So, if that package does the trick, then even adding a separate nix package for Phive might not be necessary | 22:25:05 |
ramsey | except they haven't updated it for the latest version of Composer, so it won't install ☹️ | 22:26:16 |
Pol | In reply to @ramsey:matrix.org Phive helps us do this, so I'd be fine excluding PHPUnit, Psalm, PHPStan, etc. from Nix packages, as long as Phive is provided, so that we can easily download them for the environment I fully agree. Some of those packages provide a SHIM version and it's just enough | 22:27:02 |
Pol | I'll check phive in depth tomorrow | 22:27:43 |
Pol | I wanted to also use phar versions of packages, but it's a bit against the practice in NixOS. | 22:28:49 |
Pol | Example: https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/php-packages/php-parallel-lint/default.nix | 22:30:07 |
Pol | This tool provides a Phar, but we are building it ourselves. | 22:30:31 |
Pol | I'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 | Is that because the Nix practice is to build them from source? | 22:32:19 |
Pol | Yes | 22:33:05 |
ramsey | oh, I see. That runs box build | 22:33:15 |
Pol | Yes | 22:33:41 |
ramsey | So, 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 |
Pol | Yes | 22:34:55 |
ramsey | I bet grahamc (he/him) could shed some light on that 🙂 | 22:35:26 |
Pol | Or the current PHP maintainers ! | 22:36:35 |
ramsey | 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 |
Pol | I think Jan Tojnar might ! | 22:38:33 |
ramsey | Oh. You mean the Nix PHP maintainers? | 22:39:09 |