Skip to content

Commit

Permalink
feat: allow override gcc
Browse files Browse the repository at this point in the history
  • Loading branch information
Bot-wxt1221 authored Aug 27, 2024
1 parent 08a8a3d commit 04de203
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,7 @@ Or with customization of options:
- extraPlugins
- extraPackages
- extraConfig
- gcc
- lazy-lock
- hm-activation
- backup
Expand Down Expand Up @@ -327,6 +328,12 @@ Overriding the option will expand this list.

The config written in lua. It will be loaded after nvchad loaded.

##### gcc (optional)

`pkg.gcc`

The gcc compiler you want to use

##### lazy-lock (optional)

`string`
Expand Down
6 changes: 6 additions & 0 deletions nix/module.nix
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ let
nvchad = pkgs.callPackage ./nvchad.nix {
neovim = cfg.neovim;
extraPackages = cfg.extraPackages;
gcc_new = cfg.gcc;
starterRepo = nvchad-starter;
extraConfig = cfg.extraConfig;
lazy-lock = cfg.lazy-lock;
Expand Down Expand Up @@ -64,6 +65,11 @@ in
default = "";
description = "These config are loaded after nvchad in the end of init.lua in starter";
};
gcc = mkOption {
type = types.package;
default = pkgs.gcc;
description = "The gcc you want to use";
};
lazy-lock = mkOption {
type = types.str;
default = "";
Expand Down
3 changes: 2 additions & 1 deletion nix/nvchad.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
findutils,
git,
gcc,
gcc_new ? gcc,
neovim,
nodejs,
lua5_1,
Expand Down Expand Up @@ -53,7 +54,7 @@ stdenvNoCC.mkDerivation rec {
coreutils
findutils
git
gcc
gcc_new
nodejs
lua-language-server
(lua5_1.withPackages (ps: with ps; [ luarocks ]))
Expand Down

0 comments on commit 04de203

Please sign in to comment.