Skip to content

Commit

Permalink
chromiumBeta: Fix the build
Browse files Browse the repository at this point in the history
This change (dynamically linking against libffi from Nixpkgs) is
required since we switched to third_party/wayland instead of linking
against Wayland from Nixpkgs (26aadca). See also f9d9864 and
d932886 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]: NixOS#213862 (comment)
  • Loading branch information
primeos authored and gador committed Feb 13, 2023
1 parent 43cb442 commit b1f45f1
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion pkgs/applications/networking/browsers/chromium/common.nix
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
, libva
, libdrm, wayland, libxkbcommon # Ozone
, curl
, libffi
, libepoxy
# postPatch:
, glibc # gconv + locale
Expand Down Expand Up @@ -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):
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit b1f45f1

Please sign in to comment.