unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: mirai@makinata.eu
To: 60184@debbugs.gnu.org
Cc: Bruno Victal <mirai@makinata.eu>
Subject: [bug#60184] [PATCH] gnu: Add nginx-module-vts.
Date: Sun, 18 Dec 2022 23:01:41 +0000	[thread overview]
Message-ID: <d2b4c003fd540defd0fb68893009b592064c34bd.1671404449.git.mirai@makinata.eu> (raw)

From: Bruno Victal <mirai@makinata.eu>

Depends on nginx http_stub_status_module.

* gnu/packages/web.scm (nginx-module-vts): New variable.
(nginx)[arguments]: Add "--with-http_stub_status_module" to #:configure-flags.
---
 gnu/packages/web.scm | 53 ++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 53 insertions(+)

diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm
index dcb7b3872a..2ad53c7627 100644
--- a/gnu/packages/web.scm
+++ b/gnu/packages/web.scm
@@ -59,6 +59,7 @@
 ;;; Copyright © 2022 Pradana Aumars <paumars@courrier.dev>
 ;;; Copyright © 2022 Petr Hodina <phodina@protonmail.com>
 ;;; Copyright © 2022 jgart <jgart@dismail.de>
+;;; Copyright © 2022 Bruno Victal <mirai@makinata.eu>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -410,6 +411,7 @@ (define-public nginx
               "--with-debug"
               "--with-stream"
               "--with-stream_ssl_module"
+              "--with-http_stub_status_module"
               ;; Even when not cross-building, we pass the
               ;; --crossbuild option to avoid customizing for the
               ;; kernel version on the build machine.
@@ -834,6 +836,57 @@ (define-public nginx-rtmp-module
 stream.  Remote control of the module is possible over HTTP.")
     (license license:bsd-2)))
 
+(define-public nginx-module-vts
+  (package
+    (inherit nginx)
+    (name "nginx-module-vts")
+    (version "0.2.1")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/vozlt/nginx-module-vts")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "017298vpp1ra16xyfdbsczdrz0b0y67x6adkzcc98y6gb3kg52n7"))))
+    (build-system gnu-build-system)
+    (inputs
+     `(("nginx-sources" ,(package-source nginx))
+       ,@(package-inputs nginx)))
+    (arguments
+     (substitute-keyword-arguments
+         `(#:make-flags '("modules") ;Only build this module not all of nginx.
+           ,@(package-arguments nginx))
+       ((#:configure-flags flags)
+        #~(cons "--add-dynamic-module=." #$flags))
+       ((#:phases phases)
+        #~(modify-phases #$phases
+            (add-after 'unpack 'unpack-nginx-sources
+              (lambda _
+                (begin
+                  ;; The nginx source code is part of the module’s source.
+                  (format #t "decompressing nginx source code~%")
+                  (invoke "tar" "xvf" #$(this-package-input "nginx-sources")
+                          ;; This package's LICENSE file would be
+                          ;; overwritten with the one from nginx when
+                          ;; unpacking the nginx source, so rename the nginx
+                          ;; one when unpacking.
+                          "--transform=s,/LICENSE$,/LICENSE.nginx,"
+                          "--strip-components=1"))))
+            (replace 'install
+              (lambda _
+                (let ((modules-dir (string-append #$output
+                                                  "/etc/nginx/modules")))
+                  (install-file "objs/ngx_http_vhost_traffic_status_module.so" modules-dir))))
+            (delete 'fix-root-dirs)
+            (delete 'install-man-page)))))
+    (home-page "https://github.com/vozlt/nginx-module-vts")
+    (synopsis "NGINX module for monitoring virtual host traffic status")
+    (description "This NGINX module provides access to virtual host status information,
+similar to live activity monitoring provided with NGINX plus.")
+    (license license:bsd-2)))
+
 (define-public lighttpd
   (package
     (name "lighttpd")

base-commit: d083809c8048a64f71a40f0657c217c9dd230428
-- 
2.38.1





             reply	other threads:[~2022-12-18 23:03 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-18 23:01 mirai [this message]
2023-01-26  9:53 ` bug#60184: [PATCH] gnu: Add nginx-module-vts Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d2b4c003fd540defd0fb68893009b592064c34bd.1671404449.git.mirai@makinata.eu \
    --to=mirai@makinata.eu \
    --cc=60184@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).