diff --git a/pkgs/development/libraries/mesa/default.nix b/pkgs/development/libraries/mesa/default.nix index 558291f5327..cbe52ae0e37 100644 --- a/pkgs/development/libraries/mesa/default.nix +++ b/pkgs/development/libraries/mesa/default.nix @@ -1,6 +1,6 @@ { stdenv, fetchurl, pkgconfig, x11, xlibs, libdrm, expat }: -if stdenv.system != "i686-linux" && stdenv.system != "x86_64-linux" && stdenv.system != "i686-darwin" && stdenv.system != "i686-freebsd" then +if ! stdenv.lib.lists.elem stdenv.system stdenv.lib.platforms.mesaPlatforms then throw "unsupported platform for Mesa" else diff --git a/pkgs/lib/platforms.nix b/pkgs/lib/platforms.nix index 5174476f954..6cf9d954584 100644 --- a/pkgs/lib/platforms.nix +++ b/pkgs/lib/platforms.nix @@ -11,5 +11,5 @@ rec { unix = linux ++ darwin ++ freebsd ++ openbsd; all = linux ++ darwin ++ cygwin ++ freebsd ++ openbsd; allBut = platform: lists.filter (x: platform != x) all; - mesaPlatforms = linux; + mesaPlatforms = allBut [openbsd netbsd cygwin]; }