-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
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
ant: use upstream launcher script #364094
base: staging
Are you sure you want to change the base?
ant: use upstream launcher script #364094
Conversation
@@ -11,6 +11,8 @@ stdenv.mkDerivation (finalAttrs: { | |||
pname = "ant"; | |||
version = "1.10.15"; | |||
|
|||
buildInputs = [ jre ]; |
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.
Also, will this change make it so that we don't actually need to add both jdk and ant into nativeBuildInputs when using ant?
Also also,
jdk
vsjre
? (I'd sayjdk
)
--@TomaSajt
From my testing, if we use
jdk
, that is the case, but setting it tojdk
makes it difficult to use a different version of Java without overriding ant.
--Me
Is there a reason that we shouldn't have consumers explicitly specify a JDK?
--Me
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.
Isn’t jre
the same as jdk
these days?
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 think the distinction usually is the fact that jre may be overridden to be run on a different java version than it was built on (why tho) or it can be overridden with a minimal java.
Though I doubt many people would care, so I guess we don't have to care either.
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 just meant re: “From my testing, if we use jdk
, that is the case” – since I do think ensuring people explicitly specify a JDK is best.
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.
When you say "explicitly specify" do you mean that ant should have a hardcoded jdk that can be overridden, or do you mean that it should not have a hardcoded jdk, but should use whatever's in JAVA_HOME.
I'm torn between the two options.
Let's use Ant's upstream launcher script. It handles far more edge-cases than ours.
Instead of writing our own, let's simply hard-code values into the launcher that are known in advance.
One small step towards #353512. Closes #4105, because a path to the JRE is one of the things we now explicitly set. Something similar first attempted by @linsui in #266313. Accidentally screwed up #359451.
Things done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)Add a 👍 reaction to pull requests you find important.