help-guix
[Top][All Lists]
Advanced

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

Re: guix pull only from private channel


From: zimoun
Subject: Re: guix pull only from private channel
Date: Mon, 21 Dec 2020 13:16:10 +0100

Hi,

On Sat, 19 Dec 2020 at 12:28, Phil <phil@beadling.co.uk> wrote:

> The bit I was missing was how do I create a channels file that keeps
> 'guix' at a constant commit - the scheme snippet you sent me is perfect, and
> gave me a good way-in to the API - thanks!

Do not take the snippet as bullet-proof.  It is a quick example to
illustrate the Guix power. ;-)


> One question - what's the reasoning about making all channel files have
> a guix channel?  Obviously it makes sense that there must be a guix
> channel referenced somewhere - but my expectation was (wrongly) that if
> I created a channel file with only my private channel in it, it would
> simply ignore guix and pull only what my private channel offered.  Instead it
> complains that there is no guix channel defined.

You mean that:

--8<---------------cut here---------------start------------->8---
$ cat /tmp/one-channel.scm
(list
 (channel
  (name 'past)
  (url "https://gitlab.inria.fr/guix-hpc/guix-past.git";)))

$ guix pull -C /tmp/one-channel.scm -p /tmp/one
Updating channel 'past' from Git repository at 
'https://gitlab.inria.fr/guix-hpc/guix-past.git'...
guix pull: warning: pulled channel 'past' from a mirror of 
https://gitlab.inria.fr/guix-hpc/guix-past, which might be stale
Building from this channel:
  past      https://gitlab.inria.fr/guix-hpc/guix-past.git      829923f
/tmp/one-channel.scm:2:1: error: 'guix' channel is lacking
hint: Make sure your list of channels contains one channel named `guix' 
providing the core of Guix.
--8<---------------cut here---------------end--------------->8---

Well, somehow you need one channel that provides the command “guix”.  It
is possible to cheat with a local clone and set url to “file:///path/to/clone”.

> I'm guessing it wants to weigh-up guix vs my private channel to pick the
> latest version of a package from either, but that doesn't make sense to
> me if I know that my private channel contains packages which are always
> mutually exclusive from the guix channel?

I am not sure to understand what you want to do, but you can pin one
“guix” version with something like:

--8<---------------cut here---------------start------------->8---
(list
 (channel
  (name 'past)
  (url "https://gitlab.inria.fr/guix-hpc/guix-past.git";))
 (channel
  (name 'guix) ; avoid to recompute heavy derivations and build modules
  (url "https://git.savannah.gnu.org/git/guix.git";)
  (commit "d62c9b2671be55ae0305bebfda17b595f33797f2"))) ; v1.1.0
--8<---------------cut here---------------end--------------->8---


Hope that helps,
simon



reply via email to

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