unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
From: "Björn Höfling" <bjoern.hoefling@bjoernhoefling.de>
To: Phil Beadling <phil@beadling.co.uk>
Cc: help-guix <help-guix@gnu.org>
Subject: Re: Find location of installed package in /gnu/store
Date: Sat, 15 May 2021 11:17:07 +0200	[thread overview]
Message-ID: <20210515111707.3e542006@alma-ubu.fritz.box> (raw)
In-Reply-To: <CAOvsyQu5qGqjH6dsn3FUKmkkyi5TVk-UwwMmZzHZ5eWo7NoABg@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1486 bytes --]

On Sat, 15 May 2021 03:28:01 +0100
Phil Beadling <phil@beadling.co.uk> 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
versions/states.

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

JAVA_HOME=~/extra-profiles/jdk11

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.

Björn

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

  parent reply	other threads:[~2021-05-15  9:17 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-15  2:28 Phil Beadling
2021-05-15  8:28 ` Edouard Klein
2021-05-15 16:27   ` Phil Beadling
2021-05-15  9:17 ` Björn Höfling [this message]
2021-05-16  2:58 ` Maxim Cournoyer

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=20210515111707.3e542006@alma-ubu.fritz.box \
    --to=bjoern.hoefling@bjoernhoefling.de \
    --cc=help-guix@gnu.org \
    --cc=phil@beadling.co.uk \
    --subject='Re: Find location of installed package in /gnu/store' \
    /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

unofficial mirror of help-guix@gnu.org 

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://yhetil.org/guix-user/0 guix-user/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 guix-user guix-user/ https://yhetil.org/guix-user \
		help-guix@gnu.org
	public-inbox-index guix-user

Example config snippet for mirrors.
Newsgroups are available over NNTP:
	nntp://news.yhetil.org/yhetil.gnu.guix.user
	nntp://news.gmane.io/gmane.comp.gnu.guix.user


AGPL code for this site: git clone http://ou63pmih66umazou.onion/public-inbox.git