GNU bug report logs -
#49539
[PATCH] gnu: Add nginx-rtmp-module.
Previous Next
Reported by: Jack Hill <jackhill <at> jackhill.us>
Date: Mon, 12 Jul 2021 20:40:02 UTC
Severity: normal
Tags: patch
Done: Ludovic Courtès <ludo <at> gnu.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 49539 in the body.
You can then email your comments to 49539 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
guix-patches <at> gnu.org
:
bug#49539
; Package
guix-patches
.
(Mon, 12 Jul 2021 20:40:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Jack Hill <jackhill <at> jackhill.us>
:
New bug report received and forwarded. Copy sent to
guix-patches <at> gnu.org
.
(Mon, 12 Jul 2021 20:40:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
* 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..ad51bfdf55 100644
--- a/gnu/packages/web.scm
+++ b/gnu/packages/web.scm
@@ -50,6 +50,7 @@
;;; Copyright © 2021 Stefan Reichör <stefan <at> xsteve.at>
;;; Copyright © 2021 la snesne <lasnesne <at> lagunposprasihopre.org>
;;; Copyright © 2021 Matthew James Kraai <kraai <at> ftbfs.org>
+;;; Copyright © 2021 Jack Hill <jackhill <at> jackhill.us>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -771,6 +772,66 @@ 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
+ ;; The LICENSE file will be overwritten with the one from nginx
+ ;; when unpacking the nginx source, so copy this one to its own
+ ;; 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’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=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 audo 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
+steam. Remote control of the module is possible over HTTP.")
+ (license license:bsd-2)))
+
(define-public lighttpd
(package
(name "lighttpd")
--
2.32.0
Information forwarded
to
guix-patches <at> gnu.org
:
bug#49539
; Package
guix-patches
.
(Mon, 12 Jul 2021 20:53:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 49539 <at> debbugs.gnu.org (full text, mbox):
On 12.07.21 22:39, Jack Hill wrote:
> * gnu/packages/web.scm (nginx-rtmp-module): New variable.
[...]
> + (synopsis "NGINX module for audo and video streaming with RTMP")
^ audio
> + (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
> +steam. Remote control of the module is possible over HTTP.")
^ stream?
Information forwarded
to
guix-patches <at> gnu.org
:
bug#49539
; Package
guix-patches
.
(Mon, 12 Jul 2021 21:12:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 49539 <at> debbugs.gnu.org (full text, mbox):
On Mon, 12 Jul 2021, Jonathan Brielmaier wrote:
> On 12.07.21 22:39, Jack Hill wrote:
>> * gnu/packages/web.scm (nginx-rtmp-module): New variable.
> [...]
>> + (synopsis "NGINX module for audo and video streaming with RTMP")
> ^ audio
Whoops, thank you for catching this.
>> + (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
>> +steam. Remote control of the module is possible over HTTP.")
>
> ^ stream?
At least steam is a real word to the spellchecker :) I'll post v2 with
these fixed shortly.
Thanks!
Jack
Information forwarded
to
guix-patches <at> gnu.org
:
bug#49539
; Package
guix-patches
.
(Mon, 12 Jul 2021 21:14:01 GMT)
Full text and
rfc822 format available.
Message #14 received at 49539 <at> debbugs.gnu.org (full text, mbox):
* 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 © 2021 Stefan Reichör <stefan <at> xsteve.at>
;;; Copyright © 2021 la snesne <lasnesne <at> lagunposprasihopre.org>
;;; Copyright © 2021 Matthew James Kraai <kraai <at> ftbfs.org>
+;;; Copyright © 2021 Jack Hill <jackhill <at> jackhill.us>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -771,6 +772,66 @@ 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
+ ;; The LICENSE file will be overwritten with the one from nginx
+ ;; when unpacking the nginx source, so copy this one to its own
+ ;; 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’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=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")
--
2.32.0
Information forwarded
to
guix-patches <at> gnu.org
:
bug#49539
; Package
guix-patches
.
(Thu, 22 Jul 2021 04:06:01 GMT)
Full text and
rfc822 format available.
Message #17 received at 49539 <at> debbugs.gnu.org (full text, mbox):
Hi!
Jack Hill <jackhill <at> jackhill.us> 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 © 2021 Stefan Reichör <stefan <at> xsteve.at>
> ;;; Copyright © 2021 la snesne <lasnesne <at> lagunposprasihopre.org>
> ;;; Copyright © 2021 Matthew James Kraai <kraai <at> ftbfs.org>
> +;;; Copyright © 2021 Jack Hill <jackhill <at> jackhill.us>
> ;;;
> ;;; This file is part of GNU Guix.
> ;;;
> @@ -771,6 +772,66 @@ 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
> + ;; The LICENSE file will be overwritten with the one from nginx
> + ;; when unpacking the nginx source, so copy this one to its own
> + ;; 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’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=1"))
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=s,/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 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")
--
Sarah
Information forwarded
to
guix-patches <at> gnu.org
:
bug#49539
; Package
guix-patches
.
(Thu, 22 Jul 2021 20:54:02 GMT)
Full text and
rfc822 format available.
Message #20 received at 49539 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On Wed, 21 Jul 2021, Sarah Morgensen wrote:
> Jack Hill <jackhill <at> jackhill.us> writes:
>
>> + ((#:phases phases)
>> + `(modify-phases ,phases
>> + ;; The LICENSE file will be overwritten with the one from nginx
>> + ;; when unpacking the nginx source, so copy this one to its own
>> + ;; 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’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=1"))
>
> 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=s,/LICENSE$,/LICENSE.nginx,` as an
> argument to tar.
Thanks for suggesting these improvements! I've incorporated them into a
version 3 that I'll post shortly.
Best,
Jack
P.S. The same opportunities for improvement exists in some of our other
nginx modules, from which I copied this phase. The next time we update
those might be a good time to clean them up.
Information forwarded
to
guix-patches <at> gnu.org
:
bug#49539
; Package
guix-patches
.
(Thu, 22 Jul 2021 20:57:02 GMT)
Full text and
rfc822 format available.
Message #23 received at 49539 <at> debbugs.gnu.org (full text, mbox):
* 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 <stefan <at> xsteve.at>
;;; Copyright © 2021 la snesne <lasnesne <at> lagunposprasihopre.org>
;;; Copyright © 2021 Matthew James Kraai <kraai <at> ftbfs.org>
+;;; Copyright © 2021 Jack Hill <jackhill <at> jackhill.us>
;;;
;;; 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")
--
2.32.0
Information forwarded
to
guix-patches <at> gnu.org
:
bug#49539
; Package
guix-patches
.
(Sat, 24 Jul 2021 22:09:02 GMT)
Full text and
rfc822 format available.
Message #26 received at 49539 <at> debbugs.gnu.org (full text, mbox):
Hi,
Glad I could help. I forgot to mention also, the `begin` probably isn't
necessary (it's probably leftover from when it was a snippet somewhere),
but as you say that can be taken care of over time.
Jack Hill <jackhill <at> jackhill.us> writes:
[...]
> P.S. The same opportunities for improvement exists in some of our other nginx
> modules, from which I copied this phase. The next time we update those might be
> a good time to clean them up.
How common is this? Would it warrant an nginx-build-system, or perhaps
even a common idiom/general system for packages using multiple sources?
Or are the ways in which these packages uses secondary sources different
enough that unifying them would be difficult?
--
Sarah
Reply sent
to
Ludovic Courtès <ludo <at> gnu.org>
:
You have taken responsibility.
(Thu, 29 Jul 2021 19:49:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Jack Hill <jackhill <at> jackhill.us>
:
bug acknowledged by developer.
(Thu, 29 Jul 2021 19:49:02 GMT)
Full text and
rfc822 format available.
Message #31 received at 49539-done <at> debbugs.gnu.org (full text, mbox):
Hi,
Jack Hill <jackhill <at> jackhill.us> skribis:
> * gnu/packages/web.scm (nginx-rtmp-module): New variable.
Applied. Thank you and thanks to Sarah for reviewing!
Ludo’.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Fri, 27 Aug 2021 11:24:04 GMT)
Full text and
rfc822 format available.
This bug report was last modified 3 years and 291 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.