aboutsummaryrefslogtreecommitdiff
;;; 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, 2020, 2023 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
;;; Copyright © 2021 Solene Rapenne <solene@perso.pw>
;;; Copyright © 2022 jgart <jgart@dismail.de>
;;; Copyright © 2024 Artyom V. Poptsov <poptsov.artyom@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
;;; GNU Guix is free software; you can redistribute it and/or modify it
;;; under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 3 of the License, or (at
;;; your option) any later version.
;;;
;;; GNU Guix is distributed in the hope that it will be useful, but
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.

(define-module (gnu packages entr)
  #:use-module (gnu packages base)
  #:use-module (gnu packages bash)
  #:use-module (gnu packages ncurses)
  #:use-module (guix licenses)
  #:use-module (guix packages)
  #:use-module (guix download)
  #:use-module (guix build-system gnu)
  #:use-module (guix utils))

(define-public entr
  (package
    (name "entr")
    (version "5.5")
    (source (origin
              (method url-fetch)
              (uri (string-append "https://eradman.com/entrproject/code/entr-"
                                  version ".tar.gz"))
              (sha256
               (base32
                "09p5aqbb95bysdx73n094v0b07hn3v9kqg6k7yyycnpaxzi0r30j"))))
    (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" ,(cc-for-target))
               (setenv "PREFIX" out)
               (setenv "MANPREFIX" (string-append out "/man"))
               (invoke "./configure"))))
         (add-before 'build 'remove-fhs-file-names
           (lambda* (#:key inputs #:allow-other-keys)
             (substitute* "entr.c"
               (("/bin/sh" command)
                (search-input-file inputs command))
               (("/bin/cat" command)
                (search-input-file inputs command))
               (("/usr(/bin/clear)" _ command)
                (search-input-file inputs command))))))))
    (inputs
     (list bash coreutils ncurses))
    (home-page "https://eradman.com/entrproject/")
    (synopsis "Run arbitrary commands when files change")
    (description
     "@acronym{entr, event notify test runner} reads a list of file names from
standard input and executes a given command (including arguments) whenever any
of them change.  It aims to facilitate rapid feedback and automated testing.

For example, you can use @command{entr} to automatically invoke @command{make}
each time you modify a source code file.  It supports interactive utilities and
doesn't waste resources by polling for changes.")

    ;; Per 'LICENSE', portability code under missing/ is under BSD-2.
    (license isc)))
02dec039436964986'>doc: Move "Running the Test Suite" after "Building from Git"....Matthew Trzcinski 2024-04-06doc: Move "Requirements" before "Building from Git"...Matthew Trzcinski 2024-04-05doc: Explain to run bootstrap after Automake errors....Florian Pelz 2024-03-21doc: Add “Source Tree Structure” section....Ludovic Courtès 2024-02-03doc: contributing: Remove sentences appearing twice....Simon Tournier 2024-02-02doc: contributing: Fix typo....Simon Tournier 2024-02-02doc: Mention the responsibilities that blocking comes with....Maxim Cournoyer 2023-12-31doc: Use accurate wording in Emacs-Debbugs configuration....Florian Pelz 2023-12-11doc: suggest using pre-inst-env for git-send-email on foreign distros...Raphaël Mélotte 2023-12-04doc: Recommend building in ‘guix shell -CPW’....Ludovic Courtès 2023-11-20doc: contributing: Fix syntax in link....Ekaitz Zarraga 2023-11-07doc: Document extra Emacs-Debbugs configurations....Maxim Cournoyer 2023-11-07doc: Expound on the build-side versus host-side modules topic....Maxim Cournoyer 2023-11-07doc: Add some guidelines for reviewing....Maxim Cournoyer 2023-11-07doc: Update URL of Mumi git repository....Ricardo Wurmus 2023-11-05doc: contributing: Replace reference to dunst.scm....Jaeme Sifat 2023-11-01doc: contributiong: Fix ref usage....Julien Lepiller 2023-10-23doc: Document Cuirass build notifications....Maxim Cournoyer 2023-10-22build: Add a commit-msg hook that embeds Change-Id in commit messages....Maxim Cournoyer 2023-10-05doc: Suggest keeping record type descriptors private....Ludovic Courtès 2023-10-05doc: Update bug-reference configuration snippet....Mekeor Melire 2023-10-05doc: contributing: Add alternative setups section....Ekaitz Zarraga 2023-09-26doc: Update bug-reference configuration snippet....Maxim Cournoyer 2023-09-25doc: Add new 'Circular Module Dependencies' section....Maxim Cournoyer 2023-09-22doc: contributing: Clarify generating the pre-inst-env script....Efraim Flashner 2023-09-18maint: Support `guix shell' in Guix's git archive with manifest.scm....Janneke Nieuwenhuizen 2023-09-17.dir-locals.el: Update bug-reference configuration and document it....Maxim Cournoyer 2023-09-06.dir-locals: Streamline Geiser configuration....Maxim Cournoyer 2023-09-05doc: Document mumi command-line interface....Arun Isaac 2023-08-16doc: contributing: Mention the expected branch merge request format....Maxim Cournoyer