projects/guix·blob python-team · refs

98 lines · 4.0 KiB

1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2020 Martin Becze <[email protected]>
3;;; Copyright © 2022 Fatima Toothpaste <[email protected]>
4;;; Copyright © 2024 Juliana Sims <[email protected]>
5;;; Copyright © 2025 Felipe Silva <[email protected]>
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
22(define-module (gnu packages nicotine)
23 #:use-module ((guix licenses) #:prefix license:)
24 #:use-module (guix packages)
25 #:use-module (guix gexp)
26 #:use-module (guix git-download)
27 #:use-module (guix build-system pyproject)
28 #:use-module (gnu packages bash)
29 #:use-module (gnu packages freedesktop)
30 #:use-module (gnu packages glib)
31 #:use-module (gnu packages gnome)
32 #:use-module (gnu packages gettext)
33 #:use-module (gnu packages gtk)
34 #:use-module (gnu packages mp3)
35 #:use-module (gnu packages python-build)
36 #:use-module (gnu packages xorg))
37
38(define-public nicotine+
39 (package
40 (name "nicotine+")
41 (version "3.3.10")
42 (source
43 (origin
44 (method git-fetch)
45 (uri (git-reference
46 (url "https://github.com/Nicotine-Plus/nicotine-plus")
47 (commit version)))
48 (file-name (git-file-name name version))
49 (sha256
50 (base32 "0xj7hlhgirgjyfmdchksvwhjhaqaf5n84brzih6fqlbsrr9gxkw9"))))
51 (build-system pyproject-build-system)
52 (arguments
53 (list
54 #:imported-modules
55 `((guix build glib-or-gtk-build-system)
56 ,@%pyproject-build-system-modules)
57 #:modules
58 `((guix build utils)
59 (guix build pyproject-build-system)
60 ((guix build glib-or-gtk-build-system) #:prefix glib-or-gtk:))
61 #:phases
62 #~(modify-phases %standard-phases
63 (add-after 'install 'wrap-program
64 (lambda _
65 (wrap-program (string-append #$output "/bin/nicotine")
66 `("GUIX_GDK_PIXBUF_MODULE_FILES" ":" suffix
67 (,(getenv "GUIX_GDK_PIXBUF_MODULE_FILES")))
68 `("GI_TYPELIB_PATH" ":" prefix
69 (,(getenv "GI_TYPELIB_PATH"))))))
70 (add-after 'wrap-program 'glib-or-gtk-wrap
71 (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-wrap))
72 (add-after 'glib-or-gtk-wrap 'glib-or-gtk-compile-schemas
73 (assoc-ref glib-or-gtk:%standard-phases
74 'glib-or-gtk-compile-schemas))
75 (replace 'check
76 (lambda* (#:key tests? #:allow-other-keys)
77 (when tests?
78 ;; Ensure writable cache directory
79 (setenv "HOME" "/tmp")
80 ;; Remove test that relies on network access.
81 (delete-file "pynicotine/tests/unit/test_version.py")
82 (invoke "xvfb-run" "python" "-m" "unittest")))))))
83 (inputs (list bash-minimal
84 gspell
85 gtk
86 python-pygobject
87 gobject-introspection
88 libappindicator
89 python-pytaglib))
90 (native-inputs (list gettext-minimal python-setuptools xvfb-run))
91 (home-page "https://nicotine-plus.org/")
92 (synopsis "Graphical client for Soulseek")
93 (description
94 "Nicotine+ is a graphical client for the Soulseek peer-to-peer
95file sharing network. It is an attempt to keep Nicotine working with
96the latest libraries, kill bugs, keep current with the Soulseek protocol,
97and add some new features that users want and/or need.")
98 (license license:gpl3+)))