unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Registering an artifact as root
@ 2023-07-23 10:51 Hartmut Goebel
  2023-07-23 12:38 ` Liliana Marie Prikler
  0 siblings, 1 reply; 3+ messages in thread
From: Hartmut Goebel @ 2023-07-23 10:51 UTC (permalink / raw)
  To: Guix-devel

[-- Attachment #1: Type: text/html, Size: 1421 bytes --]

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

* Re: Registering an artifact as root
  2023-07-23 10:51 Registering an artifact as root Hartmut Goebel
@ 2023-07-23 12:38 ` Liliana Marie Prikler
  2023-08-09 19:57   ` Hartmut Goebel
  0 siblings, 1 reply; 3+ messages in thread
From: Liliana Marie Prikler @ 2023-07-23 12:38 UTC (permalink / raw)
  To: Hartmut Goebel, guix-devel

Am Sonntag, dem 23.07.2023 um 12:51 +0200 schrieb Hartmut Goebel:
> Hi,
> I'd like to create a symlink to a store object somewhere in my home-
> directory and register this symlink as a root, to avoid the garbage
> collector removes the store object.
> How can I achieve this with existing guix means?
(guix store) has

(define-operation (add-indirect-root (string file-name))
  "Make the symlink FILE-NAME an indirect root for the garbage collector:
whatever store item FILE-NAME points to will not be collected.  Return #t on
success.

FILE-NAME can be anywhere on the file system, but it must be an absolute file
name--it is the caller's responsibility to ensure that it is an absolute file
name."
  boolean)

Hope that helps.

Cheers


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

* Re: Registering an artifact as root
  2023-07-23 12:38 ` Liliana Marie Prikler
@ 2023-08-09 19:57   ` Hartmut Goebel
  0 siblings, 0 replies; 3+ messages in thread
From: Hartmut Goebel @ 2023-08-09 19:57 UTC (permalink / raw)
  To: Liliana Marie Prikler, guix-devel

Am 23.07.23 um 14:38 schrieb Liliana Marie Prikler:
> Hope that helps. 

Thanks, I was able to make this work:

guile -L .. -c '(use-modules (guix store)) (add-indirect-root 
(open-connection) "/abs/path/to/my/artifact")'

-- 
Regards
Hartmut Goebel

| Hartmut Goebel          | h.goebel@crazy-compilers.com               |
| www.crazy-compilers.com | compilers which you thought are impossible |



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

end of thread, other threads:[~2023-08-09 19:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-23 10:51 Registering an artifact as root Hartmut Goebel
2023-07-23 12:38 ` Liliana Marie Prikler
2023-08-09 19:57   ` Hartmut Goebel

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

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