about summary refs log tree commit diff
path: root/nixpkgs/pkgs/tools/audio
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/tools/audio')
-rw-r--r--nixpkgs/pkgs/tools/audio/abcm2ps/default.nix33
-rw-r--r--nixpkgs/pkgs/tools/audio/abcmidi/default.nix23
-rw-r--r--nixpkgs/pkgs/tools/audio/accuraterip-checksum/default.nix31
-rw-r--r--nixpkgs/pkgs/tools/audio/acoustid-fingerprinter/default.nix33
-rw-r--r--nixpkgs/pkgs/tools/audio/acoustid-fingerprinter/ffmpeg.patch26
-rw-r--r--nixpkgs/pkgs/tools/audio/alsaequal/caps_9.x.patch21
-rw-r--r--nixpkgs/pkgs/tools/audio/alsaequal/default.nix43
-rw-r--r--nixpkgs/pkgs/tools/audio/alsaequal/false_error.patch13
-rw-r--r--nixpkgs/pkgs/tools/audio/alsaequal/makefile.patch13
-rw-r--r--nixpkgs/pkgs/tools/audio/aucdtect/default.nix33
-rw-r--r--nixpkgs/pkgs/tools/audio/beets/alternatives-plugin.nix25
-rw-r--r--nixpkgs/pkgs/tools/audio/beets/beet-check-tests.patch17
-rw-r--r--nixpkgs/pkgs/tools/audio/beets/check-plugin.nix35
-rw-r--r--nixpkgs/pkgs/tools/audio/beets/copyartifacts-plugin.nix33
-rw-r--r--nixpkgs/pkgs/tools/audio/beets/default.nix272
-rw-r--r--nixpkgs/pkgs/tools/audio/beets/keyfinder-default-bin.patch36
-rw-r--r--nixpkgs/pkgs/tools/audio/beets/mutagen-1.43.patch29
-rw-r--r--nixpkgs/pkgs/tools/audio/beets/replaygain-default-bs1770gain.patch17
-rw-r--r--nixpkgs/pkgs/tools/audio/bpm-tools/default.nix32
-rw-r--r--nixpkgs/pkgs/tools/audio/darkice/default.nix37
-rw-r--r--nixpkgs/pkgs/tools/audio/darkice/fix-undeclared-memmove.patch13
-rw-r--r--nixpkgs/pkgs/tools/audio/dir2opus/default.nix35
-rw-r--r--nixpkgs/pkgs/tools/audio/essentia-extractor/default.nix41
-rw-r--r--nixpkgs/pkgs/tools/audio/ezstream/default.nix33
-rw-r--r--nixpkgs/pkgs/tools/audio/glyr/default.nix27
-rw-r--r--nixpkgs/pkgs/tools/audio/google-music-scripts/default.nix42
-rw-r--r--nixpkgs/pkgs/tools/audio/gvolicon/default.nix28
-rw-r--r--nixpkgs/pkgs/tools/audio/liquidsoap/full.nix60
-rw-r--r--nixpkgs/pkgs/tools/audio/midicsv/default.nix22
-rw-r--r--nixpkgs/pkgs/tools/audio/mididings/default.nix38
-rw-r--r--nixpkgs/pkgs/tools/audio/mp3cat/default.nix34
-rw-r--r--nixpkgs/pkgs/tools/audio/mpd-mpris/default.nix33
-rw-r--r--nixpkgs/pkgs/tools/audio/mpdas/default.nix27
-rw-r--r--nixpkgs/pkgs/tools/audio/mpdcron/Gemfile2
-rw-r--r--nixpkgs/pkgs/tools/audio/mpdcron/Gemfile.lock15
-rw-r--r--nixpkgs/pkgs/tools/audio/mpdcron/default.nix37
-rw-r--r--nixpkgs/pkgs/tools/audio/mpdcron/gemset.nix23
-rw-r--r--nixpkgs/pkgs/tools/audio/mpdris2/default.nix55
-rw-r--r--nixpkgs/pkgs/tools/audio/mpdsync/default.nix24
-rw-r--r--nixpkgs/pkgs/tools/audio/opl3bankeditor/default.nix27
-rw-r--r--nixpkgs/pkgs/tools/audio/opl3bankeditor/opn2bankeditor.nix19
-rw-r--r--nixpkgs/pkgs/tools/audio/pa-applet/default.nix33
-rw-r--r--nixpkgs/pkgs/tools/audio/pasystray/default.nix31
-rw-r--r--nixpkgs/pkgs/tools/audio/picotts/default.nix24
-rw-r--r--nixpkgs/pkgs/tools/audio/playerctl/default.nix25
-rw-r--r--nixpkgs/pkgs/tools/audio/pnmixer/default.nix25
-rw-r--r--nixpkgs/pkgs/tools/audio/pulsemixer/default.nix35
-rw-r--r--nixpkgs/pkgs/tools/audio/qastools/default.nix24
-rw-r--r--nixpkgs/pkgs/tools/audio/trx/add_bctoolbox_ldlib.patch15
-rw-r--r--nixpkgs/pkgs/tools/audio/trx/default.nix28
-rw-r--r--nixpkgs/pkgs/tools/audio/video2midi/default.nix35
-rw-r--r--nixpkgs/pkgs/tools/audio/volctl/default.nix50
-rw-r--r--nixpkgs/pkgs/tools/audio/volumeicon/default.nix24
53 files changed, 1786 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/tools/audio/abcm2ps/default.nix b/nixpkgs/pkgs/tools/audio/abcm2ps/default.nix
new file mode 100644
index 000000000000..302654f77154
--- /dev/null
+++ b/nixpkgs/pkgs/tools/audio/abcm2ps/default.nix
@@ -0,0 +1,33 @@
+{ stdenv, fetchFromGitHub, pkgconfig, which, docutils, freetype, pango }:
+
+stdenv.mkDerivation rec {
+  pname = "abcm2ps";
+  version = "8.14.7";
+
+  src = fetchFromGitHub {
+    owner = "leesavide";
+    repo = "abcm2ps";
+    rev = "v${version}";
+    sha256 = "0k12wf37vl31w2qpj3dsmv8c4ifrsg3qa30gqsx553jw7n0f3ma2";
+  };
+
+  configureFlags = [
+    "--INSTALL=install"
+  ];
+
+  buildFlags = [
+    "CC=${stdenv.cc}/bin/cc"
+  ];
+
+  nativeBuildInputs = [ which pkgconfig docutils ];
+
+  buildInputs = [ freetype pango ];
+
+  meta = with stdenv.lib; {
+    homepage = "http://moinejf.free.fr/";
+    license = licenses.gpl3;
+    description = "A command line program which converts ABC to music sheet in PostScript or SVG format";
+    platforms = platforms.unix;
+    maintainers = [ maintainers.dotlambda ];
+  };
+}
diff --git a/nixpkgs/pkgs/tools/audio/abcmidi/default.nix b/nixpkgs/pkgs/tools/audio/abcmidi/default.nix
new file mode 100644
index 000000000000..0ccfaa081c9a
--- /dev/null
+++ b/nixpkgs/pkgs/tools/audio/abcmidi/default.nix
@@ -0,0 +1,23 @@
+{ stdenv, fetchzip }:
+
+stdenv.mkDerivation rec {
+  pname = "abcMIDI";
+  version = "2020.03.25";
+
+  src = fetchzip {
+    url = "https://ifdo.ca/~seymour/runabc/${pname}-${version}.zip";
+    sha256 = "0rzif8idsja8ryhx0y4zdk8lhn36h10ahfjqa8bmif0rdbyab0kv";
+  };
+
+  # There is also a file called "makefile" which seems to be preferred by the standard build phase
+  makefile = "Makefile";
+
+  meta = with stdenv.lib; {
+    homepage = "http://abc.sourceforge.net/abcMIDI/";
+    downloadPage = "https://ifdo.ca/~seymour/runabc/top.html";
+    license = licenses.gpl2Plus;
+    description = "Utilities for converting between abc and MIDI";
+    platforms = platforms.unix;
+    maintainers = [ maintainers.dotlambda ];
+  };
+}
diff --git a/nixpkgs/pkgs/tools/audio/accuraterip-checksum/default.nix b/nixpkgs/pkgs/tools/audio/accuraterip-checksum/default.nix
new file mode 100644
index 000000000000..efd440256470
--- /dev/null
+++ b/nixpkgs/pkgs/tools/audio/accuraterip-checksum/default.nix
@@ -0,0 +1,31 @@
+{ stdenv, fetchFromGitHub, libsndfile }:
+
+stdenv.mkDerivation rec {
+  pname = "accuraterip-checksum";
+  version = "1.5";
+
+  src = fetchFromGitHub {
+    owner = "leo-bogert";
+    repo = "accuraterip-checksum";
+    rev = "version${version}";
+    sha256 = "1a6biy78jb094rifazn4a2g1dlhryg5q8p8gwj0a60ipl0vfb9bj";
+  };
+
+  buildInputs = [ libsndfile ];
+
+  installPhase = ''
+    runHook preInstall
+
+    install -D -m755 accuraterip-checksum "$out/bin/accuraterip-checksum"
+
+    runHook postInstall
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Program for computing the AccurateRip checksum of singletrack WAV files";
+    homepage = "https://github.com/leo-bogert/accuraterip-checksum";
+    license = licenses.gpl3;
+    maintainers = with maintainers; [ ];
+    platforms = with platforms; linux;
+  };
+}
diff --git a/nixpkgs/pkgs/tools/audio/acoustid-fingerprinter/default.nix b/nixpkgs/pkgs/tools/audio/acoustid-fingerprinter/default.nix
new file mode 100644
index 000000000000..e2824bc07b66
--- /dev/null
+++ b/nixpkgs/pkgs/tools/audio/acoustid-fingerprinter/default.nix
@@ -0,0 +1,33 @@
+{ stdenv, fetchurl, fetchpatch, cmake, pkgconfig, qt4, taglib, chromaprint, ffmpeg }:
+
+stdenv.mkDerivation rec {
+  pname = "acoustid-fingerprinter";
+  version = "0.6";
+
+  src = fetchurl {
+    url = "https://bitbucket.org/acoustid/acoustid-fingerprinter/downloads/"
+        + "${pname}-${version}.tar.gz";
+    sha256 = "0ckglwy95qgqvl2l6yd8ilwpd6qs7yzmj8g7lnxb50d12115s5n0";
+  };
+
+  nativeBuildInputs = [ pkgconfig ];
+  buildInputs = [ cmake qt4 taglib chromaprint ffmpeg ];
+
+  cmakeFlags = [ "-DTAGLIB_MIN_VERSION=${stdenv.lib.getVersion taglib}" ];
+
+  patches = [
+    (fetchpatch {
+      url = "https://bitbucket.org/acoustid/acoustid-fingerprinter/commits/632e87969c3a5562a5d4842b03613267ba6236b2/raw";
+      sha256 = "15hm9knrpqn3yqrwyjz4zh2aypwbcycd0c5svrsy1fb2h2rh05jk";
+    })
+    ./ffmpeg.patch
+  ];
+
+  meta = with stdenv.lib; {
+    homepage = "https://acoustid.org/fingerprinter";
+    description = "Audio fingerprinting tool using chromaprint";
+    license = stdenv.lib.licenses.gpl2Plus;
+    maintainers = with maintainers; [ ehmry ];
+    platforms = with platforms; linux;
+  };
+}
diff --git a/nixpkgs/pkgs/tools/audio/acoustid-fingerprinter/ffmpeg.patch b/nixpkgs/pkgs/tools/audio/acoustid-fingerprinter/ffmpeg.patch
new file mode 100644
index 000000000000..f3eacae26f77
--- /dev/null
+++ b/nixpkgs/pkgs/tools/audio/acoustid-fingerprinter/ffmpeg.patch
@@ -0,0 +1,26 @@
+diff --git a/decoder.h b/decoder.h
+index 028f58f..4428ac1 100644
+--- a/decoder.h
++++ b/decoder.h
+@@ -39,6 +39,8 @@ extern "C" {
+ #define AV_SAMPLE_FMT_S16 SAMPLE_FMT_S16
+ #endif
+ 
++#define AVCODEC_MAX_AUDIO_FRAME_SIZE 192000
++
+ class Decoder
+ {
+ public:
+diff --git a/ffmpeg/audioconvert.h b/ffmpeg/audioconvert.h
+index 2b28e2e..a699986 100644
+--- a/ffmpeg/audioconvert.h
++++ b/ffmpeg/audioconvert.h
+@@ -79,7 +79,7 @@ int avcodec_channel_layout_num_channels(int64_t channel_layout);
+  * @param fmt_name Format name, or NULL if unknown
+  * @return Channel layout mask
+  */
+-uint64_t avcodec_guess_channel_layout(int nb_channels, enum CodecID codec_id, const char *fmt_name);
++uint64_t avcodec_guess_channel_layout(int nb_channels, enum AVCodecID codec_id, const char *fmt_name);
+ 
+ struct AVAudioConvert;
+ typedef struct AVAudioConvert AVAudioConvert;
diff --git a/nixpkgs/pkgs/tools/audio/alsaequal/caps_9.x.patch b/nixpkgs/pkgs/tools/audio/alsaequal/caps_9.x.patch
new file mode 100644
index 000000000000..282e04049747
--- /dev/null
+++ b/nixpkgs/pkgs/tools/audio/alsaequal/caps_9.x.patch
@@ -0,0 +1,21 @@
+--- ./ctl_equal.c
++++ ./ctl_equal.c
+@@ -167,7 +167,7 @@
+ 	snd_ctl_equal_t *equal;
+ 	const char *controls = ".alsaequal.bin";
+ 	const char *library = "/usr/lib/ladspa/caps.so";
+-	const char *module = "Eq";
++	const char *module = "Eq10";
+ 	long channels = 2;
+ 	const char *sufix = " Playback Volume";
+ 	int err, i, index;
+--- ./pcm_equal.c
++++ ./pcm_equal.c
+@@ -151,7 +151,7 @@
+ 	snd_config_t *sconf = NULL;
+ 	const char *controls = ".alsaequal.bin";
+ 	const char *library = "/usr/lib/ladspa/caps.so";
+-	const char *module = "Eq";
++	const char *module = "Eq10";
+ 	long channels = 2;
+ 	int err;
diff --git a/nixpkgs/pkgs/tools/audio/alsaequal/default.nix b/nixpkgs/pkgs/tools/audio/alsaequal/default.nix
new file mode 100644
index 000000000000..9498baca991b
--- /dev/null
+++ b/nixpkgs/pkgs/tools/audio/alsaequal/default.nix
@@ -0,0 +1,43 @@
+{ stdenv, fetchurl
+, alsaLib, caps
+}:
+
+stdenv.mkDerivation rec {
+  name = "alsaequal";
+  version = "0.6";
+
+  src = fetchurl {
+    url = "https://thedigitalmachine.net/tools/alsaequal-${version}.tar.bz2";
+    sha256 = "1w3g9q5z3nrn3mwdhaq6zsg0jila8d102dgwgrhj9vfx58apsvli";
+  };
+
+  buildInputs = [ alsaLib ];
+
+  makeFlags = [ "DESTDIR=$(out)" ];
+
+  # Borrowed from Arch Linux's AUR
+  patches = [
+    # Adds executable permissions to resulting libraries
+    # and changes their destination directory from "usr/lib/alsa-lib" to "lib/alsa-lib" to better align with nixpkgs filesystem hierarchy.
+    ./makefile.patch
+    # Fixes control port check, which resulted in false error.
+    ./false_error.patch
+    # Fixes name change of an "Eq" to "Eq10" method in version 9 of caps library.
+    ./caps_9.x.patch
+  ];
+
+  postPatch = ''
+    sed -i 's#/usr/lib/ladspa/caps\.so#${caps}/lib/ladspa/caps\.so#g' ctl_equal.c pcm_equal.c
+  '';
+
+  preInstall = ''
+    mkdir -p "$out/lib/alsa-lib"
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Real-time adjustable equalizer plugin for ALSA";
+    homepage = "https://thedigitalmachine.net/alsaequal.html";
+    license = licenses.gpl2;
+    maintainers = with maintainers; [ ymeister ];
+  };
+}
diff --git a/nixpkgs/pkgs/tools/audio/alsaequal/false_error.patch b/nixpkgs/pkgs/tools/audio/alsaequal/false_error.patch
new file mode 100644
index 000000000000..1a8413da2741
--- /dev/null
+++ b/nixpkgs/pkgs/tools/audio/alsaequal/false_error.patch
@@ -0,0 +1,13 @@
+--- ./ctl_equal.c
++++ ./ctl_equal.c
+@@ -263,8 +263,8 @@
+ 	for(i = 0; i < equal->num_input_controls; i++) {
+ 		if(equal->control_data->control[i].type == LADSPA_CNTRL_INPUT) {
+ 			index = equal->control_data->control[i].index;
+-			if(equal->klass->PortDescriptors[index] !=
+-					(LADSPA_PORT_INPUT | LADSPA_PORT_CONTROL)) {
++			if(equal->klass->PortDescriptors[index] &
++					(LADSPA_PORT_INPUT | LADSPA_PORT_CONTROL) == 0) {
+ 				SNDERR("Problem with control file %s, %d.", controls, index);
+ 				return -1;
+ 			}
diff --git a/nixpkgs/pkgs/tools/audio/alsaequal/makefile.patch b/nixpkgs/pkgs/tools/audio/alsaequal/makefile.patch
new file mode 100644
index 000000000000..ee8aa170d60b
--- /dev/null
+++ b/nixpkgs/pkgs/tools/audio/alsaequal/makefile.patch
@@ -0,0 +1,13 @@
+--- ./Makefile
++++ ./Makefile
+@@ -45,8 +45,8 @@
+
+ install: all
+ 	@echo Installing...
+-	$(Q)install -m 644 $(SND_PCM_BIN) ${DESTDIR}/usr/lib/alsa-lib/
+-	$(Q)install -m 644 $(SND_CTL_BIN) ${DESTDIR}/usr/lib/alsa-lib/
++	$(Q)install -m 755 $(SND_PCM_BIN) ${DESTDIR}/lib/alsa-lib/
++	$(Q)install -m 755 $(SND_CTL_BIN) ${DESTDIR}/lib/alsa-lib/
+
+ uninstall:
+ 	@echo Un-installing...
diff --git a/nixpkgs/pkgs/tools/audio/aucdtect/default.nix b/nixpkgs/pkgs/tools/audio/aucdtect/default.nix
new file mode 100644
index 000000000000..ad9d5fb86905
--- /dev/null
+++ b/nixpkgs/pkgs/tools/audio/aucdtect/default.nix
@@ -0,0 +1,33 @@
+{ 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/beets/alternatives-plugin.nix b/nixpkgs/pkgs/tools/audio/beets/alternatives-plugin.nix
new file mode 100644
index 000000000000..fdad7dd89844
--- /dev/null
+++ b/nixpkgs/pkgs/tools/audio/beets/alternatives-plugin.nix
@@ -0,0 +1,25 @@
+{ stdenv, fetchFromGitHub, beets, pythonPackages }:
+
+pythonPackages.buildPythonApplication rec {
+  pname = "beets-alternatives";
+  version = "0.9.0";
+
+  src = fetchFromGitHub {
+    repo = "beets-alternatives";
+    owner = "geigerzaehler";
+    # This is 0.8.2 with fixes against Beets 1.4.6 and Python 3 compatibility.
+    rev = "v${version}";
+    sha256 = "19160gwg5j6asy8mc21g2kf87mx4zs9x2gbk8q4r6330z4kpl5pm";
+  };
+
+  nativeBuildInputs = [ beets pythonPackages.nose ];
+
+  checkPhase = "nosetests";
+
+  meta = {
+    description = "Beets plugin to manage external files";
+    homepage = "https://github.com/geigerzaehler/beets-alternatives";
+    maintainers = [ stdenv.lib.maintainers.aszlig ];
+    license = stdenv.lib.licenses.mit;
+  };
+}
diff --git a/nixpkgs/pkgs/tools/audio/beets/beet-check-tests.patch b/nixpkgs/pkgs/tools/audio/beets/beet-check-tests.patch
new file mode 100644
index 000000000000..2de97b86c8b4
--- /dev/null
+++ b/nixpkgs/pkgs/tools/audio/beets/beet-check-tests.patch
@@ -0,0 +1,17 @@
+diff --git a/test/cli_test.py b/test/cli_test.py
+index 26df140..2eb913c 100644
+--- a/test/cli_test.py
++++ b/test/cli_test.py
+@@ -372,12 +372,6 @@ class ToolListTest(TestHelper, TestCase):
+         self.assertIn('flac', stdout.getvalue())
+         self.assertIn('oggz-validate', stdout.getvalue())
+ 
+-    def test_found_mp3val(self):
+-        shutil.copy('/bin/echo', os.path.join(self.temp_dir, 'mp3val'))
+-        with captureStdout() as stdout:
+-            beets.ui._raw_main(['check', '--list-tools'])
+-        self.assertRegexpMatches(stdout.getvalue(), r'mp3val *found')
+-
+     def test_oggz_validate_not_found(self):
+         with captureStdout() as stdout:
+             beets.ui._raw_main(['check', '--list-tools'])
diff --git a/nixpkgs/pkgs/tools/audio/beets/check-plugin.nix b/nixpkgs/pkgs/tools/audio/beets/check-plugin.nix
new file mode 100644
index 000000000000..241dcdad4521
--- /dev/null
+++ b/nixpkgs/pkgs/tools/audio/beets/check-plugin.nix
@@ -0,0 +1,35 @@
+{ stdenv, fetchFromGitHub, beets, pythonPackages, flac, liboggz, mp3val }:
+
+pythonPackages.buildPythonApplication rec {
+  name = "beets-check";
+  version = "0.12.0";
+
+  src = fetchFromGitHub {
+    repo = "beets-check";
+    owner = "geigerzaehler";
+    rev = "v${version}";
+    sha256 = "0b2ijjf0gycs6b40sm33ida3sjygjiv4spb5mba52vysc7iwmnjn";
+  };
+
+  nativeBuildInputs = [ beets ];
+  checkInputs = [ pythonPackages.nose flac liboggz mp3val ];
+  propagatedBuildInputs = [ flac liboggz mp3val ];
+
+  # patch out broken tests
+  patches = [ ./beet-check-tests.patch ];
+
+  # patch out futures dependency, it is only needed for Python2 which we don't
+  # support.
+  prePatch = ''
+    sed -i "/futures/d" setup.py
+  '';
+
+  checkPhase = "nosetests";
+
+  meta = with stdenv.lib; {
+    description = "Beets plugin to Verify and store checksums in your library";
+    homepage = "https://github.com/geigerzaehler/beets-check";
+    license = licenses.mit;
+    maintainers = with maintainers; [ lovesegfault ];
+  };
+}
diff --git a/nixpkgs/pkgs/tools/audio/beets/copyartifacts-plugin.nix b/nixpkgs/pkgs/tools/audio/beets/copyartifacts-plugin.nix
new file mode 100644
index 000000000000..9432cb9bd0b9
--- /dev/null
+++ b/nixpkgs/pkgs/tools/audio/beets/copyartifacts-plugin.nix
@@ -0,0 +1,33 @@
+{ stdenv, fetchFromGitHub, beets, pythonPackages, glibcLocales }:
+
+pythonPackages.buildPythonApplication {
+  name = "beets-copyartifacts";
+
+  src = fetchFromGitHub {
+    repo = "beets-copyartifacts";
+    owner = "sbarakat";
+    rev = "d0bb75c8fc8fe125e8191d73de7ade6212aec0fd";
+    sha256 = "19b4lqq1p45n348ssmql60jylw2fw7vfj9j22nly5qj5qx51j3g5";
+  };
+
+  postPatch = ''
+    sed -i -e '/install_requires/,/\]/{/beets/d}' setup.py
+    sed -i -e '/namespace_packages/d' setup.py
+    printf 'from pkgutil import extend_path\n__path__ = extend_path(__path__, __name__)\n' >beetsplug/__init__.py
+
+    # Skip test which is already failing upstream.
+    sed -i -e '1i import unittest' \
+           -e 's/\(^ *\)# failing/\1@unittest.skip/' \
+           tests/test_reimport.py
+  '';
+
+  nativeBuildInputs = [ beets pythonPackages.nose glibcLocales ];
+
+  checkPhase = "LANG=en_US.UTF-8 nosetests";
+
+  meta = {
+    description = "Beets plugin to move non-music files during the import process";
+    homepage = "https://github.com/sbarakat/beets-copyartifacts";
+    license = stdenv.lib.licenses.mit;
+  };
+}
diff --git a/nixpkgs/pkgs/tools/audio/beets/default.nix b/nixpkgs/pkgs/tools/audio/beets/default.nix
new file mode 100644
index 000000000000..71ebe7ceb81d
--- /dev/null
+++ b/nixpkgs/pkgs/tools/audio/beets/default.nix
@@ -0,0 +1,272 @@
+{ stdenv, fetchFromGitHub, writeScript, glibcLocales, diffPlugins
+, pythonPackages, imagemagick, gobject-introspection, gst_all_1
+, runtimeShell
+, fetchpatch
+
+# 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 ? 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
+
+# External plugins
+, enableAlternatives   ? false
+, enableCheck          ? false, liboggz ? null
+, enableCopyArtifacts  ? false
+
+, bashInteractive, bash-completion
+}:
+
+assert enableAbsubmit    -> essentia-extractor            != null;
+assert enableAcoustid    -> pythonPackages.pyacoustid     != null;
+assert enableBadfiles    -> flac != null && mp3val != null;
+assert enableCheck       -> flac != null && mp3val != null && liboggz != null;
+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  -> bs1770gain                    != null;
+assert enableSonosUpdate -> pythonPackages.soco           != null;
+assert enableThumbnails  -> pythonPackages.pyxdg          != null;
+assert enableWeb         -> pythonPackages.flask          != null;
+
+with stdenv.lib;
+
+let
+  optionalPlugins = {
+    absubmit = enableAbsubmit;
+    acousticbrainz = enableAcousticbrainz;
+    badfiles = enableBadfiles;
+    chroma = enableAcoustid;
+    convert = enableConvert;
+    discogs = enableDiscogs;
+    embyupdate = enableEmbyupdate;
+    fetchart = enableFetchart;
+    gmusic = enableGmusic;
+    keyfinder = enableKeyfinder;
+    kodiupdate = enableKodiupdate;
+    lastgenre = enableLastfm;
+    lastimport = enableLastfm;
+    loadext = enableLoadext;
+    mpdstats = enableMpd;
+    mpdupdate = enableMpd;
+    playlist = enablePlaylist;
+    replaygain = enableReplaygain;
+    sonosupdate = enableSonosUpdate;
+    subsonicupdate = enableSubsonicupdate;
+    thumbnails = enableThumbnails;
+    web = enableWeb;
+  };
+
+  pluginsWithoutDeps = [
+    "beatport" "bench" "bpd" "bpm" "bucket" "cue" "duplicates" "edit" "embedart"
+    "export" "filefilter" "freedesktop" "fromfilename" "ftintitle" "fuzzy"
+    "hook" "ihate" "importadded" "importfeeds" "info" "inline" "ipfs" "lyrics"
+    "mbcollection" "mbsubmit" "mbsync" "metasync" "missing" "permissions" "play"
+    "plexupdate" "random" "rewrite" "scrub" "smartplaylist" "spotify" "the"
+    "types" "zero"
+  ];
+
+  enabledOptionalPlugins = attrNames (filterAttrs (_: id) optionalPlugins);
+
+  allPlugins = pluginsWithoutDeps ++ attrNames optionalPlugins;
+  allEnabledPlugins = pluginsWithoutDeps ++ enabledOptionalPlugins;
+
+  testShell = "${bashInteractive}/bin/bash --norc";
+  completion = "${bash-completion}/share/bash-completion/bash_completion";
+
+  # This is a stripped down beets for testing of the external plugins.
+  externalTestArgs.beets = (beets.override {
+    enableAlternatives = false;
+    enableCopyArtifacts = false;
+  }).overrideAttrs (stdenv.lib.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;
+  };
+
+in pythonPackages.buildPythonApplication rec {
+  pname = "beets";
+  version = "1.4.9";
+
+  src = fetchFromGitHub {
+    owner = "beetbox";
+    repo = "beets";
+    rev = "v${version}";
+    sha256 = "1qxdqbzvz97zgykzdwn78g2xyxmg0q2jdb12dnjnrwvhmjv67vi8";
+  };
+
+  propagatedBuildInputs = [
+    pythonPackages.six
+    pythonPackages.enum34
+    pythonPackages.jellyfish
+    pythonPackages.munkres
+    pythonPackages.musicbrainzngs
+    pythonPackages.mutagen
+    pythonPackages.pyyaml
+    pythonPackages.unidecode
+    pythonPackages.gst-python
+    pythonPackages.pygobject3
+    gobject-introspection
+  ] ++ optional enableAbsubmit      essentia-extractor
+    ++ optional enableAcoustid      pythonPackages.pyacoustid
+    ++ optional (enableFetchart
+              || enableEmbyupdate
+              || enableKodiupdate
+              || enableLoadext
+              || enablePlaylist
+              || enableSubsonicupdate
+              || enableAcousticbrainz)
+                                    pythonPackages.requests
+    ++ optional enableCheck         plugins.check
+    ++ optional enableConvert       ffmpeg
+    ++ optional enableDiscogs       pythonPackages.discogs_client
+    ++ optional enableGmusic        pythonPackages.gmusicapi
+    ++ optional enableKeyfinder     keyfinder-cli
+    ++ optional enableLastfm        pythonPackages.pylast
+    ++ optional enableMpd           pythonPackages.mpd2
+    ++ optional enableSonosUpdate   pythonPackages.soco
+    ++ optional enableThumbnails    pythonPackages.pyxdg
+    ++ optional enableWeb           pythonPackages.flask
+    ++ optional enableAlternatives  plugins.alternatives
+    ++ optional enableCopyArtifacts plugins.copyartifacts;
+
+  buildInputs = [
+    imagemagick
+  ] ++ (with gst_all_1; [
+    gst-plugins-base
+    gst-plugins-good
+    gst-plugins-ugly
+  ]);
+
+  checkInputs = with pythonPackages; [
+    beautifulsoup4
+    mock
+    nose
+    rarfile
+    responses
+    # Although considered as plugin dependencies, they are needed for the
+    # tests, for disabling them via an override makes the build fail. see:
+    # https://github.com/beetbox/beets/blob/v1.4.9/setup.py
+    pylast
+    mpd2
+    discogs_client
+    pyxdg
+  ];
+
+  patches = [
+    ./replaygain-default-bs1770gain.patch
+    ./keyfinder-default-bin.patch
+    ./mutagen-1.43.patch
+  ];
+
+  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.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
+  '';
+
+  postInstall = ''
+    mkdir -p $out/share/zsh/site-functions
+    cp extra/_beet $out/share/zsh/site-functions/
+  '';
+
+  doCheck = true;
+
+  preCheck = ''
+    find beetsplug -mindepth 1 \
+      \! -path 'beetsplug/__init__.py' -a \
+      \( -name '*.py' -o -path 'beetsplug/*/__init__.py' \) -print \
+      | sed -n -re 's|^beetsplug/([^/.]+).*|\1|p' \
+      | sort -u > plugins_available
+
+     ${diffPlugins allPlugins "plugins_available"}
+  '';
+
+  checkPhase = ''
+    runHook preCheck
+
+    LANG=en_US.UTF-8 \
+    LOCALE_ARCHIVE=${assert stdenv.isLinux; glibcLocales}/lib/locale/locale-archive \
+    BEETS_TEST_SHELL="${testShell}" \
+    BASH_COMPLETION_SCRIPT="${completion}" \
+    HOME="$(mktemp -d)" nosetests -v
+
+    runHook postCheck
+  '';
+
+  doInstallCheck = true;
+
+  installCheckPhase = ''
+    runHook preInstallCheck
+
+    tmphome="$(mktemp -d)"
+
+    EDITOR="${writeScript "beetconfig.sh" ''
+      #!${runtimeShell}
+      cat > "$1" <<CFG
+      plugins: ${concatStringsSep " " allEnabledPlugins}
+      CFG
+    ''}" HOME="$tmphome" "$out/bin/beet" config -e
+    EDITOR=true HOME="$tmphome" "$out/bin/beet" config -e
+
+    runHook postInstallCheck
+  '';
+
+  makeWrapperArgs = [ "--set GI_TYPELIB_PATH \"$GI_TYPELIB_PATH\"" "--set GST_PLUGIN_SYSTEM_PATH_1_0 \"$GST_PLUGIN_SYSTEM_PATH_1_0\"" ];
+
+  passthru = {
+    externalPlugins = plugins;
+  };
+
+  meta = {
+    description = "Music tagger and library organizer";
+    homepage = "http://beets.io";
+    license = licenses.mit;
+    maintainers = with maintainers; [ aszlig domenkozar 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
new file mode 100644
index 000000000000..1ea195a678e8
--- /dev/null
+++ b/nixpkgs/pkgs/tools/audio/beets/keyfinder-default-bin.patch
@@ -0,0 +1,36 @@
+diff --git a/beetsplug/keyfinder.py b/beetsplug/keyfinder.py
+index 34a4abc..59e8539 100644
+--- a/beetsplug/keyfinder.py
++++ b/beetsplug/keyfinder.py
+@@ -30,7 +30,7 @@ class KeyFinderPlugin(BeetsPlugin):
+     def __init__(self):
+         super(KeyFinderPlugin, self).__init__()
+         self.config.add({
+-            u'bin': u'KeyFinder',
++            u'bin': u'keyfinder-cli',
+             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
+--- a/test/test_keyfinder.py
++++ b/test/test_keyfinder.py
+@@ -44,7 +44,7 @@ class KeyFinderTest(unittest.TestCase, TestHelper):
+         item.load()
+         self.assertEqual(item['initial_key'], 'C#m')
+         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'
diff --git a/nixpkgs/pkgs/tools/audio/beets/mutagen-1.43.patch b/nixpkgs/pkgs/tools/audio/beets/mutagen-1.43.patch
new file mode 100644
index 000000000000..84cf1bab03ec
--- /dev/null
+++ b/nixpkgs/pkgs/tools/audio/beets/mutagen-1.43.patch
@@ -0,0 +1,29 @@
+Backport https://github.com/beetbox/mediafile/commit/b3343c4ee08d1251ae5e2344401a2f5892b4e868
+to Beets 1.4.9.
+
+diff --git i/setup.py w/setup.py
+index 79278f8..b8d6068 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 36a2c53..54ef9dd 100644
+--- i/test/test_mediafile.py
++++ w/test/test_mediafile.py
+@@ -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/replaygain-default-bs1770gain.patch b/nixpkgs/pkgs/tools/audio/beets/replaygain-default-bs1770gain.patch
new file mode 100644
index 000000000000..538f9e933039
--- /dev/null
+++ b/nixpkgs/pkgs/tools/audio/beets/replaygain-default-bs1770gain.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'bs1770gain',
+             'targetlevel': 89,
+         })
+ 
diff --git a/nixpkgs/pkgs/tools/audio/bpm-tools/default.nix b/nixpkgs/pkgs/tools/audio/bpm-tools/default.nix
new file mode 100644
index 000000000000..035fbf095338
--- /dev/null
+++ b/nixpkgs/pkgs/tools/audio/bpm-tools/default.nix
@@ -0,0 +1,32 @@
+{
+  stdenv,
+  fetchurl,
+}:
+
+stdenv.mkDerivation rec {
+  pname = "bpm-tools";
+  version = "0.3";
+
+  src = fetchurl {
+    url = "http://www.pogo.org.uk/~mark/bpm-tools/releases/bpm-tools-${version}.tar.gz";
+    sha256 = "151vfbs8h3cibs7kbdps5pqrsxhpjv16y2iyfqbxzsclylgfivrp";
+  };
+
+  patchPhase = ''
+    patchShebangs bpm-tag
+    patchShebangs bpm-graph
+  '';
+
+  installFlags = [
+    "PREFIX=${placeholder "out"}"
+  ];
+
+  meta = with stdenv.lib; {
+    homepage = "http://www.pogo.org.uk/~mark/bpm-tools/";
+    description = "Automatically calculate BPM (tempo) of music files";
+    license = licenses.gpl2;
+    platforms = platforms.all;
+    maintainers = with maintainers; [ doronbehar ];
+  };
+}
+
diff --git a/nixpkgs/pkgs/tools/audio/darkice/default.nix b/nixpkgs/pkgs/tools/audio/darkice/default.nix
new file mode 100644
index 000000000000..89b93b02865f
--- /dev/null
+++ b/nixpkgs/pkgs/tools/audio/darkice/default.nix
@@ -0,0 +1,37 @@
+{ stdenv, fetchurl, pkgconfig
+, libjack2, alsaLib, libpulseaudio
+, faac, lame, libogg, libopus, libvorbis, libsamplerate
+}:
+
+stdenv.mkDerivation rec {
+  pname = "darkice";
+  version = "1.3";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/darkice/${version}/darkice-${version}.tar.gz";
+    sha256 = "1rlxds7ssq7nk2in4s46xws7xy9ylxsqgcz85hxjgh17lsm0y39c";
+  };
+
+  nativeBuildInputs = [ pkgconfig ];
+  buildInputs = [
+    libopus libvorbis libogg libpulseaudio alsaLib libsamplerate libjack2 lame
+  ];
+
+  NIX_CFLAGS_COMPILE = "-fpermissive";
+
+  configureFlags = [
+    "--with-faac-prefix=${faac}"
+    "--with-lame-prefix=${lame.lib}"
+  ];
+
+  patches = [ ./fix-undeclared-memmove.patch ];
+
+  enableParallelBuilding = true;
+
+  meta = {
+    homepage = "http://darkice.org/";
+    description = "Live audio streamer";
+    license = stdenv.lib.licenses.gpl3;
+    maintainers = with stdenv.lib.maintainers; [ ikervagyok fpletz ];
+  };
+}
diff --git a/nixpkgs/pkgs/tools/audio/darkice/fix-undeclared-memmove.patch b/nixpkgs/pkgs/tools/audio/darkice/fix-undeclared-memmove.patch
new file mode 100644
index 000000000000..9b8baf9701d3
--- /dev/null
+++ b/nixpkgs/pkgs/tools/audio/darkice/fix-undeclared-memmove.patch
@@ -0,0 +1,13 @@
+diff --git a/src/FaacEncoder.cpp b/src/FaacEncoder.cpp
+index 1100226..3ab1805 100644
+--- a/src/FaacEncoder.cpp
++++ b/src/FaacEncoder.cpp
+@@ -36,7 +36,7 @@
+ // compile the whole file only if faac support configured in
+ #ifdef HAVE_FAAC_LIB
+ 
+-
++#include <string.h>
+ 
+ #include "Exception.h"
+ #include "Util.h"
diff --git a/nixpkgs/pkgs/tools/audio/dir2opus/default.nix b/nixpkgs/pkgs/tools/audio/dir2opus/default.nix
new file mode 100644
index 000000000000..872006547031
--- /dev/null
+++ b/nixpkgs/pkgs/tools/audio/dir2opus/default.nix
@@ -0,0 +1,35 @@
+{ stdenv, fetchurl, python, mutagen, wrapPython, opusTools, mpg123 }:
+
+let version = "0.12.2"; in
+stdenv.mkDerivation rec {
+  pname = "dir2opus";
+  inherit version;
+
+  pythonPath = [ mutagen ];
+  buildInputs = [ wrapPython ];
+  propagatedBuildInputs = [ opusTools mpg123 ];
+
+  src = fetchurl {
+    url = "https://github.com/ehmry/dir2opus/archive/${version}.tar.gz";
+    name = "${pname}-${version}.tar.gz";
+    sha256 = "0bl8fa9zhccihnj1v3lpz5jb737frf9za06xb7j5rsjws6xky80d";
+  };
+
+  postPatch = "sed -i -e 's|#!/usr/bin/python|#!${python}/bin/python|' dir2opus";
+
+  installPhase =
+    ''
+      mkdir -p $out/bin $out/share/man/man1
+      cp dir2opus $out/bin
+      cp dir2opus.1 $out/share/man/man1
+    '';
+
+  postFixup = "wrapPythonPrograms";
+
+  meta = with stdenv.lib; {
+    homepage = "https://github.com/ehmry/dir2opus";
+    maintainers = [ maintainers.ehmry ];
+    license = licenses.gpl2;
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/tools/audio/essentia-extractor/default.nix b/nixpkgs/pkgs/tools/audio/essentia-extractor/default.nix
new file mode 100644
index 000000000000..0d2bb17a75d4
--- /dev/null
+++ b/nixpkgs/pkgs/tools/audio/essentia-extractor/default.nix
@@ -0,0 +1,41 @@
+{ stdenv, fetchurl }:
+let
+  arch_table = {
+    "x86_64-linux" = "linux-x86_64";
+    "i686-linux" = "linux-i686";
+  };
+
+  sha_table = {
+    "x86_64-linux" =
+      "d9902aadac4f442992877945da2a6fe8d6ea6b0de314ca8ac0c28dc5f253f7d8";
+    "i686-linux" =
+      "46deb0a053b4910c4e68737a7b6556ff5360260c8f86652f91a0130445f5c949";
+  };
+
+  arch = arch_table.${stdenv.system};
+  sha = sha_table.${stdenv.system};
+in stdenv.mkDerivation rec {
+  pname = "essentia-extractor";
+  version = "2.1_beta2";
+
+  src = fetchurl {
+    url =
+      "ftp://ftp.acousticbrainz.org/pub/acousticbrainz/essentia-extractor-v${version}-${arch}.tar.gz";
+    sha256 = sha;
+  };
+
+  unpackPhase = "unpackFile $src ; export sourceRoot=.";
+
+  installPhase = ''
+    mkdir -p $out/bin
+    cp streaming_extractor_music $out/bin
+  '';
+
+  meta = with stdenv.lib; {
+    homepage = "https://acousticbrainz.org/download";
+    description = "AcousticBrainz audio feature extractor";
+    license = licenses.agpl3Plus;
+    maintainers = with maintainers; [ lovesegfault ];
+    platforms = [ "x86_64-linux" "i686-linux" ];
+  };
+}
diff --git a/nixpkgs/pkgs/tools/audio/ezstream/default.nix b/nixpkgs/pkgs/tools/audio/ezstream/default.nix
new file mode 100644
index 000000000000..02a6e9d37f37
--- /dev/null
+++ b/nixpkgs/pkgs/tools/audio/ezstream/default.nix
@@ -0,0 +1,33 @@
+{ stdenv, fetchurl, libiconv, libshout, taglib, libxml2, pkgconfig }:
+
+stdenv.mkDerivation rec {
+  pname = "ezstream";
+  version = "0.6.0";
+
+  src = fetchurl {
+    url = "https://ftp.osuosl.org/pub/xiph/releases/ezstream/${pname}-${version}.tar.gz";
+    sha256 = "f86eb8163b470c3acbc182b42406f08313f85187bd9017afb8b79b02f03635c9";
+  };
+
+  buildInputs = [ libiconv libshout taglib libxml2 ];
+  nativeBuildInputs = [ pkgconfig ];
+
+  doCheck = true;
+
+  meta = with stdenv.lib; {
+    description = "A command line source client for Icecast media streaming servers";
+    longDescription = ''
+      Ezstream is a command line source client for Icecast media
+      streaming servers. It began as the successor of the old "shout"
+      utility, and has since gained a lot of useful features.
+
+      In its basic mode of operation, it streams media files or data
+      from standard input without reencoding and thus requires only
+      very little CPU resources.
+    '';
+    homepage = "http://icecast.org/ezstream/";
+    license = licenses.gpl2;
+    maintainers = [ maintainers.barrucadu ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/tools/audio/glyr/default.nix b/nixpkgs/pkgs/tools/audio/glyr/default.nix
new file mode 100644
index 000000000000..41490381487e
--- /dev/null
+++ b/nixpkgs/pkgs/tools/audio/glyr/default.nix
@@ -0,0 +1,27 @@
+{ stdenv, fetchFromGitHub, cmake
+, curl, glib, sqlite, pkgconfig }:
+
+stdenv.mkDerivation rec {
+  version = "1.0.10";
+  pname = "glyr";
+
+  src = fetchFromGitHub {
+    owner = "sahib";
+    repo = "glyr";
+    rev = version;
+    sha256 = "1miwbqzkhg0v3zysrwh60pj9sv6ci4lzq2vq2hhc6pc6hdyh8xyr";
+  };
+
+  nativeBuildInputs = [ cmake pkgconfig ];
+  buildInputs = [ sqlite glib curl ];
+
+  meta = with stdenv.lib; {
+    license = licenses.lgpl3;
+    description = "A music related metadata searchengine";
+    homepage = "https://github.com/sahib/glyr";
+    maintainers = [ maintainers.sternenseemann ];
+    platforms = platforms.unix;
+  };
+}
+
+
diff --git a/nixpkgs/pkgs/tools/audio/google-music-scripts/default.nix b/nixpkgs/pkgs/tools/audio/google-music-scripts/default.nix
new file mode 100644
index 000000000000..f95dcc8bb6dd
--- /dev/null
+++ b/nixpkgs/pkgs/tools/audio/google-music-scripts/default.nix
@@ -0,0 +1,42 @@
+{ lib, python3 }:
+
+with python3.pkgs;
+
+buildPythonApplication rec {
+  pname = "google-music-scripts";
+  version = "4.3.0";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "0dykjhqklbpqr1lvls0bgf6xkwvslj37lx4q8522hjbs150pwjmq";
+  };
+
+  postPatch = ''
+    substituteInPlace setup.py \
+      --replace "audio-metadata>=0.8,<0.9" "audio-metadata"
+  '';
+
+  propagatedBuildInputs = [
+    appdirs
+    audio-metadata
+    google-music
+    google-music-proto
+    google-music-utils
+    loguru
+    pendulum
+    natsort
+    tomlkit
+  ];
+
+  # No tests
+  checkPhase = ''
+    $out/bin/gms --help >/dev/null
+  '';
+
+  meta = with lib; {
+    homepage = "https://github.com/thebigmunch/google-music-scripts";
+    description = "A CLI utility for interacting with Google Music";
+    license = licenses.mit;
+    maintainers = with maintainers; [ jakewaksbaum ];
+  };
+}
diff --git a/nixpkgs/pkgs/tools/audio/gvolicon/default.nix b/nixpkgs/pkgs/tools/audio/gvolicon/default.nix
new file mode 100644
index 000000000000..5190699be087
--- /dev/null
+++ b/nixpkgs/pkgs/tools/audio/gvolicon/default.nix
@@ -0,0 +1,28 @@
+{ stdenv, makeWrapper, alsaLib, pkgconfig, fetchgit, gtk3, gnome3, gdk-pixbuf, librsvg, wrapGAppsHook }:
+
+stdenv.mkDerivation {
+  name = "gvolicon-2014-04-28";
+  src = fetchgit {
+    url = "https://github.com/Unia/gvolicon";
+    rev = "0d65a396ba11f519d5785c37fec3e9a816217a07";
+    sha256 = "1sr9wyy7w898vq63yd003yp3k66hd4vm8b0qsm9zvmwmpiz4wvln";
+  };
+
+  nativeBuildInputs = [ pkgconfig ];
+  buildInputs = [
+    makeWrapper alsaLib gtk3 gdk-pixbuf gnome3.adwaita-icon-theme
+    librsvg wrapGAppsHook
+  ];
+
+  makeFlags = [ "PREFIX=$(out)" ];
+
+  NIX_CFLAGS_COMPILE = "-D_POSIX_C_SOURCE";
+
+  meta = {
+    description = "A simple and lightweight volume icon that sits in your system tray";
+    homepage = "https://github.com/Unia/gvolicon";
+    platforms = stdenv.lib.platforms.linux;
+    license = stdenv.lib.licenses.gpl3Plus;
+    maintainers = [ stdenv.lib.maintainers.bennofs ];
+  };
+}
diff --git a/nixpkgs/pkgs/tools/audio/liquidsoap/full.nix b/nixpkgs/pkgs/tools/audio/liquidsoap/full.nix
new file mode 100644
index 000000000000..2aa01dfe073f
--- /dev/null
+++ b/nixpkgs/pkgs/tools/audio/liquidsoap/full.nix
@@ -0,0 +1,60 @@
+{ stdenv, makeWrapper, fetchurl, which, pkgconfig
+, ocamlPackages
+, libao, portaudio, alsaLib, libpulseaudio, libjack2
+, libsamplerate, libmad, taglib, lame, libogg
+, libvorbis, speex, libtheora, libopus, fdk_aac
+, faad2, flac, ladspaH, ffmpeg, frei0r, dssi
+}:
+
+let
+  pname = "liquidsoap";
+  version = "1.3.4";
+
+  packageFilters = map (p: "-e '/ocaml-${p}/d'" )
+    [ "gstreamer" "shine" "aacplus" "schroedinger"
+      "voaacenc" "soundtouch" "gavl" "lo"
+    ];
+in
+stdenv.mkDerivation {
+  name = "${pname}-full-${version}";
+
+  src = fetchurl {
+    url = "https://github.com/savonet/${pname}/releases/download/${version}/${pname}-${version}-full.tar.bz2";
+    sha256 = "11l1h42sljfxcdhddc8klya4bk99j7a1pndwnzvscb04pvmfmlk0";
+  };
+
+  preConfigure = /* we prefer system-wide libs */ ''
+    sed -i "s|gsed|sed|" Makefile
+    make bootstrap
+    # autoreconf -vi # use system libraries
+
+    sed ${toString packageFilters} PACKAGES.default > PACKAGES
+  '';
+
+  postFixup = ''
+    wrapProgram $out/bin/liquidsoap --set LIQ_LADSPA_PATH /run/current-system/sw/lib/ladspa
+  '';
+
+  configureFlags = [ "--localstatedir=/var" ];
+
+  nativeBuildInputs = [ makeWrapper pkgconfig ];
+  buildInputs =
+    [ which ocamlPackages.ocaml ocamlPackages.findlib
+      libao portaudio alsaLib libpulseaudio libjack2
+      libsamplerate libmad taglib lame libogg
+      libvorbis speex libtheora libopus fdk_aac
+      faad2 flac ladspaH ffmpeg frei0r dssi
+      ocamlPackages.xmlm ocamlPackages.ocaml_pcre
+      ocamlPackages.camomile
+    ];
+
+  hardeningDisable = [ "format" "fortify" ];
+
+  meta = with stdenv.lib; {
+    description = "Swiss-army knife for multimedia streaming";
+    homepage = "https://www.liquidsoap.info/";
+    maintainers = with maintainers; [ ehmry ];
+    license = licenses.gpl2;
+    platforms = ocamlPackages.ocaml.meta.platforms or [];
+  };
+}
diff --git a/nixpkgs/pkgs/tools/audio/midicsv/default.nix b/nixpkgs/pkgs/tools/audio/midicsv/default.nix
new file mode 100644
index 000000000000..e5f3f6124b9b
--- /dev/null
+++ b/nixpkgs/pkgs/tools/audio/midicsv/default.nix
@@ -0,0 +1,22 @@
+{ stdenv, fetchurl }:
+
+stdenv.mkDerivation rec {
+  name = "midicsv-1.1";
+
+  src = fetchurl {
+    url = "http://www.fourmilab.ch/webtools/midicsv/${name}.tar.gz";
+    sha256 = "1vvhk2nf9ilfw0wchmxy8l13hbw9cnpz079nsx5srsy4nnd78nkw";
+  };
+
+  postPatch = ''
+    substituteInPlace Makefile --replace /usr/local $out
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Losslessly translate MIDI to CSV and back";
+    homepage = "http://www.fourmilab.ch/webtools/midicsv/";
+    license = licenses.publicDomain;
+    maintainers = with maintainers; [ orivej ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/tools/audio/mididings/default.nix b/nixpkgs/pkgs/tools/audio/mididings/default.nix
new file mode 100644
index 000000000000..addb95b9f1bd
--- /dev/null
+++ b/nixpkgs/pkgs/tools/audio/mididings/default.nix
@@ -0,0 +1,38 @@
+{ stdenv, pythonPackages, fetchFromGitHub, pkg-config, glib, alsaLib, libjack2  }:
+
+pythonPackages.buildPythonApplication {
+  version = "2015-11-17";
+  pname = "mididings";
+
+  src = fetchFromGitHub {
+    owner = "dsacre";
+    repo = "mididings";
+    rev = "bbec99a8c878a2a7029e78e84fc736e4a68ed5a0";
+    sha256 = "1pdf5mib87zy7yjh9vpasja419h28wvgq6x5hw2hkm7bg9ds4p2m";
+  };
+
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = [ glib alsaLib libjack2 pythonPackages.boost ];
+  propagatedBuildInputs = with pythonPackages; [ decorator ]
+    # for livedings
+    ++ [ tkinter pyliblo ]
+    # for mididings.extra
+    ++ [ dbus-python pyinotify ]
+    # to read/write standard MIDI files
+    ++ [ pysmf ]
+    # so mididings knows where to look for config files
+    ++ [ pyxdg ];
+
+  preBuild = with stdenv.lib.versions; ''
+    substituteInPlace setup.py \
+      --replace boost_python "boost_python${major pythonPackages.python.version}${minor pythonPackages.python.version}"
+  '';
+
+  meta = with stdenv.lib; {
+    description = "A MIDI router and processor based on Python, supporting ALSA and JACK MIDI";
+    homepage = "http://das.nasophon.de/mididings";
+    license = licenses.gpl2;
+    maintainers = [ maintainers.gnidorah ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/tools/audio/mp3cat/default.nix b/nixpkgs/pkgs/tools/audio/mp3cat/default.nix
new file mode 100644
index 000000000000..e7a1d004a019
--- /dev/null
+++ b/nixpkgs/pkgs/tools/audio/mp3cat/default.nix
@@ -0,0 +1,34 @@
+{ stdenv, fetchFromGitHub }:
+
+stdenv.mkDerivation rec {
+  pname = "mp3cat";
+  version = "0.5";
+
+  src = fetchFromGitHub {
+    owner = "tomclegg";
+    repo = pname;
+    rev = version;
+    sha256 = "0n6hjg2wgd06m561zc3ib5w2m3pwpf74njv2b2w4sqqh5md2ymfr";
+  };
+
+  makeFlags = [
+    "PREFIX=${placeholder "out"}"
+  ];
+
+  installTargets = [
+    "install_bin"
+  ];
+
+  meta = with stdenv.lib; {
+    description = "A command line program which concatenates MP3 files";
+    longDescription = ''
+      A command line program which concatenates MP3 files, mp3cat
+      only outputs MP3 frames with valid headers, even if there is extra garbage
+      in its input stream
+    '';
+    homepage = "https://github.com/tomclegg/mp3cat";
+    license = licenses.gpl2;
+    maintainers = [ maintainers.omnipotententity ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/tools/audio/mpd-mpris/default.nix b/nixpkgs/pkgs/tools/audio/mpd-mpris/default.nix
new file mode 100644
index 000000000000..37766a907219
--- /dev/null
+++ b/nixpkgs/pkgs/tools/audio/mpd-mpris/default.nix
@@ -0,0 +1,33 @@
+{ stdenv, buildGoModule, fetchFromGitHub }:
+
+buildGoModule rec {
+  pname = "mpd-mpris";
+  version = "0.2.4";
+
+  src = fetchFromGitHub {
+    owner = "natsukagami";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "1cr5j2z2ynj1hwkjzi5amcg59vmgazsci41v6vpsj119g7psjmzm";
+  };
+
+  modSha256 = "1a95kfy8w952269x4llbl0afyxr5fjkg30mxsn81zdh5wr8gabwh";
+
+  subPackages = [ "cmd/${pname}" ];
+
+  postInstall = ''
+    substituteInPlace mpd-mpris.service \
+      --replace /usr/bin $out/bin
+    mkdir -p $out/lib/systemd/user
+    cp mpd-mpris.service $out/lib/systemd/user
+  '';
+
+  meta = with stdenv.lib; {
+    description = "An implementation of the MPRIS protocol for MPD";
+    homepage = "https://github.com/natsukagami/mpd-mpris";
+    license = licenses.mit;
+    maintainers = with maintainers; [ doronbehar ];
+    platforms = platforms.linux;
+  };
+}
+
diff --git a/nixpkgs/pkgs/tools/audio/mpdas/default.nix b/nixpkgs/pkgs/tools/audio/mpdas/default.nix
new file mode 100644
index 000000000000..507e62b0dae9
--- /dev/null
+++ b/nixpkgs/pkgs/tools/audio/mpdas/default.nix
@@ -0,0 +1,27 @@
+{ stdenv, fetchFromGitHub, pkgconfig, mpd_clientlib, curl }:
+
+stdenv.mkDerivation rec {
+  pname = "mpdas";
+  version = "0.4.5";
+
+  src = fetchFromGitHub {
+    owner = "hrkfdn";
+    repo = "mpdas";
+    rev = version;
+    sha256 = "0fcqc4w6iwbi1n3cllcgj0k61zffhqkbr8668myxap21m35x8y1r";
+  };
+
+  nativeBuildInputs = [ pkgconfig ];
+
+  buildInputs = [ mpd_clientlib curl ];
+
+  makeFlags = [ "CONFIG=/etc" "DESTDIR=" "PREFIX=$(out)" ];
+
+  meta = with stdenv.lib; {
+    description = "Music Player Daemon AudioScrobbler";
+    homepage = "https://50hz.ws/mpdas/";
+    license = licenses.bsd3;
+    maintainers = [ maintainers.taketwo ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/tools/audio/mpdcron/Gemfile b/nixpkgs/pkgs/tools/audio/mpdcron/Gemfile
new file mode 100644
index 000000000000..e0814bc4ddab
--- /dev/null
+++ b/nixpkgs/pkgs/tools/audio/mpdcron/Gemfile
@@ -0,0 +1,2 @@
+source "https://rubygems.org"
+gem "nokogiri"
diff --git a/nixpkgs/pkgs/tools/audio/mpdcron/Gemfile.lock b/nixpkgs/pkgs/tools/audio/mpdcron/Gemfile.lock
new file mode 100644
index 000000000000..603a9cfdafb1
--- /dev/null
+++ b/nixpkgs/pkgs/tools/audio/mpdcron/Gemfile.lock
@@ -0,0 +1,15 @@
+GEM
+  remote: https://rubygems.org/
+  specs:
+    mini_portile2 (2.4.0)
+    nokogiri (1.10.3)
+      mini_portile2 (~> 2.4.0)
+
+PLATFORMS
+  ruby
+
+DEPENDENCIES
+  nokogiri
+
+BUNDLED WITH
+   2.1.4
diff --git a/nixpkgs/pkgs/tools/audio/mpdcron/default.nix b/nixpkgs/pkgs/tools/audio/mpdcron/default.nix
new file mode 100644
index 000000000000..c083c60a9625
--- /dev/null
+++ b/nixpkgs/pkgs/tools/audio/mpdcron/default.nix
@@ -0,0 +1,37 @@
+{ stdenv, fetchFromGitHub, autoconf, automake, libtool, pkgconfig, glib, libdaemon
+, mpd_clientlib, curl, sqlite, bundlerEnv, libnotify, pandoc }:
+
+let
+  gemEnv = bundlerEnv {
+    name = "mpdcron-bundle";
+    gemdir = ./.;
+  };
+in stdenv.mkDerivation {
+  version = "20161228";
+  pname = "mpdcron";
+
+  src = fetchFromGitHub {
+    owner = "alip";
+    repo = "mpdcron";
+    rev = "e49e6049b8693d31887c538ddc7b19f5e8ca476b";
+    sha256 = "0vdksf6lcgmizqr5mqp0bbci259k0dj7gpmhx32md41jlmw5skaw";
+  };
+
+  meta = with stdenv.lib; {
+    description = "A cron like daemon for mpd";
+    homepage    = "http://alip.github.io/mpdcron/";
+    license     = licenses.gpl2;
+    platforms   = platforms.unix;
+    maintainers = with maintainers; [ lovek323 manveru ];
+  };
+
+  buildInputs =
+    [ autoconf automake libtool pkgconfig glib libdaemon pandoc
+      mpd_clientlib curl sqlite gemEnv.wrappedRuby libnotify ];
+
+  preConfigure = ''
+    ./autogen.sh
+  '';
+
+  configureFlags = [ "--enable-gmodule" "--with-standard-modules=all" ];
+}
diff --git a/nixpkgs/pkgs/tools/audio/mpdcron/gemset.nix b/nixpkgs/pkgs/tools/audio/mpdcron/gemset.nix
new file mode 100644
index 000000000000..025eb96b0652
--- /dev/null
+++ b/nixpkgs/pkgs/tools/audio/mpdcron/gemset.nix
@@ -0,0 +1,23 @@
+{
+  mini_portile2 = {
+    groups = ["default"];
+    platforms = [];
+    source = {
+      remotes = ["https://rubygems.org"];
+      sha256 = "15zplpfw3knqifj9bpf604rb3wc1vhq6363pd6lvhayng8wql5vy";
+      type = "gem";
+    };
+    version = "2.4.0";
+  };
+  nokogiri = {
+    dependencies = ["mini_portile2"];
+    groups = ["default"];
+    platforms = [];
+    source = {
+      remotes = ["https://rubygems.org"];
+      sha256 = "02bjydih0j515szfv9mls195cvpyidh6ixm7dwbl3s2sbaxxk5s4";
+      type = "gem";
+    };
+    version = "1.10.3";
+  };
+}
\ No newline at end of file
diff --git a/nixpkgs/pkgs/tools/audio/mpdris2/default.nix b/nixpkgs/pkgs/tools/audio/mpdris2/default.nix
new file mode 100644
index 000000000000..029dcd127f13
--- /dev/null
+++ b/nixpkgs/pkgs/tools/audio/mpdris2/default.nix
@@ -0,0 +1,55 @@
+{ stdenv
+, autoreconfHook
+, fetchFromGitHub
+, glib
+, gobject-introspection
+, intltool
+, libnotify
+, python3
+, wrapGAppsHook
+}:
+
+python3.pkgs.buildPythonApplication rec {
+  pname = "mpDris2";
+  version = "0.8";
+  format = "other";
+  strictDeps = false; # https://github.com/NixOS/nixpkgs/issues/56943
+
+  src = fetchFromGitHub {
+    owner = "eonpatapon";
+    repo = pname;
+    rev = version;
+    sha256 = "048b8acsd1b8kcxzd9fsh5p9g2an9c4rznicfcpyrsjz5syv894h";
+  };
+
+  preConfigure = ''
+    intltoolize -f
+  '';
+
+  nativeBuildInputs = [
+    autoreconfHook
+    gobject-introspection
+    intltool
+    wrapGAppsHook
+  ];
+
+  buildInputs = [
+    glib
+    libnotify
+  ];
+
+  propagatedBuildInputs = with python3.pkgs; [
+    dbus-python
+    mpd2
+    mutagen
+    pygobject3
+  ];
+
+  meta = with stdenv.lib; {
+    description = "MPRIS 2 support for mpd";
+    homepage = "https://github.com/eonpatapon/mpDris2/";
+    license = licenses.gpl3;
+    maintainers = with maintainers; [];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/tools/audio/mpdsync/default.nix b/nixpkgs/pkgs/tools/audio/mpdsync/default.nix
new file mode 100644
index 000000000000..51f5ba656168
--- /dev/null
+++ b/nixpkgs/pkgs/tools/audio/mpdsync/default.nix
@@ -0,0 +1,24 @@
+{ stdenv, python2, fetchFromGitHub }:
+with python2.pkgs;
+stdenv.mkDerivation {
+  name = "mpdsync-2017-06-15";
+
+  src = fetchFromGitHub {
+    owner = "alphapapa";
+    repo = "mpdsync";
+    rev = "da90058f44dd9578cc5f2fb96a1fb2b26da40d07";
+    sha256 = "1mfg3ipqj5dvyyqbgp6ia6sc1ja5gmm2c9mfrwx0jw2dl182if6q";
+  };
+
+  pythonPath = [ mpd2 ];
+
+  nativeBuildInputs = [
+    wrapPython
+  ];
+
+  dontBuild = true;
+
+  installPhase = "install -D mpdsync.py $out/bin/mpdsync";
+  postFixup = "wrapPythonPrograms";
+
+}
diff --git a/nixpkgs/pkgs/tools/audio/opl3bankeditor/default.nix b/nixpkgs/pkgs/tools/audio/opl3bankeditor/default.nix
new file mode 100644
index 000000000000..0503f9bad694
--- /dev/null
+++ b/nixpkgs/pkgs/tools/audio/opl3bankeditor/default.nix
@@ -0,0 +1,27 @@
+{ stdenv, mkDerivation, fetchFromGitHub, cmake, qttools, alsaLib }:
+
+mkDerivation rec {
+  version = "1.5";
+  pname = "OPL3BankEditor";
+
+  src = fetchFromGitHub {
+    owner = "Wohlstand";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "16va5xfbyn2m63722ab5yph0l7kmghkbk6dkia93041mfhdyg9rc";
+    fetchSubmodules = true;
+  };
+
+  buildInputs = [
+    alsaLib qttools
+  ];
+  nativeBuildInputs = [ cmake ];
+
+  meta = with stdenv.lib; {
+    description = "A small cross-platform editor of the OPL3 FM banks of different formats";
+    homepage = src.meta.homepage;
+    license = licenses.gpl3;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ gnidorah ];
+  };
+}
diff --git a/nixpkgs/pkgs/tools/audio/opl3bankeditor/opn2bankeditor.nix b/nixpkgs/pkgs/tools/audio/opl3bankeditor/opn2bankeditor.nix
new file mode 100644
index 000000000000..d8f15a65b45b
--- /dev/null
+++ b/nixpkgs/pkgs/tools/audio/opl3bankeditor/opn2bankeditor.nix
@@ -0,0 +1,19 @@
+{ opl3bankeditor, fetchFromGitHub }:
+
+opl3bankeditor.overrideAttrs (oldAttrs: rec {
+  version = "1.3-beta";
+  pname = "OPN2BankEditor";
+
+  src = fetchFromGitHub {
+    owner = "Wohlstand";
+    repo = pname;
+    rev = version;
+    sha256 = "0blcvqfj1yj6cmm079aw4jdzv3066jxqy9krp268i6cl2b3bmwvw";
+    fetchSubmodules = true;
+  };
+
+  # to be removed with next release
+  postInstall = ''
+    install -Dm755 opn2_bank_editor $out/bin/opn2_bank_editor
+  '';
+})
diff --git a/nixpkgs/pkgs/tools/audio/pa-applet/default.nix b/nixpkgs/pkgs/tools/audio/pa-applet/default.nix
new file mode 100644
index 000000000000..69e5976e6d5e
--- /dev/null
+++ b/nixpkgs/pkgs/tools/audio/pa-applet/default.nix
@@ -0,0 +1,33 @@
+{ stdenv, fetchgit, libpulseaudio, pkgconfig, gtk3, glibc, autoconf, automake, libnotify, libX11, xf86inputevdev }:
+
+stdenv.mkDerivation {
+  name = "pa-applet-2012-04-11";
+
+  src = fetchgit {
+    url = "git://github.com/fernandotcl/pa-applet.git";
+    rev = "005f192df9ba6d2e6491f9aac650be42906b135a";
+    sha256 = "1242sdri67wnm1cd0hr40mxarkh7qs7mb9n2m0g9dbz0f4axj6wa";
+  };
+
+  nativeBuildInputs = [ pkgconfig ];
+  buildInputs = [
+    gtk3 libpulseaudio glibc automake autoconf libnotify libX11 xf86inputevdev
+  ];
+
+  preConfigure = ''
+    ./autogen.sh
+  '';
+
+  # work around a problem related to gtk3 updates
+  NIX_CFLAGS_COMPILE = "-Wno-error=deprecated-declarations";
+
+  postInstall = ''
+  '';
+
+  meta = with stdenv.lib; {
+    description = "";
+    license = licenses.gpl2;
+    maintainers = with maintainers; [ domenkozar ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/tools/audio/pasystray/default.nix b/nixpkgs/pkgs/tools/audio/pasystray/default.nix
new file mode 100644
index 000000000000..648dcad42bad
--- /dev/null
+++ b/nixpkgs/pkgs/tools/audio/pasystray/default.nix
@@ -0,0 +1,31 @@
+{ stdenv, fetchFromGitHub, pkgconfig, autoreconfHook, wrapGAppsHook
+, gnome3, avahi, gtk3, libappindicator-gtk3, libnotify, libpulseaudio
+, xlibsWrapper, gsettings-desktop-schemas
+}:
+
+stdenv.mkDerivation rec {
+  pname = "pasystray";
+  version = "0.7.1";
+
+  src = fetchFromGitHub {
+    owner = "christophgysin";
+    repo = "pasystray";
+    rev = "${pname}-${version}";
+    sha256 = "0xx1bm9kimgq11a359ikabdndqg5q54pn1d1dyyjnrj0s41168fk";
+  };
+
+  nativeBuildInputs = [ pkgconfig autoreconfHook wrapGAppsHook ];
+  buildInputs = [
+    gnome3.adwaita-icon-theme
+    avahi gtk3 libappindicator-gtk3 libnotify libpulseaudio xlibsWrapper
+    gsettings-desktop-schemas
+  ];
+
+  meta = with stdenv.lib; {
+    description = "PulseAudio system tray";
+    homepage = "https://github.com/christophgysin/pasystray";
+    license = licenses.lgpl21Plus;
+    maintainers = with maintainers; [ exlevan kamilchm ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/tools/audio/picotts/default.nix b/nixpkgs/pkgs/tools/audio/picotts/default.nix
new file mode 100644
index 000000000000..023bf4577740
--- /dev/null
+++ b/nixpkgs/pkgs/tools/audio/picotts/default.nix
@@ -0,0 +1,24 @@
+{ stdenv, fetchFromGitHub, autoconf, automake, libtool, popt }:
+
+stdenv.mkDerivation {
+  name = "picotts-unstable-2018-10-19";
+  src = fetchFromGitHub {
+    repo = "picotts";
+    owner = "naggety";
+    rev = "2f86050dc5da9ab68fc61510b594d8e6975c4d2d";
+    sha256 = "1k2mdv9llkh77jr4qr68yf0zgjqk87np35fgfmnc3rpdp538sccl";
+  };
+  nativeBuildInputs = [ autoconf automake ];
+  buildInputs = [ libtool popt ];
+  sourceRoot = "source/pico";
+  preConfigure = "./autogen.sh";
+  meta = {
+    description = "Text to speech voice sinthesizer from SVox.";
+    homepage = "https://github.com/naggety/picotts";
+    license = stdenv.lib.licenses.asl20;
+    maintainers = [ stdenv.lib.maintainers.canndrew ];
+    platforms = stdenv.lib.platforms.linux;
+  };
+}
+
+
diff --git a/nixpkgs/pkgs/tools/audio/playerctl/default.nix b/nixpkgs/pkgs/tools/audio/playerctl/default.nix
new file mode 100644
index 000000000000..3541453bafe4
--- /dev/null
+++ b/nixpkgs/pkgs/tools/audio/playerctl/default.nix
@@ -0,0 +1,25 @@
+{ stdenv, meson, ninja, fetchFromGitHub, glib, pkgconfig, gtk-doc, docbook_xsl, gobject-introspection }:
+
+stdenv.mkDerivation rec {
+  pname = "playerctl";
+  version = "2.1.1";
+
+  src = fetchFromGitHub {
+    owner = "acrisci";
+    repo = "playerctl";
+    rev = "v${version}";
+    sha256 = "03f3645ssqf8dpkyzj9rlglrzh0840sflalskx9s4i03bgq3v4r9";
+  };
+
+  nativeBuildInputs = [ meson ninja pkgconfig gtk-doc docbook_xsl gobject-introspection ];
+  buildInputs = [ glib ];
+
+  meta = with stdenv.lib; {
+    description = "Command-line utility and library for controlling media players that implement MPRIS";
+    homepage = "https://github.com/acrisci/playerctl";
+    license = licenses.lgpl3;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ puffnfresh ];
+    broken = stdenv.hostPlatform.isDarwin;
+  };
+}
diff --git a/nixpkgs/pkgs/tools/audio/pnmixer/default.nix b/nixpkgs/pkgs/tools/audio/pnmixer/default.nix
new file mode 100644
index 000000000000..c1e40ae5dbb9
--- /dev/null
+++ b/nixpkgs/pkgs/tools/audio/pnmixer/default.nix
@@ -0,0 +1,25 @@
+{ stdenv, fetchFromGitHub, cmake, pkgconfig, gettext, alsaLib, gtk3, glib, libnotify, libX11, pcre }:
+
+stdenv.mkDerivation rec {
+  pname = "pnmixer";
+  version = "0.7.2";
+
+  src = fetchFromGitHub {
+    owner = "nicklan";
+    repo = "pnmixer";
+    rev = "v${version}";
+    sha256 = "0416pa933ddf4b7ph9zxhk5jppkk7ppcq1aqph6xsrfnka4yb148";
+  };
+
+  nativeBuildInputs = [ cmake pkgconfig gettext ];
+
+  buildInputs = [ alsaLib gtk3 glib libnotify libX11 pcre ];
+
+  meta = with stdenv.lib; {
+    homepage = "https://github.com/nicklan/pnmixer";
+    description = "ALSA volume mixer for the system tray";
+    license = licenses.gpl3;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ campadrenalin romildo ];
+  };
+}
diff --git a/nixpkgs/pkgs/tools/audio/pulsemixer/default.nix b/nixpkgs/pkgs/tools/audio/pulsemixer/default.nix
new file mode 100644
index 000000000000..b735c40031f6
--- /dev/null
+++ b/nixpkgs/pkgs/tools/audio/pulsemixer/default.nix
@@ -0,0 +1,35 @@
+{ stdenv, fetchFromGitHub, python3, libpulseaudio }:
+
+stdenv.mkDerivation rec {
+  pname = "pulsemixer";
+  version = "1.5.1";
+
+  src = fetchFromGitHub {
+    owner = "GeorgeFilipkin";
+    repo = pname;
+    rev = version;
+    sha256 = "1jagx9zmz5pfsld8y2rj2kqg6ww9f6vqiawfy3vhqc49x3xx92p4";
+  };
+
+  inherit libpulseaudio;
+
+  buildInputs = [ python3 ];
+
+  installPhase = ''
+    mkdir -p $out/bin
+    install pulsemixer $out/bin/
+  '';
+
+  postFixup = ''
+    substituteInPlace "$out/bin/pulsemixer" \
+      --replace "libpulse.so.0" "$libpulseaudio/lib/libpulse.so.0"
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Cli and curses mixer for pulseaudio";
+    homepage = "https://github.com/GeorgeFilipkin/pulsemixer";
+    license = licenses.mit;
+    maintainers = [ maintainers.woffs ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/tools/audio/qastools/default.nix b/nixpkgs/pkgs/tools/audio/qastools/default.nix
new file mode 100644
index 000000000000..86ef7f050b23
--- /dev/null
+++ b/nixpkgs/pkgs/tools/audio/qastools/default.nix
@@ -0,0 +1,24 @@
+{ mkDerivation, lib, fetchFromGitLab, cmake, alsaLib, udev, qtbase, qtsvg, qttools }:
+
+mkDerivation rec {
+  pname = "qastools";
+  version = "0.22.0";
+
+  src = fetchFromGitLab {
+    owner = "sebholt";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "0px4fcn8dagivq5fyi5gy84yj86f6x0lk805mc4ry58d0wsbn68v";
+  };
+
+  nativeBuildInputs = [ cmake ];
+  buildInputs = [ alsaLib udev qtbase qtsvg qttools ];
+
+  meta = with lib; {
+    description = "Collection of desktop applications for ALSA configuration";
+    homepage = "https://gitlab.com/sebholt/qastools";
+    license = licenses.mit;
+    maintainers = with maintainers; [ orivej ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/tools/audio/trx/add_bctoolbox_ldlib.patch b/nixpkgs/pkgs/tools/audio/trx/add_bctoolbox_ldlib.patch
new file mode 100644
index 000000000000..1854a43a2493
--- /dev/null
+++ b/nixpkgs/pkgs/tools/audio/trx/add_bctoolbox_ldlib.patch
@@ -0,0 +1,15 @@
+diff --git a/Makefile b/Makefile
+index ffcd883..c4b4ff7 100644
+--- a/Makefile
++++ b/Makefile
+@@ -12,8 +12,9 @@ CFLAGS += -MMD -Wall
+ LDLIBS_ASOUND ?= -lasound
+ LDLIBS_OPUS ?= -lopus
+ LDLIBS_ORTP ?= -lortp
++LDLIBS_BCTOOLBOX ?= -lbctoolbox
+ 
+-LDLIBS += $(LDLIBS_ASOUND) $(LDLIBS_OPUS) $(LDLIBS_ORTP)
++LDLIBS += $(LDLIBS_ASOUND) $(LDLIBS_OPUS) $(LDLIBS_ORTP) $(LDLIBS_BCTOOLBOX)
+ 
+ .PHONY:		all install dist clean
+ 
diff --git a/nixpkgs/pkgs/tools/audio/trx/default.nix b/nixpkgs/pkgs/tools/audio/trx/default.nix
new file mode 100644
index 000000000000..6a23b6caead4
--- /dev/null
+++ b/nixpkgs/pkgs/tools/audio/trx/default.nix
@@ -0,0 +1,28 @@
+{ stdenv, fetchurl, alsaLib, libopus, ortp, bctoolbox }:
+
+stdenv.mkDerivation rec {
+  pname = "trx";
+  version = "0.5";
+
+  src = fetchurl {
+    url = "https://www.pogo.org.uk/~mark/trx/releases/${pname}-${version}.tar.gz";
+    sha256 = "1jjgca92nifjhcr3n0fmpfr6f5gxlqyal2wmgdlgd7hx834r1if7";
+  };
+
+  # Makefile is currently missing -lbctoolbox so the build fails when linking
+  # the libraries. This patch adds that flag.
+  patches = [
+    ./add_bctoolbox_ldlib.patch
+  ];
+
+  buildInputs = [ alsaLib libopus ortp bctoolbox ];
+  makeFlags = [ "PREFIX=$(out)" ];
+
+  meta = with stdenv.lib; {
+    description = "A simple toolset for broadcasting live audio using RTP/UDP and Opus";
+    homepage = "http://www.pogo.org.uk/~mark/trx/";
+    license = licenses.gpl2;
+    maintainers = [ maintainers.hansjoergschurr ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/tools/audio/video2midi/default.nix b/nixpkgs/pkgs/tools/audio/video2midi/default.nix
new file mode 100644
index 000000000000..dca8a0610da8
--- /dev/null
+++ b/nixpkgs/pkgs/tools/audio/video2midi/default.nix
@@ -0,0 +1,35 @@
+{ stdenv, fetchFromGitHub, pythonPackages, opencv3 }:
+
+let
+  opencv3_ = pythonPackages.toPythonModule (opencv3.override {
+    inherit pythonPackages;
+    enablePython = true;
+    enableFfmpeg = true;
+  });
+in pythonPackages.buildPythonApplication rec {
+  pname = "video2midi";
+  version = "0.4.0.1";
+
+  format = "other";
+
+  src = fetchFromGitHub {
+    owner = "svsdval";
+    repo = pname;
+    rev = version;
+    sha256 = "1869w60kprjdikqk4iwx058zri2jg4aznzlg668w9myka4mp01r9";
+  };
+
+  propagatedBuildInputs = with pythonPackages; [ opencv3_ midiutil pygame pyopengl ];
+
+  installPhase = ''
+    install -Dm755 v2m.py $out/bin/v2m.py
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Youtube synthesia video to midi conversion tool";
+    homepage = src.meta.homepage;
+    license = licenses.gpl3;
+    maintainers = [ maintainers.gnidorah ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/tools/audio/volctl/default.nix b/nixpkgs/pkgs/tools/audio/volctl/default.nix
new file mode 100644
index 000000000000..dd58671824db
--- /dev/null
+++ b/nixpkgs/pkgs/tools/audio/volctl/default.nix
@@ -0,0 +1,50 @@
+{ stdenv, fetchFromGitHub, pythonPackages, libpulseaudio, glib, gtk3, gobject-introspection, wrapGAppsHook }:
+
+pythonPackages.buildPythonApplication rec {
+  pname = "volctl";
+  version = "0.6.3";
+
+  src = fetchFromGitHub {
+    owner = "buzz";
+    repo = pname;
+    rev = version;
+    sha256 = "0rppqc5wiqxd83z2mgvhi6gdx7yhy9wnav1dbbi1wvm7lzw6fnil";
+  };
+
+  nativeBuildInputs = [
+    gobject-introspection
+    wrapGAppsHook
+  ];
+
+  buildInputs = [
+    glib
+    gtk3
+    libpulseaudio
+  ];
+
+  pythonPath = with pythonPackages; [
+    pygobject3
+  ];
+
+  strictDeps = false;
+
+  preBuild = ''
+    export LD_LIBRARY_PATH=${libpulseaudio}/lib
+  '';
+
+  preFixup = ''
+    glib-compile-schemas ${glib.makeSchemaPath "$out" "${pname}-${version}"}
+
+    gappsWrapperArgs+=(
+      --prefix LD_LIBRARY_PATH : "${libpulseaudio}/lib"
+    )
+  '';
+
+  meta = with stdenv.lib; {
+    description = "PulseAudio enabled volume control featuring per-app sliders";
+    homepage = "https://buzz.github.io/volctl/";
+    license = licenses.gpl2;
+    platforms = platforms.linux;
+    maintainers = [ maintainers.romildo ];
+  };
+}
diff --git a/nixpkgs/pkgs/tools/audio/volumeicon/default.nix b/nixpkgs/pkgs/tools/audio/volumeicon/default.nix
new file mode 100644
index 000000000000..50290881dc77
--- /dev/null
+++ b/nixpkgs/pkgs/tools/audio/volumeicon/default.nix
@@ -0,0 +1,24 @@
+{ pkgs, fetchurl, stdenv, gtk3, pkgconfig, intltool, alsaLib }:
+
+stdenv.mkDerivation {
+  pname = "volumeicon";
+  version = "0.5.1";
+
+  src = fetchurl {
+    url = "http://softwarebakery.com/maato/files/volumeicon/volumeicon-0.5.1.tar.gz";
+    sha256 = "182xl2w8syv6ky2h2bc9imc6ap8pzh0p7rp63hh8nw0xm38c3f14";
+  };
+
+  nativeBuildInputs = [ pkgconfig ];
+  buildInputs = [ gtk3 intltool alsaLib ];
+
+  meta = with stdenv.lib; {
+    description = "A lightweight volume control that sits in your systray";
+    homepage = "http://softwarebakery.com/maato/volumeicon.html";
+    platforms = pkgs.lib.platforms.linux;
+    maintainers = with maintainers; [ bobvanderlinden ];
+    license = pkgs.lib.licenses.gpl3;
+  };
+
+}
+