Commit | Line | Data |
---|---|---|
5d38aa08 MJ |
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> | |
fbc70c97 | 4 | ;;; Copyright © 2019 Ricardo Wurmus <rekado@elephly.net> |
16d3630b | 5 | ;;; Copyright © 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr> |
48970389 | 6 | ;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net> |
11ac8ac6 | 7 | ;;; Copyright © 2021 Solene Rapenne <solene@perso.pw> |
5d38aa08 MJ |
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) | |
a5ed8e0e TGR |
25 | #:use-module (gnu packages base) |
26 | #:use-module (gnu packages bash) | |
48970389 | 27 | #:use-module (gnu packages ncurses) |
5d38aa08 MJ |
28 | #:use-module (guix licenses) |
29 | #:use-module (guix packages) | |
30 | #:use-module (guix download) | |
a5ed8e0e TGR |
31 | #:use-module (guix build-system gnu) |
32 | #:use-module (guix utils)) | |
5d38aa08 MJ |
33 | |
34 | (define-public entr | |
35 | (package | |
36 | (name "entr") | |
11ac8ac6 | 37 | (version "4.9") |
5d38aa08 MJ |
38 | (source (origin |
39 | (method url-fetch) | |
40 | (uri (string-append "http://entrproject.org/code/entr-" | |
41 | version ".tar.gz")) | |
42 | (sha256 | |
43 | (base32 | |
11ac8ac6 | 44 | "18h58k69f0qmqkknbcnhm5dz7mv5gr2blcq88qr62vz4zg9a8mp2")))) |
5d38aa08 MJ |
45 | (build-system gnu-build-system) |
46 | (arguments | |
47 | `(#:test-target "test" | |
fbc70c97 RW |
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")) | |
a5ed8e0e | 54 | (setenv "CC" ,(cc-for-target)) |
6ad8fc65 TGR |
55 | (setenv "PREFIX" out) |
56 | (setenv "MANPREFIX" (string-append out "/man")) | |
fbc70c97 RW |
57 | (invoke "./configure")))) |
58 | (add-before 'build 'remove-fhs-file-names | |
a5ed8e0e | 59 | (lambda* (#:key inputs #:allow-other-keys) |
fbc70c97 | 60 | (substitute* "entr.c" |
a5ed8e0e | 61 | (("/bin/sh" command) |
bc64d955 | 62 | (search-input-file inputs command)) |
a5ed8e0e | 63 | (("/bin/cat" command) |
bc64d955 | 64 | (search-input-file inputs command)) |
a5ed8e0e | 65 | (("/usr(/bin/clear)" _ command) |
bc64d955 | 66 | (search-input-file inputs command))) |
fbc70c97 | 67 | #t))))) |
a5ed8e0e | 68 | (inputs |
8394619b | 69 | (list bash coreutils ncurses)) |
5d38aa08 MJ |
70 | (home-page "http://entrproject.org/") |
71 | (synopsis "Run arbitrary commands when files change") | |
72 | (description | |
6247431b | 73 | "entr is a zero-configuration tool with no external build or run-time |
5d38aa08 MJ |
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))) |