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