mirror of
https://git.savannah.gnu.org/git/guix.git
synced 2025-02-07 19:39:34 +01:00
gnu: proof-general: Adjust autoloads for Emacs.
Fixes <https://bugs.gnu.org/46016>. * gnu/packages/coq.scm (proof-general)[native-inputs]: Remove 'which'. [inputs]: Remove 'coq' and 'emacs'. [arguments]<#:make-flags>: Adjust to find 'emacs'. Set 'ELISP' and 'DEST_LISP'. <#:modules, #:imported-modules>: Remove. <#:phases>: Remove call to 'which' in Makefile. Add copy file allowing Emacs autoloads. Clean unnecessary code. Signed-off-by: Nicolas Goaziou <mail@nicolasgoaziou.fr>
This commit is contained in:
parent
3d2e41adf2
commit
cb296dfa2e
1 changed files with 55 additions and 40 deletions
|
@ -136,50 +136,65 @@ It is developed using Objective Caml and Camlp5.")
|
||||||
"00cga3n9nj2xa3ivb0fdkkdx3k11fp4879y188738631yd1x2lsa"))))
|
"00cga3n9nj2xa3ivb0fdkkdx3k11fp4879y188738631yd1x2lsa"))))
|
||||||
(build-system gnu-build-system)
|
(build-system gnu-build-system)
|
||||||
(native-inputs
|
(native-inputs
|
||||||
`(("which" ,which)
|
`(("emacs" ,emacs-minimal)
|
||||||
("emacs" ,emacs-minimal)
|
|
||||||
("texinfo" ,texinfo)))
|
("texinfo" ,texinfo)))
|
||||||
(inputs
|
(inputs
|
||||||
`(("host-emacs" ,emacs)
|
`(("perl" ,perl)))
|
||||||
("perl" ,perl)
|
|
||||||
("coq" ,coq)))
|
|
||||||
(arguments
|
(arguments
|
||||||
`(#:tests? #f ; no check target
|
(let ((base-directory "/share/emacs/site-lisp/ProofGeneral"))
|
||||||
#:make-flags (list (string-append "PREFIX=" %output)
|
`(#:tests? #f ; no check target
|
||||||
(string-append "DEST_PREFIX=" %output)
|
#:make-flags (list (string-append "PREFIX=" %output)
|
||||||
(string-append "ELISP_START=" %output
|
(string-append "EMACS=" (assoc-ref %build-inputs "emacs")
|
||||||
"/share/emacs/site-lisp/ProofGeneral"))
|
"/bin/emacs")
|
||||||
#:modules ((guix build gnu-build-system)
|
(string-append "DEST_PREFIX=" %output)
|
||||||
(guix build utils)
|
(string-append "ELISP=" %output ,base-directory)
|
||||||
(guix build emacs-utils))
|
(string-append "DEST_ELISP=" %output ,base-directory)
|
||||||
#:imported-modules (,@%gnu-build-system-modules
|
(string-append "ELISP_START=" %output ,base-directory))
|
||||||
(guix build emacs-utils))
|
#:phases
|
||||||
#:phases
|
(modify-phases %standard-phases
|
||||||
(modify-phases %standard-phases
|
(delete 'configure)
|
||||||
(delete 'configure)
|
(add-after 'unpack 'disable-byte-compile-error-on-warn
|
||||||
(add-after 'unpack 'disable-byte-compile-error-on-warn
|
(lambda _
|
||||||
(lambda _
|
|
||||||
(substitute* "Makefile"
|
|
||||||
(("\\(setq byte-compile-error-on-warn t\\)")
|
|
||||||
"(setq byte-compile-error-on-warn nil)"))))
|
|
||||||
(add-after 'unpack 'patch-hardcoded-paths
|
|
||||||
(lambda* (#:key inputs outputs #:allow-other-keys)
|
|
||||||
(let ((out (assoc-ref outputs "out"))
|
|
||||||
(coq (assoc-ref inputs "coq"))
|
|
||||||
(emacs (assoc-ref inputs "host-emacs")))
|
|
||||||
(substitute* "Makefile"
|
(substitute* "Makefile"
|
||||||
(("/sbin/install-info") "install-info")))))
|
(("\\(setq byte-compile-error-on-warn t\\)")
|
||||||
(add-after 'unpack 'clean
|
"(setq byte-compile-error-on-warn nil)"))))
|
||||||
(lambda _
|
(add-after 'unpack 'patch-hardcoded-paths
|
||||||
;; Delete the pre-compiled elc files for Emacs 23.
|
(lambda _
|
||||||
(invoke "make" "clean")))
|
(substitute* "Makefile"
|
||||||
(add-after 'install 'install-doc
|
(("/sbin/install-info") "install-info"))))
|
||||||
(lambda* (#:key make-flags #:allow-other-keys)
|
(add-after 'unpack 'remove-which
|
||||||
;; XXX FIXME avoid building/installing pdf files,
|
(lambda _
|
||||||
;; due to unresolved errors building them.
|
(substitute* "Makefile"
|
||||||
(substitute* "Makefile"
|
(("`which perl`") "perl")
|
||||||
((" [^ ]*\\.pdf") ""))
|
(("`which bash`") "bash"))))
|
||||||
(apply invoke "make" "install-doc" make-flags))))))
|
(add-after 'unpack 'clean
|
||||||
|
(lambda _
|
||||||
|
;; Delete the pre-compiled elc files for Emacs 23.
|
||||||
|
(invoke "make" "clean")))
|
||||||
|
(add-after 'install 'install-doc
|
||||||
|
(lambda* (#:key make-flags #:allow-other-keys)
|
||||||
|
;; XXX FIXME avoid building/installing pdf files,
|
||||||
|
;; due to unresolved errors building them.
|
||||||
|
(substitute* "Makefile"
|
||||||
|
((" [^ ]*\\.pdf") ""))
|
||||||
|
(apply invoke "make" "install-doc" make-flags)))
|
||||||
|
(add-after 'install 'allow-subfolders-autoloads
|
||||||
|
;; Autoload cookies are present in sub-directories. A friendly
|
||||||
|
;; wrapper proof-general.el around generic/proof-site.el is
|
||||||
|
;; provided for execution on Emacs start-up. It serves two
|
||||||
|
;; purposes:
|
||||||
|
;;
|
||||||
|
;; * Setting up the load path when byte-compiling pg.
|
||||||
|
;; * Loading a minimal PG setup on startup (not all of Proof
|
||||||
|
;; General, of course; mostly mode hooks and autoloads).
|
||||||
|
;;
|
||||||
|
;; The renaming to proof-general-autoloads.el is Guix
|
||||||
|
;; specific.
|
||||||
|
(lambda* (#:key outputs #:allow-other-keys)
|
||||||
|
(let ((out (assoc-ref outputs "out")))
|
||||||
|
(copy-file "proof-general.el"
|
||||||
|
(string-append out ,base-directory
|
||||||
|
"/proof-general-autoloads.el")))))))))
|
||||||
(home-page "https://proofgeneral.github.io/")
|
(home-page "https://proofgeneral.github.io/")
|
||||||
(synopsis "Generic front-end for proof assistants based on Emacs")
|
(synopsis "Generic front-end for proof assistants based on Emacs")
|
||||||
(description
|
(description
|
||||||
|
|
Loading…
Add table
Reference in a new issue