GNU bug report logs -
#30702
[PATCH] services: nginx: Support extra content in the http block.
Previous Next
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
Christopher Baines <mail <at> cbaines.net> skribis:
> 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.
>>
>> [...]
>>
>>> +@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’t work if ‘extra-content’ 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’t 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.
Alright, sounds good then!
Thanks,
Ludo’.
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.