unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
* Is mkdir-p a directory  outside of /gnu/store.... possible?
@ 2022-02-17 13:07 James Smith via
  2022-02-17 15:12 ` Ricardo Wurmus
  2022-02-18  1:17 ` Thiago Jung Bauermann
  0 siblings, 2 replies; 3+ messages in thread
From: James Smith via @ 2022-02-17 13:07 UTC (permalink / raw)
  To: help-guix@gnu.org

Hi,
I am using the guix package manager on Debian.
I guix package --install-from-file-myapp.scm and during the install process I would like to

(mkdir-p "$HOME/.config/myapp") and then
(system* (cp "/gnu/store/.../myapp/config.txt" "$HOME/.config/myapp"))

I launch guix package -i... from my home directory /home/jbs

I have tried

(mkdir-p "/home/jbs/.config/myapp")
(system* "mkdir" "-p" "/home/jbs/.config/myapp")
(invoke "mkdir" "-p" "/home/jbs/.config/myapp")

but get permissions errors. I can't even make the directory in /tmp...

I see the discussions on $HOME, homeless-shelter and the hacks in .../scripts/environment.scm so I presume I cannot determine $HOME(?) but even hardcoding my home does not work.

Is it possible during the make/install process to make a directory outside of /gnu/store... and if yes how?
Thanks
Jim

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Is mkdir-p a directory  outside of /gnu/store.... possible?
  2022-02-17 13:07 Is mkdir-p a directory outside of /gnu/store.... possible? James Smith via
@ 2022-02-17 15:12 ` Ricardo Wurmus
  2022-02-18  1:17 ` Thiago Jung Bauermann
  1 sibling, 0 replies; 3+ messages in thread
From: Ricardo Wurmus @ 2022-02-17 15:12 UTC (permalink / raw)
  To: James Smith; +Cc: help-guix


James Smith via <help-guix@gnu.org> writes:

> I am using the guix package manager on Debian.
> I guix package --install-from-file-myapp.scm and during the install process I would like to
>
> (mkdir-p "$HOME/.config/myapp") and then
> (system* (cp "/gnu/store/.../myapp/config.txt" "$HOME/.config/myapp"))

During the build you have no access to anything but the eventual output
directory under /gnu/store.

-- 
Ricardo


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Is mkdir-p a directory  outside of /gnu/store.... possible?
  2022-02-17 13:07 Is mkdir-p a directory outside of /gnu/store.... possible? James Smith via
  2022-02-17 15:12 ` Ricardo Wurmus
@ 2022-02-18  1:17 ` Thiago Jung Bauermann
  1 sibling, 0 replies; 3+ messages in thread
From: Thiago Jung Bauermann @ 2022-02-18  1:17 UTC (permalink / raw)
  To: James Smith; +Cc: help-guix


Hello James,

James Smith via <help-guix@gnu.org> writes:

> I guix package --install-from-file-myapp.scm and during the install process I
> would like to
>
> (mkdir-p "$HOME/.config/myapp") and then
> (system* (cp "/gnu/store/.../myapp/config.txt" "$HOME/.config/myapp"))

Setting up a package’s configuration files in “$HOME/.config” is one of
the main purposes of Guix Home, so I suggest investigate creating a new
Guix Home service for your package.

-- 
Thanks
Thiago


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-02-18  1:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-17 13:07 Is mkdir-p a directory outside of /gnu/store.... possible? James Smith via
2022-02-17 15:12 ` Ricardo Wurmus
2022-02-18  1:17 ` Thiago Jung Bauermann

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).