~ruther/guix-local

33869065eae10e80e592c7c26302e7eebc3b5803 — Hugo Buddelmeijer 5 months ago 20ad79c
gnu: syncthing-gtk: Switch to pyproject-build-system.

* gnu/packages/syncthing.scm: Remove (guix build-system python) module,
use (guix build-system pyproject), and (gnu packages python-build)
modules.

(syncthing-gtk)[build-system]: Switch to pyproject-build-system.
[arguments] <#:tests?>: Disable non-exisiting tests.
<#:phases>: Let setup.py return correct-ish version number to placate pip.
[home-page]: Update to https://github.com/kozec/syncthing-gtk.

Change-Id: I88b2921d3d899903938a74137e29d403de8f9617
Signed-off-by: Sharlatan Hellseher <sharlatanus@gmail.com>
1 files changed, 17 insertions(+), 6 deletions(-)

M gnu/packages/syncthing.scm
M gnu/packages/syncthing.scm => gnu/packages/syncthing.scm +17 -6
@@ 27,7 27,7 @@

(define-module (gnu packages syncthing)
  #:use-module (guix build-system go)
  #:use-module (guix build-system python)
  #:use-module (guix build-system pyproject)
  #:use-module (guix gexp)
  #:use-module (guix packages)
  #:use-module (guix download)


@@ 44,6 44,7 @@
  #:use-module (gnu packages gtk)
  #:use-module (gnu packages linux)
  #:use-module (gnu packages python-crypto)
  #:use-module (gnu packages python-build)
  #:use-module (gnu packages time))

(define-public syncthing


@@ 153,10 154,12 @@ Protocol.")
                (sha256
                 (base32
                  "1b77rdmx74zyz3lfhzzvdf3rrm7lfc7246varnr5xi366z3410ha"))))
      (build-system python-build-system)
      (build-system pyproject-build-system)
      (arguments
       `(#:phases
         (modify-phases %standard-phases
       (list
        #:tests? #f  ;has no tests
        #:phases
        #~(modify-phases %standard-phases
           (add-after 'unpack 'hardcode-dependencies
             (lambda* (#:key inputs #:allow-other-keys)
               (let ((psmisc (assoc-ref inputs "psmisc"))


@@ 174,7 177,14 @@ Protocol.")
             (lambda _
               (substitute* "syncthing_gtk/tools.py"
                 (("return executable")
                   "return \"syncthing-gtk\""))))
                  "return \"syncthing-gtk\""))
               ;; Prevent complaints from 'pip3 check':
               ;;   DEPRECATION: syncthing-gtk unknown has a non-standard
               ;;   version number. pip 24.1 will enforce this behaviour change.
               (substitute* "setup.py"
                 (("return version")
                  (string-append
                   "return \"" (car (string-split #$version #\-)) "\"")))))
           (add-after 'unpack 'remove-windows.py
             (lambda _
               ;; A Windows-specific module that fails to load with


@@ 188,6 198,7 @@ Protocol.")
                     (,(getenv "GUIX_GDK_PIXBUF_MODULE_FILES")))
                   `("GI_TYPELIB_PATH" ":" suffix
                     (,(getenv "GI_TYPELIB_PATH"))))))))))
      (native-inputs (list python-setuptools))
      (inputs
       (list bash-minimal
             gtk+


@@ 199,7 210,7 @@ Protocol.")
             python-pygobject
             psmisc
             syncthing))
      (home-page "https://github.com/syncthing/syncthing-gtk")
      (home-page "https://github.com/kozec/syncthing-gtk")
      (synopsis "GTK3 based GUI and notification area icon for Syncthing")
      (description "@code{syncthing-gtk} is a GTK3 Python based GUI and
notification area icon for Syncthing.  Supported Syncthing features: