gnu: emacs: Strip double wrap.

* gnu/packages/emacs.scm (emacs)[#:phases]: Add 'strip-double-wrap.
(emacs-minimal emacs-xwidgets emacs-no-x)
(emacs-no-x-toolkit guile-emacs)[#:phases]: Delete 'strip-double-wrap.

Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
This commit is contained in:
Leo Prikler 2020-08-28 15:34:00 +02:00 committed by Mathieu Othacehe
parent a2ebc7426a
commit 68be4da830
No known key found for this signature in database
GPG Key ID: 8354763531769CA6

@ -191,6 +191,17 @@
(rename-file real wrapper))
pdmp pdmp-real))
#t))
(add-after 'glib-or-gtk-wrap '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 (package-version emacs)))
"bin/emacs")
#t)))
(add-before 'reset-gzip-timestamps 'make-compressed-files-writable
;; The 'reset-gzip-timestamps phase will throw a permission error
;; if gzip files aren't writable then. This phase is needed when
@ -278,7 +289,8 @@ languages.")
`(list "--with-gnutls=no" "--disable-build-details"))
((#:phases phases)
`(modify-phases ,phases
(delete 'restore-emacs-pdmp)))))
(delete 'restore-emacs-pdmp)
(delete 'strip-double-wrap)))))
(inputs
`(("guix-emacs.el" ,(search-auxiliary-file "emacs/guix-emacs.el"))
("ncurses" ,ncurses)))
@ -297,7 +309,8 @@ editor (with xwidgets support)")
`(cons "--with-xwidgets" ,flags))
((#:phases phases)
`(modify-phases ,phases
(delete 'restore-emacs-pdmp)))))
(delete 'restore-emacs-pdmp)
(delete 'strip-double-wrap)))))
(inputs
`(("webkitgtk" ,webkitgtk)
("libxcomposite" ,libxcomposite)
@ -323,7 +336,8 @@ editor (console only)")
`(delete "--with-cairo" ,flags))
((#:phases phases)
`(modify-phases ,phases
(delete 'restore-emacs-pdmp)))))))
(delete 'restore-emacs-pdmp)
(delete 'strip-double-wrap)))))))
(define-public emacs-no-x-toolkit
(package/inherit emacs
@ -339,7 +353,8 @@ editor (without an X toolkit)" )
`(cons "--with-x-toolkit=no" ,flags))
((#:phases phases)
`(modify-phases ,phases
(delete 'restore-emacs-pdmp)))))))
(delete 'restore-emacs-pdmp)
(delete 'strip-double-wrap)))))))
(define-public emacs-wide-int
(package/inherit emacs
@ -389,7 +404,8 @@ editor (with wide ints)" )
(add-before 'build 'make-deps-dir
(lambda _
(invoke "mkdir" "-p" "src/deps")))
(delete 'restore-emacs-pdmp))))))))
(delete 'restore-emacs-pdmp)
(delete 'strip-double-wrap))))))))
(define-public m17n-db
(package