From 561b3d565091ec881aeeca41df8b12db16195c92 Mon Sep 17 00:00:00 2001 From: Shamrock Lee <44064051+ShamrockLee@users.noreply.github.com> Date: Mon, 8 Jun 2020 08:35:28 +0800 Subject: [PATCH] eclipse: add option `package` PR #1310 --- modules/programs/eclipse.nix | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/modules/programs/eclipse.nix b/modules/programs/eclipse.nix index 8ce605b10..21973ab93 100644 --- a/modules/programs/eclipse.nix +++ b/modules/programs/eclipse.nix @@ -13,6 +13,16 @@ in { programs.eclipse = { enable = mkEnableOption "Eclipse"; + package = mkOption { + type = types.package; + default = pkgs.eclipses.eclipse-platform; + defaultText = literalExample "pkgs.eclipses.eclipse-platform"; + example = literalExample "pkgs.eclipses.eclipse-java"; + description = '' + The Eclipse package to install. + ''; + }; + enableLombok = mkOption { type = types.bool; default = false; @@ -40,7 +50,7 @@ in { config = mkIf cfg.enable { home.packages = [ (pkgs.eclipses.eclipseWithPlugins { - eclipse = pkgs.eclipses.eclipse-platform; + eclipse = cfg.package; jvmArgs = cfg.jvmArgs ++ optional cfg.enableLombok "-javaagent:${pkgs.lombok}/share/java/lombok.jar"; plugins = cfg.plugins;