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,38 +2496,59 @@ filtering and ordering functionality.
(license license:gpl3+))) (license license:gpl3+)))
(define-public watcher (define-public watcher
(package (let ((commit "0aff9ee86f0b62f17d7b0105cae6304ef1bcfbb2")
(name "watcher") (revision "0"))
(version "0.13.6") (package
(source (origin (name "watcher")
(method git-fetch) (version (git-version "0.13.6" revision commit))
(uri (git-reference (source (origin
(url "https://github.com/e-dant/watcher") (method git-fetch)
(commit version))) (uri (git-reference
(file-name (git-file-name name version)) (url "https://github.com/e-dant/watcher")
(sha256 (commit commit)))
(base32 (file-name (git-file-name name version))
"1ikcdskb3z3wggxb12vi0y3rng2hcswl0fpk6sjqqlz34nvwijcr")))) (sha256
(build-system cmake-build-system) (base32
(arguments "10bwdqnhgpsk2w60331npspkqjvdgb0jh2by89g8d3hwfjibk3p4"))))
(list #:configure-flags (build-system cmake-build-system)
#~(list "-DBUILD_TESTING=ON" (arguments
;; This is needed to find 'snitch' from the system. (list
"-DFETCHCONTENT_TRY_FIND_PACKAGE_MODE=ALWAYS") ;; The test suite is currently flaky
#:phases ;; (see: https://github.com/e-dant/watcher/issues/85).
#~(modify-phases %standard-phases #:tests? #f
(replace 'check #:configure-flags
(lambda* (#:key tests? #:allow-other-keys) #~(list "-DBUILD_TESTING=ON"
(setenv "PATH" (string-append (getcwd) ":" (getenv "PATH"))) ;; This is needed to find 'snitch' from the system.
(substitute* "../source/tool/test/.ctx" "-DFETCHCONTENT_TRY_FIND_PACKAGE_MODE=ALWAYS")
(("../../out") #:phases
"../../../build") #~(modify-phases %standard-phases
(("which") "command -v")) (add-after 'unpack 'fix-.pc-files-prefix
(invoke "../source/tool/test/all")))))) ;; There are some issues with the new .pc files (see:
(native-inputs (list jq snitch)) ;; <https://github.com/e-dant/watcher/issues/82>).
(home-page "https://github.com/e-dant/watcher") (lambda _
(synopsis "File system watcher program and library") (substitute* "CMakeLists.txt"
(description "Watcher may be used as a library or a program that can be (("\"\\$\\{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
(lambda* (#:key tests? #:allow-other-keys)
(when tests?
(setenv "PATH" (string-append (getcwd) ":" (getenv "PATH")))
(substitute* "../source/tool/test/.ctx"
(("../../out")
"../../../build"))
(invoke "../source/tool/test/all")))))))
(native-inputs (list jq snitch))
(home-page "https://github.com/e-dant/watcher")
(synopsis "File system watcher program and library")
(description "Watcher may be used as a library or a program that can be
used to efficiently watch a file system for changes. This package provides used to efficiently watch a file system for changes. This package provides
the following components: the following components:
@table @asis @table @asis
@ -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))))