2014-11-23 07:25:15 +03:00
|
|
|
{ stdenv, fetchFromGitHub, cmake, x11, libX11, libXi, libXtst, libXrandr
|
|
|
|
, xinput, curl, cryptopp ? null, unzip }:
|
2013-06-21 15:16:30 +04:00
|
|
|
|
2013-06-21 15:46:22 +04:00
|
|
|
assert stdenv.isLinux -> cryptopp != null;
|
2013-06-21 15:16:30 +04:00
|
|
|
|
|
|
|
with stdenv.lib;
|
2010-07-28 19:35:01 +04:00
|
|
|
|
2012-10-15 16:26:44 +04:00
|
|
|
stdenv.mkDerivation rec {
|
2014-11-23 07:25:15 +03:00
|
|
|
name = "synergy-${version}";
|
2015-04-13 21:13:11 +03:00
|
|
|
version = "1.6.3";
|
2007-11-11 11:16:23 +03:00
|
|
|
|
2014-11-23 07:25:15 +03:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "synergy";
|
|
|
|
repo = "synergy";
|
2014-12-17 15:17:19 +03:00
|
|
|
rev = version;
|
2015-04-13 21:13:11 +03:00
|
|
|
sha256 = "0n4zvz669vi2wyn6i6xhxp0j3nvjl4yzm441cqv6hb0d5k26wbcn";
|
2012-10-15 16:26:44 +04:00
|
|
|
};
|
2009-12-21 11:55:31 +03:00
|
|
|
|
2013-06-21 15:16:30 +04:00
|
|
|
patches = optional stdenv.isLinux ./cryptopp.patch;
|
2013-06-21 08:20:45 +04:00
|
|
|
|
2014-02-24 18:19:23 +04:00
|
|
|
postPatch = (if stdenv.isLinux then ''
|
2013-06-21 08:25:00 +04:00
|
|
|
sed -i -e '/HAVE_X11_EXTENSIONS_XRANDR_H/c \
|
|
|
|
set(HAVE_X11_EXTENSIONS_XRANDR_H true)' CMakeLists.txt
|
2013-06-21 15:16:30 +04:00
|
|
|
'' else ''
|
2014-02-24 18:19:23 +04:00
|
|
|
${unzip}/bin/unzip -d ext/cryptopp562 ext/cryptopp562.zip
|
|
|
|
'') + ''
|
|
|
|
${unzip}/bin/unzip -d ext/gmock-1.6.0 ext/gmock-1.6.0.zip
|
|
|
|
${unzip}/bin/unzip -d ext/gtest-1.6.0 ext/gtest-1.6.0.zip
|
2013-06-21 08:25:00 +04:00
|
|
|
'';
|
|
|
|
|
2014-02-24 18:19:23 +04:00
|
|
|
buildInputs = [ cmake x11 libX11 libXi libXtst libXrandr xinput curl ]
|
2013-06-21 15:46:22 +04:00
|
|
|
++ optional stdenv.isLinux cryptopp;
|
2013-06-21 08:20:45 +04:00
|
|
|
|
2012-10-15 16:26:44 +04:00
|
|
|
# At this moment make install doesn't work for synergy
|
|
|
|
# http://synergy-foss.org/spit/issues/details/3317/
|
2007-11-11 11:16:23 +03:00
|
|
|
|
2012-10-15 16:26:44 +04:00
|
|
|
installPhase = ''
|
2014-06-30 16:56:10 +04:00
|
|
|
mkdir -p $out/bin
|
2012-10-15 16:26:44 +04:00
|
|
|
cp ../bin/synergyc $out/bin
|
2012-10-15 22:00:20 +04:00
|
|
|
cp ../bin/synergys $out/bin
|
|
|
|
cp ../bin/synergyd $out/bin
|
2012-10-15 16:26:44 +04:00
|
|
|
'';
|
2009-04-29 17:04:01 +04:00
|
|
|
|
2013-06-21 09:14:17 +04:00
|
|
|
doCheck = true;
|
|
|
|
checkPhase = "../bin/unittests";
|
|
|
|
|
2013-06-21 08:20:45 +04:00
|
|
|
meta = {
|
2010-07-28 19:35:01 +04:00
|
|
|
description = "Tool to share the mouse keyboard and the clipboard between computers";
|
2012-10-15 16:26:44 +04:00
|
|
|
homepage = http://synergy-foss.org;
|
2013-06-21 15:16:30 +04:00
|
|
|
license = licenses.gpl2;
|
|
|
|
maintainers = [ maintainers.aszlig ];
|
|
|
|
platforms = platforms.all;
|
2007-11-11 11:16:23 +03:00
|
|
|
};
|
|
|
|
}
|