1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-11-24 20:19:45 +01:00
home-manager/tests/modules/programs/gradle/init-scripts-settings.nix

38 lines
933 B
Nix
Raw Normal View History

{ 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
}
'';
};
}