Archived
1
0
Fork 0

gnu: direvent: Use G-expressions.

* gnu/packages/admin.scm (direvent)[source, arguments]:
Rewrite using G-expressions.  Don't explicitly return #t from phases.
This commit is contained in:
Tobias Geerinckx-Rice 2022-01-04 04:33:12 +01:00
parent 99e4e23411
commit 65fdb84d7c
No known key found for this signature in database
GPG key ID: 0DB0FF884F556D79

View file

@ -76,6 +76,7 @@
#:use-module (guix build-system trivial) #:use-module (guix build-system trivial)
#:use-module (guix download) #:use-module (guix download)
#:use-module (guix git-download) #:use-module (guix git-download)
#:use-module (guix gexp)
#:use-module ((guix licenses) #:prefix license:) #:use-module ((guix licenses) #:prefix license:)
#:use-module (guix packages) #:use-module (guix packages)
#:use-module (guix utils) #:use-module (guix utils)
@ -2387,30 +2388,28 @@ features of ls(1), find(1), stat(1) and du(1).")
(base32 (base32
"0m9vi01b1km0cpknflyzsjnknbava0s1n6393b2bpjwyvb6j5613")) "0m9vi01b1km0cpknflyzsjnknbava0s1n6393b2bpjwyvb6j5613"))
(modules '((guix build utils))) (modules '((guix build utils)))
(snippet '(begin (snippet
(substitute* "tests/testsuite" #~(begin
(("#![[:blank:]]?/bin/sh") (substitute* "tests/testsuite"
"#!$SHELL")) (("#![[:blank:]]?/bin/sh")
#t)))) "#!$SHELL"))))))
(build-system gnu-build-system) (build-system gnu-build-system)
(arguments (arguments
'(#:phases (list #:phases
(modify-phases %standard-phases #~(modify-phases %standard-phases
(add-before 'build 'patch-/bin/sh (add-before 'build 'patch-/bin/sh
(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 'shell.at' test accordingly.
(substitute* "tests/testsuite" (substitute* "tests/testsuite"
(("SHELL=/bin/sh") (("SHELL=/bin/sh")
(string-append "SHELL=" bash "/bin/sh"))) (string-append "SHELL=" bash "/bin/sh")))))))))
#t))))))
(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