| 1 | |
| 2 | |
| 3 | |
| 4 | |
| 5 | |
| 6 | |
| 7 | |
| 8 | |
| 9 | |
| 10 | |
| 11 | |
| 12 | |
| 13 | |
| 14 | |
| 15 | |
| 16 | |
| 17 | |
| 18 | |
| 19 | |
| 20 | |
| 21 | |
| 22 | |
| 23 | |
| 24 | |
| 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
|
| 76 | standard input and executes a given command (including arguments) whenever any
|
| 77 | of them change. It aims to facilitate rapid feedback and automated testing.
|
| 78 |
|
| 79 | For example, you can use @command{entr} to automatically invoke @command{make}
|
| 80 | each time you modify a source code file. It supports interactive utilities and
|
| 81 | doesn't waste resources by polling for changes.")
|
| 82 |
|
| 83 | |
| 84 | (license isc)))
|