@@ 15,7 15,7 @@
;;; Copyright © 2016 Ben Woodcroft <donttrustben@gmail.com>
;;; Copyright © 2016, 2023 Clément Lassieur <clement@lassieur.org>
;;; Copyright © 2016, 2017 Nikita <nikita@n0.is>
-;;; Copyright © 2016–2024 Arun Isaac <arunisaac@systemreboot.net>
+;;; Copyright © 2016–2025 Arun Isaac <arunisaac@systemreboot.net>
;;; Copyright © 2016–2022 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2016 Bake Timmons <b3timmons@speedymail.org>
;;; Copyright © 2017 Thomas Danckaert <post@thomasdanckaert.be>
@@ 1495,6 1495,68 @@ project)
@end itemize")
(license license:bsd-2)))
+(define-public webhook
+ (package
+ (name "webhook")
+ (version "2.8.2")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/adnanh/webhook")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "15cihbf49kbhgwavjsvl4qfcf3lyqa39vyqdxglmnkn603c3nk6w"))
+ (modules '((guix build utils)))
+ (snippet
+ #~(begin
+ ;; Remove bundled dependencies.
+ (delete-file-recursively "vendor")))))
+ (build-system go-build-system)
+ (arguments
+ (list #:go go-1.23
+ #:import-path "github.com/adnanh/webhook"
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'configure
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* "src/github.com/adnanh/webhook/webhook_test.go"
+ (("/bin/echo")
+ (search-input-file inputs "bin/echo"))
+ (("/bin/sh")
+ (search-input-file inputs "bin/sh"))))))))
+ (native-inputs
+ (list go-github-com-clbanning-mxj-v2
+ go-github-com-coreos-go-systemd-v22
+ go-github-com-dustin-go-humanize
+ go-github-com-fsnotify-fsnotify
+ go-github-com-ghodss-yaml
+ go-github-com-go-chi-chi-v5
+ go-github-com-gofrs-uuid-v5
+ go-github-com-gorilla-mux
+ go-golang-org-x-sys))
+ (home-page "https://github.com/adnanh/webhook")
+ (synopsis "Lightweight incoming webhook server")
+ (description "webhook is a lightweight configurable tool to create HTTP
+endpoints (hooks) which can execute configured commands. Data from the HTTP
+request (such as headers, payload or query variables) can be passed on to the
+configured commands. Hooks may also be configured to trigger only when
+certain rules are satisfied.
+
+webhook aims to be minimal and do nothing more than it should do. And, that
+is:
+
+@itemize
+@item receive the request
+@item parse the headers, payload and query variables
+@item check if the specified rules for the hook are satisfied
+@item and finally, pass the specified arguments to the specified command via
+command line arguments or via environment variables.
+@end itemize")
+ (license (list license:expat ;; main license
+ license:asl2.0)))) ;; internal/pidfile
+
(define-public qjson
(package
(name "qjson")