summaryrefslogtreecommitdiff
path: root/gnu/packages/image-viewers.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/image-viewers.scm')
-rw-r--r--gnu/packages/image-viewers.scm157
1 files changed, 112 insertions, 45 deletions
diff --git a/gnu/packages/image-viewers.scm b/gnu/packages/image-viewers.scm
index 3e1c30b8d7..8d31719ff8 100644
--- a/gnu/packages/image-viewers.scm
+++ b/gnu/packages/image-viewers.scm
@@ -15,22 +15,28 @@
;;; Copyright © 2020 Peng Mei Yu <pengmeiyu@riseup.net>
;;; Copyright © 2020 R Veera Kumar <vkor@vkten.in>
;;; Copyright © 2020 Pierre Neidhardt <mail@ambrevar.xyz>
+;;; Copyright © 2021 LibreMiami <packaging-guix@libremiami.org>
;;; Copyright © 2021 Rovanion Luckey <rovanion.luckey@gmail.com>
;;; Copyright © 2021 Xinglu Chen <public@yoctocell.xyz>
;;; Copyright © 2021 Stefan Reichör <stefan@xsteve.at>
;;; Copyright © 2021 Raghav Gururajan <rg@raghavgururajan.name>
;;; Copyright © 2021 jgart <jgart@dismail.de>
;;; Copyright © 2021 Guillaume Le Vaillant <glv@posteo.net>
+;;; Copyright © 2021 Vagrant Cascadian <vagrant@debian.org>
;;; Copyright © 2021 Zheng Junjie <873216071@qq.com>
;;; Copyright © 2021 dissent <disseminatedissent@protonmail.com>
;;; Copyright © 2022 Michael Rohleder <mike@rohleder.de>
-;;; Copyright © 2022, 2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+;;; Copyright © 2022, 2023 Maxim Cournoyer <maxim@guixotic.coop>
;;; Copyright © 2022 Tomasz Jeneralczyk <tj@schwi.pl>
;;; Copyright © 2022 Cairn <cairn@pm.me>
;;; Copyright © 2023 Florian Pelz <pelzflorian@pelzflorian.de>
;;; Copyright © 2024 Artyom V. Poptsov <poptsov.artyom@gmail.com>
;;; Copyright © 2025 Ashish SHUKLA <ashish.is@lostca.se>
;;; Copyright © 2025 Mathieu Laparie <mlaparie@disr.it>
+;;; Copyright © 2025 Joaquín Aguirrezabalaga <kinote@kinote.org>
+;;; Copyright © 2025 pinoaffe <pinoaffe@gmail.com>
+;;; Copyright © 2025 Zhu Zihao <all_but_last@163.com>
+;;; Copyright © 2025 Vinicius Monego <monego@posteo.net>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -56,6 +62,7 @@
#:use-module (guix utils)
#:use-module (guix build-system gnu)
#:use-module (guix build-system cmake)
+ #:use-module (guix build-system copy)
#:use-module (guix build-system go)
#:use-module (guix build-system meson)
#:use-module (guix build-system python)
@@ -207,7 +214,7 @@ opening the image directly in a terminal window.")
(string-append (assoc-ref inputs input) "/bin"))
'("bash" "catimg" "chafa" "coreutils" "curl"
"dmenu" "fzf" "gawk" "grep" "jp2a" "jq"
- "libnotify" "mpv" "ncurses" "python-ueberzug"
+ "libnotify" "mpv" "ncurses" "ueberzug"
"sed" "util-linux" "yt-dlp")))
`("YTFZF_SYSTEM_ADDON_DIR" ":" =
,(list (string-append #$output "/share/ytfzf/addons")))))))))
@@ -227,7 +234,7 @@ opening the image directly in a terminal window.")
mpv
ncurses
perl ;for convert-ascii-escape.pl
- python-ueberzug
+ ueberzug
sed
util-linux
yt-dlp))
@@ -721,9 +728,6 @@ imaging. It supports several HDR and LDR image formats, and it can:
(base32
"09y4nhlcqvvhz0wscx4zpqxmyhiwh8wrjnhk52awxhzvgyx6wa7r"))))
(build-system pyproject-build-system)
- (native-inputs (list python-wheel))
- (inputs
- (list p7zip python python-pillow python-pygobject python-pycairo gtk+))
(arguments
(list
#:imported-modules `(,@%pyproject-build-system-modules
@@ -745,31 +749,28 @@ imaging. It supports several HDR and LDR image formats, and it can:
(("assert name not in supported_formats_gdk")
"if name in supported_formats_gdk: continue"))))
(add-after 'install 'install-data
- (lambda* (#:key outputs #:allow-other-keys)
+ (lambda* (#:key inputs outputs #:allow-other-keys)
(with-directory-excursion "mcomix"
(for-each
(lambda (subdir)
(copy-recursively
subdir
(string-append
- (assoc-ref outputs "out")
- "/lib/python"
- #$(version-major+minor
- (package-version (this-package-input "python")))
- "/site-packages/mcomix/" subdir)))
+ (site-packages inputs outputs)
+ "/mcomix/" subdir)))
'("images" "messages")))))
(add-after 'install 'glib-or-gtk-compile-schemas
(assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-compile-schemas))
(add-after 'glib-or-gtk-compile-schemas 'glib-or-gtk-wrap
(assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-wrap))
(add-after 'wrap 'gi-wrap
- (lambda* (#:key outputs #:allow-other-keys)
- (let ((bin (string-append (assoc-ref outputs "out") "/bin")))
- (for-each
- (lambda (prog)
- (wrap-program prog
- `("GI_TYPELIB_PATH" = (,(getenv "GI_TYPELIB_PATH")))))
- (list (string-append bin "/mcomix")))))))))
+ (lambda _
+ (let ((prog (string-append #$output "/bin/mcomix")))
+ (wrap-program prog
+ `("GI_TYPELIB_PATH" = (,(getenv "GI_TYPELIB_PATH"))))))))))
+ (native-inputs (list python-setuptools))
+ (inputs
+ (list bash-minimal p7zip python python-pillow python-pygobject python-pycairo gtk+))
(home-page "https://sourceforge.net/p/mcomix/wiki/Home/")
(synopsis "Image viewer for comics")
(description "MComix is a customizable image viewer that specializes as
@@ -782,7 +783,7 @@ For PDF support, install the @emph{mupdf} package.")
(define-public qpageview
(package
(name "qpageview")
- (version "0.6.2")
+ (version "1.0.1")
(source (origin
(method git-fetch)
(uri (git-reference
@@ -791,15 +792,16 @@ For PDF support, install the @emph{mupdf} package.")
(file-name (git-file-name name version))
(sha256
(base32
- "0xdhiglzqxyp05blp66l52nbzbpn10hmdm2idhncz6pf7qw16lsw"))))
- (build-system python-build-system)
+ "0h3b7qhmjk1bz7ws7jwa9012wh2yvmk45j21ciyzj28mcjx9ygz4"))))
+ (build-system pyproject-build-system)
(home-page "https://qpageview.org/")
- (synopsis "Page based document viewer widget for Qt5/PyQt5")
+ (synopsis "Page based document viewer widget for Qt/PyQt")
(inputs
- (list python-pyqt qtbase-5))
+ (list python-pyqt-6 qtbase))
+ (native-inputs (list python-hatchling))
(description
- "@code{qpageview} provides a page based document viewer widget for Qt5
-and PyQt5. It has a flexible architecture potentionally supporting many
+ "@code{qpageview} provides a page based document viewer widget for Qt
+and PyQt. It has a flexible architecture potentionally supporting many
formats. Currently, it supports SVG documents, images, and, using the
Poppler-Qt5 binding, PDF documents.")
(license license:gpl3+)))
@@ -1156,7 +1158,7 @@ synchronization of multiple instances.")
(define-public hydrus-network
(package
(name "hydrus-network")
- (version "495") ;upstream has a weekly release cycle
+ (version "630") ;upstream has a weekly release cycle
(source
(origin
(method git-fetch)
@@ -1166,7 +1168,7 @@ synchronization of multiple instances.")
(file-name (git-file-name name version))
(sha256
(base32
- "03zhrcmjzbk37sl9nwjahfmr8aflss84c4xhg5ci5b8jvbbqmr1j"))
+ "0x133m93nx2rphs0zymmhfknp1274r2fh2jc91rrv9vmdqfh9yyc"))
(modules '((guix build utils)))
(snippet
;; Remove pre-built binaries from bin/.
@@ -1177,7 +1179,7 @@ synchronization of multiple instances.")
#:phases
#~(let ((static-dir "/share/hydrus/static"))
(modify-phases %standard-phases
- ;; Hydrus is a python program but does not uses setup.py or any
+ ;; Hydrus is a python program but does not use setup.py or any
;; other build system to build itself - it's delivered ready to
;; run from the source.
(replace 'check
@@ -1185,7 +1187,7 @@ synchronization of multiple instances.")
(setenv "DISPLAY" ":0")
(setenv "XDG_CACHE_HOME" (getcwd))
(setenv "HOME" (getcwd))
- (invoke "xvfb-run" "python" "test.py")))
+ (invoke "xvfb-run" "python" "hydrus_test.py")))
;; XXX: program help files are not built. Updating
;; python-pymdown-extensions to its latest version might be the
;; solution, but this would require also packaging its new build
@@ -1207,15 +1209,17 @@ synchronization of multiple instances.")
(substitute* "HydrusConstants.py"
(("STATIC_DIR = .*")
(string-append "STATIC_DIR = \"" out static-dir "\"\n")))
- (substitute* "HydrusFlashHandling.py"
- (("SWFRENDER_PATH = .*\n")
- (string-append "SWFRENDER_PATH = \"" swfrender "\"\n")))
- (substitute* "HydrusVideoHandling.py"
- (("FFMPEG_PATH = .*\n")
- (string-append "FFMPEG_PATH = \"" ffmpeg "\"\n")))
- (substitute* "networking/HydrusNATPunch.py"
- (("UPNPC_PATH = .*\n")
- (string-append "UPNPC_PATH = \"" upnpc "\"\n"))))))))
+ (with-directory-excursion "files"
+ (substitute* "HydrusFlashHandling.py"
+ (("SWFRENDER_PATH = .*\n")
+ (string-append "SWFRENDER_PATH = \"" swfrender "\"\n")))
+ (substitute* "HydrusVideoHandling.py"
+ (("FFMPEG_PATH = .*\n")
+ (string-append "FFMPEG_PATH = \"" ffmpeg "\"\n"))))
+ (with-directory-excursion "networking"
+ (substitute* "HydrusNATPunch.py"
+ (("UPNPC_PATH = .*\n")
+ (string-append "UPNPC_PATH = \"" upnpc "\"\n")))))))))
;; Since everything lives in hydrus's root directory, it needs to
;; be spread out to comply with guix's expectations.
(replace 'install
@@ -1232,9 +1236,9 @@ synchronization of multiple instances.")
#$(this-package-input "python"))
"/site-packages/hydrus"))
(mkdir (string-append out "/bin"))
- (copy-file "client.py" client)
+ (copy-file "hydrus_client.py" client)
(chmod client #o0555)
- (copy-file "server.py" server)
+ (copy-file "hydrus_server.py" server)
(chmod server #o0555))))))))
;; All native-inputs are only needed for the the check phase
(native-inputs
@@ -1248,6 +1252,7 @@ synchronization of multiple instances.")
python-cbor2
python-chardet
python-cloudscraper
+ python-dateparser
python-html5lib
python-lxml
python-lz4
@@ -1255,11 +1260,8 @@ synchronization of multiple instances.")
opencv ; its python bindings are a drop-in replacement for opencv-python-headless
python-pillow
python-psutil
- python-pylzma
python-pyopenssl
- ;; Since hydrus' version 494 it supports python-pyside-6 but it's not yet
- ;; in guix. pyside-2 is still supported as a fallback.
- python-pyside-2
+ python-pyside-6
python-pysocks
python-mpv
python-pyyaml
@@ -1281,6 +1283,44 @@ any user may run. Everything is free and privacy is the first concern.")
(home-page "https://hydrusnetwork.github.io/hydrus/")
(license license:wtfpl2)))
+(define-public ueberzug
+ (package
+ (name "ueberzug")
+ (version "18.3.1")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "ueberzug" version))
+ (sha256
+ (base32
+ "1sc05s72gvglsxsw4p0z5h47ygygw5h226vnaakas4ihjq9kiffl"))))
+ (build-system meson-build-system)
+ (arguments
+ (list #:tests? #f)) ; there are no tests
+ (native-inputs
+ (list pkg-config))
+ (inputs
+ (list libx11 libxext libxres))
+ (propagated-inputs
+ (list python-attrs python-docopt python-pillow))
+ (home-page "https://github.com/ueber-devel/ueberzug/")
+ (synopsis "Command line util to display images in combination with X11")
+ (description "Überzug is a command line util which draws images on
+terminals by using child windows. The advantages of using Überzug are:
+@itemize
+@item No race conditions as a new window is created to display images.
+@item Expose events will be processed, so images will be redrawn on switch
+workspaces.
+@item Tmux support (excluding multi pane windows).
+@item Terminals without the WINDOWID environment variable are supported.
+@item Chars are used as position - and size unit.
+@item No memory leak (/ unlimited cache).
+@end itemize")
+ (license license:gpl3+)))
+
+(define-public python-ueberzug
+ (deprecated-package "python-ueberzug" ueberzug))
+
(define-public vv
(package
(name "vv")
@@ -1341,3 +1381,30 @@ doesn't, it should support the Sixel protocol.")
(home-page "https://wolf.nereid.pl/posts/image-viewer/")
;; Author tried to make it BSD-3--but it uses a GPL library (poppler)
(license license:gpl2+)))
+
+(define-public lsix
+ (package
+ (name "lsix")
+ (version "1.9.1")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/hackerb9/lsix")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "1w4wgnkvvirpgxy00jlpw7p1pcflnwy3rwk5zwh4pkk3igpcdi4s"))))
+ (build-system copy-build-system)
+ (arguments
+ '(#:install-plan '(("lsix" "bin/"))))
+ (propagated-inputs (list imagemagick))
+ (home-page "https://github.com/hackerb9/lsix")
+ (synopsis "Show image thumbnails in the terminal")
+ (description
+ "@command{lsix} lists the images in a directory by displaying their thumbnails.
+Images are displayed in sixel graphics. @command{lsix} automatically detects
+terminal features and adapts the output to offer the highest quality possible.
+It can usually display non-bitmap graphics, including PDF. Your terminal should
+be sixel capable, like @command{xterm -ti vt340}.")
+ (license license:gpl3+)))