about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--nixpkgs/pkgs/development/libraries/mesa/default.nix13
1 files changed, 7 insertions, 6 deletions
diff --git a/nixpkgs/pkgs/development/libraries/mesa/default.nix b/nixpkgs/pkgs/development/libraries/mesa/default.nix
index 5c17901faaed..6c11a0c3ab1c 100644
--- a/nixpkgs/pkgs/development/libraries/mesa/default.nix
+++ b/nixpkgs/pkgs/development/libraries/mesa/default.nix
@@ -3,7 +3,6 @@
 , file, expat, zlib, xorg, wayland, wayland-protocols, openssl
 , libffi
 , valgrind-light, python2, python2Packages
-, libglvnd
 , enableRadv ? stdenv.isLinux
 , galliumDrivers ? null
 , driDrivers ? null
@@ -17,6 +16,7 @@
 , libdrmSupport ? stdenv.isLinux, libdrm
 , libelfSupport ? stdenv.isLinux, libelf
 , llvmSupport ? true, llvmPackages
+, libglvndSupport ? true, libglvnd
 
 , OpenGL, Xplugin
 }:
@@ -161,7 +161,7 @@ let self = stdenv.mkDerivation {
     # Direct3D in Wine
     (enableFeature (any (d: d != "swrast") galliumDrivers) "nine")
 
-    "--enable-libglvnd"
+    (enableFeature libglvndSupport "libglvnd")
     "--enable-dri"
     "--enable-driglx-direct"
     "--enable-gles1"
@@ -202,7 +202,8 @@ let self = stdenv.mkDerivation {
     ++ optional libdrmSupport libdrm
     ++ optionals stdenv.isDarwin [ OpenGL Xplugin ];
 
-  buildInputs = [ expat zlib libglvnd ]
+  buildInputs = [ expat zlib ]
+    ++ optional libglvndSupport libglvnd
     ++ optional llvmSupport llvmPackages.llvm
     ++ optional libelfSupport libelf
     ++ optionals (elem "wayland" eglPlatforms) [ wayland wayland-protocols ]
@@ -233,9 +234,6 @@ let self = stdenv.mkDerivation {
     # Some installs don't have any drivers so this directory is never created.
     mkdir -p $drivers
   '' + optionalString (galliumDrivers != []) ''
-    # Move other drivers to a separate output
-    mv $out/lib/lib*_mesa* $drivers/lib
-
     # move libOSMesa to $osmesa, as it's relatively big
     mkdir -p {$osmesa,$drivers}/lib/
     mv -t $osmesa/lib/ $out/lib/libOSMesa*
@@ -278,6 +276,9 @@ let self = stdenv.mkDerivation {
   '' + optionalString (vulkanDrivers != []) ''
     # move gallium-related stuff to $drivers, so $out doesn't depend on LLVM
     mv $out/lib/libvulkan_* $drivers/lib
+  '' + optionalString libglvndSupport ''
+    # Move other drivers to a separate output
+    mv $out/lib/lib*_mesa* $drivers/lib
   '';
 
   # TODO: