From a5182cf20aaf4dab79f11bfa8545eadb9e4e867b Mon Sep 17 00:00:00 2001 From: Sharlatan Hellseher Date: Fri, 7 Mar 2025 21:28:32 +0000 Subject: [PATCH] gnu: task-spooler: Improve style, fix lint warnings. * gnu/packages/task-runners.scm (task-spooler): Fix indentation. [source] : Fix lint warning on permanent redirection. [arguments] : Apply G-Expressions on CC-FOR-TARGET. [phases] : Rewrite with THIS-PACKAGE-INPUTS and FORMAT. [description]: Start from a new line. [home-page]: Place before synopsis and fix lint warning on permanent redirection. Change-Id: Ib5fa07bca034050575b6aa5d5eff2028c9506332 --- gnu/packages/task-runners.scm | 45 +++++++++++++++++++---------------- 1 file changed, 24 insertions(+), 21 deletions(-) diff --git a/gnu/packages/task-runners.scm b/gnu/packages/task-runners.scm index 5c9e058f20..5a71d41314 100644 --- a/gnu/packages/task-runners.scm +++ b/gnu/packages/task-runners.scm @@ -1,7 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2021 Stefan Reichör ;;; Copyright © 2021 Ivan Gankevich -;;; Copyright © 2024 Sharlatan Hellseher +;;; Copyright © 2024-2025 Sharlatan Hellseher ;;; Copyright © 2025 Nicolas Graves ;;; ;;; This file is part of GNU Guix. @@ -67,20 +67,19 @@ using a Runfile.") (name "task-spooler") (version "1.0.3") (source - (origin - (method url-fetch) - (uri (string-append - "https://vicerveza.homeunix.net/~viric/soft/ts/ts-" - version ".tar.gz")) - (sha256 - (base32 "0a5l8bjq869lvqys3amsil933vmm9b387axp1jv3bi9xah8k70zs")))) + (origin + (method url-fetch) + (uri (string-append "https://viric.name/soft/ts/ts-" + version ".tar.gz")) + (sha256 + (base32 "0a5l8bjq869lvqys3amsil933vmm9b387axp1jv3bi9xah8k70zs")))) (build-system gnu-build-system) (arguments (list #:make-flags #~(let ((c-flags "-g -O2")) (list (string-append "PREFIX=" #$output) - #$(string-append "CC=" (cc-for-target)) + (string-append "CC=" #$(cc-for-target)) (string-append "CFLAGS=" c-flags))) #:phases #~(modify-phases %standard-phases @@ -94,16 +93,19 @@ using a Runfile.") (("\\bts\\b") "tsp")) ;; Patch gzip/sendmail/shell paths. (substitute* '("execute.c" "list.c") - (("execlp\\(\"(gzip|sh)\"" all exe) - (format #f "execlp(~s" - (search-input-file - inputs (string-append "/bin/" exe))))) - (substitute* "list.c" - (("/bin/sh\\b") (which "sh"))) + (("execlp\\(\"gzip\"") + (format #f "execlp(\"~a/bin/gzip\"" + #$(this-package-input "gzip"))) + (("execlp\\(\"sh\"") + (format #f "execlp(\"~a/bin/sh\"" + #$(this-package-input "bash-minimal"))) + (("/bin/sh\\b") + (format #f "~a/bin/sh" + #$(this-package-input "bash-minimal")))) (substitute* "mail.c" - (("execl\\(\"/usr/sbin/sendmail\"") - (format #f "execl(~s" - (search-input-file inputs "/sbin/sendmail")))))) + (("/usr/sbin/sendmail") + (format #f "~a/sbin/sendmail" + #$(this-package-input "sendmail")))))) (replace 'check (lambda* (#:key tests? #:allow-other-keys) (if tests? @@ -114,8 +116,9 @@ using a Runfile.") (format #t "test suite not run ~%"))))))) (inputs (list bash-minimal gzip sendmail)) + (home-page "https://viric.name/soft/ts/") (synopsis "UNIX task queue system") - (description "Task spooler lets users run shell commands asynchronously -one after the other in a separate process.") - (home-page "https://vicerveza.homeunix.net/~viric/soft/ts/") + (description + "Task spooler lets users run shell commands asynchronously one after the +other in a separate process.") (license license:gpl2+)))