!jngDrdMgndWibPCYsR:nixos.org

Nix PHP

77 Members
A room for PHP developers running on Nix22 Servers

Load older messages


SenderMessageTime
14 Feb 2024
@drupol:matrix.orgPolI hope we won't have to recalculate the hash of all PHP derivations :S07:43:30
@patka_123:matrix.org@patka_123:matrix.orgI hope not. But I can help with that and I guess it would just take a few hours at most08:03:18
@drupol:matrix.orgPolYeah I might need a bit of help on this08:04:10
@drupol:matrix.orgPolI'm curious to know if the proposed fix is appropriate08:04:22
@drupol:matrix.orgPolSo basically, this commit: https://github.com/composer/composer/pull/11850/commits/68e1ac0c3a2f61b8e711896bca8a40da09719e8d08:04:37
@drupol:matrix.orgPolThe idea is to let composer update those values if they hasn't been changed in the meantime.08:11:09
15 Feb 2024
@drupol:matrix.orgPolI'm looking for a review here (very easy): https://github.com/NixOS/nixpkgs/pull/28914621:29:09
@drupol:matrix.orgPolPHP bump available: https://github.com/NixOS/nixpkgs/pull/28913822:26:16
16 Feb 2024
@jtojnar:matrix.orgJan TojnarI have always done what philipp said. Having php picked up from PATH might work in theory but that breaks composer working without php on PATH (not sure how common that is)07:29:56
@jtojnar:matrix.orgJan Tojnar(well, we could have an executable that tries php from PATH, falling back to a hardcoded one but IME, this kiind of magic often leads to confusion)07:32:23
17 Feb 2024
@stephank:stephank.nlStéphanI wrote about dealing with private packages: https://stephank.nl/p/2024-02-17-using-nix-flake-inputs-with-php-composer.html20:43:41
@drupol:matrix.orgPol
In reply to @stephank:stephank.nl
I wrote about dealing with private packages: https://stephank.nl/p/2024-02-17-using-nix-flake-inputs-with-php-composer.html
Massive !
21:09:45
@patka_123:matrix.org@patka_123:matrix.orgNicely written! :D21:42:15
@drupol:matrix.orgPol
In reply to @drupol:matrix.org
Massive !

But it's also possible to set the correct version for a package in a path-repository. You just need to set the version property in composer.json of the dependency.

I think you could set COMPOSER_ROOT_VERSION too

23:10:10
18 Feb 2024
@stephank:stephank.nlStéphan
In reply to @drupol:matrix.org

But it's also possible to set the correct version for a package in a path-repository. You just need to set the version property in composer.json of the dependency.

I think you could set COMPOSER_ROOT_VERSION too

That only sets the version of the root, but I'm trying to fix a dependency version. Maybe it does work, though, because it should also affect packages in subdirs? Depends on if Composer resolves the symlinks I create in .flake-inputs. But also, it'd set everything to the same version, which wouldn't work in my case. Multiple packages versioned separately.
07:33:30
@drupol:matrix.orgPol It would be nice to have that in the nix documentation  07:35:36
@drupol:matrix.orgPol

Given this trivial derivation:

            (pkgs.php82.overrideAttrs (oldAttrs: {
              patches = oldAttrs.patches ++ [
                (pkgs.fetchurl {
                  url = "https://gist.githubusercontent.com/drupol/f7b9bbe134338e0ce5e2fdac7bf6de0b/raw/e32f364d7e9f5793a8bd874af84ee609368d0bf0/php-ec.patch";
                  hash = "sha256-rbuihwDMZOzlrGgBrDs9eY8God2B09jpeXZF43zYlN8=";
                })
              ];
            }))

Anybody has a clue on how I could see that a patch has been applied when generated the SBOM of the derivation?

To generate the SBOM, I use: https://github.com/nikstur/bombon

The odd thing is that I can see patches in the SBOM for other derivations, but not for PHP.

Do you have a lead, a clue, a suggestion?

10:08:09
@drupol:matrix.orgPolSame stuff with Composer which is currently patched for security at https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/php-packages/composer/default.nix10:15:14
@drupol:matrix.orgPolCreated an issue: https://github.com/nikstur/bombon/issues/7110:39:45
@drupol:matrix.orgPol patka: do you plan to update this PR https://github.com/NixOS/nixpkgs/pull/289625#event-11837388469 ? 10:43:11
@patka_123:matrix.org@patka_123:matrix.orgOh, thought I already did that. That was what the 👍 was for. But probably didn't push. Give me a sec10:44:22
@patka_123:matrix.org@patka_123:matrix.orgDone10:45:31
@drupol:matrix.orgPolMerci :)10:45:50
@drupol:matrix.orgPolMerged!10:46:27
19 Feb 2024
@drupol:matrix.orgPolyouhou ! 09:19:05
@drupol:matrix.orgPolhttps://github.com/NixOS/nixpkgs/pull/28582809:24:30
@drupol:matrix.orgPol I added the required logic to detect if a composer update needs to be triggered. Now, thanks to that, we can install correctly php-parallel-lint ! 09:25:03
@drupol:matrix.orgPol Elis 🌱: Now it's ready for review :D 09:25:13
@drupol:matrix.orgPol Why Psalm need COMPOSER_ROOT_VERSION : https://github.com/vimeo/psalm/issues/10721 20:59:09
@drupol:matrix.orgPol In Nix, when building a PHP derivation, the ``.gitfolder doesn't exist, therefore Composer is not able to infer the version... and it fails. SettingCOMPOSER_ROOT_VERSION` fix that. 21:06:07

Show newer messages


Back to Room ListRoom Version: 6