Suppose I’m building a package for an app which runs off Java. It can already understand JAVA_HOME and JAVA environment variables.
So I basically have two options:
In package patchPhase, run find -exec sed to replace ${JAVA} with ${jre}/bin/java.
In module, set systemd.services.myname.environment.JAVA_HOME = "${pkgs.jre}".
Which one is preferrable? If the latter, do I rather mention jre in the package, or rather not and make them link at module stage rather than register a package-to-package dependency?
Well it’s kinda usable, but with required env vars (so it is in its original downloadable ZIP form). Isn’t nice for a nix package then, to be left this way?