2022-06-26 10:26:21 +00:00
|
|
|
{ lib, fetchFromGitHub, buildDotnetModule, dotnetCorePackages }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-07-14 22:03:04 +00:00
|
|
|
let
|
2022-06-26 10:26:21 +00:00
|
|
|
sdkVersion = dotnetCorePackages.sdk_6_0.version;
|
|
|
|
in
|
|
|
|
buildDotnetModule rec {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "omnisharp-roslyn";
|
2022-04-15 01:41:22 +00:00
|
|
|
version = "1.38.2";
|
2020-05-29 06:06:01 +00:00
|
|
|
|
2021-07-14 22:03:04 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "OmniSharp";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2022-04-15 01:41:22 +00:00
|
|
|
sha256 = "7XJIdotfffu8xo+S6xlc1zcK3oY9QIg1CJhCNJh5co0=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-06-26 10:26:21 +00:00
|
|
|
projectFile = "src/OmniSharp.Stdio.Driver/OmniSharp.Stdio.Driver.csproj";
|
|
|
|
nugetDeps = ./deps.nix;
|
|
|
|
|
|
|
|
dotnetInstallFlags = [ "--framework net6.0" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-03-30 09:31:56 +00:00
|
|
|
postPatch = ''
|
|
|
|
# Relax the version requirement
|
|
|
|
substituteInPlace global.json \
|
2022-06-26 10:26:21 +00:00
|
|
|
--replace '6.0.100' '${sdkVersion}'
|
2022-03-30 09:31:56 +00:00
|
|
|
'';
|
|
|
|
|
2022-06-26 10:26:21 +00:00
|
|
|
postFixup = ''
|
2022-04-27 09:35:20 +00:00
|
|
|
# Delete files to mimick hacks in https://github.com/OmniSharp/omnisharp-roslyn/blob/bdc14ca/build.cake#L594
|
2022-06-26 10:26:21 +00:00
|
|
|
rm $out/lib/omnisharp-roslyn/NuGet.*.dll
|
|
|
|
rm $out/lib/omnisharp-roslyn/System.Configuration.ConfigurationManager.dll
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "OmniSharp based on roslyn workspaces";
|
2020-05-29 06:06:01 +00:00
|
|
|
homepage = "https://github.com/OmniSharp/omnisharp-roslyn";
|
2022-03-05 16:20:37 +00:00
|
|
|
platforms = platforms.unix;
|
2022-06-26 10:26:21 +00:00
|
|
|
sourceProvenance = with sourceTypes; [
|
|
|
|
fromSource
|
|
|
|
binaryNativeCode # dependencies
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.mit;
|
2022-06-26 10:26:21 +00:00
|
|
|
maintainers = with maintainers; [ tesq0 ericdallo corngood mdarocha ];
|
|
|
|
mainProgram = "OmniSharp";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|