Merge pull request #173205 from mweinelt/mach-distribution-id
buildMozillaMach: Add distribution identifier and distribution.ini
This commit is contained in:
commit
5171787219
|
@ -4,6 +4,7 @@
|
|||
, updateScript ? null
|
||||
, binaryName ? "firefox"
|
||||
, application ? "browser"
|
||||
, applicationName ? "Mozilla Firefox"
|
||||
, src
|
||||
, unpackPhase ? null
|
||||
, extraPatches ? []
|
||||
|
@ -18,6 +19,7 @@
|
|||
|
||||
|
||||
{ lib
|
||||
, pkgs
|
||||
, stdenv
|
||||
|
||||
# build time
|
||||
|
@ -161,6 +163,22 @@ let
|
|||
ln -s $lib $out/lib/wasm32-wasi
|
||||
done
|
||||
'';
|
||||
|
||||
distributionIni = pkgs.writeText "distribution.ini" (lib.generators.toINI {} {
|
||||
# Some light branding indicating this build uses our distro preferences
|
||||
Global = {
|
||||
id = "nixos";
|
||||
version = "1.0";
|
||||
about = "${applicationName} for NixOS";
|
||||
};
|
||||
Preferences = {
|
||||
# These values are exposed through telemetry
|
||||
"app.distributor" = "nixos";
|
||||
"app.distributor.channel" = "nixpkgs";
|
||||
"app.partner.nixos" = "nixos";
|
||||
};
|
||||
});
|
||||
|
||||
in
|
||||
|
||||
buildStdenv.mkDerivation ({
|
||||
|
@ -290,6 +308,7 @@ buildStdenv.mkDerivation ({
|
|||
"--enable-application=${application}"
|
||||
"--enable-default-toolkit=cairo-gtk3${lib.optionalString waylandSupport "-wayland"}"
|
||||
"--enable-system-pixman"
|
||||
"--with-distribution-id=org.nixos"
|
||||
"--with-libclang-path=${llvmPackages.libclang.lib}/lib"
|
||||
"--with-system-ffi"
|
||||
"--with-system-icu"
|
||||
|
@ -429,7 +448,11 @@ buildStdenv.mkDerivation ({
|
|||
cd mozobj
|
||||
'';
|
||||
|
||||
postInstall = lib.optionalString buildStdenv.isLinux ''
|
||||
postInstall = ''
|
||||
# Install distribution customizations
|
||||
install -Dvm644 ${distributionIni} $out/lib/${binaryName}/distribution/distribution.ini
|
||||
|
||||
'' + lib.optionalString buildStdenv.isLinux ''
|
||||
# Remove SDK cruft. FIXME: move to a separate output?
|
||||
rm -rf $out/share/idl $out/include $out/lib/${binaryName}-devel-*
|
||||
|
||||
|
|
|
@ -29,6 +29,7 @@ rec {
|
|||
firefox-esr-91 = buildMozillaMach rec {
|
||||
pname = "firefox-esr";
|
||||
version = "91.9.0esr";
|
||||
applicationName = "Mozilla Firefox ESR";
|
||||
src = fetchurl {
|
||||
url = "mirror://mozilla/firefox/releases/${version}/source/firefox-${version}.source.tar.xz";
|
||||
sha512 = "fd69d489429052013d2c1b8b766a47920ecee62f0688505758f593b27ae66d6343b9107163749406251aedebdf836147e4d562415a811b04d7ab2ae31e32f133";
|
||||
|
|
|
@ -5,6 +5,7 @@ let
|
|||
in
|
||||
(buildMozillaMach rec {
|
||||
pname = "librewolf";
|
||||
applicationName = "LibreWolf";
|
||||
binaryName = "librewolf";
|
||||
version = librewolf-src.packageVersion;
|
||||
src = librewolf-src.firefox;
|
||||
|
|
|
@ -1,17 +1,11 @@
|
|||
{ stdenv, lib, callPackage, fetchurl, fetchpatch, nixosTests }:
|
||||
|
||||
let
|
||||
common = opts: callPackage (import ../../browsers/firefox/common.nix opts) {
|
||||
webrtcSupport = false;
|
||||
geolocationSupport = false;
|
||||
};
|
||||
in
|
||||
{ stdenv, lib, buildMozillaMach, callPackage, fetchurl, fetchpatch, nixosTests }:
|
||||
|
||||
rec {
|
||||
thunderbird = (common rec {
|
||||
thunderbird = (buildMozillaMach rec {
|
||||
pname = "thunderbird";
|
||||
version = "91.9.0";
|
||||
application = "comm/mail";
|
||||
applicationName = "Mozilla Thunderbird";
|
||||
binaryName = pname;
|
||||
src = fetchurl {
|
||||
url = "mirror://mozilla/thunderbird/releases/${version}/source/thunderbird-${version}.source.tar.xz";
|
||||
|
@ -36,6 +30,9 @@ rec {
|
|||
attrPath = "thunderbird-unwrapped";
|
||||
};
|
||||
}).override {
|
||||
geolocationSupport = false;
|
||||
webrtcSupport = false;
|
||||
|
||||
pgoSupport = false; # console.warn: feeds: "downloadFeed: network connection unavailable"
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue