nicotine.scm 3.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. ;;; GNU Guix --- Functional package management for GNU
  2. ;;; Copyright © 2020 Martin Becze <mjbecze@riseup.net>
  3. ;;; Copyright © 2022 Fatima Toothpaste <fatimatoothpaste@disroot.org>
  4. ;;;
  5. ;;; This file is part of GNU Guix.
  6. ;;;
  7. ;;; GNU Guix is free software; you can redistribute it and/or modify it
  8. ;;; under the terms of the GNU General Public License as published by
  9. ;;; the Free Software Foundation; either version 3 of the License, or (at
  10. ;;; your option) any later version.
  11. ;;;
  12. ;;; GNU Guix is distributed in the hope that it will be useful, but
  13. ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
  14. ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. ;;; GNU General Public License for more details.
  16. ;;;
  17. ;;; You should have received a copy of the GNU General Public License
  18. ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
  19. (define-module (gnu packages nicotine)
  20. #:use-module ((guix licenses) #:prefix license:)
  21. #:use-module (guix packages)
  22. #:use-module (guix git-download)
  23. #:use-module (guix build-system python)
  24. #:use-module (gnu packages bash)
  25. #:use-module (gnu packages freedesktop)
  26. #:use-module (gnu packages glib)
  27. #:use-module (gnu packages gnome)
  28. #:use-module (gnu packages gettext)
  29. #:use-module (gnu packages gtk)
  30. #:use-module (gnu packages mp3)
  31. #:use-module (gnu packages xorg))
  32. (define-public nicotine+
  33. (package
  34. (name "nicotine+")
  35. (version "3.2.1")
  36. (source (origin
  37. (method git-fetch)
  38. (uri (git-reference
  39. (url "https://github.com/Nicotine-Plus/nicotine-plus")
  40. (commit version)))
  41. (file-name (git-file-name name version))
  42. (sha256 (base32 "1x08z5lvkdl62dkc11vrsackgzsh1vr9vp3vgsgfzjyrvlsybmfw"))
  43. (modules '((guix build utils)))
  44. ;; Remove test that relies on network access.
  45. (snippet '(delete-file-recursively "test/integration"))))
  46. (build-system python-build-system)
  47. (arguments
  48. `(#:imported-modules ((guix build glib-or-gtk-build-system)
  49. ,@%python-build-system-modules)
  50. #:modules
  51. ((guix build utils)
  52. (guix build python-build-system)
  53. ((guix build glib-or-gtk-build-system) #:prefix glib-or-gtk:))
  54. #:phases
  55. (modify-phases %standard-phases
  56. (add-after 'install 'wrap-program
  57. (lambda* (#:key outputs #:allow-other-keys)
  58. (let ((prog (string-append
  59. (assoc-ref outputs "out")
  60. "/bin/nicotine"))
  61. (gi-typelib-path (getenv "GI_TYPELIB_PATH")))
  62. (wrap-program prog
  63. `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path))))))
  64. (add-after 'wrap-program 'glib-or-gtk-wrap
  65. (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-wrap))
  66. (add-after 'glib-or-gtk-wrap 'glib-or-gtk-compile-schemas
  67. (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-compile-schemas))
  68. (replace 'check
  69. (lambda* (#:key tests? #:allow-other-keys)
  70. (when tests?
  71. (invoke "xvfb-run" "python" "-m" "unittest")))))))
  72. (inputs
  73. (list bash-minimal gspell gtk+ python-pygobject libappindicator python-pytaglib))
  74. (native-inputs
  75. (list gettext-minimal xvfb-run))
  76. (home-page "https://nicotine-plus.org/")
  77. (synopsis "Graphical client for Soulseek")
  78. (description
  79. "Nicotine+ is a graphical client for the Soulseek peer-to-peer
  80. file sharing network. It is an attempt to keep Nicotine working with
  81. the latest libraries, kill bugs, keep current with the Soulseek protocol,
  82. and add some new features that users want and/or need.")
  83. (license license:gpl3+)))