GNU bug report logs - #40959
[PATCH 0/1] WIP: Add icedove.

Previous Next

Package: guix-patches;

Reported by: Jonathan Brielmaier <jonathan.brielmaier <at> web.de>

Date: Wed, 29 Apr 2020 10:59:01 UTC

Severity: normal

Tags: patch

Done: Ricardo Wurmus <rekado <at> elephly.net>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 40959 in the body.
You can then email your comments to 40959 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#40959; Package guix-patches. (Wed, 29 Apr 2020 10:59:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Jonathan Brielmaier <jonathan.brielmaier <at> web.de>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Wed, 29 Apr 2020 10:59:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Jonathan Brielmaier <jonathan.brielmaier <at> web.de>
To: guix-patches <at> gnu.org
Cc: Jonathan Brielmaier <jonathan.brielmaier <at> web.de>
Subject: [PATCH 0/1] WIP: Add icedove.
Date: Wed, 29 Apr 2020 12:56:14 +0200
Hi fellow guix hackers,

in the last couple of days I worked on this icedove patch. It is based
on earlier patches from Adrian and ng0 dating back until 2017 :)

Before getting to exited: there is still a lot to do before merging into
master!

Big missing stuff
=================
* Addons are still enabled and linked to addons.thunderbird.net. This is
  a problem with the FSDG though I've not used a non-free Addon or even
  saw one in the addon store. Any help how to disable it is welcome.
* Localization: It doesn't have localization support like Icecat. I
  guess we just need to port it to Icedove.

Smaller stuff
=============
* The binary should also called icedove not thunderbird.
* In the UI it's called "Thunderbird Daily" this should become Icedove.
* Adrian needs to sign-off as he worked on this patch under GNU AGPL3.
* Do more unbundling. But that is also missing in Icecat.
* We may need some more build phases from Icecat, but at the moment I
  want to keep the package as simple as possible. Only acting on real
  bugs or issues.

I'm running Icedove now for a couple of days on my laptop. It's working
great. I didn't test installing with a new/empty thunderbird profile.
There are maybe some unknown issues. It builds reproducible and `guix
size` is about 1.1GiB so comparable to Icecat :)

I really hope that we can get Icedove into master. It's current number
one at Guix package wishlist (+6).

So any feedback welcome!

Jonathan Brielmaier (1):
  gnu: Add icedove.

 gnu/local.mk             |   1 +
 gnu/packages/icedove.scm | 322 +++++++++++++++++++++++++++++++++++++++
 2 files changed, 323 insertions(+)
 create mode 100644 gnu/packages/icedove.scm

--
2.26.1




Information forwarded to guix-patches <at> gnu.org:
bug#40959; Package guix-patches. (Wed, 29 Apr 2020 11:03:01 GMT) Full text and rfc822 format available.

Message #8 received at 40959 <at> debbugs.gnu.org (full text, mbox):

From: Jonathan Brielmaier <jonathan.brielmaier <at> web.de>
To: 40959 <at> debbugs.gnu.org
Cc: malacoda <at> monarch-pass.net, gillmann <at> infotropique.org,
 Jonathan Brielmaier <jonathan.brielmaier <at> web.de>
Subject: [PATCH 1/1] gnu: Add icedove.
Date: Wed, 29 Apr 2020 13:00:18 +0200
* gnu/packages/icedove.scm: New module.
* gnu/local.mk (GNU_SYSTEM_MODULES): Register it.

Co-authored-by: ng0 <gillmann <at> infotropique.org>
Co-authored-by: Adrian Malacoda <malacoda <at> monarch-pass.net>
---
 gnu/local.mk             |   1 +
 gnu/packages/icedove.scm | 322 +++++++++++++++++++++++++++++++++++++++
 2 files changed, 323 insertions(+)
 create mode 100644 gnu/packages/icedove.scm

diff --git a/gnu/local.mk b/gnu/local.mk
index 4af79f0caf..3c09649111 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -264,6 +264,7 @@ GNU_SYSTEM_MODULES =				\
   %D%/packages/hyperledger.scm			\
   %D%/packages/i2p.scm				\
   %D%/packages/ibus.scm				\
+  %D%/packages/icedove.scm				\
   %D%/packages/icu4c.scm			\
   %D%/packages/idris.scm			\
   %D%/packages/idutils.scm			\
