nvidia-x11.settings: add librsvg for gtk3

This commit is contained in:
Nikolay Amiantov 2017-02-19 19:44:53 +03:00
parent 505d7bea3a
commit f6eedf0867

View File

@ -1,6 +1,7 @@
nvidia_x11: sha256:
{ stdenv, lib, fetchurl, pkgconfig, m4, jansson, gtk2, gtk3, libXv, libXrandr, libvdpau
, librsvg, wrapGAppsHook
, withGtk2 ? false, withGtk3 ? true
}:
@ -15,7 +16,8 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ pkgconfig m4 ];
buildInputs = [ jansson gtk2 gtk3 libXv libXrandr libvdpau nvidia_x11 ];
buildInputs = [ jansson libXv libXrandr libvdpau nvidia_x11 gtk2 ]
++ lib.optionals withGtk3 [ gtk3 librsvg wrapGAppsHook ];
NIX_LDFLAGS = [ "-lvdpau" "-lXrandr" "-lXv" "-lnvidia-ml" ];
@ -39,9 +41,11 @@ stdenv.mkDerivation rec {
''}
'';
binaryName = if withGtk3 then ".nvidia-settings-wrapped" else "nvidia-settings";
postFixup = ''
patchelf --set-rpath "$(patchelf --print-rpath $out/bin/nvidia-settings):$out/lib" \
$out/bin/nvidia-settings
patchelf --set-rpath "$(patchelf --print-rpath $out/bin/$binaryName):$out/lib" \
$out/bin/$binaryName
'';
meta = with stdenv.lib; {