synergy.scm 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  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. (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.10.1")
  39. (source
  40. (origin
  41. (method git-fetch)
  42. (uri (git-reference
  43. (url "https://github.com/symless/synergy-core.git")
  44. (commit (string-append "v" version "-stable"))))
  45. (file-name (git-file-name name version))
  46. (sha256
  47. (base32
  48. "112w2xrp04cysd14xk1ax7cllqpcki0pyica4ivrdngr5qw0r9hp"))
  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. (getenv "CPLUS_INCLUDE_PATH")))
  66. ;; See https://github.com/symless/synergy-core/pull/6359/
  67. (substitute* "src/gui/src/ScreenSetupView.cpp"
  68. (("#include <QtGui>" m)
  69. (string-append m "\n#include <QHeaderView>")))
  70. (substitute* "src/gui/src/ActionDialog.cpp"
  71. (("#include <QtGui>" m)
  72. (string-append m "\n#include <QButtonGroup>")))
  73. #t)))))
  74. (inputs
  75. `(("avahi" ,avahi)
  76. ("python" ,python-wrapper)
  77. ("openssl" ,openssl)
  78. ("curl" ,curl)
  79. ("libxi" ,libxi)
  80. ("libx11" ,libx11)
  81. ("libxtst" ,libxtst)
  82. ("xinput" ,xinput)
  83. ("qtbase" ,qtbase)))
  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)))