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

emacs.pkgs.overrodeScope' examples do not work #130020

Closed
neosimsim opened this issue Jul 12, 2021 · 1 comment · Fixed by #130021
Closed

emacs.pkgs.overrodeScope' examples do not work #130020

neosimsim opened this issue Jul 12, 2021 · 1 comment · Fixed by #130021

Comments

@neosimsim
Copy link
Contributor

neosimsim commented Jul 12, 2021

Describe the bug
I had to change an emacs package (update spinner from elpa). While trying to figure out how this is done I found
2 examples, which both did not work.

To Reproduce
Steps to reproduce the behavior:
Run

   $ cat >emacs.nix <<EOF
   with import <nixpkgs> {};
   let customEmacsPackages =
     emacs.pkgs.overrideScope' (self: super: {
       emacs = emacs-nox;
       foo = self.magit;
     });
   in customEmacsPackages.emacs.pkgs.withPackages (epkgs: [ epkgs.foo ])
   EOF

and

   $ nix-build emacs.nix

which reports

   error: attribute 'foo' missing

         at emacs.nix:7:58:

              6|   });
              7| in customEmacsPackages.emacs.pkgs.withPackages (epkgs: [ epkgs.foo ])
               |                                                          ^
   (use '--show-trace' to show detailed location information)

Expected behavior
Builds emacs with magit aliased to foo.

Notify maintainers
@tteggel @adisbladis

@neosimsim
Copy link
Contributor Author

neosimsim commented Jul 12, 2021

Seems that emacs.pkgs still contains the old packages set after calling overrideScope'.
I don't know if that is the actual bug?

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

Successfully merging a pull request may close this issue.

2 participants