| 7 Apr 2023 |
Jan Tojnar | ugh, that will not be reproducible then, GitHub filters out stuff from the tarballs according to .gitattributes so dist archives will commonly be different from vcs checkout | 11:33:13 |
tgerbet | Yep and it's something that is often used in the packages to filter out tests in the dist tarballs for example | 11:34:52 |
| 9 Apr 2023 |
Pol | I'm going to try to build a builder for PHP apps, where would you add this new function ? In which file? Any advice are good here :) | 08:43:29 |
Pol | Oh my. | 09:42:54 |
Pol | I got it working. | 09:42:57 |
Pol | Here's what I succeeded to do in 30 minutes:
{ buildPHPproject, fetchFromGitHub, makeWrapper, lib, php, tree }:
buildPHPproject rec {
inherit php;
pname = "grumphp";
version = "1.15.0";
src = fetchFromGitHub {
owner = "phpro";
repo = "grumphp";
rev = "v${version}";
hash = "sha256-EIGIoImRKR1Mc7oFXIzuLD3S1zx9WtHwDX0ST1T4BH0=";
};
vendorOutputHash = "sha256-TGGwRh7NSBKqt43GpmS7zY6togyEkEk/6wf2ys18OF8=";
postInstall = ''
ln -s $out/share/php/${pname}/bin/${pname} $out/bin/${pname}
'';
}
| 09:43:29 |
Pol | I don't know what you think, but I just found this amazing for the PHP ecosystem ! | 09:44:07 |
Pol | * Here's what I succeeded to do in 30 min, with the grumphp derivation as example:
{ buildPHPproject, fetchFromGitHub, makeWrapper, lib, php, tree }:
buildPHPproject rec {
inherit php;
pname = "grumphp";
version = "1.15.0";
src = fetchFromGitHub {
owner = "phpro";
repo = "grumphp";
rev = "v${version}";
hash = "sha256-EIGIoImRKR1Mc7oFXIzuLD3S1zx9WtHwDX0ST1T4BH0=";
};
vendorOutputHash = "sha256-TGGwRh7NSBKqt43GpmS7zY6togyEkEk/6wf2ys18OF8=";
postInstall = ''
ln -s $out/share/php/${pname}/bin/${pname} $out/bin/${pname}
'';
}
| 09:46:19 |
Pol | * Here's what I succeeded to do in 30 min, with the grumphp derivation as example:
{ buildPHPproject, fetchFromGitHub, lib, php }:
buildPHPproject rec {
inherit php;
pname = "grumphp";
version = "1.15.0";
src = fetchFromGitHub {
owner = "phpro";
repo = "grumphp";
rev = "v${version}";
hash = "sha256-EIGIoImRKR1Mc7oFXIzuLD3S1zx9WtHwDX0ST1T4BH0=";
};
vendorOutputHash = "sha256-TGGwRh7NSBKqt43GpmS7zY6togyEkEk/6wf2ys18OF8=";
postInstall = ''
ln -s $out/share/php/${pname}/bin/${pname} $out/bin/${pname}
'';
}
| 09:46:52 |
Pol | * Here's what I succeeded to do in 30 min, with the grumphp derivation as example:
{ buildPHPproject, fetchFromGitHub, lib }:
buildPHPproject rec {
pname = "grumphp";
version = "1.15.0";
src = fetchFromGitHub {
owner = "phpro";
repo = "grumphp";
rev = "v${version}";
hash = "sha256-EIGIoImRKR1Mc7oFXIzuLD3S1zx9WtHwDX0ST1T4BH0=";
};
vendorOutputHash = "sha256-TGGwRh7NSBKqt43GpmS7zY6togyEkEk/6wf2ys18OF8=";
postInstall = ''
cd $out
ln -s $out/share/php/${pname}/bin/${pname} $out/bin/${pname}
'';
meta = with lib; {
changelog = "https://github.com/phpro/grumphp/releases/tag/v${version}";
description = "A PHP code-quality tool";
homepage = "https://github.com/phpro/grumphp";
license = licenses.mit;
maintainers = teams.php.members;
};
}
| 09:49:48 |
Pol | I pushed my draft here: https://github.com/NixOS/nixpkgs/pull/225401 | 09:58:06 |
Pol | My Easter sunday starts very well :D | 09:59:46 |
Pol | I'm pretty sure the excitement will drop down after some reviews anyway :D | 10:00:02 |
| Pol invited @shyim-5532ae2f15522ed4b3df33d3:gitter.im. | 17:47:02 |
| Shyim joined the room. | 17:47:49 |
Pol | Jan Tojnar: I tried the finalAttrs: pattern... but I can't get it to work. | 19:06:45 |
Pol | Redacted or Malformed Event | 19:10:32 |
Pol | Jan Tojnar: I can't use the builder outside of the PHP packages scope... example, how can I use buildPHPproject for PHPActor ? (https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/tools/phpactor/default.nix) | 19:17:36 |
Pol | When I try to add it in the first line, I get: | 19:17:53 |
Pol | error: evaluation aborted with the following error message: 'Function called without required argument "buildPHPproject" at /nix/store/qa7zxpw9g2qixsqblaga7hsasqhs65kb-source/pkgs/development/tools/phpactor/default.nix:1' | 19:18:24 |
| 10 Apr 2023 |
Jan Tojnar | Pol: it is defined inside php.packages scope | 09:20:49 |
Jan Tojnar | not top-level | 09:20:57 |
Pol | How should I call this for phpactor which is out of the php.packages scope then ? | 09:33:23 |
Jan Tojnar | take php as argument to the package and use php.packages.buildPhpProject | 09:34:58 |
| 11 Apr 2023 |
Pol | Jan Tojnar: I tried, doesn't work at all. I don't know what's the problem | 07:06:51 |
Pol |  Download image.png | 07:17:43 |
Pol | And the source: | 07:18:22 |
Pol | { fetchFromGitHub php }:
php.packages.buildPHPproject rec {
pname = "phpactor";
version = "2023.01.21";
src = fetchFromGitHub {
owner = "phpactor";
repo = "phpactor";
rev = version;
hash = "sha256-jWZgBEaffjQ5wCStSEe+eIi7BJt6XAQFEjmq5wvW5V8=";
};
}
| 07:18:28 |
Pol | * { fetchFromGitHub, php }:
php.packages.buildPHPproject rec {
pname = "phpactor";
version = "2023.01.21";
src = fetchFromGitHub {
owner = "phpactor";
repo = "phpactor";
rev = version;
hash = "sha256-jWZgBEaffjQ5wCStSEe+eIi7BJt6XAQFEjmq5wvW5V8=";
};
}
| 07:18:38 |
Pol |  Download image.png | 07:51:03 |