From 06dfa19b992ce0f7fc1a2e4839a62abebf415879 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Sat, 28 Feb 2015 13:49:25 +0100 Subject: [PATCH] nvidia-x11: Use GTK 2 Otherwise we end up with multiple versions of GTK in the system closure. Also, GTK 3 is not well integrated in NixOS yet (e.g. it doesn't respect KDE's colour scheme). --- pkgs/os-specific/linux/nvidia-x11/builder.sh | 10 +++++----- pkgs/os-specific/linux/nvidia-x11/default.nix | 7 +++---- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/pkgs/os-specific/linux/nvidia-x11/builder.sh b/pkgs/os-specific/linux/nvidia-x11/builder.sh index 2b651841c48..5edadeda81b 100755 --- a/pkgs/os-specific/linux/nvidia-x11/builder.sh +++ b/pkgs/os-specific/linux/nvidia-x11/builder.sh @@ -68,7 +68,6 @@ installPhase() { #patchelf --set-rpath $cudaPath $out/lib/libcuda.so.*.* #patchelf --set-rpath $openclPath $out/lib/libnvidia-opencl.so.*.* - if test -z "$libsOnly"; then # Install headers and /share files etc. mkdir -p $out/include/nvidia @@ -99,15 +98,16 @@ installPhase() { --set-rpath $out/lib:$programPath:$glPath $out/bin/$i done - patchelf --set-rpath $glPath:$gtk3Path $out/lib/libnvidia-gtk3.so.*.* + patchelf --set-rpath $glPath:$gtkPath $out/lib/libnvidia-gtk2.so.*.* # Test a bit. $out/bin/nvidia-settings --version else - rm $out/lib/libnvidia-gtk3.* + rm $out/lib/libnvidia-gtk2.* fi - # for simplicity and dependency reduction, don't support the gtk2 interface - rm $out/lib/libnvidia-gtk2.* + + # For simplicity and dependency reduction, don't support the gtk3 interface. + rm $out/lib/libnvidia-gtk3.* } diff --git a/pkgs/os-specific/linux/nvidia-x11/default.nix b/pkgs/os-specific/linux/nvidia-x11/default.nix index e207df67185..02731d7f775 100644 --- a/pkgs/os-specific/linux/nvidia-x11/default.nix +++ b/pkgs/os-specific/linux/nvidia-x11/default.nix @@ -1,5 +1,5 @@ { stdenv, fetchurl, kernel ? null, xlibs, zlib, perl -, gtk3, atk, pango, glib, gdk_pixbuf, cairo +, gtk, atk, pango, glib, gdk_pixbuf, cairo , # Whether to build the libraries only (i.e. not the kernel module or # nvidia-settings). Used to support 32-bit binaries on 64-bit # Linux. @@ -48,9 +48,8 @@ stdenv.mkDerivation { openclPath = makeLibraryPath [zlib]; allLibPath = makeLibraryPath [xlibs.libXext xlibs.libX11 xlibs.libXrandr zlib stdenv.cc.cc]; - # we don't support the gtk2 version - gtk3Path = optionalString (!libsOnly) (makeLibraryPath - [ gtk3 atk pango glib gdk_pixbuf cairo ] ); + gtkPath = optionalString (!libsOnly) (makeLibraryPath + [ gtk atk pango glib gdk_pixbuf cairo ] ); programPath = makeLibraryPath [ xlibs.libXv ]; buildInputs = [ perl ];