[Top][All Lists]

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

Re: Setting TMPDIR for Guix

From: pelzflorian (Florian Pelz)
Subject: Re: Setting TMPDIR for Guix
Date: Fri, 24 Feb 2017 11:41:56 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Icedove/45.7.1

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!

>> 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
     ;; chown leads to an entire copy of the tree, which is a bad idea.

       ;; Optionally authorize's key.
       #$@(if authorize-key?
             #$@(map (cut hydra-key-authorization <> guix) keys))
       ;; If a tmpdir is set, create tmpdir if it does not exist.
       #$@(if tmpdir
             (use-modules (guix build utils))
             (mkdir-p tmpdir))

reply via email to

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