omnisharp-roslyn: fix outdated built-in msbuild for unity (#98435)

Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
This commit is contained in:
Eric Dallo 2021-03-19 10:31:03 -03:00 committed by GitHub
parent d00e4cd1fe
commit a48b87fda4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,7 +1,10 @@
{ lib, stdenv
, fetchurl
, mono5
, mono6
, msbuild
, dotnet-sdk
, makeWrapper
, dotnetPackages
}:
stdenv.mkDerivation rec {
@ -14,7 +17,7 @@ stdenv.mkDerivation rec {
sha256 = "0pknphydf194n7rjyax4mh8n7j8679j0jflw63gfgh37daxry0r2";
};
nativeBuildInputs = [ makeWrapper ];
nativeBuildInputs = [ makeWrapper dotnet-sdk dotnetPackages.Nuget ];
preUnpack = ''
mkdir src
@ -26,8 +29,13 @@ stdenv.mkDerivation rec {
mkdir -p $out/bin
cd ..
cp -r src $out/
ls -al $out/src
makeWrapper ${mono5}/bin/mono $out/bin/omnisharp \
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}
makeWrapper ${mono6}/bin/mono $out/bin/omnisharp \
--add-flags "$out/src/OmniSharp.exe"
'';
@ -36,7 +44,7 @@ stdenv.mkDerivation rec {
homepage = "https://github.com/OmniSharp/omnisharp-roslyn";
platforms = platforms.linux;
license = licenses.mit;
maintainers = with maintainers; [ tesq0 ];
maintainers = with maintainers; [ tesq0 ericdallo ];
};
}