summary refs log tree commit diff
path: root/pkgs/tools/audio/beets
diff options
context:
space:
mode:
authoraszlig <aszlig@redmoonstudios.org>2016-12-03 05:21:00 +0100
committeraszlig <aszlig@redmoonstudios.org>2016-12-03 05:25:13 +0100
commit1f9cbcd21de891540139bbb86faa4b14ce23bd15 (patch)
treeefbabac1b8a8577a09951e875b2c14437b33815f /pkgs/tools/audio/beets
parenta76f5241c565afce7ca7843f5eaee40d87021451 (diff)
downloadnixpkgs-1f9cbcd21de891540139bbb86faa4b14ce23bd15.tar
nixpkgs-1f9cbcd21de891540139bbb86faa4b14ce23bd15.tar.gz
nixpkgs-1f9cbcd21de891540139bbb86faa4b14ce23bd15.tar.bz2
nixpkgs-1f9cbcd21de891540139bbb86faa4b14ce23bd15.tar.lz
nixpkgs-1f9cbcd21de891540139bbb86faa4b14ce23bd15.tar.xz
nixpkgs-1f9cbcd21de891540139bbb86faa4b14ce23bd15.tar.zst
nixpkgs-1f9cbcd21de891540139bbb86faa4b14ce23bd15.zip
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
Diffstat (limited to 'pkgs/tools/audio/beets')
-rw-r--r--pkgs/tools/audio/beets/default.nix54
1 files changed, 27 insertions, 27 deletions
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