Files
Austin Horstman a8f6b014a4 radio-active: honor package and settings options
Use the configured package for installation and player-specific patching, while preserving configuration generation when package is null. Generate any declared INI section and correct the settings example to match the nested section type.
2026-09-09 16:22:45 -05:00

43 lines
1017 B
Nix

{
programs.radio-active = {
enable = true;
package = null;
aliases = {
"Deep House Lounge" = "http://198.15.94.34:8006/stream";
};
settings.Favorites = {
station = "Deep House Lounge";
volume = 42;
};
};
test.stubs.radio-active = {
name = "radio-active-default";
outPath = null;
buildScript = ''
mkdir -p "$out/bin"
touch "$out/bin/radio-active"
'';
};
nmt.script = ''
assertPathNotExists home-path/bin/radio-active
assertFileExists home-files/.config/radio-active/configs.ini
assertFileContent home-files/.config/radio-active/configs.ini \
${builtins.toFile "expected.radio-active_favorites.ini" ''
[Favorites]
station=Deep House Lounge
volume=42
''}
assertFileExists home-files/.radio-active-alias
assertFileContent home-files/.radio-active-alias \
${builtins.toFile "expected.radio-active_aliases.ini" ''
Deep House Lounge==http://198.15.94.34:8006/stream
''}
'';
}