[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Cuirass and (guix config)
From: |
Mathieu Othacehe |
Subject: |
Cuirass and (guix config) |
Date: |
Wed, 07 Nov 2018 19:31:47 +0900 |
User-agent: |
mu4e 1.0; emacs 26.1 |
Hi Guix,
I use Cuirass to build Guix disk-images on a powerful machine serving
them with guix publish. I was surprised that a lot of local build where
triggered instead of using substitutes. I think this is the reason:
When Cuirass fetches a new guix, it is prepended to the load path during
evalution here (guix/build-aux/hydra/gnu-system.scm):
--8<---------------cut here---------------start------------->8---
(and=> (assoc-ref (current-source-location) 'filename)
(lambda (file)
(let ((dir (canonicalize-path
(string-append (dirname file) "/../.."))))
(format (current-error-port) "prepending ~s to the load path~%"
dir)
(set! %load-path (cons dir %load-path))))))
--8<---------------cut here---------------end--------------->8---
./configure is never run on the fetched guix by Cuirass. Thus, the only
(guix config) present in the load-path is the one of the guix whom
cuirass depends (the one pointed out by a guix gc -R cuirass).
So, the disk-image builded by Cuirass (and presumably other stuff)
depends of the guix input of Cuirass.
I was able to confirm my theory by running:
$(guix gc -R running-cuirass|grep guix)/bin/guix environment guix --pure
./configure
./pre-inst-env guix system disk-image gnu/system/install.scm
This time no local build were triggered.
So, I think this is a pretty bad issue because it is quite hard to
understand what's going on and finding the guix input's of cuirass,
fetching it on a different machine and running the above commands is
quite complicated!
When it comes to a possible work-around, I'm not sure what to do. I
would suggest crafting a (guix config) file like it's done on the
make-config.scm procedure of (guix self) and prepend it to the load path
during Cuirass evaluation.
This way, the user can run a ./pre-inst-env guix environment guix to
have the "correct" (guix config) but it doesn't seem great because the
user wont necessarily knows that he has to do that.
WDYT?
Thanks,
Mathieu
- Cuirass and (guix config),
Mathieu Othacehe <=