nixos-configuration/modules/buildtools.nix

87 lines
1.8 KiB
Nix
Raw Normal View History

2023-12-16 11:28:44 +01:00
{
pkgs,
lib,
config,
...
}: let
cfg = config.my.buildtools;
in {
options.my.buildtools = {
native = lib.mkEnableOption "include native build tools";
dotnet = lib.mkEnableOption "include dotnet build tools";
rust = lib.mkEnableOption "include rust build tools";
2023-12-25 12:06:50 +01:00
jetbrains-remote-server = lib.mkEnableOption "setup jetbrais IDE installs so -remote-dev-server can be started";
2024-02-23 22:27:52 +01:00
objective-c = lib.mkEnableOption "Objective-C with GNUStep";
2023-12-16 11:28:44 +01:00
};
config = lib.mkMerge [
(lib.mkIf cfg.native
{
environment.systemPackages = with pkgs; [
cmake
gnumake
gcc
gdb
2023-12-16 15:33:20 +01:00
llvmPackages_latest.llvm
llvmPackages.clangUseLLVM
2023-12-16 11:28:44 +01:00
];
})
(lib.mkIf cfg.dotnet {
2023-12-16 13:07:12 +01:00
environment = {
systemPackages = with pkgs; [
dotnet-sdk_8
2023-12-16 15:33:20 +01:00
2024-02-23 22:27:52 +01:00
zlib
zlib.dev
2023-12-16 15:33:20 +01:00
openssl
icu
2023-12-16 13:07:12 +01:00
];
variables = {
DOTNET_CLI_TELEMETRY_OPTOUT = "1";
};
};
2023-12-16 11:28:44 +01:00
})
(lib.mkIf cfg.rust {
environment.systemPackages = with pkgs; [
cargo
rustc
rustfmt
clippy
cargo-generate
];
})
2023-12-25 12:06:50 +01:00
(lib.mkIf cfg.jetbrains-remote-server {
environment.systemPackages = with pkgs.jetbrains; [
jdk # required for all of them
rider
clion
pycharm-professional
];
my.allowUnfreePackages = [
2024-02-23 22:27:52 +01:00
"rider"
"clion"
"pycharm-professional"
];
})
(lib.mkIf cfg.objective-c {
environment.systemPackages =
(with pkgs.gnustep; [
gui
make
gorm
base
back
system_preferences
projectcenter
libobjc
gworkspace
])
++ (with pkgs; [
clang-tools
clang
gnumake
]);
2023-12-25 12:06:50 +01:00
})
2023-12-16 11:28:44 +01:00
];
}