Closed behrica closed 6 months ago
jdk seems to be "hardcoded" by ths line: https://github.com/NixOS/nixpkgs/blob/4c62c9792c90c78a6029b49d3a91f1bb733afaba/pkgs/development/tools/build-managers/leiningen/default.nix#L24
You should be able to override jdk argument, with your desired java version, as long as it's compatible to leiningen. Be aware that this will result in a cache miss and you will need to build it on your machine.
So
(pkgs.leinigen.override { jdk = pkgs.jdk19; })
It's handwritten on smartphone, so might need small adjustments, but that should override the jdk. Jdk19 should be replaced with the jdk you plan to use.
Idk leiningen, by I would also more suspect the JAVA_CMD few lines later to control the used java version, not the propagatedBuildInput.
Thanks @Shawn8901 , it solved it.
Describe the bug
I would like to use
leiningen
and decide the jdk version its usingSteps To Reproduce
Steps to reproduce the behavior:
Expected behavior
java 21 should get reported and used Leiningen 2.10.0 on Java 21
found behaviour
default
jdk is used: Leiningen 2.10.0 on Java 19.0.2Metadata
Please run
nix-shell -p nix-info --run "nix-info -m"
and paste the result.