Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{
2 lib,
3 fetchFromGitHub,
4 php,
5 versionCheckHook,
6}:
7
8php.buildComposerProject2 (finalAttrs: {
9 pname = "php-cs-fixer";
10 version = "3.73.1";
11
12 src = fetchFromGitHub {
13 owner = "PHP-CS-Fixer";
14 repo = "PHP-CS-Fixer";
15 tag = "v${finalAttrs.version}";
16 hash = "sha256-1sivnmQDqyYVimac6yjKHTGSmJlx9WFCoQJXiZVce9Y=";
17 };
18
19 # Upstream doesn't provide a composer.lock.
20 # More info at https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues/7590
21 composerLock = ./composer.lock;
22 vendorHash = "sha256-ywJ2Gj9vMeu1pOg2UtfWDaxU+mpt/ay5KNQiWZGm6h4=";
23
24 doInstallCheck = true;
25 nativeInstallCheckInputs = [ versionCheckHook ];
26 versionCheckProgramArg = "--version";
27
28 meta = {
29 broken = lib.versionOlder php.version "8.2" || lib.versionAtLeast php.version "8.4";
30 changelog = "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/releases/tag/v${finalAttrs.version}";
31 description = "Tool to automatically fix PHP coding standards issues";
32 homepage = "https://cs.symfony.com/";
33 license = lib.licenses.mit;
34 mainProgram = "php-cs-fixer";
35 teams = [ lib.teams.php ];
36 };
37})