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