mirror of
https://github.com/nix-community/home-manager.git
synced 2025-03-09 10:16:55 +00:00
Instead of having to manually stub packages that should not be downloaded we instead automatically stub all packages (except a small list of whitelisted ones). Tests can re-introduce the real package by using the `realPkgs` module argument.
20 lines
562 B
Nix
20 lines
562 B
Nix
{ pkgs, ... }:
|
|
|
|
{
|
|
programs.gradle = {
|
|
enable = true;
|
|
home = ".gbt";
|
|
settings = { "org.gradle.caching" = true; };
|
|
initScripts = { "some-script.gradle".text = "println 'hello world'"; };
|
|
};
|
|
|
|
programs.java.package =
|
|
pkgs.runCommandLocal "java" { home = ""; } "mkdir $out";
|
|
|
|
nmt.script = ''
|
|
assertFileContains home-path/etc/profile.d/hm-session-vars.sh \
|
|
'export GRADLE_USER_HOME="/home/hm-user/.gbt"'
|
|
assertFileExists home-files/.gbt/gradle.properties
|
|
assertFileExists home-files/.gbt/init.d/some-script.gradle
|
|
'';
|
|
}
|