unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: "Björn Höfling" <bjoern.hoefling@bjoernhoefling.de>
To: Nam Nguyen <namn@berkeley.edu>
Cc: 33153-done@debbugs.gnu.org
Subject: bug#33153: guix environment icedtea
Date: Thu, 25 Oct 2018 21:07:26 +0200	[thread overview]
Message-ID: <20181025210726.09f92ac7@alma-ubu> (raw)
In-Reply-To: <20181025172501.GA25851@antelope>

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

On Thu, 25 Oct 2018 10:25:01 -0700
Nam Nguyen <namn@berkeley.edu> wrote:

> I want to use guix environment with icedtea@3.7:jdk.
> --8<---------------cut here---------------start------------->8---
> user@antelope ~$ guix environment icedtea@3.7:jdk
> user@antelope ~ [env]$ java -version
> java version "1.7.0_171"
> OpenJDK Runtime Environment (IcedTea 2.6.13) (linux-gnu build
> 1.7.0_171-b02) OpenJDK 64-Bit Server VM (build 24.171-b02, mixed mode)
> --8<---------------cut here---------------end--------------->8---
> 
> When I installed to my user profile, I was able to get the desired
> icedtea version.
> --8<---------------cut here---------------start------------->8---
> user@antelope ~$ guix package -i icedtea@3.7:jdk
> user@antelope ~$ java -version
> openjdk version "1.8.0_161"
> OpenJDK Runtime Environment (IcedTea 3.7.0) (guix build 1.8.0_161-b12)
> OpenJDK 64-Bit Server VM (build 25.161-b12, mixed mode)
> --8<---------------cut here---------------end--------------->8---
> 
> Is guix environment installing an incorrect version of icedtea?

Hi Nam,

read the docs :-)

guix environment PACKAGE

is setting up an environment FOR developing PACKAGE, i.e. all its
dependencies/compilers are added to the environment.

If you want to have a package directly IN the environment, use the
--ad-hoc switch:

guix environment --ad-hoc PACKAGE

You can even combine both, for example to add more tools:

guix environment --pure guix --ad-hoc git

That would create a pure environment where the git command is
available and all tools to develop guix. The guix command is not in
here!

In your case, IcedTea 2 is used to develop IcedTea 3, that's the reason
why you found that in your environment.

Finally, you can add a "-- command" to the environment to execute a
command, so this should tell you the right version and afterwards
automatically exit the environment(-C == --container, to be absolutely
sure):

$ guix environment -C --ad-hoc icedtea@3.7:jdk -- javac -version
javac 1.8.0_161


I'm closing that bug,

Björn

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

      reply	other threads:[~2018-10-25 19:08 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-25 17:25 bug#33153: guix environment icedtea Nam Nguyen
2018-10-25 19:07 ` Björn Höfling [this message]

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=20181025210726.09f92ac7@alma-ubu \
    --to=bjoern.hoefling@bjoernhoefling.de \
    --cc=33153-done@debbugs.gnu.org \
    --cc=namn@berkeley.edu \
    /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.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

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).