python-language-server: cleanup deps, add missing phase hooks

also improve script a little bit
This commit is contained in:
Felix Rath
2021-05-15 16:20:43 -07:00
committed by Jonathan Ringer
parent d3b00c99a9
commit d68e0569a0
4 changed files with 12 additions and 100 deletions
@@ -62,6 +62,8 @@ stdenv.mkDerivation {
];
buildPhase = ''
runHook preBuild
mkdir home
export HOME=$(mktemp -d)
export DOTNET_CLI_TELEMETRY_OPTOUT=1
@@ -75,14 +77,20 @@ stdenv.mkDerivation {
pushd src/LanguageServer/Impl
dotnet publish --no-restore -c Release -r linux-x64
popd
runHook postBuild
'';
installPhase = ''
runHook preInstall
mkdir -p $out
cp -r output/bin/Release/linux-x64/publish $out/lib
mkdir $out/bin
makeWrapper $out/lib/Microsoft.Python.LanguageServer $out/bin/python-language-server
runHook postInstall
'';
postFixup = ''