From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51522) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1exLXT-0007ML-C6 for guix-patches@gnu.org; Sat, 17 Mar 2018 19:47:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1exLXS-0005DL-DQ for guix-patches@gnu.org; Sat, 17 Mar 2018 19:47:03 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:59195) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1exLXS-0005Cz-9K for guix-patches@gnu.org; Sat, 17 Mar 2018 19:47:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1exLXS-0000eZ-2E for guix-patches@gnu.org; Sat, 17 Mar 2018 19:47:02 -0400 Subject: [bug#30702] [PATCH] services: nginx: Support extra content in the http block. Resent-Message-ID: References: <20180304200014.29173-1-mail@cbaines.net> <87h8pel6q6.fsf@gnu.org> From: Christopher Baines In-reply-to: <87h8pel6q6.fsf@gnu.org> Date: Sat, 17 Mar 2018 23:46:49 +0000 Message-ID: <87in9ue046.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. >> --- >> doc/guix.texi | 4 ++++ >> gnu/services/web.scm | 9 +++++++-- >> 2 files changed, 11 insertions(+), 2 deletions(-) >> >> diff --git a/doc/guix.texi b/doc/guix.texi >> index 057272df4..151bc7ddd 100644 >> --- a/doc/guix.texi >> +++ b/doc/guix.texi >> @@ -15431,6 +15431,10 @@ use the size of the processors cache line. >> @item @code{server-names-hash-bucket-max-size} (default: @code{#f}) >> Maximum bucket size for the server names hash tables. >> >> +@item @code{extra-content} (default: @code{'()}) >> +Extra content for the @code{http} block. Should be a list of strings or >> +G-expressions. > > I find it surprising that it=E2=80=99s a list rather than a string or > string-valued gexp. Thoughts? Lists are used as the type for other fields in related records. I chose a list as it's easy to add things to, but thinking about it, that's probably true for strings and gexps as well. Saying it can be either a string or a gexp might be a little tricky, as string operations wouldn't work on the gexp. My familiarity with string-valued gexps is a little limited though, I've only just started using file-append more, as I think that's how it works. How would you go about adding say a string to a gexp? --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQKTBAEBCgB9FiEEPonu50WOcg2XVOCyXiijOwuE9XcFAlqtqOlfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcACgkQXiijOwuE 9XdwWw/9Fyilf/8Dpc04VZTxco20OEiAKS9q/nhWHkTx4lr40u6H7yV3iXDy3xyL t+JXeJJGbRZDNbP0NzJiWfMPRJQsiDxD3UST/W9SsfED1yATvn+eFlotunmj9hw/ //15qljejqbBHZllTMVKnW7fNNVfQKaiyddZrQL7DOI56rav5Gn6VZ10t0K8zthv XKHtFiLBlEiGPwEFIMnXSydJiSaLlsn9ZkJaJjH8+ux7uK3p4Wj4pjhtC34G+26O HoF9WWSjFXAbZb9+ne/GmgoNxtxUsjsS8kfboHTXWMo3WsVYXQ/wfuVKiyvKEhCO ym2oTGWuD5W7/K/CeqVRm2J8qRWK4cndHpS9VcReQ6U/aq6yWRLxd+iauu3EnKCI bOqA0UbBecg17DwpFtrYnwzzWrL4wJYrlKCDr+lIKtl5xFnUeKfLXfFM+D9EuE4I 8hksB9RAje2Lpe2cL0Ba671034h3Qesn5SGjzaGaELo/wqlUmjsWyUCrUqghDNlb iMThvWeUOnd7UllobU3HYNROBbf4RAlFqiKMrLklV1uA5y9Sw2MX9CUs5rznGiM5 3yJ+WCMYjkwWSyR55+Ixi/Y9rEstR2kTKdwAd7bm6F/Lu2m058rp6Qmche4+Jr+3 IPkUfbGTm6ttNQIO0kJnzJB5JznD2eNQXFsnTGAPoEA26vLiw14= =R3Mz -----END PGP SIGNATURE----- --=-=-=--