entr.scm 2.7 KB

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