3
0
Fork 0
forked from mirrors/nixpkgs

chromium: Simplify names of getConfig options.

This makes it easier to remember, as so far the naming wasn't quite consistent,
sometimes "use*", sometimes "enable*". So in using just use the feature name
itself, it should be pretty clear.
This commit is contained in:
aszlig 2012-06-20 11:33:36 +02:00 committed by Eelco Dolstra
parent fc24f460f1
commit a2984e3d82

View file

@ -14,24 +14,24 @@
, libXScrnSaver, libXcursor, mesa , libXScrnSaver, libXcursor, mesa
# optional dependencies # optional dependencies
, libgnome_keyring # gnomeKeyringSupport , libgnome_keyring # config.gnomeKeyring
, gconf # enableGnomeSupport , gconf # config.gnome
, libgcrypt # enableGnomeSupport || enableCUPS , libgcrypt # config.gnome || config.cups
, nss, openssl # useOpenSSL , nss, openssl # config.openssl
, libselinux # useSELinux , libselinux # config.selinux
}: }:
let let
mkConfigurable = stdenv.lib.mapAttrs (flag: default: getConfig ["chromium" flag] default); mkConfigurable = stdenv.lib.mapAttrs (flag: default: getConfig ["chromium" flag] default);
config = mkConfigurable { config = mkConfigurable {
useSELinux = false; selinux = false;
naclSupport = false; nacl = false;
useOpenSSL = true; openssl = true;
enableGnomeSupport = false; gnome = false;
gnomeKeyringSupport = false; gnomeKeyring = false;
useProprietaryCodecs = true; proprietaryCodecs = true;
enableCUPS = false; cups = false;
}; };
sourceInfo = import ./source.nix; sourceInfo = import ./source.nix;
@ -89,25 +89,25 @@ in stdenv.mkDerivation rec {
which makeWrapper which makeWrapper
python perl pkgconfig python perl pkgconfig
nspr udev nspr udev
(if config.useOpenSSL then openssl else nss) (if config.openssl then openssl else nss)
utillinux alsaLib utillinux alsaLib
gcc bison gperf gcc bison gperf
krb5 krb5
glib gtk dbus_glib glib gtk dbus_glib
libXScrnSaver libXcursor mesa libXScrnSaver libXcursor mesa
] ++ stdenv.lib.optional config.gnomeKeyringSupport libgnome_keyring ] ++ stdenv.lib.optional config.gnomeKeyring libgnome_keyring
++ stdenv.lib.optionals config.enableGnomeSupport [ gconf libgcrypt ] ++ stdenv.lib.optionals config.gnome [ gconf libgcrypt ]
++ stdenv.lib.optional config.useSELinux libselinux ++ stdenv.lib.optional config.selinux libselinux
++ stdenv.lib.optional config.enableCUPS libgcrypt; ++ stdenv.lib.optional config.cups libgcrypt;
opensslPatches = stdenv.lib.optional config.useOpenSSL openssl.patches; opensslPatches = stdenv.lib.optional config.openssl openssl.patches;
prePatch = "patchShebangs ."; prePatch = "patchShebangs .";
patches = stdenv.lib.optional (!config.useSELinux) ./enable_seccomp.patch patches = stdenv.lib.optional (!config.selinux) ./enable_seccomp.patch
++ stdenv.lib.optional config.enableCUPS ./cups_allow_deprecated.patch; ++ stdenv.lib.optional config.cups ./cups_allow_deprecated.patch;
postPatch = stdenv.lib.optionalString config.useOpenSSL '' postPatch = stdenv.lib.optionalString config.openssl ''
cat $opensslPatches | patch -p1 -d third_party/openssl/openssl cat $opensslPatches | patch -p1 -d third_party/openssl/openssl
''; '';
@ -115,14 +115,14 @@ in stdenv.mkDerivation rec {
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 = config.gnomeKeyringSupport; use_gnome_keyring = config.gnomeKeyring;
use_gconf = config.enableGnomeSupport; use_gconf = config.gnome;
use_gio = config.enableGnomeSupport; use_gio = config.gnome;
disable_nacl = !config.naclSupport; disable_nacl = !config.nacl;
use_openssl = config.useOpenSSL; use_openssl = config.openssl;
selinux = config.useSELinux; selinux = config.selinux;
use_cups = config.enableCUPS; use_cups = config.cups;
} // stdenv.lib.optionalAttrs config.useProprietaryCodecs { } // stdenv.lib.optionalAttrs config.proprietaryCodecs {
# enable support for the H.264 codec # enable support for the H.264 codec
proprietary_codecs = true; proprietary_codecs = true;
ffmpeg_branding = "Chrome"; ffmpeg_branding = "Chrome";