123 lines
3.9 KiB
Nix
123 lines
3.9 KiB
Nix
{
|
|
stdenv,
|
|
lib,
|
|
buildMozillaMach,
|
|
callPackage,
|
|
fetchurl,
|
|
icu73,
|
|
icu77,
|
|
fetchpatch2,
|
|
config,
|
|
}:
|
|
|
|
let
|
|
patchICU =
|
|
icu:
|
|
icu.overrideAttrs (attrs: {
|
|
# standardize vtzone output
|
|
# Work around ICU-22132 https://unicode-org.atlassian.net/browse/ICU-22132
|
|
# https://bugzilla.mozilla.org/show_bug.cgi?id=1790071
|
|
patches = attrs.patches ++ [
|
|
(fetchpatch2 {
|
|
url = "https://hg.mozilla.org/mozilla-central/raw-file/fb8582f80c558000436922fb37572adcd4efeafc/intl/icu-patches/bug-1790071-ICU-22132-standardize-vtzone-output.diff";
|
|
stripLen = 3;
|
|
hash = "sha256-MGNnWix+kDNtLuACrrONDNcFxzjlUcLhesxwVZFzPAM=";
|
|
})
|
|
];
|
|
});
|
|
icu73' = patchICU icu73;
|
|
icu77' = patchICU icu77;
|
|
|
|
common =
|
|
{
|
|
version,
|
|
sha512,
|
|
updateScript,
|
|
applicationName ? "Thunderbird",
|
|
}:
|
|
(buildMozillaMach rec {
|
|
pname = "thunderbird";
|
|
inherit version updateScript applicationName;
|
|
application = "comm/mail";
|
|
binaryName = pname;
|
|
src = fetchurl {
|
|
url = "mirror://mozilla/thunderbird/releases/${version}/source/thunderbird-${version}.source.tar.xz";
|
|
inherit sha512;
|
|
};
|
|
extraPatches = [
|
|
# The file to be patched is different from firefox's `no-buildconfig-ffx90.patch`.
|
|
./no-buildconfig.patch
|
|
# clang-19 fixes for char_traits build issue
|
|
# https://github.com/rnpgp/rnp/pull/2242/commits/e0790a2c4ff8e09d52522785cec1c9db23d304ac
|
|
# https://github.com/rnpgp/sexpp/pull/54/commits/46744a14ffc235330bb99cebfaf294829c31bba4
|
|
# Remove when upstream bumps bundled rnp version: https://bugzilla.mozilla.org/show_bug.cgi?id=1893950
|
|
./0001-Removed-lookup-against-basic_string-uint8_t.patch
|
|
./0001-Implemented-char_traits-for-SEXP-octet_t.patch
|
|
];
|
|
|
|
extraPassthru = {
|
|
icu73 = icu73';
|
|
icu77 = icu77';
|
|
};
|
|
|
|
meta = {
|
|
changelog = "https://www.thunderbird.net/en-US/thunderbird/${version}/releasenotes/";
|
|
description = "Full-featured e-mail client";
|
|
homepage = "https://thunderbird.net/";
|
|
mainProgram = "thunderbird";
|
|
maintainers = with lib.maintainers; [
|
|
lovesegfault
|
|
pierron
|
|
vcunat
|
|
];
|
|
platforms = lib.platforms.unix;
|
|
broken = stdenv.buildPlatform.is32bit;
|
|
# since Firefox 60, build on 32-bit platforms fails with "out of memory".
|
|
# not in `badPlatforms` because cross-compilation on 64-bit machine might work.
|
|
license = lib.licenses.mpl20;
|
|
};
|
|
}).override
|
|
{
|
|
geolocationSupport = false;
|
|
webrtcSupport = false;
|
|
|
|
pgoSupport = false; # console.warn: feeds: "downloadFeed: network connection unavailable"
|
|
|
|
icu73 = icu73';
|
|
icu77 = icu77';
|
|
};
|
|
|
|
in
|
|
rec {
|
|
thunderbird = thunderbird-latest;
|
|
|
|
thunderbird-latest = common {
|
|
version = "138.0.1";
|
|
sha512 = "2e71ee537292ec1a49237e93c43ed4c1a9eae58becfc7fa9ca0daf1e982c38704cb6d44e92b1bf7b45c5b8c27b23eb3aa7f48b375580f49ee60884dadc5d85b5";
|
|
|
|
updateScript = callPackage ./update.nix {
|
|
attrPath = "thunderbirdPackages.thunderbird-latest";
|
|
};
|
|
};
|
|
|
|
# Eventually, switch to an updateScript without versionPrefix hardcoded...
|
|
thunderbird-esr = thunderbird-128;
|
|
|
|
thunderbird-128 = common {
|
|
applicationName = "Thunderbird ESR";
|
|
|
|
version = "128.11.0esr";
|
|
sha512 = "33de73db2d5ab5152ff11c1947317081259f4e7644631b5e6b9c3b192b4473a5ae6fe897b27b3c8e240ff8c606ffaa8cc14e169c34a94b8de6e64b0c5f0f6810";
|
|
|
|
updateScript = callPackage ./update.nix {
|
|
attrPath = "thunderbirdPackages.thunderbird-128";
|
|
versionPrefix = "128";
|
|
versionSuffix = "esr";
|
|
};
|
|
};
|
|
}
|
|
// lib.optionalAttrs config.allowAliases {
|
|
thunderbird-102 = throw "Thunderbird 102 support ended in September 2023";
|
|
thunderbird-115 = throw "Thunderbird 115 support ended in October 2024";
|
|
}
|