[Top][All Lists]

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

Re: Find location of installed package in /gnu/store

From: Björn Höfling
Subject: Re: Find location of installed package in /gnu/store
Date: Sat, 15 May 2021 11:17:07 +0200

On Sat, 15 May 2021 03:28:01 +0100
Phil Beadling <> wrote:

> Given a package definition, eg icedtea-8's JDK, how can can I
> determine the location of the installed package in my /gnu/store?


> The aim is to use this to derivive the JDK include directories in a
> generic way for some scripts I'm writing, such that I don't need to
> update them each time the JDK hash changes after a guix pull.

In your store, there will be probably many icedtea-8's lying around,
because you or another user on your system updated it several times or
even compiled it with different sources.

Even when you say you want to to get the hash of what "guix pull"
currently has (see Edouard's answer), that might be different from what
is in your current profile, because you haven't executed yet a "guix
package -u", or you have several profiles around with different

From a practical perspective, what I have for the JDK: I put different
versions in different profiles, like:

guix package -i icedtea@3:jdk -p ~/extra-profiles/jdk8
guix package -i openjdk@11:jdk -p ~/extra-profiles/jdk11

(if you want to have the profile in your path, source it as the
command-output tells you, or at it to your bashrc)

Then I can set the JAVA_HOME variable to


to use JDK 11. Also in Eclipse in the preferences, you can add
different installed JREs. I use this to point to my extra-profile.


Attachment: pgp6NGSLFmVkm.pgp
Description: OpenPGP digital signature

reply via email to

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