librewolf: move out of firefox directory
Simplifies Firefox maintenance. See #160520 - make the firefox common.nix available from the top level as buildMozillaMach - use new buildMozillaMach function in librewolf expressions - minor changes to update script
This commit is contained in:
parent
517109653f
commit
b1571265b5
7 changed files with 42 additions and 39 deletions
|
@ -1,11 +1,7 @@
|
||||||
{ stdenv, lib, callPackage, fetchurl, fetchpatch, nixosTests }:
|
{ stdenv, lib, callPackage, fetchurl, fetchpatch, nixosTests, buildMozillaMach }:
|
||||||
|
|
||||||
let
|
|
||||||
common = opts: callPackage (import ./common.nix opts) {};
|
|
||||||
in
|
|
||||||
|
|
||||||
rec {
|
rec {
|
||||||
firefox = common rec {
|
firefox = buildMozillaMach rec {
|
||||||
pname = "firefox";
|
pname = "firefox";
|
||||||
version = "100.0";
|
version = "100.0";
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
|
@ -30,7 +26,7 @@ rec {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
firefox-esr-91 = common rec {
|
firefox-esr-91 = buildMozillaMach rec {
|
||||||
pname = "firefox-esr";
|
pname = "firefox-esr";
|
||||||
version = "91.9.0esr";
|
version = "91.9.0esr";
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
|
@ -54,30 +50,4 @@ rec {
|
||||||
versionSuffix = "esr";
|
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;
|
|
||||||
pgoSupport = false; # Profiling gets stuck and doesn't terminate.
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
31
pkgs/applications/networking/browsers/librewolf/default.nix
Normal file
31
pkgs/applications/networking/browsers/librewolf/default.nix
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
{ stdenv, lib, callPackage, buildMozillaMach }:
|
||||||
|
|
||||||
|
let
|
||||||
|
librewolf-src = callPackage ./librewolf.nix { };
|
||||||
|
in
|
||||||
|
(buildMozillaMach 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 ];
|
||||||
|
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;
|
||||||
|
};
|
||||||
|
updateScript = callPackage ./update.nix {
|
||||||
|
attrPath = "librewolf-unwrapped";
|
||||||
|
};
|
||||||
|
}).override {
|
||||||
|
crashreporterSupport = false;
|
||||||
|
enableOfficialBranding = false;
|
||||||
|
pgoSupport = false; # Profiling gets stuck and doesn't terminate.
|
||||||
|
}
|
|
@ -1,4 +1,4 @@
|
||||||
{ callPackage, git }:
|
{ callPackage }:
|
||||||
let
|
let
|
||||||
src = callPackage ./src.nix { };
|
src = callPackage ./src.nix { };
|
||||||
in
|
in
|
|
@ -20,7 +20,7 @@ writeScript "update-librewolf" ''
|
||||||
latestTag=$(curl https://gitlab.com/api/v4/projects/librewolf-community%2Fbrowser%2Fsource/repository/tags?per_page=1 | jq -r .[0].name)
|
latestTag=$(curl https://gitlab.com/api/v4/projects/librewolf-community%2Fbrowser%2Fsource/repository/tags?per_page=1 | jq -r .[0].name)
|
||||||
echo "latestTag=$latestTag"
|
echo "latestTag=$latestTag"
|
||||||
|
|
||||||
srcJson=pkgs/applications/networking/browsers/firefox/librewolf/src.json
|
srcJson=pkgs/applications/networking/browsers/librewolf/src.json
|
||||||
localRev=$(jq -r .source.rev < $srcJson)
|
localRev=$(jq -r .source.rev < $srcJson)
|
||||||
echo "localRev=$localRev"
|
echo "localRev=$localRev"
|
||||||
|
|
|
@ -26404,11 +26404,13 @@ with pkgs;
|
||||||
|
|
||||||
filezilla = callPackage ../applications/networking/ftp/filezilla { };
|
filezilla = callPackage ../applications/networking/ftp/filezilla { };
|
||||||
|
|
||||||
firefoxPackages = recurseIntoAttrs (callPackage ../applications/networking/browsers/firefox/packages.nix {
|
buildMozillaMach =
|
||||||
callPackage = newScope {
|
let callPackage = newScope {
|
||||||
inherit (rustPackages) cargo rustc;
|
inherit (rustPackages) cargo rustc;
|
||||||
};
|
};
|
||||||
});
|
in opts: callPackage (import ../applications/networking/browsers/firefox/common.nix opts) {};
|
||||||
|
|
||||||
|
firefoxPackages = recurseIntoAttrs (callPackage ../applications/networking/browsers/firefox/packages.nix {});
|
||||||
|
|
||||||
firefox-unwrapped = firefoxPackages.firefox;
|
firefox-unwrapped = firefoxPackages.firefox;
|
||||||
firefox-esr-91-unwrapped = firefoxPackages.firefox-esr-91;
|
firefox-esr-91-unwrapped = firefoxPackages.firefox-esr-91;
|
||||||
|
@ -26453,7 +26455,7 @@ with pkgs;
|
||||||
desktopName = "Firefox DevEdition";
|
desktopName = "Firefox DevEdition";
|
||||||
};
|
};
|
||||||
|
|
||||||
librewolf-unwrapped = firefoxPackages.librewolf;
|
librewolf-unwrapped = callPackage ../applications/networking/browsers/librewolf {};
|
||||||
|
|
||||||
librewolf = wrapFirefox librewolf-unwrapped {
|
librewolf = wrapFirefox librewolf-unwrapped {
|
||||||
inherit (librewolf-unwrapped) extraPrefsFiles extraPoliciesFiles;
|
inherit (librewolf-unwrapped) extraPrefsFiles extraPoliciesFiles;
|
||||||
|
|
Loading…
Reference in a new issue