unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
From: "Wiktor Żelazny" <wz@freeshell.de>
To: help-guix@gnu.org
Subject: Re: guix time-machine, broken hash in an old package definition, a workaround?
Date: Wed, 20 Jan 2021 10:35:14 +0100	[thread overview]
Message-ID: <20210120093514.hwd5ojuvrbzluu6a@wzguix> (raw)
In-Reply-To: <20210115201859.z4rlqu4xnsphowm4@wzguix>

[-- Attachment #1: Type: text/plain, Size: 2382 bytes --]

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")
        (source
           (origin
           (method url-fetch)
           (uri "https://cran.microsoft.com/snapshot/2020-01-27/src/contrib/foreign_0.8-75.tar.gz")
           (sha256
              (base32
                 "0g4mi101srjbl17ydb2hl3854m3xj0llj6861lfr30sp08nkqavl"))))))

$ 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 "https://git.savannah.gnu.org/git/guix.git")
            (commit
             "d81fb2ae9443994ae5dd1cb5837276fad63f842c"))
           (channel
            (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.
   (packages->manifest
    (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"))
      (channel
        (name 'guix)
        (url "https://git.savannah.gnu.org/git/guix.git")
        (commit
          "d81fb2ae9443994ae5dd1cb5837276fad63f842c")))

$ 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.

WŻ

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 963 bytes --]

  parent reply	other threads:[~2021-01-20  9:35 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-13 13:22 guix time-machine, broken hash in an old package definition, a workaround? Wiktor Żelazny
2021-01-13 16:24 ` zimoun
2021-01-13 19:28   ` Wiktor Żelazny
2021-01-13 18:57 ` Leo Famulari
2021-01-13 19:37   ` Wiktor Żelazny
2021-01-13 20:44     ` Leo Famulari
2021-01-14  8:30       ` Wiktor Żelazny
2021-01-14  9:48         ` zimoun
2021-01-14 19:00           ` Wiktor Żelazny
2021-01-14 20:29             ` zimoun
2021-01-15 20:18               ` Wiktor Żelazny
2021-01-15 20:48                 ` zimoun
2021-01-18  8:57                   ` Wiktor Żelazny
2021-01-18  9:11                     ` Wiktor Żelazny
2021-01-20  9:35                 ` Wiktor Żelazny [this message]
2021-01-20 10:15                   ` zimoun
2021-01-20 12:26                     ` Wiktor Żelazny
2021-01-20 15:03                       ` zimoun
2021-01-22 11:36                         ` Wiktor Żelazny
2021-01-22 16:29                           ` zimoun

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210120093514.hwd5ojuvrbzluu6a@wzguix \
    --to=wz@freeshell.de \
    --cc=help-guix@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).