projects/guix·blob python-team · refs

673 lines · 25.6 KiB

1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2025 Nicolas Graves <[email protected]>
3;;;
4;;; This file is part of GNU Guix.
5;;;
6;;; GNU Guix is free software; you can redistribute it and/or modify it
7;;; under the terms of the GNU General Public License as published by
8;;; the Free Software Foundation; either version 3 of the License, or (at
9;;; your option) any later version.
10;;;
11;;; GNU Guix is distributed in the hope that it will be useful, but
12;;; WITHOUT ANY WARRANTY; without even the implied warranty of
13;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14;;; GNU General Public License for more details.
15;;;
16;;; You should have received a copy of the GNU General Public License
17;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
18
19(define-module (gnu packages emacs-build)
20 #:use-module ((guix licenses) #:prefix license:)
21 #:use-module (guix gexp)
22 #:use-module (guix download)
23 #:use-module (guix git-download)
24 #:use-module (guix packages)
25 #:use-module (guix build-system copy)
26 #:use-module (guix build-system emacs)
27 #:use-module (gnu packages)
28 #:use-module (gnu packages base)
29 #:use-module (gnu packages bash)
30 #:use-module (gnu packages emacs)
31 #:use-module (gnu packages linux)
32 #:use-module (gnu packages texinfo)
33 #:use-module (gnu packages version-control))
34
35(define-public emacs-ansi
36 (let ((commit "2367fba7b3b2340364a30cd6de7f3eb6bb9898a3")
37 (revision "2"))
38 (package
39 (name "emacs-ansi")
40 (version (git-version "0.4.1" revision commit))
41 (source
42 (origin
43 (method git-fetch)
44 (uri (git-reference
45 (url "https://github.com/rejeep/ansi.el")
46 (commit commit)))
47 (file-name (git-file-name name version))
48 (sha256
49 (base32 "1n7h6l4icm6lks3zpvd83j1fzrnspw19rmz7c96vy7pdh1y4v3p3"))))
50 (build-system emacs-build-system)
51 ;; Tests for emacs-ansi have a circular dependency with ert-runner, and
52 ;; therefore cannot be run
53 (arguments (list #:tests? #f))
54 (home-page "https://github.com/rejeep/ansi.el")
55 (synopsis "Convert strings to ANSI")
56 (description "@code{emacs-ansi} defines functions that turns simple
57strings to ANSI strings. Turning a string into an ANSI string can be to add
58color to a text, add color in the background of a text or adding a style, such
59as bold, underscore or italic.")
60 (license license:gpl3+))))
61
62(define-public emacs-buttercup
63 (package
64 (name "emacs-buttercup")
65 (version "1.41")
66 (source
67 (origin
68 (method git-fetch)
69 (uri (git-reference
70 (url "https://github.com/jorgenschaefer/emacs-buttercup")
71 (commit (string-append "v" version))))
72 (file-name (git-file-name name version))
73 (sha256
74 (base32
75 "0bffsszxibv00bxk807n9zk23qjnrzi3jzk1l207ls0njn4bwh67"))))
76 (build-system emacs-build-system)
77 (arguments
78 (list
79 #:test-command #~(list "make" "test")
80 #:phases
81 #~(modify-phases %standard-phases
82 (add-after 'install 'install-bin
83 (lambda _
84 (install-file "bin/buttercup"
85 (string-append #$output "/bin")))))))
86 (home-page "https://github.com/jorgenschaefer/emacs-buttercup")
87 (synopsis "Behavior driven emacs lisp testing framework")
88 (description "Buttercup is a behavior-driven development framework for
89testing Emacs Lisp code. It groups related tests so they can share
90common set-up and tear-down code, and allows the programmer to \"spy\" on
91functions to ensure they are called with the right arguments during testing.")
92 (license license:gpl3+)))
93
94(define-public emacs-compat
95 (package
96 (name "emacs-compat")
97 (version "31.1.0.0")
98 (source (origin
99 (method git-fetch)
100 (uri (git-reference
101 (url "https://github.com/emacs-compat/compat")
102 (commit version)))
103 (file-name (git-file-name name version))
104 (sha256
105 (base32
106 "19706p8g1pq1dgp2j8a5bl1a62f288ksanbb09901q874g32n0my"))))
107 (build-system emacs-build-system)
108 (arguments
109 (list
110 #:test-command #~(list "make" "test")
111 #:phases
112 #~(modify-phases %standard-phases
113 (add-before 'check 'fix-tests
114 (lambda _
115 (setenv "HOME" (getcwd))
116 (substitute* "compat-tests.el"
117 ;; Tell tramp to our local PATH for the mock remote PATH
118 (("\\(require 'tramp\\)" all)
119 (string-append
120 all "\n"
121 "(add-to-list 'tramp-remote-path 'tramp-own-remote-path)"))
122 ;; Skip some tests.
123 ;; The "package-get-version" test would pass if we
124 ;; byte-compiled the tests.
125 ;; The "exec-path" test looks for "/bin" in out PATH.
126 (("\\(ert-deftest compat-(package-get-version|exec-path) .*" all)
127 (string-append all " (skip-unless nil)")))))
128 (add-before 'install 'make-doc
129 (lambda _
130 (invoke "make" "compat.info"))))))
131 (native-inputs (list texinfo))
132 (home-page "https://elpa.gnu.org/packages/compat.html")
133 (synopsis "Emacs Lisp compatibility library")
134 (description
135 "To allow for the usage of Emacs functions and macros that are defined
136in newer versions of Emacs, @code{compat.el} provides definitions that
137are installed ONLY if necessary. These reimplementations of functions
138and macros are at least subsets of the actual implementations. Be
139sure to read the documentation string to make sure.
140
141Not every function provided in newer versions of Emacs is provided
142here. Some depend on new features from the core, others cannot be
143implemented to a meaningful degree. The main audience for this
144library are not regular users, but package maintainers. Therefore
145commands and user options are usually not implemented here.")
146 (license license:gpl3+)))
147
148(define-public emacs-commander
149 (package
150 (name "emacs-commander")
151 (version "0.7.0")
152 (source
153 (origin
154 (method git-fetch)
155 (uri (git-reference
156 (url "https://github.com/rejeep/commander.el")
157 (commit (string-append "v" version))))
158 (file-name (git-file-name name version))
159 (sha256
160 (base32 "1j6hhyzww7wfwk6bllbb5mk4hw4qs8hsgfbfdifsam9c6i4spm45"))))
161 (build-system emacs-build-system)
162 ;; Tests for emacs-commander have a circular dependency with ert-runner, and
163 ;; therefore cannot be run
164 (arguments (list #:tests? #f))
165 (propagated-inputs
166 (list emacs-dash emacs-f emacs-s))
167 (home-page "https://github.com/rejeep/commander.el")
168 (synopsis "Emacs command line parser")
169 (description "@code{emacs-commander} provides command line parsing for
170Emacs.")
171 (license license:gpl3+)))
172
173(define-public emacs-dash
174 (package
175 (name "emacs-dash")
176 (version "2.20.0")
177 (source
178 (origin
179 (method git-fetch)
180 (uri (git-reference
181 (url "https://github.com/magnars/dash.el")
182 (commit version)))
183 (file-name (git-file-name name version))
184 (sha256
185 (base32 "092kf61bi6dwl42yng69g3y55ni8afycqbpaqx9wzf8frx9myg6m"))))
186 (build-system emacs-build-system)
187 (arguments
188 (list #:phases
189 #~(modify-phases %standard-phases
190 (add-after 'unpack 'disable-byte-compile-error-on-warn
191 (lambda _
192 (substitute* "Makefile"
193 (("\\(setq byte-compile-error-on-warn t\\)")
194 "(setq byte-compile-error-on-warn nil)")))))))
195 (home-page "https://github.com/magnars/dash.el")
196 (synopsis "Modern list library for Emacs")
197 (description "This package provides a modern list API library for Emacs.")
198 (license license:gpl3+)))
199
200(define-public emacs-ecukes
201 (package
202 (name "emacs-ecukes")
203 (version "0.6.18")
204 (source
205 (origin
206 (method git-fetch)
207 (uri (git-reference
208 (url "https://github.com/ecukes/ecukes")
209 (commit (string-append "v" version))))
210 (file-name (git-file-name name version))
211 (sha256
212 (base32 "182qgddfv8nd89y1l55rs5vm5i61ayc8cxbplb8zx0alnid9xrw1"))))
213 (build-system emacs-build-system)
214 (arguments
215 `(#:include (cons* "^feature/" "^reporters/" "^templates/" %default-include)
216 ;; 4 unexpected results:
217 ;; FAILED ecukes-run-test/run-step-async-callbacked-no-arg
218 ;; FAILED ecukes-run-test/run-step-async-callbacked-with-arg
219 ;; FAILED ecukes-run-test/run-step-async-callbacked-with-arg-and-args
220 ;; FAILED ecukes-run-test/run-step-async-with-timeout
221 #:tests? #f))
222 (propagated-inputs
223 (list emacs-ansi
224 emacs-commander
225 emacs-dash
226 emacs-espuds
227 emacs-f
228 emacs-s))
229 (home-page "https://github.com/ecukes/ecukes")
230 (synopsis "Cucumber for Emacs")
231 (description
232 "This package provides Ecukes, a Cucumber-inspired integration testing
233tool for Emacs. Ecukes is not a complete clone of Cucumber and is not
234intended to be.")
235 (license license:gpl3+)))
236
237(define-public emacs-eldev
238 (package
239 (name "emacs-eldev")
240 (version "1.11.2")
241 (source
242 (origin
243 (method git-fetch)
244 (uri (git-reference
245 (url "https://github.com/emacs-eldev/eldev")
246 (commit version)))
247 (file-name (git-file-name name version))
248 (sha256
249 (base32 "1khqapvgm1y3svzb3pr6s1a3b6mzxdwy1cybbnssaxlvfjvgyvaz"))))
250 (build-system emacs-build-system)
251 (arguments
252 (list
253 #:test-command #~(list "./bin/eldev" "-p" "-dtTC" "test")
254 #:phases
255 #~(modify-phases %standard-phases
256 (add-after 'unpack 'prepare-for-tests
257 (lambda _
258 (setenv "ELDEV_LOCAL" (getcwd))
259 (make-file-writable "test/project-i/project-i-autoloads.el")))
260 (add-after 'unpack 'skip-failing-tests
261 (lambda _
262 (substitute* "test/package.el"
263 (("\\(ert-deftest eldev-package-3 .*" all)
264 (string-append all " (skip-unless nil)")))
265 ;; FIXME: 2 tests are failing. Skip them for now.
266 (delete-file "test/upgrade-self.el")))
267 (add-after 'install 'install-eldev-executable
268 ;; This constructs the eldev executable from templates and
269 ;; installs it in the specified directory.
270 (lambda _
271 (let ((bin (string-append #$output "/bin"))
272 (site-lisp (elpa-directory #$output)))
273 (mkdir-p bin)
274 (setenv "HOME" (getcwd))
275 (invoke "./install.sh" bin)
276 (substitute* (string-append bin "/eldev")
277 ;; Point ELDEV_LOCAL to the installation directory so that
278 ;; eldev doesn't try to bootstrap itself from MELPA when
279 ;; invoked.
280 (("export ELDEV_EMACS.*" all)
281 (string-append "export ELDEV_LOCAL=" site-lisp "\n" all)))))))))
282 (native-inputs
283 (list texinfo)) ;for tests
284 (home-page "https://github.com/emacs-eldev/eldev/")
285 (synopsis "Emacs-based build tool for Elisp")
286 (description "Eldev (Elisp Development Tool) is an Emacs-based build tool,
287targeted solely at Elisp projects. It is an alternative to Cask. Unlike
288Cask, Eldev itself is fully written in Elisp and its configuration files are
289also Elisp programs. For those familiar with the Java world, Cask can be seen
290as a parallel to Maven — it uses project description, while Eldev is sort of a
291parallel to Gradle — its configuration is a program on its own.")
292 (license license:gpl3+)))
293
294(define-public emacs-el-mock
295 (let ((commit "6cfbc9de8f1927295dca6864907fe4156bd71910")
296 (revision "1"))
297 (package
298 (name "emacs-el-mock")
299 (version (git-version "1.25.1" revision commit))
300 (source
301 (origin
302 (method git-fetch)
303 (uri (git-reference
304 (url "https://github.com/rejeep/el-mock.el")
305 (commit commit)))
306 (file-name (git-file-name name version))
307 (sha256
308 (base32 "09c3a1771v6kliwj0bn953pxxyjlk6q9kp31cxcr0nraik7d0mhk"))))
309 (build-system emacs-build-system)
310 (native-inputs (list emacs-ert-runner
311 emacs-ert-expectations
312 emacs-undercover))
313 (home-page "https://github.com/rejeep/el-mock.el")
314 (synopsis "Tiny mock and stub framework in Emacs Lisp")
315 (description
316 "Emacs Lisp Mock is a library for mocking and stubbing using readable
317syntax. Most commonly Emacs Lisp Mock is used in conjunction with Emacs Lisp
318Expectations, but it can be used in other contexts.")
319 (license license:gpl3+))))
320
321(define-public emacs-ert-async
322 (package
323 (name "emacs-ert-async")
324 (version "0.1.2")
325 (source
326 (origin
327 (method git-fetch)
328 (uri (git-reference
329 (url "https://github.com/rejeep/ert-async.el")
330 (commit (string-append "v" version))))
331 (file-name (git-file-name name version))
332 (sha256
333 (base32
334 "0hn9i405nfhjd1h9vnwj43nxbbz00khrwkjq0acfyxjaz1shfac9"))))
335 (build-system emacs-build-system)
336 (home-page "https://github.com/rejeep/ert-async.el")
337 (synopsis "Async support for ERT")
338 (description "This package allows ERT to work with asynchronous tests.")
339 (license license:gpl3+)))
340
341(define-public emacs-ert-expectations
342 (package
343 (name "emacs-ert-expectations")
344 (version "0.2")
345 (source
346 (origin
347 (method url-fetch)
348 (uri "https://www.emacswiki.org/emacs/download/ert-expectations.el")
349 (sha256
350 (base32
351 "0cwy3ilsid90abzzjb7ha2blq9kmv3gfp3icwwfcz6qczgirq6g7"))))
352 (build-system emacs-build-system)
353 (home-page "https://www.emacswiki.org/emacs/ert-expectations.el")
354 (synopsis "Simple unit test framework for Emacs Lisp")
355 (description "@code{emacs-ert-expectations} is a simple unit test
356framework for Emacs Lisp to be used with @code{ert}.")
357 (license license:gpl3+)))
358
359(define-public emacs-ert-runner
360 (package
361 (name "emacs-ert-runner")
362 (version "0.8.0")
363 (source
364 (origin
365 (method git-fetch)
366 (uri (git-reference
367 (url "https://github.com/rejeep/ert-runner.el")
368 (commit (string-append "v" version))))
369 (file-name (git-file-name name version))
370 (sha256
371 (base32
372 "08gygn9fjank5gpi4v6ynrkn0jbknxbwsn7md4p9ndygdbmnkf98"))
373 ;; Vendored, outdated copy of ert.el to support Emacs versions before
374 ;; 24.1.
375 (snippet #~(begin (delete-file "ert-compat.el")))))
376 (build-system emacs-build-system)
377 (inputs
378 (list bash-minimal
379 emacs-ansi
380 emacs-commander
381 emacs-dash
382 emacs-f
383 emacs-s
384 emacs-shut-up))
385 ;; Tests for ert-runner have a circular dependency with ecukes, and therefore
386 ;; cannot be run
387 (arguments
388 `(#:tests? #f
389 #:phases
390 (modify-phases %standard-phases
391 (add-after 'install 'install-executable
392 (lambda* (#:key inputs outputs #:allow-other-keys)
393 (let ((out (assoc-ref outputs "out"))
394 (source-directory (string-append
395 (getenv "TMPDIR") "/source")))
396 (substitute* "bin/ert-runner"
397 (("ERT_RUNNER=\"\\$\\(dirname \\$\\(dirname \\$0\\)\\)")
398 (string-append "ERT_RUNNER=\"" (elpa-directory out))))
399 (install-file "bin/ert-runner" (string-append out "/bin"))
400 (wrap-program (string-append out "/bin/ert-runner")
401 (list "EMACSLOADPATH" ":" 'prefix
402 ;; Do not capture the transient source directory in
403 ;; the wrapper.
404 (delete source-directory
405 (string-split (getenv "EMACSLOADPATH")
406 #\:))))))))
407 #:include (cons* "^reporters/.*\\.el$" %default-include)))
408 (home-page "https://github.com/rejeep/ert-runner.el")
409 (synopsis "Opinionated Ert testing workflow")
410 (description "@code{ert-runner} is a tool for Emacs projects tested
411using ERT. It assumes a certain test structure setup and can therefore make
412running tests easier.")
413 (license license:gpl3+)))
414
415(define-public emacs-espuds
416 (package
417 (name "emacs-espuds")
418 (version "0.3.3")
419 (source
420 (origin
421 (method git-fetch)
422 (uri (git-reference
423 (url "https://github.com/ecukes/espuds")
424 (commit (string-append "v" version))))
425 (file-name (git-file-name name version))
426 (sha256
427 (base32 "16r4j27j9yfdiy841w9q5ykkc6n3wrm7hvfacagb32mydk821ijg"))))
428 (build-system emacs-build-system)
429 (arguments (list #:tests? #f)) ; XXX: test defined twice
430 (propagated-inputs
431 (list emacs-s emacs-dash emacs-f))
432 (home-page "https://github.com/ecukes/espuds")
433 (synopsis "Common step definitions for Ecukes")
434 (description "Espuds is a collection of the most commonly used step
435definitions for testing with the Ecukes framework.")
436 (license license:gpl3+)))
437
438(define-public emacs-f
439 (package
440 (name "emacs-f")
441 (version "0.21.0")
442 (source (origin
443 (method git-fetch)
444 (uri (git-reference
445 (url "https://github.com/rejeep/f.el")
446 (commit (string-append "v" version))))
447 (file-name (git-file-name name version))
448 (sha256
449 (base32
450 "0ccrcfhqfbv9qff38sfym69mai7k7z89yndi6nip8wi5hpd2addc"))))
451 (build-system emacs-build-system)
452 (arguments (list #:tests? #f)) ; circular dependency on ert-runner
453 (propagated-inputs
454 (list emacs-s emacs-dash))
455 (home-page "https://github.com/rejeep/f.el")
456 (synopsis "Emacs API for working with files and directories")
457 (description "This package provides an Emacs library for working with
458files and directories.")
459 (license license:gpl3+)))
460
461(define-public emacs-package-lint
462 (package
463 (name "emacs-package-lint")
464 (version "0.26")
465 (source
466 (origin
467 (method git-fetch)
468 (uri (git-reference
469 (url "https://github.com/purcell/package-lint")
470 (commit version)))
471 (file-name (git-file-name name version))
472 (sha256
473 (base32
474 "0x1ikwfz1zr8bl8a67kgcbyzrqxnn6bslbz6pdfaczmshy7ry757"))))
475 (arguments
476 (list #:include #~(cons "^data/" %default-include)
477 #:tests? #f ; XXX: 8/92 tests failing
478 #:test-command #~(list "make" "test" "INIT_PACKAGES=t")))
479 (build-system emacs-build-system)
480 (propagated-inputs (list emacs-compat))
481 (home-page "https://github.com/purcell/package-lint")
482 (synopsis "Linting library for Elisp package authors")
483 (description
484 "This provides a list of issues with the Emacs package metadata of a file,
485e.g., the package dependencies it requires. Checks will currently be enabled
486only if a @samp{Package-Requires:} or @samp{Package-Version:} header is
487present in the file.")
488 (license license:gpl3+)))
489
490(define-public emacs-s
491 (package
492 (name "emacs-s")
493 (version "1.13.0")
494 (source
495 (origin
496 (method git-fetch)
497 (uri (git-reference
498 (url "https://github.com/magnars/s.el")
499 (commit version)))
500 (file-name (git-file-name name version))
501 (sha256
502 (base32 "010i92kagqbfis46n1ffa28fgkdkjp55n13b6f4izar5r7ixm6wx"))))
503 (build-system emacs-build-system)
504 (arguments
505 `(#:test-command '("./run-tests.sh")))
506 (home-page "https://github.com/magnars/s.el")
507 (synopsis "Emacs string manipulation library")
508 (description "This package provides an Emacs library for manipulating
509strings.")
510 (license license:gpl3+)))
511
512(define-public emacs-shut-up
513 (package
514 (name "emacs-shut-up")
515 (version "0.3.3")
516 (source
517 (origin
518 (method git-fetch)
519 (uri (git-reference
520 (url "https://github.com/cask/shut-up")
521 (commit (string-append "v" version))))
522 (file-name (git-file-name name version))
523 (sha256
524 (base32 "1bnmrwrhra6cpc3jjgwwzrydj5ps7q2dlkh2ag4j7rkyv4dlk351"))))
525 (build-system emacs-build-system)
526 (arguments (list #:tests? #f)) ; circular dependency on ert-runner
527 (home-page "https://github.com/cask/shut-up")
528 (synopsis "Silence Emacs")
529 (description "This package silences most output of Emacs when running an
530Emacs shell script.")
531 (license license:expat)))
532
533(define-public emacs-undercover
534 (package
535 (name "emacs-undercover")
536 (version "0.8.1")
537 (source
538 (origin
539 (method git-fetch)
540 (uri (git-reference
541 (url "https://github.com/sviridov/undercover.el")
542 (commit (string-append "v" version))))
543 (file-name (git-file-name name version))
544 (sha256
545 (base32 "0qmvyy3xg5qi7ws8zcs934d6afsappr1a6pgfp796xpa9vdr4y6j"))))
546 (build-system emacs-build-system)
547 (propagated-inputs
548 (list emacs-dash emacs-shut-up))
549 (home-page "https://github.com/sviridov/undercover.el")
550 (synopsis "Test coverage library for Emacs Lisp")
551 (description
552 "Undercover is a test coverage library for software written in Emacs
553Lisp.")
554 (license license:expat)))
555
556(define-public makel
557 (package
558 (name "makel")
559 (version "1.0.0")
560 (source
561 (origin
562 (method git-fetch)
563 (uri (git-reference
564 (url "https://github.com/DamienCassou/makel")
565 (commit (string-append "v" version))))
566 (file-name (git-file-name name version))
567 (sha256
568 (base32 "143bdy4c81jbmp5sk1arnlmpc4dsw85n601x9rii2dgyn186l8si"))))
569 (build-system copy-build-system)
570 (arguments
571 (list
572 #:modules
573 #~((guix build copy-build-system)
574 (guix build utils)
575 (srfi srfi-1)
576 (srfi srfi-26)
577 (ice-9 ftw))
578 #:install-plan
579 #~'(("makel.mk" "include/")
580 ("README.org" "share/docs/"))
581 #:phases
582 #~(modify-phases %standard-phases
583 (add-before 'install 'inject-deps
584 (lambda _
585 (substitute* "makel.mk"
586 (("^MAKEL_LOAD_PATH=(.*)$" all rest)
587 (string-append
588 "MAKEL_LOAD_PATH=-L "
589 (string-join
590 (filter-map
591 (lambda (dir)
592 (let ((path (scandir dir)))
593 (and (eq? (length path) 3) ; removes emacs
594 (string-append dir "/" (last path)))))
595 (string-split (getenv "EMACSLOADPATH") #\:))
596 " -L ")
597 " " rest)))))
598 (add-before 'install 'check
599 (lambda* (#:key tests? #:allow-other-keys)
600 (if tests?
601 (with-directory-excursion "test"
602 (invoke "bash" "run-tests.sh"))
603 (format #f "Test suite not run.~%")))))))
604 (native-inputs
605 (list bash-minimal emacs-minimal))
606 (inputs
607 (list emacs-buttercup emacs-package-lint))
608 (home-page "https://github.com/DamienCassou/makel")
609 (synopsis "Makefile to help checking Emacs packages")
610 (description
611 "This package provides a Makefile to help checking Emacs packages.")
612 (license license:gpl3+)))
613
614;; This is an alternative version patches for internal Guix tests.
615;; The user-facing version is in emacs-xyz.scm
616(define-public makem-minimal
617 (package
618 (name "makem")
619 (version "0.7.1")
620 (source
621 (origin
622 (method git-fetch)
623 (uri (git-reference
624 (url "https://github.com/alphapapa/makem.sh")
625 (commit (string-append "v" version))))
626 (file-name (git-file-name name version))
627 (sha256
628 (base32 "1xqwfxkxgpcm3k2m2shwkwrm4asl59ik8867c3k1iwfj8xzfp089"))
629 (modules '((guix build utils)))
630 (snippet #~(begin
631 (delete-file-recursively "images")))))
632 (build-system emacs-build-system)
633 (arguments
634 (let ((patch (local-file
635 (car (search-patches "makem-replace-git.patch")))))
636 (list
637 #:tests? #f
638 #:modules
639 '((guix build emacs-build-system)
640 (guix build utils)
641 (guix build emacs-utils)
642 (srfi srfi-26))
643 #:phases
644 #~(modify-phases %standard-phases
645 (add-after 'unpack 'patch-file
646 (lambda* (#:key inputs #:allow-other-keys)
647 (invoke (search-input-file inputs "bin/patch")
648 "--force" "--no-backup-if-mismatch"
649 "-p1" "--input" #$patch)))
650 (add-after 'install 'install-bin
651 (lambda _
652 (let ((bin (string-append #$output "/bin")))
653 (mkdir-p bin)
654 (install-file "makem.sh" bin))))
655 (add-after 'install-bin 'wrap-script
656 (lambda* (#:key inputs outputs #:allow-other-keys)
657 (wrap-program (string-append #$output "/bin/makem.sh")
658 `("PATH" ":" prefix
659 ,(map dirname
660 (map (cut search-input-file inputs <>)
661 (list "bin/find"
662 "bin/grep"
663 "bin/sed"
664 ;; for util-linux
665 "bin/uuidgen")))))))))))
666 (native-inputs (list patch))
667 (inputs
668 (list coreutils-minimal grep sed util-linux)) ; for getopt
669 (home-page "https://github.com/alphapapa/makem.sh")
670 (synopsis "Makefile-like script to help checking Emacs packages")
671 (description "This package provides a Makefile-like script and a transient
672menu for linting and testing Emacs packages.")
673 (license license:gpl3+)))