initial
Some checks are pending
CI Tests / dotnet (push) Waiting to run
CI Tests / dotnet-1 (push) Waiting to run
CI Tests / dotnet-2 (push) Waiting to run
Emacs End-to-End Tests / ert (push) Waiting to run
Vim End-to-End Tests / themis (push) Waiting to run

This commit is contained in:
fwastring 2026-02-17 13:06:31 +01:00
commit baa0056244
352 changed files with 47928 additions and 0 deletions

68
default.nix Normal file
View file

@ -0,0 +1,68 @@
{
pkgs ? import <nixpkgs> { },
}:
let
psreadline = pkgs.fetchzip {
url = "https://www.powershellgallery.com/api/v2/package/PSReadLine/2.4.5";
sha256 = "12pwy5b426lv7cmlasa7ajy202a0vjjs9drfyg2q5zwqxhj8g8cz";
stripRoot = false;
};
psscriptanalyzer = pkgs.fetchzip {
url = "https://www.powershellgallery.com/api/v2/package/PSScriptAnalyzer/1.24.0";
sha256 = "03bz9f5rcx749758h6l9wsv86300s0a34qgd522v6166crbpvg2p";
stripRoot = false;
};
invokebuild = pkgs.fetchzip {
url = "https://www.powershellgallery.com/api/v2/package/InvokeBuild/5.12.2";
sha256 = "0cry70c6ndlv4y0fmlg5iip0ix1r51p7i6dxx3y2zzczbkz2mn6m";
stripRoot = false;
};
platyps = pkgs.fetchzip {
url = "https://www.powershellgallery.com/api/v2/package/platyPS/0.14.2";
sha256 = "13m11mf42blcn2327m9a4dqfg8sgjjg1vg9dmiwvnbq7wpam260q";
stripRoot = false;
};
in
pkgs.stdenv.mkDerivation {
pname = "powershell-editor-services";
version = "4.4.0";
src = ./.;
nativeBuildInputs = [
pkgs.dotnet-sdk_8
pkgs.git
pkgs.powershell
];
buildPhase = ''
export HOME=$TMPDIR
export DOTNET_CLI_TELEMETRY_OPTOUT=1
export NUGET_PACKAGES=$TMPDIR/nuget
git init -q
git config user.email "nix@local"
git config user.name "nix"
git add -A
git commit -qm "nix build"
mkdir -p module
cp -r ${psreadline} module/PSReadLine
cp -r ${psscriptanalyzer} module/PSScriptAnalyzer
mkdir -p $TMPDIR/psmodules
cp -r ${invokebuild} $TMPDIR/psmodules/InvokeBuild
cp -r ${platyps} $TMPDIR/psmodules/platyPS
export PSModulePath="$TMPDIR/psmodules${"PSModulePath:+:$PSModulePath"}"
pwsh -NoLogo -NoProfile -Command \
"Import-Module InvokeBuild; Invoke-Build -File PowerShellEditorServices.build.ps1 -Task AssembleModule -Configuration Release"
'';
installPhase = ''
mkdir -p $out/share/powershell/Modules
cp -r module/* $out/share/powershell/Modules/
'';
}