3
0
Fork 0
forked from mirrors/nixpkgs

nixos/tests/quake3: Fix evaluation error

In c814d72b51, a bunch of packages were
changed to use the pname attribute, among them were the quake3-demodata
and quake3-pointrelease which we use for the quake3 test.

Fortunately, having pname available means that we no longer need to
match using a prefix, so fixing this eval error also simplifies our
matching.

I directly pushed this to master because the change is non-controversial
and we can't break things that are already broken :-)

Signed-off-by: aszlig <aszlig@nix.build>
This commit is contained in:
aszlig 2019-09-05 06:56:24 +02:00
parent 5e86891baa
commit 601bed3849
No known key found for this signature in database
GPG key ID: 684089CE67EBB691

View file

@ -12,9 +12,9 @@ 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" ];
allowPackageNames = [ "quake3-demodata" "quake3-pointrelease" ];
allowLicenses = [ pkgs.lib.licenses.unfreeRedistributable ];
in any (flip hasPrefix pkg.name) allowDrvPredicates &&
in elem pkg.pname allowPackageNames &&
elem (pkg.meta.license or null) allowLicenses;
in