fork/home-manager
git clone https://git.julia.blue/fork/home-manager
4fa1ba72
master
1{ config , lib , pkgs , ...} : 2 3with lib ; 4 5let 6 7cfg = config . programs . eclipse ; 8 9in { 10meta . maintainers = [ maintainers . rycee ]; 11 12options = { 13programs . eclipse = { 14enable = mkEnableOption "Eclipse" ; 15 16package = mkOption { 17type = types . package ; 18default = pkgs . eclipses . eclipse-platform ; 19defaultText = literalExpression "pkgs.eclipses.eclipse-platform" ; 20example = literalExpression "pkgs.eclipses.eclipse-java" ; 21description = '' 22The Eclipse package to install. 23'' ; 24}; 25 26enableLombok = mkOption { 27type = types . bool ; 28default = false ; 29example = true ; 30description = '' 31Whether to enable the Lombok Java Agent in Eclipse. This is 32necessary to use the Lombok class annotations. 33'' ; 34}; 35 36jvmArgs = mkOption { 37type = types . listOf types . str ; 38default = [ ]; 39description = "JVM arguments to use for the Eclipse process." ; 40}; 41 42plugins = mkOption { 43type = types . listOf types . package ; 44default = [ ]; 45description = "Plugins that should be added to Eclipse." ; 46}; 47}; 48}; 49 50config = mkIf cfg . enable { 51home . packages = [ 52( pkgs . eclipses . eclipseWithPlugins { 53eclipse = cfg . package ; 54jvmArgs = cfg . jvmArgs ++ optional cfg . enableLombok 55"-javaagent: ${ pkgs . lombok } /share/java/lombok.jar" ; 56plugins = cfg . plugins ; 57}) 58]; 59}; 60}