[PATCH] gnu: Add syncplay.

  • Open
  • quality assurance status badge
Details
2 participants
  • aurtzy
  • Maxim Cournoyer
Owner
unassigned
Submitted by
aurtzy
Severity
normal
A
A
aurtzy wrote on 3 Aug 2023 06:35
(address . guix-patches@gnu.org)(name . aurtzy)(address . aurtzy@gmail.com)
20230803061517.27336-1-aurtzy@gmail.com
* gnu/packages/networking.scm (syncplay): New variable.
---
gnu/packages/networking.scm | 52 +++++++++++++++++++++++++++++++++++++
1 file changed, 52 insertions(+)

Toggle diff (69 lines)
diff --git a/gnu/packages/networking.scm b/gnu/packages/networking.scm
index 488d015107..10eb19e980 100644
--- a/gnu/packages/networking.scm
+++ b/gnu/packages/networking.scm
@@ -60,6 +60,7 @@
;;; Copyright © 2023 Bruno Victal <mirai@makinata.eu>
;;; Copyright © 2023 Yovan Naumovski <yovan@gorski.stream>
;;; Copyright © 2023 Zheng Junjie <873216071@qq.com>
+;;; Copyright © 2023 aurtzy <aurtzy@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -4644,3 +4645,54 @@ (define-public dropwatch
recording packets that are dropped by the kernel. It provides the commands
@command{dropwatch} and @command{dwdump}.")
(license license:gpl2+)))
+
+(define-public syncplay
+ (package
+ (name "syncplay")
+ (version "1.7.0")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/Syncplay/syncplay.git")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "061kpnb48lad8rr8v58xac33mwpbrixfbhn7d0xa63zpxg43bvsd"))))
+ (build-system gnu-build-system)
+ (arguments
+ (list #:imported-modules `(,@%gnu-build-system-modules (guix build
+ qt-utils)
+ (guix build utils))
+ #:modules '((guix build gnu-build-system)
+ (guix build qt-utils)
+ (guix build utils))
+ #:make-flags #~`("DESTDIR=" ,(string-append "PREFIX="
+ (assoc-ref %outputs
+ "out")))
+ #:phases #~(modify-phases %standard-phases
+ (delete 'configure)
+ (delete 'build)
+ (delete 'check)
+ (add-after 'install 'wrap-qt
+ (lambda* (#:key inputs #:allow-other-keys)
+ (wrap-qt-program "syncplay"
+ #:output #$output
+ #:inputs inputs))))))
+ (inputs (list bash-minimal qtwayland-5))
+ (propagated-inputs (list python
+ python-service-identity
+ python-twisted
+ python-pyside-2
+ python-certifi
+ python-idna))
+ (home-page "https://syncplay.pl")
+ (synopsis "Client/server to synchronize media playback on many computers")
+ (description
+ "Syncplay is a solution to synchronize video playback across multiple
+instances of media players over the Internet. When one person pauses/unpauses
+playback or skips to a position in the video, this is replicated across all
+media players connected to the same server and in the same \"room\" (viewing
+session). A built-in text chat for discussing the synced media is also
+included for convenience.")
+ (license license:asl2.0)))
--
2.41.0
M
M
Maxim Cournoyer wrote on 5 Sep 2023 16:54
(name . aurtzy)(address . aurtzy@gmail.com)(address . 65031@debbugs.gnu.org)
871qfck6vg.fsf@gmail.com
Hi,

aurtzy <aurtzy@gmail.com> writes:

Toggle quote (57 lines)
> * gnu/packages/networking.scm (syncplay): New variable.
> ---
> gnu/packages/networking.scm | 52 +++++++++++++++++++++++++++++++++++++
> 1 file changed, 52 insertions(+)
>
> diff --git a/gnu/packages/networking.scm b/gnu/packages/networking.scm
> index 488d015107..10eb19e980 100644
> --- a/gnu/packages/networking.scm
> +++ b/gnu/packages/networking.scm
> @@ -60,6 +60,7 @@
> ;;; Copyright © 2023 Bruno Victal <mirai@makinata.eu>
> ;;; Copyright © 2023 Yovan Naumovski <yovan@gorski.stream>
> ;;; Copyright © 2023 Zheng Junjie <873216071@qq.com>
> +;;; Copyright © 2023 aurtzy <aurtzy@gmail.com>
> ;;;
> ;;; This file is part of GNU Guix.
> ;;;
> @@ -4644,3 +4645,54 @@ (define-public dropwatch
> recording packets that are dropped by the kernel. It provides the commands
> @command{dropwatch} and @command{dwdump}.")
> (license license:gpl2+)))
> +
> +(define-public syncplay
> + (package
> + (name "syncplay")
> + (version "1.7.0")
> + (source (origin
> + (method git-fetch)
> + (uri (git-reference
> + (url "https://github.com/Syncplay/syncplay.git")
> + (commit (string-append "v" version))))
> + (file-name (git-file-name name version))
> + (sha256
> + (base32
> + "061kpnb48lad8rr8v58xac33mwpbrixfbhn7d0xa63zpxg43bvsd"))))
> + (build-system gnu-build-system)
> + (arguments
> + (list #:imported-modules `(,@%gnu-build-system-modules (guix build
> + qt-utils)
> + (guix build utils))
> + #:modules '((guix build gnu-build-system)
> + (guix build qt-utils)
> + (guix build utils))
> + #:make-flags #~`("DESTDIR=" ,(string-append "PREFIX="
> + (assoc-ref %outputs
> + "out")))
> + #:phases #~(modify-phases %standard-phases
> + (delete 'configure)
> + (delete 'build)
> + (delete 'check)
> + (add-after 'install 'wrap-qt
> + (lambda* (#:key inputs #:allow-other-keys)
> + (wrap-qt-program "syncplay"
> + #:output #$output
> + #:inputs inputs))))))
> + (inputs (list bash-minimal qtwayland-5))

Is it compatible with Qt 6? To try it, replace qtwayland-5 with
qtwayland, and specify a #:qtbase qtbase argument.

Toggle quote (7 lines)
> + (propagated-inputs (list python
> + python-service-identity
> + python-twisted
> + python-pyside-2
> + python-certifi
> + python-idna))

These should be inputs, not propagated-inputs, unless it can be used as
a library? Also, please sort the inputs alphabetically.

Toggle quote (11 lines)
> + (home-page "https://syncplay.pl")
> + (synopsis "Client/server to synchronize media playback on many computers")
> + (description
> + "Syncplay is a solution to synchronize video playback across multiple
> +instances of media players over the Internet. When one person pauses/unpauses
> +playback or skips to a position in the video, this is replicated across all
> +media players connected to the same server and in the same \"room\" (viewing
> +session). A built-in text chat for discussing the synced media is also
> +included for convenience.")
> + (license license:asl2.0)))

The rest LGTM. Could you please send a v2?

--
Thanks,
Maxim
M
M
Maxim Cournoyer wrote on 5 Sep 2023 16:54
control message for bug #65031
(address . control@debbugs.gnu.org)
87zg20isav.fsf@gmail.com
tags 65031 + moreinfo
quit
A
A
aurtzy wrote on 21 Sep 2023 21:37
[PATCH v2] gnu: Add syncplay.
(address . 65031@debbugs.gnu.org)(name . aurtzy)(address . aurtzy@gmail.com)
20230921203812.3649-2-aurtzy@gmail.com
* gnu/packages/networking.scm (syncplay): New variable.
* gnu/packages/patches/syncplay-fix-typeerror.patch: New file.
---

Toggle quote (3 lines)
> Is it compatible with Qt 6? To try it, replace qtwayland-5 with
> qtwayland, and specify a #:qtbase qtbase argument.

Looks like it is! #:qtbase doesn't seem to be supported by gnu-build-system or
python-build-system (switched to the latter for this v2; elaborated further
below) and I had to make a few other adjustments to get it working, so I may
need advice if I've missed anything here.

A patch has been added to fix a Qt 6 issue causing Syncplay to crash.

Toggle quote (3 lines)
> These should be inputs, not propagated-inputs, unless it can be used as
> a library? Also, please sort the inputs alphabetically.

Fixed; not a library. It appears I was using an inappropriate build system for
this package - I originally made them propagated because gnu-build-system wasn't
doing whatever wrapping python-build-system does to make the inputs available,
so this v2 uses python-build-system instead now.

Best,

aurtzy

gnu/packages/networking.scm | 54 +++++++++++++++++++
.../patches/syncplay-fix-typeerror.patch | 25 +++++++++
2 files changed, 79 insertions(+)
create mode 100644 gnu/packages/patches/syncplay-fix-typeerror.patch

Toggle diff (102 lines)
diff --git a/gnu/packages/networking.scm b/gnu/packages/networking.scm
index c1cab1fe0d..a7fde61ea8 100644
--- a/gnu/packages/networking.scm
+++ b/gnu/packages/networking.scm
@@ -60,6 +60,7 @@
;;; Copyright © 2023 Bruno Victal <mirai@makinata.eu>
;;; Copyright © 2023 Yovan Naumovski <yovan@gorski.stream>
;;; Copyright © 2023 Zheng Junjie <873216071@qq.com>
+;;; Copyright © 2023 aurtzy <aurtzy@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -4700,3 +4701,56 @@ (define-public dropwatch
recording packets that are dropped by the kernel. It provides the commands
@command{dropwatch} and @command{dwdump}.")
(license license:gpl2+)))
+
+(define-public syncplay
+ (package
+ (name "syncplay")
+ (version "1.7.0")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/Syncplay/syncplay.git")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "061kpnb48lad8rr8v58xac33mwpbrixfbhn7d0xa63zpxg43bvsd"))
+ (patches (search-patches "syncplay-fix-typeerror.patch"))))
+ (build-system python-build-system)
+ (arguments
+ (list #:imported-modules `(,@%python-build-system-modules
+ (guix build qt-utils)
+ (guix build utils))
+ #:modules '((guix build python-build-system)
+ (guix build qt-utils)
+ (guix build utils))
+ #:phases #~(modify-phases %standard-phases
+ (delete 'check)
+ (replace 'install
+ (lambda _
+ (invoke "make" "install" "DESTDIR="
+ (string-append "PREFIX="
+ (assoc-ref %outputs "out")))))
+ (add-after 'install 'wrap-qt
+ (lambda* (#:key inputs #:allow-other-keys)
+ (wrap-qt-program "syncplay"
+ #:output #$output
+ #:inputs inputs
+ #:qt-major-version "6"))))))
+ (native-inputs (list python-pyside-6))
+ (inputs (list bash-minimal
+ python-certifi
+ python-idna
+ python-service-identity
+ python-twisted
+ qtwayland))
+ (home-page "https://syncplay.pl")
+ (synopsis "Client/server to synchronize media playback on many computers")
+ (description
+ "Syncplay is a solution to synchronize video playback across multiple
+instances of media players over the Internet. When one person pauses/unpauses
+playback or skips to a position in the video, this is replicated across all
+media players connected to the same server and in the same \"room\" (viewing
+session). A built-in text chat for discussing the synced media is also
+included for convenience.")
+ (license license:asl2.0)))
diff --git a/gnu/packages/patches/syncplay-fix-typeerror.patch b/gnu/packages/patches/syncplay-fix-typeerror.patch
new file mode 100644
index 0000000000..6b1168a0e9
--- /dev/null
+++ b/gnu/packages/patches/syncplay-fix-typeerror.patch
@@ -0,0 +1,25 @@
+From b62b038cdf58c54205987dfc52ebf228505ad03b Mon Sep 17 00:00:00 2001
+From: Etoh <etoh@syncplay.pl>
+Date: Tue, 11 Apr 2023 20:22:52 +0100
+Subject: [PATCH] Fix ArchLinux GUI TypeError (#600)
+
+---
+ syncplay/ui/gui.py | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/syncplay/ui/gui.py b/syncplay/ui/gui.py
+index 7c100542..ca0f5d4a 100755
+--- a/syncplay/ui/gui.py
++++ b/syncplay/ui/gui.py
+@@ -2106,7 +2106,10 @@ def __init__(self, passedBar=None):
+ if isMacOS():
+ self.setWindowFlags(self.windowFlags())
+ else:
+- self.setWindowFlags(self.windowFlags() & Qt.AA_DontUseNativeMenuBar)
++ try:
++ self.setWindowFlags(self.windowFlags() & Qt.AA_DontUseNativeMenuBar)
++ except TypeError:
++ self.setWindowFlags(self.windowFlags())
+ self.setWindowTitle("Syncplay v" + version + revision)
+ self.mainLayout = QtWidgets.QVBoxLayout()
+ self.addTopLayout(self)
--
2.41.0
A
A
aurtzy wrote on 29 Jun 23:37 +0200
[PATCH v3] gnu: Add syncplay.
(address . 65031@debbugs.gnu.org)(name . aurtzy)(address . aurtzy@gmail.com)
a99629afbb98a9fb564e1ab682dfa808a9e558e9.1719693041.git.aurtzy@gmail.com
* gnu/packages/video.scm (syncplay): New variable.

Change-Id: I72cdfa3db2b4b7ef6c3ef0b8585d138c272046a7
---

Hi Maxim,

Just got around to looking at this package again with a new patch as things
have changed since my last reply (and I didn't cc you before, oops..).

In addition to addressing your initial review, notable changes from v2
include:

- Update to current latest version of Syncplay (1.7.3).
- Patch is no longer needed.
- This patch puts syncplay in (gnu packages video) instead of the previous
(gnu packages networking) since the latter seemed more concerned with
system-level networking. Does this make sense?

Toggle quote (22 lines)
> > Is it compatible with Qt 6? To try it, replace qtwayland-5 with
> > qtwayland, and specify a #:qtbase qtbase argument.
>
> Looks like it is! #:qtbase doesn't seem to be supported by gnu-build-system or
> python-build-system (switched to the latter for this v2; elaborated further
> below) and I had to make a few other adjustments to get it working, so I may
> need advice if I've missed anything here.
>
> A patch has been added to fix a Qt 6 issue causing Syncplay to crash.
>
> > These should be inputs, not propagated-inputs, unless it can be used as
> > a library? Also, please sort the inputs alphabetically.
>
> Fixed; not a library. It appears I was using an inappropriate build system for
> this package - I originally made them propagated because gnu-build-system wasn't
> doing whatever wrapping python-build-system does to make the inputs available,
> so this v2 uses python-build-system instead now.
>
> Best,
>
> aurtzy

Cheers,

aurtzy

gnu/packages/video.scm | 54 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 54 insertions(+)

Toggle diff (73 lines)
diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm
index 411ad4c2bf..57a05f3eff 100644
--- a/gnu/packages/video.scm
+++ b/gnu/packages/video.scm
@@ -68,6 +68,7 @@
;;; Copyright © 2023 Saku Laesvuori <saku@laesvuori.fi>
;;; Copyright © 2023 Jaeme Sifat <jaeme@runbox.com>
;;; Copyright © 2023 Zheng Junjie <873216071@qq.com>
+;;; Copyright © 2024 aurtzy <aurtzy@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -6349,3 +6350,56 @@ (define-public svtplay-dl
broadcasters including SVT Play, Sveriges Radio, TV4 Play, along with many
others.")
(license license:expat)))
+
+(define-public syncplay
+ (package
+ (name "syncplay")
+ (version "1.7.3")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/Syncplay/syncplay")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "08bgndszja4n2kql2qmzl6qrzawxvcwmywsc69lq0dzjnpdk96la"))))
+ (build-system python-build-system)
+ (arguments
+ (list
+ #:imported-modules `(,@%python-build-system-modules
+ (guix build qt-utils)
+ (guix build utils))
+ #:modules '((guix build python-build-system)
+ (guix build qt-utils)
+ (guix build utils))
+ #:phases #~(modify-phases %standard-phases
+ (delete 'check)
+ (replace 'install
+ (lambda _
+ (invoke "make" "install" "DESTDIR="
+ (string-append "PREFIX="
+ #$output))))
+ (add-after 'install 'wrap-qt
+ (lambda* (#:key inputs #:allow-other-keys)
+ (wrap-qt-program "syncplay"
+ #:output #$output
+ #:inputs inputs
+ #:qt-major-version "6"))))))
+ (native-inputs (list python-pyside-6))
+ (inputs (list bash-minimal
+ python-certifi
+ python-idna
+ python-service-identity
+ python-twisted
+ qtwayland))
+ (home-page "https://syncplay.pl")
+ (synopsis "Client/server to synchronize media playback on many computers")
+ (description
+ "Syncplay is a solution to synchronize video playback across multiple
+instances of media players over the Internet. When one person pauses/unpauses
+playback or skips to a position in the video, this is replicated across all
+media players connected to the same server and in the same \"room\" (viewing
+session). A built-in text chat for discussing the synced media is also
+included for convenience.")
+ (license license:asl2.0)))

base-commit: 78b881722f08325c76096557313a0faee847c66f
--
2.45.2
M
M
Maxim Cournoyer wrote on 10 Jul 04:46 +0200
(name . aurtzy)(address . aurtzy@gmail.com)(address . 65031@debbugs.gnu.org)
87jzhuufol.fsf@gmail.com
Hello!

aurtzy <aurtzy@gmail.com> writes:

Toggle quote (19 lines)
> * gnu/packages/video.scm (syncplay): New variable.
>
> Change-Id: I72cdfa3db2b4b7ef6c3ef0b8585d138c272046a7
> ---
>
> Hi Maxim,
>
> Just got around to looking at this package again with a new patch as things
> have changed since my last reply (and I didn't cc you before, oops..).
>
> In addition to addressing your initial review, notable changes from v2
> include:
>
> - Update to current latest version of Syncplay (1.7.3).
> - Patch is no longer needed.
> - This patch puts syncplay in (gnu packages video) instead of the previous
> (gnu packages networking) since the latter seemed more concerned with
> system-level networking. Does this make sense?

It does make sense :-). This sounds good.

[...]

Toggle quote (75 lines)
> gnu/packages/video.scm | 54 ++++++++++++++++++++++++++++++++++++++++++
> 1 file changed, 54 insertions(+)
>
> diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm
> index 411ad4c2bf..57a05f3eff 100644
> --- a/gnu/packages/video.scm
> +++ b/gnu/packages/video.scm
> @@ -68,6 +68,7 @@
> ;;; Copyright © 2023 Saku Laesvuori <saku@laesvuori.fi>
> ;;; Copyright © 2023 Jaeme Sifat <jaeme@runbox.com>
> ;;; Copyright © 2023 Zheng Junjie <873216071@qq.com>
> +;;; Copyright © 2024 aurtzy <aurtzy@gmail.com>
> ;;;
> ;;; This file is part of GNU Guix.
> ;;;
> @@ -6349,3 +6350,56 @@ (define-public svtplay-dl
> broadcasters including SVT Play, Sveriges Radio, TV4 Play, along with many
> others.")
> (license license:expat)))
> +
> +(define-public syncplay
> + (package
> + (name "syncplay")
> + (version "1.7.3")
> + (source
> + (origin
> + (method git-fetch)
> + (uri (git-reference
> + (url "https://github.com/Syncplay/syncplay")
> + (commit (string-append "v" version))))
> + (file-name (git-file-name name version))
> + (sha256
> + (base32 "08bgndszja4n2kql2qmzl6qrzawxvcwmywsc69lq0dzjnpdk96la"))))
> + (build-system python-build-system)
> + (arguments
> + (list
> + #:imported-modules `(,@%python-build-system-modules
> + (guix build qt-utils)
> + (guix build utils))
> + #:modules '((guix build python-build-system)
> + (guix build qt-utils)
> + (guix build utils))
> + #:phases #~(modify-phases %standard-phases
> + (delete 'check)
> + (replace 'install
> + (lambda _
> + (invoke "make" "install" "DESTDIR="
> + (string-append "PREFIX="
> + #$output))))
> + (add-after 'install 'wrap-qt
> + (lambda* (#:key inputs #:allow-other-keys)
> + (wrap-qt-program "syncplay"
> + #:output #$output
> + #:inputs inputs
> + #:qt-major-version "6"))))))
> + (native-inputs (list python-pyside-6))
> + (inputs (list bash-minimal
> + python-certifi
> + python-idna
> + python-service-identity
> + python-twisted
> + qtwayland))
> + (home-page "https://syncplay.pl")
> + (synopsis "Client/server to synchronize media playback on many computers")
> + (description
> + "Syncplay is a solution to synchronize video playback across multiple
> +instances of media players over the Internet. When one person pauses/unpauses
> +playback or skips to a position in the video, this is replicated across all
> +media players connected to the same server and in the same \"room\" (viewing
> +session). A built-in text chat for discussing the synced media is also
> +included for convenience.")
> + (license license:asl2.0)))
>
> base-commit: 78b881722f08325c76096557313a0faee847c66f

This looks well crafted! Thank you!

Reviewed-by: Maxim Cournoyer <maxim.cournoyer@gmail>
?
Your comment

Commenting via the web interface is currently disabled.

To comment on this conversation send an email to 65031@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 65031
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch