* [bug#41818] [PATCH] gnu: Add syncthing-gtk. @ 2020-06-11 21:37 Giacomo Leidi 2020-06-14 3:28 ` Leo Famulari 2020-06-22 20:16 ` Marius Bakke 0 siblings, 2 replies; 6+ messages in thread From: Giacomo Leidi @ 2020-06-11 21:37 UTC (permalink / raw) To: 41818; +Cc: Giacomo Leidi * gnu/packages/syncthing.scm (syncthing-gtk): New variable. --- gnu/packages/syncthing.scm | 57 +++++++++++++++++++++++++++++++++++++- 1 file changed, 56 insertions(+), 1 deletion(-) diff --git a/gnu/packages/syncthing.scm b/gnu/packages/syncthing.scm index 99bdd7704b..69fd1148ab 100644 --- a/gnu/packages/syncthing.scm +++ b/gnu/packages/syncthing.scm @@ -3,6 +3,7 @@ ;;; Copyright © 2016, 2017, 2018, 2019, 2020 Leo Famulari <leo@famulari.name> ;;; Copyright © 2020 Tobias Geerinckx-Rice <me@tobias.gr> ;;; Copyright © 2020 Efraim Flashner <efraim@flashner.co.il> +;;; Copyright © 2020 Giacomo Leidi <goodoldpaul@autistici.org> ;;; ;;; This file is part of GNU Guix. ;;; @@ -21,13 +22,23 @@ (define-module (gnu packages syncthing) #:use-module (guix build-system go) + #:use-module (guix build-system python) #:use-module (guix build-system trivial) #:use-module (guix packages) #:use-module (guix download) #:use-module (guix git-download) #:use-module (guix licenses) #:use-module (gnu packages) - #:use-module (gnu packages golang)) + #:use-module (gnu packages freedesktop) + #:use-module (gnu packages glib) + #:use-module (gnu packages gnome) + #:use-module (gnu packages golang) + #:use-module (gnu packages gtk) + #:use-module (gnu packages linux) + #:use-module (gnu packages python) + #:use-module (gnu packages python-crypto) + #:use-module (gnu packages python-xyz) + #:use-module (gnu packages time)) (define-public syncthing (package @@ -177,6 +188,50 @@ Protocol.") (home-page "https://github.com/syncthing/syncthing") (license mpl2.0))) +(define-public syncthing-gtk + (package + (name "syncthing-gtk") + (version "0.9.4.4") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/syncthing/syncthing-gtk.git") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "0nc0wd7qvyri7841c3dd9in5d7367hys0isyw8znv5fj4c0a6v1f")))) + (build-system python-build-system) + (arguments + `(#:python ,python-2)) + (propagated-inputs + `(("python2-bcrypt" ,python2-bcrypt) + ("python2-dateutil" ,python2-dateutil) + ("python2-pycairo" ,python2-pycairo) + ("python2-pygobject" ,python2-pygobject) + ("python-nautilus" ,python-nautilus) + ("libappindicator" ,libappindicator) + ("libnotify" ,libnotify) + ("psmisc" ,psmisc) + ("syncthing" ,syncthing))) + (inputs + `(("gtk+" ,gtk+))) + (native-inputs + `(("python2-setuptools" ,python2-setuptools))) + (home-page "https://github.com/syncthing/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: + +@itemize +@item Everything that WebUI can display +@item Adding, editing and deleting nodes +@item Adding, editing and deleting repositories +@item Restart, shutdown server +@item Editing daemon settings +@end itemize\n") + (license gpl2))) + (define-public go-github-com-jackpal-go-nat-pmp (package (name "go-github-com-jackpal-go-nat-pmp") -- 2.26.2 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* [bug#41818] [PATCH] gnu: Add syncthing-gtk. 2020-06-11 21:37 [bug#41818] [PATCH] gnu: Add syncthing-gtk Giacomo Leidi @ 2020-06-14 3:28 ` Leo Famulari 2020-06-14 16:01 ` paul 2020-06-22 20:16 ` Marius Bakke 1 sibling, 1 reply; 6+ messages in thread From: Leo Famulari @ 2020-06-14 3:28 UTC (permalink / raw) To: Giacomo Leidi; +Cc: 41818 On Thu, Jun 11, 2020 at 11:37:07PM +0200, Giacomo Leidi wrote: > * gnu/packages/syncthing.scm (syncthing-gtk): New variable. Thanks! > + (arguments > + `(#:python ,python-2)) Can it use Python 3? ^ permalink raw reply [flat|nested] 6+ messages in thread
* [bug#41818] [PATCH] gnu: Add syncthing-gtk. 2020-06-14 3:28 ` Leo Famulari @ 2020-06-14 16:01 ` paul 0 siblings, 0 replies; 6+ messages in thread From: paul @ 2020-06-14 16:01 UTC (permalink / raw) To: Leo Famulari; +Cc: 41818 Hi Leo, On 6/14/20 5:28 AM, Leo Famulari wrote: > On Thu, Jun 11, 2020 at 11:37:07PM +0200, Giacomo Leidi wrote: >> * gnu/packages/syncthing.scm (syncthing-gtk): New variable. > Thanks! > >> + (arguments >> + `(#:python ,python-2)) > Can it use Python 3? It seems not: upstream's README [0] says Python 2.7 is needed. When actually trying to build the package with Python 3 the build process fails during phase "check" throwing TabError: inconsistent use of tabs and spaces in indentation Thanks for reviewing, Giacomo [0]: https://github.com/kozec/syncthing-gtk ^ permalink raw reply [flat|nested] 6+ messages in thread
* [bug#41818] [PATCH] gnu: Add syncthing-gtk. 2020-06-11 21:37 [bug#41818] [PATCH] gnu: Add syncthing-gtk Giacomo Leidi 2020-06-14 3:28 ` Leo Famulari @ 2020-06-22 20:16 ` Marius Bakke 2020-06-30 15:43 ` paul 1 sibling, 1 reply; 6+ messages in thread From: Marius Bakke @ 2020-06-22 20:16 UTC (permalink / raw) To: Giacomo Leidi, 41818; +Cc: Giacomo Leidi [-- Attachment #1: Type: text/plain, Size: 1065 bytes --] Giacomo Leidi <goodoldpaul@autistici.org> writes: > * gnu/packages/syncthing.scm (syncthing-gtk): New variable. [...] > + (build-system python-build-system) > + (arguments > + `(#:python ,python-2)) > + (propagated-inputs > + `(("python2-bcrypt" ,python2-bcrypt) > + ("python2-dateutil" ,python2-dateutil) > + ("python2-pycairo" ,python2-pycairo) > + ("python2-pygobject" ,python2-pygobject) > + ("python-nautilus" ,python-nautilus) > + ("libappindicator" ,libappindicator) > + ("libnotify" ,libnotify) > + ("psmisc" ,psmisc) > + ("syncthing" ,syncthing))) I don't think these needs to be propagated, as the 'syncthing-gtk' executable will be automatically wrapped with a PYTHONPATH that contains the Python inputs. I'm not sure about libappindicator, libnotify and psmisc though. Ideally we'd insert absolute references where appropriate to avoid propagation. In the worst case we can wrap it with those in PATH. Can you look into it and send an updated patch? [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 487 bytes --] ^ permalink raw reply [flat|nested] 6+ messages in thread
* [bug#41818] [PATCH] gnu: Add syncthing-gtk. 2020-06-22 20:16 ` Marius Bakke @ 2020-06-30 15:43 ` paul 2020-07-25 15:07 ` bug#41818: " Marius Bakke 0 siblings, 1 reply; 6+ messages in thread From: paul @ 2020-06-30 15:43 UTC (permalink / raw) To: Marius Bakke, 41818 [-- Attachment #1: Type: text/plain, Size: 1435 bytes --] Hi Marius, On 6/22/20 10:16 PM, Marius Bakke wrote: > Giacomo Leidi <goodoldpaul@autistici.org> writes: > >> * gnu/packages/syncthing.scm (syncthing-gtk): New variable. > [...] > >> + (build-system python-build-system) >> + (arguments >> + `(#:python ,python-2)) >> + (propagated-inputs >> + `(("python2-bcrypt" ,python2-bcrypt) >> + ("python2-dateutil" ,python2-dateutil) >> + ("python2-pycairo" ,python2-pycairo) >> + ("python2-pygobject" ,python2-pygobject) >> + ("python-nautilus" ,python-nautilus) >> + ("libappindicator" ,libappindicator) >> + ("libnotify" ,libnotify) >> + ("psmisc" ,psmisc) >> + ("syncthing" ,syncthing))) > I don't think these needs to be propagated, as the 'syncthing-gtk' > executable will be automatically wrapped with a PYTHONPATH that contains > the Python inputs. I didn't know that, I really should study deeper the build systems. > I'm not sure about libappindicator, libnotify and psmisc though. > Ideally we'd insert absolute references where appropriate to avoid > propagation. In the worst case we can wrap it with those in PATH. > > Can you look into it and send an updated patch? As you suggested I managed to move all propagated-inputs to the inputs field, I'm not sure I did it right but from my tests the package seem to be working. I'm attaching an updated version of the patch, I apologize for the delay. Giacomo [-- Attachment #2: 0001-gnu-Add-syncthing-gtk.patch --] [-- Type: text/x-patch, Size: 4578 bytes --] From 76342546eb16a760137adacdfb2aefbf55592342 Mon Sep 17 00:00:00 2001 From: Giacomo Leidi <goodoldpaul@autistici.org> Date: Thu, 11 Jun 2020 23:34:43 +0200 Subject: [PATCH] gnu: Add syncthing-gtk. * gnu/packages/syncthing.scm (syncthing-gtk): New variable. --- gnu/packages/syncthing.scm | 76 +++++++++++++++++++++++++++++++++++++- 1 file changed, 75 insertions(+), 1 deletion(-) diff --git a/gnu/packages/syncthing.scm b/gnu/packages/syncthing.scm index dfc222057e..382d28e920 100644 --- a/gnu/packages/syncthing.scm +++ b/gnu/packages/syncthing.scm @@ -3,6 +3,7 @@ ;;; Copyright © 2016, 2017, 2018, 2019, 2020 Leo Famulari <leo@famulari.name> ;;; Copyright © 2020 Tobias Geerinckx-Rice <me@tobias.gr> ;;; Copyright © 2020 Efraim Flashner <efraim@flashner.co.il> +;;; Copyright © 2020 Giacomo Leidi <goodoldpaul@autistici.org> ;;; ;;; This file is part of GNU Guix. ;;; @@ -21,13 +22,23 @@ (define-module (gnu packages syncthing) #:use-module (guix build-system go) + #:use-module (guix build-system python) #:use-module (guix build-system trivial) #:use-module (guix packages) #:use-module (guix download) #:use-module (guix git-download) #:use-module (guix licenses) #:use-module (gnu packages) - #:use-module (gnu packages golang)) + #:use-module (gnu packages freedesktop) + #:use-module (gnu packages glib) + #:use-module (gnu packages gnome) + #:use-module (gnu packages golang) + #:use-module (gnu packages gtk) + #:use-module (gnu packages linux) + #:use-module (gnu packages python) + #:use-module (gnu packages python-crypto) + #:use-module (gnu packages python-xyz) + #:use-module (gnu packages time)) (define-public syncthing (package @@ -177,6 +188,69 @@ Protocol.") (home-page "https://github.com/syncthing/syncthing") (license mpl2.0))) +(define-public syncthing-gtk + (package + (name "syncthing-gtk") + (version "0.9.4.4") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/syncthing/syncthing-gtk.git") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "0nc0wd7qvyri7841c3dd9in5d7367hys0isyw8znv5fj4c0a6v1f")))) + (build-system python-build-system) + (arguments + `(#:python ,python-2 + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'hardcode-dependencies + (lambda* (#:key inputs #:allow-other-keys) + (let ((psmisc (assoc-ref inputs "psmisc")) + (syncthing (assoc-ref inputs "syncthing"))) + ;; Hardcode dependencies paths to avoid propagation. + (substitute* "syncthing_gtk/tools.py" + (("killall") (string-append psmisc "/bin/killall"))) + (substitute* "syncthing_gtk/configuration.py" + (("/usr/bin/syncthing") (string-append syncthing + "/bin/syncthing")))) + #t)) + (add-after 'wrap 'wrap-libs + (lambda* (#:key outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + (wrap-program (string-append out "/bin/syncthing-gtk") + `("GI_TYPELIB_PATH" ":" prefix + (,(getenv "GI_TYPELIB_PATH")))) + #t)))))) + (inputs + `(("gtk+" ,gtk+) + ("libappindicator" ,libappindicator) + ("libnotify" ,libnotify) + ("python2-bcrypt" ,python2-bcrypt) + ("python2-dateutil" ,python2-dateutil) + ("python2-pycairo" ,python2-pycairo) + ("python2-pygobject" ,python2-pygobject) + ("python-nautilus" ,python-nautilus) + ("psmisc" ,psmisc) + ("syncthing" ,syncthing))) + (native-inputs + `(("python2-setuptools" ,python2-setuptools))) + (home-page "https://github.com/syncthing/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: + +@itemize +@item Everything that WebUI can display +@item Adding, editing and deleting nodes +@item Adding, editing and deleting repositories +@item Restart, shutdown server +@item Editing daemon settings +@end itemize\n") + (license gpl2))) + (define-public go-github-com-jackpal-go-nat-pmp (package (name "go-github-com-jackpal-go-nat-pmp") -- 2.26.2 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* bug#41818: [PATCH] gnu: Add syncthing-gtk. 2020-06-30 15:43 ` paul @ 2020-07-25 15:07 ` Marius Bakke 0 siblings, 0 replies; 6+ messages in thread From: Marius Bakke @ 2020-07-25 15:07 UTC (permalink / raw) To: paul, 41818-done [-- Attachment #1: Type: text/plain, Size: 1630 bytes --] paul <goodoldpaul@autistici.org> writes: > Hi Marius, > > On 6/22/20 10:16 PM, Marius Bakke wrote: >> Giacomo Leidi <goodoldpaul@autistici.org> writes: >> >>> * gnu/packages/syncthing.scm (syncthing-gtk): New variable. >> [...] >> >>> + (build-system python-build-system) >>> + (arguments >>> + `(#:python ,python-2)) >>> + (propagated-inputs >>> + `(("python2-bcrypt" ,python2-bcrypt) >>> + ("python2-dateutil" ,python2-dateutil) >>> + ("python2-pycairo" ,python2-pycairo) >>> + ("python2-pygobject" ,python2-pygobject) >>> + ("python-nautilus" ,python-nautilus) >>> + ("libappindicator" ,libappindicator) >>> + ("libnotify" ,libnotify) >>> + ("psmisc" ,psmisc) >>> + ("syncthing" ,syncthing))) >> I don't think these needs to be propagated, as the 'syncthing-gtk' >> executable will be automatically wrapped with a PYTHONPATH that contains >> the Python inputs. > I didn't know that, I really should study deeper the build systems. >> I'm not sure about libappindicator, libnotify and psmisc though. >> Ideally we'd insert absolute references where appropriate to avoid >> propagation. In the worst case we can wrap it with those in PATH. >> >> Can you look into it and send an updated patch? > > As you suggested I managed to move all propagated-inputs to the inputs > field, I'm not sure I did it right but from my tests the package seem to > be working. Excellent. > I'm attaching an updated version of the patch, I apologize for the delay. Apologies in return, this got lost in my email queue. Applied! [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 487 bytes --] ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2020-07-25 15:09 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2020-06-11 21:37 [bug#41818] [PATCH] gnu: Add syncthing-gtk Giacomo Leidi 2020-06-14 3:28 ` Leo Famulari 2020-06-14 16:01 ` paul 2020-06-22 20:16 ` Marius Bakke 2020-06-30 15:43 ` paul 2020-07-25 15:07 ` bug#41818: " Marius Bakke
Code repositories for project(s) associated with this external index https://git.savannah.gnu.org/cgit/guix.git This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.