[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: rolling back only a single package

From: Ricardo Wurmus
Subject: Re: rolling back only a single package
Date: Fri, 28 Dec 2018 15:49:05 +0100
User-agent: mu4e 1.0; emacs 26.1

Hi cdelia,

Björn wrote:

> There is a nice blog post by Ludivic that describes some aspects of it:
> It looks like the inferior thing he mentioned is already ready, but I
> haven't yet followed that.

Inferiors work, but you’d use them in manifests.  The idea is to install
the package with an old version of Guix, but to do it in code instead of
manually.  Here’s an example:

--8<---------------cut here---------------start------------->8---
(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)
         (url "";)

(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.
 (list (first (lookup-inferior-packages inferior "guile-json"))
       (specification->package "guile")))
--8<---------------cut here---------------end--------------->8---

You can instantiate the manifest the usual way:

    guix package -m /path/to/manifest.scm


reply via email to

[Prev in Thread] Current Thread [Next in Thread]