Merge branch 'staging' into core-updates
[jackhill/guix/guix.git] / gnu / packages / entr.scm
index 11d28e6..cacb5ab 100644 (file)
@@ -1,6 +1,9 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2016 Matthew Jordan <matthewjordandevops@yandex.com>
 ;;; Copyright © 2016 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2019 Ricardo Wurmus <rekado@elephly.net>
+;;; Copyright © 2019 Tobias Geerinckx-Rice <me@tobias.gr>
+;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -18,6 +21,7 @@
 ;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
 
 (define-module (gnu packages entr)
+  #:use-module (gnu packages ncurses)
   #:use-module (guix licenses)
   #:use-module (guix packages)
   #:use-module (guix download)
 (define-public entr
   (package
     (name "entr")
-    (version "3.6")
+    (version "4.2")
     (source (origin
               (method url-fetch)
               (uri (string-append "http://entrproject.org/code/entr-"
                                   version ".tar.gz"))
               (sha256
                (base32
-                "1sy81np6kgmq04kfn2ckf4fp7jcf5d1963shgmapx3al3kc4c9x4"))))
+                "0w2xkf77jikcjh15fp9g7661ss30pz3jbnh261vqpaqavwah4c17"))))
     (build-system gnu-build-system)
     (arguments
      `(#:test-target "test"
-       #:phases (modify-phases %standard-phases
-                  (replace 'configure
-                    (lambda* (#:key outputs #:allow-other-keys)
-                      (let ((out (assoc-ref outputs "out")))
-                        (setenv "CONFIG_SHELL" (which "bash"))
-                        (setenv "CC" (which "gcc"))
-                        (setenv "DESTDIR" (string-append out "/"))
-                        (setenv "PREFIX" "")
-                        (setenv "MANPREFIX" "man")
-                        (zero? (system* "./configure")))))
-                  (add-before 'build 'remove-fhs-file-names
-                    (lambda _
-                      ;; Use the tools available in $PATH.
-                      (substitute* "entr.c"
-                        (("/bin/cat") "cat")
-                        (("/usr/bin/clear") "clear")))))))
+       #:phases
+       (modify-phases %standard-phases
+         (replace 'configure
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let ((out (assoc-ref outputs "out")))
+               (setenv "CONFIG_SHELL" (which "bash"))
+               (setenv "CC" (which "gcc"))
+               (setenv "DESTDIR" (string-append out "/"))
+               (setenv "PREFIX" "")
+               (setenv "MANPREFIX" "man")
+               (invoke "./configure"))))
+         (add-before 'build 'remove-fhs-file-names
+           (lambda _
+             (substitute* "entr.c"
+               (("/bin/sh") (which "sh"))
+               (("/bin/cat") (which "cat"))
+               (("/usr/bin/clear") (which "clear")))
+             #t)))))
+    ;; ncurses provides the `clear' binary
+    (inputs `(("ncurses" ,ncurses)))
     (home-page "http://entrproject.org/")
     (synopsis "Run arbitrary commands when files change")
     (description