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

authored by Herwig Hochleitner and committed by Robin Gloster bb397093 8dc869e3

+14 -9
+11 -3
pkgs/applications/networking/browsers/chromium/common.nix
··· 60 in attrs: concatStringsSep " " (attrValues (mapAttrs toFlag attrs)); 61 62 gnSystemLibraries = [ 63 - "ffmpeg" "flac" "harfbuzz-ng" "libwebp" "libxslt" "yasm" "snappy" # "libpng" "libjpeg" 64 ]; 65 66 opusWithCustomModes = libopus.override { ··· 73 libpng libcap 74 xdg_utils yasm minizip libwebp 75 libusb1 re2 zlib 76 - ffmpeg harfbuzz libxslt harfbuzz-icu libxml2 77 ]; 78 79 # build paths and release info ··· 182 enable_hotwording = enableHotwording; 183 enable_widevine = enableWideVine; 184 use_cups = cupsSupport; 185 - } // { 186 treat_warnings_as_errors = false; 187 is_clang = false; 188 189 # Google API keys, see: 190 # http://www.chromium.org/developers/how-tos/api-keys
··· 60 in attrs: concatStringsSep " " (attrValues (mapAttrs toFlag attrs)); 61 62 gnSystemLibraries = [ 63 + "flac" "harfbuzz-ng" "libwebp" "libxslt" "yasm" "opus" "snappy" "libpng" "zlib" 64 + # "libjpeg" # fails with multiple undefined references to chromium_jpeg_* 65 + # "re2" # fails with linker errors 66 + # "ffmpeg" # https://crbug.com/731766 67 ]; 68 69 opusWithCustomModes = libopus.override { ··· 76 libpng libcap 77 xdg_utils yasm minizip libwebp 78 libusb1 re2 zlib 79 + ffmpeg harfbuzz-icu libxslt libxml2 80 ]; 81 82 # build paths and release info ··· 185 enable_hotwording = enableHotwording; 186 enable_widevine = enableWideVine; 187 use_cups = cupsSupport; 188 + 189 treat_warnings_as_errors = false; 190 is_clang = false; 191 + clang_use_chrome_plugins = false; 192 + remove_webcore_debug_symbols = true; 193 + use_gtk3 = true; 194 + enable_swiftshader = false; 195 + fieldtrial_testing_like_official_build = true; 196 197 # Google API keys, see: 198 # http://www.chromium.org/developers/how-tos/api-keys
+3 -6
pkgs/applications/networking/browsers/chromium/default.nix
··· 1 { newScope, stdenv, makeWrapper, makeDesktopItem, ed 2 - , glib, gtk2, gtk3, gnome2, gnome3, gsettings_desktop_schemas 3 4 # package customization 5 , channel ? "stable" ··· 67 68 inherit (stdenv.lib) versionAtLeast; 69 70 - gtk = if (versionAtLeast version "59.0.0.0") then gtk3 else gtk2; 71 - gnome = if (versionAtLeast version "59.0.0.0") then gnome3 else gnome2; 72 - 73 in stdenv.mkDerivation { 74 name = "chromium${suffix}-${version}"; 75 inherit version; ··· 78 makeWrapper ed 79 80 # needed for GSETTINGS_SCHEMAS_PATH 81 - gsettings_desktop_schemas glib gtk 82 83 # needed for XDG_ICON_DIRS 84 - gnome.defaultIconTheme 85 ]; 86 87 outputs = ["out" "sandbox"];
··· 1 { newScope, stdenv, makeWrapper, makeDesktopItem, ed 2 + , glib, gtk3, gnome3, gsettings_desktop_schemas 3 4 # package customization 5 , channel ? "stable" ··· 67 68 inherit (stdenv.lib) versionAtLeast; 69 70 in stdenv.mkDerivation { 71 name = "chromium${suffix}-${version}"; 72 inherit version; ··· 75 makeWrapper ed 76 77 # needed for GSETTINGS_SCHEMAS_PATH 78 + gsettings_desktop_schemas glib gtk3 79 80 # needed for XDG_ICON_DIRS 81 + gnome3.defaultIconTheme 82 ]; 83 84 outputs = ["out" "sandbox"];