From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id GHzqDbDu+GB76wAAgWs5BA (envelope-from ) for ; Thu, 22 Jul 2021 06:06:08 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id UN9sCbDu+GArTAAAbx9fmQ (envelope-from ) for ; Thu, 22 Jul 2021 04:06:08 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 8A06AEE03 for ; Thu, 22 Jul 2021 06:06:07 +0200 (CEST) Received: from localhost ([::1]:53698 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m6PyI-0003N0-Jx for larch@yhetil.org; Thu, 22 Jul 2021 00:06:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55252) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m6PyE-0003Ki-BV for guix-patches@gnu.org; Thu, 22 Jul 2021 00:06:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:55828) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m6PyE-0003vz-3j for guix-patches@gnu.org; Thu, 22 Jul 2021 00:06:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1m6PyD-0002Lt-SU for guix-patches@gnu.org; Thu, 22 Jul 2021 00:06:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#49539] [PATCH] gnu: Add nginx-rtmp-module. Resent-From: Sarah Morgensen Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 22 Jul 2021 04:06:01 +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: Jack Hill Cc: 49539@debbugs.gnu.org Received: via spool by 49539-submit@debbugs.gnu.org id=B49539.16269267429015 (code B ref 49539); Thu, 22 Jul 2021 04:06:01 +0000 Received: (at 49539) by debbugs.gnu.org; 22 Jul 2021 04:05:42 +0000 Received: from localhost ([127.0.0.1]:39141 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m6Pxp-0002LF-86 for submit@debbugs.gnu.org; Thu, 22 Jul 2021 00:05:42 -0400 Received: from out0.migadu.com ([94.23.1.103]:16061) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m6Pxm-0002L6-Gl for 49539@debbugs.gnu.org; Thu, 22 Jul 2021 00:05:36 -0400 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mgsn.dev; s=key1; t=1626926733; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=LaAUxB6YNBVUt3PXyivSvJ79AfHvjhr2KT+2hBdvZzg=; b=e8Kni7orv9X+ipJV86z92C75/fBjHTDKXOQLw05Q9y1inBNT0QR7kFdYduQ3bWdLOCp8Ex F5Vka5wUnHcOyY+bGzhd9hu3XLb8ISC+mz1u3V7vsTrW8UJGEX8d4wG9KgSomplNAJ1dT+ H5+3xjty2YEbI6Y64/FfhHLSWIBMxAY= From: Sarah Morgensen References: <20210712211322.14238-1-jackhill@jackhill.us> Date: Wed, 21 Jul 2021 21:05:29 -0700 In-Reply-To: <20210712211322.14238-1-jackhill@jackhill.us> (Jack Hill's message of "Mon, 12 Jul 2021 17:13:22 -0400") Message-ID: <86im13ro1i.fsf_-_@mgsn.dev> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Migadu-Auth-User: iskarian@mgsn.dev 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+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1626926767; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=LaAUxB6YNBVUt3PXyivSvJ79AfHvjhr2KT+2hBdvZzg=; b=hvV+juRhAnNHIyy7h2C9vweAD6zTKknlV3BJHByuhJfjHXPI3fQ9bAg6hUSbi/dv+OuAXg pTMRrmNmhQQk4pDVQBzCZv1Wfo7C38A7/WoE7giiRp15sGC2PxoYR1URjObagZw1E0khSB yhzLYOIIgXxJkvbnuwOCKFcob4G7Fcw6Y1M3gqW/rcBq7XelmBDlhJqkZdtpebODMbqhNZ SsAt02UtUiedg7b1MCHAJw+g8x3EXvjKfs0QJUGAQQI8XiT96TmxQr2UvOGWqJUFVNc3Y2 A24XN5Mq9yXwpB1NUUPTXK8XA0Z6wJrvrvnwzAY981JLbX0LcaBpVp2om73TjQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1626926767; a=rsa-sha256; cv=none; b=HHgS4qJ3xB2KIvvcc6miq31cNiX6SkP3cGIhajPeuiY+vh0xRissjDx671AWTvx1astOsZ 0XZ9LzzxlTRJW6lbbdou6X/zAZIcWHTcktT+sQDtuBGWiSy/z3GBg4WppcDjH70gt2Cg+/ VHMaNNQe5w5NcYwxymGTUUtDgzwmzxBL/uWs1eTA9kVaZQN+0DRvG0mDjvW3vaKj9R+UtY q6ZSpoBD98ZuD8/SWfCyql8XF7E06PD11u4Rpt0bOah/qehVGut++6ddBj3rfSWSC7ullC eH+vk/8h6WtXYXhPN5v2nyZd6KkJIYOQroliyUj3ke/4nMSq4Vu79cXaMjwnbg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=mgsn.dev header.s=key1 header.b=e8Kni7or; dmarc=fail reason="SPF not aligned (relaxed)" header.from=mgsn.dev (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: -1.31 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=mgsn.dev header.s=key1 header.b=e8Kni7or; dmarc=fail reason="SPF not aligned (relaxed)" header.from=mgsn.dev (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: 8A06AEE03 X-Spam-Score: -1.31 X-Migadu-Scanner: scn0.migadu.com X-TUID: yTySyJuQJOSC Hi! Jack Hill writes: > * gnu/packages/web.scm (nginx-rtmp-module): New variable. > --- > gnu/packages/web.scm | 61 ++++++++++++++++++++++++++++++++++++++++++++ > 1 file changed, 61 insertions(+) > > diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm > index 2cc8619b19..a659ad456a 100644 > --- a/gnu/packages/web.scm > +++ b/gnu/packages/web.scm > @@ -50,6 +50,7 @@ > ;;; Copyright =C2=A9 2021 Stefan Reich=C3=B6r > ;;; Copyright =C2=A9 2021 la snesne > ;;; Copyright =C2=A9 2021 Matthew James Kraai > +;;; Copyright =C2=A9 2021 Jack Hill > ;;; > ;;; This file is part of GNU Guix. > ;;; > @@ -771,6 +772,66 @@ documentation.") > (description "This NGINX module provides a scripting support with Lua > programming language."))) >=20=20 > +(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=3D.") > + #:make-flags '("modules") > + #:modules ((guix build utils) > + (guix build gnu-build-system)) > + ,@(package-arguments nginx)) > + ((#:phases phases) > + `(modify-phases ,phases > + ;; The LICENSE file will be overwritten with the one from ngi= nx > + ;; when unpacking the nginx source, so copy this one to its o= wn > + ;; file. > + (add-after 'unpack 'preserve-license-file > + (lambda _ (copy-file "LICENSE" "LICENSE.rtmp"))) > + (add-after 'preserve-license-file 'unpack-nginx-sources > + (lambda* (#:key inputs native-inputs #:allow-other-keys) > + (begin > + ;; The nginx source code is part of the module=E2=80=99= s source. > + (format #t "decompressing nginx source code~%") > + (let ((tar (assoc-ref inputs "tar")) > + (nginx-srcs (assoc-ref inputs "nginx-sources"))) > + (invoke (string-append tar "/bin/tar") > + "xvf" nginx-srcs "--strip-components=3D1")) You can probably drop the direct reference to tar and just use `(invoke "tar" ...)` Also, if you want to avoid the extra step of renaming the original LICENSE, you can use `--transform=3Ds,/LICENSE$,/LICENSE.nginx,` as an argument to tar. > + #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 ac= cept > +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") -- Sarah