diff --git a/gnu/packages/icedove.scm b/gnu/packages/icedove.scm
new file mode 100644
index 0000000000..5e699898ac
--- /dev/null
+++ b/gnu/packages/icedove.scm
@@ -0,0 +1,322 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright (C) 2017, 2018 ng0 <gillmann <at> infotropique.org>
+;;; Copyright (C) 2019, 2020 Adrian Malacoda <malacoda <at> monarch-pass.net>
+;;; Copyright (C) 2020 Jonathan Brielmaier <jonathan.brielmaier <at> web.de>
+;;; 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 (gnu packages icedove)
+  #:use-module (guix download)
+  #:use-module ((guix licenses) #:prefix license:)
+  #:use-module (guix packages)
+  #:use-module (guix utils)
+  #:use-module (guix build-system gnu)
+  #:use-module (guix build-system cargo)
+  #:use-module (gnu packages)
+  #:use-module (gnu packages autotools)
+  #:use-module (gnu packages assembly)
+  #:use-module (gnu packages base)
+  #:use-module (gnu packages commencement)
+  #:use-module (gnu packages compression)
+  #:use-module (gnu packages crates-io)
+  #:use-module (gnu packages cups)
+  #:use-module (gnu packages databases)
+  #:use-module (gnu packages fontutils)
+  #:use-module (gnu packages gcc)
+  #:use-module (gnu packages gl)
+  #:use-module (gnu packages glib)
+  #:use-module (gnu packages gnome)
+  #:use-module (gnu packages gtk)
+  #:use-module (gnu packages icu4c)
+  #:use-module (gnu packages image)
+  #:use-module (gnu packages kerberos)
+  #:use-module (gnu packages libcanberra)
+  #:use-module (gnu packages libevent)
+  #:use-module (gnu packages libffi)
+  #:use-module (gnu packages libreoffice)  ;for hunspell
+  #:use-module (gnu packages linux)
+  #:use-module (gnu packages llvm)
+  #:use-module (gnu packages node)
+  #:use-module (gnu packages nss)
+  #:use-module (gnu packages perl)
+  #:use-module (gnu packages pkg-config)
+  #:use-module (gnu packages pulseaudio)
+  #:use-module (gnu packages python)
+  #:use-module (gnu packages readline)
+  #:use-module (gnu packages rust)
+  #:use-module (gnu packages rust-apps)
+  #:use-module (gnu packages sqlite)
+  #:use-module (gnu packages video)
+  #:use-module (gnu packages xdisorg)
+  #:use-module (gnu packages xorg))
+
+(define %icedove-build-id "20200428000000")
+
+(define-public icedove
+  (package
+    (name "icedove")
+    (version "68.7.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "https://archive.mozilla.org/pub/"
+                           "thunderbird/releases/"
+                           version "/source/thunderbird-" version
+                           ".source.tar.xz"))
+       (sha256
+        (base32
+         "112by5xzy9f28fj35yz644vby3c957apj5by2xm8b3qxxqpzsbmw"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:tests? #f                      ; no check target
+       ;; XXX: There are RUNPATH issues such as
+       ;; $prefix/lib/icecat-31.6.0/plugin-container NEEDing libmozalloc.so,
+       ;; which is not in its RUNPATH, but they appear to be harmless in
+       ;; practice somehow.  See <http://hydra.gnu.org/build/378133>.
+       #:validate-runpath? #f
+
+       #:imported-modules ,%cargo-utils-modules ;for `generate-checksums'
+
+       #:modules ((guix build utils) ;find-files
+                  (ice-9 regex)
+                  ,@%gnu-build-system-modules)
+
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'remove-bundled-libraries
+           (lambda _
+             ;; Remove bundled libraries that we don't use.
+             (for-each (lambda (file)
+                         (format #t "deleting '~a'...~%" file)
+                         (delete-file-recursively file))
+                       '(;; UNBUNDLE-ME! icu
+                         ;; UNBUNDLE-ME! nss
+                         "modules/zlib"))
+             #t))
+         (add-before 'configure 'augment-CPLUS_INCLUDE_PATH
+           (lambda* (#:key build inputs #:allow-other-keys)
+             ;; Here, we add additional entries to CPLUS_INCLUDE_PATH, to work
+             ;; around a problem that otherwise occurs when attempting to
+             ;; build Stylo, which requires Rust and Clang.  Without these
+             ;; additional entries, errors occur during the build indicating
+             ;; that the <cstddef> and "c++config.h" headers cannot be found.
+             ;; Note that the 'build' keyword argument contains the GNU
+             ;; triplet, e.g. "x86_64-unknown-linux-gnu".
+             (let ((gcc (assoc-ref inputs "gcc")))
+               (setenv "CPLUS_INCLUDE_PATH"
+                       (string-append gcc "/include/c++" ":"
+                                      gcc "/include/c++/" build)))
+             #t))
+
+         (add-after 'patch-source-shebangs 'patch-cargo-checksums
+           (lambda _
+             (use-modules (guix build cargo-utils))
+             (let ((null-hash "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"))
+               (substitute* '("Cargo.lock" "gfx/wr/Cargo.lock")
+                 (("(\"checksum .* = )\".*\"" all name)
+                  (string-append name "\"" null-hash "\"")))
+               (for-each
+                (lambda (filename)
+                  (delete-file filename)
+                  (let ((dir (dirname filename)))
+                    (display (string-append
+                              "patch-cargo-checksums: generate-checksums for "
+                              dir "\n"))
+                    (generate-checksums dir)))
+                (find-files "third_party/rust" ".cargo-checksum.json")))
+             #t))
+
+         ; Fixes issue where each installation directory generates its own profile.
+         ; See e.g. https://trac.torproject.org/projects/tor/ticket/31457
+         (add-after 'patch-source-shebangs 'fix-profile-setting
+           (lambda _
+             (let ((mozconfigure "comm/mail/moz.configure"))
+               (substitute* mozconfigure
+                 (("'MOZ_DEDICATED_PROFILES', True")
+                  "'MOZ_DEDICATED_PROFILES', False")))))
+
+         (add-after 'build 'neutralise-store-references
+           (lambda _
+             ;; Mangle the store references to compilers & other build tools in
+             ;; about:buildconfig, reducing Icedove's closure significant.
+             ;; The resulting files are saved in lib/thunderbird/omni.ja
+             (substitute*
+                 ;; Use find because the path "obj-x86_64-pc-linux-gnu" contains
+                 ;; the architecture and the system -> more complicated.
+                 (find-files "." "buildconfig.html")
+               (((format #f "(~a/)([0-9a-df-np-sv-z]{32})"
+                         (regexp-quote (%store-directory)))
+                 _ store hash)
+                (string-append store
+                               (string-take hash 8)
+                               "<!-- Guix: not a runtime dependency -->"
+                               (string-drop hash 8))))
+             #t))
+         (replace 'configure
+           (lambda* (#:key outputs configure-flags #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (bash (which "bash"))
+                    (abs-srcdir (getcwd))
+                    (srcdir (string-append "../" (basename abs-srcdir)))
+                    (flags `(,(string-append "--prefix=" out)
+                             ,@configure-flags))
+                    (mozconfig (string-append (getcwd) "/.mozconfig")))
+               (setenv "SHELL" bash)
+               (setenv "AUTOCONF"
+                       (string-append (assoc-ref %build-inputs
+                                                 "autoconf")
+                                      "/bin/autoconf"))
+               (setenv "CONFIG_SHELL" bash)
+               (setenv "QA_CONFIGURE_OPTIONS" ".*")
+               (setenv "MOZBUILD_STATE_PATH"
+                       (string-append (getcwd) "/mach_state"))
+               (setenv "MOZCONFIG"
+                       (string-append (getcwd) "/.mozconfig"))
+               (setenv "CC" "gcc")
+               (setenv "MOZ_NOSPAM" "1")
+               (setenv "PYTHON"
+                       (string-append (assoc-ref %build-inputs
+                                                 "python2")
+                                      "/bin/python"))
+               (setenv "MOZ_BUILD_DATE" ,%icedove-build-id) ; avoid timestamp
+               ;; (setenv "builddir" (string-append (getcwd) "/build"))
+               ;; (mkdir-p (getenv "MOZBUILD_STATE_PATH"))
+               (mkdir-p (string-append (getcwd) "/builddir"))
+               (with-output-to-file mozconfig
+                 (lambda ()
+                   (display
+                    (string-append
+                     "ac_add_options --disable-crashreporter\n"
+                     "ac_add_options --disable-debug\n"
+                     "ac_add_options --disable-debug-symbols\n"
+                     "ac_add_options --disable-elf-hack\n"
+                     "ac_add_options --disable-gconf\n"
+                     "ac_add_options --disable-ion\n"
+                     "ac_add_options --disable-necko-wifi\n"
+                     "ac_add_options --disable-official-branding\n"
+                     "ac_add_options --disable-tests\n"
+                     "ac_add_options --disable-updater\n"
+                     "ac_add_options --disable-webrtc\n"
+                     "ac_add_options --enable-alsa\n"
+                     "ac_add_options --enable-application=comm/mail\n"
+                     "ac_add_options --enable-calendar\n"
+                     "ac_add_options --enable-content-sandbox\n"
+                     "ac_add_options --enable-default-toolkit=\"cairo-gtk3\"\n"
+                     "ac_add_options --enable-optimize\n"
+                     "ac_add_options --enable-pulseaudio\n"
+                     "ac_add_options --enable-release\n"
+                     "ac_add_options --enable-startup-notification\n"
+                     "ac_add_options --enable-strip\n"
+                     "ac_add_options --enable-system-ffi\n"
+                     "ac_add_options --enable-system-pixman\n"
+                     "ac_add_options --enable-system-sqlite\n"
+                     "ac_add_options --prefix=" out "\n"
+                     "ac_add_options --with-clang-path=" (assoc-ref %build-inputs "clang") "/bin/clang\n"
+                     "ac_add_options --with-distribution-id=org.gnu\n"
+                     "ac_add_options --with-libclang-path=" (assoc-ref %build-inputs "clang") "/lib\n"
+                     "ac_add_options --with-system-bz2\n"
+                     "ac_add_options --with-system-icu\n"
+                     "ac_add_options --with-system-jpeg\n"
+                     "ac_add_options --with-system-libevent\n"
+                     "ac_add_options --with-system-nspr\n"
+                     "ac_add_options --with-system-nss\n"
+                     "ac_add_options --with-system-zlib\n"
+                     "ac_add_options --with-user-appdir=\\.thunderbird\n"))))
+               (display (getcwd))
+               (newline)
+               (display "mach configure")
+               (delete-file-recursively "obj-x86_64-pc-linux-gnu")
+               (zero? (system* "./mach" "configure")))))
+
+         (replace 'build
+           (lambda _
+             (zero? (system* "./mach" "build"))))
+
+         (replace 'install
+           (lambda _
+             (zero? (system* "./mach" "install"))))
+
+         (add-after 'install 'wrap-program
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (lib (string-append out "/lib"))
+                    (gtk (assoc-ref inputs "gtk+"))
+                    (gtk-share (string-append gtk "/share"))
+                    (pulseaudio (assoc-ref inputs "pulseaudio"))
+                    (pulseaudio-lib (string-append pulseaudio "/lib")))
+               (wrap-program (car (find-files lib "^thunderbird$"))
+                 `("XDG_DATA_DIRS" prefix (,gtk-share))
+                 `("LD_LIBRARY_PATH" prefix (,pulseaudio-lib)))
+               #t))))))
+    (inputs
+     `(("alsa-lib" ,alsa-lib)
+       ("bzip2" ,bzip2)
+       ("cairo" ,cairo)
+       ("cups" ,cups)
+       ("dbus-glib" ,dbus-glib)
+       ("ffmpeg" ,ffmpeg)
+       ("freetype" ,freetype)
+       ("gdk-pixbuf" ,gdk-pixbuf)
+       ("glib" ,glib)
+       ("gtk+" ,gtk+)
+       ("gtk+-2" ,gtk+-2)
+       ("hunspell" ,hunspell)
+       ("icu4c" ,icu4c)
+       ("libcanberra" ,libcanberra)
+       ("libevent" ,libevent)
+       ("libffi" ,libffi)
+       ("libgnome" ,libgnome)
+       ("libjpeg-turbo" ,libjpeg-turbo)
+       ("libpng-apng" ,libpng-apng)
+       ("libvpx" ,libvpx)
+       ("libxcomposite" ,libxcomposite)
+       ("libxft" ,libxft)
+       ("libxinerama" ,libxinerama)
+       ("libxscrnsaver" ,libxscrnsaver)
+       ("libxt" ,libxt)
+       ("mesa" ,mesa)
+       ("mit-krb5" ,mit-krb5)
+       ("nspr" ,nspr)
+       ("nss" ,nss)
+       ("pango" ,pango)
+       ("pixman" ,pixman)
+       ("pulseaudio" ,pulseaudio)
+       ("sqlite" ,sqlite)
+       ("startup-notification" ,startup-notification)
+       ("unzip" ,unzip)
+       ("zip" ,zip)
+       ("zlib" ,zlib)))
+    (native-inputs
+     `(("autoconf" ,autoconf-2.13)
+       ("cargo" ,rust "cargo")
+       ("clang" ,clang)
+       ("llvm" ,llvm)
+       ("nasm" ,nasm)
+       ("node" ,node)
+       ("perl" ,perl)
+       ("pkg-config" ,pkg-config)
+       ("python" ,python)
+       ("python2" ,python-2.7)
+       ("python2-pysqlite" ,python2-pysqlite)
+       ("rust" ,rust)
+       ("rust-cbindgen" ,rust-cbindgen)
+       ("which" ,which)
+       ("yasm" ,yasm)))
+    (home-page "https://www.thunderbird.net")
+    (synopsis "Trademarkless version of Mozilla Thunderbird")
+    (description
+     "Full-featured email client built from Thunderbird source tree.  It
+supports email, news feeds, chat, calendar and contacts.")
+    (license license:mpl2.0))) ;and others, see toolkit/content/license.html
--
2.26.1





Information forwarded to guix-patches <at> gnu.org:
bug#40959; Package guix-patches. (Wed, 29 Apr 2020 13:36:02 GMT) Full text and rfc822 format available.

Message #11 received at 40959 <at> debbugs.gnu.org (full text, mbox):

From: Nikita Gillmann <nikita <at> n0.is>
To: Jonathan Brielmaier <jonathan.brielmaier <at> web.de>
Cc: 40959 <at> debbugs.gnu.org, nikita <at> n0.is, malacoda <at> monarch-pass.net
Subject: Re: [PATCH 1/1] gnu: Add icedove.
Date: Wed, 29 Apr 2020 13:12:01 +0200
[Message part 1 (text/plain, inline)]
Hi,

I admit I forgot I did this in 2017 and 2018?

Editorial remarks from the semi-retirement machine wise (I get back when
I can afford more computers again): can you change my name line to

Nikita <nikita <at> n0.is>

in this file? I will eventually send one for the files I authored in the
past + the .mailmap

If the mononym doesn't work out for Guix, use my fullname (Nikita
Gillmann), the mononym I use within NetBSD and GNUnet and it's okay.

Thanks, and thanks for apparently finishing this :)

Jonathan Brielmaier transcribed 15K bytes:
> * gnu/packages/icedove.scm: New module.
> * gnu/local.mk (GNU_SYSTEM_MODULES): Register it.
> 
> Co-authored-by: ng0 <gillmann <at> infotropique.org>
> Co-authored-by: Adrian Malacoda <malacoda <at> monarch-pass.net>
> ---
>  gnu/local.mk             |   1 +
>  gnu/packages/icedove.scm | 322 +++++++++++++++++++++++++++++++++++++++
>  2 files changed, 323 insertions(+)
>  create mode 100644 gnu/packages/icedove.scm
> 
> diff --git a/gnu/local.mk b/gnu/local.mk
> index 4af79f0caf..3c09649111 100644
> --- a/gnu/local.mk
> +++ b/gnu/local.mk
> @@ -264,6 +264,7 @@ GNU_SYSTEM_MODULES =				\
>    %D%/packages/hyperledger.scm			\
>    %D%/packages/i2p.scm				\
>    %D%/packages/ibus.scm				\
> +  %D%/packages/icedove.scm				\
>    %D%/packages/icu4c.scm			\
>    %D%/packages/idris.scm			\
>    %D%/packages/idutils.scm			\
> diff --git a/gnu/packages/icedove.scm b/gnu/packages/icedove.scm
> new file mode 100644
> index 0000000000..5e699898ac
> --- /dev/null
> +++ b/gnu/packages/icedove.scm
> @@ -0,0 +1,322 @@
> +;;; GNU Guix --- Functional package management for GNU
> +;;; Copyright (C) 2017, 2018 ng0 <gillmann <at> infotropique.org>
> +;;; Copyright (C) 2019, 2020 Adrian Malacoda <malacoda <at> monarch-pass.net>
> +;;; Copyright (C) 2020 Jonathan Brielmaier <jonathan.brielmaier <at> web.de>
> +;;; 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 (gnu packages icedove)
> +  #:use-module (guix download)
> +  #:use-module ((guix licenses) #:prefix license:)
> +  #:use-module (guix packages)
> +  #:use-module (guix utils)
> +  #:use-module (guix build-system gnu)
> +  #:use-module (guix build-system cargo)
> +  #:use-module (gnu packages)
> +  #:use-module (gnu packages autotools)
> +  #:use-module (gnu packages assembly)
> +  #:use-module (gnu packages base)
> +  #:use-module (gnu packages commencement)
> +  #:use-module (gnu packages compression)
> +  #:use-module (gnu packages crates-io)
> +  #:use-module (gnu packages cups)
> +  #:use-module (gnu packages databases)
> +  #:use-module (gnu packages fontutils)
> +  #:use-module (gnu packages gcc)
> +  #:use-module (gnu packages gl)
> +  #:use-module (gnu packages glib)
> +  #:use-module (gnu packages gnome)
> +  #:use-module (gnu packages gtk)
> +  #:use-module (gnu packages icu4c)
> +  #:use-module (gnu packages image)
> +  #:use-module (gnu packages kerberos)
> +  #:use-module (gnu packages libcanberra)
> +  #:use-module (gnu packages libevent)
> +  #:use-module (gnu packages libffi)
> +  #:use-module (gnu packages libreoffice)  ;for hunspell
> +  #:use-module (gnu packages linux)
> +  #:use-module (gnu packages llvm)
> +  #:use-module (gnu packages node)
> +  #:use-module (gnu packages nss)
> +  #:use-module (gnu packages perl)
> +  #:use-module (gnu packages pkg-config)
> +  #:use-module (gnu packages pulseaudio)
> +  #:use-module (gnu packages python)
> +  #:use-module (gnu packages readline)
> +  #:use-module (gnu packages rust)
> +  #:use-module (gnu packages rust-apps)
> +  #:use-module (gnu packages sqlite)
> +  #:use-module (gnu packages video)
> +  #:use-module (gnu packages xdisorg)
> +  #:use-module (gnu packages xorg))
> +
> +(define %icedove-build-id "20200428000000")
> +
> +(define-public icedove
> +  (package
> +    (name "icedove")
> +    (version "68.7.0")
> +    (source
> +     (origin
> +       (method url-fetch)
> +       (uri (string-append "https://archive.mozilla.org/pub/"
> +                           "thunderbird/releases/"
> +                           version "/source/thunderbird-" version
> +                           ".source.tar.xz"))
> +       (sha256
> +        (base32
> +         "112by5xzy9f28fj35yz644vby3c957apj5by2xm8b3qxxqpzsbmw"))))
> +    (build-system gnu-build-system)
> +    (arguments
> +     `(#:tests? #f                      ; no check target
> +       ;; XXX: There are RUNPATH issues such as
> +       ;; $prefix/lib/icecat-31.6.0/plugin-container NEEDing libmozalloc.so,
> +       ;; which is not in its RUNPATH, but they appear to be harmless in
> +       ;; practice somehow.  See <http://hydra.gnu.org/build/378133>.
> +       #:validate-runpath? #f
> +
> +       #:imported-modules ,%cargo-utils-modules ;for `generate-checksums'
> +
> +       #:modules ((guix build utils) ;find-files
> +                  (ice-9 regex)
> +                  ,@%gnu-build-system-modules)
> +
> +       #:phases
> +       (modify-phases %standard-phases
> +         (add-after 'unpack 'remove-bundled-libraries
> +           (lambda _
> +             ;; Remove bundled libraries that we don't use.
> +             (for-each (lambda (file)
> +                         (format #t "deleting '~a'...~%" file)
> +                         (delete-file-recursively file))
> +                       '(;; UNBUNDLE-ME! icu
> +                         ;; UNBUNDLE-ME! nss
> +                         "modules/zlib"))
> +             #t))
> +         (add-before 'configure 'augment-CPLUS_INCLUDE_PATH
> +           (lambda* (#:key build inputs #:allow-other-keys)
> +             ;; Here, we add additional entries to CPLUS_INCLUDE_PATH, to work
> +             ;; around a problem that otherwise occurs when attempting to
> +             ;; build Stylo, which requires Rust and Clang.  Without these
> +             ;; additional entries, errors occur during the build indicating
> +             ;; that the <cstddef> and "c++config.h" headers cannot be found.
> +             ;; Note that the 'build' keyword argument contains the GNU
> +             ;; triplet, e.g. "x86_64-unknown-linux-gnu".
> +             (let ((gcc (assoc-ref inputs "gcc")))
> +               (setenv "CPLUS_INCLUDE_PATH"
> +                       (string-append gcc "/include/c++" ":"
> +                                      gcc "/include/c++/" build)))
> +             #t))
> +
> +         (add-after 'patch-source-shebangs 'patch-cargo-checksums
> +           (lambda _
> +             (use-modules (guix build cargo-utils))
> +             (let ((null-hash "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"))
> +               (substitute* '("Cargo.lock" "gfx/wr/Cargo.lock")
> +                 (("(\"checksum .* = )\".*\"" all name)
> +                  (string-append name "\"" null-hash "\"")))
> +               (for-each
> +                (lambda (filename)
> +                  (delete-file filename)
> +                  (let ((dir (dirname filename)))
> +                    (display (string-append
> +                              "patch-cargo-checksums: generate-checksums for "
> +                              dir "\n"))
> +                    (generate-checksums dir)))
> +                (find-files "third_party/rust" ".cargo-checksum.json")))
> +             #t))
> +
> +         ; Fixes issue where each installation directory generates its own profile.
> +         ; See e.g. https://trac.torproject.org/projects/tor/ticket/31457
> +         (add-after 'patch-source-shebangs 'fix-profile-setting
> +           (lambda _
> +             (let ((mozconfigure "comm/mail/moz.configure"))
> +               (substitute* mozconfigure
> +                 (("'MOZ_DEDICATED_PROFILES', True")
> +                  "'MOZ_DEDICATED_PROFILES', False")))))
> +
> +         (add-after 'build 'neutralise-store-references
> +           (lambda _
> +             ;; Mangle the store references to compilers & other build tools in
> +             ;; about:buildconfig, reducing Icedove's closure significant.
> +             ;; The resulting files are saved in lib/thunderbird/omni.ja
> +             (substitute*
> +                 ;; Use find because the path "obj-x86_64-pc-linux-gnu" contains
> +                 ;; the architecture and the system -> more complicated.
> +                 (find-files "." "buildconfig.html")
> +               (((format #f "(~a/)([0-9a-df-np-sv-z]{32})"
> +                         (regexp-quote (%store-directory)))
> +                 _ store hash)
> +                (string-append store
> +                               (string-take hash 8)
> +                               "<!-- Guix: not a runtime dependency -->"
> +                               (string-drop hash 8))))
> +             #t))
> +         (replace 'configure
> +           (lambda* (#:key outputs configure-flags #:allow-other-keys)
> +             (let* ((out (assoc-ref outputs "out"))
> +                    (bash (which "bash"))
> +                    (abs-srcdir (getcwd))
> +                    (srcdir (string-append "../" (basename abs-srcdir)))
> +                    (flags `(,(string-append "--prefix=" out)
> +                             ,@configure-flags))
> +                    (mozconfig (string-append (getcwd) "/.mozconfig")))
> +               (setenv "SHELL" bash)
> +               (setenv "AUTOCONF"
> +                       (string-append (assoc-ref %build-inputs
> +                                                 "autoconf")
> +                                      "/bin/autoconf"))
> +               (setenv "CONFIG_SHELL" bash)
> +               (setenv "QA_CONFIGURE_OPTIONS" ".*")
> +               (setenv "MOZBUILD_STATE_PATH"
> +                       (string-append (getcwd) "/mach_state"))
> +               (setenv "MOZCONFIG"
> +                       (string-append (getcwd) "/.mozconfig"))
> +               (setenv "CC" "gcc")
> +               (setenv "MOZ_NOSPAM" "1")
> +               (setenv "PYTHON"
> +                       (string-append (assoc-ref %build-inputs
> +                                                 "python2")
> +                                      "/bin/python"))
> +               (setenv "MOZ_BUILD_DATE" ,%icedove-build-id) ; avoid timestamp
> +               ;; (setenv "builddir" (string-append (getcwd) "/build"))
> +               ;; (mkdir-p (getenv "MOZBUILD_STATE_PATH"))
> +               (mkdir-p (string-append (getcwd) "/builddir"))
> +               (with-output-to-file mozconfig
> +                 (lambda ()
> +                   (display
> +                    (string-append
> +                     "ac_add_options --disable-crashreporter\n"
> +                     "ac_add_options --disable-debug\n"
> +                     "ac_add_options --disable-debug-symbols\n"
> +                     "ac_add_options --disable-elf-hack\n"
> +                     "ac_add_options --disable-gconf\n"
> +                     "ac_add_options --disable-ion\n"
> +                     "ac_add_options --disable-necko-wifi\n"
> +                     "ac_add_options --disable-official-branding\n"
> +                     "ac_add_options --disable-tests\n"
> +                     "ac_add_options --disable-updater\n"
> +                     "ac_add_options --disable-webrtc\n"
> +                     "ac_add_options --enable-alsa\n"
> +                     "ac_add_options --enable-application=comm/mail\n"
> +                     "ac_add_options --enable-calendar\n"
> +                     "ac_add_options --enable-content-sandbox\n"
> +                     "ac_add_options --enable-default-toolkit=\"cairo-gtk3\"\n"
> +                     "ac_add_options --enable-optimize\n"
> +                     "ac_add_options --enable-pulseaudio\n"
> +                     "ac_add_options --enable-release\n"
> +                     "ac_add_options --enable-startup-notification\n"
> +                     "ac_add_options --enable-strip\n"
> +                     "ac_add_options --enable-system-ffi\n"
> +                     "ac_add_options --enable-system-pixman\n"
> +                     "ac_add_options --enable-system-sqlite\n"
> +                     "ac_add_options --prefix=" out "\n"
> +                     "ac_add_options --with-clang-path=" (assoc-ref %build-inputs "clang") "/bin/clang\n"
> +                     "ac_add_options --with-distribution-id=org.gnu\n"
> +                     "ac_add_options --with-libclang-path=" (assoc-ref %build-inputs "clang") "/lib\n"
> +                     "ac_add_options --with-system-bz2\n"
> +                     "ac_add_options --with-system-icu\n"
> +                     "ac_add_options --with-system-jpeg\n"
> +                     "ac_add_options --with-system-libevent\n"
> +                     "ac_add_options --with-system-nspr\n"
> +                     "ac_add_options --with-system-nss\n"
> +                     "ac_add_options --with-system-zlib\n"
> +                     "ac_add_options --with-user-appdir=\\.thunderbird\n"))))
> +               (display (getcwd))
> +               (newline)
> +               (display "mach configure")
> +               (delete-file-recursively "obj-x86_64-pc-linux-gnu")
> +               (zero? (system* "./mach" "configure")))))
> +
> +         (replace 'build
> +           (lambda _
> +             (zero? (system* "./mach" "build"))))
> +
> +         (replace 'install
> +           (lambda _
> +             (zero? (system* "./mach" "install"))))
> +
> +         (add-after 'install 'wrap-program
> +           (lambda* (#:key inputs outputs #:allow-other-keys)
> +             (let* ((out (assoc-ref outputs "out"))
> +                    (lib (string-append out "/lib"))
> +                    (gtk (assoc-ref inputs "gtk+"))
> +                    (gtk-share (string-append gtk "/share"))
> +                    (pulseaudio (assoc-ref inputs "pulseaudio"))
> +                    (pulseaudio-lib (string-append pulseaudio "/lib")))
> +               (wrap-program (car (find-files lib "^thunderbird$"))
> +                 `("XDG_DATA_DIRS" prefix (,gtk-share))
> +                 `("LD_LIBRARY_PATH" prefix (,pulseaudio-lib)))
> +               #t))))))
> +    (inputs
> +     `(("alsa-lib" ,alsa-lib)
> +       ("bzip2" ,bzip2)
> +       ("cairo" ,cairo)
> +       ("cups" ,cups)
> +       ("dbus-glib" ,dbus-glib)
> +       ("ffmpeg" ,ffmpeg)
> +       ("freetype" ,freetype)
> +       ("gdk-pixbuf" ,gdk-pixbuf)
> +       ("glib" ,glib)
> +       ("gtk+" ,gtk+)
> +       ("gtk+-2" ,gtk+-2)
> +       ("hunspell" ,hunspell)
> +       ("icu4c" ,icu4c)
> +       ("libcanberra" ,libcanberra)
> +       ("libevent" ,libevent)
> +       ("libffi" ,libffi)
> +       ("libgnome" ,libgnome)
> +       ("libjpeg-turbo" ,libjpeg-turbo)
> +       ("libpng-apng" ,libpng-apng)
> +       ("libvpx" ,libvpx)
> +       ("libxcomposite" ,libxcomposite)
> +       ("libxft" ,libxft)
> +       ("libxinerama" ,libxinerama)
> +       ("libxscrnsaver" ,libxscrnsaver)
> +       ("libxt" ,libxt)
> +       ("mesa" ,mesa)
> +       ("mit-krb5" ,mit-krb5)
> +       ("nspr" ,nspr)
> +       ("nss" ,nss)
> +       ("pango" ,pango)
> +       ("pixman" ,pixman)
> +       ("pulseaudio" ,pulseaudio)
> +       ("sqlite" ,sqlite)
> +       ("startup-notification" ,startup-notification)
> +       ("unzip" ,unzip)
> +       ("zip" ,zip)
> +       ("zlib" ,zlib)))
> +    (native-inputs
> +     `(("autoconf" ,autoconf-2.13)
> +       ("cargo" ,rust "cargo")
> +       ("clang" ,clang)
> +       ("llvm" ,llvm)
> +       ("nasm" ,nasm)
> +       ("node" ,node)
> +       ("perl" ,perl)
> +       ("pkg-config" ,pkg-config)
> +       ("python" ,python)
> +       ("python2" ,python-2.7)
> +       ("python2-pysqlite" ,python2-pysqlite)
> +       ("rust" ,rust)
> +       ("rust-cbindgen" ,rust-cbindgen)
> +       ("which" ,which)
> +       ("yasm" ,yasm)))
> +    (home-page "https://www.thunderbird.net")
> +    (synopsis "Trademarkless version of Mozilla Thunderbird")
> +    (description
> +     "Full-featured email client built from Thunderbird source tree.  It
> +supports email, news feeds, chat, calendar and contacts.")
> +    (license license:mpl2.0))) ;and others, see toolkit/content/license.html
> --
> 2.26.1
> 
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#40959; Package guix-patches. (Wed, 29 Apr 2020 15:06:02 GMT) Full text and rfc822 format available.

Message #14 received at 40959 <at> debbugs.gnu.org (full text, mbox):

From: Ricardo Wurmus <rekado <at> elephly.net>
To: 40959 <at> debbugs.gnu.org
Cc: malacoda <at> monarch-pass.net, gillmann <at> infotropique.org,
 Jonathan Brielmaier <jonathan.brielmaier <at> web.de>
Subject: Re: [bug#40959] [PATCH 1/1] gnu: Add icedove.
Date: Wed, 29 Apr 2020 17:05:04 +0200
Thank you for this patch.

> +    (arguments
> +     `(#:tests? #f                      ; no check target
> +       ;; XXX: There are RUNPATH issues such as
> +       ;; $prefix/lib/icecat-31.6.0/plugin-container NEEDing libmozalloc.so,
> +       ;; which is not in its RUNPATH, but they appear to be harmless in
> +       ;; practice somehow.  See <http://hydra.gnu.org/build/378133>.
> +       #:validate-runpath? #f

The comment seems to have been copied from somewhere.  I don’t think
this package produces $prefix/lib/icecat-31.6.0/plugin-container

The URL is also no longer reachable.

> +         (add-after 'unpack 'remove-bundled-libraries
> +           (lambda _
> +             ;; Remove bundled libraries that we don't use.
> +             (for-each (lambda (file)
> +                         (format #t "deleting '~a'...~%" file)
> +                         (delete-file-recursively file))
> +                       '(;; UNBUNDLE-ME! icu
> +                         ;; UNBUNDLE-ME! nss
> +                         "modules/zlib"))
> +             #t))

This should be done in a snippet.

> +         (add-after 'patch-source-shebangs 'patch-cargo-checksums
> +           (lambda _
> +             (use-modules (guix build cargo-utils))
> +             (let ((null-hash
> "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"))

What is this null-hash?

> +               (substitute* '("Cargo.lock" "gfx/wr/Cargo.lock")
> +                 (("(\"checksum .* = )\".*\"" all name)
> +                  (string-append name "\"" null-hash "\"")))
> +               (for-each
> +                (lambda (filename)
> +                  (delete-file filename)
> +                  (let ((dir (dirname filename)))
> +                    (display (string-append
> +                              "patch-cargo-checksums: generate-checksums for "
> +                              dir "\n"))
> +                    (generate-checksums dir)))
> +                (find-files "third_party/rust" ".cargo-checksum.json")))
> +             #t))

Oh, there are a lot of things in third_party/rust…  Can this be unbundled?

> +         ; Fixes issue where each installation directory generates its own profile.
> +         ; See e.g. https://trac.torproject.org/projects/tor/ticket/31457
> +         (add-after 'patch-source-shebangs 'fix-profile-setting
> +           (lambda _
> +             (let ((mozconfigure "comm/mail/moz.configure"))
> +               (substitute* mozconfigure
> +                 (("'MOZ_DEDICATED_PROFILES', True")
> +                  "'MOZ_DEDICATED_PROFILES', False")))))

This phase needs to end on #t.

> +         (replace 'configure
> +           (lambda* (#:key outputs configure-flags #:allow-other-keys)
> +             (let* ((out (assoc-ref outputs "out"))
> +                    (bash (which "bash"))
> +                    (abs-srcdir (getcwd))
> +                    (srcdir (string-append "../" (basename abs-srcdir)))
> +                    (flags `(,(string-append "--prefix=" out)
> +                             ,@configure-flags))
> +                    (mozconfig (string-append (getcwd) "/.mozconfig")))
> +               (setenv "SHELL" bash)
> +               (setenv "AUTOCONF"
> +                       (string-append (assoc-ref %build-inputs
> +                                                 "autoconf")
> +                                      "/bin/autoconf"))
> +               (setenv "CONFIG_SHELL" bash)
> +               (setenv "QA_CONFIGURE_OPTIONS" ".*")
> +               (setenv "MOZBUILD_STATE_PATH"
> +                       (string-append (getcwd) "/mach_state"))
> +               (setenv "MOZCONFIG"
> +                       (string-append (getcwd) "/.mozconfig"))
> +               (setenv "CC" "gcc")
> +               (setenv "MOZ_NOSPAM" "1")
> +               (setenv "PYTHON"
> +                       (string-append (assoc-ref %build-inputs
> +                                                 "python2")
> +                                      "/bin/python"))

Looks like Python 3 could be used instead.  Have you tried that?

> +               (delete-file-recursively "obj-x86_64-pc-linux-gnu")

Can this be deleted in a snippet or is this generated in some earlier
phase?  Is the same directory generated on other architectures?

> +               (zero? (system* "./mach" "configure")))))

Please use (invoke …) instead of (zero? (system* …)).

> +         (replace 'build
> +           (lambda _
> +             (zero? (system* "./mach" "build"))))

Same here.

> +         (replace 'install
> +           (lambda _
> +             (zero? (system* "./mach" "install"))))

…and here.

> +         (add-after 'install 'wrap-program
> +           (lambda* (#:key inputs outputs #:allow-other-keys)
> +             (let* ((out (assoc-ref outputs "out"))
> +                    (lib (string-append out "/lib"))
> +                    (gtk (assoc-ref inputs "gtk+"))
> +                    (gtk-share (string-append gtk "/share"))
> +                    (pulseaudio (assoc-ref inputs "pulseaudio"))
> +                    (pulseaudio-lib (string-append pulseaudio "/lib")))
> +               (wrap-program (car (find-files lib "^thunderbird$"))
> +                 `("XDG_DATA_DIRS" prefix (,gtk-share))
> +                 `("LD_LIBRARY_PATH" prefix (,pulseaudio-lib)))
> +               #t))))))

Why does thunderbird need wrapping with pulseaudio?

> +       ("python" ,python)
> +       ("python2" ,python-2.7)

See above.  We may be able to use Python 3 here.

> +    (home-page "https://www.thunderbird.net")
> +    (synopsis "Trademarkless version of Mozilla Thunderbird")

Is the use of the name “Thunderbird” a violation of Mozilla’s trademark
policies?

--
Ricardo




Information forwarded to guix-patches <at> gnu.org:
bug#40959; Package guix-patches. (Wed, 29 Apr 2020 19:48:02 GMT) Full text and rfc822 format available.

Message #17 received at 40959 <at> debbugs.gnu.org (full text, mbox):

From: Efraim Flashner <efraim <at> flashner.co.il>
To: Ricardo Wurmus <rekado <at> elephly.net>
Cc: 40959 <at> debbugs.gnu.org, malacoda <at> monarch-pass.net, gillmann <at> infotropique.org,
 Jonathan Brielmaier <jonathan.brielmaier <at> web.de>
Subject: Re: [bug#40959] [PATCH 1/1] gnu: Add icedove.
Date: Wed, 29 Apr 2020 22:47:02 +0300
[Message part 1 (text/plain, inline)]
On Wed, Apr 29, 2020 at 05:05:04PM +0200, Ricardo Wurmus wrote:
> 
> Thank you for this patch.
> 
> > +    (arguments
> > +     `(#:tests? #f                      ; no check target
> > +       ;; XXX: There are RUNPATH issues such as
> > +       ;; $prefix/lib/icecat-31.6.0/plugin-container NEEDing libmozalloc.so,
> > +       ;; which is not in its RUNPATH, but they appear to be harmless in
> > +       ;; practice somehow.  See <http://hydra.gnu.org/build/378133>.
> > +       #:validate-runpath? #f
> 
> The comment seems to have been copied from somewhere.  I don’t think
> this package produces $prefix/lib/icecat-31.6.0/plugin-container
> 
> The URL is also no longer reachable.
> 
> > +         (add-after 'unpack 'remove-bundled-libraries
> > +           (lambda _
> > +             ;; Remove bundled libraries that we don't use.
> > +             (for-each (lambda (file)
> > +                         (format #t "deleting '~a'...~%" file)
> > +                         (delete-file-recursively file))
> > +                       '(;; UNBUNDLE-ME! icu
> > +                         ;; UNBUNDLE-ME! nss
> > +                         "modules/zlib"))
> > +             #t))
> 
> This should be done in a snippet.
> 
> > +         (add-after 'patch-source-shebangs 'patch-cargo-checksums
> > +           (lambda _
> > +             (use-modules (guix build cargo-utils))
> > +             (let ((null-hash
> > "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"))
> 
> What is this null-hash?
> 

This is the "null-hash" that is also used in (gnu packages gnuzilla)

> > +               (substitute* '("Cargo.lock" "gfx/wr/Cargo.lock")
> > +                 (("(\"checksum .* = )\".*\"" all name)
> > +                  (string-append name "\"" null-hash "\"")))
> > +               (for-each
> > +                (lambda (filename)
> > +                  (delete-file filename)
> > +                  (let ((dir (dirname filename)))
> > +                    (display (string-append
> > +                              "patch-cargo-checksums: generate-checksums for "
> > +                              dir "\n"))
> > +                    (generate-checksums dir)))
> > +                (find-files "third_party/rust" ".cargo-checksum.json")))
> > +             #t))
> 
> Oh, there are a lot of things in third_party/rust…  Can this be unbundled?
> 

We don't yet unbundle the crates used in icecat so I wouldn't consider
it a blocker yet. On the other hand we do have a function for this in
(guix build cargo-utils) which should be used.

> > +         ; Fixes issue where each installation directory generates its own profile.
> > +         ; See e.g. https://trac.torproject.org/projects/tor/ticket/31457
> > +         (add-after 'patch-source-shebangs 'fix-profile-setting
> > +           (lambda _
> > +             (let ((mozconfigure "comm/mail/moz.configure"))
> > +               (substitute* mozconfigure
> > +                 (("'MOZ_DEDICATED_PROFILES', True")
> > +                  "'MOZ_DEDICATED_PROFILES', False")))))
> 
> This phase needs to end on #t.
> 
> > +         (replace 'configure
> > +           (lambda* (#:key outputs configure-flags #:allow-other-keys)
> > +             (let* ((out (assoc-ref outputs "out"))
> > +                    (bash (which "bash"))
> > +                    (abs-srcdir (getcwd))
> > +                    (srcdir (string-append "../" (basename abs-srcdir)))
> > +                    (flags `(,(string-append "--prefix=" out)
> > +                             ,@configure-flags))
> > +                    (mozconfig (string-append (getcwd) "/.mozconfig")))
> > +               (setenv "SHELL" bash)
> > +               (setenv "AUTOCONF"
> > +                       (string-append (assoc-ref %build-inputs
> > +                                                 "autoconf")
> > +                                      "/bin/autoconf"))
> > +               (setenv "CONFIG_SHELL" bash)
> > +               (setenv "QA_CONFIGURE_OPTIONS" ".*")
> > +               (setenv "MOZBUILD_STATE_PATH"
> > +                       (string-append (getcwd) "/mach_state"))
> > +               (setenv "MOZCONFIG"
> > +                       (string-append (getcwd) "/.mozconfig"))
> > +               (setenv "CC" "gcc")
> > +               (setenv "MOZ_NOSPAM" "1")
> > +               (setenv "PYTHON"
> > +                       (string-append (assoc-ref %build-inputs
> > +                                                 "python2")
> > +                                      "/bin/python"))
> 
> Looks like Python 3 could be used instead.  Have you tried that?
> 
> > +               (delete-file-recursively "obj-x86_64-pc-linux-gnu")
> 
> Can this be deleted in a snippet or is this generated in some earlier
> phase?  Is the same directory generated on other architectures?
> 

I noticed this too. It should probably be generated per-architecture.

> > +               (zero? (system* "./mach" "configure")))))
> 
> Please use (invoke …) instead of (zero? (system* …)).
> 
> > +         (replace 'build
> > +           (lambda _
> > +             (zero? (system* "./mach" "build"))))
> 
> Same here.
> 
> > +         (replace 'install
> > +           (lambda _
> > +             (zero? (system* "./mach" "install"))))
> 
> …and here.
> 
> > +         (add-after 'install 'wrap-program
> > +           (lambda* (#:key inputs outputs #:allow-other-keys)
> > +             (let* ((out (assoc-ref outputs "out"))
> > +                    (lib (string-append out "/lib"))
> > +                    (gtk (assoc-ref inputs "gtk+"))
> > +                    (gtk-share (string-append gtk "/share"))
> > +                    (pulseaudio (assoc-ref inputs "pulseaudio"))
> > +                    (pulseaudio-lib (string-append pulseaudio "/lib")))
> > +               (wrap-program (car (find-files lib "^thunderbird$"))
> > +                 `("XDG_DATA_DIRS" prefix (,gtk-share))
> > +                 `("LD_LIBRARY_PATH" prefix (,pulseaudio-lib)))
> > +               #t))))))
> 
> Why does thunderbird need wrapping with pulseaudio?
> 
> > +       ("python" ,python)
> > +       ("python2" ,python-2.7)
> 
> See above.  We may be able to use Python 3 here.
> 
> > +    (home-page "https://www.thunderbird.net")
> > +    (synopsis "Trademarkless version of Mozilla Thunderbird")
> 
> Is the use of the name “Thunderbird” a violation of Mozilla’s trademark
> policies?
> 
> --
> Ricardo
> 
> 
> 

-- 
Efraim Flashner   <efraim <at> flashner.co.il>   אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#40959; Package guix-patches. (Thu, 30 Apr 2020 13:48:01 GMT) Full text and rfc822 format available.

Message #20 received at 40959 <at> debbugs.gnu.org (full text, mbox):

From: Ricardo Wurmus <rekado <at> elephly.net>
To: 40959 <at> debbugs.gnu.org
Cc: malacoda <at> monarch-pass.net, gillmann <at> infotropique.org,
 Jonathan Brielmaier <jonathan.brielmaier <at> web.de>
Subject: Re: [bug#40959] [PATCH 1/1] gnu: Add icedove.
Date: Thu, 30 Apr 2020 15:47:16 +0200
Another thing I just noticed: the tarball that we are working with is
2.7G unpacked.  But when I download a zip of the repository at
https://hg.mozilla.org/comm-central I get a 35MB file.

What’s up with that?

~~~

I made a few changes to the package to fix the runpath, use invoke, and
to edit the sources in a snippet.

It would be nice if we could use the 35MB repository instead of the 2.7G
thing.

--
Ricardo




Information forwarded to guix-patches <at> gnu.org:
bug#40959; Package guix-patches. (Thu, 30 Apr 2020 13:51:01 GMT) Full text and rfc822 format available.

Message #23 received at 40959 <at> debbugs.gnu.org (full text, mbox):

From: Ricardo Wurmus <rekado <at> elephly.net>
To: 40959 <at> debbugs.gnu.org
Cc: malacoda <at> monarch-pass.net, gillmann <at> infotropique.org,
 Jonathan Brielmaier <jonathan.brielmaier <at> web.de>
Subject: Re: [bug#40959] [PATCH 1/1] gnu: Add icedove.
Date: Thu, 30 Apr 2020 15:50:35 +0200
Ricardo Wurmus <rekado <at> elephly.net> writes:

> Another thing I just noticed: the tarball that we are working with is
> 2.7G unpacked.  But when I download a zip of the repository at
> https://hg.mozilla.org/comm-central I get a 35MB file.
>
> What’s up with that?

Looks like the comm-central stuff is meant to be added to the firefox
code, which contains the platform code.

This makes me wonder if we could combine this with our icecat package
and reuse the icecat sources.

-- 
Ricardo




Information forwarded to guix-patches <at> gnu.org:
bug#40959; Package guix-patches. (Thu, 30 Apr 2020 20:43:02 GMT) Full text and rfc822 format available.

Message #26 received at 40959 <at> debbugs.gnu.org (full text, mbox):

From: Ricardo Wurmus <rekado <at> elephly.net>
To: 40959 <at> debbugs.gnu.org
Cc: malacoda <at> monarch-pass.net, gillmann <at> infotropique.org,
 Jonathan Brielmaier <jonathan.brielmaier <at> web.de>
Subject: Re: [bug#40959] [PATCH 1/1] gnu: Add icedove.
Date: Thu, 30 Apr 2020 22:41:49 +0200
[Message part 1 (text/plain, inline)]
Ricardo Wurmus <rekado <at> elephly.net> writes:

> This makes me wonder if we could combine this with our icecat package
> and reuse the icecat sources.

We can, but I haven’t been able to find the sources in the repository
that correspond to the release, so I’m just taking the huge release
tarball and cut out the “comm” directory…

Attached is my latest version of the patch.

Problem is: this is still just Thunderbird, not Icedove.  At the very
least we should rename it.

-- 
Ricardo

[0001-WIP-gnu-Add-icedove.patch (text/x-patch, inline)]
From 85d7439dec310e94548c393ab66981c5f81182e6 Mon Sep 17 00:00:00 2001
From: Ricardo Wurmus <rekado <at> elephly.net>
Date: Thu, 30 Apr 2020 22:39:10 +0200
Subject: [PATCH] WIP gnu: Add icedove.

* gnu/packages/gnuzilla.scm (%icedove-build-id, icedove): New variables.
---
 gnu/packages/gnuzilla.scm | 253 +++++++++++++++++++++++++++++++++++++-
 1 file changed, 251 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/gnuzilla.scm b/gnu/packages/gnuzilla.scm
index 06d855ee3e..54ace31364 100644
--- a/gnu/packages/gnuzilla.scm
+++ b/gnu/packages/gnuzilla.scm
@@ -6,12 +6,14 @@
 ;;; Copyright © 2016, 2017, 2018, 2019 Efraim Flashner <efraim <at> flashner.co.il>
 ;;; Copyright © 2016 Alex Griffin <a <at> ajgrf.com>
 ;;; Copyright © 2017 Clément Lassieur <clement <at> lassieur.org>
-;;; Copyright © 2017 ng0 <ng0 <at> n0.is>
+;;; Copyright © 2017, 2018 Nikita <nikita <at> n0.is>
 ;;; Copyright © 2017, 2018, 2020 Tobias Geerinckx-Rice <me <at> tobias.gr>
-;;; Copyright © 2018 Ricardo Wurmus <rekado <at> elephly.net>
+;;; Copyright © 2018, 2020 Ricardo Wurmus <rekado <at> elephly.net>
 ;;; Copyright © 2019 Ivan Petkov <ivanppetkov <at> gmail.com>
 ;;; Copyright © 2020 Oleg Pykhalov <go.wigust <at> gmail.com>
 ;;; Copyright © 2020 Jakub Kądziołka <kuba <at> kadziolka.net>
+;;; Copyright © 2019, 2020 Adrian Malacoda <malacoda <at> monarch-pass.net>
+;;; Copyright © 2020 Jonathan Brielmaier <jonathan.brielmaier <at> web.de>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -1142,6 +1144,253 @@ standards of the IceCat project.")
        (cpe-name . "firefox_esr")
        (cpe-version . ,(first (string-split version #\-)))))))
 
+;; Update this together with icecat!
+(define %icedove-build-id "20200428000000")
+(define-public icedove
+  (package
+    (name "icedove")
+    (version "68.7.0")
+    (source icecat-source)
+    (build-system gnu-build-system)
+    (arguments
+     `(#:tests? #f                              ; no check target
+       #:imported-modules ,%cargo-utils-modules ;for `generate-all-checksums'
+
+       #:modules ((guix build utils)    ;find-files
+                  (ice-9 regex)
+                  ,@%gnu-build-system-modules)
+
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'prepare-thunderbird-sources
+           (lambda* (#:key inputs #:allow-other-keys)
+             (invoke "tar" "xf" (assoc-ref inputs "thunderbird-sources")
+                     "--strip-components=1")
+             ;; The build scripts does not like files from 1970
+             (let ((circa-1980 (* 10 366 24 60 60)))
+               (for-each (lambda (file)
+                           (utime file circa-1980 circa-1980))
+                         (find-files "comm")))
+             (delete-file-recursively "obj-x86_64-pc-linux-gnu")
+             #t))
+         (add-before 'configure 'augment-CPLUS_INCLUDE_PATH
+           (lambda* (#:key build inputs #:allow-other-keys)
+             ;; Here, we add additional entries to CPLUS_INCLUDE_PATH, to work
+             ;; around a problem that otherwise occurs when attempting to
+             ;; build Stylo, which requires Rust and Clang.  Without these
+             ;; additional entries, errors occur during the build indicating
+             ;; that the <cstddef> and "c++config.h" headers cannot be found.
+             ;; Note that the 'build' keyword argument contains the GNU
+             ;; triplet, e.g. "x86_64-unknown-linux-gnu".
+             (let ((gcc (assoc-ref inputs "gcc")))
+               (setenv "CPLUS_INCLUDE_PATH"
+                       (string-append gcc "/include/c++" ":"
+                                      gcc "/include/c++/" build)))
+             #t))
+         (add-after 'patch-source-shebangs 'patch-cargo-checksums
+           (lambda _
+             (use-modules (guix build cargo-utils))
+             (let ((null-hash "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"))
+               (substitute* '("Cargo.lock" "gfx/wr/Cargo.lock")
+                 (("(\"checksum .* = )\".*\"" all name)
+                  (string-append name "\"" null-hash "\"")))
+               (generate-all-checksums "third_party/rust"))
+             #t))
+         ;; Fixes issue where each installation directory generates its own profile.
+         ;; See e.g. https://trac.torproject.org/projects/tor/ticket/31457
+         (add-after 'patch-source-shebangs 'fix-profile-setting
+           (lambda _
+             (substitute* "comm/mail/moz.configure"
+               (("'MOZ_DEDICATED_PROFILES', True")
+                "'MOZ_DEDICATED_PROFILES', False"))
+             #t))
+         (add-after 'build 'neutralize-store-references
+           (lambda _
+             ;; Mangle the store references to compilers & other build tools in
+             ;; about:buildconfig, reducing Icedove's closure significant.
+             ;; The resulting files are saved in lib/thunderbird/omni.ja
+             (substitute*
+                 ;; Use find because the path "obj-x86_64-pc-linux-gnu" contains
+                 ;; the architecture and the system -> more complicated.
+                 (find-files "." "buildconfig.html")
+               (((format #f "(~a/)([0-9a-df-np-sv-z]{32})"
+                         (regexp-quote (%store-directory)))
+                 _ store hash)
+                (string-append store
+                               (string-take hash 8)
+                               "<!-- Guix: not a runtime dependency -->"
+                               (string-drop hash 8))))
+             #t))
+         (replace 'configure
+           (lambda* (#:key inputs outputs configure-flags #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (bash (which "bash"))
+                    (abs-srcdir (getcwd))
+                    (srcdir (string-append "../" (basename abs-srcdir)))
+                    (flags `(,(string-append "--prefix=" out)
+                             ,@configure-flags))
+                    (mozconfig (string-append (getcwd) "/.mozconfig")))
+               (setenv "SHELL" bash)
+               (setenv "AUTOCONF"
+                       (string-append (assoc-ref %build-inputs
+                                                 "autoconf")
+                                      "/bin/autoconf"))
+               (setenv "CONFIG_SHELL" bash)
+               (setenv "QA_CONFIGURE_OPTIONS" ".*")
+               (setenv "MOZBUILD_STATE_PATH"
+                       (string-append (getcwd) "/mach_state"))
+               (setenv "MOZCONFIG"
+                       (string-append (getcwd) "/.mozconfig"))
+               (setenv "CC" "gcc")
+               (setenv "MOZ_NOSPAM" "1")
+               (setenv "PYTHON"
+                       (string-append (assoc-ref inputs "python2")
+                                      "/bin/python"))
+               (setenv "MOZ_BUILD_DATE" ,%icedove-build-id) ; avoid timestamp
+               (setenv "LDFLAGS" (string-append "-Wl,-rpath="
+                                                (assoc-ref outputs "out")
+                                                "/lib/thunderbird"))
+               (mkdir-p (string-append (getcwd) "/builddir"))
+               (with-output-to-file mozconfig
+                 (lambda ()
+                   (display
+                    (string-append
+                     "ac_add_options --disable-crashreporter\n"
+                     "ac_add_options --disable-debug\n"
+                     "ac_add_options --disable-debug-symbols\n"
+                     "ac_add_options --disable-elf-hack\n"
+                     "ac_add_options --disable-gconf\n"
+                     "ac_add_options --disable-ion\n"
+                     "ac_add_options --disable-necko-wifi\n"
+                     "ac_add_options --disable-official-branding\n"
+                     "ac_add_options --disable-tests\n"
+                     "ac_add_options --disable-updater\n"
+                     "ac_add_options --disable-webrtc\n"
+                     "ac_add_options --enable-alsa\n"
+                     "ac_add_options --enable-application=comm/mail\n"
+                     "ac_add_options --enable-calendar\n"
+                     "ac_add_options --enable-content-sandbox\n"
+                     "ac_add_options --enable-default-toolkit=\"cairo-gtk3\"\n"
+                     "ac_add_options --enable-optimize\n"
+                     "ac_add_options --enable-pulseaudio\n"
+                     "ac_add_options --enable-release\n"
+                     "ac_add_options --enable-startup-notification\n"
+                     "ac_add_options --enable-strip\n"
+                     "ac_add_options --enable-system-ffi\n"
+                     "ac_add_options --enable-system-pixman\n"
+                     "ac_add_options --enable-system-sqlite\n"
+                     "ac_add_options --prefix=" out "\n"
+                     "ac_add_options --with-clang-path=" (assoc-ref %build-inputs "clang") "/bin/clang\n"
+                     "ac_add_options --with-distribution-id=org.gnu\n"
+                     "ac_add_options --with-libclang-path=" (assoc-ref %build-inputs "clang") "/lib\n"
+                     "ac_add_options --with-system-bz2\n"
+                     "ac_add_options --with-system-icu\n"
+                     "ac_add_options --with-system-jpeg\n"
+                     "ac_add_options --with-system-libevent\n"
+                     "ac_add_options --with-system-nspr\n"
+                     "ac_add_options --with-system-nss\n"
+                     "ac_add_options --with-system-zlib\n"
+                     "ac_add_options --with-user-appdir=\\.thunderbird\n"))))
+               (display (getcwd))
+               (newline)
+               (display "mach configure")
+               (invoke "./mach" "configure"))))
+         (replace 'build
+           (lambda _ (invoke "./mach" "build")))
+         (replace 'install
+           (lambda _ (invoke "./mach" "install")))
+         (add-after 'install 'wrap-program
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (lib (string-append out "/lib"))
+                    (gtk (assoc-ref inputs "gtk+"))
+                    (gtk-share (string-append gtk "/share"))
+                    (pulseaudio (assoc-ref inputs "pulseaudio"))
+                    (pulseaudio-lib (string-append pulseaudio "/lib")))
+               (wrap-program (car (find-files lib "^thunderbird$"))
+                 `("XDG_DATA_DIRS" prefix (,gtk-share))
+                 `("LD_LIBRARY_PATH" prefix (,pulseaudio-lib)))
+               #t))))))
+    (inputs
+     `(("alsa-lib" ,alsa-lib)
+       ("bzip2" ,bzip2)
+       ("cairo" ,cairo)
+       ("cups" ,cups)
+       ("dbus-glib" ,dbus-glib)
+       ("ffmpeg" ,ffmpeg)
+       ("freetype" ,freetype)
+       ("gdk-pixbuf" ,gdk-pixbuf)
+       ("glib" ,glib)
+       ("gtk+" ,gtk+)
+       ("gtk+-2" ,gtk+-2)
+       ("hunspell" ,hunspell)
+       ("icu4c" ,icu4c)
+       ("libcanberra" ,libcanberra)
+       ("libevent" ,libevent)
+       ("libffi" ,libffi)
+       ("libgnome" ,libgnome)
+       ("libjpeg-turbo" ,libjpeg-turbo)
+       ("libpng-apng" ,libpng-apng)
+       ("libvpx" ,libvpx)
+       ("libxcomposite" ,libxcomposite)
+       ("libxft" ,libxft)
+       ("libxinerama" ,libxinerama)
+       ("libxscrnsaver" ,libxscrnsaver)
+       ("libxt" ,libxt)
+       ("mesa" ,mesa)
+       ("mit-krb5" ,mit-krb5)
+       ("nspr" ,nspr)
+       ("nss" ,nss)
+       ("pango" ,pango)
+       ("pixman" ,pixman)
+       ("pulseaudio" ,pulseaudio)
+       ("sqlite" ,sqlite)
+       ("startup-notification" ,startup-notification)
+       ("unzip" ,unzip)
+       ("zip" ,zip)
+       ("zlib" ,zlib)))
+    (native-inputs
+     `(("thunderbird-sources"
+        ,(origin
+           (method url-fetch)
+           (uri (string-append "https://archive.mozilla.org/pub/"
+                               "thunderbird/releases/"
+                               version "/source/thunderbird-" version
+                               ".source.tar.xz"))
+           (sha256
+            (base32
+             "112by5xzy9f28fj35yz644vby3c957apj5by2xm8b3qxxqpzsbmw"))
+           (modules '((guix build utils)))
+           (snippet
+            '(begin
+               (use-modules (ice-9 ftw))
+               (let ((select (lambda (name)
+                               (and (string<> "comm" name)
+                                    (string<> "sourcestamp.txt")))))
+                 (for-each delete-file-recursively
+                           (delete ".." (delete "." (scandir "." select))))
+                 #t)))))
+       ("autoconf" ,autoconf-2.13)
+       ("cargo" ,rust "cargo")
+       ("clang" ,clang)
+       ("llvm" ,llvm)
+       ("nasm" ,nasm)
+       ("node" ,node)
+       ("perl" ,perl)
+       ("pkg-config" ,pkg-config)
+       ("python" ,python)
+       ("python2" ,python-2.7)
+       ("rust" ,rust)
+       ("rust-cbindgen" ,rust-cbindgen)
+       ("which" ,which)
+       ("yasm" ,yasm)))
+    (home-page "https://www.thunderbird.net")
+    (synopsis "Trademarkless version of Mozilla Thunderbird")
+    (description
+     "Full-featured email client built from Thunderbird source tree.  It
+supports email, news feeds, chat, calendar and contacts.")
+    (license license:mpl2.0)))
+
 (define-public firefox-decrypt
   (package
     (name "firefox-decrypt")
-- 
2.25.1


Information forwarded to guix-patches <at> gnu.org:
bug#40959; Package guix-patches. (Sat, 02 May 2020 10:10:01 GMT) Full text and rfc822 format available.

Message #29 received at 40959 <at> debbugs.gnu.org (full text, mbox):

From: Ricardo Wurmus <rekado <at> elephly.net>
To: 40959 <at> debbugs.gnu.org
Cc: Ricardo Wurmus <rekado <at> elephly.net>, Nikita <nikita <at> n0.is>,
 Adrian Malacoda <malacoda <at> monarch-pass.net>,
 Jonathan Brielmaier <jonathan.brielmaier <at> web.de>
Subject: [PATCH v2] gnu: Add icedove.
Date: Sat,  2 May 2020 12:08:42 +0200
From: Jonathan Brielmaier <jonathan.brielmaier <at> web.de>

* gnu/packages/gnuzilla.scm (%icedove-build-id, icedove): New variables.

Co-authored-by: Nikita <nikita <at> n0.is>
Co-authored-by: Adrian Malacoda <malacoda <at> monarch-pass.net>
Co-authored-by: Ricardo Wurmus <rekado <at> elephly.net>
---
 gnu/local.mk              |   1 +
 gnu/packages/gnuzilla.scm | 248 +++++++++++++++++++++++++++++++++++++-
 2 files changed, 247 insertions(+), 2 deletions(-)

diff --git a/gnu/local.mk b/gnu/local.mk
index 26d26ee215..98eaf11db8 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -265,6 +265,7 @@ GNU_SYSTEM_MODULES =				\
   %D%/packages/hyperledger.scm			\
   %D%/packages/i2p.scm				\
   %D%/packages/ibus.scm				\
+  %D%/packages/icedove.scm				\
   %D%/packages/icu4c.scm			\
   %D%/packages/idris.scm			\
   %D%/packages/idutils.scm			\
diff --git a/gnu/packages/gnuzilla.scm b/gnu/packages/gnuzilla.scm
index 06d855ee3e..d05c707293 100644
--- a/gnu/packages/gnuzilla.scm
+++ b/gnu/packages/gnuzilla.scm
@@ -6,12 +6,14 @@
 ;;; Copyright © 2016, 2017, 2018, 2019 Efraim Flashner <efraim <at> flashner.co.il>
 ;;; Copyright © 2016 Alex Griffin <a <at> ajgrf.com>
 ;;; Copyright © 2017 Clément Lassieur <clement <at> lassieur.org>
-;;; Copyright © 2017 ng0 <ng0 <at> n0.is>
+;;; Copyright © 2017, 2018 Nikita <nikita <at> n0.is>
 ;;; Copyright © 2017, 2018, 2020 Tobias Geerinckx-Rice <me <at> tobias.gr>
-;;; Copyright © 2018 Ricardo Wurmus <rekado <at> elephly.net>
+;;; Copyright © 2018, 2020 Ricardo Wurmus <rekado <at> elephly.net>
 ;;; Copyright © 2019 Ivan Petkov <ivanppetkov <at> gmail.com>
 ;;; Copyright © 2020 Oleg Pykhalov <go.wigust <at> gmail.com>
 ;;; Copyright © 2020 Jakub Kądziołka <kuba <at> kadziolka.net>
+;;; Copyright © 2019, 2020 Adrian Malacoda <malacoda <at> monarch-pass.net>
+;;; Copyright © 2020 Jonathan Brielmaier <jonathan.brielmaier <at> web.de>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -1142,6 +1144,248 @@ standards of the IceCat project.")
        (cpe-name . "firefox_esr")
        (cpe-version . ,(first (string-split version #\-)))))))
 
+;; Update this together with icecat!
+(define %icedove-build-id "20200428000000")
+(define-public icedove
+  (package
+    (name "icedove")
+    (version "68.7.0")
+    (source icecat-source)
+    (build-system gnu-build-system)
+    (arguments
+     `(#:tests? #f                              ; no check target
+       #:imported-modules ,%cargo-utils-modules ;for `generate-all-checksums'
+
+       #:modules ((guix build utils)    ;find-files
+                  (ice-9 regex)
+                  ,@%gnu-build-system-modules)
+
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'prepare-thunderbird-sources
+           (lambda* (#:key inputs #:allow-other-keys)
+             (mkdir "comm")
+             (copy-recursively (assoc-ref inputs "thunderbird-sources")
+                               "comm")
+             ;; The build scripts does not like files from 1970
+             (let ((circa-1980 (* 10 366 24 60 60)))
+               (for-each (lambda (file)
+                           (utime file circa-1980 circa-1980))
+                         (find-files "comm")))
+             (delete-file-recursively "obj-x86_64-pc-linux-gnu")
+             (delete-file "sourcestamp.txt")
+             #t))
+         (add-after 'patch-source-shebangs 'patch-cargo-checksums
+           (lambda _
+             (use-modules (guix build cargo-utils))
+             (let ((null-hash "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"))
+               (substitute* '("Cargo.lock" "gfx/wr/Cargo.lock")
+                 (("(\"checksum .* = )\".*\"" all name)
+                  (string-append name "\"" null-hash "\"")))
+               (generate-all-checksums "third_party/rust"))
+             #t))
+         ;; Fixes issue where each installation directory generates its own profile.
+         ;; See e.g. https://trac.torproject.org/projects/tor/ticket/31457
+         (add-after 'patch-source-shebangs 'fix-profile-setting
+           (lambda _
+             (substitute* "comm/mail/moz.configure"
+               (("'MOZ_DEDICATED_PROFILES', True")
+                "'MOZ_DEDICATED_PROFILES', False"))
+             #t))
+         (add-after 'prepare-thunderbird-sources 'rename-to-icedove
+           (lambda _
+             (substitute* "comm/mail/confvars.sh"
+               (("MOZ_APP_BASENAME=Thunderbird")
+                "MOZ_APP_BASENAME=Icedove")
+               (("MOZ_APP_NAME=thunderbird")
+                "MOZ_APP_NAME=icedove")
+               (("MOZ_UPDATER=1")
+                "MOZ_UPDATER=0"))
+             (substitute* "comm/calendar/lightning/lightning-packager.mk"
+               (("ifeq \\(thunderbird")
+                "ifeq (icedove"))
+             (substitute* '("comm/mailnews/base/prefs/content/accountUtils.js"
+                            "comm/mailnews/extensions/newsblog/content/feed-subscriptions.js"
+                            "comm/common/src/customizeToolbar.js")
+               (("AppConstants.MOZ_APP_NAME (.)= \"thunderbird" _ e)
+                (format #f "AppConstants.MOZ_APP_NAME ~a= \"icedove" e)))
+             #t))
+         (add-after 'build 'neutralize-store-references
+           (lambda _
+             ;; Mangle the store references to compilers & other build tools in
+             ;; about:buildconfig, reducing Icedove's closure significant.
+             ;; The resulting files are saved in lib/thunderbird/omni.ja
+             (substitute*
+                 ;; Use find because the path "obj-x86_64-pc-linux-gnu" contains
+                 ;; the architecture and the system -> more complicated.
+                 (find-files "." "buildconfig.html")
+               (((format #f "(~a/)([0-9a-df-np-sv-z]{32})"
+                         (regexp-quote (%store-directory)))
+                 _ store hash)
+                (string-append store
+                               (string-take hash 8)
+                               "<!-- Guix: not a runtime dependency -->"
+                               (string-drop hash 8))))
+             #t))
+         (replace 'configure
+           (lambda* (#:key inputs outputs configure-flags #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (bash (which "bash"))
+                    (abs-srcdir (getcwd))
+                    (srcdir (string-append "../" (basename abs-srcdir)))
+                    (flags `(,(string-append "--prefix=" out)
+                             ,@configure-flags))
+                    (mozconfig (string-append (getcwd) "/.mozconfig")))
+               (setenv "SHELL" bash)
+               (setenv "AUTOCONF"
+                       (string-append (assoc-ref %build-inputs
+                                                 "autoconf")
+                                      "/bin/autoconf"))
+               (setenv "CONFIG_SHELL" bash)
+               (setenv "QA_CONFIGURE_OPTIONS" ".*")
+               (setenv "MOZBUILD_STATE_PATH"
+                       (string-append (getcwd) "/mach_state"))
+               (setenv "MOZCONFIG"
+                       (string-append (getcwd) "/.mozconfig"))
+               (setenv "CC" "gcc")
+               (setenv "MOZ_NOSPAM" "1")
+               (setenv "PYTHON"
+                       (string-append (assoc-ref inputs "python2")
+                                      "/bin/python"))
+               (setenv "MOZ_BUILD_DATE" ,%icedove-build-id) ; avoid timestamp
+               (setenv "LDFLAGS" (string-append "-Wl,-rpath="
+                                                (assoc-ref outputs "out")
+                                                "/lib/icedove"))
+               (mkdir-p (string-append (getcwd) "/builddir"))
+               (with-output-to-file mozconfig
+                 (lambda ()
+                   (display
+                    (string-append
+                     "ac_add_options --disable-crashreporter\n"
+                     "ac_add_options --disable-debug\n"
+                     "ac_add_options --disable-debug-symbols\n"
+                     "ac_add_options --disable-elf-hack\n"
+                     "ac_add_options --disable-gconf\n"
+                     "ac_add_options --disable-ion\n"
+                     "ac_add_options --disable-necko-wifi\n"
+                     "ac_add_options --disable-official-branding\n"
+                     "ac_add_options --disable-tests\n"
+                     "ac_add_options --disable-updater\n"
+                     "ac_add_options --disable-webrtc\n"
+                     "ac_add_options --enable-application=comm/mail\n"
+                     "ac_add_options --enable-calendar\n"
+                     "ac_add_options --enable-content-sandbox\n"
+                     "ac_add_options --enable-default-toolkit=\"cairo-gtk3\"\n"
+                     "ac_add_options --enable-optimize\n"
+                     "ac_add_options --enable-pulseaudio\n"
+                     "ac_add_options --enable-release\n"
+                     "ac_add_options --enable-startup-notification\n"
+                     "ac_add_options --enable-strip\n"
+                     "ac_add_options --enable-system-ffi\n"
+                     "ac_add_options --enable-system-pixman\n"
+                     "ac_add_options --enable-system-sqlite\n"
+                     "ac_add_options --prefix=" out "\n"
+                     "ac_add_options --with-clang-path=" (assoc-ref %build-inputs "clang") "/bin/clang\n"
+                     "ac_add_options --with-distribution-id=org.gnu\n"
+                     "ac_add_options --with-libclang-path=" (assoc-ref %build-inputs "clang") "/lib\n"
+                     "ac_add_options --with-system-bz2\n"
+                     "ac_add_options --with-system-icu\n"
+                     "ac_add_options --with-system-jpeg\n"
+                     "ac_add_options --with-system-libevent\n"
+                     "ac_add_options --with-system-nspr\n"
+                     "ac_add_options --with-system-nss\n"
+                     "ac_add_options --with-system-zlib\n"
+                     "ac_add_options --with-user-appdir=\\.icedove\n"))))
+               (display (getcwd))
+               (newline)
+               (display "mach configure")
+               (invoke "./mach" "configure"))))
+         (replace 'build
+           (lambda _ (invoke "./mach" "build")))
+         (replace 'install
+           (lambda _ (invoke "./mach" "install")))
+         (add-after 'install 'wrap-program
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (lib (string-append out "/lib"))
+                    (gtk (assoc-ref inputs "gtk+"))
+                    (gtk-share (string-append gtk "/share"))
+                    (pulseaudio (assoc-ref inputs "pulseaudio"))
+                    (pulseaudio-lib (string-append pulseaudio "/lib")))
+               (wrap-program (car (find-files lib "^icedove$"))
+                 `("XDG_DATA_DIRS" prefix (,gtk-share))
+                 `("LD_LIBRARY_PATH" prefix (,pulseaudio-lib)))
+               #t))))))
+    (inputs
+     `(("bzip2" ,bzip2)
+       ("cairo" ,cairo)
+       ("cups" ,cups)
+       ("dbus-glib" ,dbus-glib)
+       ("ffmpeg" ,ffmpeg)
+       ("freetype" ,freetype)
+       ("gdk-pixbuf" ,gdk-pixbuf)
+       ("glib" ,glib)
+       ("gtk+" ,gtk+)
+       ("gtk+-2" ,gtk+-2)
+       ("hunspell" ,hunspell)
+       ("icu4c" ,icu4c)
+       ("libcanberra" ,libcanberra)
+       ("libevent" ,libevent)
+       ("libffi" ,libffi)
+       ("libgnome" ,libgnome)
+       ("libjpeg-turbo" ,libjpeg-turbo)
+       ("libpng-apng" ,libpng-apng)
+       ("libvpx" ,libvpx)
+       ("libxcomposite" ,libxcomposite)
+       ("libxft" ,libxft)
+       ("libxinerama" ,libxinerama)
+       ("libxscrnsaver" ,libxscrnsaver)
+       ("libxt" ,libxt)
+       ("mesa" ,mesa)
+       ("mit-krb5" ,mit-krb5)
+       ("nspr" ,nspr)
+       ("nss" ,nss)
+       ("pango" ,pango)
+       ("pixman" ,pixman)
+       ("pulseaudio" ,pulseaudio)
+       ("sqlite" ,sqlite)
+       ("startup-notification" ,startup-notification)
+       ("unzip" ,unzip)
+       ("zip" ,zip)
+       ("zlib" ,zlib)))
+    (native-inputs
+     `(("thunderbird-sources"
+        ,(let ((changeset "f7099fd16d6f5dff22154eab3161674142501739"))
+           (origin
+             (method hg-fetch)
+             (uri (hg-reference
+                   (url "https://hg.mozilla.org/releases/comm-esr68")
+                   (changeset changeset)))
+             (file-name (string-append "thunderbird-" version "-checkout"))
+             (sha256
+              (base32
+               "1x0351wy0i1560893kzclyimpvj7cykavrkzsfrhgd8kycp4mf92")))))
+       ("autoconf" ,autoconf-2.13)
+       ("cargo" ,rust "cargo")
+       ("clang" ,clang)
+       ("llvm" ,llvm)
+       ("nasm" ,nasm)
+       ("node" ,node)
+       ("perl" ,perl)
+       ("pkg-config" ,pkg-config)
+       ("python" ,python)
+       ("python2" ,python-2.7)
+       ("rust" ,rust)
+       ("rust-cbindgen" ,rust-cbindgen)
+       ("which" ,which)
+       ("yasm" ,yasm)))
+    (home-page "https://www.thunderbird.net")
+    (synopsis "Rebranded Mozilla Thunderbird email client")
+    (description
+     "This package provides an email client built based on Mozilla
+Thunderbird.  It supports email, news feeds, chat, calendar and contacts.")
+    (license license:mpl2.0)))
+
 (define-public firefox-decrypt
   (package
     (name "firefox-decrypt")
-- 
2.25.1






Information forwarded to guix-patches <at> gnu.org:
bug#40959; Package guix-patches. (Sat, 02 May 2020 10:49:01 GMT) Full text and rfc822 format available.

Message #32 received at 40959 <at> debbugs.gnu.org (full text, mbox):

From: Ricardo Wurmus <rekado <at> elephly.net>
To: 40959 <at> debbugs.gnu.org
Cc: Nikita <nikita <at> n0.is>, Adrian Malacoda <malacoda <at> monarch-pass.net>,
 Jonathan Brielmaier <jonathan.brielmaier <at> web.de>
Subject: Re: [PATCH v2] gnu: Add icedove.
Date: Sat, 02 May 2020 12:48:38 +0200
The executable and the lib directory are now renamed to icedove.  The
image shown on the about screen of the calendar still mentions
“Thunderbird Daily”, and the application.ini file still use Thunderbird
Daily as the code name.

I removed another useless build phase, removed alsa-lib from the inputs
(works fine without), and we’re now using the sources directly from the
Mercurial repositories.  The changeset to use is mentioned in the
release tarball’s sourcestamp.txt file.

I think the branding still should be modified some more, but I think
we’re getting close to an acceptable version.

--
Ricardo




Information forwarded to guix-patches <at> gnu.org:
bug#40959; Package guix-patches. (Sun, 03 May 2020 21:42:02 GMT) Full text and rfc822 format available.

Message #35 received at 40959 <at> debbugs.gnu.org (full text, mbox):

From: Ricardo Wurmus <rekado <at> elephly.net>
To: 40959 <at> debbugs.gnu.org
Cc: Ricardo Wurmus <rekado <at> elephly.net>, Nikita <nikita <at> n0.is>,
 Adrian Malacoda <malacoda <at> monarch-pass.net>,
 Jonathan Brielmaier <jonathan.brielmaier <at> web.de>
Subject: [PATCH] gnu: Add icedove.
Date: Sun,  3 May 2020 23:41:15 +0200
From: Jonathan Brielmaier <jonathan.brielmaier <at> web.de>

* gnu/packages/gnuzilla.scm (%icedove-build-id, icedove): New variables.

Co-authored-by: Nikita <nikita <at> n0.is>
Co-authored-by: Adrian Malacoda <malacoda <at> monarch-pass.net>
Co-authored-by: Ricardo Wurmus <rekado <at> elephly.net>
---
 gnu/packages/gnuzilla.scm | 302 +++++++++++++++++++++++++++++++++++++-
 1 file changed, 300 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/gnuzilla.scm b/gnu/packages/gnuzilla.scm
index 06d855ee3e..f6143591fc 100644
--- a/gnu/packages/gnuzilla.scm
+++ b/gnu/packages/gnuzilla.scm
@@ -6,12 +6,14 @@
 ;;; Copyright © 2016, 2017, 2018, 2019 Efraim Flashner <efraim <at> flashner.co.il>
 ;;; Copyright © 2016 Alex Griffin <a <at> ajgrf.com>
 ;;; Copyright © 2017 Clément Lassieur <clement <at> lassieur.org>
-;;; Copyright © 2017 ng0 <ng0 <at> n0.is>
+;;; Copyright © 2017, 2018 Nikita <nikita <at> n0.is>
 ;;; Copyright © 2017, 2018, 2020 Tobias Geerinckx-Rice <me <at> tobias.gr>
-;;; Copyright © 2018 Ricardo Wurmus <rekado <at> elephly.net>
+;;; Copyright © 2018, 2020 Ricardo Wurmus <rekado <at> elephly.net>
 ;;; Copyright © 2019 Ivan Petkov <ivanppetkov <at> gmail.com>
 ;;; Copyright © 2020 Oleg Pykhalov <go.wigust <at> gmail.com>
 ;;; Copyright © 2020 Jakub Kądziołka <kuba <at> kadziolka.net>
+;;; Copyright © 2019, 2020 Adrian Malacoda <malacoda <at> monarch-pass.net>
+;;; Copyright © 2020 Jonathan Brielmaier <jonathan.brielmaier <at> web.de>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -1142,6 +1144,302 @@ standards of the IceCat project.")
        (cpe-name . "firefox_esr")
        (cpe-version . ,(first (string-split version #\-)))))))
 
+;; Update this together with icecat!
+(define %icedove-build-id "20200428000000")
+(define-public icedove
+  (package
+    (name "icedove")
+    (version "68.7.0")
+    (source icecat-source)
+    (properties
+     `((cpe-name . "thunderbird_esr")))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:tests? #f                              ; no check target
+       #:imported-modules ,%cargo-utils-modules ;for `generate-all-checksums'
+       #:modules ((guix build utils)    ;find-files
+                  (sxml simple)
+                  (ice-9 regex)
+                  ,@%gnu-build-system-modules)
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'prepare-thunderbird-sources
+           (lambda* (#:key inputs #:allow-other-keys)
+             (mkdir "comm")
+             (copy-recursively (assoc-ref inputs "thunderbird-sources")
+                               "comm")
+             (delete-file-recursively "obj-x86_64-pc-linux-gnu")
+             (delete-file "sourcestamp.txt")
+             #t))
+         (add-after 'patch-source-shebangs 'patch-cargo-checksums
+           (lambda _
+             (use-modules (guix build cargo-utils))
+             (let ((null-hash "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"))
+               (substitute* '("Cargo.lock" "gfx/wr/Cargo.lock")
+                 (("(\"checksum .* = )\".*\"" all name)
+                  (string-append name "\"" null-hash "\"")))
+               (generate-all-checksums "third_party/rust"))
+             #t))
+         ;; Fixes issue where each installation directory generates its own profile.
+         ;; See e.g. https://trac.torproject.org/projects/tor/ticket/31457
+         (add-after 'patch-source-shebangs 'fix-profile-setting
+           (lambda _
+             (substitute* "comm/mail/moz.configure"
+               (("'MOZ_DEDICATED_PROFILES', True")
+                "'MOZ_DEDICATED_PROFILES', False"))
+             #t))
+         (add-after 'prepare-thunderbird-sources 'rename-to-icedove
+           (lambda _
+             (substitute* "comm/mail/confvars.sh"
+               (("MOZ_APP_BASENAME=Thunderbird")
+                "MOZ_APP_BASENAME=Icedove\nMOZ_APP_DISPLAYNAME=Icedove")
+               (("MOZ_APP_NAME=thunderbird")
+                "MOZ_APP_NAME=icedove")
+               (("MOZ_UPDATER=1")
+                "MOZ_UPDATER=0"))
+             ;; Remove branding to comply with Mozilla's trademark policy
+             (with-directory-excursion "comm/mail/branding/nightly"
+               (delete-file "content/about-wordmark.svg")
+               (call-with-output-file "content/about-wordmark.svg"
+                 (lambda (port)
+                   (sxml->xml '(svg (@ (xmlns "http://www.w3.org/2000/svg")
+                                       (viewBox "0 0 789.1 90.78")
+                                       (width "333")
+                                       (height "48")
+                                       (fill "#fff"))
+                                    (text (@ (x "400") (y "70")
+                                             (text-anchor "middle")
+                                             (font-size "90"))
+                                          "Icedove Daily"))
+                              port)))
+               (substitute* '("locales/en-US/brand.properties"
+                              "locales/en-US/brand.ftl"
+                              "locales/en-US/brand.dtd"
+                              "configure.sh")
+                 (("Thunderbird") "Icedove")
+                 (("mozilla.org") "guix.gnu.org")))
+             ;; Remove other mentions of Thunderbird in user-visible text.
+             (with-directory-excursion "comm/mail/base/content"
+               (substitute* '("newInstallPage.xhtml"
+                              "overrides/app-license-name.html"
+                              "newInstall.xul")
+                 (("Thunderbird") "Icedove")))
+             (with-directory-excursion "comm/mail/components/"
+               (substitute* '("mailGlue.js"
+                              "extensions/schemas/addressBook.json"
+                              "extensions/schemas/tabs.json"
+                              "extensions/schemas/cloudFile.json"
+                              "extensions/schemas/chrome_settings_overrides.json"
+                              "extensions/schemas/windows.json"
+                              "extensions/parent/ext-mail.js"
+                              "im/messages/mail/Info.plist"
+                              "enterprisepolicies/moz.build"
+                              "enterprisepolicies/helpers/moz.build"
+                              "enterprisepolicies/schemas/moz.build"
+                              "preferences/chat.inc.xul")
+                 (("Thunderbird") "Icedove")))
+             (substitute* "comm/calendar/lightning/lightning-packager.mk"
+               (("ifeq \\(thunderbird")
+                "ifeq (icedove"))
+             (substitute* '("comm/mailnews/base/prefs/content/accountUtils.js"
+                            "comm/mailnews/extensions/newsblog/content/feed-subscriptions.js"
+                            "comm/common/src/customizeToolbar.js")
+               (("AppConstants.MOZ_APP_NAME (.)= \"thunderbird" _ e)
+                (format #f "AppConstants.MOZ_APP_NAME ~a= \"icedove" e)))
+
+             ;; Override addon URLs and settings
+             (substitute* "comm/mail/app/profile/all-thunderbird.js"
+               (("pref\\(\"extensions.webservice.discoverURL\".*" m)
+                (string-append m ", \"https://directory.fsf.org/wiki/Icedove\");"))
+               (("pref\\(\"extensions.getAddons.search.url\".*" m)
+                (string-append m ", \"https://guix.gnu.org/packages\");"))
+               (("pref\\(\"extensions.update.enabled\".*" m)
+                (string-append m ", false);"))
+               (("pref\\(\"extensions.systemAddon.update.enabled\".*" m)
+                (string-append m ", false);"))
+               (("pref\\(\"lightweightThemes.update.enabled\".*" m)
+                (string-append m ", false);")))
+             #t))
+         (add-after 'build 'neutralize-store-references
+           (lambda _
+             ;; Mangle the store references to compilers & other build tools in
+             ;; about:buildconfig, reducing Icedove's closure significant.
+             ;; The resulting files are saved in lib/thunderbird/omni.ja
+             (substitute*
+                 ;; Use find because the path "obj-x86_64-pc-linux-gnu" contains
+                 ;; the architecture and the system -> more complicated.
+                 (find-files "." "buildconfig.html")
+               (((format #f "(~a/)([0-9a-df-np-sv-z]{32})"
+                         (regexp-quote (%store-directory)))
+                 _ store hash)
+                (string-append store
+                               (string-take hash 8)
+                               "<!-- Guix: not a runtime dependency -->"
+                               (string-drop hash 8))))
+             #t))
+         (replace 'configure
+           (lambda* (#:key inputs outputs configure-flags #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (bash (which "bash"))
+                    (abs-srcdir (getcwd))
+                    (srcdir (string-append "../" (basename abs-srcdir)))
+                    (flags `(,(string-append "--prefix=" out)
+                             ,@configure-flags))
+                    (mozconfig (string-append (getcwd) "/.mozconfig")))
+               (setenv "SHELL" bash)
+               (setenv "AUTOCONF"
+                       (string-append (assoc-ref %build-inputs
+                                                 "autoconf")
+                                      "/bin/autoconf"))
+               (setenv "CONFIG_SHELL" bash)
+               (setenv "QA_CONFIGURE_OPTIONS" ".*")
+               (setenv "MOZBUILD_STATE_PATH"
+                       (string-append (getcwd) "/mach_state"))
+               (setenv "MOZCONFIG"
+                       (string-append (getcwd) "/.mozconfig"))
+               (setenv "CC" "gcc")
+               (setenv "MOZ_NOSPAM" "1")
+               (setenv "PYTHON"
+                       (string-append (assoc-ref inputs "python2")
+                                      "/bin/python"))
+               (setenv "MOZ_BUILD_DATE" ,%icedove-build-id) ; avoid timestamp
+               (setenv "LDFLAGS" (string-append "-Wl,-rpath="
+                                                (assoc-ref outputs "out")
+                                                "/lib/icedove"))
+               (mkdir-p (string-append (getcwd) "/builddir"))
+               (with-output-to-file mozconfig
+                 (lambda ()
+                   (display
+                    (string-append
+                     "ac_add_options --disable-crashreporter\n"
+                     "ac_add_options --disable-debug\n"
+                     "ac_add_options --disable-debug-symbols\n"
+                     "ac_add_options --disable-elf-hack\n"
+                     "ac_add_options --disable-gconf\n"
+                     "ac_add_options --disable-ion\n"
+                     "ac_add_options --disable-necko-wifi\n"
+                     "ac_add_options --disable-official-branding\n"
+                     "ac_add_options --disable-tests\n"
+                     "ac_add_options --disable-updater\n"
+                     "ac_add_options --disable-webrtc\n"
+                     "ac_add_options --enable-application=comm/mail\n"
+                     "ac_add_options --enable-calendar\n"
+                     "ac_add_options --enable-content-sandbox\n"
+                     "ac_add_options --enable-default-toolkit=\"cairo-gtk3\"\n"
+                     "ac_add_options --enable-optimize\n"
+                     "ac_add_options --enable-pulseaudio\n"
+                     "ac_add_options --enable-release\n"
+                     "ac_add_options --enable-startup-notification\n"
+                     "ac_add_options --enable-strip\n"
+                     "ac_add_options --enable-system-ffi\n"
+                     "ac_add_options --enable-system-pixman\n"
+                     "ac_add_options --enable-system-sqlite\n"
+                     "ac_add_options --prefix=" out "\n"
+                     "ac_add_options --with-clang-path=" (assoc-ref %build-inputs "clang") "/bin/clang\n"
+                     "ac_add_options --with-distribution-id=org.gnu\n"
+                     "ac_add_options --with-libclang-path=" (assoc-ref %build-inputs "clang") "/lib\n"
+                     "ac_add_options --with-system-bz2\n"
+                     "ac_add_options --with-system-icu\n"
+                     "ac_add_options --with-system-jpeg\n"
+                     "ac_add_options --with-system-libevent\n"
+                     "ac_add_options --with-system-nspr\n"
+                     "ac_add_options --with-system-nss\n"
+                     "ac_add_options --with-system-zlib\n"
+                     "ac_add_options --with-user-appdir=\\.icedove\n"))))
+               (display (getcwd))
+               (newline)
+               (display "mach configure")
+               (invoke "./mach" "configure"))))
+         (replace 'build
+           (lambda _ (invoke "./mach" "build")))
+         (replace 'install
+           (lambda _ (invoke "./mach" "install")))
+         (add-after 'install 'wrap-program
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (lib (string-append out "/lib"))
+                    (gtk (assoc-ref inputs "gtk+"))
+                    (gtk-share (string-append gtk "/share"))
+                    (pulseaudio (assoc-ref inputs "pulseaudio"))
+                    (pulseaudio-lib (string-append pulseaudio "/lib")))
+               (wrap-program (car (find-files lib "^icedove$"))
+                 `("XDG_DATA_DIRS" prefix (,gtk-share))
+                 `("LD_LIBRARY_PATH" prefix (,pulseaudio-lib)))
+               #t))))))
+    (inputs
+     `(("bzip2" ,bzip2)
+       ("cairo" ,cairo)
+       ("cups" ,cups)
+       ("dbus-glib" ,dbus-glib)
+       ("ffmpeg" ,ffmpeg)
+       ("freetype" ,freetype)
+       ("gdk-pixbuf" ,gdk-pixbuf)
+       ("glib" ,glib)
+       ("gtk+" ,gtk+)
+       ("gtk+-2" ,gtk+-2)
+       ("hunspell" ,hunspell)
+       ("icu4c" ,icu4c)
+       ("libcanberra" ,libcanberra)
+       ("libevent" ,libevent)
+       ("libffi" ,libffi)
+       ("libgnome" ,libgnome)
+       ("libjpeg-turbo" ,libjpeg-turbo)
+       ("libpng-apng" ,libpng-apng)
+       ("libvpx" ,libvpx)
+       ("libxcomposite" ,libxcomposite)
+       ("libxft" ,libxft)
+       ("libxinerama" ,libxinerama)
+       ("libxscrnsaver" ,libxscrnsaver)
+       ("libxt" ,libxt)
+       ("mesa" ,mesa)
+       ("mit-krb5" ,mit-krb5)
+       ("nspr" ,nspr)
+       ("nss" ,nss)
+       ("pango" ,pango)
+       ("pixman" ,pixman)
+       ("pulseaudio" ,pulseaudio)
+       ("sqlite" ,sqlite)
+       ("startup-notification" ,startup-notification)
+       ("unzip" ,unzip)
+       ("zip" ,zip)
+       ("zlib" ,zlib)))
+    (native-inputs
+     `(("thunderbird-sources"
+        ;; The changeset identifier is taken from the file "sourcestamp.txt"
+        ;; in the Thunderbird release tarball.  We don't use the release
+        ;; tarball because it duplicates the Icecat sources and only adds the
+        ;; "comm" directory, which is provided by this repository.
+        ,(let ((changeset "f7099fd16d6f5dff22154eab3161674142501739"))
+           (origin
+             (method hg-fetch)
+             (uri (hg-reference
+                   (url "https://hg.mozilla.org/releases/comm-esr68")
+                   (changeset changeset)))
+             (file-name (string-append "thunderbird-" version "-checkout"))
+             (sha256
+              (base32
+               "1x0351wy0i1560893kzclyimpvj7cykavrkzsfrhgd8kycp4mf92")))))
+       ("autoconf" ,autoconf-2.13)
+       ("cargo" ,rust "cargo")
+       ("clang" ,clang)
+       ("llvm" ,llvm)
+       ("nasm" ,nasm)
+       ("node" ,node)
+       ("perl" ,perl)
+       ("pkg-config" ,pkg-config)
+       ("python" ,python)
+       ("python2" ,python-2.7)
+       ("rust" ,rust)
+       ("rust-cbindgen" ,rust-cbindgen)
+       ("which" ,which)
+       ("yasm" ,yasm)))
+    (home-page "https://www.thunderbird.net")
+    (synopsis "Rebranded Mozilla Thunderbird email client")
+    (description
+     "This package provides an email client built based on Mozilla
+Thunderbird.  It supports email, news feeds, chat, calendar and contacts.")
+    (license license:mpl2.0)))
+
 (define-public firefox-decrypt
   (package
     (name "firefox-decrypt")
-- 
2.25.1






Information forwarded to guix-patches <at> gnu.org:
bug#40959; Package guix-patches. (Sun, 03 May 2020 21:48:02 GMT) Full text and rfc822 format available.

Message #38 received at 40959 <at> debbugs.gnu.org (full text, mbox):

From: Ricardo Wurmus <rekado <at> elephly.net>
To: 40959 <at> debbugs.gnu.org
Cc: Nikita <nikita <at> n0.is>, Adrian Malacoda <malacoda <at> monarch-pass.net>,
 Jonathan Brielmaier <jonathan.brielmaier <at> web.de>
Subject: Re: [PATCH] gnu: Add icedove.
Date: Sun, 03 May 2020 23:47:05 +0200
Noteworthy changes in this version:

* add the CPE name for CVE checks with “guix lint”
* “rename-to-icedove” now also replaces mentions of “Thunderbird” with
  “Icedove” in user-visible text and at least one image.
* the addon directory URL has been replaced with the FSF software
  directory URL, and the addon search page has been replaced with the
  Guix package list.

If there are no objections I’ll merge this next week.

-- 
Ricardo




Information forwarded to guix-patches <at> gnu.org:
bug#40959; Package guix-patches. (Sun, 03 May 2020 21:51:02 GMT) Full text and rfc822 format available.

Message #41 received at 40959 <at> debbugs.gnu.org (full text, mbox):

From: Ricardo Wurmus <rekado <at> elephly.net>
To: 40959 <at> debbugs.gnu.org
Cc: Adrian Malacoda <malacoda <at> monarch-pass.net>,
 Jonathan Brielmaier <jonathan.brielmaier <at> web.de>
Subject: Re: [PATCH] gnu: Add icedove.
Date: Sun, 03 May 2020 23:50:52 +0200
Oh, I only just noticed this item from Jonathan’s list:

* Adrian needs to sign-off as he worked on this patch under GNU AGPL3.

This is a blocker.  Package definitions must be GPLv3 or later to be
included in Guix.

-- 
Ricardo




Information forwarded to guix-patches <at> gnu.org:
bug#40959; Package guix-patches. (Tue, 05 May 2020 19:45:01 GMT) Full text and rfc822 format available.

Message #44 received at 40959 <at> debbugs.gnu.org (full text, mbox):

From: Adrian Malacoda <adrian.malacoda <at> monarch-pass.net>
To: Ricardo Wurmus <rekado <at> elephly.net>
Cc: 40959 <at> debbugs.gnu.org, Adrian Malacoda <malacoda <at> monarch-pass.net>,
 Jonathan Brielmaier <jonathan.brielmaier <at> web.de>
Subject: Re: [PATCH] gnu: Add icedove.
Date: Tue, 05 May 2020 14:04:19 -0500
Hello all,

I give permission for my work on the Icedove package to be relicensed as 
GPLv3 for inclusion in Guix. Thank you all for picking up this package 
and continuing to work on it.




Information forwarded to guix-patches <at> gnu.org:
bug#40959; Package guix-patches. (Wed, 06 May 2020 11:33:02 GMT) Full text and rfc822 format available.

Message #47 received at 40959 <at> debbugs.gnu.org (full text, mbox):

From: Ricardo Wurmus <rekado <at> elephly.net>
To: Adrian Malacoda <adrian.malacoda <at> monarch-pass.net>
Cc: 40959 <at> debbugs.gnu.org, Adrian Malacoda <malacoda <at> monarch-pass.net>,
 Jonathan Brielmaier <jonathan.brielmaier <at> web.de>
Subject: Re: [PATCH] gnu: Add icedove.
Date: Wed, 06 May 2020 13:32:22 +0200
Adrian Malacoda <adrian.malacoda <at> monarch-pass.net> writes:

> I give permission for my work on the Icedove package to be relicensed
> as GPLv3 for inclusion in Guix. Thank you all for picking up this
> package and continuing to work on it.

Thank you Adrian.

I apologize for being picky.  Do you also permit relicensing under GPL
“version 3 or later” (not just “version 3”) as the rest of Guix?

-- 
Ricardo




Information forwarded to guix-patches <at> gnu.org:
bug#40959; Package guix-patches. (Wed, 06 May 2020 21:03:02 GMT) Full text and rfc822 format available.

Message #50 received at 40959 <at> debbugs.gnu.org (full text, mbox):

From: Adrian Malacoda <adrian.malacoda <at> monarch-pass.net>
To: Ricardo Wurmus <rekado <at> elephly.net>
Cc: 40959 <at> debbugs.gnu.org, Adrian Malacoda <malacoda <at> monarch-pass.net>,
 Jonathan Brielmaier <jonathan.brielmaier <at> web.de>
Subject: Re: [PATCH] gnu: Add icedove.
Date: Wed, 06 May 2020 15:32:29 -0500
On 2020-05-06 06:32, Ricardo Wurmus wrote:
> Adrian Malacoda <adrian.malacoda <at> monarch-pass.net> writes:
> 
>> I give permission for my work on the Icedove package to be relicensed
>> as GPLv3 for inclusion in Guix. Thank you all for picking up this
>> package and continuing to work on it.
> 
> Thank you Adrian.
> 
> I apologize for being picky.  Do you also permit relicensing under GPL
> “version 3 or later” (not just “version 3”) as the rest of Guix?

Yes, I meant to say "GPL version 3 or later." Thanks




Reply sent to Ricardo Wurmus <rekado <at> elephly.net>:
You have taken responsibility. (Thu, 07 May 2020 13:45:02 GMT) Full text and rfc822 format available.

Notification sent to Jonathan Brielmaier <jonathan.brielmaier <at> web.de>:
bug acknowledged by developer. (Thu, 07 May 2020 13:45:02 GMT) Full text and rfc822 format available.

Message #55 received at 40959-done <at> debbugs.gnu.org (full text, mbox):

From: Ricardo Wurmus <rekado <at> elephly.net>
To: Adrian Malacoda <adrian.malacoda <at> monarch-pass.net>
Cc: 40959-done <at> debbugs.gnu.org, Adrian Malacoda <malacoda <at> monarch-pass.net>,
 Jonathan Brielmaier <jonathan.brielmaier <at> web.de>
Subject: Re: [PATCH] gnu: Add icedove.
Date: Thu, 07 May 2020 15:44:46 +0200
Adrian Malacoda <adrian.malacoda <at> monarch-pass.net> writes:

> Yes, I meant to say "GPL version 3 or later." Thanks

Excellent, thank you.

I upgraded Icedove to the latest version, fixed a bug in my patches to
all-thunderbird.js, and pushed it to the master branch with commit
b14aab6710.

We’re done!

--
Ricardo




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 05 Jun 2020 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 5 years and 16 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.