Files
nixpkgs/pkgs/by-name/rz/rzls/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

74 lines
1.5 KiB
Nix

{
lib,
fetchFromGitHub,
buildDotnetModule,
dotnetCorePackages,
jq,
}:
let
pname = "rzls";
dotnet-sdk =
with dotnetCorePackages;
sdk_9_0
// {
inherit
(combinePackages [
sdk_9_0
sdk_8_0
])
packages
targetPackages
;
};
dotnet-runtime = dotnetCorePackages.runtime_9_0;
in
buildDotnetModule {
inherit pname dotnet-sdk dotnet-runtime;
src = fetchFromGitHub {
owner = "dotnet";
repo = "razor";
rev = "bde4f70c9560811a7f25023b9d8ac42fd7d0e99f";
hash = "sha256-wS7JKHLpX9/JluID94HXUkepaX9eoceRzuIofBICiBk=";
};
version = "10.0.0-preview.25464.2";
projectFile = "src/Razor/src/rzls/rzls.csproj";
useDotnetFromEnv = true;
nugetDeps = ./deps.json;
nativeBuildInputs = [ jq ];
postPatch = ''
# Upstream uses rollForward = latestPatch, which pins to an *exact* .NET SDK version.
jq '.sdk.rollForward = "latestMinor"' < global.json > global.json.tmp
mv global.json.tmp global.json
'';
dotnetFlags = [
# this removes the Microsoft.WindowsDesktop.App.Ref dependency
"-p:EnableWindowsTargeting=false"
"-p:PublishReadyToRun=false"
];
dotnetInstallFlags = [
"-p:InformationalVersion=$version"
];
passthru = {
updateScript = ./update.sh;
};
meta = {
homepage = "https://github.com/dotnet/razor";
description = "Razor language server";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [
bretek
tris203
];
mainProgram = "rzls";
};
}