From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39097) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fSRGa-0004EN-1C for guix-patches@gnu.org; Mon, 11 Jun 2018 14:10:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fSRGU-0005VM-Ay for guix-patches@gnu.org; Mon, 11 Jun 2018 14:10:07 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:35763) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fSRGU-0005VA-7U for guix-patches@gnu.org; Mon, 11 Jun 2018 14:10:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fSRGT-00013m-Rd for guix-patches@gnu.org; Mon, 11 Jun 2018 14:10:01 -0400 Subject: [bug#30702] [PATCH] services: nginx: Support extra content in the http block. Resent-Message-ID: References: <87h8pel6q6.fsf@gnu.org> <20180518085422.15849-1-mail@cbaines.net> <87wovzo01h.fsf@gnu.org> From: Christopher Baines In-reply-to: <87wovzo01h.fsf@gnu.org> Date: Mon, 11 Jun 2018 19:09:39 +0100 Message-ID: <8736xt42l8.fsf@cbaines.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 30702@debbugs.gnu.org --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Ludovic Court=C3=A8s writes: > Hello, > > Christopher Baines skribis: > >> This helpful when adding content to the nginx configuration file, which = isn't >> supported by the record type used for the configuration. For example, l= ike >> adding proxy_cache_path configuration. >> >> * gnu/packages/web.scm (): Add new extra-content fi= eld. >> (nginx-configuration-extra-content): New field accessor. >> (default-nginx-config): Add support for the extra-content field. >> * doc/guix.texi (NGINX): Document the new extra-content field. > > [...] > >> +@item @code{extra-content} (default: @code{""}) >> +Extra content for the @code{http} block. Should be string or a string >> +valued G-expression. > > [...] > >> (apply mixed-text-file "nginx.conf" >> (flatten >> "user nginx nginx;\n" >> @@ -542,7 +546,8 @@ of index files." >> "\n" >> (map emit-nginx-upstream-config upstream-blocks) >> (map emit-nginx-server-config server-blocks) >> - "}\n" >> + extra-content >> + "\n}\n" >> "events {}\n")))) > > That doesn=E2=80=99t work if =E2=80=98extra-content=E2=80=99 is something= like: > > #~(string-append "foo" bar) > > does it? > > My understanding of the doc above was that it intends to allow this. > But maybe it doesn=E2=80=99t matter after all? So... I've finally got back around to looking at this, and as far as I can see, it does work. extra-content is passed as one of the arguments to mixed-text-file, which accepts G-exp things. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQKTBAEBCgB9FiEEPonu50WOcg2XVOCyXiijOwuE9XcFAlseuuNfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcACgkQXiijOwuE 9Xe2Yw//TqO2XifrzPW/CH2+gZAY2gK78mZz4jLuUlLoYi3i/8gELolsyqsgmshX wp0BYBEonz8Npj7OvV4huslI8QwzwM2RZbT/CsAaUlnWUKK6nD1UHVmhJB7VtsOO niSNAAoKP1k9MTYkaMwj8EL2YBKj69BM4DgFhtcqTxHi+oWvLyl2PtVQMYLpVyFc 3Wlvda9jOENaPainYHApeUil3jjqVgmRQ3ra5dUAaivuMmWDK2lD8Dvf2VnGX+LD 3K0yTmZJmTDKW0YOJXHUlKOjjXWg1rLdGjOML3hZt8cGfDZDJyJszL9Cwy55pOo3 mPPaJascxyht2IR0Z4UsPDT0+x0gDu43ljQI3m3jcd8kk2XAl1lv6T4R/fIcLhuq 6E2zFYDPaYiJHvOUcKyeR/Yvt1ik2iaVjg6yB1sL/PrMzmo3fec6hS+3yDT8pPfO my1psaUOtqcekajyP/m95RDTyd9Ig0TwfQ2QyamnD2Hnm7lwYcx4ZeuOLpe7SM6n mX6wcO17HTEIKJduEJo/PDr/Z4X55oDQv/1fYqFLpP2/NbKo8i6mRYZqsh+b70Lr SVIGUwUizxHGQoWDtMtSJvUZbiMW573q1QjxIQZ0iWZg3sohNbrd7Kk35GMkDMIj f/tXl5rMnaGJIUUq3kP2JgEOg6ZTngJzRxUnj1OyGEZnCzwFhOg= =ohdz -----END PGP SIGNATURE----- --=-=-=--