diff options
author | aszlig <aszlig@redmoonstudios.org> | 2016-01-15 18:25:16 +0100 |
---|---|---|
committer | aszlig <aszlig@redmoonstudios.org> | 2016-01-16 01:13:02 +0100 |
commit | c4de45b7ca1c129fdf48f713be8aade1b5ab6cc1 (patch) | |
tree | 6bc2a1f68c48e6a43f341de2977230cce4275502 /nixos/tests/quake3.nix | |
parent | 26f221d6b62b24d48f79f22e7f12bb6ff10580da (diff) |
nixos/tests/quake3: Fix eval due to unfree license
Regression introduced by 6b447a3c9bbee41389052d6fa9e08a53d8447656. In this commit the Quake 3 demo data now have a meta attribute which specifies the license as unfreeRedistributable. While I haven't found anything official about that on the web, let's just allow it to be used in the test because first of all, we have been using it for a long time (since 2009, introduced in 497760b) and second, because it will be quite some effort to rewrite the test with something like OpenArena (particularily because we need coverage data and need to use the ioquake3 version plus OpenArena-specific patches). Tested evaluation on my local system, but the VM test still fails. Signed-off-by: aszlig <aszlig@redmoonstudios.org>
Diffstat (limited to 'nixos/tests/quake3.nix')
-rw-r--r-- | nixos/tests/quake3.nix | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/nixos/tests/quake3.nix b/nixos/tests/quake3.nix index d42f7471c8320..81a79b0b3e6de 100644 --- a/nixos/tests/quake3.nix +++ b/nixos/tests/quake3.nix @@ -10,6 +10,13 @@ let }); }; + # Only allow the demo data to be used (only if it's unfreeRedistributable). + unfreePredicate = pkg: with pkgs.lib; let + allowDrvPredicates = [ "quake3-demo" "quake3-pointrelease" ]; + allowLicenses = [ pkgs.lib.licenses.unfreeRedistributable ]; + in any (flip hasPrefix pkg.name) allowDrvPredicates && + elem (pkg.meta.license or null) allowLicenses; + in rec { @@ -28,6 +35,7 @@ rec { hardware.opengl.driSupport = true; environment.systemPackages = [ pkgs.quake3demo ]; nixpkgs.config.packageOverrides = overrides; + nixpkgs.config.allowUnfreePredicate = unfreePredicate; }; nodes = @@ -41,6 +49,7 @@ rec { "'+map q3dm7' '+addbot grunt' '+addbot daemia' 2> /tmp/log"; }; nixpkgs.config.packageOverrides = overrides; + nixpkgs.config.allowUnfreePredicate = unfreePredicate; networking.firewall.allowedUDPPorts = [ 27960 ]; }; |