* How to cache the result of guix-for-channels?
@ 2024-08-24 20:01 Tomas Volf
0 siblings, 0 replies; only message in thread
From: Tomas Volf @ 2024-08-24 20:01 UTC (permalink / raw)
To: guix-devel
[-- Attachment #1: Type: text/plain, Size: 2464 bytes --]
Hi all,
I am finally trying to incorporate `guix-for-channels' into my system
configuration and cannot figure out how to make it cache the resulting
package.
Following snippet illustrates the problem:
--8<---------------cut here---------------start------------->8---
/tmp/repro $ cat x.scm
(use-modules (guix channels)
(gnu packages package-management))
(guix-for-channels (list (channel
(name 'guix)
(url "https://git.wolfsden.cz/.git/guix")
(commit
"b03eddc326ee4eb26b25743faee2080de6aded7e")
(introduction
(make-channel-introduction
"028e445a2028068e3c83996daa281057f19141a0"
(openpgp-fingerprint
"B783 49B3 8C14 7D36 2988 68A4 2FBF EE7D B67F C1A9"))))))
/tmp/repro $ guix build -f x.scm
Updating channel 'guix' from Git repository at 'https://git.wolfsden.cz/.git/guix'...
Computing Guix derivation for 'x86_64-linux'... |
/gnu/store/9i597ckynirxy4w5iv2wbmy288vc7gf0-profile
/tmp/repro $ guix build -f x.scm
Updating channel 'guix' from Git repository at 'https://git.wolfsden.cz/.git/guix'...
Computing Guix derivation for 'x86_64-linux'... |
/gnu/store/9i597ckynirxy4w5iv2wbmy288vc7gf0-profile
--8<---------------cut here---------------end--------------->8---
Notice that the work (updating channel & computing the derivation) is
done both times (resulting in the same profile). It is fairly expensive
and, since I am specifying commit, does not seem necessary.
I have tried few variations, including attempting to misuse
cached-channel-instance, (origin (method git-fetch) ...) and few other,
but none ended up with desired result.
So, have can I make guix-for-channels cache the package? Or rather, how
can I get package suitable for guix-configuration (does not have to be
via guix-for-channels) that is cached instead of being built every time?
Maybe something from (guix inferior) would help?
cached-channel-instance seems to do pretty much what I want I presume,
however not sure how to convert store path back into a package (that I
could stuff into guix-configuration's guix field).
Have a nice day,
Tomas
--
There are only two hard things in Computer Science:
cache invalidation, naming things and off-by-one errors.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 853 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-08-24 20:02 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-24 20:01 How to cache the result of guix-for-channels? Tomas Volf
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).