```
(use-modules (guix inferior) (guix channels)
(srfi srfi-1)) ;for 'first'
(define channels
;; This is the old revision from which we want to
;; extract guile-json.
(list (channel
(name 'guix)
(commit
"65956ad3526ba09e1f7a40722c96c6ef7c0936fe"))))
(define inferior
;; An inferior representing the above revision.
(inferior-for-channels channels))
;; Now create a manifest with the current "guile" package
;; and the old "guile-json" package.
(packages->manifest
(list (first (lookup-inferior-packages inferior "guile-json"))
(specification->package "guile")))
```
```
$ guix --version
guix (GNU Guix) 0964671086fb9e372894e788038aee75098e61a6
Copyright (C) 2019 the Guix authors
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
```
```
$ guix package -n -m example-inferior.scm
Computing Guix derivation for 'x86_64-linux'... |
The following derivation will be built:
/gnu/store/zxrm9a410iywcdm71crjbg2j4ggpvdbv-profile.drv
The following profile hook will be built:
/gnu/store/gkhfa4z16x4336pbi1ha7njgdpm680yf-guix-package-cache.drv
guix package: error: exception thrown: #<condition &store-protocol-error [message: "build of `/gnu/store/zxrm9a410iywcdm71crjbg2j4ggpvdbv-profile.drv' failed" status: 100] 1f80de0>
```
I'm running guix on ubuntu 18.04.2.
I noticed bug 34402 was similar - I think I'm at the latest version of guix today.
--
Martin