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.
This commit is contained in:
Daniel Siepmann 2023-04-11 07:43:26 +02:00
parent 6402359d3a
commit bd6c8adb7f
Signed by: Daniel Siepmann
GPG key ID: 33D6629915560EF4
4 changed files with 13 additions and 51 deletions

View file

@ -1,32 +0,0 @@
{
writeShellApplication,
php82,
php82Packages,
git
}:
writeShellApplication {
name = "custom-build-phpactor";
runtimeInputs = [
php82
php82Packages.composer
git
];
# TODO: Use nix build environment?!
text = ''
rm -rf /tmp/phpactor
mkdir /tmp/phpactor
cd /tmp/phpactor
git clone --depth 1 https://github.com/phpactor/phpactor.git .
composer install -o --no-dev
version=$(git show -s --format=%H)
rm -rf .git/
cd /tmp
tar -czf "phpactor-$version.tar.gz" phpactor
rsync -vaz "phpactor-$version.tar.gz" daniel-siepmann.de:webs/daniel-siepmann.de/htdocs/public/fileadmin/
cd /tmp
rm -rf /tmp/phpactor "phpactor-$version.tar.gz"
'';
}

View file

@ -9,7 +9,6 @@
(callPackage ./nextcloud-sync/from-local.nix { })
(callPackage ./nextcloud-sync/from-remote.nix { })
(callPackage ./typo3-documentation-rendering { })
(callPackage ./build-phpactor { })
(callPackage ./project {
inherit ownLib;
})

View file

@ -308,7 +308,7 @@ in {
require('lspconfig').phpactor.setup({
cmd = {
'${phpactor}/bin/phpactor',
'${pkgs.phpactor}/bin/phpactor',
'language-server',
},
})

View file

@ -1,22 +1,18 @@
{
vimUtils,
fetchurl,
makeWrapper,
lib,
php82,
php82Packages,
git
vimUtils
, makeWrapper
, lib
, phpactor
, php82
, php82Packages
, git
}:
let
pname = "phpactor";
version = "3e7cb48b0ca429f92bcd57c236c39f170e9d23b1";
in vimUtils.buildVimPluginFrom2Nix {
inherit pname version;
src = fetchurl {
url = "https://daniel-siepmann.de/fileadmin/${pname}-${version}.tar.gz";
sha256 = "JX6aLuzmJ4rrcG0FNgzt2zITmnRrpitUI591oPn+fhY=";
};
vimUtils.buildVimPluginFrom2Nix rec {
inherit (phpactor) version;
pname = "vim-phpactor";
src = "${phpactor}/share/php/phpactor";
nativeBuildInputs = [
makeWrapper
@ -39,7 +35,6 @@ in vimUtils.buildVimPluginFrom2Nix {
requirements.txt
'';
postInstall = ''
wrapProgram $out/bin/phpactor \
--prefix PATH : ${lib.strings.makeBinPath [ php82 php82Packages.composer git]}