From: "pelzflorian (Florian Pelz)" <pelzflorian@pelzflorian.de>
To: Leo Famulari <leo@famulari.name>
Cc: help-guix@gnu.org
Subject: Re: Setting TMPDIR for Guix
Date: Fri, 24 Feb 2017 11:41:56 +0100 [thread overview]
Message-ID: <aaaa92be-e8b5-9d43-b291-ab0361a7e4eb@pelzflorian.de> (raw)
In-Reply-To: <20170223180712.GA15457@jasmine>
On 02/23/2017 07:07 PM, Leo Famulari wrote:
> On Thu, Feb 23, 2017 at 12:58:21PM +0100, pelzflorian (Florian Pelz) wrote:
>> 1) start guix-daemon with an environment in which TMPDIR is set to
>> /tmpdir and
>
> I exposed this feature in the guix-shepherd-service with commit
> b191f0a6c50f2a7d47037ef8509d0351f5a2646e.
>
> In order to use it, you'll need to use modify-services as shown in the
> manual, section Using the Configuration System:
>
This works well. Thank you!
> https://www.gnu.org/software/guix/manual/html_node/Using-the-Configuration-System.html#System-Services
>
>> 2) change my Guix system configuration so that it automatically creates
>> a /tmpdir directory.
>
> This remains to be done in (guix-activation). Would you, or anyone else,
> like to try it?
>
I suppose you mean changing (guix-activation) to create tmpdir if tmpdir
is set? I can’t quite wrap my head around this pattern matching and
G-expression code. This attempt does not work; also I’m afraid my
trial-and-error changes break stuff. It’s better if someone else does it
who knows what this does.
(define (guix-activation config)
"Return the activation gexp for CONFIG."
(match config
(($ <guix-configuration> guix build-group build-accounts
authorize-key? keys tmpdir)
;; Assume that the store has BUILD-GROUP as its group. We could
;; otherwise call 'chown' here, but the problem is that on a COW
unionfs,
;; chown leads to an entire copy of the tree, which is a bad idea.
#~(list
;; Optionally authorize hydra.gnu.org's key.
#$@(if authorize-key?
#~(begin
#$@(map (cut hydra-key-authorization <> guix) keys))
#~#f)
;; If a tmpdir is set, create tmpdir if it does not exist.
#$@(if tmpdir
#~(begin
(use-modules (guix build utils))
(mkdir-p tmpdir))
#~#f)))))
prev parent reply other threads:[~2017-02-24 10:42 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-23 11:58 Setting TMPDIR for Guix pelzflorian (Florian Pelz)
2017-02-23 18:07 ` Leo Famulari
2017-02-24 10:41 ` pelzflorian (Florian Pelz) [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aaaa92be-e8b5-9d43-b291-ab0361a7e4eb@pelzflorian.de \
--to=pelzflorian@pelzflorian.de \
--cc=help-guix@gnu.org \
--cc=leo@famulari.name \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).