me
/
guix
Archived
1
0
Fork 0

gnu: direvent: Update to 5.3.

* gnu/packages/admin.scm (direvent): Update to 5.3.
[source]: Drop hard-to-maintain snippet…
[arguments]: …in favour of a wider regexp in the 'substitute-file-names
phase, renamed from 'patch-/bin/sh, as we also patch "/bin/kill" to keep
the tests passing.
master
Tobias Geerinckx-Rice 2022-01-04 05:06:11 +01:00
parent 65fdb84d7c
commit a0c6b55881
No known key found for this signature in database
GPG Key ID: 0DB0FF884F556D79
1 changed files with 10 additions and 14 deletions

View File

@ -2379,37 +2379,33 @@ features of ls(1), find(1), stat(1) and du(1).")
(define-public direvent (define-public direvent
(package (package
(name "direvent") (name "direvent")
(version "5.2") (version "5.3")
(source (origin (source (origin
(method url-fetch) (method url-fetch)
(uri (string-append "mirror://gnu/direvent/direvent-" (uri (string-append "mirror://gnu/direvent/direvent-"
version ".tar.gz")) version ".tar.gz"))
(sha256 (sha256
(base32 (base32
"0m9vi01b1km0cpknflyzsjnknbava0s1n6393b2bpjwyvb6j5613")) "15y4jk5vlcd003bvf42c6z9zd4gz4pwqpwaapqmyk7x4gnksh1cl"))))
(modules '((guix build utils)))
(snippet
#~(begin
(substitute* "tests/testsuite"
(("#![[:blank:]]?/bin/sh")
"#!$SHELL"))))))
(build-system gnu-build-system) (build-system gnu-build-system)
(arguments (arguments
(list #:phases (list #:phases
#~(modify-phases %standard-phases #~(modify-phases %standard-phases
(add-before 'build 'patch-/bin/sh (add-before 'build 'substitute-file-names
(lambda* (#:key inputs #:allow-other-keys) (lambda* (#:key inputs #:allow-other-keys)
;; Use the right shell when executing the watcher and ;; Use the right shell when executing the watcher and
;; user-provided shell commands. ;; user-provided shell commands.
(let ((bash (assoc-ref inputs "bash"))) (let ((bash (assoc-ref inputs "bash")))
(substitute* '("src/direvent.c" "src/progman.c") (substitute* '("src/direvent.c" "src/progman.c")
(("\"/bin/sh\"") (("\"/bin/sh\"")
(string-append "\"" bash "/bin/sh\""))) (string-append "\"" bash "/bin/sh\""))))
;; Adjust the 'shell.at' test accordingly. ;; Adjust the test suite similarly.
(substitute* "tests/testsuite" (substitute* "tests/testsuite"
(("SHELL=/bin/sh") (("(SHELL=|#![[:space:]]*)/bin/sh" _ prefix)
(string-append "SHELL=" bash "/bin/sh"))))))))) (string-append prefix (which "sh")))
(("/bin/kill")
(which "kill"))))))))
(home-page "https://www.gnu.org.ua/software/direvent/") (home-page "https://www.gnu.org.ua/software/direvent/")
(synopsis "Daemon to monitor directories for events such as file removal") (synopsis "Daemon to monitor directories for events such as file removal")
(description (description