From 6b6f3f188c1e8a070ff608fed4a711620dd96a8d Mon Sep 17 00:00:00 2001 From: Sandro Jäckel Date: Fri, 24 Feb 2023 11:46:48 +0100 Subject: buildMozillaMach: passthru application, extraPatches to be later used by betterbird package --- pkgs/applications/networking/browsers/firefox/common.nix | 1 + 1 file changed, 1 insertion(+) (limited to 'pkgs/applications/networking') diff --git a/pkgs/applications/networking/browsers/firefox/common.nix b/pkgs/applications/networking/browsers/firefox/common.nix index 948b3217248..99baf7cf7ce 100644 --- a/pkgs/applications/networking/browsers/firefox/common.nix +++ b/pkgs/applications/networking/browsers/firefox/common.nix @@ -546,6 +546,7 @@ buildStdenv.mkDerivation ({ ''; passthru = { + inherit application extraPatches; inherit updateScript; inherit version; inherit alsaSupport; -- cgit 1.4.1 From 38f35cf7b0beb6adfefcecf0fa5414fd4f4aa628 Mon Sep 17 00:00:00 2001 From: Sandro Jäckel Date: Thu, 16 Feb 2023 01:42:09 +0100 Subject: firefox: remove unused rec --- pkgs/applications/networking/browsers/firefox/packages.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pkgs/applications/networking') diff --git a/pkgs/applications/networking/browsers/firefox/packages.nix b/pkgs/applications/networking/browsers/firefox/packages.nix index 2d821a6d132..e7ef05c8904 100644 --- a/pkgs/applications/networking/browsers/firefox/packages.nix +++ b/pkgs/applications/networking/browsers/firefox/packages.nix @@ -1,6 +1,6 @@ { stdenv, lib, callPackage, fetchurl, fetchpatch, nixosTests, buildMozillaMach }: -rec { +{ firefox = buildMozillaMach rec { pname = "firefox"; version = "110.0.1"; -- cgit 1.4.1 From f382bf1d802a6622b2d6f51f782fd4f8511b2528 Mon Sep 17 00:00:00 2001 From: Sandro Jäckel Date: Sat, 18 Feb 2023 03:07:00 +0100 Subject: thunderbird: allow overwriting wrapped binary --- pkgs/applications/networking/mailreaders/thunderbird/wrapper.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pkgs/applications/networking') diff --git a/pkgs/applications/networking/mailreaders/thunderbird/wrapper.nix b/pkgs/applications/networking/mailreaders/thunderbird/wrapper.nix index 0761232cc51..bb135568fdb 100644 --- a/pkgs/applications/networking/mailreaders/thunderbird/wrapper.nix +++ b/pkgs/applications/networking/mailreaders/thunderbird/wrapper.nix @@ -16,7 +16,7 @@ args: # For that to work out of the box, it requires `gnupg` on PATH and # `gpgme` in `LD_LIBRARY_PATH`; we do this below. buildCommand = old.buildCommand + '' - wrapProgram $out/bin/thunderbird \ + wrapProgram $out/bin/${browser.binaryName} \ --prefix LD_LIBRARY_PATH ':' "${lib.makeLibraryPath [ gpgme ]}" \ --prefix PATH ':' "${lib.makeBinPath [ gnupg ]}" ''; -- cgit 1.4.1 From ea750901e2c45de0e2944cb125fa8a1cb64cbc56 Mon Sep 17 00:00:00 2001 From: Sandro Jäckel Date: Tue, 28 Mar 2023 00:04:06 +0200 Subject: betterbird: init at 102.8.0-bb30 --- .../mailreaders/betterbird/betterbird.diff | 44 ++++++++ .../networking/mailreaders/betterbird/default.nix | 116 +++++++++++++++++++++ pkgs/top-level/all-packages.nix | 6 ++ 3 files changed, 166 insertions(+) create mode 100644 pkgs/applications/networking/mailreaders/betterbird/betterbird.diff create mode 100644 pkgs/applications/networking/mailreaders/betterbird/default.nix (limited to 'pkgs/applications/networking') diff --git a/pkgs/applications/networking/mailreaders/betterbird/betterbird.diff b/pkgs/applications/networking/mailreaders/betterbird/betterbird.diff new file mode 100644 index 00000000000..93d12b1ccfd --- /dev/null +++ b/pkgs/applications/networking/mailreaders/betterbird/betterbird.diff @@ -0,0 +1,44 @@ +--- a/12-feature-linux-systray-example.patch ++++ b/12-feature-linux-systray-example.patch +@@ -8,18 +8,15 @@ diff --git a/third_party/appindicator/Makefile b/third_party/appindicator/Makefi + new file mode 100644 + --- /dev/null + +++ b/third_party/appindicator/Makefile +-@@ -0,0 +1,34 @@ ++@@ -0,0 +1,31 @@ + +# Code from https://github.com/AyatanaIndicators/libayatana-appindicator + +# and related repositories. + +# See https://github.com/AyatanaIndicators/libayatana-appindicator/issues/46 for build instructions. + +# You need: sudo aptitude install libdbusmenu-gtk3-dev + + +-+CFLAGS=`pkg-config --cflags gtk+-3.0 glib-2.0` \ +-+ -I/usr/include/libdbusmenu-glib-0.4/ \ +-+ -I/usr/include/libdbusmenu-gtk3-0.4/ \ +-+ -I/usr/include/glib-2.0 +++CFLAGS=`pkg-config --cflags gtk+-3.0 glib-2.0 dbusmenu-gtk3-0.4` \ + + +-+LDFLAGS=`pkg-config --libs gtk+-3.0 glib-2.0` -ldbusmenu-glib -ldbusmenu-gtk3 +++LDFLAGS=`pkg-config --libs dbusmenu-gtk3-0.4` + + + +OBJECTS=betterbird-systray-icon.o \ + + app-indicator.o \ +--- a/1790619-send-progress-width.patch ++++ b/1790619-send-progress-width.patch +@@ -31,6 +21,7 @@ + scrolling="false"> + + &sendDialog.title; ++ + + + + - +--- a/1777788-fix-dialog-size.patch ++++ b/1777788-fix-dialog-size.patch +@@ -22,6 +22,7 @@ diff --git a/mailnews/compose/content/sendProgress.xhtml b/mailnews/compose/cont + scrolling="false"> + + &sendDialog.title; ++ + + + diff --git a/pkgs/applications/networking/mailreaders/betterbird/default.nix b/pkgs/applications/networking/mailreaders/betterbird/default.nix new file mode 100644 index 00000000000..1112bb39f74 --- /dev/null +++ b/pkgs/applications/networking/mailreaders/betterbird/default.nix @@ -0,0 +1,116 @@ +{ lib +, buildMozillaMach +, cacert +, fetchFromGitHub +, fetchurl +, git +, libdbusmenu-gtk3 +, runtimeShell +, thunderbird-unwrapped +}: + +((buildMozillaMach rec { + pname = "betterbird"; + version = "102.8.0"; + + applicationName = "Betterbird"; + binaryName = "betterbird"; + inherit (thunderbird-unwrapped) application extraPatches; + + src = fetchurl { + # https://download.cdn.mozilla.net/pub/mozilla.org/thunderbird/releases/ + url = "mirror://mozilla/thunderbird/releases/${version}/source/thunderbird-${version}.source.tar.xz"; + sha512 = "2431eb8799184b261609c96bed3c9368bec9035a831aa5f744fa89e48aedb130385b268dd90f03bbddfec449dc3e5fad1b5f8727fe9e11e1d1f123a81b97ddf8"; + }; + + extraPostPatch = let + majVer = lib.versions.major version; + betterbird = fetchFromGitHub { + owner = "Betterbird"; + repo = "thunderbird-patches"; + rev = "${version}-bb30"; + postFetch = '' + echo "Retrieving external patches" + + echo "#!${runtimeShell}" > external.sh + grep " # " $out/${majVer}/series-M-C >> external.sh + grep " # " $out/${majVer}/series >> external.sh + sed -i -e 's/\/rev\//\/raw-rev\//' external.sh + sed -i -e 's|\(.*\) # \(.*\)|curl \2 -o $out/${majVer}/external/\1|' external.sh + chmod 700 external.sh + + mkdir $out/${majVer}/external + SSL_CERT_FILE=${cacert}/etc/ssl/certs/ca-bundle.crt + . ./external.sh + rm external.sh + ''; + sha256 = "sha256-ouJSFz/5shNR9puVjrZRJq90DHTeSx7hAnDpuhkBsDo="; + }; + in thunderbird-unwrapped.extraPostPatch or "" + /* bash */ '' + PATH=$PATH:${lib.makeBinPath [ git ]} + patches=$(mktemp -d) + for dir in branding bugs external features misc; do + cp -r ${betterbird}/${majVer}/$dir/*.patch $patches/ + done + cp ${betterbird}/${majVer}/series* $patches/ + chmod -R +w $patches + + cd $patches + patch -p1 < ${./betterbird.diff} + substituteInPlace 12-feature-linux-systray.patch \ + --replace "/usr/include/libdbusmenu-glib-0.4/" "${lib.getDev libdbusmenu-gtk3}/include/libdbusmenu-glib-0.4/" \ + --replace "/usr/include/libdbusmenu-gtk3-0.4/" "${lib.getDev libdbusmenu-gtk3}/include/libdbusmenu-gtk3-0.4/" + cd - + + chmod -R +w dom/base/test/gtest/ + + while read patch; do + patch="''${patch%%#*}" + patch="''${patch% }" + if [[ $patch == "" ]]; then + continue + fi + + echo Applying patch $patch. + if [[ $patch == *-m-c.patch ]]; then + git apply -p1 -v < $patches/$patch + else + cd comm + git apply -p1 -v < $patches/$patch + cd .. + fi + done < <(cat $patches/series $patches/series-M-C) + ''; + + extraBuildInputs = [ + libdbusmenu-gtk3 + ]; + + extraConfigureFlags = [ + "--enable-application=comm/mail" + "--with-branding=comm/mail/branding/betterbird" + ]; + + meta = with lib; { + description = "Betterbird is a fine-tuned version of Mozilla Thunderbird, Thunderbird on steroids, if you will"; + homepage = "https://www.betterbird.eu/"; + maintainers = with maintainers; [ SuperSandro2000 ]; + inherit (thunderbird-unwrapped.meta) platforms badPlatforms broken license; + }; +}).override { + crashreporterSupport = false; # not supported + geolocationSupport = false; + webrtcSupport = false; + + pgoSupport = false; # console.warn: feeds: "downloadFeed: network connection unavailable" +}).overrideAttrs(oldAttrs: { + postInstall = oldAttrs.postInstall or "" + '' + mv $out/lib/thunderbird/* $out/lib/betterbird + rmdir $out/lib/thunderbird/ + rm $out/bin/thunderbird + ln -srf $out/lib/betterbird/betterbird $out/bin/betterbird + ''; + + doInstallCheck = false; + requiredSystemFeatures = []; +}) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 930a9c58276..67f745e5db6 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -33604,6 +33604,12 @@ with pkgs; thonny = callPackage ../applications/editors/thonny { }; + betterbird-unwrapped = callPackage ../applications/networking/mailreaders/betterbird { }; + betterbird = wrapThunderbird betterbird-unwrapped { + desktopName = "Betterbird"; + pname = "betterbird"; + }; + thunderbirdPackages = recurseIntoAttrs (callPackage ../applications/networking/mailreaders/thunderbird/packages.nix { callPackage = newScope { inherit (rustPackages) cargo rustc; -- cgit 1.4.1