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
oraclejdk: 8.191 -> 8.201; no longer depend on requireFile #54044
Conversation
cc @flokli |
}.${stdenv.hostPlatform.system}; | ||
}; | ||
|
||
architecture = architectures.${stdenv.hostPlatform.system}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do admit architecture
is a bad name, but adding architectures
too makes this more confusing. maybe something like architecturesMap
, if we really need it (see below)?
@@ -67,19 +77,23 @@ let | |||
|
|||
in | |||
|
|||
assert architectures ? ${stdenv.hostPlatform.system}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we just check whether ${stdenv.hostPlatform.system}
appears in sha256
, instead of also introducing architectures
?
url = downloadUrl; | ||
sha256 = sha256.${stdenv.hostPlatform.system}; | ||
in fetchurl { | ||
url = "http://download.oracle.com/otn-pub/java/jdk/${productVersion}u${patchVersion}-b${buildVersion}/${releaseToken}/jdk-${productVersion}u${patchVersion}-${platformName}.tar.gz"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is there some documentation explaining what oracle means for all these variables, maybe somewhere on their website?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Except releaseToken
this is pretty standard. I could have called the latter one also magic string.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the urls breaks that would not be much worse then the current state with requireFile
. One can still provide a working source in an overlay.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What use case do you have in mind with this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok. Got it. I am not sure if the release token can different between cpu and psu releases. I am also don't know, where I can even get either of these releases. That's why I put this into an external variable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Feel free to send a PR afterwards. I am going to merge this as is for now.
Didn't knew you can pass this cookie to download without manually having to click. Can you check whether this also applies to other oracle software, like |
I got the idea from here: https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=jdk#n31 |
also no longer use requireFile and accept the license via nixpkgs option
backport: [detached HEAD 5907c17] oraclejdk: 8.191 -> 8.201 |
Motivation for this change
No longer use requireFile and accept the license via nixpkgs option
Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)nix path-info -S
before and after)