chromium: Allow package override on channels.

This allows for more flexible overrides instead of just passing a custom
configuration attrset like:

chromium.override { config.chromium.channel = "beta"; }

So you can now simply do:

chromium.override { channel = "beta"; }

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
This commit is contained in:
aszlig
2012-12-03 17:55:09 +01:00
parent e504299f94
commit caabb8ee47

View File

@@ -21,6 +21,8 @@
, nss, openssl # config.openssl
, pulseaudio # config.pulseaudio
, libselinux # config.selinux
, channel ? "stable"
}:
with stdenv.lib;
@@ -29,7 +31,6 @@ let
mkConfigurable = mapAttrs (flag: default: attrByPath ["chromium" flag] default config);
cfg = mkConfigurable {
channel = "stable";
selinux = false;
nacl = false;
openssl = false;
@@ -40,7 +41,7 @@ let
pulseaudio = config.pulseaudio or true;
};
sourceInfo = builtins.getAttr cfg.channel (import ./sources.nix);
sourceInfo = builtins.getAttr channel (import ./sources.nix);
mkGypFlags =
let