nix-doom-emacs icon indicating copy to clipboard operation
nix-doom-emacs copied to clipboard

Add option to inject into {exec-path,PATH}

Open vinicius507 opened this issue 3 years ago • 1 comments

I'm trying to setup LSP for C using clangd but for some reason it won't work.

It complains that unzip and powershell are not installed, but trying to add it to buildInputs of pagacke cc won't work. I don't know if the package name is cc too, it might be the cause of the error.

What do I do?

vinicius507 avatar Feb 19 '22 19:02 vinicius507

Sounds like runtime dependencies, so you could add something like this to the arguments you're passing into nix-doom-emacs:

        extraConfig = ''
          (setq exec-path (append exec-path '( ${
            concatMapStringsSep " " (x: ''"${x}/bin"'') extraBins
          } )))
          (setenv "PATH" (concat (getenv "PATH") ":${
            concatMapStringsSep ":" (x: "${x}/bin") extraBins
          }"))
        '';

where extraBins is a list of required packages.

That should probably be abstracted away though..

ckiee avatar Feb 19 '22 20:02 ckiee