mopidy: Create a mopidyPackages set

This is to avoid mixing python versions in the same plugin closure.
This commit is contained in:
adisbladis 2020-03-15 12:48:08 +00:00
parent 83cb22963b
commit 5340ebe085
No known key found for this signature in database
GPG key ID: 110BFAD44C6249B7
5 changed files with 53 additions and 32 deletions

View file

@ -13,11 +13,11 @@ let
mopidyEnv = buildEnv {
name = "mopidy-with-extensions-${mopidy.version}";
paths = closePropagation cfg.extensionPackages;
pathsToLink = [ "/${python3.sitePackages}" ];
pathsToLink = [ "/${mopidyPackages.python.sitePackages}" ];
buildInputs = [ makeWrapper ];
postBuild = ''
makeWrapper ${mopidy}/bin/mopidy $out/bin/mopidy \
--prefix PYTHONPATH : $out/${python3.sitePackages}
--prefix PYTHONPATH : $out/${mopidyPackages.python.sitePackages}
'';
};
in {

View file

@ -0,0 +1,41 @@
{ newScope, python }:
# Create a custom scope so we are consistent in which python version is used
let
callPackage = newScope self;
self = {
inherit python;
pythonPackages = python.pkgs;
mopidy = callPackage ./mopidy.nix { };
mopidy-gmusic = callPackage ./gmusic.nix { };
mopidy-local-images = callPackage ./local-images.nix { };
mopidy-local-sqlite = callPackage ./local-sqlite.nix { };
mopidy-spotify = callPackage ./spotify.nix { };
mopidy-moped = callPackage ./moped.nix { };
mopidy-mopify = callPackage ./mopify.nix { };
mopidy-mpd = callPackage ./mpd.nix { };
mopidy-spotify-tunigo = callPackage ./spotify-tunigo.nix { };
mopidy-youtube = callPackage ./youtube.nix { };
mopidy-soundcloud = callPackage ./soundcloud.nix { };
mopidy-musicbox-webclient = callPackage ./musicbox-webclient.nix { };
mopidy-iris = callPackage ./iris.nix { };
};
in self

View file

@ -1,8 +1,8 @@
{ stdenv, fetchFromGitHub, python3Packages, wrapGAppsHook
{ stdenv, fetchFromGitHub, pythonPackages, wrapGAppsHook
, gst_all_1, glib-networking, gobject-introspection
}:
python3Packages.buildPythonApplication rec {
pythonPackages.buildPythonApplication rec {
pname = "mopidy";
version = "3.0.2";
@ -20,7 +20,7 @@ python3Packages.buildPythonApplication rec {
glib-networking gobject-introspection
];
propagatedBuildInputs = with python3Packages; [
propagatedBuildInputs = with pythonPackages; [
gst-python pygobject3 pykka tornado_4 requests setuptools
] ++ stdenv.lib.optional (!stdenv.isDarwin) dbus-python;

View file

@ -1,6 +1,6 @@
{ stdenv, fetchurl, python3Packages, mopidy }:
{ stdenv, fetchurl, pythonPackages, mopidy }:
python3Packages.buildPythonApplication rec {
pythonPackages.buildPythonApplication rec {
pname = "mopidy-spotify";
version = "4.0.1";
@ -9,7 +9,7 @@ python3Packages.buildPythonApplication rec {
sha256 = "1ac8r8050i5r3ag1hlblbcyskqjqz7wgamndbzsmw52qi6hxk44f";
};
propagatedBuildInputs = [ mopidy python3Packages.pyspotify ];
propagatedBuildInputs = [ mopidy pythonPackages.pyspotify ];
doCheck = false;

View file

@ -20640,31 +20640,11 @@ in
mop = callPackage ../applications/misc/mop { };
mopidy = callPackage ../applications/audio/mopidy/mopidy.nix { };
mopidyPackages = callPackages ../applications/audio/mopidy/default.nix {
python = python3;
};
mopidy-gmusic = callPackage ../applications/audio/mopidy/gmusic.nix { };
mopidy-local-images = callPackage ../applications/audio/mopidy/local-images.nix { };
mopidy-local-sqlite = callPackage ../applications/audio/mopidy/local-sqlite.nix { };
mopidy-spotify = callPackage ../applications/audio/mopidy/spotify.nix { };
mopidy-moped = callPackage ../applications/audio/mopidy/moped.nix { };
mopidy-mopify = callPackage ../applications/audio/mopidy/mopify.nix { };
mopidy-spotify-tunigo = callPackage ../applications/audio/mopidy/spotify-tunigo.nix { };
mopidy-youtube = callPackage ../applications/audio/mopidy/youtube.nix { };
mopidy-soundcloud = callPackage ../applications/audio/mopidy/soundcloud.nix { };
mopidy-musicbox-webclient = callPackage ../applications/audio/mopidy/musicbox-webclient.nix { };
mopidy-iris = callPackage ../applications/audio/mopidy/iris.nix { };
mopidy-mpd = callPackage ../applications/audio/mopidy/mpd.nix { };
inherit (mopidyPackages) mopidy mopidy-gmusic mopidy-local-images mopidy-local-sqlite mopidy-spotify mopidy-moped mopidy-mopify mopidy-spotify-tunigo mopidy-youtube mopidy-soundcloud mopidy-musicbox-webclient mopidy-iris mopidy-mpd;
motif = callPackage ../development/libraries/motif { };