about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--guix/forge/webhook.scm109
1 files changed, 1 insertions, 108 deletions
diff --git a/guix/forge/webhook.scm b/guix/forge/webhook.scm
index 275827b..670adbb 100644
--- a/guix/forge/webhook.scm
+++ b/guix/forge/webhook.scm
@@ -21,33 +21,16 @@
   #:use-module (srfi srfi-1)
   #:use-module (gnu build linux-container)
   #:use-module ((gnu packages admin) #:select (shadow))
-  #:use-module ((gnu packages golang) #:select (go-1.21))
-  #:use-module ((gnu packages golang-build)
-                #:select (go-golang-org-x-sys))
-  #:use-module ((gnu packages golang-web)
-                #:select (go-github-com-go-chi-chi-v5
-                          go-github-com-gorilla-mux))
-  #:use-module ((gnu packages golang-xyz)
-                #:select (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-gofrs-uuid-v5))
   #:use-module ((gnu packages guile) #:select (guile-json-4))
+  #:use-module ((gnu packages web) #:select (webhook))
   #:use-module (gnu services)
   #:use-module (gnu services shepherd)
   #:use-module (gnu system accounts)
   #:use-module (gnu system file-systems)
   #:use-module (gnu system shadow)
   #:use-module (guix gexp)
-  #:use-module (guix modules)
   #:use-module (guix records)
-  #:use-module (guix packages)
-  #:use-module (guix git-download)
   #:use-module (guix least-authority)
-  #:use-module (guix build-system go)
-  #:use-module ((guix licenses) #:prefix license:)
   #:use-module (forge socket)
   #:export (webhook-service-type
             webhook-configuration
@@ -61,96 +44,6 @@
             webhook-hook-id
             webhook-hook-run))
 
-(define go-golang-org-x-sys-0.18
-  (package
-    (inherit go-golang-org-x-sys)
-    (name "go-golang-org-x-sys")
-    (version "0.18.0")
-    (source
-     (origin
-       (method git-fetch)
-       (uri (git-reference
-              (url "https://go.googlesource.com/sys")
-              (commit (string-append "v" version))))
-       (file-name (git-file-name name version))
-       (sha256
-        (base32
-         "11p97drmsiyd42bb0pg9j1bshdmkfmjvfmg118x212wafdw77x6l"))))))
-
-(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.21
-           #: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"))))))))
-    (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-0.18))
-    (home-page "https://github.com/adnanh/webhook")
-    (synopsis "Lightweight incoming webhook server")
-    (description "webhook is a lightweight configurable tool written
-in Go, that allows you to easily create HTTP endpoints (hooks) on your
-server, which you can use to execute configured commands. You can also
-pass data from the HTTP request (such as headers, payload or query
-variables) to your commands. webhook also allows you to specify rules
-which have to be satisfied in order for the hook to be triggered.
-
-For example, if you're using Github or Bitbucket, you can use webhook
-to set up a hook that runs a redeploy script for your project on your
-staging server, whenever you push changes to the master branch of your
-project.
-
-If you use Mattermost or Slack, you can set up an \"Outgoing webhook
-integration\" or \"Slash command\" to run various commands on your
-server, which can then report back directly to you or your channels
-using the \"Incoming webhook integrations\", or the appropriate
-response body.
-
-webhook aims to 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
-
-Everything else is the responsibility of the command's author.")
-    (license license:expat)))
-
 (define-record-type* <webhook-configuration>
   webhook-configuration make-webhook-configuration
   webhook-configuration?