[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug#30702] [PATCH] services: nginx: Support extra content in the http b

From: Ludovic Courtès
Subject: [bug#30702] [PATCH] services: nginx: Support extra content in the http block.
Date: Sun, 18 Mar 2018 18:12:42 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux)

Christopher Baines <address@hidden> skribis:

> Ludovic Courtès <address@hidden> writes:


>>> address@hidden @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?

You’d have to produce build-side code that will concatenate the strings:

  ;; Add extra content to CONFIG.
  (let ((original (nginx-extra-content config)))
      (inherit config)
      (extra-content #~(string-append #$original "\nextra extra stuff"))))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]