diff options
author | Nicolas Graves <[email protected]> | 2025-02-22 18:19:55 +0100 |
---|---|---|
committer | Sharlatan Hellseher <[email protected]> | 2025-03-07 20:53:58 +0000 |
commit | dd03c5f9c9a7d0632e600fcdf77ef0b17902bb69 (patch) | |
tree | d82a0f3c7d3c1b0e628f40fd104536693d8ffaf3 /gnu/packages/task-runners.scm | |
parent | ad01d433adce750282f09c0499285573a538dcaf (diff) |
gnu: task-spooler: Update to 1.0.3.
* gnu/packages/task-runners.scm: Sort modules.
(task-spooler): Update to 1.0.3.
[arguments]: Rewrite using gexps. Improve 'check phase.
[inputs]: Improve style.
Signed-off-by: Sharlatan Hellseher <[email protected]>
Diffstat (limited to 'gnu/packages/task-runners.scm')
-rw-r--r-- | gnu/packages/task-runners.scm | 67 |
1 files changed, 35 insertions, 32 deletions
diff --git a/gnu/packages/task-runners.scm b/gnu/packages/task-runners.scm index eb64f432e8..5c9e058f20 100644 --- a/gnu/packages/task-runners.scm +++ b/gnu/packages/task-runners.scm @@ -2,6 +2,7 @@ ;;; Copyright © 2021 Stefan Reichör <[email protected]> ;;; Copyright © 2021 Ivan Gankevich <[email protected]> ;;; Copyright © 2024 Sharlatan Hellseher <[email protected]> +;;; Copyright © 2025 Nicolas Graves <[email protected]> ;;; ;;; This file is part of GNU Guix. ;;; @@ -19,17 +20,18 @@ ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. (define-module (gnu packages task-runners) - #:use-module ((guix licenses) #:prefix license:) - #:use-module (guix packages) - #:use-module (guix download) - #:use-module (guix git-download) - #:use-module (guix utils) #:use-module (gnu packages bash) #:use-module (gnu packages compression) #:use-module (gnu packages golang-xyz) #:use-module (gnu packages mail) #:use-module (guix build-system gnu) - #:use-module (guix build-system go)) + #:use-module (guix build-system go) + #:use-module (guix download) + #:use-module (guix gexp) + #:use-module (guix git-download) + #:use-module ((guix licenses) #:prefix license:) + #:use-module (guix packages) + #:use-module (guix utils)) (define-public run (package @@ -63,54 +65,55 @@ using a Runfile.") (define-public task-spooler (package (name "task-spooler") - (version "1.0.1") + (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 "0y32sm2i2jxs88c307h76449fynk75p9qfw1k11l5ixrn03z67pl")))) + "https://vicerveza.homeunix.net/~viric/soft/ts/ts-" + version ".tar.gz")) + (sha256 + (base32 "0a5l8bjq869lvqys3amsil933vmm9b387axp1jv3bi9xah8k70zs")))) (build-system gnu-build-system) (arguments - `(#:make-flags - (let ((c-flags "-g -O2")) - (list (string-append "PREFIX=" (assoc-ref %outputs "out")) - ,(string-append "CC=" (cc-for-target)) + (list + #:make-flags + #~(let ((c-flags "-g -O2")) + (list (string-append "PREFIX=" #$output) + #$(string-append "CC=" (cc-for-target)) (string-append "CFLAGS=" c-flags))) - #:phases - (modify-phases %standard-phases + #:phases + #~(modify-phases %standard-phases (delete 'configure) ;; no configuration script (add-after 'unpack 'rename-and-patch-paths - (lambda _ + (lambda* (#:key inputs #:allow-other-keys) ;; Rename "ts" to "tsp" to not interfere with "ts" command ;; from moreutils package. (rename-file "ts.1" "tsp.1"); (substitute* '("Makefile" "testbench.sh") (("\\bts\\b") "tsp")) ;; Patch gzip/sendmail/shell paths. - (substitute* "execute.c" - (("execlp\\(\"gzip\"") - (format #f "execlp(\"~a/bin/gzip\"" - (assoc-ref %build-inputs "gzip")))) + (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"))) - (substitute* "env.c" - (("execlp\\(\"/bin/sh\"") - (format #f "execlp(\"~a/bin/sh\"" - (assoc-ref %build-inputs "bash")))) (substitute* "mail.c" (("execl\\(\"/usr/sbin/sendmail\"") - (format #f "execl(\"~a/sbin/sendmail\"" - (assoc-ref %build-inputs "sendmail")))))) + (format #f "execl(~s" + (search-input-file inputs "/sbin/sendmail")))))) (replace 'check (lambda* (#:key tests? #:allow-other-keys) - (when tests? - (setenv "PATH" (string-join (list (getenv "PATH") (getcwd)) ":")) - (invoke "./testbench.sh"))))))) + (if tests? + (begin + (setenv "PATH" + (string-append (getenv "PATH") ":" (getcwd))) + (invoke "./testbench.sh")) + (format #t "test suite not run ~%"))))))) (inputs - `(("bash" ,bash-minimal) - ("gzip" ,gzip) - ("sendmail" ,sendmail))) + (list bash-minimal gzip sendmail)) (synopsis "UNIX task queue system") (description "Task spooler lets users run shell commands asynchronously one after the other in a separate process.") |