mirror of
https://github.com/nix-community/home-manager
synced 2024-12-30 06:53:25 +00:00
433120e47d
Introduces a new program called gradle for managing files stored in the home directory by the [Gradle Build Tool](https://gradle.org). Gradle uses the $HOME/.gradle folder for all it's configuration. Features of the new program module are: - Automatically setting programs.java.enable = true to make a Java installation available for running Gradle. - Specifying an alternate Gradle home directory - Setting of abitrary values for gradle.properties stored inside the Gradle home directory. - Defining init scripts that will be linked into the init.d inside the Gradle home directory. Co-authored-by: Olli Helenius <liff@iki.fi> Co-authored-by: Robert Helgesson <robert@rycee.net>
37 lines
933 B
Nix
37 lines
933 B
Nix
{ config, lib, pkgs, ... }:
|
|
|
|
with lib;
|
|
|
|
{
|
|
config = {
|
|
programs.gradle = {
|
|
enable = true;
|
|
|
|
initScripts = {
|
|
"inline-init-script.gradle".text = ''
|
|
println 'inline-init-script'
|
|
'';
|
|
"external-init-script.gradle".source = ./external-init-script.gradle;
|
|
};
|
|
};
|
|
|
|
programs.java.package =
|
|
pkgs.runCommandLocal "java" { home = ""; } "mkdir $out";
|
|
|
|
test.stubs.gradle = { };
|
|
|
|
nmt.script = ''
|
|
assertFileExists home-files/.gradle/init.d/inline-init-script.gradle
|
|
assertFileContent home-files/.gradle/init.d/inline-init-script.gradle ${
|
|
pkgs.writeText "gradle.expected" ''
|
|
println 'inline-init-script'
|
|
''
|
|
}
|
|
|
|
assertFileExists home-files/.gradle/init.d/external-init-script.gradle
|
|
assertFileContent home-files/.gradle/init.d/external-init-script.gradle ${
|
|
./external-init-script.gradle
|
|
}
|
|
'';
|
|
};
|
|
}
|