diff --git a/pkgs/development/compilers/roslyn/default.nix b/pkgs/development/compilers/roslyn/default.nix index dc98dce8b2b5..4fa028bc00ef 100644 --- a/pkgs/development/compilers/roslyn/default.nix +++ b/pkgs/development/compilers/roslyn/default.nix @@ -62,7 +62,6 @@ buildDotnetModule rec { description = ".NET C# and Visual Basic compiler"; homepage = "https://github.com/dotnet/roslyn"; mainProgram = "csc"; - platforms = platforms.linux; license = licenses.mit; maintainers = with maintainers; [ corngood ]; }; diff --git a/pkgs/development/tools/build-managers/msbuild/default.nix b/pkgs/development/tools/build-managers/msbuild/default.nix index afb07553eb00..83cdcead353f 100644 --- a/pkgs/development/tools/build-managers/msbuild/default.nix +++ b/pkgs/development/tools/build-managers/msbuild/default.nix @@ -21,6 +21,8 @@ let ''; + inherit (stdenv.hostPlatform.extensions) sharedLibrary; + in stdenv.mkDerivation rec { @@ -78,12 +80,18 @@ stdenv.mkDerivation rec { mv artifacts/msbuild artifacts/mono-msbuild chmod +x artifacts/mono-msbuild/MSBuild.dll - ln -s $(find ${dotnet-sdk} -name libhostfxr.so) artifacts/mono-msbuild/SdkResolvers/Microsoft.DotNet.MSBuildSdkResolver/ + # The provided libhostfxr.dylib is for x86_64-darwin, so we remove it + rm artifacts/mono-msbuild/SdkResolvers/Microsoft.DotNet.MSBuildSdkResolver/libhostfxr.dylib + + ln -s $(find ${dotnet-sdk} -name libhostfxr${sharedLibrary}) artifacts/mono-msbuild/SdkResolvers/Microsoft.DotNet.MSBuildSdkResolver/ # overwrite the file echo "#!${stdenv.shell}" > eng/common/dotnet-install.sh echo "#!${stdenv.shell}" > mono/build/get_sdk_files.sh + # Prevent msbuild from downloading a new libhostfxr + echo "#!${stdenv.shell}" > mono/build/extract_and_copy_hostfxr.sh + mkdir -p mono/dotnet-overlay/msbuild-bin cp ${dotnet-sdk}/sdk/*/{Microsoft.NETCoreSdk.BundledVersions.props,RuntimeIdentifierGraph.json} mono/dotnet-overlay/msbuild-bin @@ -102,7 +110,7 @@ stdenv.mkDerivation rec { --set-default MONO_GC_PARAMS "nursery-size=64m" \ --add-flags "$out/lib/mono/msbuild/15.0/bin/MSBuild.dll" - ln -s $(find ${dotnet-sdk} -name libhostfxr.so) $out/lib/mono/msbuild/Current/bin/SdkResolvers/Microsoft.DotNet.MSBuildSdkResolver/ + ln -s $(find ${dotnet-sdk} -name libhostfxr${sharedLibrary}) $out/lib/mono/msbuild/Current/bin/SdkResolvers/Microsoft.DotNet.MSBuildSdkResolver/ ''; doInstallCheck = true;