mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-08 14:03:29 +00:00
fb2e1920b2
This fixes the generation of bash completion by patching the shebang of the phpactor script before the generation is excuted.
40 lines
930 B
Nix
40 lines
930 B
Nix
{ lib
|
|
, fetchFromGitHub
|
|
, installShellFiles
|
|
, php
|
|
}:
|
|
|
|
php.buildComposerProject (finalAttrs: {
|
|
pname = "phpactor";
|
|
version = "2024.06.30.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "phpactor";
|
|
repo = "phpactor";
|
|
rev = finalAttrs.version;
|
|
hash = "sha256-QcKkkgpWWypapQPawK1hu+6tkF9c5ICPeEPWqCwrUBM=";
|
|
};
|
|
|
|
vendorHash = "sha256-onUhRO6d2osf7n5QlYY86eamlCCslQMVltAv1shskgI=";
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
postPatch = ''
|
|
patchShebangs bin/phpactor
|
|
'';
|
|
|
|
postInstall = ''
|
|
installShellCompletion --cmd phpactor \
|
|
--bash <($out/bin/phpactor completion bash)
|
|
'';
|
|
|
|
meta = {
|
|
changelog = "https://github.com/phpactor/phpactor/releases/tag/${finalAttrs.version}";
|
|
description = "Mainly a PHP Language Server";
|
|
homepage = "https://github.com/phpactor/phpactor";
|
|
license = lib.licenses.mit;
|
|
mainProgram = "phpactor";
|
|
maintainers = lib.teams.php.members;
|
|
};
|
|
})
|