Skip to content

Instantly share code, notes, and snippets.

@puffnfresh
Created November 19, 2018 09:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save puffnfresh/52c44713930bcd2b9cd9df59441c6ec8 to your computer and use it in GitHub Desktop.
Save puffnfresh/52c44713930bcd2b9cd9df59441c6ec8 to your computer and use it in GitHub Desktop.
#!/usr/bin/env nix-shell
#! nix-shell -i "emacs --batch -l $HOME/.emacs.d/core/core-load-paths.el -l" -p emacs26-nox
(require 'core-configuration-layer)
(configuration-layer/discover-layers)
(configuration-layer/make-all-packages nil)
(princ "p:\n")
(princ "let checked = n:\n")
(princ " let p' = p.${n} or null;\n")
(princ " in if p'.meta.broken or false then null else p';\n")
(princ "in\n")
(princ "[\n")
(dolist (package (configuration-layer/get-packages-list))
(princ (concat " (checked " (prin1-to-string (symbol-name package)) ")\n")))
(princ "]\n")
@Mic92
Copy link

Mic92 commented Feb 10, 2020

I had to change the nix shebang to the following when working on the develop branch:

#!/usr/bin/env nix-shell
#! nix-shell -i "emacs --batch -l $HOME/.emacs.d/core/core-versions.el -l $HOME/.emacs.d/core/core-load-paths.el -l" -p emacs26-nox

core-versions.el is required.

@Mic92
Copy link

Mic92 commented Feb 10, 2020

@Atemu
Copy link

Atemu commented Apr 4, 2024

@puffnfresh could you license your spacemacs2nix.el scripts under MIT? I want to use them in my config.

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