Semi-working emacs config
This commit is contained in:
parent
a16e106f98
commit
fe10168d00
5 changed files with 157 additions and 134 deletions
|
|
@ -9,55 +9,61 @@
|
|||
#:use-module (guix gexp)
|
||||
#:use-module (guix licenses)
|
||||
#:use-module (guix build-system trivial)
|
||||
#:use-module (gnu packages fonts)
|
||||
#:use-module (gnu packages llvm)
|
||||
#:use-module (gnu packages tree-sitter)
|
||||
#:export (guixmacs))
|
||||
|
||||
(define emacs-pkgs
|
||||
(list emacs-guix ripgrep))
|
||||
(list
|
||||
emacs-guix
|
||||
emacs-golden-ratio
|
||||
emacs-alert
|
||||
emacs-diminish
|
||||
emacs-nov-el
|
||||
emacs-magit
|
||||
emacs-doom-modeline
|
||||
emacs-doom-themes
|
||||
emacs-rainbow-delimiters
|
||||
emacs-org-bullets
|
||||
emacs-org-transclusion
|
||||
emacs-org-roam
|
||||
emacs-consult
|
||||
emacs-rainbow-mode
|
||||
emacs-gptel
|
||||
emacs-eshell-syntax-highlighting
|
||||
emacs-vterm
|
||||
emacs-vterm-toggle
|
||||
emacs-direnv
|
||||
emacs-glsl-mode
|
||||
emacs-treesit-auto
|
||||
emacs-nerd-icons
|
||||
emacs-marginalia
|
||||
emacs-multiple-cursors
|
||||
emacs-corfu
|
||||
emacs-cape
|
||||
emacs-vertico
|
||||
emacs-orderless
|
||||
|
||||
font-iosevka
|
||||
|
||||
ripgrep
|
||||
clang-toolchain
|
||||
tree-sitter
|
||||
|
||||
|
||||
))
|
||||
|
||||
(define guixmacs
|
||||
(package
|
||||
(inherit emacs-pgtk)
|
||||
(name "guixmacs")
|
||||
(version (package-version emacs-pgtk))
|
||||
(source #f)
|
||||
(synopsis "KyleKrein’s Emacs config wrapper")
|
||||
(description "Emacs PGTK wrapped with useful Guix packages in PATH and EMACSLOADPATH.")
|
||||
(license gpl3+)
|
||||
(home-page "https://git.kylekrein.com/kylekrein/dotfiles")
|
||||
(build-system trivial-build-system)
|
||||
(propagated-inputs (append (list emacs-pgtk
|
||||
bash-minimal)
|
||||
emacs-pkgs))
|
||||
(properties '((tunable? . #t)))
|
||||
(arguments
|
||||
(append
|
||||
(package-arguments emacs-pgtk)
|
||||
(list
|
||||
#:modules '((guix build utils))
|
||||
#:builder
|
||||
#~(begin
|
||||
(use-modules (guix build utils))
|
||||
(define (wrap-external-program target out-bin env-vars)
|
||||
(let ((script (open-output-file out-bin)))
|
||||
(display (string-append "#!" #$bash-minimal "/bin/bash" "\n") script)
|
||||
(for-each
|
||||
(lambda (pair)
|
||||
(display (string-append "export " (car pair) "=\"" (cdr pair) "\"\n") script))
|
||||
env-vars)
|
||||
(display (string-append "\"" target "\" \"$@\"\n") script)
|
||||
(close-output-port script))
|
||||
(chmod out-bin #o755))
|
||||
(let* ((out #$output)
|
||||
(emacs #$(this-package-input "emacs-pgtk"))
|
||||
(dep-paths '#$emacs-pkgs)
|
||||
(site-lisps (map (lambda (p)
|
||||
(string-append p "/share/emacs/site-lisp"))
|
||||
dep-paths))
|
||||
(bins (map (lambda (p)
|
||||
(string-append p "/bin"))
|
||||
dep-paths))
|
||||
(bin (string-append out "/bin"))
|
||||
(emacsloadpath (string-join site-lisps ":"))
|
||||
(path (string-join (append (list "$PATH") bins) ":")))
|
||||
(mkdir-p bin)
|
||||
(wrap-external-program
|
||||
(string-append emacs "/bin/emacs")
|
||||
(string-append out "/bin/emacs")
|
||||
(list (cons "EMACSLOADPATH" emacsloadpath)
|
||||
(cons "PATH" path)))))))))
|
||||
#:tests? #f)))
|
||||
(propagated-inputs (append (package-propagated-inputs emacs-pgtk)
|
||||
emacs-pkgs))))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue