!jngDrdMgndWibPCYsR:nixos.org

Nix PHP

76 Members
A room for PHP developers running on Nix21 Servers

Load older messages


SenderMessageTime
29 Mar 2023
@ma27:nicht-so.sexyma27 that won't be doable in nixpkgs then, tl;dr for why we use e.g. pkgs.fetchgit rather than builtins.fetchgit: https://discourse.nixos.org/t/replace-nixpkgs-fetchers-with-nix-builtins-fetchers/26106 08:14:37
@ma27:nicht-so.sexyma27
In reply to @tgerbet:matrix.org
If I remember correctly no, Composer does not set shasum for "Git" packages (even if it uses the GitHub API to download the package...)
oof, I looked at the wrong key, namely content and not shasum... good morning ma27 (and sorry for the confusion!) 🙃
08:15:52
@ma27:nicht-so.sexyma27unless we manage to sneak this into composer somehow I doubt that it'll be feasible (as it is with Rust for instance)08:18:13
@drupol:matrix.orgPol changed their profile picture.08:34:02
@drupol:matrix.orgPolCatching up the backlog, got in a meeting. Reading your messages.08:37:31
@drupol:matrix.orgPol
In reply to @philipp:xndr.de
Is there an example of it's usage in nixpkgs somewhere?
here? https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/typesetting/typst/default.nix
08:38:56
@drupol:matrix.orgPol
In reply to @tgerbet:matrix.org
I do not think it's possible, we do not always have the shasum in the composer lockfile
We can ask Jordi to add it :)
08:39:18
@tgerbet:matrix.orgtgerbet Hum yes but it would take a while to propagate to the whole ecosystem and it is likely on purpose. You do not get the same content if you --prefer-dist or --prefer-source 08:41:28
@drupol:matrix.orgPolAh ?!08:42:23
@philipp:xndr.dephilipp Oh, it's even documented! https://nixos.org/manual/nixpkgs/stable/#rust They seem to have the same problem with git hashes and solve it by providing them in the call tho cargoLock. 08:42:53
@drupol:matrix.orgPol Therefore, buildRustPackage also supports vendoring dependencies directly from a Cargo.lock file using the cargoLock argument. This will retrieve the dependencies using fixed-output derivations from the specified lockfile. 08:45:02
@drupol:matrix.orgPolWe should do that for PHP :)08:45:10
@philipp:xndr.dephilipp * Oh, it's even documented! https://nixos.org/manual/nixpkgs/stable/#rust They seem to have the same problem with git hashes and solve it by providing them in the call to cargoLock. 08:48:40
@tgerbet:matrix.orgtgerbet
In reply to @drupol:matrix.org
Ah ?!
Yes, when using prefer-dist Composer will try to get the tarball directly from GH/GL/whatever which will use the export-ignorethat the dep might have set in .gitattributes. When using prefer-source it will do a git clone directly
08:50:17
@drupol:matrix.orgPol
In reply to @tgerbet:matrix.org
Yes, when using prefer-dist Composer will try to get the tarball directly from GH/GL/whatever which will use the export-ignorethat the dep might have set in .gitattributes. When using prefer-source it will do a git clone directly
We could imagine to have rules. If we want to have Nix to build a PHP library or app, the composer.json must have been built using --prefer-source (or whatever). Since this lock file must be in Nix, it's fine.
08:51:42
@drupol:matrix.orgPol See here, the Cargo.lock is inside nixpkgs: https://github.com/NixOS/nixpkgs/tree/master/pkgs/tools/typesetting/typst 08:52:18
@drupol:matrix.orgPolI had a meeting with Dan Leech this morning, he needed some help with Nix. I told him about the deprecations I had when using phpbench with php81. He told me he's going to bump the proper dependency and do a new release today. I'm going to set my PR in draft until there.08:53:30
@drupol:matrix.orgPol(Dan Leech is the author of PHPBench)08:54:41
@tgerbet:matrix.orgtgerbetYes but that means that during lockfile generation Composer will always be forced to get the dist tarball, unpack it and then compute the checksum to put it in the lockfile I'm not sure Composer will be willing to always do that due to the performance implication and that you are more likely to reach the rate limits of the platform09:56:06
@philipp:xndr.dephilipp tgerbet: What about doing it like the cargo implementation and adding the missing hashes to the nix file? 09:57:49
@tgerbet:matrix.orgtgerbetIn our case it would like be all/the majority of the deps so at this point it is not really different than what composer2nix does 😄09:59:07
3 Apr 2023
@drupol:matrix.orgPolCan we move on with this issue? https://github.com/NixOS/nixpkgs/pull/22184506:45:03
@drupol:matrix.orgPolThere's also this issue: https://github.com/NixOS/nixpkgs/issues/224457 I guess there is nothing to mention on our side?13:21:57
@drupol:matrix.orgPolIt would be nice to have that PR though https://github.com/NixOS/nixpkgs/pull/221845 !13:22:11
@tgerbet:matrix.orgtgerbet
In reply to @drupol:matrix.org
There's also this issue: https://github.com/NixOS/nixpkgs/issues/224457 I guess there is nothing to mention on our side?
Maybe we could switch the default php to 8.2 and we need to drop 8.0 because it will be outside the security support window upstream before 23.05
13:38:25
@drupol:matrix.orgPolimage.png
Download image.png
13:40:09
@drupol:matrix.orgPolThe current version is 8.1. Let me check the EOL 13:40:22
@drupol:matrix.orgPolhttps://www.php.net/supported-versions.php13:40:37
@drupol:matrix.orgPolUntil 25 Nov 2023(in 7 months)13:41:14
@drupol:matrix.orgPolShould we switch to 8.2 ? I don't know.13:41:22

Show newer messages


Back to Room ListRoom Version: 6