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.
Full log
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.
This bug report was last modified 3 years and 292 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.