projects/guix·blob javascript-team · refs

84 lines · 3.7 KiB

1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2016 Matthew Jordan <[email protected]>
3;;; Copyright © 2016 Ludovic Courtès <[email protected]>
4;;; Copyright © 2019 Ricardo Wurmus <[email protected]>
5;;; Copyright © 2019, 2020, 2023 Tobias Geerinckx-Rice <[email protected]>
6;;; Copyright © 2020 Jakub Kądziołka <[email protected]>
7;;; Copyright © 2021 Solene Rapenne <[email protected]>
8;;; Copyright © 2022 jgart <[email protected]>
9;;; Copyright © 2024 Artyom V. Poptsov <[email protected]>
10;;;
11;;; This file is part of GNU Guix.
12;;;
13;;; GNU Guix is free software; you can redistribute it and/or modify it
14;;; under the terms of the GNU General Public License as published by
15;;; the Free Software Foundation; either version 3 of the License, or (at
16;;; your option) any later version.
17;;;
18;;; GNU Guix is distributed in the hope that it will be useful, but
19;;; WITHOUT ANY WARRANTY; without even the implied warranty of
20;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21;;; GNU General Public License for more details.
22;;;
23;;; You should have received a copy of the GNU General Public License
24;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
25
26(define-module (gnu packages entr)
27 #:use-module (gnu packages base)
28 #:use-module (gnu packages bash)
29 #:use-module (gnu packages ncurses)
30 #:use-module (guix licenses)
31 #:use-module (guix packages)
32 #:use-module (guix download)
33 #:use-module (guix build-system gnu)
34 #:use-module (guix utils))
35
36(define-public entr
37 (package
38 (name "entr")
39 (version "5.8")
40 (source
41 (origin
42 (method url-fetch)
43 (uri (string-append "https://eradman.com/entrproject/code/entr-"
44 version ".tar.gz"))
45 (sha256
46 (base32 "1yrb2brrgzab1l0dxyizmzjjsj96vqrg9kfqq40fjavbapf2p6nw"))))
47 (build-system gnu-build-system)
48 (arguments
49 `(#:test-target "test"
50 #:phases (modify-phases %standard-phases
51 (replace 'configure
52 (lambda* (#:key outputs #:allow-other-keys)
53 (let ((out (assoc-ref outputs "out")))
54 (setenv "CONFIG_SHELL"
55 (which "bash"))
56 (setenv "CC"
57 ,(cc-for-target))
58 (setenv "PREFIX" out)
59 (setenv "MANPREFIX"
60 (string-append out "/man"))
61 (invoke "./configure"))))
62 (add-before 'build 'remove-fhs-file-names
63 (lambda* (#:key inputs #:allow-other-keys)
64 (substitute* "entr.c"
65 (("/bin/sh" command)
66 (search-input-file inputs command))
67 (("/bin/cat" command)
68 (search-input-file inputs command))
69 (("/usr(/bin/clear)" _ command)
70 (search-input-file inputs command))))))))
71 (inputs (list bash-minimal coreutils))
72 (home-page "https://eradman.com/entrproject/")
73 (synopsis "Run arbitrary commands when files change")
74 (description
75 "@acronym{entr, event notify test runner} reads a list of file names from
76standard input and executes a given command (including arguments) whenever any
77of them change. It aims to facilitate rapid feedback and automated testing.
78
79For example, you can use @command{entr} to automatically invoke @command{make}
80each time you modify a source code file. It supports interactive utilities and
81doesn't waste resources by polling for changes.")
82
83 ;; Per 'LICENSE', portability code under missing/ is under BSD-2.
84 (license isc)))