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