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.
37 lines
754 B
Nix
37 lines
754 B
Nix
{ pkgs, ... }:
|
|
|
|
let
|
|
plugins = [{
|
|
org = "a";
|
|
artifact = "b";
|
|
version = "c";
|
|
}];
|
|
|
|
credentials = [{
|
|
realm = "a";
|
|
host = "b";
|
|
user = "c";
|
|
passwordCommand = "d";
|
|
}];
|
|
|
|
repositories = [ "local" ];
|
|
|
|
baseSbtPath = ".config/sbt";
|
|
in {
|
|
config = {
|
|
programs.sbt = {
|
|
enable = true;
|
|
plugins = plugins;
|
|
credentials = credentials;
|
|
repositories = repositories;
|
|
baseUserConfigPath = ".config/sbt";
|
|
package = pkgs.writeScriptBin "sbt" "";
|
|
};
|
|
|
|
nmt.script = ''
|
|
assertFileExists "home-files/${baseSbtPath}/1.0/plugins/plugins.sbt"
|
|
assertFileExists "home-files/${baseSbtPath}/1.0/credentials.sbt"
|
|
assertFileExists "home-files/${baseSbtPath}/repositories"
|
|
'';
|
|
};
|
|
}
|