From 1f9cbcd21de891540139bbb86faa4b14ce23bd15 Mon Sep 17 00:00:00 2001 From: aszlig Date: Sat, 3 Dec 2016 05:21:00 +0100 Subject: 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 Cc: @FRidh --- pkgs/tools/audio/beets/default.nix | 54 +++++++++++++++++++------------------- 1 file changed, 27 insertions(+), 27 deletions(-) (limited to 'pkgs/tools/audio/beets') diff --git a/pkgs/tools/audio/beets/default.nix b/pkgs/tools/audio/beets/default.nix index 8adb68078a2..0c6dc9219c4 100644 --- a/pkgs/tools/audio/beets/default.nix +++ b/pkgs/tools/audio/beets/default.nix @@ -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 -- cgit 1.4.1