nixpkgs/home/programs/neovim/nix-plugins/phpactor.nix
Daniel Siepmann bd6c8adb7f
Use upstream phpactor
phpactor was added to upstream.
This only included the lsp usable package, not vim plugin.

I no longer need my own build script as I now use the upstream version.
That way I benefit from all the maintenance and updates.

I use the package source to build the neovim plugin.
2023-04-11 07:43:26 +02:00

43 lines
772 B
Nix

{
vimUtils
, makeWrapper
, lib
, phpactor
, php82
, php82Packages
, git
}:
vimUtils.buildVimPluginFrom2Nix rec {
inherit (phpactor) version;
pname = "vim-phpactor";
src = "${phpactor}/share/php/phpactor";
nativeBuildInputs = [
makeWrapper
];
prePatch = ''
rm -rf .github/ tests/ \
.gitignore \
.php-cs-fixer.dist.php \
CHANGELOG.md \
composer.json \
LICENSE \
Makefile \
phpactor.schema.json \
phpbench.json \
phpstan-baseline.neon \
phpstan.neon \
phpunit.xml.dist \
README.md \
requirements.txt
'';
postInstall = ''
wrapProgram $out/bin/phpactor \
--prefix PATH : ${lib.strings.makeBinPath [ php82 php82Packages.composer git]}
'';
}