Commit | Line | Data |
---|---|---|
b5f4bb85 EB |
1 | ;;; GNU Guix --- Functional package management for GNU |
2 | ;;; Copyright © 2014 Eric Bavier <bavier@member.fsf.org> | |
3 | ;;; | |
4 | ;;; This file is part of GNU Guix. | |
5 | ;;; | |
6 | ;;; GNU Guix is free software; you can redistribute it and/or modify it | |
7 | ;;; under the terms of the GNU General Public License as published by | |
8 | ;;; the Free Software Foundation; either version 3 of the License, or (at | |
9 | ;;; your option) any later version. | |
10 | ;;; | |
11 | ;;; GNU Guix is distributed in the hope that it will be useful, but | |
12 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
14 | ;;; GNU General Public License for more details. | |
15 | ;;; | |
16 | ;;; You should have received a copy of the GNU General Public License | |
17 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. | |
18 | ||
19 | (define-module (gnu packages synergy) | |
20 | #:use-module (guix packages) | |
21 | #:use-module (guix licenses) | |
22 | #:use-module (guix download) | |
23 | #:use-module (guix build-system cmake) | |
24 | #:use-module (gnu packages) | |
25 | #:use-module (gnu packages curl) | |
26 | #:use-module (gnu packages python) | |
27 | #:use-module (gnu packages xorg) | |
28 | #:use-module (gnu packages zip) | |
29 | #:use-module (srfi srfi-26)) | |
30 | ||
31 | (define-public synergy | |
32 | (package | |
33 | (name "synergy") | |
34 | (version "1.5.1-r2398") | |
35 | (source | |
36 | (origin | |
37 | (method url-fetch) | |
38 | (uri (string-append "http://www.synergy-project.org/files/packages/" | |
39 | "synergy-" version "-Source.tar.gz")) | |
40 | (sha256 | |
41 | (base32 | |
42 | "19q8ck15f0jgpbzlm34dzp046wf3iiwa21s1qfyj5sj7xjxwa367")))) | |
43 | (build-system cmake-build-system) | |
44 | (native-inputs `(("unzip" ,unzip))) | |
45 | (inputs | |
46 | `(("python" ,python-wrapper) | |
47 | ("curl" ,curl) | |
48 | ("libxi" ,libxi) | |
49 | ("libx11" ,libx11) | |
50 | ("libxtst" ,libxtst) | |
51 | ("xinput" ,xinput))) | |
52 | (arguments | |
53 | `(#:phases | |
54 | (let ((srcdir (string-append | |
55 | "../synergy-" | |
56 | (car (string-split ,version #\-)) | |
57 | "-Source"))) | |
58 | (alist-cons-before | |
59 | 'configure 'unpack-aux-src | |
60 | ;; TODO: package and use from system | |
61 | (lambda* (#:key inputs #:allow-other-keys) | |
62 | (let ((unzip (string-append | |
63 | (assoc-ref inputs "unzip") | |
64 | "/bin/unzip"))) | |
65 | (with-directory-excursion "ext" | |
66 | (for-each | |
67 | (lambda (f) | |
68 | (system* unzip "-d" f (string-append f ".zip"))) | |
69 | '("cryptopp562" "gmock-1.6.0" "gtest-1.6.0"))))) | |
70 | (alist-replace | |
71 | 'check | |
72 | ;; Don't run "integtests" as it requires network and X an display. | |
73 | (lambda _ | |
74 | (zero? (system* (string-append srcdir "/bin/unittests")))) | |
75 | (alist-replace | |
76 | 'install | |
77 | ;; There currently is no installation process, see: | |
78 | ;; http://synergy-project.org/spit/issues/details/3317/ | |
79 | (lambda* (#:key outputs #:allow-other-keys) | |
80 | (let ((out (assoc-ref outputs "out"))) | |
81 | (begin | |
82 | (mkdir-p (string-append out "/bin")) | |
83 | (for-each | |
84 | (lambda (f) | |
85 | (copy-file (string-append srcdir "/bin/" f) | |
86 | (string-append out "/bin/" f))) | |
87 | '("synergyc" "synergys" "synergyd" | |
88 | "usynergy" "syntool"))))) | |
89 | %standard-phases)))))) | |
90 | (home-page "http://www.synergy-project.org") | |
91 | (synopsis "Mouse and keyboard sharing utility") | |
92 | (description | |
93 | "Synergy brings your computers together in one cohesive experience; its | |
94 | software for sharing one mouse and keyboard between multiple computers on your | |
95 | desk.") | |
96 | (license gpl2))) |