From 213d11158fa6da415d3360314793084f00d19cc9 Mon Sep 17 00:00:00 2001 From: aszlig Date: Tue, 30 Dec 2014 23:06:28 +0100 Subject: [PATCH] beets: Use audiotools backend for replaygain. Using commands such as mp3gain and aacgain is only the default for backwards-compatible reasons. However, on Nix(OS), we would have to either patch those tools into beets or rely on an impurity, so let's depend on audiotools and also default to that backend. Of course, there is also a GStreamer backend, but it comes with a hell of additional dependencies (which not only cover audio files), which is why I decided against defaulting to GStreamer and package audiotools instead (in eecd932). Signed-off-by: aszlig --- pkgs/tools/audio/beets/default.nix | 5 ++++- .../beets/replaygain-default-audiotools.patch | 17 +++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 pkgs/tools/audio/beets/replaygain-default-audiotools.patch diff --git a/pkgs/tools/audio/beets/default.nix b/pkgs/tools/audio/beets/default.nix index d0a3a922f2b..a052a994afd 100644 --- a/pkgs/tools/audio/beets/default.nix +++ b/pkgs/tools/audio/beets/default.nix @@ -99,7 +99,10 @@ in buildPythonPackage rec { responses ]; - patches = [ ./mediafile-codec-fix.patch ]; + patches = [ + ./mediafile-codec-fix.patch + ./replaygain-default-audiotools.patch + ]; postPatch = '' sed -i -e '/assertIn.*item.*path/d' test/test_info.py diff --git a/pkgs/tools/audio/beets/replaygain-default-audiotools.patch b/pkgs/tools/audio/beets/replaygain-default-audiotools.patch new file mode 100644 index 00000000000..d852ea6feca --- /dev/null +++ b/pkgs/tools/audio/beets/replaygain-default-audiotools.patch @@ -0,0 +1,17 @@ +diff --git a/beetsplug/replaygain.py b/beetsplug/replaygain.py +index 40b3a3a..9b54a5a 100644 +--- a/beetsplug/replaygain.py ++++ b/beetsplug/replaygain.py +@@ -627,11 +627,10 @@ class ReplayGainPlugin(BeetsPlugin): + super(ReplayGainPlugin, self).__init__() + self.import_stages = [self.imported] + +- # default backend is 'command' for backward-compatibility. + self.config.add({ + 'overwrite': False, + 'auto': True, +- 'backend': u'command', ++ 'backend': u'audiotools', + 'targetlevel': 89, + }) +