{ stdenv, lib, callPackage, fetchurl, fetchpatch, nixosTests }: let common = opts: callPackage (import ./common.nix opts) {}; in rec { firefox = common rec { pname = "firefox"; ffversion = "90.0"; src = fetchurl { url = "mirror://mozilla/firefox/releases/${ffversion}/source/firefox-${ffversion}.source.tar.xz"; sha512 = "233ad59e4ab2f08d2253b49235b51b26fa32fb7c285928110573ccbe67c79965d9401a6c58a3af2ad22b8a58ca5d9b3154e3e8c9d29b153acd16152d9b75442c"; }; 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. license = lib.licenses.mpl20; }; tests = [ nixosTests.firefox ]; updateScript = callPackage ./update.nix { attrPath = "firefox-unwrapped"; versionKey = "ffversion"; }; }; firefox-esr-78 = common rec { pname = "firefox-esr"; ffversion = "78.12.0esr"; src = fetchurl { url = "mirror://mozilla/firefox/releases/${ffversion}/source/firefox-${ffversion}.source.tar.xz"; sha512 = "646eb803e0d0e541773e3111708c7eaa85e784e4bae6e4a77dcecdc617ee29e2e349c9ef16ae7e663311734dd7491aebd904359124dda62672dbc18bfb608f0a"; }; 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; [ eelco 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 ]; updateScript = callPackage ./update.nix { attrPath = "firefox-esr-78-unwrapped"; versionSuffix = "esr"; versionKey = "ffversion"; }; }; }