Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 9b11e5c

Browse files
committedNov 30, 2024··
omnisharp-roslyn: bump from .NET 6 to 8, add support for 9
1 parent 4aea9c6 commit 9b11e5c

File tree

2 files changed

+748
-155
lines changed

2 files changed

+748
-155
lines changed
 
+737-141
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎pkgs/by-name/om/omnisharp-roslyn/package.nix

+11-14
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,12 @@
33
dotnetCorePackages,
44
fetchFromGitHub,
55
lib,
6-
stdenv,
76
runCommand,
87
expect,
98
}:
109

1110
let
12-
inherit (dotnetCorePackages) sdk_8_0 runtime_6_0;
11+
inherit (dotnetCorePackages) sdk_8_0 sdk_9_0 runtime_8_0;
1312
in
1413
let
1514
finalPackage = buildDotnetModule rec {
@@ -26,17 +25,12 @@ let
2625
projectFile = "src/OmniSharp.Stdio.Driver/OmniSharp.Stdio.Driver.csproj";
2726
nugetDeps = ./deps.nix;
2827

29-
dotnet-sdk =
30-
with dotnetCorePackages;
31-
combinePackages [
32-
sdk_6_0
33-
sdk_8_0
34-
];
28+
dotnet-sdk = sdk_8_0;
3529
dotnet-runtime = sdk_8_0;
3630

37-
dotnetInstallFlags = [ "--framework net6.0" ];
31+
dotnetInstallFlags = [ "--framework net8.0" ];
3832
dotnetBuildFlags = [
39-
"--framework net6.0"
33+
"--framework net8.0"
4034
"--no-self-contained"
4135
];
4236
dotnetFlags = [
@@ -45,7 +39,7 @@ let
4539
"-property:AssemblyVersion=${version}.0"
4640
"-property:FileVersion=${version}.0"
4741
"-property:InformationalVersion=${version}"
48-
"-property:RuntimeFrameworkVersion=${runtime_6_0.version}"
42+
"-property:RuntimeFrameworkVersion=${runtime_8_0.version}"
4943
"-property:RollForward=LatestMajor"
5044
];
5145

@@ -56,8 +50,11 @@ let
5650
# Patch the project files so we can compile them properly
5751
for project in src/OmniSharp.Http.Driver/OmniSharp.Http.Driver.csproj src/OmniSharp.LanguageServerProtocol/OmniSharp.LanguageServerProtocol.csproj src/OmniSharp.Stdio.Driver/OmniSharp.Stdio.Driver.csproj; do
5852
substituteInPlace $project \
59-
--replace '<RuntimeIdentifiers>win7-x64;win7-x86;win10-arm64</RuntimeIdentifiers>' '<RuntimeIdentifiers>linux-x64;linux-arm64;osx-x64;osx-arm64</RuntimeIdentifiers>'
53+
--replace-fail '<RuntimeIdentifiers>win7-x64;win7-x86;win10-arm64</RuntimeIdentifiers>' '<RuntimeIdentifiers>linux-x64;linux-arm64;osx-x64;osx-arm64</RuntimeIdentifiers>'
6054
done
55+
substituteInPlace src/OmniSharp.Stdio.Driver/OmniSharp.Stdio.Driver.csproj \
56+
--replace-fail 'net6.0' 'net8.0' \
57+
--replace-fail '<RuntimeFrameworkVersion>6.0.0-preview.7.21317.1</RuntimeFrameworkVersion>' ""
6158
'';
6259

6360
useDotnetFromEnv = true;
@@ -96,8 +93,8 @@ let
9693
in
9794
{
9895
# Make sure we can run OmniSharp with any supported SDK version, as well as without
99-
with-net6-sdk = with-sdk dotnetCorePackages.sdk_6_0;
100-
with-net8-sdk = with-sdk dotnetCorePackages.sdk_8_0;
96+
with-net8-sdk = with-sdk sdk_8_0;
97+
with-net9-sdk = with-sdk sdk_9_0;
10198
no-sdk = with-sdk null;
10299
};
103100

0 commit comments

Comments
 (0)
Please sign in to comment.