home-manager/tests/modules/services/mopidy/mopidy-scan.nix
Robert Helgesson 7a3f0b3b8d
tests: rework derivation stubbing
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.
2025-02-04 23:58:20 +01:00

25 lines
489 B
Nix

{ pkgs, ... }:
{
services.mopidy = {
enable = true;
extensionPackages = [ pkgs.mopidy-local ];
};
test.stubs = {
mopidy = {
version = "0";
outPath = null;
buildScript = ''
mkdir -p $out/bin
touch $out/bin/mopidy
chmod +x $out/bin/mopidy
'';
};
};
nmt.script = ''
assertFileExists home-files/.config/systemd/user/mopidy.service
assertFileExists home-files/.config/systemd/user/mopidy-scan.service
'';
}