1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-01-22 14:45:27 +00:00

chromium: Use system libraries whenever possible.

There are still some libraries left, which we either need to patch or provide
more recent versions. Plus we're going to use openssl, as libnss doesn't want to
do proper SSL (let's debug this later).
This commit is contained in:
aszlig 2012-06-19 06:56:50 +02:00 committed by Eelco Dolstra
parent 6350706c0d
commit 22f5045bde

View file

@ -1,6 +1,14 @@
{ stdenv, fetchurl, fetchsvn, makeWrapper, which { stdenv, fetchurl, fetchsvn, makeWrapper, which
# default dependencies
, bzip2, ffmpeg, flac #, harfbuzz
, icu, libevent, expat, libjpeg
, libpng, libwebp, libxml2, libxslt #, skia
, speex, sqlite, openssl #, stlport
, v8, xdg_utils, yasm, zlib
, python, perl, pkgconfig , python, perl, pkgconfig
, nspr, nss, udev, bzip2 , nspr, udev
, utillinux, alsaLib , utillinux, alsaLib
, gcc, bison, gperf , gcc, bison, gperf
, krb5 , krb5
@ -24,6 +32,37 @@ let
toFlag = key: value: "-D${key}=${sanitize value}"; toFlag = key: value: "-D${key}=${sanitize value}";
in attrs: concatStringsSep " " (attrValues (mapAttrs toFlag attrs)); in attrs: concatStringsSep " " (attrValues (mapAttrs toFlag attrs));
gypFlagsUseSystemLibs = {
use_system_bzip2 = true;
use_system_ffmpeg = false; # FIXME: libavformat...
use_system_flac = true;
use_system_harfbuzz = false; # TODO
use_system_icu = false; # FIXME: wrong version!
use_system_libevent = true;
use_system_libexpat = true;
use_system_libjpeg = true;
use_system_libpng = true;
use_system_libwebp = false; # See chromium issue #133161
use_system_libxml = true;
use_system_skia = false; # TODO
use_system_speex = true;
use_system_sqlite = false; # FIXME
use_system_ssl = true;
use_system_stlport = true;
use_system_v8 = false; # TODO...
use_system_xdg_utils = true;
use_system_yasm = true;
use_system_zlib = true;
};
defaultDependencies = [
bzip2 ffmpeg flac # harfbuzz
icu libevent expat libjpeg
libpng libwebp libxml2 libxslt # skia
speex sqlite openssl # stlport
v8 xdg_utils yasm zlib
];
in stdenv.mkDerivation rec { in stdenv.mkDerivation rec {
name = "chromium-${version}"; name = "chromium-${version}";
@ -34,10 +73,10 @@ in stdenv.mkDerivation rec {
sha256 = sourceInfo.sha256; sha256 = sourceInfo.sha256;
}; };
buildInputs = [ buildInputs = defaultDependencies ++ [
which makeWrapper which makeWrapper
python perl pkgconfig python perl pkgconfig
nspr nss udev bzip2 nspr udev
utillinux alsaLib utillinux alsaLib
gcc bison gperf gcc bison gperf
krb5 krb5
@ -49,12 +88,13 @@ in stdenv.mkDerivation rec {
patches = stdenv.lib.optional (!useSELinux) ./enable_seccomp.patch; patches = stdenv.lib.optional (!useSELinux) ./enable_seccomp.patch;
gypFlags = mkGypFlags ({ gypFlags = mkGypFlags (gypFlagsUseSystemLibs // {
linux_use_gold_binary = false; linux_use_gold_binary = false;
linux_use_gold_flags = false; linux_use_gold_flags = false;
proprietary_codecs = false; proprietary_codecs = false;
use_gnome_keyring = gnomeKeyringSupport; use_gnome_keyring = gnomeKeyringSupport;
disable_nacl = !naclSupport; disable_nacl = !naclSupport;
use_openssl = true;
selinux = useSELinux; selinux = useSELinux;
use_cups = false; use_cups = false;
} // stdenv.lib.optionalAttrs (stdenv.system == "x86_64-linux") { } // stdenv.lib.optionalAttrs (stdenv.system == "x86_64-linux") {
@ -65,29 +105,6 @@ in stdenv.mkDerivation rec {
buildType = "Release"; buildType = "Release";
/* TODO:
use_system_bzip2 = true;
use_system_ffmpeg = true;
use_system_flac = true;
use_system_harfbuzz = true;
use_system_icu = true;
use_system_libevent = true;
use_system_libexpat = true;
use_system_libjpeg = true;
use_system_libpng = true;
use_system_libwebp = true;
use_system_libxml = true;
use_system_skia = true;
use_system_speex = true;
use_system_sqlite = true;
use_system_ssl = true;
use_system_stlport = true;
use_system_v8 = true;
use_system_xdg_utils = true;
use_system_yasm = true;
use_system_zlib = true;
*/
configurePhase = '' configurePhase = ''
python build/gyp_chromium --depth "$(pwd)" ${gypFlags} python build/gyp_chromium --depth "$(pwd)" ${gypFlags}
''; '';