diff options
Diffstat (limited to 'pkgs/applications/networking/browsers/chromium/common.nix')
-rw-r--r-- | pkgs/applications/networking/browsers/chromium/common.nix | 24 |
1 files changed, 19 insertions, 5 deletions
diff --git a/pkgs/applications/networking/browsers/chromium/common.nix b/pkgs/applications/networking/browsers/chromium/common.nix index 0840fd079e7c7..8375408c00db1 100644 --- a/pkgs/applications/networking/browsers/chromium/common.nix +++ b/pkgs/applications/networking/browsers/chromium/common.nix @@ -36,6 +36,7 @@ , curl , libffi , libepoxy +, libevdev # postPatch: , glibc # gconv + locale # postFixup: @@ -55,7 +56,7 @@ buildFun: let - python3WithPackages = python3.withPackages(ps: with ps; [ + python3WithPackages = python3.pythonForBuild.withPackages(ps: with ps; [ ply jinja2 setuptools ]); clangFormatPython3 = fetchurl { @@ -129,6 +130,7 @@ let python3WithPackages perl which llvmPackages.bintools + bison gperf ]; buildInputs = [ @@ -142,7 +144,7 @@ let nasm nspr nss util-linux alsa-lib - bison gperf libkrb5 + libkrb5 glib gtk3 dbus-glib libXScrnSaver libXcursor libXtst libxshmfence libGLU libGL mesa # required for libgbm @@ -153,6 +155,7 @@ let curl libepoxy libffi + libevdev ] ++ lib.optional systemdSupport systemd ++ lib.optionals cupsSupport [ libgcrypt cups ] ++ lib.optional pulseSupport libpulseaudio; @@ -166,6 +169,13 @@ let # (we currently package 1.26 in Nixpkgs while Chromium bundles 1.21): # Source: https://bugs.chromium.org/p/angleproject/issues/detail?id=7582#c1 ./patches/angle-wayland-include-protocol.patch + # We need to revert this patch to build M114+ with LLVM 16: + (githubPatch { + # Reland [clang] Disable autoupgrading debug info in ThinLTO builds + commit = "54969766fd2029c506befc46e9ce14d67c7ed02a"; + sha256 = "sha256-Vryjg8kyn3cxWg3PmSwYRG6zrHOqYWBMSdEMGiaPg6M="; + revert = true; + }) ]; postPatch = '' @@ -314,7 +324,7 @@ let # This is to ensure expansion of $out. libExecPath="${libExecPath}" - ${python3}/bin/python3 build/linux/unbundle/replace_gn_files.py --system-libraries ${toString gnSystemLibraries} + ${python3.pythonForBuild}/bin/python3 build/linux/unbundle/replace_gn_files.py --system-libraries ${toString gnSystemLibraries} ${gnChromium}/bin/gn gen --args=${lib.escapeShellArg gnFlags} out/Release | tee gn-gen-outputs.txt # Fail if `gn gen` contains a WARNING. @@ -330,7 +340,7 @@ let buildPhase = let buildCommand = target: '' - ninja -C "${buildPath}" -j$NIX_BUILD_CORES "${target}" + TERM=dumb ninja -C "${buildPath}" -j$NIX_BUILD_CORES "${target}" ( source chrome/installer/linux/common/installer.include PACKAGE=$packageName @@ -340,7 +350,11 @@ let ''; targets = extraAttrs.buildTargets or []; commands = map buildCommand targets; - in lib.concatStringsSep "\n" commands; + in '' + runHook preBuild + ${lib.concatStringsSep "\n" commands} + runHook postBuild + ''; postFixup = '' # Make sure that libGLESv2 and libvulkan are found by dlopen. |