GNU bug report logs - #30702
[PATCH] services: nginx: Support extra content in the http block.

Previous Next

Package: guix-patches;

Reported by: Christopher Baines <mail <at> cbaines.net>

Date: Sun, 4 Mar 2018 20:01:02 UTC

Severity: normal

Tags: patch

Done: Christopher Baines <mail <at> cbaines.net>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Christopher Baines <mail <at> cbaines.net>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: 30702 <at> debbugs.gnu.org
Subject: [bug#30702] [PATCH] services: nginx: Support extra content in the http block.
Date: Sat, 17 Mar 2018 23:46:49 +0000
[Message part 1 (text/plain, inline)]
Ludovic Courtès <ludo <at> gnu.org> writes:

> Hello,
>
> Christopher Baines <mail <at> cbaines.net> 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, like
>> adding proxy_cache_path configuration.
>>
>> * gnu/packages/web.scm (<nginx-configuration>): Add new extra-content field.
>>   (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’s 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?
[signature.asc (application/pgp-signature, inline)]

This bug report was last modified 7 years and 36 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.