gnu: alacritty: Embed absolute references to required libraries.
[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 ;;;
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)
24 #:use-module (gnu packages base)
25 #:use-module (gnu packages bash)
26 #:use-module (gnu packages ncurses)
27 #:use-module (guix licenses)
28 #:use-module (guix packages)
29 #:use-module (guix download)
30 #:use-module (guix build-system gnu)
31 #:use-module (guix utils))
32
33 (define-public entr
34 (package
35 (name "entr")
36 (version "4.6")
37 (source (origin
38 (method url-fetch)
39 (uri (string-append "http://entrproject.org/code/entr-"
40 version ".tar.gz"))
41 (sha256
42 (base32
43 "0vcflgagna2gdlpjsd6748c73j2829xlhm276mi838zl1n121phn"))))
44 (build-system gnu-build-system)
45 (arguments
46 `(#:test-target "test"
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"))
53 (setenv "CC" ,(cc-for-target))
54 (setenv "PREFIX" out)
55 (setenv "MANPREFIX" (string-append out "/man"))
56 (invoke "./configure"))))
57 (add-before 'build 'remove-fhs-file-names
58 (lambda* (#:key inputs #:allow-other-keys)
59 (substitute* "entr.c"
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)))
66 #t)))))
67 (inputs
68 `(("bash" ,bash)
69 ("coreutils" ,coreutils)
70 ("ncurses" ,ncurses)))
71 (home-page "http://entrproject.org/")
72 (synopsis "Run arbitrary commands when files change")
73 (description
74 "entr is a zero-configuration tool with no external build or run-time
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)))