Skip to content
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

feat: Add option to select jdk with clojure #1343

Merged
merged 3 commits into from
Jul 28, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion src/modules/languages/clojure.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,26 @@ in
{
options.languages.clojure = {
enable = lib.mkEnableOption "tools for Clojure development";
jdk.package = lib.mkOption {
type = lib.types.package;
example = lib.literalExpression "pkgs.jdk8";
default = pkgs.jdk;
defaultText = lib.literalExpression "pkgs.jdk";
description = ''
The JDK package to use.
This will also become available as `JAVA_HOME`.
'';
};
};

config = lib.mkIf cfg.enable {
packages = with pkgs; [
clojure
(clojure.override {
jdk = cfg.jdk.package;
})
clojure-lsp
];

env.JAVA_HOME = cfg.jdk.package.home;
k3yss marked this conversation as resolved.
Show resolved Hide resolved
};
}