projects/guix·blob python-team · refs

189 lines · 7.0 KiB

1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2021 Stefan Reichör <[email protected]>
3;;; Copyright © 2021 Ivan Gankevich <[email protected]>
4;;; Copyright © 2024-2025 Sharlatan Hellseher <[email protected]>
5;;; Copyright © 2025 Nicolas Graves <[email protected]>
6;;; Copyright © 2025 Junker <[email protected]>
7;;; Copyright © 2026 Ryan Prior <[email protected]>
8;;; Copyright © 2026 Sharlatan Hellseher <[email protected]>
9;;;
10;;; This file is part of GNU Guix.
11;;;
12;;; GNU Guix is free software; you can redistribute it and/or modify it
13;;; under the terms of the GNU General Public License as published by
14;;; the Free Software Foundation; either version 3 of the License, or (at
15;;; your option) any later version.
16;;;
17;;; GNU Guix is distributed in the hope that it will be useful, but
18;;; WITHOUT ANY WARRANTY; without even the implied warranty of
19;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20;;; GNU General Public License for more details.
21;;;
22;;; You should have received a copy of the GNU General Public License
23;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
24
25(define-module (gnu packages task-runners)
26 #:use-module (gnu packages bash)
27 #:use-module (gnu packages compression)
28 #:use-module (gnu packages golang-xyz)
29 #:use-module (gnu packages mail)
30 #:use-module (gnu packages scheme)
31 #:use-module (guix build-system copy)
32 #:use-module (guix build-system gnu)
33 #:use-module (guix build-system go)
34 #:use-module (guix download)
35 #:use-module (guix gexp)
36 #:use-module (guix git-download)
37 #:use-module ((guix licenses) #:prefix license:)
38 #:use-module (guix packages)
39 #:use-module (guix utils))
40
41(define-public faber
42 (package
43 (name "faber")
44 (version "0.1.1")
45 (source
46 (origin
47 (method git-fetch)
48 (uri (git-reference
49 (url "https://github.com/Junker/faber")
50 (commit version)))
51 (file-name (git-file-name name version))
52 (sha256
53 (base32 "17xjg92vwg7n06lx4xbsnd7wvsgqcw8h10ha5365rsfs49bd3cyf"))))
54 (inputs (list gauche))
55 (build-system copy-build-system)
56 (arguments
57 '(#:install-plan '(("faber" "bin/"))))
58 (synopsis "Task runner with power of Scheme")
59 (description "Faber is a CLI task runner designed to leverage the power and
60flexibility of Gauche Scheme.
61Unlike other build systems that rely on custom formats, Faber uses Gauche
62Scheme, allowing you to write build scripts using familiar Scheme syntax.")
63 (home-page "https://github.com/Junker/faber")
64 (license license:expat)))
65
66(define-public run
67 (package
68 (name "run")
69 (version "0.11.2")
70 (source
71 (origin
72 (method git-fetch)
73 (uri (git-reference
74 (url "https://github.com/TekWizely/run")
75 (commit (string-append "v" version))))
76 (file-name (git-file-name name version))
77 (sha256
78 (base32 "1p9hyc3zrjh58nqdc2j2qnkcyg7z8av2q7fb49ycs4292awl0zka"))))
79 (build-system go-build-system)
80 (arguments
81 (list
82 #:install-source? #f
83 #:import-path "github.com/tekwizely/run"))
84 (native-inputs
85 (list go-github-com-goreleaser-fileglob
86 go-github-com-subosito-gotenv
87 go-github-com-tekwizely-go-parsing))
88 (home-page "https://github.com/TekWizely/run")
89 (synopsis "Easily manage and invoke small scripts and wrappers")
90 (description
91 "Run is a tool to easily manage and invoke small scripts and wrappers by
92using a Runfile.")
93 (license license:expat)))
94
95(define-public task-spooler
96 (package
97 (name "task-spooler")
98 (version "1.0.3")
99 (source
100 (origin
101 (method url-fetch)
102 (uri (string-append "https://viric.name/soft/ts/ts-"
103 version ".tar.gz"))
104 (sha256
105 (base32 "0a5l8bjq869lvqys3amsil933vmm9b387axp1jv3bi9xah8k70zs"))))
106 (build-system gnu-build-system)
107 (arguments
108 (list
109 #:make-flags
110 #~(let ((c-flags "-g -O2"))
111 (list (string-append "PREFIX=" #$output)
112 (string-append "CC=" #$(cc-for-target))
113 (string-append "CFLAGS=" c-flags)))
114 #:phases
115 #~(modify-phases %standard-phases
116 (delete 'configure) ;; no configuration script
117 (add-after 'unpack 'rename-and-patch-paths
118 (lambda* (#:key inputs #:allow-other-keys)
119 ;; Rename "ts" to "tsp" to not interfere with "ts" command
120 ;; from moreutils package.
121 (rename-file "ts.1" "tsp.1");
122 (substitute* '("Makefile" "testbench.sh")
123 (("\\bts\\b") "tsp"))
124 ;; Patch gzip/sendmail/shell paths.
125 (substitute* '("execute.c" "list.c")
126 (("execlp\\(\"gzip\"")
127 (format #f "execlp(\"~a/bin/gzip\""
128 #$(this-package-input "gzip")))
129 (("execlp\\(\"sh\"")
130 (format #f "execlp(\"~a/bin/sh\""
131 #$(this-package-input "bash-minimal")))
132 (("/bin/sh\\b")
133 (format #f "~a/bin/sh"
134 #$(this-package-input "bash-minimal"))))
135 (substitute* "mail.c"
136 (("/usr/sbin/sendmail")
137 (format #f "~a/sbin/sendmail"
138 #$(this-package-input "sendmail"))))))
139 (replace 'check
140 (lambda* (#:key tests? #:allow-other-keys)
141 (if tests?
142 (begin
143 (setenv "PATH"
144 (string-append (getenv "PATH") ":" (getcwd)))
145 (invoke "./testbench.sh"))
146 (format #t "test suite not run ~%")))))))
147 (inputs
148 (list bash-minimal gzip sendmail))
149 (home-page "https://viric.name/soft/ts/")
150 (synopsis "UNIX task queue system")
151 (description
152 "Task spooler lets users run shell commands asynchronously one after the
153other in a separate process.")
154 (license license:gpl2+)))
155
156(define-public xc
157 (package
158 (name "xc")
159 (version "0.9.0")
160 (source
161 (origin
162 (method git-fetch)
163 (uri (git-reference
164 (url "https://github.com/joerdav/xc")
165 (commit (string-append "v" version))))
166 (file-name (git-file-name name version))
167 (sha256
168 (base32 "0m8r2mf98f6b6pzjaadg46y5j96byif4ybn5aczlzg7v64yi3v44"))))
169 (build-system go-build-system)
170 (arguments
171 (list
172 #:install-source? #f
173 #:import-path "github.com/joerdav/xc/cmd/xc"
174 #:unpack-path "github.com/joerdav/xc"
175 #:test-subdirs #~(list "../../...")))
176 (native-inputs
177 (list go-github-com-charmbracelet-bubbles
178 go-github-com-charmbracelet-bubbletea
179 go-github-com-charmbracelet-lipgloss
180 go-github-com-google-shlex
181 go-github-com-posener-complete-v2
182 go-mvdan-cc-sh-v3))
183 (home-page "https://xcfile.dev/")
184 (synopsis "Documentation-oriented task runner")
185 (description
186 "@code{xc} is a task runner inspired by @code{Make} and @code{npm run}
187that aims to be discoverable and approachable by fully integrating with
188project documentation.")
189 (license license:expat)))