From ea4afb73d89742accd61508d06a01e2dd95b0729 Mon Sep 17 00:00:00 2001 From: aszlig Date: Fri, 21 Jun 2013 06:25:00 +0200 Subject: [PATCH] synergy: Add support for XrandR. Nowadays, multiple monitor setups are quite common, so I suppose we'd want support for that. Especially because users might get confused if synergy is unable to pick the right screen resolution and thus cause edges to be cut off from the available pointing area. The postPatch hook is to force cmake into thinking that we have XRRNotifyEvent, which we _do_ have with the xrandr version shipped in nixpkgs. Automatic detection from CMakeLists.txt fails here because it tries to search for the symbol within the libX11 store path. Signed-off-by: aszlig --- pkgs/applications/misc/synergy/default.nix | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/misc/synergy/default.nix b/pkgs/applications/misc/synergy/default.nix index d650f964c2b..56bf876147b 100644 --- a/pkgs/applications/misc/synergy/default.nix +++ b/pkgs/applications/misc/synergy/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, cmake, x11, libX11, libXi, libXtst, cryptopp }: +{ stdenv, fetchurl, cmake, x11, libX11, libXi, libXtst, libXrandr, cryptopp }: stdenv.mkDerivation rec { name = "synergy-1.4.12"; @@ -10,7 +10,12 @@ stdenv.mkDerivation rec { patches = [ ./cryptopp.patch ]; - buildInputs = [ cmake x11 libX11 libXi libXtst cryptopp ]; + postPatch = '' + sed -i -e '/HAVE_X11_EXTENSIONS_XRANDR_H/c \ + set(HAVE_X11_EXTENSIONS_XRANDR_H true)' CMakeLists.txt + ''; + + buildInputs = [ cmake x11 libX11 libXi libXtst libXrandr cryptopp ]; # At this moment make install doesn't work for synergy # http://synergy-foss.org/spit/issues/details/3317/