[Top][All Lists]

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

Re: guix time-machine, broken hash in an old package definition, a worka

From: Wiktor Żelazny
Subject: Re: guix time-machine, broken hash in an old package definition, a workaround?
Date: Wed, 20 Jan 2021 10:35:14 +0100

On Fri, Jan 15, 2021 at 09:19:01PM +0100, Wiktor Żelazny wrote:

> A new idea: I just checked “CRAN Time Machine” at MRAN. The tarball
> with the 0g4mi101srjbl17ydb2hl3854m3xj0llj6861lfr30sp08nkqavl hash is
> there.

A solution with an inferior:

in guix-packages.git/local/cran.scm (guix-packages.git is a local git repo):

   (define-public r-foreign-fixed
     (package (inherit r-foreign)
        (version "0.8-75-fixed")
           (method url-fetch)

$ cat manifest.scm

   (use-modules (guix inferior) (guix channels)
                (srfi srfi-1))   ;for 'first'

   (define channels
     ;; This is the revision from which we want to
     ;; extract r-foreign.
     (list (channel
            (name 'guix)
            (url "";)
            (name 'local)
            (url "./guix-packages.git"))))

   (define inferior
      ;; An inferior representing the above revision
      (inferior-for-channels channels))

   ;; Now create a manifest with the current "r" package
   ;; and the substituted "r-foreign" package.
    (list (first (lookup-inferior-packages inferior "r-foreign" "0.8-75-fixed"))
          (specification->package "r")))

More stuff can be added to the manifest by appending other
`(specification->package "<package>")` elements to the list.

$ cat channel-specs.scm

  (list (channel
        (name 'local)
        (url "./guix-packages.git"))
        (name 'guix)
        (url "";)

$ guix time-machine --commit=d81fb2ae9443994ae5dd1cb5837276fad63f842c 
--channels=channel-specs.scm -- \
  environment -C --pure --manifest=manifest.scm

I extracted and adapted this from my larger package definition
repository and manifest, and did not test the resulting minimum version,
but you get the idea. Perhaps, this should go to the manual.


Attachment: signature.asc
Description: PGP signature

reply via email to

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