2021-01-23 13:26:19 +01:00
|
|
|
{ lib, stdenv
|
2019-04-11 23:45:02 +02:00
|
|
|
, fetchurl
|
2021-05-12 21:32:40 +02:00
|
|
|
, mono
|
2021-03-19 14:31:03 +01:00
|
|
|
, msbuild
|
|
|
|
, dotnet-sdk
|
2019-04-11 23:45:02 +02:00
|
|
|
, makeWrapper
|
2021-03-19 14:31:03 +01:00
|
|
|
, dotnetPackages
|
2019-04-11 23:45:02 +02:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "omnisharp-roslyn";
|
2021-04-02 16:59:08 +02:00
|
|
|
version = "1.37.8";
|
2020-05-24 15:09:15 +02:00
|
|
|
|
2019-04-11 23:45:02 +02:00
|
|
|
src = fetchurl {
|
|
|
|
url = "https://github.com/OmniSharp/omnisharp-roslyn/releases/download/v${version}/omnisharp-mono.tar.gz";
|
2021-04-02 16:59:08 +02:00
|
|
|
sha256 = "0kgv4l15rli9a7grmcsbv72csmxi7vqa7lrrr8bd4cq9ighh54q3";
|
2019-04-11 23:45:02 +02:00
|
|
|
};
|
|
|
|
|
2021-03-19 14:31:03 +01:00
|
|
|
nativeBuildInputs = [ makeWrapper dotnet-sdk dotnetPackages.Nuget ];
|
2019-04-11 23:45:02 +02:00
|
|
|
|
|
|
|
preUnpack = ''
|
|
|
|
mkdir src
|
|
|
|
cd src
|
|
|
|
sourceRoot=.
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/bin
|
|
|
|
cd ..
|
2020-11-22 06:59:26 +01:00
|
|
|
cp -r src $out/
|
2021-03-19 14:31:03 +01:00
|
|
|
rm -r $out/src/.msbuild
|
|
|
|
cp -r ${msbuild}/lib/mono/msbuild $out/src/.msbuild
|
|
|
|
|
|
|
|
chmod -R u+w $out/src
|
|
|
|
mv $out/src/.msbuild/Current/{bin,Bin}
|
|
|
|
|
2021-05-12 21:32:40 +02:00
|
|
|
makeWrapper ${mono}/bin/mono $out/bin/omnisharp \
|
2019-04-11 23:45:02 +02:00
|
|
|
--add-flags "$out/src/OmniSharp.exe"
|
|
|
|
'';
|
|
|
|
|
2021-01-23 13:26:19 +01:00
|
|
|
meta = with lib; {
|
2019-04-11 23:45:02 +02:00
|
|
|
description = "OmniSharp based on roslyn workspaces";
|
2020-05-24 15:09:15 +02:00
|
|
|
homepage = "https://github.com/OmniSharp/omnisharp-roslyn";
|
2019-04-11 23:45:02 +02:00
|
|
|
platforms = platforms.linux;
|
|
|
|
license = licenses.mit;
|
2021-03-19 14:31:03 +01:00
|
|
|
maintainers = with maintainers; [ tesq0 ericdallo ];
|
2019-04-11 23:45:02 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|