help-guix
[Top][All Lists]
Advanced

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

Re: GUIX_PACKAGE_PATH doesn't have priority over official guix packages


From: Phil Beadling
Subject: Re: GUIX_PACKAGE_PATH doesn't have priority over official guix packages
Date: Sat, 16 Oct 2021 22:03:54 +0100

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 via email to

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