From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id uL8jCvja+WAlLwEAgWs5BA (envelope-from ) for ; Thu, 22 Jul 2021 22:54:16 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id 8OKGBfja+WBYTAAAB5/wlQ (envelope-from ) for ; Thu, 22 Jul 2021 20:54:16 +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 E475C1EDBE for ; Thu, 22 Jul 2021 22:54:15 +0200 (CEST) Received: from localhost ([::1]:47550 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m6fhv-0003iR-2p for larch@yhetil.org; Thu, 22 Jul 2021 16:54:15 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33002) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m6fhj-0003Zj-7r for guix-patches@gnu.org; Thu, 22 Jul 2021 16:54:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:58399) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m6fhj-0005nM-0I for guix-patches@gnu.org; Thu, 22 Jul 2021 16:54:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1m6fhi-0003eD-Nx for guix-patches@gnu.org; Thu, 22 Jul 2021 16:54:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#49539] [PATCH] 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:54: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: Sarah Morgensen Cc: 49539@debbugs.gnu.org Received: via spool by 49539-submit@debbugs.gnu.org id=B49539.162698722213987 (code B ref 49539); Thu, 22 Jul 2021 20:54:02 +0000 Received: (at 49539) by debbugs.gnu.org; 22 Jul 2021 20:53:42 +0000 Received: from localhost ([127.0.0.1]:41711 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m6fhN-0003dX-NO for submit@debbugs.gnu.org; Thu, 22 Jul 2021 16:53:41 -0400 Received: from minsky.hcoop.net ([104.248.1.95]:51074) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m6fhK-0003dG-Ij for 49539@debbugs.gnu.org; Thu, 22 Jul 2021 16:53:40 -0400 Received: from marsh.hcoop.net ([45.55.52.66]) by minsky.hcoop.net with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m6fhE-0007bW-NA; Thu, 22 Jul 2021 16:53:32 -0400 Date: Thu, 22 Jul 2021 16:53:32 -0400 (EDT) From: Jack Hill X-X-Sender: jackhill@marsh.hcoop.net In-Reply-To: <86im13ro1i.fsf_-_@mgsn.dev> Message-ID: References: <20210712211322.14238-1-jackhill@jackhill.us> <86im13ro1i.fsf_-_@mgsn.dev> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="925712948-905846704-1626987212=:2109" 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 X-Migadu-Spam-Score: -4.00 Authentication-Results: aspmx1.migadu.com; none X-Migadu-Queue-Id: E475C1EDBE X-Spam-Score: -4.00 X-Migadu-Scanner: scn0.migadu.com X-TUID: W8xMLIQ0icmT This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --925712948-905846704-1626987212=:2109 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8BIT 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. 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. --925712948-905846704-1626987212=:2109--