Add thunderbird package

This commit is contained in:
Mikael 2024-11-16 16:44:01 +01:00
parent eb93c34f85
commit fa351f63e6
Signed by: mikael
SSH key fingerprint: SHA256:21QyD2Meiot7jOUVitIR5YkGB/XuXdCvLW1hE6dsri0

View file

@ -17,19 +17,20 @@
packages = lib.genAttrs [ "x86_64-linux" "aarch64-linux" ] (system: let
pkgs = nixpkgs.legacyPackages.${system}.pkgsMusl;
mimalloc = pkgs.mimalloc.override { secureBuild = true; };
in {
default = self.packages.${system}.firefox;
firefox = (pkgs.wrapFirefox self.packages.${system}.firefox-unwrapped {
extraPoliciesFiles = [ ./policy.nix ];
}).overrideAttrs (prevAttrs: {
extraWrapper = prevAttrs: {
buildCommand = prevAttrs.buildCommand + ''
sed -i \
-e '$i export MIMALLOC_PURGE_DELAY=150' \
-e '$i export MIMALLOC_PURGE_DECOMMITS=0' \
-e '$i export MIMALLOC_RESERVE_HUGE_OS_PAGES=2' \
"$out/bin/firefox"
"$out/bin/${prevAttrs.meta.mainProgram}"
'';
});
};
in {
default = self.packages.${system}.firefox;
firefox = (pkgs.wrapFirefox self.packages.${system}.firefox-unwrapped {
extraPoliciesFiles = [ ./policy.nix ];
}).overrideAttrs extraWrapper;
firefox-unwrapped = ((pkgs.buildMozillaMach {
pname = "firefox";
@ -62,6 +63,29 @@
crashreporterSupport = false;
googleAPISupport = false;
};
thunderbird = (pkgs.wrapThunderbird self.packages.${system}.thunderbird-unwrapped { }).overrideAttrs extraWrapper;
thunderbird-unwrapped = (pkgs.thunderbird-latest-unwrapped.overrideAttrs (prevAttrs: {
configureFlags = prevAttrs.configureFlags or [ ] ++ [
"--enable-default-toolkit=cairo-gtk3-wayland-only"
];
})).override {
alsaSupport = false;
ffmpegSupport = false;
gssSupport = false;
jackSupport = false;
jemallocSupport = false;
ltoSupport = true;
pgoSupport = true;
pipewireSupport = false;
pulseaudioSupport = false;
sndioSupport = false;
waylandSupport = true;
privacySupport = true;
drmSupport = false;
};
});
hydraJobs = self.packages |> lib.foldlAttrs (jobs: system: packages: lib.recursiveUpdate jobs