add builttools as an option
This commit is contained in:
parent
04ccf5cdd4
commit
026f592b17
4 changed files with 46 additions and 9 deletions
40
modules/buildtools.nix
Normal file
40
modules/buildtools.nix
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
{
|
||||
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";
|
||||
};
|
||||
|
||||
config = lib.mkMerge [
|
||||
(lib.mkIf cfg.native
|
||||
{
|
||||
environment.systemPackages = with pkgs; [
|
||||
cmake
|
||||
gnumake
|
||||
gcc
|
||||
gdb
|
||||
];
|
||||
})
|
||||
(lib.mkIf cfg.dotnet {
|
||||
environment.systemPackages = with pkgs; [
|
||||
dotnet-sdk_8
|
||||
];
|
||||
})
|
||||
(lib.mkIf cfg.rust {
|
||||
environment.systemPackages = with pkgs; [
|
||||
cargo
|
||||
rustc
|
||||
rustfmt
|
||||
clippy
|
||||
cargo-generate
|
||||
];
|
||||
})
|
||||
];
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue