How to deal with failing builds in guix reconfigure (system/home)

Dear all,

I really love the declarative way of guix system and guix home to configure my installation.
Unfortunately it often happens that after a guix pull some package (currently it’s python-autopep8) fails to build.
Often this package is just some dependency (and I don’t even have a clue why python-autopep8 is needed by which package).
The problem is now, that due to the transactional manner in wich guix reconfigure works I get stuck completely.
I can’t even change a dotfile (since it’s managed by guix) or install a new package I need.
Of course I could do that manually but that would lead to the chaos I had before using guix home.
The only solution I see to get my system back to working would be to undo the guix pull (but is there a way to do that?).
There must be a better strategy to deal with these situations, like excluding the failing package and it’s dependencies to get updated.
How do you guys deal with this situation (since it happens quite often).

Cheers
Alex

EDIT: PS: since todays guix pull autopep8 is not the problem any more but now python-joblibfails building in the check phase. This illustrates that this is not a singular problem but rather a general issue.

Which sources / channels do you use, with substitutes and do you pin them?

I currently use “https://codeberg.org/guix/guix.git” and “https://gitlab.com/nonguix/nonguix”.

For substitutes I use

(substitute-urls
 (list "https://substitutes.nonguix.org"
	    "https://hydra-guix-129.guix.gnu.org"								
		"https://ci.guix.gnu.org"
		"https://bordeaux.guix.gnu.org"
))

So far I don’t pin any package since I have no idea which package I should pin to circumvent the problem.

Is there a strategy for pining?

I could try to pin everything in my home environment. Add new packages using guix install and as soon as I feel fine with it, add it to my home environment pinned to the working version (this will probably not work for the system config). But that’s not a good strategy is it? :thinking:

Not pinning packages but the version of the channel to a known good version.

This way you convert the rolling release to one with increments you control.

This plus versioning of your config would make your setup truly reproducible.

1 Like

Pin using commit in your ~/.config/guix/channels.scm . Sometimes it takes a while to find a stable version, especially if you accidentally pull after they did a huge merge upstream. When I came back to Guix System I had to steal the commit hashes from David’s dotfiles to get the system to install correctly.

(list
 (channel
  (name 'guix)
  (url "https://codeberg.org/guix/guix.git")
  (branch "master")
  ;; (commit "0aef9716b")
  (introduction
   (make-channel-introduction
    "9edb3f66fd807b096b48283debdcddccfea34bad"
    (openpgp-fingerprint
     "BBB0 2DDF 2CEA F6A8 0D1D E643 A2A0 6DF2 A33A 54FA"))))
 (channel
  (name 'nonguix)
  (url "https://gitlab.com/nonguix/nonguix")
  (branch "master")
  ;; (commit "60ffd0353")
  (introduction
   (make-channel-introduction
    "897c1a470da759236cc11798f4e0a5f7d4d59fbc"
    (openpgp-fingerprint
     "2A39 3FFF 68F4 EF7A 3D29 12AF 6F51 20A0 22FB B2D5")))))
3 Likes

I came here because I’m dealing with same problem :slight_smile: But with this one question I remembered, that there should be a way. You can use generations.

If everything worked before and it stopped after guix pull, you can simply call guix pull -–roll-back.

Plus you can get info about available generations with guix pull –-list-generations (or -l for short).

Btw. I belive same/similar system works for reconfigure no matter if it is home or SD.