Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nix-env -i firefox provides invalid download link for SDK #30735

Closed
doublehp opened this issue Oct 23, 2017 · 3 comments
Closed

nix-env -i firefox provides invalid download link for SDK #30735

doublehp opened this issue Oct 23, 2017 · 3 comments

Comments

@doublehp
Copy link

Moving this bug to NixOS/nixpkgs from NixOS/nix NixOS/nix#1628

I am NIX beginner.

My aim: update Firefox.

What I typed:

bash <(curl https://nixos.org/nix/install)
. /home/dhp/.nix-profile/etc/profile.d/nix.sh
nix-env -i firefox

Result:

Unfortunately, we cannot download file jdk-8u144-linux-x64.tar.gz automatically.
Please go to http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html to download it yourself, and add it to the Nix store
using either
  nix-store --add-fixed sha256 jdk-8u144-linux-x64.tar.gz
or
  nix-prefetch-url --type sha256 file:///path/to/jdk-8u144-linux-x64.tar.gz

I hate this problem, but, I know Oracle is very boring about direct download, and nobody ever could workaround this legal issue (especially, I also have it in Gentoo). So, let's hope my old version of Firefox still functions, let's hope that on fresh install it's possible to either use an other browser to download the file, or have a light Firefox to download this dep. => needing a browser to install a browser can quickly become an egg-chicken issue.

The big issue I have met here is that, as of today, october 23rd 2017, the given link to oracle website only offers me SDK 151 and 152; what means, if I download them ... nix-store won't be able to put the file where it's expected, and the dep will remain unsatisfied.

Several solutions:

  • find a way to provide a link that would directly point to the good SDK version
  • tell if any recent version will do (otherwise, I will assume that non matching number will break the dep, and, I will assume that version 151 will NOT satisfy the need for jdk-8u144-linux-x64.tar.gz
  • can't find any other alternative for this issue :/

Technical details

$ lsb_release -a
LSB Version:    n/a
Distributor ID: Gentoo
Description:    Gentoo Base System release 2.2
Release:        2.2
Codename:       n/a

$ nix-env --version
nix-env (Nix) 1.11.15
  • Nixpkgs version: (run nix-instantiate --eval '<nixpkgs>' -A lib.nixpkgsVersion)

error: getting status of â/home/dhp/firefoxâ: No such file or directory

  • Sandboxing enabled: (run grep build-use-sandbox /etc/nix/nix.conf)

returned error 2

@emmanuelrosa
Copy link
Contributor

Hmm... I'm pretty sure firefox does not depend on Oracle's JDK. In fact, it doesn't depend on any JDK. Something else is going on.

That message is produced by the Oracle JDK package. You can see it here in the call to requireFile:

@doublehp
Copy link
Author

doublehp commented Oct 25, 2017

Of course, you are talking about this:

$ cat ~/.nixpkgs/config.nix
{
    allowUnfree = true;
    firefox = {
         enableGoogleTalkPlugin = true;
        enableAdobeFlash = true;
        jre = true;
#       icedtea = true;
    };

    chromium = {
         enablePepperFlash = true; # Chromium's non-NSAPI alternative to Adobe Flash
         enablePepperPDF = true;
   };
}

which explains why I was wrong and there is no egg-chicken problem, but, still does not solve the main issue.

I have also ended up in searching manually the required file, and Google gave me http://www.oracle.com/technetwork/java/javase/downloads/java-archive-javase8-2177648.html?printOnly=1 ... which still does not really solve the bug: nix-env provides an invalid link. But this archive link could help you fixing it, and develop a long term workaround.

@doublehp doublehp changed the title nix-env -i firefox provides invalid downlink for SDK nix-env -i firefox provides invalid download link for SDK Oct 25, 2017
@emmanuelrosa
Copy link
Contributor

The fix for the URL was merged 7 days ago: #30536

It's in the Nixpkgs unstable channel right now, so you should have access to it: NixOS/nixpkgs-channels@f11948d

@Mic92 Mic92 closed this as completed Nov 19, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants