mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
gnu: emacs-minimal: Add output containing C source files.
* gnu/packages/emacs.scm (emacs-minimal)[outputs]: Add “doc”. [arguments]<#:phases>: Add phase ‘install-c-source’. {install-site-start}: Attempt to load guix-emacs-c-source.el in site-start.el. Fixes: guix/guix#1540 (Cannot follow references to C functions). Change-Id: I6d9478443b081b436b5b86b208135f69f35671bd Signed-off-by: Liliana Marie Prikler <liliana.prikler@gmail.com>
This commit is contained in:
parent
6ad8e56bec
commit
b30dc52b92
1 changed files with 21 additions and 1 deletions
|
@ -26,6 +26,7 @@
|
||||||
;;; Copyright © 2023 Declan Tsien <declantsien@riseup.net>
|
;;; Copyright © 2023 Declan Tsien <declantsien@riseup.net>
|
||||||
;;; Copyright © 2023, 2024 Zheng Junjie <873216071@qq.com>
|
;;; Copyright © 2023, 2024 Zheng Junjie <873216071@qq.com>
|
||||||
;;; Copyright © 2025 Nicolas Graves <ngraves@ngraves.fr>
|
;;; Copyright © 2025 Nicolas Graves <ngraves@ngraves.fr>
|
||||||
|
;;; Copyright © 2025 Jake Forster <jakecameron.forster@gmail.com>
|
||||||
;;;
|
;;;
|
||||||
;;; This file is part of GNU Guix.
|
;;; This file is part of GNU Guix.
|
||||||
;;;
|
;;;
|
||||||
|
@ -192,6 +193,7 @@
|
||||||
"\"~/.guix-home/include\""
|
"\"~/.guix-home/include\""
|
||||||
"\"/run/current-system/profile/include\"")
|
"\"/run/current-system/profile/include\"")
|
||||||
" ")))))))
|
" ")))))))
|
||||||
|
(outputs '("out" "doc"))
|
||||||
(build-system gnu-build-system)
|
(build-system gnu-build-system)
|
||||||
(arguments
|
(arguments
|
||||||
(list
|
(list
|
||||||
|
@ -311,6 +313,21 @@
|
||||||
(("/bin//sh") (search-input-file inputs "bin/sh")))
|
(("/bin//sh") (search-input-file inputs "bin/sh")))
|
||||||
(substitute* "test/lisp/eshell/em-script-tests.el"
|
(substitute* "test/lisp/eshell/em-script-tests.el"
|
||||||
(("/usr/bin/env") (search-input-file inputs "bin/env"))))))
|
(("/usr/bin/env") (search-input-file inputs "bin/env"))))))
|
||||||
|
(add-before 'configure 'install-c-source
|
||||||
|
(lambda _
|
||||||
|
(let ((dest (string-append #$output:doc "/share/emacs/c-source"))
|
||||||
|
(lisp-dir (string-append #$output:doc
|
||||||
|
"/share/emacs/site-lisp")))
|
||||||
|
(mkdir-p dest)
|
||||||
|
(copy-recursively "src" dest)
|
||||||
|
(mkdir-p lisp-dir)
|
||||||
|
(with-output-to-file (string-append lisp-dir
|
||||||
|
"/guix-emacs-c-source.el")
|
||||||
|
(lambda ()
|
||||||
|
(display
|
||||||
|
(string-append
|
||||||
|
"(setq find-function-C-source-directory \"" dest "\")\n\n"
|
||||||
|
"(provide 'guix-emacs-c-source)")))))))
|
||||||
(add-after 'install 'install-site-start
|
(add-after 'install 'install-site-start
|
||||||
;; Use 'guix-emacs' in "site-start.el", which is used autoload the
|
;; Use 'guix-emacs' in "site-start.el", which is used autoload the
|
||||||
;; Elisp packages found in EMACSLOADPATH.
|
;; Elisp packages found in EMACSLOADPATH.
|
||||||
|
@ -338,7 +355,10 @@
|
||||||
"(when (require 'guix-emacs nil t)\n"
|
"(when (require 'guix-emacs nil t)\n"
|
||||||
" (guix-emacs-autoload-packages 'no-reload)\n"
|
" (guix-emacs-autoload-packages 'no-reload)\n"
|
||||||
" (advice-add 'package-load-all-descriptors"
|
" (advice-add 'package-load-all-descriptors"
|
||||||
" :after #'guix-emacs-load-package-descriptors))"))))
|
" :after #'guix-emacs-load-package-descriptors))\n\n"
|
||||||
|
";; The file guix-emacs-c-source.el is available from the"
|
||||||
|
" 'doc' output.\n"
|
||||||
|
"(require 'guix-emacs-c-source nil t)"))))
|
||||||
;; Remove the extraneous subdirs.el file, as it causes Emacs to
|
;; Remove the extraneous subdirs.el file, as it causes Emacs to
|
||||||
;; add recursively all the the sub-directories of a profile's
|
;; add recursively all the the sub-directories of a profile's
|
||||||
;; share/emacs/site-lisp union when added to EMACSLOADPATH,
|
;; share/emacs/site-lisp union when added to EMACSLOADPATH,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue