Skip to content

Commit

Permalink
nixos/mopidy: add package option
Browse files Browse the repository at this point in the history
  • Loading branch information
Stunkymonkey committed Nov 14, 2024
1 parent d7ef69d commit abc211f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions nixos/modules/services/audio/mopidy.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ let
mopidyConf = pkgs.writeText "mopidy.conf" cfg.configuration;

mopidyEnv = pkgs.buildEnv {
name = "mopidy-with-extensions-${pkgs.mopidy.version}";
name = "mopidy-with-extensions-${cfg.package.version}";
paths = lib.closePropagation cfg.extensionPackages;
pathsToLink = [ "/${pkgs.mopidyPackages.python.sitePackages}" ];
nativeBuildInputs = [ pkgs.makeWrapper ];
postBuild = ''
makeWrapper ${pkgs.mopidy}/bin/mopidy $out/bin/mopidy \
makeWrapper ${cfg.package}/bin/mopidy $out/bin/mopidy \
--prefix PYTHONPATH : $out/${pkgs.mopidyPackages.python.sitePackages}
'';
};
Expand All @@ -24,6 +24,8 @@ in {

enable = lib.mkEnableOption "Mopidy, a music player daemon";

package = lib.mkPackageOption pkgs "mopidy" { };

dataDir = lib.mkOption {
default = "/var/lib/mopidy";
type = lib.types.str;
Expand Down

0 comments on commit abc211f

Please sign in to comment.