[PATCH] gnu: hydrus-network: Update to 636.

  • Open
  • quality assurance status badge
Details
One participant
  • Benjamin
Owner
unassigned
Submitted by
Benjamin
Severity
normal

Debbugs page

B
B
Benjamin wrote 4 days ago
(name . guix-patches@gnu.org)(address . guix-patches@gnu.org)
FP7Chf5ByYus3sUGK2rpu4WMFJy58Bcbsvhd1zr1WajmO7pBpjE9RQXuBsRh0NVo3bUeoXIvgE1PoRfjBVH_OTSvXoc9XyLd2IVYXPwsWm0=@forestentity.net
From eba4d0da5c01ce0efac6fffcd23f830d9b5fe1dd Mon Sep 17 00:00:00 2001
Message-ID: <eba4d0da5c01ce0efac6fffcd23f830d9b5fe1dd.1756683512.git.benjamin@forestentity.net>
From: Benjamin <benjamin@forestentity.net>
Date: Sun, 31 Aug 2025 19:17:37 -0400
Subject: [PATCH] gnu: hydrus-network: Update to 636.

* gnu/packages/image-viewers.scm (hydrus-network): Update to 636.
[source]: Removed snippet, Hydrus no longer ships pre-built binaries
[arguments] <patch-variables>: Removed phase, Hydrus paths were reworked and
these substitutes are no longer relevant or needed
[arguments] <install>: static directory is now copied to
/site-packages/static
[propagated-inputs]: Removed python-cloudscrapper and python-six, they are
no longer required
[inputs]: Removed swftools, no longer required
---
gnu/packages/image-viewers.scm | 164 +++++++++++++--------------------
1 file changed, 63 insertions(+), 101 deletions(-)

Toggle diff (190 lines)
diff --git a/gnu/packages/image-viewers.scm b/gnu/packages/image-viewers.scm
index af80f441c7..4a0890d66b 100644
--- a/gnu/packages/image-viewers.scm
+++ b/gnu/packages/image-viewers.scm
@@ -1156,7 +1156,7 @@ (define-public xzgv
(define-public hydrus-network
(package
(name "hydrus-network")
- (version "630") ;upstream has a weekly release cycle
+ (version "636") ;upstream has a weekly release cycle
(source
(origin
(method git-fetch)
@@ -1165,112 +1165,74 @@ (define-public hydrus-network
(commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256
- (base32
- "0x133m93nx2rphs0zymmhfknp1274r2fh2jc91rrv9vmdqfh9yyc"))
- (modules '((guix build utils)))
- (snippet
- ;; Remove pre-built binaries from bin/.
- #~(for-each delete-file (find-files "bin" "^swfrender")))))
+ (base32 "0p1skd6gs14ic15w7mc5jpz5dxr8dhwdy7f7ryyg4m79pfmzaxpz"))))
(build-system python-build-system)
(arguments
(list
#:phases
- #~(let ((static-dir "/share/hydrus/static"))
- (modify-phases %standard-phases
- ;; 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
- (lambda _
- (setenv "DISPLAY" ":0")
- (setenv "XDG_CACHE_HOME" (getcwd))
- (setenv "HOME" (getcwd))
- (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
- ;; system that is not present in guix yet.
- (delete 'build)
- (add-before 'install 'patch-variables
- (lambda* (#:key outputs inputs #:allow-other-keys)
- (let ((ffmpeg (search-input-file inputs "/bin/ffmpeg"))
- (swfrender (search-input-file inputs "/bin/swfrender"))
- (upnpc (search-input-file inputs "/bin/upnpc"))
- (out (assoc-ref outputs "out")))
- (with-directory-excursion "hydrus"
- ;; Without this the program would incorrectly assume
- ;; that it uses user's ffmpeg binary when it isn't.
- (substitute* "client/ClientController.py"
- (("if (HydrusVideoHandling\\.FFMPEG_PATH).*" _ var)
- (string-append "if " var " == \"" ffmpeg "\":\n")))
- (with-directory-excursion "core"
- (substitute* "HydrusConstants.py"
- (("STATIC_DIR = .*")
- (string-append "STATIC_DIR = \"" out static-dir "\"\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
- (lambda* (#:key outputs #:allow-other-keys)
- (let* ((out (assoc-ref outputs "out"))
- (client (string-append out "/bin/hydrus"))
- (server (string-append out "/bin/hydrus-server")))
- (copy-recursively "static"
- (string-append out static-dir))
- (copy-recursively "hydrus"
- (string-append out
- "/lib/python"
- (python-version
- #$(this-package-input "python"))
- "/site-packages/hydrus"))
- (mkdir (string-append out "/bin"))
- (copy-file "hydrus_client.py" client)
- (chmod client #o0555)
- (copy-file "hydrus_server.py" server)
- (chmod server #o0555))))))))
+ #~(modify-phases %standard-phases
+ ;; 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
+ (lambda _
+ (setenv "DISPLAY" ":0")
+ (setenv "XDG_CACHE_HOME"
+ (getcwd))
+ (setenv "HOME"
+ (getcwd))
+ (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
+ ;; system that is not present in guix yet.
+ (delete 'build)
+ (replace 'install
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (client (string-append out "/bin/hydrus"))
+ (server (string-append out "/bin/hydrus-server")))
+ (copy-recursively "static"
+ (string-append out "/lib/python"
+ (python-version #$(this-package-input
+ "python"))
+ "/site-packages/static"))
+ (copy-recursively "hydrus"
+ (string-append out "/lib/python"
+ (python-version #$(this-package-input
+ "python"))
+ "/site-packages/hydrus"))
+ (mkdir (string-append out "/bin"))
+ (copy-file "hydrus_client.py" client)
+ (chmod client #o555)
+ (copy-file "hydrus_server.py" server)
+ (chmod server #o555)))))))
;; All native-inputs are only needed for the the check phase
- (native-inputs
- (list xvfb-run
- python-nose
- python-mock
- python-httmock))
+ (native-inputs (list xvfb-run python-nose python-mock python-httmock))
;; All python packages were taken from static/build_files/linux/requirements.txt
- (propagated-inputs
- (list python-beautifulsoup4
- python-cbor2
- python-chardet
- python-cloudscraper
- python-dateparser
- python-html5lib
- python-lxml
- python-lz4
- python-numpy
- opencv ; its python bindings are a drop-in replacement for opencv-python-headless
- python-pillow
- python-psutil
- python-pyopenssl
- python-pyside-6
- python-pysocks
- python-mpv
- python-pyyaml
- python-qtpy
- python-requests
- python-send2trash
- python-service-identity
- python-six
- python-twisted))
- (inputs
- (list swftools ffmpeg miniupnpc python))
+ (propagated-inputs (list python-beautifulsoup4
+ python-cbor2
+ python-chardet
+ python-dateparser
+ python-html5lib
+ python-lxml
+ python-lz4
+ python-numpy
+ ;; its python bindings are a drop-in replacement for opencv-python-headless
+ opencv
+ python-pillow
+ python-psutil
+ python-pyopenssl
+ python-pyside-6
+ python-pysocks
+ python-mpv
+ python-pyyaml
+ python-qtpy
+ python-requests
+ python-send2trash
+ python-service-identity
+ python-twisted))
+ (inputs (list ffmpeg miniupnpc python))
(synopsis "Organize your media with tags like a dektop booru")
(description
"The hydrus network client is an application written for

base-commit: 43bb79fc29e7f4f2ea06be138df195609b11ea97
--
2.50.1
Attachment: file
?
Your comment

Commenting via the web interface is currently disabled.

To comment on this conversation send an email to 79357@patchwise.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 79357
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