help-guix
[Top][All Lists]
Advanced

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

Re: skeleton files in sub-directories


From: Ludovic Courtès
Subject: Re: skeleton files in sub-directories
Date: Sun, 26 May 2019 21:46:10 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux)

Hi,

"Reza Alizadeh Majd" <address@hidden> skribis:

> the problem is that some of these skeletons are located in sub-directories, 
> for 
> example `~/.local/share/foo/bar.cfg`. and when I run `guix system reconfigure`
> I receive errors about missing parent directory (`~/.local/share/foo` in this 
> example).
>
> is there any way to create parent directories before copying the skeleton 
> files? 

I think you can do something like:

  (define dot-config
    (compute-file "dot-config-skeleton"
                  #~(begin
                      (mkdir #$output)
                      (mkdir (string-append #$output "/guix"))
                      …)))

and then add it in the list of skeletons like so:

  `(…
    (".config" ,dot-config))

Does that make sense?

Ludo’.



reply via email to

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