powershell-es/default.nix
fwastring 7f29c36557
Some checks failed
Vim End-to-End Tests / themis (push) Has been cancelled
CI Tests / dotnet (push) Has been cancelled
CI Tests / dotnet-1 (push) Has been cancelled
CI Tests / dotnet-2 (push) Has been cancelled
Emacs End-to-End Tests / ert (push) Has been cancelled
changed install
2026-02-18 13:31:44 +01:00

37 lines
1.3 KiB
Nix

{
stdenvNoCC,
fetchzip,
lib,
powershell,
runtimeShell,
}:
stdenvNoCC.mkDerivation rec {
pname = "powershell-editor-services";
version = "4.4.0";
src = fetchzip {
url = "https://github.com/PowerShell/PowerShellEditorServices/releases/download/v${version}/PowerShellEditorServices.zip";
hash = "sha256-tmz6xkcF44xnG5VwSeHNWzjRQK6wxQ7Ii6mDNisCMb8=";
stripRoot = false;
};
installPhase = ''
mkdir -p $out/share/powershell/Modules $out/bin
mv PowerShellEditorServices $out/share/powershell/Modules/
cat > $out/bin/powershell-editor-services <<EOF
#! ${runtimeShell} -e
exec ${lib.getExe' powershell "pwsh"} -noprofile -nologo -c "& '$out/share/powershell/Modules/PowerShellEditorServices/Start-EditorServices.ps1' \$@"
EOF
chmod +x $out/bin/powershell-editor-services
'';
meta = {
description = "Common platform for PowerShell development support in any editor or application";
homepage = "https://github.com/PowerShell/PowerShellEditorServices";
changelog = "https://github.com/PowerShell/PowerShellEditorServices/releases/tag/v${version}";
platforms = lib.platforms.unix;
license = lib.licenses.mit;
mainProgram = "powershell-editor-services";
sourceProvenance = with lib.sourceTypes; [ binaryBytecode ];
};
}