git.iko.soy/typeable/nixpkgs
on master help sign in
nixos/tests/chromium: Allow to override packages.

Of course, this could be done via packageOverrides, but this is more explicit and makes it possible to run the tests with various Chromium overrides. Signed-off-by: aszlig <aszlig@redmoonstudios.org>

commitad87aef2ab46423fca575aa99194bb6192c43a26 authoraszlig <aszlig@redmoonstudios.org> dateWed 19 Nov 2014, 15:48 (12 years ago) parent3a77a2e
1 file changed+13−6
nixos/tests/chromium.nix+13−6
nixos/tests/chromium.nix+13−6
@@ -1,4 +1,12 @@
1−import ./make-test.nix ({ pkgs, ... }: rec {
1+import ./make-test.nix (
2+{ pkgs
3+, channelMap ? {
4+ stable = pkgs.chromium;
5+ beta = pkgs.chromiumBeta;
6+ dev = pkgs.chromiumDev;
7+ }
8+, ...
9+}: rec {
210 name = "chromium";
311
412 machine.imports = [ ./common/x11.nix ];
@@ -116,11 +124,10 @@ import ./make-test.nix ({ pkgs, ... }: rec {
116124 $machine->shutdown;
117125 }
118126
119− for (
120− ["stable", "${pkgs.chromium}"],
121− ["beta", "${pkgs.chromiumBeta}"],
122− ["dev", "${pkgs.chromiumDev}"]
123− ) {
127+ for (${let
128+ mkArray = name: pkg: "[\"${name}\", \"${pkg}\"]";
129+ chanArrays = pkgs.lib.mapAttrsToList mkArray channelMap;
130+ in pkgs.lib.concatStringsSep ", " chanArrays}) {
124131 my ($channel, $pkg) = @$_;
125132 chromiumTest $channel, $pkg, sub {
126133 testNewWin "check sandbox", sub {