summary refs log tree commit diff
path: root/pkgs/applications/misc/synergy
diff options
context:
space:
mode:
authoraszlig <aszlig@redmoonstudios.org>2013-06-21 13:16:30 +0200
committeraszlig <aszlig@redmoonstudios.org>2013-06-21 13:21:43 +0200
commitcfd284443e9899ace5a442eff53b490e6018287c (patch)
treedce60327b1ec05c78adab0d2d38f882334530407 /pkgs/applications/misc/synergy
parent467962b1857609e08f97bc53837a2b9894af8a18 (diff)
downloadnixlib-cfd284443e9899ace5a442eff53b490e6018287c.tar
nixlib-cfd284443e9899ace5a442eff53b490e6018287c.tar.gz
nixlib-cfd284443e9899ace5a442eff53b490e6018287c.tar.bz2
nixlib-cfd284443e9899ace5a442eff53b490e6018287c.tar.lz
nixlib-cfd284443e9899ace5a442eff53b490e6018287c.tar.xz
nixlib-cfd284443e9899ace5a442eff53b490e6018287c.tar.zst
nixlib-cfd284443e9899ace5a442eff53b490e6018287c.zip
synergy: Use bundled crypto++ on non-Linux archs.
Seems that crypto++ in nixpkgs doesn't build on Darwin, so let's use bundled
crypto++ until the version in nixpkgs works well.

This refers to the following build:

http://hydra.nixos.org/build/5404516

Hopefully, this will fix it on Mac OS X, because I don't have a Darwin machine
for testing.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
Diffstat (limited to 'pkgs/applications/misc/synergy')
-rw-r--r--pkgs/applications/misc/synergy/default.nix18
1 files changed, 12 insertions, 6 deletions
diff --git a/pkgs/applications/misc/synergy/default.nix b/pkgs/applications/misc/synergy/default.nix
index 46850d6763cf..b283c0610293 100644
--- a/pkgs/applications/misc/synergy/default.nix
+++ b/pkgs/applications/misc/synergy/default.nix
@@ -1,5 +1,9 @@
 { stdenv, fetchurl, cmake, x11, libX11, libXi, libXtst, libXrandr, xinput
-, cryptopp }:
+, cryptopp, unzip ? null }:
+
+assert !stdenv.isLinux -> unzip != null;
+
+with stdenv.lib;
 
 stdenv.mkDerivation rec {
   name = "synergy-1.4.12";
@@ -9,11 +13,13 @@ stdenv.mkDerivation rec {
   	sha256 = "0j884skwqy8r8ckj9a4rlwsbjwb1yrj9wqma1nwhr2inff6hrdim";
   };
 
-  patches = [ ./cryptopp.patch ];
+  patches = optional stdenv.isLinux ./cryptopp.patch;
 
-  postPatch = ''
+  postPatch = if stdenv.isLinux then ''
     sed -i -e '/HAVE_X11_EXTENSIONS_XRANDR_H/c \
       set(HAVE_X11_EXTENSIONS_XRANDR_H true)' CMakeLists.txt
+  '' else ''
+    ${unzip}/bin/unzip -d tools/cryptopp562 tools/cryptopp562.zip
   '';
 
   buildInputs = [ cmake x11 libX11 libXi libXtst libXrandr xinput cryptopp ];
@@ -34,8 +40,8 @@ stdenv.mkDerivation rec {
   meta = {
     description = "Tool to share the mouse keyboard and the clipboard between computers";
     homepage = http://synergy-foss.org;
-    license = stdenv.lib.licenses.gpl2;
-    maintainers = [ stdenv.lib.maintainers.aszlig ];
-    platforms = stdenv.lib.platforms.all;
+    license = licenses.gpl2;
+    maintainers = [ maintainers.aszlig ];
+    platforms = platforms.all;
   };
 }