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

oraclejdk8: armv7l support #27419

Merged
merged 1 commit into from
Jul 16, 2017
Merged

oraclejdk8: armv7l support #27419

merged 1 commit into from
Jul 16, 2017

Conversation

elitak
Copy link
Contributor

@elitak elitak commented Jul 16, 2017

Motivation for this change

I wanted to run i2p on ARM, so this was needed.

Things done

Added the conditional branches to support armv7l hosts and did a little cleanup in hooks (will trigger rebuilds of oraclejdk on all archs).

Tested with 'services.i2p.enable = true;`. i2p seemed to work okay.

  • Tested using sandboxing
    (nix.useSandbox on NixOS,
    or option build-use-sandbox in nix.conf
    on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • Linux
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

@mention-bot
Copy link

@elitak, thanks for your PR! By analyzing the history of the files in this pull request, we identified @edolstra, @taku0 and @vcunat to be potential reviewers.

@Mic92
Copy link
Member

Mic92 commented Jul 16, 2017

I got an evaluation error for this change:

error: while evaluating ‘oraclejdk8psu_distro’ at /etc/nixos/nixpkgs/.review/pr-27419-fze06kij/pkgs/top-level/all-packages.nix:5666:38, called from /etc/nixos/nixpkgs/.review/pr-27419-fze06kij/pkgs/top-level/all-packages.nix:5642:19:      
while evaluating anonymous function at /etc/nixos/nixpkgs/.review/pr-27419-fze06kij/pkgs/top-level/all-packages.nix:5668:60, called from /etc/nixos/nixpkgs/.review/pr-27419-fze06kij/pkgs/top-level/all-packages.nix:5668:5:                  
while evaluating ‘callPackageWith’ at /etc/nixos/nixpkgs/.review/pr-27419-fze06kij/lib/customisation.nix:113:35, called from /etc/nixos/nixpkgs/.review/pr-27419-fze06kij/pkgs/top-level/all-packages.nix:5669:8:                              
while evaluating ‘makeOverridable’ at /etc/nixos/nixpkgs/.review/pr-27419-fze06kij/lib/customisation.nix:72:24, called from /etc/nixos/nixpkgs/.review/pr-27419-fze06kij/lib/customisation.nix:117:8:                                          
while evaluating the file ‘/etc/nixos/nixpkgs/.review/pr-27419-fze06kij/pkgs/development/compilers/oraclejdk/jdk8psu-linux.nix’:                                                                                                               
anonymous function at /etc/nixos/nixpkgs/.review/pr-27419-fze06kij/pkgs/development/compilers/oraclejdk/jdk-linux-base.nix:1:1 called without required argument ‘sha256_armv7l’, at /etc/nixos/nixpkgs/.review/pr-27419-fze06kij/pkgs/development/compilers/oraclejdk/jdk8psu-linux.nix:1:1     

you might want to checkout the oraclejdk8psu_distro package.

@elitak
Copy link
Contributor Author

elitak commented Jul 16, 2017

Did you get that result by running something like NIX_PATH=nixpkgs=. nix-shell -p nox --run "nox-review wip --against HEAD^"? I'm getting a different, unrelated error on package leksah.

@elitak
Copy link
Contributor Author

elitak commented Jul 16, 2017

Eh, well the fix seems obvious enough: I just added the missing arg to the only other place that calls that function. Whatever you ran should work this time, I think.

jdk8 = openjdk8 // { outputs = [ "out" ]; };
jre8 = lib.setName "openjre-${lib.getVersion pkgs.openjdk8.jre}"
jdk8 = if stdenv.isArm then oraclejdk8 else openjdk8 // { outputs = [ "out" ]; };
jre8 = if stdenv.isArm then oraclejre8 else lib.setName "openjre-${lib.getVersion pkgs.openjdk8.jre}"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure about this one. Is it a good idea to provided the closed variant only on a single platform, where other plattforms get openjdk? Is openjdk non-functional on ARM? If you want to have a shortcut to not having to compile jdk on your device, you can still use packageOverrides.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/compilers/openjdk/bootstrap.nix#L32

Actually, there's no bootstrap for openjdk on ARM. I think oraclejdk is a sensible default until someone invests the time to get openjdk building on ARM. It won't install unless they have allowUnfree = true, anyway.

The dropbox-hosted bootstraps are a clear indicator of the sort of rabbit-hole I'm indisposed to explore, at the moment. If you really think having a nonfree dist as the default is worse than having no runtime at all for any java packages, then I can remove these lines, but I fail to see what the harm could be.

@Mic92 Mic92 merged commit d3ee993 into NixOS:master Jul 16, 2017
@elitak
Copy link
Contributor Author

elitak commented Feb 25, 2018

I don't specifically recall, but since I submitted this PR giving that as justification, chances are I did succeed in building i2p. I can't really check at the moment.

Is it broken for you or something?

@elitak
Copy link
Contributor Author

elitak commented Feb 25, 2018

I didn't touch any source or buildsteps, so maybe something has regressed? In any case, I have no insights to offer, sorry.

@elitak elitak deleted the armjdk branch December 29, 2018 08:42
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

Successfully merging this pull request may close these issues.

3 participants