diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index 47c1ce41671b..e828b0cad61e 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -619,6 +619,7 @@ in { mongodb = handleTest ./mongodb.nix {}; moodle = handleTest ./moodle.nix {}; moonraker = handleTest ./moonraker.nix {}; + mopidy = handleTest ./mopidy.nix {}; morph-browser = handleTest ./morph-browser.nix { }; morty = handleTest ./morty.nix {}; mosquitto = handleTest ./mosquitto.nix {}; diff --git a/nixos/tests/mopidy.nix b/nixos/tests/mopidy.nix new file mode 100644 index 000000000000..bbc46b525ce5 --- /dev/null +++ b/nixos/tests/mopidy.nix @@ -0,0 +1,12 @@ +import ./make-test-python.nix ({ pkgs, ... }: { + name = "mopidy"; + + nodes.machine = { ... }: { + services.mopidy.enable = true; + }; + + testScript = '' + machine.wait_for_unit("mopidy") + machine.wait_for_open_port(6680) + ''; +}) diff --git a/pkgs/applications/audio/mopidy/mopidy.nix b/pkgs/applications/audio/mopidy/mopidy.nix index 579cbbf98dc0..01e582f3923e 100644 --- a/pkgs/applications/audio/mopidy/mopidy.nix +++ b/pkgs/applications/audio/mopidy/mopidy.nix @@ -8,6 +8,7 @@ glib-networking, gobject-introspection, pipewire, + nixosTests, }: pythonPackages.buildPythonApplication rec { @@ -57,6 +58,8 @@ pythonPackages.buildPythonApplication rec { # There are no tests doCheck = false; + passthru.tests = { inherit (nixosTests) mopidy; }; + meta = with lib; { homepage = "https://www.mopidy.com/"; description = "Extensible music server that plays music from local disk, Spotify, SoundCloud, and more";