gnu: r-biocviews: Update to 1.64.1.
[jackhill/guix/guix.git] / gnu / packages / entr.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2016 Matthew Jordan <matthewjordandevops@yandex.com>
3 ;;; Copyright © 2016 Ludovic Courtès <ludo@gnu.org>
4 ;;; Copyright © 2019 Ricardo Wurmus <rekado@elephly.net>
5 ;;; Copyright © 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
6 ;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
7 ;;; Copyright © 2021 Solene Rapenne <solene@perso.pw>
8 ;;;
9 ;;; This file is part of GNU Guix.
10 ;;;
11 ;;; GNU Guix is free software; you can redistribute it and/or modify it
12 ;;; under the terms of the GNU General Public License as published by
13 ;;; the Free Software Foundation; either version 3 of the License, or (at
14 ;;; your option) any later version.
15 ;;;
16 ;;; GNU Guix is distributed in the hope that it will be useful, but
17 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
18 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 ;;; GNU General Public License for more details.
20 ;;;
21 ;;; You should have received a copy of the GNU General Public License
22 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
23
24 (define-module (gnu packages entr)
25 #:use-module (gnu packages base)
26 #:use-module (gnu packages bash)
27 #:use-module (gnu packages ncurses)
28 #:use-module (guix licenses)
29 #:use-module (guix packages)
30 #:use-module (guix download)
31 #:use-module (guix build-system gnu)
32 #:use-module (guix utils))
33
34 (define-public entr
35 (package
36 (name "entr")
37 (version "4.9")
38 (source (origin
39 (method url-fetch)
40 (uri (string-append "http://entrproject.org/code/entr-"
41 version ".tar.gz"))
42 (sha256
43 (base32
44 "18h58k69f0qmqkknbcnhm5dz7mv5gr2blcq88qr62vz4zg9a8mp2"))))
45 (build-system gnu-build-system)
46 (arguments
47 `(#:test-target "test"
48 #:phases
49 (modify-phases %standard-phases
50 (replace 'configure
51 (lambda* (#:key outputs #:allow-other-keys)
52 (let ((out (assoc-ref outputs "out")))
53 (setenv "CONFIG_SHELL" (which "bash"))
54 (setenv "CC" ,(cc-for-target))
55 (setenv "PREFIX" out)
56 (setenv "MANPREFIX" (string-append out "/man"))
57 (invoke "./configure"))))
58 (add-before 'build 'remove-fhs-file-names
59 (lambda* (#:key inputs #:allow-other-keys)
60 (substitute* "entr.c"
61 (("/bin/sh" command)
62 (search-input-file inputs command))
63 (("/bin/cat" command)
64 (search-input-file inputs command))
65 (("/usr(/bin/clear)" _ command)
66 (search-input-file inputs command)))
67 #t)))))
68 (inputs
69 (list bash coreutils ncurses))
70 (home-page "http://entrproject.org/")
71 (synopsis "Run arbitrary commands when files change")
72 (description
73 "entr is a zero-configuration tool with no external build or run-time
74 dependencies. The interface to entr is not only minimal, it aims to be simple
75 enough to create a new category of ad hoc automation. These micro-tests
76 reduce keystrokes, but more importantly they emphasize the utility of
77 automated checks.")
78
79 ;; Per 'LICENSE', portability code under missing/ is under BSD-2.
80 (license isc)))