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> |
5d38aa08 MJ |
7 | ;;; |
8 | ;;; This file is part of GNU Guix. | |
9 | ;;; | |
10 | ;;; GNU Guix is free software; you can redistribute it and/or modify it | |
11 | ;;; under the terms of the GNU General Public License as published by | |
12 | ;;; the Free Software Foundation; either version 3 of the License, or (at | |
13 | ;;; your option) any later version. | |
14 | ;;; | |
15 | ;;; GNU Guix is distributed in the hope that it will be useful, but | |
16 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of | |
17 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
18 | ;;; GNU General Public License for more details. | |
19 | ;;; | |
20 | ;;; You should have received a copy of the GNU General Public License | |
21 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. | |
22 | ||
23 | (define-module (gnu packages entr) | |
a5ed8e0e TGR |
24 | #:use-module (gnu packages base) |
25 | #:use-module (gnu packages bash) | |
48970389 | 26 | #:use-module (gnu packages ncurses) |
5d38aa08 MJ |
27 | #:use-module (guix licenses) |
28 | #:use-module (guix packages) | |
29 | #:use-module (guix download) | |
a5ed8e0e TGR |
30 | #:use-module (guix build-system gnu) |
31 | #:use-module (guix utils)) | |
5d38aa08 MJ |
32 | |
33 | (define-public entr | |
34 | (package | |
35 | (name "entr") | |
16d3630b | 36 | (version "4.6") |
5d38aa08 MJ |
37 | (source (origin |
38 | (method url-fetch) | |
39 | (uri (string-append "http://entrproject.org/code/entr-" | |
40 | version ".tar.gz")) | |
41 | (sha256 | |
42 | (base32 | |
16d3630b | 43 | "0vcflgagna2gdlpjsd6748c73j2829xlhm276mi838zl1n121phn")))) |
5d38aa08 MJ |
44 | (build-system gnu-build-system) |
45 | (arguments | |
46 | `(#:test-target "test" | |
fbc70c97 RW |
47 | #:phases |
48 | (modify-phases %standard-phases | |
49 | (replace 'configure | |
50 | (lambda* (#:key outputs #:allow-other-keys) | |
51 | (let ((out (assoc-ref outputs "out"))) | |
52 | (setenv "CONFIG_SHELL" (which "bash")) | |
a5ed8e0e | 53 | (setenv "CC" ,(cc-for-target)) |
6ad8fc65 TGR |
54 | (setenv "PREFIX" out) |
55 | (setenv "MANPREFIX" (string-append out "/man")) | |
fbc70c97 RW |
56 | (invoke "./configure")))) |
57 | (add-before 'build 'remove-fhs-file-names | |
a5ed8e0e | 58 | (lambda* (#:key inputs #:allow-other-keys) |
fbc70c97 | 59 | (substitute* "entr.c" |
a5ed8e0e TGR |
60 | (("/bin/sh" command) |
61 | (string-append (assoc-ref inputs "bash") command)) | |
62 | (("/bin/cat" command) | |
63 | (string-append (assoc-ref inputs "coreutils") command)) | |
64 | (("/usr(/bin/clear)" _ command) | |
65 | (string-append (assoc-ref inputs "ncurses") command))) | |
fbc70c97 | 66 | #t))))) |
a5ed8e0e TGR |
67 | (inputs |
68 | `(("bash" ,bash) | |
69 | ("coreutils" ,coreutils) | |
70 | ("ncurses" ,ncurses))) | |
5d38aa08 MJ |
71 | (home-page "http://entrproject.org/") |
72 | (synopsis "Run arbitrary commands when files change") | |
73 | (description | |
6247431b | 74 | "entr is a zero-configuration tool with no external build or run-time |
5d38aa08 MJ |
75 | dependencies. The interface to entr is not only minimal, it aims to be simple |
76 | enough to create a new category of ad hoc automation. These micro-tests | |
77 | reduce keystrokes, but more importantly they emphasize the utility of | |
78 | automated checks.") | |
79 | ||
80 | ;; Per 'LICENSE', portability code under missing/ is under BSD-2. | |
81 | (license isc))) |