This is an automated email from the git hooks/post-receive script.

guix_mirror_bot pushed a commit to branch master
in repository guix.

The following commit(s) were added to refs/heads/master by this push:
     new f0cd24faf3 gnu: Add webhook.
f0cd24faf3 is described below

commit f0cd24faf37cb9dd5be8f940166750e634cc8145
Author: Arun Isaac <[email protected]>
AuthorDate: Tue Aug 19 18:43:30 2025 +0100

    gnu: Add webhook.
    
    * gnu/packages/web.scm (webhook): New variable.
    
    Change-Id: Iea9d198ee2420582cab29a73a5d3006463383b52
    Signed-off-by: Sharlatan Hellseher <[email protected]>
---
 gnu/packages/web.scm | 64 +++++++++++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 63 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm
index 59bacf61be..663048c86f 100644
--- a/gnu/packages/web.scm
+++ b/gnu/packages/web.scm
@@ -15,7 +15,7 @@
 ;;; Copyright © 2016 Ben Woodcroft <[email protected]>
 ;;; Copyright © 2016, 2023 Clément Lassieur <[email protected]>
 ;;; Copyright © 2016, 2017 Nikita <[email protected]>
-;;; Copyright © 2016–2024 Arun Isaac <[email protected]>
+;;; Copyright © 2016–2025 Arun Isaac <[email protected]>
 ;;; Copyright © 2016–2022 Tobias Geerinckx-Rice <[email protected]>
 ;;; Copyright © 2016 Bake Timmons <[email protected]>
 ;;; Copyright © 2017 Thomas Danckaert <[email protected]>
@@ -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")

Reply via email to