gnu: watcher: Update to 0.13.6-0.0aff9ee.

* gnu/packages/file-systems.scm (watcher): Update to 0.13.6-0.0aff9ee.
[#:phases] <fix-.pc-files-prefix>: New phase.
<check>: Remove patching of 'which'.

Change-Id: I9c70e953ee322d11854836bc6dffd80b89359861
This commit is contained in:
Maxim Cournoyer 2025-08-14 16:13:23 +09:00
parent 4bddd3bab4
commit f645ec5cfe
No known key found for this signature in database
GPG key ID: 1260E46482E63562

View file

@ -2496,34 +2496,55 @@ filtering and ordering functionality.
(license license:gpl3+))) (license license:gpl3+)))
(define-public watcher (define-public watcher
(let ((commit "0aff9ee86f0b62f17d7b0105cae6304ef1bcfbb2")
(revision "0"))
(package (package
(name "watcher") (name "watcher")
(version "0.13.6") (version (git-version "0.13.6" revision commit))
(source (origin (source (origin
(method git-fetch) (method git-fetch)
(uri (git-reference (uri (git-reference
(url "https://github.com/e-dant/watcher") (url "https://github.com/e-dant/watcher")
(commit version))) (commit commit)))
(file-name (git-file-name name version)) (file-name (git-file-name name version))
(sha256 (sha256
(base32 (base32
"1ikcdskb3z3wggxb12vi0y3rng2hcswl0fpk6sjqqlz34nvwijcr")))) "10bwdqnhgpsk2w60331npspkqjvdgb0jh2by89g8d3hwfjibk3p4"))))
(build-system cmake-build-system) (build-system cmake-build-system)
(arguments (arguments
(list #:configure-flags (list
;; The test suite is currently flaky
;; (see: https://github.com/e-dant/watcher/issues/85).
#:tests? #f
#:configure-flags
#~(list "-DBUILD_TESTING=ON" #~(list "-DBUILD_TESTING=ON"
;; This is needed to find 'snitch' from the system. ;; This is needed to find 'snitch' from the system.
"-DFETCHCONTENT_TRY_FIND_PACKAGE_MODE=ALWAYS") "-DFETCHCONTENT_TRY_FIND_PACKAGE_MODE=ALWAYS")
#:phases #:phases
#~(modify-phases %standard-phases #~(modify-phases %standard-phases
(add-after 'unpack 'fix-.pc-files-prefix
;; There are some issues with the new .pc files (see:
;; <https://github.com/e-dant/watcher/issues/82>).
(lambda _
(substitute* "CMakeLists.txt"
(("\"\\$\\{CMAKE_INSTALL_LIBDIR}\"")
"\"${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}\"")
(("\\$\\{CMAKE_INSTALL_INCLUDEDIR}/wtr")
"${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_INCLUDEDIR}/wtr"))
(substitute* "watcher.pc.in"
(("@PC_WATCHER_PREFIX@")
#$output))
(substitute* "watcher-c/watcher-c.pc.in"
(("@PC_LIBWATCHER_C_PREFIX@")
#$output))))
(replace 'check (replace 'check
(lambda* (#:key tests? #:allow-other-keys) (lambda* (#:key tests? #:allow-other-keys)
(when tests?
(setenv "PATH" (string-append (getcwd) ":" (getenv "PATH"))) (setenv "PATH" (string-append (getcwd) ":" (getenv "PATH")))
(substitute* "../source/tool/test/.ctx" (substitute* "../source/tool/test/.ctx"
(("../../out") (("../../out")
"../../../build") "../../../build"))
(("which") "command -v")) (invoke "../source/tool/test/all")))))))
(invoke "../source/tool/test/all"))))))
(native-inputs (list jq snitch)) (native-inputs (list jq snitch))
(home-page "https://github.com/e-dant/watcher") (home-page "https://github.com/e-dant/watcher")
(synopsis "File system watcher program and library") (synopsis "File system watcher program and library")
@ -2540,4 +2561,4 @@ Command-line interface (CLI)
@item @command{tw} @item @command{tw}
Minimal, more human-readable CLI variant Minimal, more human-readable CLI variant
@end table") @end table")
(license license:expat))) (license license:expat))))