nixpkgs/pkgs/development/tools/omnisharp-roslyn/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

47 lines
1.3 KiB
Nix
Raw Normal View History

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