mirror of
https://github.com/nix-community/home-manager
synced 2024-11-18 00:59:44 +01:00
java: remove IFD
The previous variant used IFD to generate the `JAVA_HOME` variable and relied on internal hooks of the `java` package, this failed for a user cross compiling their configuration. This PR changes that and uses the `home` attribute, as documented in the very last sentence of the https://nixos.org/manual/nixpkgs/stable/#sec-language-java chapter.
This commit is contained in:
parent
0e9e86b179
commit
b3565b3447
1 changed files with 1 additions and 6 deletions
|
@ -36,11 +36,6 @@ in {
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
home.packages = [ cfg.package ];
|
home.packages = [ cfg.package ];
|
||||||
|
|
||||||
home.sessionVariables = {
|
home.sessionVariables.JAVA_HOME = cfg.package.home;
|
||||||
JAVA_HOME = fileContents (pkgs.runCommandLocal "java-home" { } ''
|
|
||||||
source "${cfg.package}/nix-support/setup-hook"
|
|
||||||
echo "$JAVA_HOME" > $out
|
|
||||||
'');
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue