[Top][All Lists]

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

A single reference to installed non-binaries

From: Phil Beadling
Subject: A single reference to installed non-binaries
Date: Tue, 17 Aug 2021 12:31:27 +0100

Hi all,

I have some platform independent files I have created a package for using
copy-build-system.  This works great but I've come across situation I don't
know how to handle.

Let's call the package I've made package-x, and let's say that package-y
(which is for arguments sake is a python build system) lists package-x as a

package-x is installing a directory, let's say "bar" from the source into

'(#:install-plan '(("bar" "share/foo/")))

Now whenever we install package-y, I should expect it's "share" directory
to contain foo/bar - and I find it to be the case.

No suprises so far.

The problem comes when I want to reference a file under "bar" in the source
code of package-y.

Depending on whether I install package-y via "guix install package-y -p
/path/to/profile" or via "guix environment --ad-hoc package-y" there is no
single reference to the bar directory that covers every use-case.

When I "install" the package - I can reference it using $GUIX_PROFILE
But as for example a developer when I'm coding package-y I would reference

This means that any source that references it must presumably attempt to
read it from $GUIX_ENVIRONMENT, and then on failure fallback to

This feels a bit brittle to me, and I'm hoping I've missed a trick, and
there's a better way to singluarly reference the location of a share
directory from any GUIX profile or environment?

Note the problem doesn't happen with binaries as the order of precedence in
the PATH variable avoids the issue.

Any ideas?


reply via email to

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