{ stdenv, lib, callPackage, fetchurl, fetchpatch, nixosTests }: let common = opts: callPackage (import ./common.nix opts) {}; in rec { firefox = common rec { pname = "firefox"; version = "97.0"; src = fetchurl { url = "mirror://mozilla/firefox/releases/${version}/source/firefox-${version}.source.tar.xz"; sha512 = "a913695a42cb06ee9bda2a20e65cc573e40ca93e9f75b7ee0a43ebd1935b371e7e80d5fc8d5f126ad0712ab848635a8624bbeed43807e5c179537aa32c884186"; }; meta = { description = "A web browser built from Firefox source tree"; homepage = "http://www.mozilla.com/en-US/firefox/"; maintainers = with lib.maintainers; [ eelco lovesegfault hexa ]; platforms = lib.platforms.unix; badPlatforms = lib.platforms.darwin; 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. maxSilent = 14400; # 4h, double the default of 7200s (c.f. #129212, #129115) license = lib.licenses.mpl20; }; tests = [ nixosTests.firefox ]; updateScript = callPackage ./update.nix { attrPath = "firefox-unwrapped"; }; }; firefox-esr-91 = common rec { pname = "firefox-esr"; version = "91.6.0esr"; src = fetchurl { url = "mirror://mozilla/firefox/releases/${version}/source/firefox-${version}.source.tar.xz"; sha512 = "3dd1929f93cdd087a93fc3597f32d9005c986b59832954e01a8c2472b179c92ad611eaa73d3fc000a08b838a0b70da73ff5ba82d6009160655ba6894cf04520e"; }; meta = { description = "A web browser built from Firefox Extended Support Release source tree"; homepage = "http://www.mozilla.com/en-US/firefox/"; maintainers = with lib.maintainers; [ hexa ]; platforms = lib.platforms.unix; badPlatforms = lib.platforms.darwin; 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; }; tests = [ nixosTests.firefox-esr-91 ]; updateScript = callPackage ./update.nix { attrPath = "firefox-esr-91-unwrapped"; versionSuffix = "esr"; }; }; librewolf = let librewolf-src = callPackage ./librewolf { }; in (common rec { pname = "librewolf"; binaryName = "librewolf"; version = librewolf-src.packageVersion; src = librewolf-src.firefox; inherit (librewolf-src) extraConfigureFlags extraPostPatch extraPassthru; meta = { description = "A fork of Firefox, focused on privacy, security and freedom"; homepage = "https://librewolf.net/"; maintainers = with lib.maintainers; [ squalus ]; inherit (firefox.meta) platforms badPlatforms broken maxSilent license; }; updateScript = callPackage ./librewolf/update.nix { attrPath = "librewolf-unwrapped"; }; }).override { crashreporterSupport = false; enableOfficialBranding = false; }; }