mirror of
https://git.savannah.gnu.org/git/guix.git
synced 2025-01-31 06:46:50 +01:00
gnu: emacs-next: Fix load path and version.
Fixes <http://issues.guix.info/43277>. * gnu/packages/emacs.scm (emacs)[strip-double-wrap]: Modify to work with emacs-next. (emacs-next)[version]: Use git-version to produce the version string. [arguments]: Remove field. [native-search-paths]: Add field. Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
This commit is contained in:
parent
18e76f8905
commit
f88fea0eaa
1 changed files with 21 additions and 21 deletions
|
@ -196,11 +196,16 @@ (define* (emacs-byte-compile-directory dir)
|
||||||
(lambda* (#:key outputs #:allow-other-keys)
|
(lambda* (#:key outputs #:allow-other-keys)
|
||||||
;; Directly copy emacs-X.Y to emacs, so that it is not wrapped
|
;; Directly copy emacs-X.Y to emacs, so that it is not wrapped
|
||||||
;; twice. This also fixes a minor issue, where WMs would not be
|
;; twice. This also fixes a minor issue, where WMs would not be
|
||||||
;; able to track emacs back to emacs.desktop.
|
;; able to track emacs back to emacs.desktop. The version is
|
||||||
|
;; accessed using using THIS-PACKAGE so it "just works" for
|
||||||
|
;; inherited Emacs packages of different versions.
|
||||||
(with-directory-excursion (assoc-ref outputs "out")
|
(with-directory-excursion (assoc-ref outputs "out")
|
||||||
(copy-file (string-append
|
(copy-file (string-append
|
||||||
"bin/emacs-"
|
"bin/emacs-"
|
||||||
,(version-major+minor (package-version emacs)))
|
,(let ((this-version (package-version this-package)))
|
||||||
|
(or (false-if-exception
|
||||||
|
(version-major+minor+point this-version))
|
||||||
|
(version-major+minor this-version))))
|
||||||
"bin/emacs")
|
"bin/emacs")
|
||||||
#t)))
|
#t)))
|
||||||
(add-before 'reset-gzip-timestamps 'make-compressed-files-writable
|
(add-before 'reset-gzip-timestamps 'make-compressed-files-writable
|
||||||
|
@ -279,11 +284,10 @@ (define* (emacs-byte-compile-directory dir)
|
||||||
|
|
||||||
(define-public emacs-next
|
(define-public emacs-next
|
||||||
(let ((commit "2ea34662c20f71d35dd52a5ed996542c7386b9cb")
|
(let ((commit "2ea34662c20f71d35dd52a5ed996542c7386b9cb")
|
||||||
(revision "0")
|
(revision "0"))
|
||||||
(emacs-version "28.0.50.1"))
|
|
||||||
(package/inherit emacs
|
(package/inherit emacs
|
||||||
(name "emacs-next")
|
(name "emacs-next")
|
||||||
(version (git-version emacs-version revision commit))
|
(version (git-version "28.0.50" revision commit))
|
||||||
(source
|
(source
|
||||||
(origin
|
(origin
|
||||||
(inherit (package-source emacs))
|
(inherit (package-source emacs))
|
||||||
|
@ -295,24 +299,20 @@ (define-public emacs-next
|
||||||
(sha256
|
(sha256
|
||||||
(base32
|
(base32
|
||||||
"0igjm9kwiswn2dpiy2k9xikbdfc7njs07ry48fqz70anljj8y7y3"))))
|
"0igjm9kwiswn2dpiy2k9xikbdfc7njs07ry48fqz70anljj8y7y3"))))
|
||||||
(arguments
|
|
||||||
(substitute-keyword-arguments (package-arguments emacs)
|
|
||||||
((#:phases phases)
|
|
||||||
`(modify-phases ,phases
|
|
||||||
(replace 'strip-double-wrap
|
|
||||||
(lambda* (#:key outputs #:allow-other-keys)
|
|
||||||
;; Directly copy emacs-X.Y to emacs, so that it is not wrapped
|
|
||||||
;; twice. This also fixes a minor issue, where WMs would not be
|
|
||||||
;; able to track emacs back to emacs.desktop.
|
|
||||||
(with-directory-excursion (assoc-ref outputs "out")
|
|
||||||
(copy-file (string-append
|
|
||||||
"bin/emacs-"
|
|
||||||
,(version-major+minor+point (package-version emacs-next)))
|
|
||||||
"bin/emacs")
|
|
||||||
#t)))))))
|
|
||||||
(native-inputs
|
(native-inputs
|
||||||
`(("autoconf" ,autoconf)
|
`(("autoconf" ,autoconf)
|
||||||
,@(package-native-inputs emacs))))))
|
,@(package-native-inputs emacs)))
|
||||||
|
(native-search-paths
|
||||||
|
(list (search-path-specification
|
||||||
|
(variable "EMACSLOADPATH")
|
||||||
|
;; The versioned entry is for the Emacs' builtin libraries.
|
||||||
|
(files (list "share/emacs/site-lisp"
|
||||||
|
(string-append "share/emacs/"
|
||||||
|
(version-major+minor+point version)
|
||||||
|
"/lisp"))))
|
||||||
|
(search-path-specification
|
||||||
|
(variable "INFOPATH")
|
||||||
|
(files '("share/info"))))))))
|
||||||
|
|
||||||
(define-public emacs-minimal
|
(define-public emacs-minimal
|
||||||
;; This is the version that you should use as an input to packages that just
|
;; This is the version that you should use as an input to packages that just
|
||||||
|
|
Loading…
Reference in a new issue