diff options
| -rw-r--r-- | gnu/local.mk | 1 | ||||
| -rw-r--r-- | gnu/packages/gnome.scm | 72 | ||||
| -rw-r--r-- | gnu/packages/patches/showtime-python-3.11-compat.patch | 18 |
3 files changed, 91 insertions, 0 deletions
diff --git a/gnu/local.mk b/gnu/local.mk index 8ae27188e9b..fc3bb46bc95 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -2427,6 +2427,7 @@ dist_patch_DATA = \ %D%/packages/patches/shakespeare-spl-fix-grammar.patch \ %D%/packages/patches/shared-mime-info-xdgmime-path.patch \ %D%/packages/patches/sharutils-CVE-2018-1000097.patch \ + %D%/packages/patches/showtime-python-3.11-compat.patch \ %D%/packages/patches/sipwitch-fix-build-with-exosip5.patch \ %D%/packages/patches/slim-config.patch \ %D%/packages/patches/slim-gcc-14.patch \ diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm index 2a5214943e1..0661621ae4d 100644 --- a/gnu/packages/gnome.scm +++ b/gnu/packages/gnome.scm @@ -6489,6 +6489,78 @@ for application developers. This package provides plugins for common media discovery protocols.") (license license:lgpl2.1+))) +(define-public showtime + (package + (name "showtime") + (version "50.0") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://gitlab.gnome.org/GNOME/showtime") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "190xsv4csdj8xfh1rv3yvls5m63k6aca4sh5pmqk6r18bz03jj40")) + (patches (search-patches "showtime-python-3.11-compat.patch")))) + (build-system meson-build-system) + (arguments + (list + #:imported-modules (append %meson-build-system-modules + %pyproject-build-system-modules) + #:modules `((guix build meson-build-system) + ((guix build pyproject-build-system) #:prefix py:) + (guix build utils)) + #:glib-or-gtk? #t + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'skip-gtk-update-icon-cache + (lambda _ + (substitute* "meson.build" + (("gtk_update_icon_cache: true") + "gtk_update_icon_cache: false") + (("glib_compile_schemas: true") + "glib_compile_schemas: false") + (("update_desktop_database: true") + "update_desktop_database: false")))) + (add-after 'install 'add-install-to-pythonpath + (assoc-ref py:%standard-phases 'add-install-to-pythonpath)) + (add-after 'add-install-to-pythonpath 'wrap-python + (assoc-ref py:%standard-phases 'wrap)) + (add-after 'wrap-python 'gi-wrap + (lambda _ + (wrap-program (string-append #$output "/bin/showtime") + `("GI_TYPELIB_PATH" prefix + (,(getenv "GI_TYPELIB_PATH"))) + `("GST_PLUGIN_SYSTEM_PATH" prefix + (,(getenv "GST_PLUGIN_SYSTEM_PATH"))))))))) + (native-inputs + (list blueprint-compiler + desktop-file-utils + gettext-minimal + `(,glib "bin") + `(,gtk "bin") + pkg-config)) + (inputs + (list bash-minimal + gstreamer + gst-plugins-bad ;for GstPlay + gst-plugins-rs + `(,gst-plugins-rs "video") + gobject-introspection ;for cairo-1.0.typelib + gtk + libadwaita + python + python-pygobject)) + (home-page "https://gitlab.gnome.org/GNOME/showtime") + (synopsis "Video player") + (description "Showtime, also known as Video Player in GNOME, is a modern +video player that aims to be simple to use, avoiding distractions. Showtime +features simple playback controls that fade out of the way when watching, +fullscreen, adjustable playback speed, multiple language and subtitle tracks +as well as the ability to take screenshots.") + (license license:gpl3+))) + (define-public totem (package (name "totem") diff --git a/gnu/packages/patches/showtime-python-3.11-compat.patch b/gnu/packages/patches/showtime-python-3.11-compat.patch new file mode 100644 index 00000000000..462513b96c7 --- /dev/null +++ b/gnu/packages/patches/showtime-python-3.11-compat.patch @@ -0,0 +1,18 @@ +Temporary patch to undo some Python 3.12 specific syntax until we have 3.12+ in Guix. + +diff -u /tmp/guix-build-showtime-50.0.drv-0/source/showtime/widgets/window.py.old /tmp/guix-build-showtime-50.0.drv-0/source/showtime/widgets/window.py +--- a/showtime/widgets/window.py.old 2026-03-15 22:57:05.619357847 +0900 ++++ b/showtime/widgets/window.py 2026-03-15 22:56:47.823332531 +0900 +@@ -1057,7 +1057,5 @@ + return + + Gtk.FileDialog( +- initial_name=f"{ +- get_title(self.play.get_media_info()) or _('Unknown Title') +- } {nanoseconds_to_timestamp(self.play.get_position(), hours=True)}.png" ++ initial_name=f"{get_title(self.play.get_media_info()) or _('Unknown Title')} {nanoseconds_to_timestamp(self.play.get_position(), hours=True)}.png" + ).save(self, None, self._save_screenshot, texture.save_to_png_bytes()) + + def _save_screenshot( + +Diff finished. Sun Mar 15 22:57:13 2026 |
