Federico Beffa <be...@ieee.org> skribis: > To be concrete about what I'm proposing, attached you find: > > - An ELPA package importer > - An 'emacs-build-system'
Sounds very useful to me! > There are a lot of Emacs packages. For this reason I would like to > propose to prefix them with 'emacs-' as we do with Python, ... Sounds good. I think I prefer ‘emacs-’ to ‘el-’ because that’s probably what people expect. > To make those packages automatically available in Emacs without the > need for any code in the user '.emacs' file, I would suggest to > include in our Emacs package site initialization file some custom code > (to activate our ELPA emacs packages) such as the one in the attached > 'guix-elpa.el' file. guix.el already takes care of that (info "(guix) Emacs Initial Setup"), so that should be enough. Some random comments: > ;; Path relative to 'out' where we install ELPA packages. We avoid the > ;; ".../elpa" path as Emacs expects to find the ELPA repository > ;; 'archive-contents' file and the archive signature. > (define guix-elpa-packages-path "/share/emacs/site-lisp/guix.d") Rather %install-suffix (“path” is used exclusively to refer to search paths in GNU.) > (define* (build #:key outputs inputs #:allow-other-keys) > "Compile .el files." > (let* ((emacs (string-append (assoc-ref inputs "emacs") "/bin/emacs")) > (out (assoc-ref outputs "out")) > (name-ver (store-dir->elpa-name-version out)) > (el-dir (string-append out guix-elpa-packages-path "/" name-ver))) Please align the lets. :-) > (fold (lambda (f s) > (and s (zero? (system* emacs "--batch" "-Q" "-L" el-dir > "-f" "batch-byte-compile" f)))) > #t (find-files "." "\\.el$"))))) Should probably use ‘emacs-batch-eval’ from (guix build emacs-utils), and perhaps define ‘emacs-byte-compile’ there. > (define* (copy #:key outputs #:allow-other-keys) > "Copy the package content to the installation directory." s/copy/install/ ? > ;; from (guix utils). Should we put it in (guix build utils)? > (define (package-name->name+version name) > "Given NAME, a package name like \"foo-0.9.1b\", return two values: Yes, should probably be moved to (guix build utils) eventually. Thanks for the great initiative! Ludo’.