Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion src/modules/languages/dotnet.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,21 @@ in
{
options.languages.dotnet = {
enable = lib.mkEnableOption "tools for .NET development";

package = lib.mkOption {
type = lib.types.package;
default = pkgs.dotnetCorePackages.sdk_7_0;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According to the manual:

dotnetCorePackages.sdk contains both a runtime and the full sdk of a given version

Should be a good default package, however, we don't have a generic dotnetCorePackages.sdk package pointing to the latest release. This is why I set 7.0 as the default one.

defaultText = lib.literalExpression "pkgs.dotnet-sdk";
description = "The .NET SDK package to use.";
};
};

config = lib.mkIf cfg.enable {
packages = with pkgs; [
dotnet-sdk
cfg.package
];

env.DOTNET_ROOT = "${cfg.package}";
env.LD_LIBRARY_PATH = "$LD_LIBRARY_PATH:${lib.makeLibraryPath [ pkgs.icu ]}";
};
}