Refreshing Guix custom channel packages
I have been playing around with my own Guix channel1 to host packages I'm using to experiment with using Guix as a tool to help build a reproducible development environments.
Guix has a really cool command called guix refresh
that should help
with updating projects. It's supposed to automatically search for the
latest version and update the package definition. But when i first
when to run this I got a very strange error,
$ guix refresh -u sbcl-goin devops/common-lisp/goin.scm:23:14: sbcl-goin: updating from version 0.0.0-1.6d2ad69 to version 0.1.0... guix refresh: error: mkstemp: Read-only file system
This error seems to not have a lot of documentation about it so I thought I would try and shed some light on it. I searched through the guix IRC logs, it's brought up every few months. The closest answer to my question I found was.
<nckhexen> two[m]: Using ‘guix refresh -u’ requires a writable Guix git checkout (in practice: ./pre-inst-env guix refresh -u). It will never work without that, but that's not made very clear. Could certainly use some UX improvement.
Since I'm using a channel, it was unlikely that not running Guix from cloned copy caused the issue. But it could be that Guix is trying to write to the Guix package dir and not my channel. While looking through the list of possible parameters for refresh, I did see a flag for load path. And sure enough, adding the current directory to the load path allows refreshing local channels.
$ guix refresh -u -L . sbcl-goin ./devops/common-lisp/goin.scm:21:12: sbcl-goin: updating from version 0.0.1 to version 0.1.0...