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>
6 ;;; This file is part of GNU Guix.
8 ;;; GNU Guix is free software; you can redistribute it and/or modify it
9 ;;; under the terms of the GNU General Public License as published by
10 ;;; the Free Software Foundation; either version 3 of the License, or (at
11 ;;; your option) any later version.
13 ;;; GNU Guix is distributed in the hope that it will be useful, but
14 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
15 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 ;;; GNU General Public License for more details.
18 ;;; You should have received a copy of the GNU General Public License
19 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
21 (define-module (gnu packages synergy)
22 #:use-module (guix packages)
23 #:use-module ((guix licenses) #:select (gpl2))
24 #:use-module (guix download)
25 #:use-module (guix build-system cmake)
26 #:use-module (gnu packages)
27 #:use-module (gnu packages curl)
28 #:use-module (gnu packages compression)
29 #:use-module (gnu packages python)
30 #:use-module (gnu packages tls)
31 #:use-module (gnu packages xorg)
32 #:use-module (srfi srfi-26))
34 (define-public synergy
41 (uri (string-append "https://github.com/symless/synergy-core/archive/"
42 "v" version "-stable.tar.gz"))
43 (file-name (string-append name "-" version ".tar.gz"))
46 "052z1yiwck9hlshf8in2dgz6p7jxmq9yfj32mfzjaygpz6mmmr4y"))
47 (modules '((guix build utils)))
49 ;; Remove ~14MB of unnecessary bundled source and binaries
51 (for-each delete-file-recursively
53 "ext/LICENSE (OpenSSL)"
54 ,@(find-files "ext" "openssl-.*\\.tar\\.gz")
59 (build-system cmake-build-system)
60 (native-inputs `(("unzip" ,unzip)))
62 `(("python" ,python-wrapper)
71 (let ((srcdir (string-append "../synergy-core-" ,version "-stable")))
72 (modify-phases %standard-phases
73 (add-before 'configure 'unpack-aux-src
74 ;; TODO: package and use from system
75 (lambda* (#:key inputs #:allow-other-keys)
76 (let ((unzip (string-append
77 (assoc-ref inputs "unzip")
79 (with-directory-excursion "ext"
82 (system* unzip "-d" f (string-append f ".zip")))
83 '("gmock-1.6.0" "gtest-1.6.0"))))
86 ;; Don't run "integtests" as it requires network and an X display.
88 (zero? (system* (string-append srcdir "/bin/unittests")))))
90 ;; There currently is no installation process, see:
91 ;; http://synergy-project.org/spit/issues/details/3317/
92 (lambda* (#:key outputs #:allow-other-keys)
93 (let* ((out (assoc-ref outputs "out"))
94 (bin (string-append out "/bin"))
95 (ex (string-append out "/share/doc/synergy-"
96 ,version "/examples")))
100 (install-file (string-append srcdir "/bin/" f) bin))
101 '("synergyc" "synergys" "synergyd"
102 "usynergy" "syntool"))
103 ;; Install example configuration files
106 (install-file (string-append srcdir "/doc/" e) ex))
107 '("synergy.conf.example"
108 "synergy.conf.example-advanced"
109 "synergy.conf.example-basic"))))
111 (home-page "https://symless.com/synergy")
112 (synopsis "Mouse and keyboard sharing utility")
114 "Synergy brings your computers together in one cohesive experience; it's
115 software for sharing one mouse and keyboard between multiple computers on your