From 04de203f8c0ddb78d499ba9725a71a242082f143 Mon Sep 17 00:00:00 2001 From: Bot_wxt1221 <3264117476@qq.com> Date: Tue, 27 Aug 2024 15:17:27 +0800 Subject: [PATCH] feat: allow override gcc --- README.md | 7 +++++++ nix/module.nix | 6 ++++++ nix/nvchad.nix | 3 ++- 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 6877bd5..3ca65a8 100644 --- a/README.md +++ b/README.md @@ -278,6 +278,7 @@ Or with customization of options: - extraPlugins - extraPackages - extraConfig +- gcc - lazy-lock - hm-activation - backup @@ -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` diff --git a/nix/module.nix b/nix/module.nix index c58e878..6aa09a5 100644 --- a/nix/module.nix +++ b/nix/module.nix @@ -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; @@ -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 = ""; diff --git a/nix/nvchad.nix b/nix/nvchad.nix index d85db88..bb67b30 100644 --- a/nix/nvchad.nix +++ b/nix/nvchad.nix @@ -11,6 +11,7 @@ findutils, git, gcc, + gcc_new ? gcc, neovim, nodejs, lua5_1, @@ -53,7 +54,7 @@ stdenvNoCC.mkDerivation rec { coreutils findutils git - gcc + gcc_new nodejs lua-language-server (lua5_1.withPackages (ps: with ps; [ luarocks ]))