migrated all languages to devshell
This commit is contained in:
@@ -4,19 +4,33 @@
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
let
|
||||
packages = builtins.attrValues {
|
||||
inherit (pkgs)
|
||||
clang # C/C++ compiler frontend (part of LLVM)
|
||||
clang-tools # Extra LLVM tools (e.g. clang-tidy, clang-apply-replacements)
|
||||
gcc # GNU Compiler Collection (C, C++, etc.)
|
||||
gdb # GNU Debugger
|
||||
valgrind # Memory leak detector and performance profiler
|
||||
;
|
||||
};
|
||||
in
|
||||
{
|
||||
options.my.dev.cc.enable = lib.mkEnableOption "enable";
|
||||
|
||||
config = lib.mkIf config.my.dev.cc.enable {
|
||||
users.users.jawz.packages = builtins.attrValues {
|
||||
inherit (pkgs)
|
||||
clang # C/C++ compiler frontend (part of LLVM)
|
||||
clang-tools # Extra LLVM tools (e.g. clang-tidy, clang-apply-replacements)
|
||||
gcc # GNU Compiler Collection (C, C++, etc.)
|
||||
gdb # GNU Debugger
|
||||
valgrind # Memory leak detector and performance profiler
|
||||
;
|
||||
options = {
|
||||
my.dev.cc.enable = lib.mkEnableOption "Install C/C++ tooling globally";
|
||||
devShells.cc = lib.mkOption {
|
||||
type = lib.types.package;
|
||||
default = pkgs.mkShell {
|
||||
inherit packages;
|
||||
name = "cc-dev-shell";
|
||||
shellHook = ''
|
||||
echo "🔧 C/C++ dev environment"
|
||||
'';
|
||||
};
|
||||
description = "C/C++ development shell";
|
||||
};
|
||||
};
|
||||
config = lib.mkIf config.my.dev.cc.enable {
|
||||
users.users.jawz.packages = packages;
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user