From a179998a0609adb6bd92cfc5d5f4324b99ce2871 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Thu, 12 May 2022 15:16:44 +0200 Subject: [PATCH] buildMozillaMach: Update native python env var With Firefox 100.0 the following deprecation warning comes up: > The "MACH_USE_SYSTEM_PYTHON" environment variable is deprecated, > please unset it or replace it with either > "MACH_BUILD_PYTHON_NATIVE_PACKAGE_SOURCE=system" or > "MACH_BUILD_PYTHON_NATIVE_PACKAGE_SOURCE=none" And since we want to continue using our own python we're going for the system value when the version is at least 100.0. --- .../networking/browsers/firefox/common.nix | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/networking/browsers/firefox/common.nix b/pkgs/applications/networking/browsers/firefox/common.nix index 5fda096ee1d..25eb34c95e8 100644 --- a/pkgs/applications/networking/browsers/firefox/common.nix +++ b/pkgs/applications/networking/browsers/firefox/common.nix @@ -238,13 +238,17 @@ buildStdenv.mkDerivation ({ # Set consistent remoting name to ensure wmclass matches with desktop file export MOZ_APP_REMOTINGNAME="${binaryName}" - # Use our own python - export MACH_USE_SYSTEM_PYTHON=1 - # AS=as in the environment causes build failure # https://bugzilla.mozilla.org/show_bug.cgi?id=1497286 unset AS + '' + lib.optionalString (lib.versionAtLeast version "100.0") '' + # Use our own python + export MACH_BUILD_PYTHON_NATIVE_PACKAGE_SOURCE=system + '' + lib.optionalString (lib.versionOlder version "100.0") '' + # Use our own python + export MACH_USE_SYSTEM_PYTHON=1 + '' + lib.optionalString (lib.versionAtLeast version "95.0") '' # RBox WASM Sandboxing export WASM_CC=${pkgsCross.wasi32.stdenv.cc}/bin/${pkgsCross.wasi32.stdenv.cc.targetPrefix}cc