!jngDrdMgndWibPCYsR:nixos.org

Nix PHP

80 Members
A room for PHP developers running on Nix22 Servers

Load older messages


SenderMessageTime
28 Mar 2023
@etu:failar.nuetuThen we also bump the default PHP used right after the XX.05 release to figure out what breaks before the XX.11 release 🙂08:08:47
@philipp:xndr.dephilippAlso PHP 7.4 isn't just deprecated. It's eol. What is deprecated is php 8.008:13:33
@etu:failar.nuetuSo PHP 8.0 will be dropped May or so just to find breaking points. :)08:15:21
@etu:failar.nuetu * The reason we drop it right after the XX.05 release is that it gives time to figure out everything that breaks of the removal before the XX.11 release 🙂 08:15:36
@drupol:matrix.orgPolWhat's wrong with what I did ?09:07:49
@philipp:xndr.dephilipp I actually think that it would be better to use php in the function header and then set the version in callPackage is a better way to do it. Also I wouldn't overwrite the php version away from the global default in nixpkgs (php81) unless there is a specific reason to do it. 09:14:57
@philipp:xndr.dephilippI put my remarks in the nixpkgs pr where they belong...09:17:11
@drupol:matrix.orgPolNice, very good idea.09:37:25
@drupol:matrix.orgPol I also replicated that in n98-magerun 09:37:33
@drupol:matrix.orgPolThe commit is also inside that PR, I guess it's not an issue.09:37:46
@drupol:matrix.orgPolhttps://github.com/NixOS/nixpkgs/pull/22336509:37:49
@Zevran:matrix.orgGaël Reyrol Pol: there is nothing wrong, etu kind of headed where I wanted to but I wasn't enough explicit! 09:57:32
@drupol:matrix.orgPoloki09:58:28
@drupol:matrix.orgPol philipp: Feel free to let me know if it's better now 13:29:29
29 Mar 2023
@drupol:matrix.orgPol

Hey PHPers,
I checked how a Rust package is packaged in NixOS.
Rust packages are similar to PHP, it contains Cargo files. One of those two files is Cargo.lock which is used to lock the dependencies, just like composer.lock.
Look how easy it is to package a Rust app: https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/typesetting/typst/default.nix

Do you think we can do something similar but for PHP ?

07:18:42
@drupol:matrix.orgPol *

Hey PHPers,
I checked how a Rust package is packaged in NixOS.
Rust packages are similar to PHP, it contains Cargo files. One of those two files is Cargo.lock which is used to lock the dependencies, just like composer.lock.
Look how easy it is to package a Rust app: https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/typesetting/typst/default.nix

Do you think we can do something similar but for PHP ?

07:21:45
@drupol:matrix.orgPol *

Hey PHPers,
I checked how a Rust package is packaged in NixOS.
Rust packages are similar to PHP, it contains Cargo files. One of those two files is Cargo.lock which is used to lock the dependencies, just like composer.lock.
Look how easy it is to package a Rust app: https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/typesetting/typst/default.nix

Do you think we can do something similar but for PHP ?

This is the file handling the import of the Cargo.lock: https://github.com/NixOS/nixpkgs/blob/master/pkgs/build-support/rust/import-cargo-lock.nix

07:23:31
@philipp:xndr.dephilipphttps://github.com/NixOS/nixpkgs/blob/nixos-22.11/pkgs/tools/networking/rustcat/default.nix This is an example of usage of this, right? What I really don't like about this method is that it completely hides all dependencies from the rest of the system.07:32:25
@ma27:nicht-so.sexyma27 AFAIU Pol was specifically talking about the approach where you import the Cargo.lock rather than using a FOD and this method doesn't have this flaw, correct? 07:35:28
@philipp:xndr.dephilippOh, that would be cool.07:35:51
@philipp:xndr.dephilippIs there an example of it's usage in nixpkgs somewhere?07:37:59
@ma27:nicht-so.sexyma27 Regarding the original question: without having taken a close look I think that this should be possible and I'd really like it (especially because I could get rid of at least one occurrence of composer2nix in my employer's deployment I guess). 07:38:43
@ma27:nicht-so.sexyma27in other words, congrats you got the job :P07:38:50
@philipp:xndr.dephilippYeah, if it works like that, I'd delighted to have it.07:40:00
@tgerbet:matrix.orgtgerbetI do not think it's possible, we do not always have the shasum in the composer lockfile07:43:34
@ma27:nicht-so.sexyma27
In reply to @tgerbet:matrix.org
I do not think it's possible, we do not always have the shasum in the composer lockfile
Doesn't each dependency in the lockfile have a source field with a content hash? But I may be missing your point :)
07:44:41
@tgerbet:matrix.orgtgerbet I remember correctly no, Composer does not set shasum for "Git" packages (even if it uses the GitHub API to download the package...) 07:52:56
@tgerbet:matrix.orgtgerbet * If I remember correctly no, Composer does not set shasum for "Git" packages (even if it uses the GitHub API to download the package...) 07:53:02
@philipp:xndr.dephilippSeems so, at least from the lock files I just checked.07:53:46
@philipp:xndr.dephilippBut builtins.fetchgit also doesn't require a shasum, right?07:54:54

Show newer messages


Back to Room ListRoom Version: 6