refactor: switch to dotnet from nixpkgs

This commit is contained in:
Felix Schröter 2020-01-23 13:19:37 +01:00 committed by Felix Schroeter
parent b795aef8b2
commit 81ec695e2e

View file

@ -2,18 +2,10 @@
with pkgs; with pkgs;
let let
dotnetCorePackages = (import (fetchFromGitHub { dotnet-combined = with dotnetCorePackages; combinePackages [ sdk_3_1 sdk_2_1 ];
name = "nixos-pr-dotnet-combined"; dotnetRoot = "${dotnet-combined}/bin";
owner = "NixOS"; dotnetSdk = "${dotnet-combined}/sdk";
repo = "nixpkgs"; dotnetBinary = "${dotnetRoot}/dotnet";
rev = "ea6469760d3d75bbcb55670168d9ad37742dadfa";
sha256 = "1n9ax1fm8pfzc782zak9sh4acawwdwcdykzm7qyp6iis4dd2ld0l";
}) {}).dotnetCorePackages;
dotnet-combined = with dotnetCorePackages; combinePackages {
cli = sdk_3_1;
withSdks = [ sdk_2_1 sdk_3_1 ];
withRuntimes = [ sdk_2_1 sdk_3_1 ];
};
in in
{ {
nixpkgs.overlays = [ nixpkgs.overlays = [
@ -34,9 +26,9 @@ in
]; ];
home.sessionVariables = { home.sessionVariables = {
DOTNET_ROOT = "${dotnet-combined}/bin"; DOTNET_ROOT = dotnetRoot;
MSBuildSdksPath = "${dotnet-combined}/sdk/3.1.100/Sdks"; MSBuildSdksPath = "${dotnetSdk}/$(${dotnetBinary} --version)/Sdks";
MSBUILD_EXE_PATH = "${dotnet-combined}/sdk/3.1.100/MSBuild.dll"; MSBUILD_EXE_PATH = "${dotnetSdk}/$(${dotnetBinary} --version)/MSBuild.dll";
}; };
home.file.".omnisharp/omnisharp.json" = { home.file.".omnisharp/omnisharp.json" = {