mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
This is a first effort towards making emacs-build-system more suitable for cross-compilation. * guix/build-system/emacs.scm (emacs-build)[#:tests?]: Enable when not cross-compiling. * gnu/packages/emacs-xyz.scm (emacs-ac-php, emacs-chatgpt-shell) (emacs-inspector, emacs-tree-inspector, emacs-pug-mode, emacs-llama) (emacs-magit, emacs-ezf, emacs-speed-type, emacs-graphql) (emacs-fb2-reader, emacs-ample-regexps, emacs-rescript-mode) (emacs-relative-buffers, emacs-emms, emacs-aio, emacs-async) (emacs-latex-extra, emacs-auto-themer, emacs-bm, emacs-varuga) (emacs-ellama, emacs-org-fc, emacs-go-mode, emacs-dash, emacs-undo-fu-session) (emacs-s, emacs-lemon, emacs-fringe-helper, emacs-git-link) (emacs-explain-pause-mode, emacs-zig-mode, emacs-calc-currency) (emacs-string-inflection, emacs-ob-go, emacs-robot-log, emacs-rspec) (emacs-sqlite3-api, emacs-shx, emacs-el-job, emacs-elisp-demos) (emacs-sudo-edit, emacs-subed, emacs-deferred, emacs-company-lsp, emacs-jack) (emacs-elquery, emacs-cov, emacs-god-mode, emacs-org-pomodoro) (emacs-eglot-tempel, emacs-dumbparens, emacs-perspective, emacs-realgud) (emacs-hydra, emacs-avy, emacs-lispy, emacs-clojure-mode, emacs-qt-pro-mode) (emacs-sphinx-doc, emacs-julia-mode, emacs-js2-mode, emacs-nodejs-repl) (emacs-projectile, emacs-skeletor, emacs-elfeed, emacs-elfeed-org) (emacs-mocker, emacs-find-file-in-project, emacs-pyvenv, emacs-elpy) (emacs-rainbow-delimiters, emacs-visual-fill-column, emacs-visual-replace) (emacs-wucuo, emacs-yaml, emacs-yari, emacs-wgrep, emacs-islisp-mode) (emacs-lua-mode, emacs-evil-collection, emacs-evil-owl, emacs-evil-exchange) (emacs-evil-lion, emacs-evil-expat), emacs-monky, emacs-org, emacs-ht) (emacs-yasnippet, emacs-memoize, emacs-use-package, emacs-xmlgen) (emacs-cc-mode, emacs-php-mode, emacs-evil-surround, emacs-org-transclusion) (emacs-json-reformat, emacs-display-wttr, emacs-git-messenger) (emacs-enh-ruby-mode, emacs-browse-at-remote, emacs-tiny, emacs-unidecode) (emacs-circe, emacs-evil-quickscope, emacs-groovy-modes, emacs-kotlin-mode_) (emacs-kv, emacs-auth-source-pass, emacs-emacsql, emacs-org-recur) (emacs-org-super-agenda, emacs-ts, emacs-circadian, emacs-eldev, emacs-citar) (emacs-loop, emacs-elisp-refs, emacs-esup, emacs-macrostep, emacs-parent-mode) (emacs-helpful, emacs-suggest, emacs-auto-yasnippet) (emacs-git-auto-commit-mode, emacs-devil, emacs-devil-multiedit) (emacs-go-translate, emacs-langtool, emacs-helm-company, emacs-picpocket) (emacs-srht, emacs-github-review, emacs-deadgrep, emacs-adoc-mode) (emacs-racer, emacs-sesman, emacs-buttercup, emacs-cort, emacs-annalist) (emacs-general, emacs-libmpdel, emacs-navigel, emacs-eat, emacs-detached) (emacs-repology, emacs-bfuture, emacs-undo-propose-el, emacs-tco-el) (emacs-vdiff, emacs-exwm-firefox, emacs-rjsx-mode, emacs-dash-docs) (emacs-casual-lib, emacs-evil-numbers, emacs-evil-traces, emacs-ox-tufte) (emacs-org-jira, emacs-systemd-mode, emacs-doom-themes, emacs-exiftool) (emacs-qrencode, emacs-org-journal, emacs-weblorg, emacs-execline) (emacs-webpaste, emacs-keystore-mode, emacs-ein, emacs-straight-el) (emacs-vundo, emacs-org-cliplink, emacs-x509-mode)[arguments]: Remove #:tests?. (emacs-f, emacs-shut-up, emacs-ansi, emacs-commander) (emacs-ert-runner)[arguments]: Add #:tests? #f. (emacs-with-editor, emacs-tablist, emacs-pkg-info, emacs-el-x, emacs-helm) (emacs-xelb, emacs-repo): Likewise.
135 lines
5.2 KiB
Scheme
135 lines
5.2 KiB
Scheme
;;; GNU Guix --- Functional package management for GNU
|
|
;;; Copyright © 2015 Federico Beffa <beffa@fbengineering.ch>
|
|
;;; Copyright © 2020 Morgan Smith <Morgan.J.Smith@outlook.com>
|
|
;;;
|
|
;;; This file is part of GNU Guix.
|
|
;;;
|
|
;;; GNU Guix is free software; you can redistribute it and/or modify it
|
|
;;; under the terms of the GNU General Public License as published by
|
|
;;; the Free Software Foundation; either version 3 of the License, or (at
|
|
;;; your option) any later version.
|
|
;;;
|
|
;;; GNU Guix is distributed in the hope that it will be useful, but
|
|
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
;;; GNU General Public License for more details.
|
|
;;;
|
|
;;; You should have received a copy of the GNU General Public License
|
|
;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
(define-module (guix build-system emacs)
|
|
#:use-module ((guix build emacs-build-system)
|
|
#:select (%default-include %default-exclude))
|
|
#:use-module (guix store)
|
|
#:use-module (guix utils)
|
|
#:use-module (guix packages)
|
|
#:use-module (guix gexp)
|
|
#:use-module (guix monads)
|
|
#:use-module (guix search-paths)
|
|
#:use-module (guix build-system)
|
|
#:use-module (guix build-system gnu)
|
|
#:export (%emacs-build-system-modules
|
|
emacs-build
|
|
emacs-build-system)
|
|
#:re-export (%default-include ;for convenience
|
|
%default-exclude))
|
|
|
|
|
|
;; Commentary:
|
|
;;
|
|
;; Standard build procedure for Emacs packages. This is implemented as an
|
|
;; extension of 'gnu-build-system'.
|
|
;;
|
|
;; Code:
|
|
|
|
(define %emacs-build-system-modules
|
|
;; Build-side modules imported by default.
|
|
`((guix build emacs-build-system)
|
|
(guix build emacs-utils)
|
|
,@%default-gnu-imported-modules))
|
|
|
|
(define (default-emacs)
|
|
"Return the default Emacs package."
|
|
;; Lazily resolve the binding to avoid a circular dependency.
|
|
(let ((emacs-mod (resolve-interface '(gnu packages emacs))))
|
|
(module-ref emacs-mod 'emacs-minimal)))
|
|
|
|
(define* (lower name
|
|
#:key source inputs native-inputs outputs system target
|
|
(emacs (default-emacs))
|
|
#:allow-other-keys
|
|
#:rest arguments)
|
|
"Return a bag for NAME."
|
|
(define private-keywords
|
|
'(#:target #:emacs #:inputs #:native-inputs))
|
|
|
|
(and (not target) ;XXX: no cross-compilation
|
|
(bag
|
|
(name name)
|
|
(system system)
|
|
(host-inputs `(,@(if source
|
|
`(("source" ,source))
|
|
'())
|
|
,@inputs
|
|
|
|
;; Keep the standard inputs of 'gnu-build-system'.
|
|
,@(standard-packages)))
|
|
(build-inputs `(("emacs" ,emacs)
|
|
,@native-inputs))
|
|
(outputs outputs)
|
|
(build emacs-build)
|
|
(arguments (strip-keyword-arguments private-keywords arguments)))))
|
|
|
|
(define* (emacs-build name inputs
|
|
#:key source
|
|
(tests? (not (%current-target-system)))
|
|
(parallel-tests? #t)
|
|
(test-command ''("make" "check"))
|
|
(phases '%standard-phases)
|
|
(outputs '("out"))
|
|
(include (quote %default-include))
|
|
(exclude (quote %default-exclude))
|
|
(search-paths '())
|
|
(system (%current-system))
|
|
(guile #f)
|
|
(imported-modules %emacs-build-system-modules)
|
|
(modules '((guix build emacs-build-system)
|
|
(guix build utils)
|
|
(guix build emacs-utils)))
|
|
allowed-references
|
|
disallowed-references)
|
|
"Build SOURCE using EMACS, and with INPUTS."
|
|
(define builder
|
|
(with-imported-modules imported-modules
|
|
#~(begin
|
|
(use-modules #$@(sexp->gexp modules))
|
|
(emacs-build #:name #$name
|
|
#:source #+source
|
|
#:system #$system
|
|
#:test-command #$test-command
|
|
#:tests? #$tests?
|
|
#:parallel-tests? #$parallel-tests?
|
|
#:phases #$phases
|
|
#:outputs #$(outputs->gexp outputs)
|
|
#:include #$include
|
|
#:exclude #$exclude
|
|
#:search-paths '#$(sexp->gexp
|
|
(map search-path-specification->sexp
|
|
search-paths))
|
|
#:inputs #$(input-tuples->gexp inputs)))))
|
|
|
|
(mlet %store-monad ((guile (package->derivation (or guile (default-guile))
|
|
system #:graft? #f)))
|
|
(gexp->derivation name builder
|
|
#:system system
|
|
#:allowed-references allowed-references
|
|
#:disallowed-references disallowed-references
|
|
#:guile-for-build guile)))
|
|
|
|
(define emacs-build-system
|
|
(build-system
|
|
(name 'emacs)
|
|
(description "The build system for Emacs packages")
|
|
(lower lower)))
|
|
|
|
;;; emacs.scm ends here
|