diff options
| author | Arun Isaac <arunisaac@systemreboot.net> | 2025-08-19 18:43:30 +0100 |
|---|---|---|
| committer | Sharlatan Hellseher <sharlatanus@gmail.com> | 2025-08-24 20:18:32 +0100 |
| commit | f0cd24faf37cb9dd5be8f940166750e634cc8145 (patch) | |
| tree | 6b36d976455d4f14f6a7df8923c02aac46129b37 /gnu | |
| parent | 17222abaf634d9fde7621d532af47579f238bd7e (diff) | |
gnu: Add webhook.
* gnu/packages/web.scm (webhook): New variable.
Change-Id: Iea9d198ee2420582cab29a73a5d3006463383b52
Signed-off-by: Sharlatan Hellseher <sharlatanus@gmail.com>
Diffstat (limited to 'gnu')
| -rw-r--r-- | gnu/packages/web.scm | 64 |
1 files changed, 63 insertions, 1 deletions
diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm index 59bacf61be0..663048c86fe 100644 --- a/gnu/packages/web.scm +++ b/gnu/packages/web.scm @@ -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") |
