unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
From: Phil Beadling <phil@beadling.co.uk>
To: help-guix <help-guix@gnu.org>
Subject: Re: GUIX_PACKAGE_PATH doesn't have priority over official guix packages
Date: Sat, 16 Oct 2021 22:03:54 +0100	[thread overview]
Message-ID: <CAOvsyQsAf6WLuiSucBoyRntu-2T_r78KtXuJezrzBK1TdkgUCw@mail.gmail.com> (raw)
In-Reply-To: <20211016084557.5quqd43ql4sckze4@localhost>

As far as I can see, Guix will always prefer the highest version number
irrspective of which channel is sources it from.

If you want another version you can use the '@' format as you have already
worked out.

Another way is to define the package is to keep the 'name' of the original,
but the definition returns a different Scheme variable name.  Using this
method you can even have multiple packages all pointing to the same version
of the source.

This can then be specified in most Guix commands using the "-e" switch with
a direct expression in Scheme like so:

guix environment --ad-hoc python -e '(@@ (my-package my-module)
python-pandas-special)'

(define-public python-pandas-special
  (package
    (inherit python-pandas)
    (version "1.1.2")

To avoid your command line getting overly complicated you can store your
package requirements in a manifest which allows for similar specification.

It can also be specified as a dependency in your own packages like this:
("python-pandas" ,python-pandas-special)

HTH,
Phil.

On Sat, 16 Oct 2021 at 09:46, Tim Lee <progscriptclone@gmail.com> wrote:

> I have my own channel in a Git repository on my local computer.
> This is what I do to search and install packages from my own channel:
>
> $ cd /path/to/my-channel/
> $ GUIX_PACKAGE_PATH=. guix search 'mypackage'
> $ GUIX_PACKAGE_PATH=. guix install 'mypackage'
>
> However, if there is a package with the same name in both my channel and
> in the official guix channel, 'guix install' will install from the
> official guix channel instead of my channel. Is this supposed to happen?
> I thought that GUIX_PACKAGE_PATH is supposed to have priority over
> the official guix channel?
>
> I am currently working around this problem by specifying the version
> number when installing. For example:
>
> $ GUIX_PACKAGE_PATH=. guix install 'mypackage@1.2.3'
>
>

  reply	other threads:[~2021-10-16 21:04 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-16  8:45 GUIX_PACKAGE_PATH doesn't have priority over official guix packages Tim Lee
2021-10-16 21:03 ` Phil Beadling [this message]
2021-10-16 22:29   ` Tim Lee
2021-10-17  8:10     ` Phil
2021-10-17 11:36     ` Tobias Geerinckx-Rice
2021-10-17 12:15       ` Phil
2021-10-17 12:31         ` Tobias Geerinckx-Rice
2021-10-17 13:56         ` Tim Lee
2021-10-18 13:48   ` Paul Jewell

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=CAOvsyQsAf6WLuiSucBoyRntu-2T_r78KtXuJezrzBK1TdkgUCw@mail.gmail.com \
    --to=phil@beadling.co.uk \
    --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).