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:
parent
6402359d3a
commit
bd6c8adb7f
|
@ -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"
|
||||
'';
|
||||
}
|
|
@ -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;
|
||||
})
|
||||
|
|
|
@ -308,7 +308,7 @@ in {
|
|||
|
||||
require('lspconfig').phpactor.setup({
|
||||
cmd = {
|
||||
'${phpactor}/bin/phpactor',
|
||||
'${pkgs.phpactor}/bin/phpactor',
|
||||
'language-server',
|
||||
},
|
||||
})
|
||||
|
|
|
@ -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]}
|
||||
|
|
Loading…
Reference in a new issue