nicotine.scm 3.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. ;;; GNU Guix --- Functional package management for GNU
  2. ;;; Copyright © 2020 Martin Becze <mjbecze@riseup.net>
  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. (define-module (gnu packages nicotine)
  19. #:use-module ((guix licenses) #:prefix license:)
  20. #:use-module (guix packages)
  21. #:use-module (guix git-download)
  22. #:use-module (guix build-system python)
  23. #:use-module (gnu packages glib)
  24. #:use-module (gnu packages gettext)
  25. #:use-module (gnu packages gtk)
  26. #:use-module (gnu packages check)
  27. #:use-module (gnu packages mp3))
  28. (define-public nicotine+
  29. (package
  30. (name "nicotine+")
  31. (version "2.1.2")
  32. (source (origin
  33. (method git-fetch)
  34. (uri (git-reference
  35. (url "https://github.com/Nicotine-Plus/nicotine-plus")
  36. (commit version)))
  37. (file-name (git-file-name name version))
  38. (sha256 (base32 "18rra8yqjr10z23chzcp53ncbd5fhm0iqgqxpbxfq7a10za02v6l"))))
  39. (build-system python-build-system)
  40. (arguments
  41. `(#:imported-modules ((guix build glib-or-gtk-build-system)
  42. ,@%python-build-system-modules)
  43. #:modules
  44. ((guix build utils)
  45. (guix build python-build-system)
  46. ((guix build glib-or-gtk-build-system) #:prefix glib-or-gtk:))
  47. #:phases
  48. (modify-phases %standard-phases
  49. (add-after 'install 'wrap-program
  50. (lambda* (#:key outputs #:allow-other-keys)
  51. (let ((prog (string-append
  52. (assoc-ref outputs "out")
  53. "/bin/nicotine"))
  54. (gi-typelib-path (getenv "GI_TYPELIB_PATH")))
  55. (wrap-program prog
  56. `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path)))
  57. #t)))
  58. (add-after 'wrap-program 'glib-or-gtk-wrap
  59. (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-wrap))
  60. (add-after 'glib-or-gtk-wrap 'glib-or-gtk-compile-schemas
  61. (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-compile-schemas)))))
  62. (inputs
  63. `(("gtk+" ,gtk+)
  64. ("python-pygobject" ,python-pygobject)
  65. ("python-pytaglib" ,python-pytaglib)))
  66. (native-inputs
  67. `(("python-pytest" ,python-pytest)
  68. ("gettext" ,gettext-minimal)))
  69. (home-page "https://nicotine-plus.github.io/nicotine-plus/")
  70. (synopsis "Graphical client for Soulseek")
  71. (description
  72. "Nicotine+ is a graphical client for the Soulseek peer-to-peer
  73. file sharing network. It is an attempt to keep Nicotine working with
  74. the latest libraries, kill bugs, keep current with the Soulseek protocol,
  75. and add some new features that users want and/or need.")
  76. (license license:gpl3+)))