Part of what attracted me to GUIX is that various different versions of packages can be 'installed' at the same time without interfering with each other. But I can't figure out how to actually use those different versions.
E.g. recently, the pyyaml package was upgraded from 5.4.1 to 6.0. For various reasons, I want to keep using 5.4.1. (I'm just using pyyaml as an example here.) I do have the older versions in my store:
$ ls -d1 /gnu/store/*pyyaml*
/gnu/store/22v8l25b33vs65wjd9ap28n772bvlih3-python-pyyaml-5.4.1/
/gnu/store/2j2s1jd6y8x7mlqjp968955misx1qw1c-python-pyyaml-6.0/
/gnu/store/54imz4x65s3xbjrgrfswgk815gfkhk4b-python-pyyaml-5.4.1/
/gnu/store/6537a8na1rbilffqqi642q0lipqfi2zg-python-pyyaml-5.4.1.drv
/gnu/store/6flrrmhq203vg6awdw7r2lsmzix4g2rh-python-pyyaml-6.0-guile-builder
/gnu/store/73k3qdz9rdh64pl7a0f0951zm2pbx5s2-python-pyyaml-5.4.1.drv
/gnu/store/7bcbwi93ihz8v2sdzmj6l9vhjqaxr14l-python-pyyaml-5.4.1-builder
...
How can I use these older versions?
It would be fine to use such an older version only in isolation. For example, I was hoping something like this could work:
$ guix shell "[email protected]" python
guix shell: error: python-pyyaml: package not found for version 5.4.1
This error is expected, because that older version is not available in my channels. So maybe it is possible to somehow specify an older version of the channel to be used, but I cannot figure out how.
Side-node about the XY-problem, the immediate cause for this question is that docker-compose now does not work anymore:
$ guix shell docker-compose
guix shell: error: build of `/gnu/store/8qhvnw5mwra9i6ji24xlywcpdl0rdznn-docker-compose-1.29.2.drv' failed
$ zcat /var/log/guix/drvs/8q/hvnw5mwra9i6ji24xlywcpdl0rdznn-docker-compose-1.29.2.drv.gz
...checking requirements: ERROR: docker-compose==1.29.2 ContextualVersionConflict(PyYAML 6.0 (/gnu/store/igfl4023dzvl8vi6xs1m96lcsr4fdw07-python-pyyaml-6.0/lib/python3.9/site-packages), Requirement.parse('PyYAML<6,>=3.10'), {'docker-compose'})
However, I do not care particularly about docker-compose (w.r.t. this question). If anything, this question is part of my journey to replace that with GUIX-native tools.
(Also, I'm aware that pyyaml 6 forces some safety features on its users, so pyyaml 5 should not be used anymore; pyyaml is just used as an example.)