about summary refs log tree commit diff
path: root/nixpkgs/pkgs/tools/audio
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2021-01-15 10:30:44 +0000
committerAlyssa Ross <hi@alyssa.is>2021-01-15 10:30:44 +0000
commite0794be8a0d11e90461e5a9c85012a36b93ec976 (patch)
treeefd9cbc55ea3322867bf601c4d536758a3dd5fcc /nixpkgs/pkgs/tools/audio
parent3538874082ded7647b1ccec0343c7c1e882cfef3 (diff)
parent1a57d96edd156958b12782e8c8b6a374142a7248 (diff)
downloadnixlib-e0794be8a0d11e90461e5a9c85012a36b93ec976.tar
nixlib-e0794be8a0d11e90461e5a9c85012a36b93ec976.tar.gz
nixlib-e0794be8a0d11e90461e5a9c85012a36b93ec976.tar.bz2
nixlib-e0794be8a0d11e90461e5a9c85012a36b93ec976.tar.lz
nixlib-e0794be8a0d11e90461e5a9c85012a36b93ec976.tar.xz
nixlib-e0794be8a0d11e90461e5a9c85012a36b93ec976.tar.zst
nixlib-e0794be8a0d11e90461e5a9c85012a36b93ec976.zip
Merge commit '1a57d96edd156958b12782e8c8b6a374142a7248'
Diffstat (limited to 'nixpkgs/pkgs/tools/audio')
-rw-r--r--nixpkgs/pkgs/tools/audio/abcm2ps/default.nix4
-rw-r--r--nixpkgs/pkgs/tools/audio/abcmidi/default.nix4
-rw-r--r--nixpkgs/pkgs/tools/audio/aucdtect/default.nix33
-rw-r--r--nixpkgs/pkgs/tools/audio/audiowaveform/default.nix38
-rw-r--r--nixpkgs/pkgs/tools/audio/beets/badfiles-plugin-nix-paths.patch21
-rw-r--r--nixpkgs/pkgs/tools/audio/beets/bash-completion-always-print.patch43
-rw-r--r--nixpkgs/pkgs/tools/audio/beets/compatibility-with-breaking-changes-to-the-ast-module.patch55
-rw-r--r--nixpkgs/pkgs/tools/audio/beets/convert-plugin-ffmpeg-path.patch43
-rw-r--r--nixpkgs/pkgs/tools/audio/beets/default.nix179
-rw-r--r--nixpkgs/pkgs/tools/audio/beets/keyfinder-default-bin.patch20
-rw-r--r--nixpkgs/pkgs/tools/audio/beets/mutagen-1.43.patch40
-rw-r--r--nixpkgs/pkgs/tools/audio/beets/plugins/alternatives.nix (renamed from nixpkgs/pkgs/tools/audio/beets/alternatives-plugin.nix)0
-rw-r--r--nixpkgs/pkgs/tools/audio/beets/plugins/check-tests.patch (renamed from nixpkgs/pkgs/tools/audio/beets/beet-check-tests.patch)0
-rw-r--r--nixpkgs/pkgs/tools/audio/beets/plugins/check.nix (renamed from nixpkgs/pkgs/tools/audio/beets/check-plugin.nix)0
-rw-r--r--nixpkgs/pkgs/tools/audio/beets/plugins/copyartifacts.nix (renamed from nixpkgs/pkgs/tools/audio/beets/copyartifacts-plugin.nix)0
-rw-r--r--nixpkgs/pkgs/tools/audio/beets/plugins/extrafiles.nix (renamed from nixpkgs/pkgs/tools/audio/beets/extrafiles-plugin.nix)0
-rw-r--r--nixpkgs/pkgs/tools/audio/beets/replaygain-default-bs1770gain.patch17
-rw-r--r--nixpkgs/pkgs/tools/audio/beets/replaygain-default-ffmpeg.patch26
-rw-r--r--nixpkgs/pkgs/tools/audio/ezstream/default.nix2
-rw-r--r--nixpkgs/pkgs/tools/audio/kaldi/default.nix88
-rw-r--r--nixpkgs/pkgs/tools/audio/mpd-mpris/default.nix6
-rw-r--r--nixpkgs/pkgs/tools/audio/pasystray/default.nix12
-rw-r--r--nixpkgs/pkgs/tools/audio/picotts/default.nix2
-rw-r--r--nixpkgs/pkgs/tools/audio/playerctl/default.nix4
-rw-r--r--nixpkgs/pkgs/tools/audio/tts/default.nix123
-rw-r--r--nixpkgs/pkgs/tools/audio/volctl/default.nix46
26 files changed, 530 insertions, 276 deletions
diff --git a/nixpkgs/pkgs/tools/audio/abcm2ps/default.nix b/nixpkgs/pkgs/tools/audio/abcm2ps/default.nix
index 099ccc6f4cb8..139d684fb671 100644
--- a/nixpkgs/pkgs/tools/audio/abcm2ps/default.nix
+++ b/nixpkgs/pkgs/tools/audio/abcm2ps/default.nix
@@ -2,13 +2,13 @@
 
 stdenv.mkDerivation rec {
   pname = "abcm2ps";
-  version = "8.14.9";
+  version = "8.14.11";
 
   src = fetchFromGitHub {
     owner = "leesavide";
     repo = "abcm2ps";
     rev = "v${version}";
-    sha256 = "0h4qzj9k5ng09nbkfipvr82piq68c576akjwmhsqn05rvgirmhx7";
+    sha256 = "0lzzr2nkfg27gljcrdxkmli1wp08vap3vgxq1zgkv7f43rbm0qnw";
   };
 
   configureFlags = [
diff --git a/nixpkgs/pkgs/tools/audio/abcmidi/default.nix b/nixpkgs/pkgs/tools/audio/abcmidi/default.nix
index 4ab394516a84..e33ff98587bf 100644
--- a/nixpkgs/pkgs/tools/audio/abcmidi/default.nix
+++ b/nixpkgs/pkgs/tools/audio/abcmidi/default.nix
@@ -2,11 +2,11 @@
 
 stdenv.mkDerivation rec {
   pname = "abcMIDI";
-  version = "2020.08.09";
+  version = "2020.11.07";
 
   src = fetchzip {
     url = "https://ifdo.ca/~seymour/runabc/${pname}-${version}.zip";
-    sha256 = "1j7jkv2fdrhyyjavffb5nrs8p9mfp8zqqravcad1ayv1z2wxr8vl";
+    sha256 = "0zwzgqy1wa7yd2cm6spq11lw21mdn92lx8qzrxpk9kxcl03mv5jd";
   };
 
   # There is also a file called "makefile" which seems to be preferred by the standard build phase
diff --git a/nixpkgs/pkgs/tools/audio/aucdtect/default.nix b/nixpkgs/pkgs/tools/audio/aucdtect/default.nix
deleted file mode 100644
index ad9d5fb86905..000000000000
--- a/nixpkgs/pkgs/tools/audio/aucdtect/default.nix
+++ /dev/null
@@ -1,33 +0,0 @@
-{ stdenv, fetchurl, lib, rpmextract }:
-
-with lib;
-
-stdenv.mkDerivation rec {
-  pname = "aucdtect";
-  version = "0.8-2";
-
-  src = fetchurl {
-    url = "http://www.true-audio.com/ftp/${pname}-${version}.i586.rpm";
-    sha256 = "1lp5f0rq5b5n5il0c64m00gcfskarvgqslpryms9443d200y6mmd";
-  };
-
-  unpackCmd = "${rpmextract}/bin/rpmextract $src";
-
-  installPhase = ''
-    runHook preInstall
-
-    install -Dm755 local/bin/auCDtect $out/bin/aucdtect
-
-    runHook postInstall
-  '';
-
-  dontStrip = true;
-
-  meta = with stdenv.lib; {
-    description = "Verify authenticity of lossless audio files";
-    homepage = "http://tausoft.org";
-    license = licenses.unfreeRedistributable;
-    maintainers = with maintainers; [ peterhoeg ];
-    platforms = platforms.linux;
-  };
-}
diff --git a/nixpkgs/pkgs/tools/audio/audiowaveform/default.nix b/nixpkgs/pkgs/tools/audio/audiowaveform/default.nix
new file mode 100644
index 000000000000..9d674dcfe436
--- /dev/null
+++ b/nixpkgs/pkgs/tools/audio/audiowaveform/default.nix
@@ -0,0 +1,38 @@
+{ stdenv, fetchFromGitHub, cmake, gtest, boost, gd, libsndfile, libmad, libid3tag }:
+
+stdenv.mkDerivation rec {
+  pname = "audiowaveform";
+  version = "1.4.2";
+
+  src = fetchFromGitHub {
+    owner = "bbc";
+    repo = "audiowaveform";
+    rev = version;
+    sha256 = "0k2s2f2hgq4pnjzfkgvjwgsflihmzdq7shicfjn0z2mzw4d1bvp2";
+  };
+
+  nativeBuildInputs = [ cmake gtest ];
+
+  buildInputs = [ boost gd libsndfile libmad libid3tag ];
+
+  preConfigure = ''
+    ln -s ${gtest.src}/googletest googletest
+    ln -s ${gtest.src}/googlemock googlemock
+  '';
+
+  # One test is failing, see PR #101947
+  doCheck = false;
+
+  meta = with stdenv.lib; {
+    description = "C++ program to generate waveform data and render waveform images from audio files";
+    longDescription = ''
+      audiowaveform is a C++ command-line application that generates waveform data from either MP3, WAV, FLAC, or Ogg Vorbis format audio files.
+      Waveform data can be used to produce a visual rendering of the audio, similar in appearance to audio editing applications.
+    '';
+    homepage = "https://github.com/bbc/audiowaveform";
+    changelog = "https://github.com/bbc/audiowaveform/blob/${version}/ChangeLog";
+    license = licenses.gpl3Plus;
+    platforms = platforms.all;
+    maintainers = with maintainers; [ edbentley ];
+  };
+}
diff --git a/nixpkgs/pkgs/tools/audio/beets/badfiles-plugin-nix-paths.patch b/nixpkgs/pkgs/tools/audio/beets/badfiles-plugin-nix-paths.patch
new file mode 100644
index 000000000000..6956183344c4
--- /dev/null
+++ b/nixpkgs/pkgs/tools/audio/beets/badfiles-plugin-nix-paths.patch
@@ -0,0 +1,21 @@
+diff --git i/beetsplug/badfiles.py w/beetsplug/badfiles.py
+index 36b45de3..5208b696 100644
+--- i/beetsplug/badfiles.py
++++ w/beetsplug/badfiles.py
+@@ -71,14 +71,14 @@ class BadFiles(BeetsPlugin):
+         return status, errors, [line for line in output.split("\n") if line]
+ 
+     def check_mp3val(self, path):
+-        status, errors, output = self.run_command(["mp3val", path])
++        status, errors, output = self.run_command(["@mp3val@/bin/mp3val", path])
+         if status == 0:
+             output = [line for line in output if line.startswith("WARNING:")]
+             errors = len(output)
+         return status, errors, output
+ 
+     def check_flac(self, path):
+-        return self.run_command(["flac", "-wst", path])
++        return self.run_command(["@flac@/bin/flac", "-wst", path])
+ 
+     def check_custom(self, command):
+         def checker(path):
diff --git a/nixpkgs/pkgs/tools/audio/beets/bash-completion-always-print.patch b/nixpkgs/pkgs/tools/audio/beets/bash-completion-always-print.patch
new file mode 100644
index 000000000000..7bc3e57117e3
--- /dev/null
+++ b/nixpkgs/pkgs/tools/audio/beets/bash-completion-always-print.patch
@@ -0,0 +1,43 @@
+diff --git i/beets/ui/commands.py w/beets/ui/commands.py
+index 4d010f4b..0b023585 100755
+--- i/beets/ui/commands.py
++++ w/beets/ui/commands.py
+@@ -1741,20 +1741,6 @@ default_commands.append(config_cmd)
+ def print_completion(*args):
+     for line in completion_script(default_commands + plugins.commands()):
+         print_(line, end=u'')
+-    if not any(map(os.path.isfile, BASH_COMPLETION_PATHS)):
+-        log.warning(u'Warning: Unable to find the bash-completion package. '
+-                    u'Command line completion might not work.')
+-
+-BASH_COMPLETION_PATHS = map(syspath, [
+-    u'/etc/bash_completion',
+-    u'/usr/share/bash-completion/bash_completion',
+-    u'/usr/local/share/bash-completion/bash_completion',
+-    # SmartOS
+-    u'/opt/local/share/bash-completion/bash_completion',
+-    # Homebrew (before bash-completion2)
+-    u'/usr/local/etc/bash_completion',
+-])
+-
+ 
+ def completion_script(commands):
+     """Yield the full completion shell script as strings.
+diff --git i/test/test_ui.py w/test/test_ui.py
+index 5cfed1fd..9d3dc458 100644
+--- i/test/test_ui.py
++++ w/test/test_ui.py
+@@ -1230,12 +1230,7 @@ class CompletionTest(_common.TestCase, TestHelper):
+                                   stdout=subprocess.PIPE, env=env)
+ 
+         # Load bash_completion library.
+-        for path in commands.BASH_COMPLETION_PATHS:
+-            if os.path.exists(util.syspath(path)):
+-                bash_completion = path
+-                break
+-        else:
+-            self.skipTest(u'bash-completion script not found')
++        self.skipTest(u'bash-completion script not found')
+         try:
+             with open(util.syspath(bash_completion), 'rb') as f:
+                 tester.stdin.writelines(f)
diff --git a/nixpkgs/pkgs/tools/audio/beets/compatibility-with-breaking-changes-to-the-ast-module.patch b/nixpkgs/pkgs/tools/audio/beets/compatibility-with-breaking-changes-to-the-ast-module.patch
deleted file mode 100644
index 4865b6f62341..000000000000
--- a/nixpkgs/pkgs/tools/audio/beets/compatibility-with-breaking-changes-to-the-ast-module.patch
+++ /dev/null
@@ -1,55 +0,0 @@
-From 771ce704ebeac4cd9bd74b3ddde9fb01f3dc7eb4 Mon Sep 17 00:00:00 2001
-From: wisp3rwind <17089248+wisp3rwind@users.noreply.github.com>
-Date: Tue, 9 Jun 2020 19:34:31 +0200
-Subject: [PATCH] compatibility with breaking changes to the ast module
-
-new in 3.10, also backported to 3.8 and 3.9: https://github.com/python/cpython/pull/20649
-In fact, our generation of some Literals has been invalid since Python
-3.4, fix that too.
----
- beets/util/functemplate.py | 29 ++++++++++++++++++++---------
- 1 file changed, 20 insertions(+), 9 deletions(-)
-
-diff --git a/beets/util/functemplate.py b/beets/util/functemplate.py
-index af22b790..266534a9 100644
---- a/beets/util/functemplate.py
-+++ b/beets/util/functemplate.py
-@@ -73,15 +73,26 @@ def ex_literal(val):
-     """An int, float, long, bool, string, or None literal with the given
-     value.
-     """
--    if val is None:
--        return ast.Name('None', ast.Load())
--    elif isinstance(val, six.integer_types):
--        return ast.Num(val)
--    elif isinstance(val, bool):
--        return ast.Name(bytes(val), ast.Load())
--    elif isinstance(val, six.string_types):
--        return ast.Str(val)
--    raise TypeError(u'no literal for {0}'.format(type(val)))
-+    if sys.version_info[:2] < (3, 4):
-+        if val is None:
-+            return ast.Name('None', ast.Load())
-+        elif isinstance(val, six.integer_types):
-+            return ast.Num(val)
-+        elif isinstance(val, bool):
-+            return ast.Name(bytes(val), ast.Load())
-+        elif isinstance(val, six.string_types):
-+            return ast.Str(val)
-+        raise TypeError(u'no literal for {0}'.format(type(val)))
-+    elif sys.version_info[:2] < (3, 6):
-+        if val in [None, True, False]:
-+            return ast.NameConstant(val)
-+        elif isinstance(val, six.integer_types):
-+            return ast.Num(val)
-+        elif isinstance(val, six.string_types):
-+            return ast.Str(val)
-+        raise TypeError(u'no literal for {0}'.format(type(val)))
-+    else:
-+        return ast.Constant(val)
- 
- 
- def ex_varassign(name, expr):
--- 
-2.27.0
-
diff --git a/nixpkgs/pkgs/tools/audio/beets/convert-plugin-ffmpeg-path.patch b/nixpkgs/pkgs/tools/audio/beets/convert-plugin-ffmpeg-path.patch
new file mode 100644
index 000000000000..bcc77179d796
--- /dev/null
+++ b/nixpkgs/pkgs/tools/audio/beets/convert-plugin-ffmpeg-path.patch
@@ -0,0 +1,43 @@
+diff --git i/beetsplug/convert.py w/beetsplug/convert.py
+index 70363f6e..2962aa4f 100644
+--- i/beetsplug/convert.py
++++ w/beetsplug/convert.py
+@@ -81,7 +81,7 @@ def get_format(fmt=None):
+         command = config['convert']['command'].as_str()
+     elif 'opts' in keys:
+         # Undocumented option for backwards compatibility with < 1.3.1.
+-        command = u'ffmpeg -i $source -y {0} $dest'.format(
++        command = u'@ffmpeg@/bin/ffmpeg -i $source -y {0} $dest'.format(
+             config['convert']['opts'].as_str()
+         )
+     if 'extension' in keys:
+@@ -121,22 +121,22 @@ class ConvertPlugin(BeetsPlugin):
+             u'id3v23': u'inherit',
+             u'formats': {
+                 u'aac': {
+-                    u'command': u'ffmpeg -i $source -y -vn -acodec aac '
++                    u'command': u'@ffmpeg@/bin/ffmpeg -i $source -y -vn -acodec aac '
+                                 u'-aq 1 $dest',
+                     u'extension': u'm4a',
+                 },
+                 u'alac': {
+-                    u'command': u'ffmpeg -i $source -y -vn -acodec alac $dest',
++                    u'command': u'@ffmpeg@/bin/ffmpeg -i $source -y -vn -acodec alac $dest',
+                     u'extension': u'm4a',
+                 },
+-                u'flac': u'ffmpeg -i $source -y -vn -acodec flac $dest',
+-                u'mp3': u'ffmpeg -i $source -y -vn -aq 2 $dest',
++                u'flac': u'@ffmpeg@/bin/ffmpeg -i $source -y -vn -acodec flac $dest',
++                u'mp3': u'@ffmpeg@/bin/ffmpeg -i $source -y -vn -aq 2 $dest',
+                 u'opus':
+-                    u'ffmpeg -i $source -y -vn -acodec libopus -ab 96k $dest',
++                    u'@ffmpeg@/bin/ffmpeg -i $source -y -vn -acodec libopus -ab 96k $dest',
+                 u'ogg':
+-                    u'ffmpeg -i $source -y -vn -acodec libvorbis -aq 3 $dest',
++                    u'@ffmpeg@/bin/ffmpeg -i $source -y -vn -acodec libvorbis -aq 3 $dest',
+                 u'wma':
+-                    u'ffmpeg -i $source -y -vn -acodec wmav2 -vn $dest',
++                    u'@ffmpeg@/bin/ffmpeg -i $source -y -vn -acodec wmav2 -vn $dest',
+             },
+             u'max_bitrate': 500,
+             u'auto': False,
diff --git a/nixpkgs/pkgs/tools/audio/beets/default.nix b/nixpkgs/pkgs/tools/audio/beets/default.nix
index 56551891a4a5..f72692c845c7 100644
--- a/nixpkgs/pkgs/tools/audio/beets/default.nix
+++ b/nixpkgs/pkgs/tools/audio/beets/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchFromGitHub, writeScript, glibcLocales, diffPlugins
+{ stdenv, lib, fetchFromGitHub, writeScript, glibcLocales, diffPlugins, substituteAll
 , pythonPackages, imagemagick, gobject-introspection, gst_all_1
 , runtimeShell
 , fetchpatch
@@ -6,61 +6,70 @@
 # Attributes needed for tests of the external plugins
 , callPackage, beets
 
-, enableAbsubmit       ? stdenv.lib.elem stdenv.hostPlatform.system essentia-extractor.meta.platforms, essentia-extractor ? null
-, enableAcousticbrainz ? true
-, enableAcoustid       ? true
-, enableBadfiles       ? true, flac ? null, mp3val ? null
-, enableConvert        ? true, ffmpeg_3 ? null
-, enableDiscogs        ? true
-, enableEmbyupdate     ? true
-, enableFetchart       ? true
-, enableGmusic         ? true
-, enableKeyfinder      ? true, keyfinder-cli ? null
-, enableKodiupdate     ? true
-, enableLastfm         ? true
-, enableLoadext        ? true
-, enableMpd            ? true
-, enablePlaylist       ? true
-, enableReplaygain     ? true, bs1770gain ? null
-, enableSonosUpdate    ? true
-, enableSubsonicupdate ? true
-, enableThumbnails     ? true
-, enableWeb            ? true
+, enableAbsubmit         ? lib.elem stdenv.hostPlatform.system essentia-extractor.meta.platforms, essentia-extractor ? null
+, enableAcousticbrainz   ? true
+, enableAcoustid         ? true
+, enableBadfiles         ? true, flac ? null, mp3val ? null
+, enableBeatport         ? true
+, enableBpsync           ? true
+, enableConvert          ? true, ffmpeg ? null
+, enableDeezer           ? true
+, enableDiscogs          ? true
+, enableEmbyupdate       ? true
+, enableFetchart         ? true
+, enableGmusic           ? true
+, enableKeyfinder        ? true, keyfinder-cli ? null
+, enableKodiupdate       ? true
+, enableLastfm           ? true
+, enableLoadext          ? true
+, enableMpd              ? true
+, enablePlaylist         ? true
+, enableReplaygain       ? true
+, enableSonosUpdate      ? true
+, enableSubsonicplaylist ? true
+, enableSubsonicupdate   ? true
+, enableThumbnails       ? true
+, enableWeb              ? true
 
 # External plugins
-, enableAlternatives   ? false
-, enableCheck          ? false, liboggz ? null
-, enableCopyArtifacts  ? false
-, enableExtraFiles     ? false
+, enableAlternatives     ? false
+, enableCheck            ? false, liboggz ? null
+, enableCopyArtifacts    ? false
+, enableExtraFiles       ? false
 
 , bashInteractive, bash-completion
 }:
 
-assert enableAbsubmit    -> essentia-extractor            != null;
-assert enableAcoustid    -> pythonPackages.pyacoustid     != null;
+assert enableAbsubmit    -> essentia-extractor               != null;
+assert enableAcoustid    -> pythonPackages.pyacoustid        != null;
 assert enableBadfiles    -> flac != null && mp3val != null;
+assert enableBeatport    -> pythonPackages.requests_oauthlib != null;
+assert enableBpsync      -> enableBeatport;
 assert enableCheck       -> flac != null && mp3val != null && liboggz != null;
-assert enableConvert     -> ffmpeg_3 != null;
-assert enableDiscogs     -> pythonPackages.discogs_client != null;
-assert enableFetchart    -> pythonPackages.responses      != null;
-assert enableGmusic      -> pythonPackages.gmusicapi      != null;
-assert enableKeyfinder   -> keyfinder-cli != null;
-assert enableLastfm      -> pythonPackages.pylast         != null;
-assert enableMpd         -> pythonPackages.mpd2           != null;
-assert enableReplaygain  -> bs1770gain                    != null;
-assert enableSonosUpdate -> pythonPackages.soco           != null;
-assert enableThumbnails  -> pythonPackages.pyxdg          != null;
-assert enableWeb         -> pythonPackages.flask          != null;
-
-with stdenv.lib;
+assert enableConvert     -> ffmpeg                         != null;
+assert enableDiscogs     -> pythonPackages.discogs_client    != null;
+assert enableFetchart    -> pythonPackages.responses         != null;
+assert enableGmusic      -> pythonPackages.gmusicapi         != null;
+assert enableKeyfinder   -> keyfinder-cli                    != null;
+assert enableLastfm      -> pythonPackages.pylast            != null;
+assert enableMpd         -> pythonPackages.mpd2              != null;
+assert enableReplaygain  -> ffmpeg                         != null;
+assert enableSonosUpdate -> pythonPackages.soco              != null;
+assert enableThumbnails  -> pythonPackages.pyxdg             != null;
+assert enableWeb         -> pythonPackages.flask             != null;
+
+with lib;
 
 let
   optionalPlugins = {
     absubmit = enableAbsubmit;
     acousticbrainz = enableAcousticbrainz;
     badfiles = enableBadfiles;
+    beatport = enableBeatport;
+    bpsync = enableBpsync;
     chroma = enableAcoustid;
     convert = enableConvert;
+    deezer = enableDeezer;
     discogs = enableDiscogs;
     embyupdate = enableEmbyupdate;
     fetchart = enableFetchart;
@@ -75,18 +84,19 @@ let
     playlist = enablePlaylist;
     replaygain = enableReplaygain;
     sonosupdate = enableSonosUpdate;
+    subsonicplaylist = enableSubsonicplaylist;
     subsonicupdate = enableSubsonicupdate;
     thumbnails = enableThumbnails;
     web = enableWeb;
   };
 
   pluginsWithoutDeps = [
-    "beatport" "bench" "bpd" "bpm" "bucket" "cue" "duplicates" "edit" "embedart"
-    "export" "filefilter" "freedesktop" "fromfilename" "ftintitle" "fuzzy"
+    "bench" "bpd" "bpm" "bucket" "cue" "duplicates" "edit" "embedart"
+    "export" "filefilter" "fish" "freedesktop" "fromfilename" "ftintitle" "fuzzy"
     "hook" "ihate" "importadded" "importfeeds" "info" "inline" "ipfs" "lyrics"
-    "mbcollection" "mbsubmit" "mbsync" "metasync" "missing" "permissions" "play"
+    "mbcollection" "mbsubmit" "mbsync" "metasync" "missing" "parentwork" "permissions" "play"
     "plexupdate" "random" "rewrite" "scrub" "smartplaylist" "spotify" "the"
-    "types" "zero"
+    "types" "unimported" "zero"
   ];
 
   enabledOptionalPlugins = attrNames (filterAttrs (_: id) optionalPlugins);
@@ -102,28 +112,33 @@ let
     enableAlternatives = false;
     enableCopyArtifacts = false;
     enableExtraFiles = false;
-  }).overrideAttrs (stdenv.lib.const {
+  }).overrideAttrs (const {
     doInstallCheck = false;
   });
 
   pluginArgs = externalTestArgs // { inherit pythonPackages; };
 
   plugins = {
-    alternatives = callPackage ./alternatives-plugin.nix pluginArgs;
-    check = callPackage ./check-plugin.nix pluginArgs;
-    copyartifacts = callPackage ./copyartifacts-plugin.nix pluginArgs;
-    extrafiles = callPackage ./extrafiles-plugin.nix pluginArgs;
+    alternatives = callPackage ./plugins/alternatives.nix pluginArgs;
+    check = callPackage ./plugins/check.nix pluginArgs;
+    copyartifacts = callPackage ./plugins/copyartifacts.nix pluginArgs;
+    extrafiles = callPackage ./plugins/extrafiles.nix pluginArgs;
   };
 
 in pythonPackages.buildPythonApplication rec {
   pname = "beets";
-  version = "1.4.9";
+  # While there is a stable version, 1.4.9, it is more than 1000 commits behind
+  # master and lacks many bug fixes and improvements[1]. Also important,
+  # unstable does not require bs1770gain[2].
+  # [1]: https://discourse.beets.io/t/forming-a-beets-core-team/639
+  # [2]: https://github.com/NixOS/nixpkgs/pull/90504
+  version = "unstable-2020-12-22";
 
   src = fetchFromGitHub {
     owner = "beetbox";
     repo = "beets";
-    rev = "v${version}";
-    sha256 = "1qxdqbzvz97zgykzdwn78g2xyxmg0q2jdb12dnjnrwvhmjv67vi8";
+    rev = "53dcb24d10788897f20c341774b474808ec2c0b6";
+    sha256 = "sha256-P++NA13T2TRHW3Se10np8BSe/WRBYAKRte5xKoHKW50=";
   };
 
   propagatedBuildInputs = [
@@ -137,19 +152,25 @@ in pythonPackages.buildPythonApplication rec {
     pythonPackages.unidecode
     pythonPackages.gst-python
     pythonPackages.pygobject3
+    pythonPackages.reflink
+    pythonPackages.confuse
+    pythonPackages.mediafile
     gobject-introspection
   ] ++ optional enableAbsubmit      essentia-extractor
     ++ optional enableAcoustid      pythonPackages.pyacoustid
+    ++ optional enableBeatport      pythonPackages.requests_oauthlib
     ++ optional (enableFetchart
+              || enableDeezer
               || enableEmbyupdate
               || enableKodiupdate
               || enableLoadext
               || enablePlaylist
+              || enableSubsonicplaylist
               || enableSubsonicupdate
               || enableAcousticbrainz)
                                     pythonPackages.requests
     ++ optional enableCheck         plugins.check
-    ++ optional enableConvert       ffmpeg_3
+    ++ optional enableConvert       ffmpeg
     ++ optional enableDiscogs       pythonPackages.discogs_client
     ++ optional enableGmusic        pythonPackages.gmusicapi
     ++ optional enableKeyfinder     keyfinder-cli
@@ -187,41 +208,35 @@ in pythonPackages.buildPythonApplication rec {
   ];
 
   patches = [
-    ./replaygain-default-bs1770gain.patch
+    # Bash completion fix for Nix
+    ./bash-completion-always-print.patch
+    # From some reason upstream assumes the program 'keyfinder-cli' is located
+    # in the path as `KeyFinder`
     ./keyfinder-default-bin.patch
-    ./mutagen-1.43.patch
-    (fetchpatch {
-      # Fixes failing testcases around the werkzeug component; can dropped after 1.4.9
-      url = "https://github.com/beetbox/beets/commit/d43d54e21cde97f57f19486925ab56b419254cc8.patch";
-      sha256 = "13n2gzmcgfi0m2ycl2r1hpczgksplnkc3y6b66vg57rx5y8nnv5c";
+  ]
+    # We need to force ffmpeg as the default, since we do not package
+    # bs1770gain, and set the absolute path there, to avoid impurities.
+    ++ lib.optional enableReplaygain (substituteAll {
+      src = ./replaygain-default-ffmpeg.patch;
+      ffmpeg = getBin ffmpeg;
     })
+    # Put absolute Nix paths in place
+    ++ lib.optional enableConvert (substituteAll {
+      src = ./convert-plugin-ffmpeg-path.patch;
+      ffmpeg = getBin ffmpeg;
+    })
+    ++ lib.optional enableBadfiles (substituteAll {
+      src = ./badfiles-plugin-nix-paths.patch;
+      inherit mp3val flac;
+    })
+  ;
 
-    # Fixes 548 tests due to breaking changes to the ast module
-    # https://github.com/beetbox/beets/pull/3621
-    # Can be dropped after 1.4.9
-    ./compatibility-with-breaking-changes-to-the-ast-module.patch
-  ];
-
+  # Disable failing tests
   postPatch = ''
     sed -i -e '/assertIn.*item.*path/d' test/test_info.py
     echo echo completion tests passed > test/rsrc/test_completion.sh
 
-    sed -i -e '/^BASH_COMPLETION_PATHS *=/,/^])$/ {
-      /^])$/i u"${completion}"
-    }' beets/ui/commands.py
-  '' + optionalString enableBadfiles ''
-    sed -i -e '/self\.run_command(\[/ {
-      s,"flac","${flac.bin}/bin/flac",
-      s,"mp3val","${mp3val}/bin/mp3val",
-    }' beetsplug/badfiles.py
-  '' + optionalString enableConvert ''
-    sed -i -e 's,\(util\.command_output(\)\([^)]\+\)),\1[b"${ffmpeg_3.bin}/bin/ffmpeg" if args[0] == b"ffmpeg" else args[0]] + \2[1:]),' beetsplug/convert.py
-  '' + optionalString enableReplaygain ''
-    sed -i -re '
-      s!^( *cmd *= *b?['\'''"])(bs1770gain['\'''"])!\1${bs1770gain}/bin/\2!
-    ' beetsplug/replaygain.py
-    sed -i -e 's/if has_program.*bs1770gain.*:/if True:/' \
-      test/test_replaygain.py
+    sed -i -e 's/len(mf.images)/0/' test/test_zero.py
   '';
 
   postInstall = ''
@@ -281,7 +296,7 @@ in pythonPackages.buildPythonApplication rec {
     description = "Music tagger and library organizer";
     homepage = "http://beets.io";
     license = licenses.mit;
-    maintainers = with maintainers; [ aszlig domenkozar pjones ];
+    maintainers = with maintainers; [ aszlig domenkozar doronbehar lovesegfault pjones ];
     platforms = platforms.linux;
   };
 }
diff --git a/nixpkgs/pkgs/tools/audio/beets/keyfinder-default-bin.patch b/nixpkgs/pkgs/tools/audio/beets/keyfinder-default-bin.patch
index 1ea195a678e8..ec6bc3a5561c 100644
--- a/nixpkgs/pkgs/tools/audio/beets/keyfinder-default-bin.patch
+++ b/nixpkgs/pkgs/tools/audio/beets/keyfinder-default-bin.patch
@@ -1,8 +1,8 @@
 diff --git a/beetsplug/keyfinder.py b/beetsplug/keyfinder.py
-index 34a4abc..59e8539 100644
+index 702003f0..08689cd8 100644
 --- a/beetsplug/keyfinder.py
 +++ b/beetsplug/keyfinder.py
-@@ -30,7 +30,7 @@ class KeyFinderPlugin(BeetsPlugin):
+@@ -31,7 +31,7 @@ class KeyFinderPlugin(BeetsPlugin):
      def __init__(self):
          super(KeyFinderPlugin, self).__init__()
          self.config.add({
@@ -11,18 +11,8 @@ index 34a4abc..59e8539 100644
              u'auto': True,
              u'overwrite': False,
          })
-@@ -59,8 +59,7 @@ class KeyFinderPlugin(BeetsPlugin):
-                 continue
- 
-             try:
--                output = util.command_output([bin, '-f',
--                                              util.syspath(item.path)])
-+                output = util.command_output([bin, util.syspath(item.path)])
-             except (subprocess.CalledProcessError, OSError) as exc:
-                 self._log.error(u'execution failed: {0}', exc)
-                 continue
 diff --git a/test/test_keyfinder.py b/test/test_keyfinder.py
-index 57e2bcd..c1ee916 100644
+index c8735e47..d7d670a4 100644
 --- a/test/test_keyfinder.py
 +++ b/test/test_keyfinder.py
 @@ -44,7 +44,7 @@ class KeyFinderTest(unittest.TestCase, TestHelper):
@@ -31,6 +21,6 @@ index 57e2bcd..c1ee916 100644
          command_output.assert_called_with(
 -            ['KeyFinder', '-f', util.syspath(item.path)])
 +            ['keyfinder-cli', util.syspath(item.path)])
- 
+
      def test_add_key_on_import(self, command_output):
-         command_output.return_value = 'dbm'
+         command_output.return_value = util.CommandOutput(b"dbm", b"")
diff --git a/nixpkgs/pkgs/tools/audio/beets/mutagen-1.43.patch b/nixpkgs/pkgs/tools/audio/beets/mutagen-1.43.patch
deleted file mode 100644
index d0d448c15e9a..000000000000
--- a/nixpkgs/pkgs/tools/audio/beets/mutagen-1.43.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-Backport
-https://github.com/beetbox/mediafile/commit/b3343c4ee08d1251ae5e2344401a2f5892b4e868
-https://github.com/beetbox/mediafile/commit/d2fc3b59f77c515b02dfe7ad936f89264375d2b4
-to Beets 1.4.9.
-
-diff --git i/setup.py w/setup.py
-index 79278f8b..b8d60687 100755
---- i/setup.py
-+++ w/setup.py
-@@ -87,7 +87,7 @@ setup(
- 
-     install_requires=[
-         'six>=1.9',
--        'mutagen>=1.33',
-+        'mutagen>=1.43',
-         'unidecode',
-         'musicbrainzngs>=0.4',
-         'pyyaml',
-diff --git i/test/test_mediafile.py w/test/test_mediafile.py
-index 36a2c53a..0ddde44e 100644
---- i/test/test_mediafile.py
-+++ w/test/test_mediafile.py
-@@ -888,7 +888,7 @@ class WavpackTest(ReadWriteTestBase, unittest.TestCase):
-         'bitrate': 109312,
-         'format': u'WavPack',
-         'samplerate': 44100,
--        'bitdepth': 0,
-+        'bitdepth': 16,
-         'channels': 1,
-     }
- 
-@@ -912,7 +912,7 @@ class AIFFTest(ReadWriteTestBase, unittest.TestCase):
-         'bitrate': 705600,
-         'format': u'AIFF',
-         'samplerate': 44100,
--        'bitdepth': 0,
-+        'bitdepth': 16,
-         'channels': 1,
-     }
- 
diff --git a/nixpkgs/pkgs/tools/audio/beets/alternatives-plugin.nix b/nixpkgs/pkgs/tools/audio/beets/plugins/alternatives.nix
index fdad7dd89844..fdad7dd89844 100644
--- a/nixpkgs/pkgs/tools/audio/beets/alternatives-plugin.nix
+++ b/nixpkgs/pkgs/tools/audio/beets/plugins/alternatives.nix
diff --git a/nixpkgs/pkgs/tools/audio/beets/beet-check-tests.patch b/nixpkgs/pkgs/tools/audio/beets/plugins/check-tests.patch
index 2de97b86c8b4..2de97b86c8b4 100644
--- a/nixpkgs/pkgs/tools/audio/beets/beet-check-tests.patch
+++ b/nixpkgs/pkgs/tools/audio/beets/plugins/check-tests.patch
diff --git a/nixpkgs/pkgs/tools/audio/beets/check-plugin.nix b/nixpkgs/pkgs/tools/audio/beets/plugins/check.nix
index 241dcdad4521..241dcdad4521 100644
--- a/nixpkgs/pkgs/tools/audio/beets/check-plugin.nix
+++ b/nixpkgs/pkgs/tools/audio/beets/plugins/check.nix
diff --git a/nixpkgs/pkgs/tools/audio/beets/copyartifacts-plugin.nix b/nixpkgs/pkgs/tools/audio/beets/plugins/copyartifacts.nix
index 9432cb9bd0b9..9432cb9bd0b9 100644
--- a/nixpkgs/pkgs/tools/audio/beets/copyartifacts-plugin.nix
+++ b/nixpkgs/pkgs/tools/audio/beets/plugins/copyartifacts.nix
diff --git a/nixpkgs/pkgs/tools/audio/beets/extrafiles-plugin.nix b/nixpkgs/pkgs/tools/audio/beets/plugins/extrafiles.nix
index 7d0e446ce605..7d0e446ce605 100644
--- a/nixpkgs/pkgs/tools/audio/beets/extrafiles-plugin.nix
+++ b/nixpkgs/pkgs/tools/audio/beets/plugins/extrafiles.nix
diff --git a/nixpkgs/pkgs/tools/audio/beets/replaygain-default-bs1770gain.patch b/nixpkgs/pkgs/tools/audio/beets/replaygain-default-bs1770gain.patch
deleted file mode 100644
index 538f9e933039..000000000000
--- a/nixpkgs/pkgs/tools/audio/beets/replaygain-default-bs1770gain.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-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'bs1770gain',
-             'targetlevel': 89,
-         })
- 
diff --git a/nixpkgs/pkgs/tools/audio/beets/replaygain-default-ffmpeg.patch b/nixpkgs/pkgs/tools/audio/beets/replaygain-default-ffmpeg.patch
new file mode 100644
index 000000000000..0ceba3c09442
--- /dev/null
+++ b/nixpkgs/pkgs/tools/audio/beets/replaygain-default-ffmpeg.patch
@@ -0,0 +1,26 @@
+diff --git i/beetsplug/replaygain.py w/beetsplug/replaygain.py
+index 9d6fa23c..c5800039 100644
+--- i/beetsplug/replaygain.py
++++ w/beetsplug/replaygain.py
+@@ -391,7 +391,7 @@ class FfmpegBackend(Backend):
+ 
+     def __init__(self, config, log):
+         super(FfmpegBackend, self).__init__(config, log)
+-        self._ffmpeg_path = "ffmpeg"
++        self._ffmpeg_path = "@ffmpeg@/bin/ffmpeg"
+ 
+         # check that ffmpeg is installed
+         try:
+@@ -1228,11 +1228,10 @@ class ReplayGainPlugin(BeetsPlugin):
+     def __init__(self):
+         super(ReplayGainPlugin, self).__init__()
+ 
+-        # default backend is 'command' for backward-compatibility.
+         self.config.add({
+             'overwrite': False,
+             'auto': True,
+-            'backend': u'command',
++            'backend': u'ffmpeg',
+             'threads': cpu_count(),
+             'parallel_on_import': False,
+             'per_disc': False,
diff --git a/nixpkgs/pkgs/tools/audio/ezstream/default.nix b/nixpkgs/pkgs/tools/audio/ezstream/default.nix
index 02a6e9d37f37..499f9842852f 100644
--- a/nixpkgs/pkgs/tools/audio/ezstream/default.nix
+++ b/nixpkgs/pkgs/tools/audio/ezstream/default.nix
@@ -25,7 +25,7 @@ stdenv.mkDerivation rec {
       from standard input without reencoding and thus requires only
       very little CPU resources.
     '';
-    homepage = "http://icecast.org/ezstream/";
+    homepage = "https://icecast.org/ezstream/";
     license = licenses.gpl2;
     maintainers = [ maintainers.barrucadu ];
     platforms = platforms.all;
diff --git a/nixpkgs/pkgs/tools/audio/kaldi/default.nix b/nixpkgs/pkgs/tools/audio/kaldi/default.nix
new file mode 100644
index 000000000000..fa291a05078e
--- /dev/null
+++ b/nixpkgs/pkgs/tools/audio/kaldi/default.nix
@@ -0,0 +1,88 @@
+{ stdenv
+, openblas
+, blas
+, lapack
+, openfst
+, icu
+, cmake
+, pkg-config
+, fetchFromGitHub
+, git
+, python3
+}:
+
+assert blas.implementation == "openblas" && lapack.implementation == "openblas";
+let
+  # rev from https://github.com/kaldi-asr/kaldi/blob/master/cmake/third_party/openfst.cmake
+  openfst = fetchFromGitHub {
+    owner = "kkm000";
+    repo = "openfst";
+    rev = "0bca6e76d24647427356dc242b0adbf3b5f1a8d9";
+    sha256 = "1802rr14a03zl1wa5a0x1fa412kcvbgprgkadfj5s6s3agnn11rx";
+  };
+in
+stdenv.mkDerivation {
+  pname = "kaldi";
+  version = "2020-12-26";
+
+  src = fetchFromGitHub {
+    owner = "kaldi-asr";
+    repo = "kaldi";
+    rev = "813b73185a18725e4f6021981d17221d6ee23a19";
+    sha256 = "sha256-lTqXTG5ZTPmhCgt+BVzOwjKEIj+bLGUa+IxJq+XtHUg=";
+  };
+
+  cmakeFlags = [
+    "-DKALDI_BUILD_TEST=off"
+    "-DBUILD_SHARED_LIBS=on"
+  ];
+
+  preConfigure = ''
+    mkdir bin
+    cat > bin/git <<'EOF'
+    #!${stdenv.shell}
+    if [[ "$1" == "--version" ]]; then
+      # cmake checks this
+      ${git}/bin/git --version
+    elif [[ "$1" == "clone" ]]; then
+      # mock this call:
+
+      # https://github.com/kaldi-asr/kaldi/blob/c9d8b9ad3fef89237ba5517617d977b7d70a7ed5/cmake/third_party/openfst.cmake#L5
+      cp -r ${openfst} ''${@: -1}
+      chmod -R +w ''${@: -1}
+    elif [[ "$1" == "rev-list" ]]; then
+      # fix up this call:
+      # https://github.com/kaldi-asr/kaldi/blob/c9d8b9ad3fef89237ba5517617d977b7d70a7ed5/cmake/VersionHelper.cmake#L8
+      echo 0
+    fi
+    true
+    EOF
+    chmod +x bin/git
+    export PATH=$(pwd)/bin:$PATH
+  '';
+
+  buildInputs = [
+    openblas
+    openfst
+    icu
+  ];
+
+  nativeBuildInputs = [
+    cmake
+    pkg-config
+    python3
+  ];
+
+  postInstall = ''
+    mkdir -p $out/share/kaldi
+    cp -r ../egs $out/share/kaldi
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Speech Recognition Toolkit";
+    homepage = "https://kaldi-asr.org";
+    license = licenses.mit;
+    maintainers = with maintainers; [ mic92 ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/tools/audio/mpd-mpris/default.nix b/nixpkgs/pkgs/tools/audio/mpd-mpris/default.nix
index 79387d9ad1f9..c66a12dadd3a 100644
--- a/nixpkgs/pkgs/tools/audio/mpd-mpris/default.nix
+++ b/nixpkgs/pkgs/tools/audio/mpd-mpris/default.nix
@@ -2,16 +2,16 @@
 
 buildGoModule rec {
   pname = "mpd-mpris";
-  version = "0.2.4";
+  version = "0.3.0";
 
   src = fetchFromGitHub {
     owner = "natsukagami";
     repo = pname;
     rev = "v${version}";
-    sha256 = "1cr5j2z2ynj1hwkjzi5amcg59vmgazsci41v6vpsj119g7psjmzm";
+    sha256 = "1kzjbv04b2garb99l64wdq8yksnm4pbhkgyzh89j5j3gb9k55zal";
   };
 
-  vendorSha256 = "108yjymp64iqx1b2wqjbkmbm2w199wq46g7hrmqhcziv6f4aqljp";
+  vendorSha256 = "1ggrqwd3h602rav1dc3amsf4wxsq8mdq4ijkdsg759sqhpzl6rqs";
 
   doCheck = false;
 
diff --git a/nixpkgs/pkgs/tools/audio/pasystray/default.nix b/nixpkgs/pkgs/tools/audio/pasystray/default.nix
index 8b0580ba98c4..d80f1af4182a 100644
--- a/nixpkgs/pkgs/tools/audio/pasystray/default.nix
+++ b/nixpkgs/pkgs/tools/audio/pasystray/default.nix
@@ -1,5 +1,5 @@
-{ stdenv, fetchFromGitHub, pkgconfig, autoreconfHook, wrapGAppsHook
-, gnome3, avahi, gtk3, libappindicator-gtk3, libnotify, libpulseaudio
+{ stdenv, fetchpatch, fetchFromGitHub, pkgconfig, autoreconfHook, wrapGAppsHook
+, gnome3, avahi, gtk3, libayatana-appindicator-gtk3, libnotify, libpulseaudio
 , xlibsWrapper, gsettings-desktop-schemas
 }:
 
@@ -17,12 +17,18 @@ stdenv.mkDerivation rec {
   patches = [
     # https://github.com/christophgysin/pasystray/issues/90#issuecomment-306190701
     ./fix-wayland.patch
+
+    # https://github.com/christophgysin/pasystray/issues/98
+    (fetchpatch {
+      url = "https://sources.debian.org/data/main/p/pasystray/0.7.1-1/debian/patches/0001-Build-against-ayatana-appindicator.patch";
+      sha256 = "0hijphrf52n2zfwdnrmxlp3a7iwznnkb79awvpzplz0ia2lqywpw";
+    })
   ];
 
   nativeBuildInputs = [ pkgconfig autoreconfHook wrapGAppsHook ];
   buildInputs = [
     gnome3.adwaita-icon-theme
-    avahi gtk3 libappindicator-gtk3 libnotify libpulseaudio xlibsWrapper
+    avahi gtk3 libayatana-appindicator-gtk3 libnotify libpulseaudio xlibsWrapper
     gsettings-desktop-schemas
   ];
 
diff --git a/nixpkgs/pkgs/tools/audio/picotts/default.nix b/nixpkgs/pkgs/tools/audio/picotts/default.nix
index 023bf4577740..5b7ab80d8602 100644
--- a/nixpkgs/pkgs/tools/audio/picotts/default.nix
+++ b/nixpkgs/pkgs/tools/audio/picotts/default.nix
@@ -13,7 +13,7 @@ stdenv.mkDerivation {
   sourceRoot = "source/pico";
   preConfigure = "./autogen.sh";
   meta = {
-    description = "Text to speech voice sinthesizer from SVox.";
+    description = "Text to speech voice sinthesizer from SVox";
     homepage = "https://github.com/naggety/picotts";
     license = stdenv.lib.licenses.asl20;
     maintainers = [ stdenv.lib.maintainers.canndrew ];
diff --git a/nixpkgs/pkgs/tools/audio/playerctl/default.nix b/nixpkgs/pkgs/tools/audio/playerctl/default.nix
index c1cddf12b650..7ef9557b42aa 100644
--- a/nixpkgs/pkgs/tools/audio/playerctl/default.nix
+++ b/nixpkgs/pkgs/tools/audio/playerctl/default.nix
@@ -2,13 +2,13 @@
 
 stdenv.mkDerivation rec {
   pname = "playerctl";
-  version = "2.2.1";
+  version = "2.3.1";
 
   src = fetchFromGitHub {
     owner = "acrisci";
     repo = "playerctl";
     rev = "v${version}";
-    sha256 = "17hi33sw3663qz5v54bqqil31sgkrlxkb2l5bgqk87pac6x2wnbz";
+    sha256 = "00z5c6amlxd3q42l7x8i0ngl627dxglgg5vikbbhjp9ms34xbxdn";
   };
 
   nativeBuildInputs = [ meson ninja pkgconfig gtk-doc docbook_xsl gobject-introspection ];
diff --git a/nixpkgs/pkgs/tools/audio/tts/default.nix b/nixpkgs/pkgs/tools/audio/tts/default.nix
new file mode 100644
index 000000000000..770e898f2eec
--- /dev/null
+++ b/nixpkgs/pkgs/tools/audio/tts/default.nix
@@ -0,0 +1,123 @@
+{ lib
+, python3Packages
+, fetchFromGitHub
+, fetchpatch
+, python3
+}:
+
+#
+# Tested in the following setup:
+#
+# TTS model:
+#   Tacotron2 DDC
+#   https://drive.google.com/drive/folders/1Y_0PcB7W6apQChXtbt6v3fAiNwVf4ER5
+# Vocoder model:
+#   Multi-Band MelGAN
+#   https://drive.google.com/drive/folders/1XeRT0q4zm5gjERJqwmX5w84pMrD00cKD
+#
+# Arrange /tmp/tts like this:
+#   scale_stats.npy
+#   tts
+#   tts/checkpoint_130000.pth.tar
+#   tts/checkpoint_130000_tf.pkl
+#   tts/checkpoint_130000_tf_2.3rc0.tflite
+#   tts/config.json
+#   tts/scale_stats.npy
+#   vocoder
+#   vocoder/checkpoint_1450000.pth.tar
+#   vocoder/checkpoint_2750000_tf.pkl
+#   vocoder/checkpoint_2750000_tf_v2.3rc.tflite
+#   vocoder/config.json
+#   vocoder/scale_stats.npy
+#
+# Start like this:
+#   cd /tmp/tts
+#   tts-server \
+#     --vocoder_config ./tts/vocoder/config.json \
+#     --vocoder_checkpoint ./tts/vocoder/checkpoint_1450000.pth.tar \
+#     --tts_config ./tts/config.json \
+#     --tts_checkpoint ./tts/checkpoint_130000.pth.tar
+#
+# For now, for deployment check the systemd unit in the pull request:
+#   https://github.com/NixOS/nixpkgs/pull/103851#issue-521121136
+#
+
+python3Packages.buildPythonApplication rec {
+  pname = "tts";
+  # until https://github.com/mozilla/TTS/issues/424 is resolved
+  # we treat released models as released versions:
+  # https://github.com/mozilla/TTS/wiki/Released-Models
+  version = "unstable-2020-06-17";
+
+  src = fetchFromGitHub {
+    owner = "mozilla";
+    repo = "TTS";
+    rev = "72a6ac54c8cfaa407fc64b660248c6a788bdd381";
+    sha256 = "1wvs264if9n5xzwi7ryxvwj1j513szp6sfj6n587xk1fphi0921f";
+  };
+
+  patches = [
+    (fetchpatch {
+      url = "https://github.com/mozilla/TTS/commit/36fee428b9f3f4ec1914b090a2ec9d785314d9aa.patch";
+      sha256 = "sha256-pP0NxiyrsvQ0A7GEleTdT87XO08o7WxPEpb6Bmj66dc=";
+    })
+  ];
+
+  preBuild = ''
+    # numba jit tries to write to its cache directory
+    export HOME=$TMPDIR
+    sed -i -e 's!tensorflow==.*!tensorflow!' requirements.txt
+    sed -i -e 's!librosa==[^"]*!librosa!' requirements.txt setup.py
+    sed -i -e 's!unidecode==[^"]*!unidecode!' requirements.txt setup.py
+    sed -i -e 's!bokeh==[^"]*!bokeh!' requirements.txt setup.py
+    sed -i -e 's!numba==[^"]*!numba!' requirements.txt setup.py
+    # Not required for building/installation but for their development/ci workflow
+    sed -i -e '/pylint/d' requirements.txt setup.py
+    sed -i -e '/cardboardlint/d' requirements.txt setup.py
+  '';
+
+
+  propagatedBuildInputs = with python3Packages; [
+    matplotlib
+    scipy
+    pytorch
+    flask
+    attrdict
+    bokeh
+    soundfile
+    tqdm
+    librosa
+    unidecode
+    phonemizer
+    tensorboardx
+    fuzzywuzzy
+    tensorflow_2
+    inflect
+    gdown
+    pysbd
+  ];
+
+  postInstall = ''
+    cp -r TTS/server/templates/ $out/${python3.sitePackages}/TTS/server
+  '';
+
+  checkInputs = with python3Packages; [ pytestCheckHook ];
+
+  disabledTests = [
+    # RuntimeError: fft: ATen not compiled with MKL support
+    "test_torch_stft"
+    "test_stft_loss"
+    "test_multiscale_stft_loss"
+    # AssertionErrors that I feel incapable of debugging
+    "test_phoneme_to_sequence"
+    "test_text2phone"
+    "test_parametrized_gan_dataset"
+  ];
+
+  meta = with lib; {
+    homepage = "https://github.com/mozilla/TTS";
+    description = "Deep learning for Text to Speech";
+    license = licenses.mpl20;
+    maintainers = with maintainers; [ hexa mic92 ];
+  };
+}
diff --git a/nixpkgs/pkgs/tools/audio/volctl/default.nix b/nixpkgs/pkgs/tools/audio/volctl/default.nix
index dd58671824db..1965fb083169 100644
--- a/nixpkgs/pkgs/tools/audio/volctl/default.nix
+++ b/nixpkgs/pkgs/tools/audio/volctl/default.nix
@@ -1,43 +1,49 @@
-{ stdenv, fetchFromGitHub, pythonPackages, libpulseaudio, glib, gtk3, gobject-introspection, wrapGAppsHook }:
+{ stdenv, python3Packages, fetchFromGitHub, wrapGAppsHook, gobject-introspection, libpulseaudio, glib, gtk3, pango, xorg }:
 
-pythonPackages.buildPythonApplication rec {
+python3Packages.buildPythonApplication rec {
   pname = "volctl";
-  version = "0.6.3";
+  version = "0.8.0";
 
   src = fetchFromGitHub {
     owner = "buzz";
     repo = pname;
-    rev = version;
-    sha256 = "0rppqc5wiqxd83z2mgvhi6gdx7yhy9wnav1dbbi1wvm7lzw6fnil";
+    rev = "v${version}";
+    sha256 = "02scfscf4mdrphzrd7cbwbhpig9bhvaws8qk4zc81z8vvf3mcfv2";
   };
 
+  postPatch = ''
+    substituteInPlace volctl/lib/xwrappers.py \
+      --replace 'libXfixes.so' "${xorg.libXfixes}/lib/libXfixes.so" \
+      --replace 'libXfixes.so.3' "${xorg.libXfixes}/lib/libXfixes.so.3"
+  '';
+
+  preBuild = ''
+    export LD_LIBRARY_PATH=${libpulseaudio}/lib
+  '';
+
   nativeBuildInputs = [
     gobject-introspection
     wrapGAppsHook
   ];
 
-  buildInputs = [
-    glib
-    gtk3
-    libpulseaudio
-  ];
-
-  pythonPath = with pythonPackages; [
+  propagatedBuildInputs = [ pango gtk3 ] ++ (with python3Packages; [
+    click
+    pycairo
     pygobject3
-  ];
+    pyyaml
+  ]);
 
+  # with strictDeps importing "gi.repository.Gtk" fails with "gi.RepositoryError: Typelib file for namespace 'Pango', version '1.0' not found"
   strictDeps = false;
 
-  preBuild = ''
-    export LD_LIBRARY_PATH=${libpulseaudio}/lib
-  '';
+  # no tests included
+  doCheck = false;
+
+  pythonImportsCheck = [ "volctl" ];
 
   preFixup = ''
     glib-compile-schemas ${glib.makeSchemaPath "$out" "${pname}-${version}"}
-
-    gappsWrapperArgs+=(
-      --prefix LD_LIBRARY_PATH : "${libpulseaudio}/lib"
-    )
+    gappsWrapperArgs+=(--prefix LD_LIBRARY_PATH : "${libpulseaudio}/lib")
   '';
 
   meta = with stdenv.lib; {