summary refs log tree commit diff
path: root/pkgs/development/libraries/mesa
diff options
context:
space:
mode:
authorFrederik Rietdijk <fridh@fridh.nl>2019-06-09 12:26:34 +0200
committerFrederik Rietdijk <fridh@fridh.nl>2019-06-09 12:26:34 +0200
commit480cd436fc077c60e86fccd68d5971dc831f5947 (patch)
tree753dc70f5150fbdc2006df28886325b4e15f6b5b /pkgs/development/libraries/mesa
parent326148ec9bb5e5d93c23e720287f000f76ab2cae (diff)
parentd41c43e4a9e8968b0078dc2279b40b34d5bd9498 (diff)
downloadnixpkgs-480cd436fc077c60e86fccd68d5971dc831f5947.tar
nixpkgs-480cd436fc077c60e86fccd68d5971dc831f5947.tar.gz
nixpkgs-480cd436fc077c60e86fccd68d5971dc831f5947.tar.bz2
nixpkgs-480cd436fc077c60e86fccd68d5971dc831f5947.tar.lz
nixpkgs-480cd436fc077c60e86fccd68d5971dc831f5947.tar.xz
nixpkgs-480cd436fc077c60e86fccd68d5971dc831f5947.tar.zst
nixpkgs-480cd436fc077c60e86fccd68d5971dc831f5947.zip
Merge staging into staging-next
Diffstat (limited to 'pkgs/development/libraries/mesa')
-rw-r--r--pkgs/development/libraries/mesa/default.nix12
1 files changed, 5 insertions, 7 deletions
diff --git a/pkgs/development/libraries/mesa/default.nix b/pkgs/development/libraries/mesa/default.nix
index b1520de4fd6..e68e1b572ee 100644
--- a/pkgs/development/libraries/mesa/default.nix
+++ b/pkgs/development/libraries/mesa/default.nix
@@ -2,7 +2,7 @@
 , pkgconfig, intltool, autoreconfHook
 , file, expat, libdrm, xorg, wayland, wayland-protocols, openssl
 , llvmPackages, libffi, libomxil-bellagio, libva-minimal
-, libelf, libvdpau, valgrind-light, python2, python2Packages
+, libelf, libvdpau, python2, python2Packages
 , libglvnd
 , enableRadv ? true
 , galliumDrivers ? null
@@ -10,6 +10,7 @@
 , vulkanDrivers ? null
 , eglPlatforms ? [ "x11" ] ++ lib.optionals stdenv.isLinux [ "wayland" "drm" ]
 , OpenGL, Xplugin
+, withValgrind ? stdenv.hostPlatform.isLinux && !stdenv.hostPlatform.isAarch32, valgrind-light
 }:
 
 /** Packaging design:
@@ -25,10 +26,6 @@
 
 with stdenv.lib;
 
-if ! elem stdenv.hostPlatform.system platforms.mesaPlatforms then
-  throw "${stdenv.system}: unsupported platform for Mesa"
-else
-
 let
   # platforms that have PCIe slots and thus can use most non-integrated GPUs
   pciePlatform = !stdenv.hostPlatform.isAarch32 && !stdenv.hostPlatform.isAarch64;
@@ -150,7 +147,8 @@ let self = stdenv.mkDerivation {
     libffi libvdpau libelf libXvMC
     libpthreadstubs openssl /*or another sha1 provider*/
   ] ++ lib.optionals (elem "wayland" eglPlatforms) [ wayland wayland-protocols ]
-    ++ lib.optionals stdenv.isLinux [ valgrind-light libomxil-bellagio libva-minimal ];
+    ++ lib.optionals stdenv.isLinux [ libomxil-bellagio libva-minimal ]
+    ++ lib.optional withValgrind valgrind-light;
 
   enableParallelBuilding = true;
   doCheck = false;
@@ -273,7 +271,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 ];
   };
 };