gnu: Add Xfce Notification Daemon.
[jackhill/guix/guix.git] / gnu / packages / synergy.scm
CommitLineData
b5f4bb85 1;;; GNU Guix --- Functional package management for GNU
3c62ccc9 2;;; Copyright © 2014, 2015, 2016 Eric Bavier <bavier@member.fsf.org>
cecaee42 3;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
b5f4bb85
EB
4;;;
5;;; This file is part of GNU Guix.
6;;;
7;;; GNU Guix is free software; you can redistribute it and/or modify it
8;;; under the terms of the GNU General Public License as published by
9;;; the Free Software Foundation; either version 3 of the License, or (at
10;;; your option) any later version.
11;;;
12;;; GNU Guix is distributed in the hope that it will be useful, but
13;;; WITHOUT ANY WARRANTY; without even the implied warranty of
14;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15;;; GNU General Public License for more details.
16;;;
17;;; You should have received a copy of the GNU General Public License
18;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
19
20(define-module (gnu packages synergy)
21 #:use-module (guix packages)
5c852e08 22 #:use-module ((guix licenses) #:select (gpl2))
b5f4bb85
EB
23 #:use-module (guix download)
24 #:use-module (guix build-system cmake)
25 #:use-module (gnu packages)
26 #:use-module (gnu packages curl)
27 #:use-module (gnu packages python)
cc2b77df 28 #:use-module (gnu packages tls)
b5f4bb85
EB
29 #:use-module (gnu packages xorg)
30 #:use-module (gnu packages zip)
31 #:use-module (srfi srfi-26))
32
33(define-public synergy
34 (package
35 (name "synergy")
3c62ccc9 36 (version "1.8.2")
b5f4bb85
EB
37 (source
38 (origin
39 (method url-fetch)
cecaee42 40 (uri (string-append "https://github.com/symless/synergy/archive/"
5c852e08
EB
41 "v" version "-stable.tar.gz"))
42 (file-name (string-append name "-" version ".tar.gz"))
b5f4bb85
EB
43 (sha256
44 (base32
3c62ccc9 45 "1ym9lmnm64i1bw4spxq40drb4nvzsq5z7zq1935aq0kgccccg11g"))
5c852e08
EB
46 (modules '((guix build utils)))
47 (snippet
48 ;; Remove ~14MB of unnecessary bundled source and binaries
49 '(for-each delete-file-recursively
50 `("ext/bonjour"
51 "ext/LICENSE (OpenSSL)"
52 ,@(find-files "ext" "openssl-.*\\.tar\\.gz")
53 "ext/openssl-osx"
54 "ext/openssl-win32"
55 "ext/openssl-win64")))))
b5f4bb85
EB
56 (build-system cmake-build-system)
57 (native-inputs `(("unzip" ,unzip)))
58 (inputs
59 `(("python" ,python-wrapper)
5c852e08 60 ("openssl" ,openssl)
b5f4bb85
EB
61 ("curl" ,curl)
62 ("libxi" ,libxi)
63 ("libx11" ,libx11)
64 ("libxtst" ,libxtst)
65 ("xinput" ,xinput)))
66 (arguments
67 `(#:phases
5c852e08 68 (let ((srcdir (string-append "../synergy-" ,version "-stable")))
a3025a44
EF
69 (modify-phases %standard-phases
70 (add-before 'configure 'unpack-aux-src
71 ;; TODO: package and use from system
72 (lambda* (#:key inputs #:allow-other-keys)
73 (let ((unzip (string-append
74 (assoc-ref inputs "unzip")
75 "/bin/unzip")))
76 (with-directory-excursion "ext"
77 (for-each
78 (lambda (f)
79 (system* unzip "-d" f (string-append f ".zip")))
80 '("gmock-1.6.0" "gtest-1.6.0"))))))
81 (replace 'check
82 ;; Don't run "integtests" as it requires network and X an display.
83 (lambda _
84 (zero? (system* (string-append srcdir "/bin/unittests")))))
85 (replace 'install
b5f4bb85
EB
86 ;; There currently is no installation process, see:
87 ;; http://synergy-project.org/spit/issues/details/3317/
88 (lambda* (#:key outputs #:allow-other-keys)
5c852e08
EB
89 (let* ((out (assoc-ref outputs "out"))
90 (bin (string-append out "/bin"))
91 (ex (string-append out "/share/doc/synergy-"
92 ,version "/examples")))
b5f4bb85 93 (begin
b5f4bb85
EB
94 (for-each
95 (lambda (f)
96c46210 96 (install-file (string-append srcdir "/bin/" f) bin))
b5f4bb85 97 '("synergyc" "synergys" "synergyd"
5c852e08
EB
98 "usynergy" "syntool"))
99 ;; Install example configuration files
5c852e08
EB
100 (for-each
101 (lambda (e)
96c46210 102 (install-file (string-append srcdir "/doc/" e) ex))
5c852e08
EB
103 '("synergy.conf.example"
104 "synergy.conf.example-advanced"
a3025a44 105 "synergy.conf.example-basic"))))))))))
cecaee42 106 (home-page "http://symless.com/")
b5f4bb85
EB
107 (synopsis "Mouse and keyboard sharing utility")
108 (description
109 "Synergy brings your computers together in one cohesive experience; its
110software for sharing one mouse and keyboard between multiple computers on your
111desk.")
112 (license gpl2)))