Skip to content

Commit

Permalink
Merge pull request #65 from sebaszv/java-add-lombok-integration
Browse files Browse the repository at this point in the history
java: enable Lombok integration
  • Loading branch information
lucperkins authored Nov 19, 2024
2 parents 7f906fa + 4e0c4d2 commit 3082152
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions java/flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
jdk = prev."jdk${toString javaVersion}";
maven = prev.maven.override { jdk_headless = jdk; };
gradle = prev.gradle.override { java = jdk; };
lombok = prev.lombok.override { inherit jdk; };
};

devShells = forEachSupportedSystem ({ pkgs }: {
Expand All @@ -31,6 +32,15 @@
patchelf
zlib
];

shellHook =
let
loadLombok = "-javaagent:${pkgs.lombok}/share/java/lombok.jar";
prev = "\${JAVA_TOOL_OPTIONS:+ $JAVA_TOOL_OPTIONS}";
in
''
export JAVA_TOOL_OPTIONS="${loadLombok}${prev}"
'';
};
});
};
Expand Down

0 comments on commit 3082152

Please sign in to comment.