beets: Set Python version via top-level attribute
This largely reverts commit 599312739e3a338f923e6c22ab183178ca49c7b6. The main reason is that it breaks the plugins, because the mentioned commit didn't change the attributes for the plugins as well. But instead of just fixing the attributes when we import the plugin packages, let's just override pythonPackages in all-packages.nix. Right now, Beets is in transition to Python 3, so we don't need to wait that long until we can remove the dependency on Python 2: https://github.com/beetbox/beets/releases/tag/v1.4.1 Once Python 3 support is no longer beta, we can just change this by changing one line only instead of several. Tested this by building beets with both external plugins. Signed-off-by: aszlig <aszlig@redmoonstudios.org> Cc: @FRidh
This commit is contained in:
parent
a76f5241c5
commit
1f9cbcd21d
@ -1,5 +1,5 @@
|
|||||||
{ stdenv, fetchFromGitHub, writeScript, glibcLocales
|
{ stdenv, fetchFromGitHub, writeScript, glibcLocales
|
||||||
, python2Packages, imagemagick
|
, pythonPackages, imagemagick
|
||||||
|
|
||||||
, enableAcousticbrainz ? true
|
, enableAcousticbrainz ? true
|
||||||
, enableAcoustid ? true
|
, enableAcoustid ? true
|
||||||
@ -22,17 +22,17 @@
|
|||||||
, bashInteractive, bash-completion
|
, bashInteractive, bash-completion
|
||||||
}:
|
}:
|
||||||
|
|
||||||
assert enableAcoustid -> python2Packages.pyacoustid != null;
|
assert enableAcoustid -> pythonPackages.pyacoustid != null;
|
||||||
assert enableBadfiles -> flac != null && mp3val != null;
|
assert enableBadfiles -> flac != null && mp3val != null;
|
||||||
assert enableConvert -> ffmpeg != null;
|
assert enableConvert -> ffmpeg != null;
|
||||||
assert enableDiscogs -> python2Packages.discogs_client != null;
|
assert enableDiscogs -> pythonPackages.discogs_client != null;
|
||||||
assert enableFetchart -> python2Packages.responses != null;
|
assert enableFetchart -> pythonPackages.responses != null;
|
||||||
assert enableKeyfinder -> keyfinder-cli != null;
|
assert enableKeyfinder -> keyfinder-cli != null;
|
||||||
assert enableLastfm -> python2Packages.pylast != null;
|
assert enableLastfm -> pythonPackages.pylast != null;
|
||||||
assert enableMpd -> python2Packages.mpd != null;
|
assert enableMpd -> pythonPackages.mpd != null;
|
||||||
assert enableReplaygain -> bs1770gain != null;
|
assert enableReplaygain -> bs1770gain != null;
|
||||||
assert enableThumbnails -> python2Packages.pyxdg != null;
|
assert enableThumbnails -> pythonPackages.pyxdg != null;
|
||||||
assert enableWeb -> python2Packages.flask != null;
|
assert enableWeb -> pythonPackages.flask != null;
|
||||||
|
|
||||||
with stdenv.lib;
|
with stdenv.lib;
|
||||||
|
|
||||||
@ -72,7 +72,7 @@ let
|
|||||||
testShell = "${bashInteractive}/bin/bash --norc";
|
testShell = "${bashInteractive}/bin/bash --norc";
|
||||||
completion = "${bash-completion}/share/bash-completion/bash_completion";
|
completion = "${bash-completion}/share/bash-completion/bash_completion";
|
||||||
|
|
||||||
in python2Packages.buildPythonApplication rec {
|
in pythonPackages.buildPythonApplication rec {
|
||||||
name = "beets-${version}";
|
name = "beets-${version}";
|
||||||
version = "1.4.1";
|
version = "1.4.1";
|
||||||
|
|
||||||
@ -84,34 +84,34 @@ in python2Packages.buildPythonApplication rec {
|
|||||||
};
|
};
|
||||||
|
|
||||||
propagatedBuildInputs = [
|
propagatedBuildInputs = [
|
||||||
python2Packages.enum34
|
pythonPackages.enum34
|
||||||
python2Packages.jellyfish
|
pythonPackages.jellyfish
|
||||||
python2Packages.munkres
|
pythonPackages.munkres
|
||||||
python2Packages.musicbrainzngs
|
pythonPackages.musicbrainzngs
|
||||||
python2Packages.mutagen
|
pythonPackages.mutagen
|
||||||
python2Packages.pathlib
|
pythonPackages.pathlib
|
||||||
python2Packages.pyyaml
|
pythonPackages.pyyaml
|
||||||
python2Packages.unidecode
|
pythonPackages.unidecode
|
||||||
] ++ optional enableAcoustid python2Packages.pyacoustid
|
] ++ optional enableAcoustid pythonPackages.pyacoustid
|
||||||
++ optional (enableFetchart
|
++ optional (enableFetchart
|
||||||
|| enableEmbyupdate
|
|| enableEmbyupdate
|
||||||
|| enableAcousticbrainz)
|
|| enableAcousticbrainz)
|
||||||
python2Packages.requests2
|
pythonPackages.requests2
|
||||||
++ optional enableConvert ffmpeg
|
++ optional enableConvert ffmpeg
|
||||||
++ optional enableDiscogs python2Packages.discogs_client
|
++ optional enableDiscogs pythonPackages.discogs_client
|
||||||
++ optional enableKeyfinder keyfinder-cli
|
++ optional enableKeyfinder keyfinder-cli
|
||||||
++ optional enableLastfm python2Packages.pylast
|
++ optional enableLastfm pythonPackages.pylast
|
||||||
++ optional enableMpd python2Packages.mpd
|
++ optional enableMpd pythonPackages.mpd
|
||||||
++ optional enableThumbnails python2Packages.pyxdg
|
++ optional enableThumbnails pythonPackages.pyxdg
|
||||||
++ optional enableWeb python2Packages.flask
|
++ optional enableWeb pythonPackages.flask
|
||||||
++ optional enableAlternatives (import ./alternatives-plugin.nix {
|
++ optional enableAlternatives (import ./alternatives-plugin.nix {
|
||||||
inherit stdenv python2Packages fetchFromGitHub;
|
inherit stdenv pythonPackages fetchFromGitHub;
|
||||||
})
|
})
|
||||||
++ optional enableCopyArtifacts (import ./copyartifacts-plugin.nix {
|
++ optional enableCopyArtifacts (import ./copyartifacts-plugin.nix {
|
||||||
inherit stdenv python2Packages fetchFromGitHub;
|
inherit stdenv pythonPackages fetchFromGitHub;
|
||||||
});
|
});
|
||||||
|
|
||||||
buildInputs = with python2Packages; [
|
buildInputs = with pythonPackages; [
|
||||||
beautifulsoup4
|
beautifulsoup4
|
||||||
imagemagick
|
imagemagick
|
||||||
mock
|
mock
|
||||||
|
@ -1018,7 +1018,9 @@ in
|
|||||||
|
|
||||||
beanstalkd = callPackage ../servers/beanstalkd { };
|
beanstalkd = callPackage ../servers/beanstalkd { };
|
||||||
|
|
||||||
beets = callPackage ../tools/audio/beets { };
|
beets = callPackage ../tools/audio/beets {
|
||||||
|
pythonPackages = python2Packages;
|
||||||
|
};
|
||||||
|
|
||||||
bgs = callPackage ../tools/X11/bgs { };
|
bgs = callPackage ../tools/X11/bgs { };
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user