gnu: Add external-program.
[jackhill/guix/guix.git] / gnu / packages / synergy.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2014, 2015, 2016 Eric Bavier <bavier@member.fsf.org>
3 ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
4 ;;; Copyright © 2017 Vasile Dumitrascu <va511e@yahoo.com>
5 ;;; Copyright © 2019 Ricardo Wurmus <rekado@elephly.net>
6 ;;;
7 ;;; This file is part of GNU Guix.
8 ;;;
9 ;;; GNU Guix is free software; you can redistribute it and/or modify it
10 ;;; under the terms of the GNU General Public License as published by
11 ;;; the Free Software Foundation; either version 3 of the License, or (at
12 ;;; your option) any later version.
13 ;;;
14 ;;; GNU Guix is distributed in the hope that it will be useful, but
15 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
16 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 ;;; GNU General Public License for more details.
18 ;;;
19 ;;; You should have received a copy of the GNU General Public License
20 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
21
22 (define-module (gnu packages synergy)
23 #:use-module (guix packages)
24 #:use-module ((guix licenses) #:select (gpl2))
25 #:use-module (guix git-download)
26 #:use-module (guix build-system cmake)
27 #:use-module (gnu packages)
28 #:use-module (gnu packages avahi)
29 #:use-module (gnu packages curl)
30 #:use-module (gnu packages compression)
31 #:use-module (gnu packages python)
32 #:use-module (gnu packages qt)
33 #:use-module (gnu packages tls)
34 #:use-module (gnu packages xorg)
35 #:use-module (srfi srfi-26))
36
37 (define-public synergy
38 (package
39 (name "synergy")
40 (version "1.10.1")
41 (source
42 (origin
43 (method git-fetch)
44 (uri (git-reference
45 (url "https://github.com/symless/synergy-core.git")
46 (commit (string-append "v" version "-stable"))))
47 (file-name (git-file-name name version))
48 (sha256
49 (base32
50 "112w2xrp04cysd14xk1ax7cllqpcki0pyica4ivrdngr5qw0r9hp"))
51 (modules '((guix build utils)))
52 (snippet
53 ;; Remove unnecessary bundled source and binaries
54 '(begin
55 (delete-file-recursively "ext/openssl")
56 #t))))
57 (build-system cmake-build-system)
58 (arguments
59 `(#:tests? #f ; there is no test target
60 #:phases
61 (modify-phases %standard-phases
62 (add-after 'unpack 'fix-headers
63 (lambda* (#:key inputs #:allow-other-keys)
64 (setenv "CPLUS_INCLUDE_PATH"
65 (string-append (assoc-ref inputs "avahi")
66 "/include/avahi-compat-libdns_sd"))
67 ;; See https://github.com/symless/synergy-core/pull/6359/
68 (substitute* "src/gui/src/ScreenSetupView.cpp"
69 (("#include <QtGui>" m)
70 (string-append m "\n#include <QHeaderView>")))
71 (substitute* "src/gui/src/ActionDialog.cpp"
72 (("#include <QtGui>" m)
73 (string-append m "\n#include <QButtonGroup>")))
74 #t)))))
75 (inputs
76 `(("avahi" ,avahi)
77 ("python" ,python-wrapper)
78 ("openssl" ,openssl)
79 ("curl" ,curl)
80 ("libxi" ,libxi)
81 ("libx11" ,libx11)
82 ("libxtst" ,libxtst)
83 ("xinput" ,xinput)
84 ("qtbase" ,qtbase)))
85 (home-page "https://symless.com/synergy")
86 (synopsis "Mouse and keyboard sharing utility")
87 (description
88 "Synergy brings your computers together in one cohesive experience; it's
89 software for sharing one mouse and keyboard between multiple computers on your
90 desk.")
91 (license gpl2)))