!jngDrdMgndWibPCYsR:nixos.org

Nix PHP

74 Members
A room for PHP developers running on Nix22 Servers

Load older messages


SenderMessageTime
16 Aug 2024
@drupol:matrix.orgPolimage.png
Download image.png
08:45:07
@rikudou:lemmings.worldrikudou@lemmings.worldYep, I've noticed08:45:11
@rikudou:lemmings.worldrikudou@lemmings.worldFixed09:07:17
@drupol:matrix.orgPolquick and nice ! :)09:23:00
@nebucatnetzer13:matrix.orgnebucatnetzer13
In reply to @drupol:matrix.org
Yes. I'm pretty sure there's room for improvements...

I found a bit of a hack that works, but it's basically the same as sharing the COMPOSER_CACHED_DIR between runners.
On the runner I then point it to the result as the cache dir and set the env var COMPOSER_CACHE_READ_ONLY=1

{
  lib,
  php83Packages,
  root,
  stdenvNoCC,
}:
let
  fs = lib.fileset;
  sourceFiles = fs.unions [
    (root + "/composer.json")
    (root + "/composer.lock")
  ];
  composerFiles = fs.toSource {
    fileset = sourceFiles;
    inherit root;
  };
in
stdenvNoCC.mkDerivation {
  name = "composer-dev-dependencies";
  src = composerFiles;
  nativeBuildInputs = [ php83Packages.composer ];
  buildPhase = ''
    export COMPOSER_HOME=$TMPDIR
    composer install --download-only --no-interaction --no-scripts --no-ansi --no-autoloader
  '';
  installPhase = ''
    mkdir -p $out/
    cp -r $COMPOSER_HOME/cache/files $out/
  '';
  dontFixup = true;
  outputHashAlgo = "sha256";
  outputHashMode = "recursive";
  outputHash = "sha256-b3RbFaiVPuSpG6jZjSwOjFGyWo/sSb91JLdtcIIv1C8=";
}
10:58:26
@nebucatnetzer13:matrix.orgnebucatnetzer13 set a profile picture.11:05:52
@nebucatnetzer13:matrix.orgnebucatnetzer13From the reaction I assume it's a stupid idea :)12:13:12
@drupol:matrix.orgPolnooooo12:43:40
@drupol:matrix.orgPolI mean, I don't know these stuff12:43:46
@drupol:matrix.orgPolSo I'm surprised we can do this12:43:51
@drupol:matrix.orgPolI would not judge it, I don't know it12:44:12
@nebucatnetzer13:matrix.orgnebucatnetzer13Easy, well we will see how it works out. Fixed output derivations are a bit of a pain to update, especially for non-nix people.12:49:26
@drupol:matrix.orgPolyep :912:50:47
@drupol:matrix.orgPol * yep :(12:50:49
17 Aug 2024
@piotrkwiecinski:matrix.orgpiotrkwiecinski I was able to fix 20 jobs yesterday https://github.com/piotrkwiecinski/php-src-nix/pull/108:50:43
@drupol:matrix.orgPolman, wow ! Impressive !!!08:51:45
@piotrkwiecinski:matrix.orgpiotrkwiecinskiThere is fair amount of copy/paste. For now I plan to ensure all of them are green and see I can simply it08:51:47
@drupol:matrix.orgPolsubmit the PR against loophp/php-src-nix08:52:07
@drupol:matrix.orgPolIf you want I can make you maintainer too08:52:15
@piotrkwiecinski:matrix.orgpiotrkwiecinskiI'll PR it against loophp once it's ready. If you don't mind me being a maintainer. I'm happy to help.08:55:20
@piotrkwiecinski:matrix.orgpiotrkwiecinskiI'm going to use php for at least a couple years08:55:53
@piotrkwiecinski:matrix.orgpiotrkwiecinskiI start to think maybe we should rework patches in nixpkgs09:44:03
@piotrkwiecinski:matrix.orgpiotrkwiecinskiOverlay relies on https://github.com/piotrkwiecinski/php-src-nix/blob/main/src/makePhpPackage.nix#L1309:45:15
@piotrkwiecinski:matrix.orgpiotrkwiecinskithis means version specific patches from nixpkgs aren't applied09:45:36
@piotrkwiecinski:matrix.orgpiotrkwiecinskiwe would have to move https://github.com/piotrkwiecinski/nixpkgs/blob/fa088a9477b35d8e36c8204c35fc574eaffe0190/pkgs/development/interpreters/php/8.1.nix#L7-L31 to generic.nix09:46:12
@piotrkwiecinski:matrix.orgpiotrkwiecinskiit would make backporting easier09:46:28
@drupol:matrix.orgPolyeah there are some improvements to be made.18:09:57
@drupol:matrix.orgPolJust added you as maintainer18:10:03
@piotrkwiecinski:matrix.orgpiotrkwiecinskiGot it. Thank you. I have 59 builds passing. Still 49 to go. It'll probably take at least a couple days.18:18:25
@drupol:matrix.orgPolthere's no hurry18:44:07

Show newer messages


Back to Room ListRoom Version: 6