[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug#49539] [PATCH] gnu: Add nginx-rtmp-module.

From: Jack Hill
Subject: [bug#49539] [PATCH] gnu: Add nginx-rtmp-module.
Date: Thu, 22 Jul 2021 16:53:32 -0400 (EDT)
User-agent: Alpine 2.21 (DEB 202 2017-01-01)

On Wed, 21 Jul 2021, Sarah Morgensen wrote:

Jack Hill <> 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.


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.
reply via email to

[Prev in Thread] Current Thread [Next in Thread]