New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mopidy is broken #32234
Comments
@rvolosatovs do you know what commit you upgraded from? I started bisecting that with a new mopidy test.... |
@rvolosatovs can you try with the following diff applied? I can start mopidy (again). Since I never really used mopidy I can't really test if it works. --- a/nixos/modules/services/audio/mopidy.nix
+++ b/nixos/modules/services/audio/mopidy.nix
@@ -12,7 +12,7 @@ let
mopidyConf = writeText "mopidy.conf" cfg.configuration;
mopidyEnv = python.buildEnv.override {
- extraLibs = [ mopidy ] ++ cfg.extensionPackages;
+ extraLibs = cfg.extensionPackages;
};
in {
@@ -64,15 +64,18 @@ in {
###### implementation
- config = mkIf cfg.enable {
+ config = let
+ pythonSearchPath = makeSearchPathOutput "lib" pkgs.python.sitePackages [ mopidyEnv ];
+ in mkIf cfg.enable {
systemd.services.mopidy = {
wantedBy = [ "multi-user.target" ];
after = [ "network.target" "sound.target" ];
description = "mopidy music player daemon";
preStart = "mkdir -p ${cfg.dataDir} && chown -R mopidy:mopidy ${cfg.dataDir}";
+ environment.PYTHONPATH = pythonSearchPath;
serviceConfig = {
- ExecStart = "${mopidyEnv}/bin/mopidy --config ${concatStringsSep ":" ([mopidyConf] ++ cfg.extraConfigFiles)}";
+ ExecStart = "${mopidy}/bin/mopidy --config ${concatStringsSep ":" ([mopidyConf] ++ cfg.extraConfigFiles)}";
User = "mopidy";
PermissionsStartOnly = true;
};
@@ -81,6 +84,7 @@ in {
systemd.services.mopidy-scan = {
description = "mopidy local files scanner";
preStart = "mkdir -p ${cfg.dataDir} && chown -R mopidy:mopidy ${cfg.dataDir}";
+ environment.PYTHONPATH = pythonSearchPath;
serviceConfig = {
ExecStart = "${mopidyEnv}/bin/mopidy --config ${concatStringsSep ":" ([mopidyConf] ++ cfg.extraConfigFiles)} local scan";
User = "mopidy"; |
I think its due to #30606 which permits only Python modules inside What are the |
From what I can tell My best guess would be that it just needs them within the |
Modifying the extensions to use buildPythonPackage seems to work fine with @andir's patch, I've tested mopidy-spotify and mopidy-soundcloud. I'm experiencing a new separate issue where a gstreamer decoder for mp3 cannot be found, so I cannot play soundcloud or local files, but mopidy-soundcloud is still loaded, and mopidy-spotify works fine. I don't know if using buildPythonPackage is the most idiomatic solution, but it does work to get the service up and running and it makes sense to me. |
With the patch applied, mopidy starts, but extensions do not get loaded. Here's what I'm getting on
Something's wrong with the way
|
Hi @rvolosatovs! I think I've fixed mopidy in 85b8452. Could you check? |
Thanks! Indeed, now |
Issue description
After upgrading my system to
nixpkgs
commit cc1d7a3,mopidy
fails to startSteps to reproduce
checkout cc1d7a3 , set
services.mopidy.enable = true
Technical details
The text was updated successfully, but these errors were encountered: