synergy.scm 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. ;;; GNU Guix --- Functional package management for GNU
  2. ;;; Copyright © 2014, 2015, 2016, 2020 Eric Bavier <bavier@posteo.net>
  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. (define-module (gnu packages synergy)
  22. #:use-module (guix packages)
  23. #:use-module ((guix licenses) #:select (gpl2))
  24. #:use-module (guix git-download)
  25. #:use-module (guix build-system cmake)
  26. #:use-module (gnu packages)
  27. #:use-module (gnu packages avahi)
  28. #:use-module (gnu packages curl)
  29. #:use-module (gnu packages compression)
  30. #:use-module (gnu packages python)
  31. #:use-module (gnu packages qt)
  32. #:use-module (gnu packages tls)
  33. #:use-module (gnu packages xorg)
  34. #:use-module (srfi srfi-26))
  35. (define-public synergy
  36. (package
  37. (name "synergy")
  38. (version "1.11.1")
  39. (source
  40. (origin
  41. (method git-fetch)
  42. (uri (git-reference
  43. (url "https://github.com/symless/synergy-core")
  44. (commit (string-append "v" version "-stable"))))
  45. (file-name (git-file-name name version))
  46. (sha256
  47. (base32
  48. "0dn0h3mdqy0mbg4yyhsh4rhvvsssqlknnln3naplc97my10lk2a0"))
  49. (modules '((guix build utils)))
  50. (snippet
  51. ;; Remove unnecessary bundled source and binaries
  52. '(begin
  53. (delete-file-recursively "ext/openssl")
  54. #t))))
  55. (build-system cmake-build-system)
  56. (arguments
  57. `(#:tests? #f ; there is no test target
  58. #:phases
  59. (modify-phases %standard-phases
  60. (add-after 'unpack 'fix-headers
  61. (lambda* (#:key inputs #:allow-other-keys)
  62. (setenv "CPLUS_INCLUDE_PATH"
  63. (string-append (assoc-ref inputs "avahi")
  64. "/include/avahi-compat-libdns_sd:"
  65. (or (getenv "CPLUS_INCLUDE_PATH") "")))
  66. #t))
  67. (add-after 'install 'patch-desktop
  68. (lambda* (#:key outputs #:allow-other-keys)
  69. (let ((out (assoc-ref outputs "out")))
  70. (substitute* (string-append out "/share/applications/synergy.desktop")
  71. (("/usr") out))
  72. #t))))))
  73. (native-inputs
  74. `(("qttools" ,qttools))) ; for Qt5LinguistTools
  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. ("qtbase" ,qtbase-5)))
  84. (home-page "https://symless.com/synergy")
  85. (synopsis "Mouse and keyboard sharing utility")
  86. (description
  87. "Synergy brings your computers together in one cohesive experience; it's
  88. software for sharing one mouse and keyboard between multiple computers on your
  89. desk.")
  90. (license gpl2)))