From dd9525240f296855514a5e505f2446d1f5ec8a36 Mon Sep 17 00:00:00 2001 From: ajs124 Date: Sat, 15 May 2021 17:55:43 +0200 Subject: [PATCH 1/4] thunderbird-68: drop --- .../networking/mailreaders/thunderbird/68.nix | 343 ------------------ .../thunderbird/no-buildconfig-68.patch | 36 -- pkgs/top-level/all-packages.nix | 7 - 3 files changed, 386 deletions(-) delete mode 100644 pkgs/applications/networking/mailreaders/thunderbird/68.nix delete mode 100644 pkgs/applications/networking/mailreaders/thunderbird/no-buildconfig-68.patch diff --git a/pkgs/applications/networking/mailreaders/thunderbird/68.nix b/pkgs/applications/networking/mailreaders/thunderbird/68.nix deleted file mode 100644 index 4433551d2e1..00000000000 --- a/pkgs/applications/networking/mailreaders/thunderbird/68.nix +++ /dev/null @@ -1,343 +0,0 @@ -# This pakcage is keeped until Thunderbird 78 supports OpenPGP. -# https://www.thunderbird.net/en-US/thunderbird/78.0.1/releasenotes/ -{ autoconf213 -, bzip2 -, cargo -, common-updater-scripts -, copyDesktopItems -, coreutils -, curl -, dbus -, dbus-glib -, fetchurl -, file -, fontconfig -, freetype -, glib -, gnugrep -, gnused -, icu -, jemalloc -, lib -, libGL -, libGLU -, libevent -, libjpeg -, libnotify -, libpng -, libstartup_notification -, libvpx -, libwebp -, llvmPackages -, m4 -, makeDesktopItem -, nasm -, nodejs -, nspr -, nss -, pango -, perl -, pkg-config -, python2 -, python3 -, runtimeShell -, rust-cbindgen -, rustc -, sqlite -, stdenv -, systemd -, unzip -, which -, writeScript -, xidel -, xorg -, yasm -, zip -, zlib - -, debugBuild ? false - -, alsaSupport ? stdenv.isLinux, alsaLib -, pulseaudioSupport ? stdenv.isLinux, libpulseaudio -, gtk3Support ? true, gtk2, gtk3, wrapGAppsHook -, waylandSupport ? true -, libxkbcommon, calendarSupport ? true - -# Use official trademarked branding. Permission obtained at: -# https://github.com/NixOS/nixpkgs/pull/94880#issuecomment-675907971 -, enableOfficialBranding ? true -}: - -assert waylandSupport -> gtk3Support == true; - -stdenv.mkDerivation rec { - pname = "thunderbird"; - version = "68.12.0"; - - src = fetchurl { - url = - "mirror://mozilla/thunderbird/releases/${version}/source/thunderbird-${version}.source.tar.xz"; - sha512 = - "33350vjgzvsg6sdhdld92z75k1xcf1wmngdcvzsj4f3y3aal73pyw03mlvgg6y36bm0j8fhaxvgbbg5zm7hxhn779z78970m4v9amg7"; - }; - - nativeBuildInputs = [ - autoconf213 - cargo - copyDesktopItems - gnused - llvmPackages.llvm - m4 - nasm - nodejs - perl - pkg-config - python2 - python3 - rust-cbindgen - rustc - which - yasm - unzip - ] ++ lib.optional gtk3Support wrapGAppsHook; - - buildInputs = [ - bzip2 - dbus - dbus-glib - file - fontconfig - freetype - glib - gtk2 - icu - jemalloc - libGL - libGLU - libevent - libjpeg - libnotify - libpng - libstartup_notification - libvpx - libwebp - nspr - nss - pango - perl - sqlite - xorg.libX11 - xorg.libXScrnSaver - xorg.libXcursor - xorg.libXext - xorg.libXft - xorg.libXi - xorg.libXrender - xorg.libXt - xorg.pixman - xorg.xorgproto - zip - zlib - ] ++ lib.optional alsaSupport alsaLib - ++ lib.optional gtk3Support gtk3 - ++ lib.optional pulseaudioSupport libpulseaudio - ++ lib.optional waylandSupport libxkbcommon; - - NIX_CFLAGS_COMPILE =[ - "-I${glib.dev}/include/gio-unix-2.0" - "-I${nss.dev}/include/nss" - ]; - - patches = [ - ./no-buildconfig-68.patch - ]; - - postPatch = '' - rm -rf obj-x86_64-pc-linux-gnu - ''; - - hardeningDisable = [ "format" ]; - - preConfigure = '' - # remove distributed configuration files - rm -f configure - rm -f js/src/configure - rm -f .mozconfig* - - configureScript="$(realpath ./mach) configure" - # AS=as in the environment causes build failure https://bugzilla.mozilla.org/show_bug.cgi?id=1497286 - unset AS - - export MOZCONFIG=$(pwd)/mozconfig - - # Set C flags for Rust's bindgen program. Unlike ordinary C - # compilation, bindgen does not invoke $CC directly. Instead it - # uses LLVM's libclang. To make sure all necessary flags are - # included we need to look in a few places. - # TODO: generalize this process for other use-cases. - - BINDGEN_CFLAGS="$(< ${stdenv.cc}/nix-support/libc-cflags) \ - $(< ${stdenv.cc}/nix-support/cc-cflags) \ - $(< ${stdenv.cc}/nix-support/libcxx-cxxflags) \ - ${ - lib.optionalString stdenv.cc.isClang - "-idirafter ${stdenv.cc.cc}/lib/clang/${ - lib.getVersion stdenv.cc.cc - }/include" - } \ - ${ - lib.optionalString stdenv.cc.isGNU - "-isystem ${stdenv.cc.cc}/include/c++/${ - lib.getVersion stdenv.cc.cc - } -isystem ${stdenv.cc.cc}/include/c++/${ - lib.getVersion stdenv.cc.cc - }/${stdenv.hostPlatform.config}" - } \ - $NIX_CFLAGS_COMPILE" - - echo "ac_add_options BINDGEN_CFLAGS='$BINDGEN_CFLAGS'" >> $MOZCONFIG - ''; - - configureFlags = let - toolkitSlug = if gtk3Support then - "3${lib.optionalString waylandSupport "-wayland"}" - else - "2"; - toolkitValue = "cairo-gtk${toolkitSlug}"; - in [ - "--enable-application=comm/mail" - - "--with-system-bz2" - "--with-system-icu" - "--with-system-jpeg" - "--with-system-libevent" - "--with-system-nspr" - "--with-system-nss" - "--with-system-png" # needs APNG support - "--with-system-icu" - "--with-system-zlib" - "--with-system-webp" - "--with-system-libvpx" - - "--enable-rust-simd" - "--enable-crashreporter" - "--enable-default-toolkit=${toolkitValue}" - "--enable-js-shell" - "--enable-necko-wifi" - "--enable-startup-notification" - "--enable-system-ffi" - "--enable-system-pixman" - "--enable-system-sqlite" - - "--disable-gconf" - "--disable-tests" - "--disable-updater" - "--enable-jemalloc" - ] ++ (if debugBuild then [ - "--enable-debug" - "--enable-profiling" - ] else [ - "--disable-debug" - "--enable-release" - "--disable-debug-symbols" - "--enable-optimize" - "--enable-strip" - ]) ++ lib.optionals (!stdenv.hostPlatform.isi686) [ - # on i686-linux: --with-libclang-path is not available in this configuration - "--with-libclang-path=${llvmPackages.libclang}/lib" - "--with-clang-path=${llvmPackages.clang}/bin/clang" - ] ++ lib.optional alsaSupport "--enable-alsa" - ++ lib.optional calendarSupport "--enable-calendar" - ++ lib.optional enableOfficialBranding "--enable-official-branding" - ++ lib.optional pulseaudioSupport "--enable-pulseaudio"; - - enableParallelBuilding = true; - - postConfigure = '' - cd obj-* - ''; - - makeFlags = lib.optionals enableOfficialBranding [ - "MOZILLA_OFFICIAL=1" - "BUILD_OFFICIAL=1" - ]; - - doCheck = false; - - desktopItems = [ - (makeDesktopItem { - categories = lib.concatStringsSep ";" [ "Application" "Network" ]; - desktopName = "Thunderbird"; - genericName = "Mail Reader"; - name = "thunderbird"; - exec = "thunderbird %U"; - icon = "$out/lib/thunderbird/chrome/icons/default/default256.png"; - mimeType = lib.concatStringsSep ";" [ - # Email - "x-scheme-handler/mailto" - "message/rfc822" - # Feeds - "x-scheme-handler/feed" - "application/rss+xml" - "application/x-extension-rss" - # Newsgroups - "x-scheme-handler/news" - "x-scheme-handler/snews" - "x-scheme-handler/nntp" - ]; - }) - ]; - postInstall = '' - # TODO: Move to a dev output? - rm -rf $out/include $out/lib/thunderbird-devel-* $out/share/idl - ''; - - preFixup = '' - # Needed to find Mozilla runtime - gappsWrapperArgs+=( - --argv0 "$out/bin/thunderbird" - --set MOZ_APP_LAUNCHER thunderbird - # https://github.com/NixOS/nixpkgs/pull/61980 - --set SNAP_NAME "thunderbird" - --set MOZ_LEGACY_PROFILES 1 - --set MOZ_ALLOW_DOWNGRADE 1 - ) - ''; - - # FIXME: The XUL portion of this can probably be removed as soon as we - # package a Thunderbird >=71.0 since XUL shouldn't be anymore (in use)? - postFixup = '' - local xul="$out/lib/thunderbird/libxul.so" - patchelf --set-rpath "${libnotify}/lib:${lib.getLib systemd}/lib:$(patchelf --print-rpath $xul)" $xul - ''; - - doInstallCheck = true; - installCheckPhase = '' - "$out/bin/thunderbird" --version - ''; - - disallowedRequisites = [ - stdenv.cc - ]; - - passthru.updateScript = import ./../../browsers/firefox/update.nix { - attrPath = "thunderbird"; - baseUrl = "http://archive.mozilla.org/pub/thunderbird/releases/"; - inherit writeScript lib common-updater-scripts xidel coreutils gnused - gnugrep curl runtimeShell; - }; - - meta = with lib; { - description = "A full-featured e-mail client"; - homepage = "https://www.thunderbird.net"; - maintainers = with maintainers; [ - eelco - lovesegfault - pierron - vcunat - ]; - platforms = platforms.linux; - license = licenses.mpl20; - knownVulnerabilities = [ "Support ended around Semptember 2020." ]; - }; -} diff --git a/pkgs/applications/networking/mailreaders/thunderbird/no-buildconfig-68.patch b/pkgs/applications/networking/mailreaders/thunderbird/no-buildconfig-68.patch deleted file mode 100644 index 482c10bd1cf..00000000000 --- a/pkgs/applications/networking/mailreaders/thunderbird/no-buildconfig-68.patch +++ /dev/null @@ -1,36 +0,0 @@ -Remove about:buildconfig. If used as-is, it would add unnecessary runtime dependencies. -diff -ru -x '*~' a/docshell/base/nsAboutRedirector.cpp b/docshell/base/nsAboutRedirector.cpp ---- a/docshell/base/nsAboutRedirector.cpp 2017-07-31 18:20:51.000000000 +0200 -+++ b/docshell/base/nsAboutRedirector.cpp 2017-09-26 22:02:00.814151731 +0200 -@@ -32,8 +32,6 @@ - {"about", "chrome://global/content/aboutAbout.xhtml", 0}, - {"addons", "chrome://mozapps/content/extensions/extensions.xul", - nsIAboutModule::ALLOW_SCRIPT}, -- {"buildconfig", "chrome://global/content/buildconfig.html", -- nsIAboutModule::URI_SAFE_FOR_UNTRUSTED_CONTENT}, - {"checkerboard", "chrome://global/content/aboutCheckerboard.xhtml", - nsIAboutModule::URI_SAFE_FOR_UNTRUSTED_CONTENT | - nsIAboutModule::ALLOW_SCRIPT}, -diff -ru -x '*~' a/toolkit/content/jar.mn b/toolkit/content/jar.mn ---- a/toolkit/content/jar.mn 2017-07-31 18:20:52.000000000 +0200 -+++ b/toolkit/content/jar.mn 2017-09-26 22:01:42.383350314 +0200 -@@ -39,7 +39,6 @@ - content/global/plugins.css - content/global/browser-child.js - content/global/browser-content.js --* content/global/buildconfig.html - content/global/buildconfig.css - content/global/contentAreaUtils.js - content/global/datepicker.xhtml ---- a/comm/mail/base/jar.mn -+++ b/comm/mail/base/jar.mn -@@ -117,9 +117,7 @@ - % override chrome://mozapps/content/profile/profileDowngrade.js chrome://messenger/content/profileDowngrade.js - % override chrome://mozapps/content/profile/profileDowngrade.xul chrome://messenger/content/profileDowngrade.xul - --* content/messenger/buildconfig.html (content/buildconfig.html) - content/messenger/buildconfig.css (content/buildconfig.css) --% override chrome://global/content/buildconfig.html chrome://messenger/content/buildconfig.html - % override chrome://global/content/buildconfig.css chrome://messenger/content/buildconfig.css - - # L10n resources and overrides. diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 177e25ea3c9..8fb98e28c1c 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -26486,13 +26486,6 @@ in gtk3Support = true; }; - thunderbird-68 = callPackage ../applications/networking/mailreaders/thunderbird/68.nix { - inherit (rustPackages) cargo rustc; - libpng = libpng_apng; - nss = nss_3_44; - gtk3Support = true; - }; - thunderbolt = callPackage ../os-specific/linux/thunderbolt {}; thunderbird-bin = thunderbird-bin-78; From 36d2488cb67e9c76b7f7dfbcdadccf703ba3d332 Mon Sep 17 00:00:00 2001 From: ajs124 Date: Sat, 15 May 2021 17:59:27 +0200 Subject: [PATCH 2/4] nss_3_44: drop --- pkgs/development/libraries/nss/3.44.nix | 144 ------------------ .../libraries/nss/85_security_load-3.44.patch | 81 ---------- pkgs/top-level/all-packages.nix | 1 - 3 files changed, 226 deletions(-) delete mode 100644 pkgs/development/libraries/nss/3.44.nix delete mode 100644 pkgs/development/libraries/nss/85_security_load-3.44.patch diff --git a/pkgs/development/libraries/nss/3.44.nix b/pkgs/development/libraries/nss/3.44.nix deleted file mode 100644 index b08b8b3ed2a..00000000000 --- a/pkgs/development/libraries/nss/3.44.nix +++ /dev/null @@ -1,144 +0,0 @@ -{ lib, stdenv, fetchurl, nspr, perl, zlib, sqlite, fixDarwinDylibNames, buildPackages }: - -let - nssPEM = fetchurl { - url = "http://dev.gentoo.org/~polynomial-c/mozilla/nss-3.15.4-pem-support-20140109.patch.xz"; - sha256 = "10ibz6y0hknac15zr6dw4gv9nb5r5z9ym6gq18j3xqx7v7n3vpdw"; - }; - version = "3.44.4"; - underscoreVersion = builtins.replaceStrings ["."] ["_"] version; - -in stdenv.mkDerivation rec { - pname = "nss"; - inherit version; - - src = fetchurl { - url = "mirror://mozilla/security/nss/releases/NSS_${underscoreVersion}_RTM/src/${pname}-${version}.tar.gz"; - sha256 = "7ec1a52e20fd9a23e1907eeba8f4f2ecd619dac5d20fa023ec5b4faa1843e847"; - }; - - depsBuildBuild = [ buildPackages.stdenv.cc ]; - - nativeBuildInputs = [ perl ] - ++ lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames; - - buildInputs = [ zlib sqlite ]; - - propagatedBuildInputs = [ nspr ]; - - prePatch = '' - xz -d < ${nssPEM} | patch -p1 - ''; - - patches = - [ - # Based on http://patch-tracker.debian.org/patch/series/dl/nss/2:3.15.4-1/85_security_load.patch - ./85_security_load-3.44.patch - ./ckpem.patch - ]; - - patchFlags = [ "-p0" ]; - - postPatch = lib.optionalString stdenv.isDarwin '' - substituteInPlace nss/coreconf/Darwin.mk --replace '@executable_path/$(notdir $@)' "$out/lib/\$(notdir \$@)" - ''; - - outputs = [ "out" "dev" "tools" ]; - - preConfigure = "cd nss"; - - makeFlags = let - # NSS's build systems expects aarch32 to be called arm; if we pass in armv6l/armv7l, it - # fails with a linker error - cpu = if stdenv.hostPlatform.isAarch32 then "arm" else stdenv.hostPlatform.parsed.cpu.name; - in [ - "NSPR_INCLUDE_DIR=${nspr.dev}/include" - "NSPR_LIB_DIR=${nspr.out}/lib" - "NSDISTMODE=copy" - "BUILD_OPT=1" - "SOURCE_PREFIX=\$(out)" - "NSS_ENABLE_ECC=1" - "USE_SYSTEM_ZLIB=1" - "NSS_USE_SYSTEM_SQLITE=1" - "NATIVE_CC=${buildPackages.stdenv.cc}/bin/cc" - ] ++ lib.optionals (!stdenv.isDarwin) [ - # Pass in CPU even if we're not cross compiling, because otherwise it tries to guess with - # uname, which can be wrong if e.g. we're compiling for aarch32 on aarch64 - "OS_TEST=${cpu}" - "CPU_ARCH=${cpu}" - ] ++ lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) [ - "CROSS_COMPILE=1" - "NSS_DISABLE_GTESTS=1" # don't want to build tests when cross-compiling - ] ++ lib.optional stdenv.is64bit "USE_64=1" - ++ lib.optional stdenv.isDarwin "CCC=clang++"; - - NIX_CFLAGS_COMPILE = "-Wno-error"; - - # TODO(@oxij): investigate this: `make -n check` works but `make - # check` fails with "no rule", same for "installcheck". - doCheck = false; - doInstallCheck = false; - - postInstall = '' - rm -rf $out/private - mv $out/public $out/include - mv $out/*.OBJ/* $out/ - rmdir $out/*.OBJ - - ln -s lib $out/lib64 - - # Upstream issue: https://bugzilla.mozilla.org/show_bug.cgi?id=530672 - # https://gitweb.gentoo.org/repo/gentoo.git/plain/dev-libs/nss/files/nss-3.32-gentoo-fixups.patch?id=af1acce6c6d2c3adb17689261dfe2c2b6771ab8a - NSS_MAJOR_VERSION=`grep "NSS_VMAJOR" lib/nss/nss.h | awk '{print $3}'` - NSS_MINOR_VERSION=`grep "NSS_VMINOR" lib/nss/nss.h | awk '{print $3}'` - NSS_PATCH_VERSION=`grep "NSS_VPATCH" lib/nss/nss.h | awk '{print $3}'` - PREFIX="$out" - - mkdir -p $out/lib/pkgconfig - sed -e "s,%prefix%,$PREFIX," \ - -e "s,%exec_prefix%,$PREFIX," \ - -e "s,%libdir%,$PREFIX/lib64," \ - -e "s,%includedir%,$dev/include/nss," \ - -e "s,%NSS_VERSION%,$NSS_MAJOR_VERSION.$NSS_MINOR_VERSION.$NSS_PATCH_VERSION,g" \ - -e "s,%NSPR_VERSION%,4.16,g" \ - pkg/pkg-config/nss.pc.in > $out/lib/pkgconfig/nss.pc - chmod 0644 $out/lib/pkgconfig/nss.pc - - sed -e "s,@prefix@,$PREFIX," \ - -e "s,@MOD_MAJOR_VERSION@,$NSS_MAJOR_VERSION," \ - -e "s,@MOD_MINOR_VERSION@,$NSS_MINOR_VERSION," \ - -e "s,@MOD_PATCH_VERSION@,$NSS_PATCH_VERSION," \ - pkg/pkg-config/nss-config.in > $out/bin/nss-config - chmod 0755 $out/bin/nss-config - ''; - - postFixup = let - isCross = stdenv.hostPlatform != stdenv.buildPlatform; - nss = if isCross then buildPackages.nss.tools else "$out"; - in '' - for libname in freebl3 nssdbm3 softokn3 - do '' + - (if stdenv.isDarwin - then '' - libfile="$out/lib/lib$libname.dylib" - DYLD_LIBRARY_PATH=$out/lib:${nspr.out}/lib \ - '' else '' - libfile="$out/lib/lib$libname.so" - LD_LIBRARY_PATH=$out/lib:${nspr.out}/lib \ - '') + '' - ${nss}/bin/shlibsign -v -i "$libfile" - done - - moveToOutput bin "$tools" - moveToOutput bin/nss-config "$dev" - moveToOutput lib/libcrmf.a "$dev" # needed by firefox, for example - rm -f "$out"/lib/*.a - ''; - - meta = with lib; { - homepage = "https://developer.mozilla.org/en-US/docs/NSS"; - description = "A set of libraries for development of security-enabled client and server applications"; - license = licenses.mpl20; - platforms = platforms.all; - }; -} diff --git a/pkgs/development/libraries/nss/85_security_load-3.44.patch b/pkgs/development/libraries/nss/85_security_load-3.44.patch deleted file mode 100644 index 132d5a96b29..00000000000 --- a/pkgs/development/libraries/nss/85_security_load-3.44.patch +++ /dev/null @@ -1,81 +0,0 @@ -diff -ru -x '*~' -x '*.orig' -x '*.rej' nss/cmd/shlibsign/shlibsign.c nss/cmd/shlibsign/shlibsign.c ---- nss/cmd/shlibsign/shlibsign.c 2017-01-04 15:24:24.000000000 +0100 -+++ nss/cmd/shlibsign/shlibsign.c 2017-01-24 14:43:31.030420852 +0100 -@@ -875,6 +875,8 @@ - goto cleanup; - } - lib = PR_LoadLibrary(libname); -+ if (!lib) -+ lib = PR_LoadLibrary(NIX_NSS_LIBDIR"libsoftokn3.so"); - assert(lib != NULL); - if (!lib) { - PR_fprintf(PR_STDERR, "loading softokn3 failed"); -diff -ru -x '*~' -x '*.orig' -x '*.rej' nss/coreconf/config.mk nss/coreconf/config.mk ---- nss/coreconf/config.mk 2017-01-04 15:24:24.000000000 +0100 -+++ nss/coreconf/config.mk 2017-01-24 14:43:47.989432372 +0100 -@@ -202,3 +202,6 @@ - - # Hide old, deprecated, TLS cipher suite names when building NSS - DEFINES += -DSSL_DISABLE_DEPRECATED_CIPHER_SUITE_NAMES -+ -+# Nix specific stuff. -+DEFINES += -DNIX_NSS_LIBDIR=\"$(out)/lib/\" -diff -ru -x '*~' -x '*.orig' -x '*.rej' nss/lib/pk11wrap/pk11load.c nss/lib/pk11wrap/pk11load.c ---- nss/lib/pk11wrap/pk11load.c 2017-01-04 15:24:24.000000000 +0100 -+++ nss/lib/pk11wrap/pk11load.c 2017-01-24 14:45:06.883485652 +0100 -@@ -440,6 +440,13 @@ - * unload the library if anything goes wrong from here on out... - */ - library = PR_LoadLibrary(mod->dllName); -+ if ((library == NULL) && -+ !rindex(mod->dllName, PR_GetDirectorySeparator())) { -+ library = PORT_LoadLibraryFromOrigin(my_shlib_name, -+ (PRFuncPtr) &softoken_LoadDSO, -+ mod->dllName); -+ } -+ - mod->library = (void *)library; - - if (library == NULL) { -diff -ru -x '*~' -x '*.orig' -x '*.rej' nss/lib/util/secload.c nss/lib/util/secload.c ---- nss/lib/util/secload.c 2017-01-04 15:24:24.000000000 +0100 -+++ nss/lib/util/secload.c 2017-01-24 14:43:31.030420852 +0100 -@@ -70,9 +70,14 @@ - - /* Remove the trailing filename from referencePath and add the new one */ - c = strrchr(referencePath, PR_GetDirectorySeparator()); -+ if (!c) { /* referencePath doesn't contain a / means that dladdr gave us argv[0] -+ * and program was called from $PATH. Hack to get libs from NIX_NSS_LIBDIR */ -+ referencePath = NIX_NSS_LIBDIR; -+ c = (char*) &referencePath[sizeof(NIX_NSS_LIBDIR) - 1]; /* last / */ -+ } - if (c) { - size_t referencePathSize = 1 + c - referencePath; -- fullName = (char*)PORT_Alloc(strlen(name) + referencePathSize + 1); -+ fullName = (char*) PORT_Alloc(strlen(name) + referencePathSize + 5); - if (fullName) { - memcpy(fullName, referencePath, referencePathSize); - strcpy(fullName + referencePathSize, name); -@@ -82,6 +87,11 @@ - #endif - libSpec.type = PR_LibSpec_Pathname; - libSpec.value.pathname = fullName; -+ if ((referencePathSize >= 4) && -+ (strncmp(fullName + referencePathSize - 4, "bin", 3) == 0)) { -+ memcpy(fullName + referencePathSize -4, "lib", 3); -+ } -+ strcpy(fullName + referencePathSize, name); - dlh = PR_LoadLibraryWithFlags(libSpec, PR_LD_NOW | PR_LD_LOCAL - #ifdef PR_LD_ALT_SEARCH_PATH - /* allow library's dependencies to be found in the same directory -@@ -89,6 +99,10 @@ - | PR_LD_ALT_SEARCH_PATH - #endif - ); -+ if (! dlh) { -+ strcpy(fullName + referencePathSize, name); -+ dlh = PR_LoadLibraryWithFlags(libSpec, PR_LD_NOW | PR_LD_LOCAL); -+ } - PORT_Free(fullName); - } - } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 8fb98e28c1c..1d7a4eced0f 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -16927,7 +16927,6 @@ in }; nss = lowPrio (callPackage ../development/libraries/nss { }); - nss_3_44 = lowPrio (callPackage ../development/libraries/nss/3.44.nix { }); nssTools = nss.tools; # required for stable thunderbird and firefox-esr-78 From 829b324e6d4ef7dd88fcbb8289561e243d5de426 Mon Sep 17 00:00:00 2001 From: ajs124 Date: Sat, 15 May 2021 17:58:25 +0200 Subject: [PATCH 3/4] thunderbird-bin-68: drop --- .../mailreaders/thunderbird-bin/68.nix | 184 ------ .../thunderbird-bin/68_sources.nix | 615 ------------------ pkgs/top-level/all-packages.nix | 2 - 3 files changed, 801 deletions(-) delete mode 100644 pkgs/applications/networking/mailreaders/thunderbird-bin/68.nix delete mode 100644 pkgs/applications/networking/mailreaders/thunderbird-bin/68_sources.nix diff --git a/pkgs/applications/networking/mailreaders/thunderbird-bin/68.nix b/pkgs/applications/networking/mailreaders/thunderbird-bin/68.nix deleted file mode 100644 index 83e8984db7b..00000000000 --- a/pkgs/applications/networking/mailreaders/thunderbird-bin/68.nix +++ /dev/null @@ -1,184 +0,0 @@ -# This pakcage is keeped until Thunderbird 78 supports OpenPGP. -# https://www.thunderbird.net/en-US/thunderbird/78.0.1/releasenotes/ -{ lib, stdenv, fetchurl, config, makeWrapper -, alsaLib -, at-spi2-atk -, atk -, cairo -, cups -, curl -, dbus-glib -, dbus -, fontconfig -, freetype -, gdk-pixbuf -, glib -, glibc -, gtk2 -, gtk3 -, libkrb5 -, libX11 -, libXScrnSaver -, libXcomposite -, libXcursor -, libXdamage -, libXext -, libXfixes -, libXi -, libXinerama -, libXrender -, libXt -, libxcb -, libcanberra -, gnome -, libGLU, libGL -, nspr -, nss -, pango -, writeScript -, xidel -, coreutils -, gnused -, gnugrep -, gnupg -, runtimeShell -}: - -# imports `version` and `sources` -with (import ./68_sources.nix); - -let - arch = if stdenv.hostPlatform.system == "i686-linux" - then "linux-i686" - else "linux-x86_64"; - - isPrefixOf = prefix: string: - builtins.substring 0 (builtins.stringLength prefix) string == prefix; - - sourceMatches = locale: source: - (isPrefixOf source.locale locale) && source.arch == arch; - - systemLocale = config.i18n.defaultLocale or "en-US"; - - defaultSource = lib.findFirst (sourceMatches "en-US") {} sources; - - source = lib.findFirst (sourceMatches systemLocale) defaultSource sources; - - name = "thunderbird-bin-${version}"; -in - -stdenv.mkDerivation { - inherit name; - - src = fetchurl { - url = "https://download-installer.cdn.mozilla.net/pub/thunderbird/releases/${version}/${source.arch}/${source.locale}/thunderbird-${version}.tar.bz2"; - inherit (source) sha256; - }; - - phases = "unpackPhase installPhase"; - - libPath = lib.makeLibraryPath - [ stdenv.cc.cc - alsaLib - at-spi2-atk - atk - cairo - cups - curl - dbus-glib - dbus - fontconfig - freetype - gdk-pixbuf - glib - glibc - gtk2 - gtk3 - libkrb5 - libX11 - libXScrnSaver - libXcomposite - libXcursor - libXdamage - libXext - libXfixes - libXi - libXinerama - libXrender - libXt - libxcb - libcanberra - libGLU libGL - nspr - nss - pango - ] + ":" + lib.makeSearchPathOutput "lib" "lib64" [ - stdenv.cc.cc - ]; - - buildInputs = [ gtk3 gnome.adwaita-icon-theme ]; - - nativeBuildInputs = [ makeWrapper ]; - - installPhase = - '' - mkdir -p "$prefix/usr/lib/thunderbird-bin-${version}" - cp -r * "$prefix/usr/lib/thunderbird-bin-${version}" - - mkdir -p "$out/bin" - ln -s "$prefix/usr/lib/thunderbird-bin-${version}/thunderbird" "$out/bin/" - - for executable in \ - thunderbird crashreporter thunderbird-bin plugin-container updater - do - patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ - "$out/usr/lib/thunderbird-bin-${version}/$executable" - done - - find . -executable -type f -exec \ - patchelf --set-rpath "$libPath" \ - "$out/usr/lib/thunderbird-bin-${version}/{}" \; - - # Create a desktop item. - mkdir -p $out/share/applications - cat > $out/share/applications/thunderbird.desktop < Date: Sat, 15 May 2021 18:01:28 +0200 Subject: [PATCH 4/4] thunderbird{,-bin}-68: add aliases --- pkgs/top-level/aliases.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index b8a804f9aaa..cbff3f6cb8d 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -670,6 +670,8 @@ mapAliases ({ rxvt_unicode-with-plugins = rxvt-unicode; # added 2020-02-02 rxvt_unicode = rxvt-unicode-unwrapped; # added 2020-02-02 subversion19 = throw "subversion19 has been removed as it has reached its end of life"; # added 2021-03-31 + thunderbird-68 = throw "Thunderbird 68 reached end of life with its final release 68.12.0 on 2020-08-25 and was therefore removed from nixpkgs"; + thunderbird-bin-68 = throw "Thunderbird 68 reached end of life with its final release 68.12.0 on 2020-08-25 and was therefore removed from nixpkgs"; togglesg-download = throw "togglesg-download was removed 2021-04-30 as it's unmaintained"; urxvt_autocomplete_all_the_things = rxvt-unicode-plugins.autocomplete-all-the-things; # added 2020-02-02 urxvt_perl = rxvt-unicode-plugins.perl; # added 2020-02-02