[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] improve nginx-service
From: |
Ludovic Courtès |
Subject: |
Re: [PATCH] improve nginx-service |
Date: |
Thu, 03 Nov 2016 15:54:59 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) |
Hartmut Goebel <address@hidden> skribis:
> Hi,
>> If the vhost’s root directory is immutable, you can of course add it to
>> the store via ‘computed-file’ or similar, and then write:
>>
>> (nginx-vhost-configuration
>> (root #$(computed-file "root" …)))
Oops, there shouldn’t be a #$ here since we’re not inside #~.
> Related question: I've but the content of some example website into a
> package. How can I use that package's directory as "root"? I tried
> these, but none worked:
>
> (root (package-file demo-website))
> (root #$(file-append demo-website "/"))
> (root (assoc-ref demo-website "out"))
> (root #$demo-website)
Assuming ‘demo-website’ is bound to a package object, you should be able
to do:
(root (file-append demo-website "/"))
or simply:
(root demo-website)
The #$ above are invalid since #$ is meant to be used within #~.
Likewise, the first argument to ‘assoc-ref’ must be an association list,
which ‘demo-website’ is not. As for ‘package-file’, it’s not enough: it
returns the file name of the package, but doesn’t make the package a
dependency of the vhost config.
HTH!
Ludo’.
- Re: [PATCH] improve nginx-service, Hartmut Goebel, 2016/11/02
- Re: [PATCH] improve nginx-service,
Ludovic Courtès <=
- Re: [PATCH] improve nginx-service, Hartmut Goebel, 2016/11/03
- Re: [PATCH] improve nginx-service, Ludovic Courtès, 2016/11/04
- Re: [PATCH] improve nginx-service, Julien Lepiller, 2016/11/04
- Re: [PATCH] improve nginx-service, Hartmut Goebel, 2016/11/04
- Re: [PATCH] improve nginx-service, Julien Lepiller, 2016/11/04
- Re: [PATCH] improve nginx-service, Hartmut Goebel, 2016/11/04
- Re: [PATCH] improve nginx-service, Julien Lepiller, 2016/11/06
- Re: [PATCH] improve nginx-service, Hartmut Goebel, 2016/11/04
- Re: [PATCH] improve nginx-service, Tobias Geerinckx-Rice, 2016/11/06
- Re: [PATCH] improve nginx-service, Ludovic Courtès, 2016/11/06