nixpkgs/home/programs/neovim/nix-plugins/phpactor.nix

43 lines
772 B
Nix
Raw Normal View History

{
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]}
'';
}