gnu: icedove-wayland: Refactor as a wrapper around icedove.
This saves us a full build of icedove-wayland analogue to chromium-wayland. * gnu/packages/gnuzilla.scm (icedove-wayland)[inputs]: Add bash and icedove. [arguments]: Copy the binary over and wrap it for Wayland. As well as the desktop-file and the license file.
This commit is contained in:
parent
b65c02e2d3
commit
db8ea15ba0
1 changed files with 32 additions and 17 deletions
|
@ -1618,25 +1618,40 @@ Thunderbird. It supports email, news feeds, chat, calendar and contacts.")
|
||||||
(license license:mpl2.0)))
|
(license license:mpl2.0)))
|
||||||
|
|
||||||
(define-public icedove/wayland
|
(define-public icedove/wayland
|
||||||
(package/inherit icedove
|
(package
|
||||||
|
(inherit icedove)
|
||||||
(name "icedove-wayland")
|
(name "icedove-wayland")
|
||||||
|
(native-inputs '())
|
||||||
|
(inputs
|
||||||
|
`(("bash" ,bash-minimal)
|
||||||
|
("icedove" ,icedove)))
|
||||||
|
(build-system trivial-build-system)
|
||||||
(arguments
|
(arguments
|
||||||
(substitute-keyword-arguments (package-arguments icedove)
|
'(#:modules ((guix build utils))
|
||||||
((#:phases phases)
|
#:builder
|
||||||
`(modify-phases ,phases
|
(begin
|
||||||
(replace 'wrap-program
|
(use-modules (guix build utils))
|
||||||
(lambda* (#:key inputs outputs #:allow-other-keys)
|
(let* ((bash (assoc-ref %build-inputs "bash"))
|
||||||
(let* ((out (assoc-ref outputs "out"))
|
(icedove (assoc-ref %build-inputs "icedove"))
|
||||||
(lib (string-append out "/lib"))
|
(out (assoc-ref %outputs "out"))
|
||||||
(gtk (assoc-ref inputs "gtk+"))
|
(exe (string-append out "/bin/icedove")))
|
||||||
(gtk-share (string-append gtk "/share"))
|
(mkdir-p (dirname exe))
|
||||||
(pulseaudio (assoc-ref inputs "pulseaudio"))
|
|
||||||
(pulseaudio-lib (string-append pulseaudio "/lib")))
|
(call-with-output-file exe
|
||||||
(wrap-program (car (find-files lib "^icedove$"))
|
(lambda (port)
|
||||||
`("MOZ_ENABLE_WAYLAND" = ("1"))
|
(format port "#!~a
|
||||||
`("XDG_DATA_DIRS" prefix (,gtk-share))
|
MOZ_ENABLE_WAYLAND=1 exec ~a $@"
|
||||||
`("LD_LIBRARY_PATH" prefix (,pulseaudio-lib)))
|
(string-append bash "/bin/bash")
|
||||||
#t)))))))))
|
(string-append icedove "/bin/icedove"))))
|
||||||
|
(chmod exe #o555)
|
||||||
|
|
||||||
|
;; Provide the manual and .desktop file.
|
||||||
|
(copy-recursively (string-append icedove "/share")
|
||||||
|
(string-append out "/share"))
|
||||||
|
(substitute* (string-append
|
||||||
|
out "/share/applications/icedove.desktop")
|
||||||
|
((icedove) out))
|
||||||
|
#t))))))
|
||||||
|
|
||||||
(define-public firefox-decrypt
|
(define-public firefox-decrypt
|
||||||
(package
|
(package
|
||||||
|
|
Reference in a new issue