From patchwork Thu Jul 22 20:55:56 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jack Hill X-Patchwork-Id: 31567 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 92C5227BC78; Thu, 22 Jul 2021 21:57:13 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 484A427BC6B for ; Thu, 22 Jul 2021 21:57:13 +0100 (BST) Received: from localhost ([::1]:47822 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m6fkm-000440-Cq for patchwork@mira.cbaines.net; Thu, 22 Jul 2021 16:57:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33572) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m6fkc-00043X-9v for guix-patches@gnu.org; Thu, 22 Jul 2021 16:57:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:58405) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m6fkc-0007yI-2y for guix-patches@gnu.org; Thu, 22 Jul 2021 16:57:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1m6fkc-0003ib-3d for guix-patches@gnu.org; Thu, 22 Jul 2021 16:57:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#49539] [PATCH v3] gnu: Add nginx-rtmp-module. Resent-From: Jack Hill Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 22 Jul 2021 20:57:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49539 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 49539@debbugs.gnu.org Cc: iskarian@mgsn.dev Received: via spool by 49539-submit@debbugs.gnu.org id=B49539.162698737914241 (code B ref 49539); Thu, 22 Jul 2021 20:57:02 +0000 Received: (at 49539) by debbugs.gnu.org; 22 Jul 2021 20:56:19 +0000 Received: from localhost ([127.0.0.1]:41718 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m6fjs-0003ha-4V for submit@debbugs.gnu.org; Thu, 22 Jul 2021 16:56:19 -0400 Received: from minsky.hcoop.net ([104.248.1.95]:51098) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m6fjp-0003hL-Vq for 49539@debbugs.gnu.org; Thu, 22 Jul 2021 16:56:14 -0400 Received: from [2001:470:8:9f5:903a:9988:22e1:4d65] (helo=alperton.home.eronel.org) by minsky.hcoop.net with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m6fjk-0007j2-OV; Thu, 22 Jul 2021 16:56:08 -0400 From: Jack Hill Date: Thu, 22 Jul 2021 16:55:56 -0400 Message-Id: <20210722205556.12542-1-jackhill@jackhill.us> X-Mailer: git-send-email 2.32.0 In-Reply-To: References: MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/web.scm (nginx-rtmp-module): New variable. --- gnu/packages/web.scm | 59 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm index 2cc8619b19..c0db8d9436 100644 --- a/gnu/packages/web.scm +++ b/gnu/packages/web.scm @@ -50,6 +50,7 @@ ;;; Copyright © 2021 Stefan Reichör ;;; Copyright © 2021 la snesne ;;; Copyright © 2021 Matthew James Kraai +;;; Copyright © 2021 Jack Hill ;;; ;;; This file is part of GNU Guix. ;;; @@ -771,6 +772,64 @@ documentation.") (description "This NGINX module provides a scripting support with Lua programming language."))) +(define-public nginx-rtmp-module + (package + (inherit nginx) + (name "nginx-rtmp-module") + (version "1.2.2") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/arut/nginx-rtmp-module") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "0y45bswk213yhkc2v1xca2rnsxrhx8v6azxz9pvi71vvxcggqv6h")))) + (build-system gnu-build-system) + (inputs + `(("nginx-sources" ,(package-source nginx)) + ,@(package-inputs nginx))) + (arguments + (substitute-keyword-arguments + `(#:configure-flags '("--add-dynamic-module=.") + #:make-flags '("modules") + #:modules ((guix build utils) + (guix build gnu-build-system)) + ,@(package-arguments nginx)) + ((#:phases phases) + `(modify-phases ,phases + (add-after 'unpack 'unpack-nginx-sources + (lambda* (#:key inputs native-inputs #:allow-other-keys) + (begin + ;; The nginx source code is part of the module’s source. + (format #t "decompressing nginx source code~%") + (invoke "tar" "xvf" (assoc-ref inputs "nginx-sources") + ;; This packages'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") + #t))) + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let ((modules-dir (string-append (assoc-ref outputs "out") + "/etc/nginx/modules"))) + (install-file "objs/ngx_rtmp_module.so" modules-dir) + #t))) + (delete 'fix-root-dirs) + (delete 'install-man-page))))) + (home-page "https://github.com/arut/nginx-rtmp-module") + (synopsis "NGINX module for audio and video streaming with RTMP") + (description "This NGINX module provides streaming with the @acronym{RTMP, +Real-Time Messaging Protocol}, @acronym{DASH, Dynamic Adaptive Streaming over HTTP}, +and @acronym{HLS, HTTP Live Streaming} protocols. It allows NGINX to accept +incoming RTMP streams for recording or redistribution. It also supports +on-demand streaming from a file on disk and pulling from an upstream RTMP +stream. Remote control of the module is possible over HTTP.") + (license license:bsd-2))) + (define-public lighttpd (package (name "lighttpd")