chromiumBeta: Fix the build

This change (dynamically linking against libffi from Nixpkgs) is
required since we switched to third_party/wayland instead of linking
against Wayland from Nixpkgs (26aadca7c6). See also f9d9864cb6 and
d932886d6e for more details.

We could alternatively provide libffi_pic.a for static linking but due
to our immutable dependency model / pure builds the dynamic linking
shouldn't cause any issues.

This fixes the build error shown in [0].

[0]: https://github.com/NixOS/nixpkgs/issues/213862#issuecomment-1412519998
This commit is contained in:
Michael Weiss
2023-02-06 23:04:04 +01:00
parent 55116a49b6
commit 06eb99ffa2
@@ -34,6 +34,7 @@
, libva
, libdrm, wayland, libxkbcommon # Ozone
, curl
, libffi
, libepoxy
# postPatch:
, glibc # gconv + locale
@@ -151,7 +152,8 @@ let
libepoxy
] ++ lib.optional systemdSupport systemd
++ lib.optionals cupsSupport [ libgcrypt cups ]
++ lib.optional pulseSupport libpulseaudio;
++ lib.optional pulseSupport libpulseaudio
++ lib.optional (chromiumVersionAtLeast "110") libffi;
patches = [
# Optional patch to use SOURCE_DATE_EPOCH in compute_build_timestamp.py (should be upstreamed):
@@ -299,6 +301,10 @@ let
use_system_libwayland = true;
# The default value is hardcoded instead of using pkg-config:
system_wayland_scanner_path = "${wayland.bin}/bin/wayland-scanner";
} // lib.optionalAttrs (chromiumVersionAtLeast "110") {
# To fix the build as we don't provide libffi_pic.a
# (ld.lld: error: unable to find library -l:libffi_pic.a):
use_system_libffi = true;
} // lib.optionalAttrs proprietaryCodecs {
# enable support for the H.264 codec
proprietary_codecs = true;