beets: Set Python version via top-level attribute
This largely reverts commit 599312739e
.
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
|
||||
, python2Packages, imagemagick
|
||||
, pythonPackages, imagemagick
|
||||
|
||||
, enableAcousticbrainz ? true
|
||||
, enableAcoustid ? true
|
||||
|
@ -22,17 +22,17 @@
|
|||
, bashInteractive, bash-completion
|
||||
}:
|
||||
|
||||
assert enableAcoustid -> python2Packages.pyacoustid != null;
|
||||
assert enableAcoustid -> pythonPackages.pyacoustid != null;
|
||||
assert enableBadfiles -> flac != null && mp3val != null;
|
||||
assert enableConvert -> ffmpeg != null;
|
||||
assert enableDiscogs -> python2Packages.discogs_client != null;
|
||||
assert enableFetchart -> python2Packages.responses != null;
|
||||
assert enableDiscogs -> pythonPackages.discogs_client != null;
|
||||
assert enableFetchart -> pythonPackages.responses != null;
|
||||
assert enableKeyfinder -> keyfinder-cli != null;
|
||||
assert enableLastfm -> python2Packages.pylast != null;
|
||||
assert enableMpd -> python2Packages.mpd != null;
|
||||
assert enableLastfm -> pythonPackages.pylast != null;
|
||||
assert enableMpd -> pythonPackages.mpd != null;
|
||||
assert enableReplaygain -> bs1770gain != null;
|
||||
assert enableThumbnails -> python2Packages.pyxdg != null;
|
||||
assert enableWeb -> python2Packages.flask != null;
|
||||
assert enableThumbnails -> pythonPackages.pyxdg != null;
|
||||
assert enableWeb -> pythonPackages.flask != null;
|
||||
|
||||
with stdenv.lib;
|
||||
|
||||
|
@ -72,7 +72,7 @@ let
|
|||
testShell = "${bashInteractive}/bin/bash --norc";
|
||||
completion = "${bash-completion}/share/bash-completion/bash_completion";
|
||||
|
||||
in python2Packages.buildPythonApplication rec {
|
||||
in pythonPackages.buildPythonApplication rec {
|
||||
name = "beets-${version}";
|
||||
version = "1.4.1";
|
||||
|
||||
|
@ -84,34 +84,34 @@ in python2Packages.buildPythonApplication rec {
|
|||
};
|
||||
|
||||
propagatedBuildInputs = [
|
||||
python2Packages.enum34
|
||||
python2Packages.jellyfish
|
||||
python2Packages.munkres
|
||||
python2Packages.musicbrainzngs
|
||||
python2Packages.mutagen
|
||||
python2Packages.pathlib
|
||||
python2Packages.pyyaml
|
||||
python2Packages.unidecode
|
||||
] ++ optional enableAcoustid python2Packages.pyacoustid
|
||||
pythonPackages.enum34
|
||||
pythonPackages.jellyfish
|
||||
pythonPackages.munkres
|
||||
pythonPackages.musicbrainzngs
|
||||
pythonPackages.mutagen
|
||||
pythonPackages.pathlib
|
||||
pythonPackages.pyyaml
|
||||
pythonPackages.unidecode
|
||||
] ++ optional enableAcoustid pythonPackages.pyacoustid
|
||||
++ optional (enableFetchart
|
||||
|| enableEmbyupdate
|
||||
|| enableAcousticbrainz)
|
||||
python2Packages.requests2
|
||||
pythonPackages.requests2
|
||||
++ optional enableConvert ffmpeg
|
||||
++ optional enableDiscogs python2Packages.discogs_client
|
||||
++ optional enableDiscogs pythonPackages.discogs_client
|
||||
++ optional enableKeyfinder keyfinder-cli
|
||||
++ optional enableLastfm python2Packages.pylast
|
||||
++ optional enableMpd python2Packages.mpd
|
||||
++ optional enableThumbnails python2Packages.pyxdg
|
||||
++ optional enableWeb python2Packages.flask
|
||||
++ optional enableLastfm pythonPackages.pylast
|
||||
++ optional enableMpd pythonPackages.mpd
|
||||
++ optional enableThumbnails pythonPackages.pyxdg
|
||||
++ optional enableWeb pythonPackages.flask
|
||||
++ optional enableAlternatives (import ./alternatives-plugin.nix {
|
||||
inherit stdenv python2Packages fetchFromGitHub;
|
||||
inherit stdenv pythonPackages fetchFromGitHub;
|
||||
})
|
||||
++ optional enableCopyArtifacts (import ./copyartifacts-plugin.nix {
|
||||
inherit stdenv python2Packages fetchFromGitHub;
|
||||
inherit stdenv pythonPackages fetchFromGitHub;
|
||||
});
|
||||
|
||||
buildInputs = with python2Packages; [
|
||||
buildInputs = with pythonPackages; [
|
||||
beautifulsoup4
|
||||
imagemagick
|
||||
mock
|
||||
|
|
|
@ -1018,7 +1018,9 @@ in
|
|||
|
||||
beanstalkd = callPackage ../servers/beanstalkd { };
|
||||
|
||||
beets = callPackage ../tools/audio/beets { };
|
||||
beets = callPackage ../tools/audio/beets {
|
||||
pythonPackages = python2Packages;
|
||||
};
|
||||
|
||||
bgs = callPackage ../tools/X11/bgs { };
|
||||
|
||||
|
|
Loading…
Reference in New Issue