Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use epkgs in extraPackages? #296

Open
hgl opened this issue Sep 30, 2022 · 4 comments
Open

How to use epkgs in extraPackages? #296

hgl opened this issue Sep 30, 2022 · 4 comments

Comments

@hgl
Copy link

hgl commented Sep 30, 2022

Given this definition:

extraPackages = (epkgs: cfg.extraPackages);

I wonder how to could I make extraPackages use epkgs.vterm In my own nix config?

If it were defined as

extraPackages = cfg.extraPackages; 

I could directly use

extraPackages = epkgs: [ epkgs.vterm ];

How is the current definition supposed to be used for epkgs?

@hgl
Copy link
Author

hgl commented Oct 1, 2022

It seems the proper way to enable vterm is like this, from @thiagokokada's nix config

https://github.com/thiagokokada/nix-configs/blob/edc0925c349ecdeda44f55596f8de67566be160c/home-manager/emacs/default.nix#L25-L32

But according to NixOS wiki, something like this should be used:

(emacsPackagesFor emacsPgtkGcc).emacsWithPackages (epkgs: [ epkgs.vterm ])

I guess nix-doom-emacs' way of building vterm takes precedence?

@ckiee
Copy link
Member

ckiee commented Oct 1, 2022

nix-doom-emacs picks up that doom wants the vterm dependency and adds it to emacsWithPackages. emacsPackagesOverlay is an ..overlay over the package collection it uses. Make sure vterm is enabled in init.el and then add Thiago's snippet if it still doesn't work.

cc #252 because there is some charm in being able to write a comprehensive response once.

@thiagokokada
Copy link

It seems the proper way to enable vterm is like this, from @thiagokokada's nix config

https://github.com/thiagokokada/nix-configs/blob/edc0925c349ecdeda44f55596f8de67566be160c/home-manager/emacs/default.nix#L25-L32

But according to NixOS wiki, something like this should be used:

(emacsPackagesFor emacsPgtkGcc).emacsWithPackages (epkgs: [ epkgs.vterm ])

I guess nix-doom-emacs' way of building vterm takes precedence?

The override for vterm is only needed because for some reason vterm gets the wrong Emacs src during building as it is defined in the overlay. I still didn't had time to investigate the issue deeper, so what you see in my config is mostly a workaround.

@ribosomerocker
Copy link

Has this question been answered now? Especially with the documentation PR, I feel like this can be closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants