openra: patch to build with .NET 8 (from EOL .NET 6)

Upstream release-20250330 still targets net6.0, which went EOL in
November 2024. The bleed engine already uses .NET 8.

Patch Directory.Build.props to retarget net6.0 -> net8.0. The code
uses C# language version 9, which is compatible with .NET 8. Build
tested on x86_64-linux with no errors (only deprecation warnings
for SYSLIB0051, which also appear in the bleed build).

Related: https://github.com/NixOS/nixpkgs/issues/326335
This commit is contained in:
Jamie Magee
2026-02-13 14:25:53 -08:00
parent 6729837d81
commit 773dbb3e13
2 changed files with 7 additions and 1 deletions

View File

@@ -35,6 +35,12 @@ buildDotnetModule {
nugetDeps = engine.deps;
# Retarget from net6.0 to net8.0 (net6.0 is EOL)
postPatch = ''
substituteInPlace Directory.Build.props \
--replace-fail ">net6.0<" ">net8.0<"
'';
useAppHost = false;
dotnetFlags = [ "-p:Version=0.0.0.0" ]; # otherwise dotnet build complains, version is saved in VERSION file anyway

View File

@@ -5,5 +5,5 @@ buildOpenRAEngine {
version = "20250330";
hash = "sha256-chWkzn/NLZh2gOua9kE0ubRGjGCC0LvtZSWHBgXKqHw=";
deps = ./deps.json;
dotnet-sdk = dotnetCorePackages.sdk_6_0-bin;
dotnet-sdk = dotnetCorePackages.sdk_8_0;
}