chromium: add build flags and system libs
This is lifted from the Arch build recipe: https://git.archlinux.org/svntogit/packages.git/tree/trunk/PKGBUILD?h=packages/chromium using system libjpeg still doesn't work for some reason, otherwise the build runs fine
This commit is contained in:
parent
8dc869e340
commit
bb397093b5
2 changed files with 14 additions and 9 deletions
|
@ -60,7 +60,10 @@ let
|
|||
in attrs: concatStringsSep " " (attrValues (mapAttrs toFlag attrs));
|
||||
|
||||
gnSystemLibraries = [
|
||||
"ffmpeg" "flac" "harfbuzz-ng" "libwebp" "libxslt" "yasm" "snappy" # "libpng" "libjpeg"
|
||||
"flac" "harfbuzz-ng" "libwebp" "libxslt" "yasm" "opus" "snappy" "libpng" "zlib"
|
||||
# "libjpeg" # fails with multiple undefined references to chromium_jpeg_*
|
||||
# "re2" # fails with linker errors
|
||||
# "ffmpeg" # https://crbug.com/731766
|
||||
];
|
||||
|
||||
opusWithCustomModes = libopus.override {
|
||||
|
@ -73,7 +76,7 @@ let
|
|||
libpng libcap
|
||||
xdg_utils yasm minizip libwebp
|
||||
libusb1 re2 zlib
|
||||
ffmpeg harfbuzz libxslt harfbuzz-icu libxml2
|
||||
ffmpeg harfbuzz-icu libxslt libxml2
|
||||
];
|
||||
|
||||
# build paths and release info
|
||||
|
@ -182,9 +185,14 @@ let
|
|||
enable_hotwording = enableHotwording;
|
||||
enable_widevine = enableWideVine;
|
||||
use_cups = cupsSupport;
|
||||
} // {
|
||||
|
||||
treat_warnings_as_errors = false;
|
||||
is_clang = false;
|
||||
clang_use_chrome_plugins = false;
|
||||
remove_webcore_debug_symbols = true;
|
||||
use_gtk3 = true;
|
||||
enable_swiftshader = false;
|
||||
fieldtrial_testing_like_official_build = true;
|
||||
|
||||
# Google API keys, see:
|
||||
# http://www.chromium.org/developers/how-tos/api-keys
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{ newScope, stdenv, makeWrapper, makeDesktopItem, ed
|
||||
, glib, gtk2, gtk3, gnome2, gnome3, gsettings_desktop_schemas
|
||||
, glib, gtk3, gnome3, gsettings_desktop_schemas
|
||||
|
||||
# package customization
|
||||
, channel ? "stable"
|
||||
|
@ -67,9 +67,6 @@ let
|
|||
|
||||
inherit (stdenv.lib) versionAtLeast;
|
||||
|
||||
gtk = if (versionAtLeast version "59.0.0.0") then gtk3 else gtk2;
|
||||
gnome = if (versionAtLeast version "59.0.0.0") then gnome3 else gnome2;
|
||||
|
||||
in stdenv.mkDerivation {
|
||||
name = "chromium${suffix}-${version}";
|
||||
inherit version;
|
||||
|
@ -78,10 +75,10 @@ in stdenv.mkDerivation {
|
|||
makeWrapper ed
|
||||
|
||||
# needed for GSETTINGS_SCHEMAS_PATH
|
||||
gsettings_desktop_schemas glib gtk
|
||||
gsettings_desktop_schemas glib gtk3
|
||||
|
||||
# needed for XDG_ICON_DIRS
|
||||
gnome.defaultIconTheme
|
||||
gnome3.defaultIconTheme
|
||||
];
|
||||
|
||||
outputs = ["out" "sandbox"];
|
||||
|
|
Loading…
Reference in a new issue