Closed scotttrinh closed 3 years ago
FWIW, I've been running this on macOS 11.6 without issue, and was running it on the most recent version of 11.5 before that.
Was not required at all. For some reason, having the emacs-overlay at the same time was the issue. Adding it produces this error:
error: 'builtins.storePath' is not allowed in pure evaluation mode
at /nix/store/p6cjkwimwlkd4nyfckmx884gh0vnksas-source/lib/attrsets.nix:335:15:
334| let
335| path' = builtins.storePath path;
| ^
336| res =
(use '--show-trace' to show detailed location information)
With the trace:
Hey @scotttrinh 👋🏻 Thanks for raising this and thanks @montchr for chiming in here.
I'm really glad to see some others using this flake :)
So, as you've found out, it should build and run fine, as far as I'm concerned. I don't have an M1 machine to test on, however.
That said, regarding your last comment, I use this flake in conjunction with the emacs-overlay (assuming you're talking about the nix-community one?). What does your config look like?
All you should need to do is ensure you're setting the pkg
parameter appropriately for whichever function you're using from emacs-overlay. For example, in my config I'm using the emacsWithPackagesFromUsePackage
function, so I set package = pkgs.emacs;
because this flake overlays to that package. Take here, for instance, setting home-manager's programs.emacs.package
to use the emacs-overlay and the overlay from this flake:
programs.emacs.package = pkgs.emacsWithPackagesFromUsePackage {
alwaysEnsure = true;
alwaysTangle = true;
# Custom overlay derived from 'emacs' flake input
package = pkgs.emacs;
@cmacrae
Thanks for the detailed answer. I'm still trying to wrap my head around how nix works, and that really helped connect some dots for me! I've had a hard time looking at complex multi-file configs like yours (and @montchr) and really understand what's happening, so having this extra bit of explanation is super helpful. 🙏
Sure @scotttrinh :) No problem, glad to hear it's working 👍 Don't hesitate to reach out if you want/need any more help, or even in general, feel free to e-mail or Discord (cmacrae#6392
) me if you want to chat about Nix
(Sorry for the empty description here, opened PR from the Github VSCode thing)
Trying to get this working on my new M1 laptop that has macOS 11.5.2, and while trying to debug the error I'm seeing I noticed this line. Not sure if it actually fixes my issue yet, but thought I'd fork and open a PR anyway. Will report back if it makes any difference!