From b836ab365bee9d1d72469057e88a843b458078f3 Mon Sep 17 00:00:00 2001 From: Peter Jones Date: Mon, 13 Apr 2015 14:04:51 -0600 Subject: [PATCH] beets: Update to new upstream version 1.3.11 Adds glibcLocales as a dependency so that the unit tests with UTF-8 strings will work correctly. --- pkgs/tools/audio/beets/default.nix | 40 +++++++++++++++++------------- 1 file changed, 23 insertions(+), 17 deletions(-) diff --git a/pkgs/tools/audio/beets/default.nix b/pkgs/tools/audio/beets/default.nix index cf58ab7890c3..4d4badc345bd 100644 --- a/pkgs/tools/audio/beets/default.nix +++ b/pkgs/tools/audio/beets/default.nix @@ -1,26 +1,26 @@ -{ stdenv, fetchFromGitHub, writeScript +{ stdenv, fetchFromGitHub, writeScript, glibcLocales , buildPythonPackage, pythonPackages, python , enableAcoustid ? true -, enableBeatport ? true , enableDiscogs ? true , enableEchonest ? true , enableFetchart ? true , enableLastfm ? true , enableMpd ? true , enableReplaygain ? true +, enableThumbnails ? true , enableWeb ? true , bashInteractive, bashCompletion }: assert enableAcoustid -> pythonPackages.pyacoustid != null; -assert enableBeatport -> pythonPackages.responses != null; assert enableDiscogs -> pythonPackages.discogs_client != null; assert enableEchonest -> pythonPackages.pyechonest != null; assert enableFetchart -> pythonPackages.responses != null; assert enableLastfm -> pythonPackages.pylast != null; assert enableMpd -> pythonPackages.mpd != null; +assert enableThumbnails -> pythonPackages.pyxdg != null; assert enableReplaygain -> pythonPackages.audiotools != null; assert enableWeb -> pythonPackages.flask != null; @@ -28,7 +28,6 @@ with stdenv.lib; let optionalPlugins = { - beatport = enableBeatport; chroma = enableAcoustid; discogs = enableDiscogs; echonest = enableEchonest; @@ -38,12 +37,13 @@ let mpdstats = enableMpd; mpdupdate = enableMpd; replaygain = enableReplaygain; + thumbnails = enableThumbnails; web = enableWeb; }; pluginsWithoutDeps = [ - "bench" "bpd" "bpm" "bucket" "convert" "duplicates" "embedart" "freedesktop" - "fromfilename" "ftintitle" "fuzzy" "ihate" "importadded" "importfeeds" + "bench" "bpd" "bpm" "bucket" "convert" "cue" "duplicates" "embedart" "freedesktop" + "fromfilename" "filefilter" "ftintitle" "fuzzy" "ihate" "importadded" "importfeeds" "info" "inline" "keyfinder" "lyrics" "mbcollection" "mbsync" "missing" "permissions" "play" "plexupdate" "random" "rewrite" "scrub" "smartplaylist" "spotify" "the" "types" "zero" @@ -59,14 +59,14 @@ let in buildPythonPackage rec { name = "beets-${version}"; - version = "1.3.10"; + version = "1.3.11"; namePrefix = ""; src = fetchFromGitHub { owner = "sampsyo"; repo = "beets"; rev = "v${version}"; - sha256 = "136rvzpygjym6hxq19qwiri5jxx718bbmi471mvc3vibrb7xj1sr"; + sha256 = "16jb1frds9vl40n9hy18x9xipxfzln3ym823vx8jymhv3by8p62m"; }; propagatedBuildInputs = [ @@ -74,18 +74,20 @@ in buildPythonPackage rec { pythonPackages.munkres pythonPackages.musicbrainzngs pythonPackages.mutagen + pythonPackages.pathlib pythonPackages.pyyaml pythonPackages.unidecode python.modules.sqlite3 python.modules.readline - ] ++ optional enableAcoustid pythonPackages.pyacoustid - ++ optional (enableBeatport || enableFetchart) pythonPackages.requests2 - ++ optional enableDiscogs pythonPackages.discogs_client - ++ optional enableEchonest pythonPackages.pyechonest - ++ optional enableLastfm pythonPackages.pylast - ++ optional enableMpd pythonPackages.mpd - ++ optional enableReplaygain pythonPackages.audiotools - ++ optional enableWeb pythonPackages.flask; + ] ++ optional enableAcoustid pythonPackages.pyacoustid + ++ optional enableFetchart pythonPackages.requests2 + ++ optional enableDiscogs pythonPackages.discogs_client + ++ optional enableEchonest pythonPackages.pyechonest + ++ optional enableLastfm pythonPackages.pylast + ++ optional enableMpd pythonPackages.mpd + ++ optional enableThumbnails pythonPackages.pyxdg + ++ optional enableReplaygain pythonPackages.audiotools + ++ optional enableWeb pythonPackages.flask; buildInputs = with pythonPackages; [ beautifulsoup4 @@ -134,6 +136,8 @@ in buildPythonPackage rec { checkPhase = '' runHook preCheck + LANG=en_US.UTF-8 \ + LOCALE_ARCHIVE=${glibcLocales}/lib/locale/locale-archive \ BEETS_TEST_SHELL="${testShell}" \ BASH_COMPLETION_SCRIPT="${completion}" \ HOME="$(mktemp -d)" \ @@ -160,10 +164,12 @@ in buildPythonPackage rec { runHook postInstallCheck ''; + LANG = null; + meta = { homepage = http://beets.radbox.org; description = "Music tagger and library organizer"; license = stdenv.lib.licenses.mit; - maintainers = with stdenv.lib.maintainers; [ iElectric aszlig ]; + maintainers = with stdenv.lib.maintainers; [ iElectric aszlig pjones ]; }; }