mesa: use platforms instead of throw

mesaPlatforms can be used in the platforms attr.
This commit is contained in:
Matthew Bauer 2019-05-08 21:46:31 -04:00
parent 4acc434847
commit 9225890537

View file

@ -25,10 +25,6 @@
with stdenv.lib;
if ! elem stdenv.hostPlatform.system platforms.mesaPlatforms then
throw "unsupported platform for Mesa"
else
let
defaultGalliumDrivers =
optionals (elem "drm" eglPlatforms)
@ -273,7 +269,7 @@ let self = stdenv.mkDerivation {
description = "An open source implementation of OpenGL";
homepage = https://www.mesa3d.org/;
license = licenses.mit; # X11 variant, in most files
platforms = platforms.linux ++ platforms.darwin;
platforms = platforms.mesaPlatforms;
maintainers = with maintainers; [ vcunat ];
};
};