about summary refs log tree commit diff
path: root/nixpkgs/pkgs/applications/audio
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/applications/audio')
-rw-r--r--nixpkgs/pkgs/applications/audio/AMB-plugins/default.nix33
-rw-r--r--nixpkgs/pkgs/applications/audio/FIL-plugins/default.nix37
-rw-r--r--nixpkgs/pkgs/applications/audio/MMA/default.nix68
-rw-r--r--nixpkgs/pkgs/applications/audio/a2jmidid/default.nix40
-rw-r--r--nixpkgs/pkgs/applications/audio/aacgain/default.nix63
-rw-r--r--nixpkgs/pkgs/applications/audio/abcde/default.nix60
-rw-r--r--nixpkgs/pkgs/applications/audio/aeolus/default.nix32
-rw-r--r--nixpkgs/pkgs/applications/audio/airwave/default.nix91
-rw-r--r--nixpkgs/pkgs/applications/audio/aj-snapshot/default.nix32
-rw-r--r--nixpkgs/pkgs/applications/audio/amarok/default.nix42
-rw-r--r--nixpkgs/pkgs/applications/audio/ams-lv2/default.nix27
-rw-r--r--nixpkgs/pkgs/applications/audio/ardour/default.nix91
-rw-r--r--nixpkgs/pkgs/applications/audio/ario/default.nix27
-rw-r--r--nixpkgs/pkgs/applications/audio/artyFX/default.nix26
-rw-r--r--nixpkgs/pkgs/applications/audio/asunder/default.nix52
-rw-r--r--nixpkgs/pkgs/applications/audio/audacious/default.nix71
-rw-r--r--nixpkgs/pkgs/applications/audio/audacious/qt-5.nix92
-rw-r--r--nixpkgs/pkgs/applications/audio/audacity/default.nix66
-rw-r--r--nixpkgs/pkgs/applications/audio/audio-recorder/default.nix44
-rw-r--r--nixpkgs/pkgs/applications/audio/aumix/default.nix30
-rw-r--r--nixpkgs/pkgs/applications/audio/avldrums-lv2/default.nix30
-rw-r--r--nixpkgs/pkgs/applications/audio/axoloti/default.nix101
-rw-r--r--nixpkgs/pkgs/applications/audio/axoloti/dfu-util.nix31
-rw-r--r--nixpkgs/pkgs/applications/audio/axoloti/libusb1.nix38
-rw-r--r--nixpkgs/pkgs/applications/audio/baudline/default.nix70
-rw-r--r--nixpkgs/pkgs/applications/audio/beast/default.nix38
-rw-r--r--nixpkgs/pkgs/applications/audio/beast/patch.patch187
-rw-r--r--nixpkgs/pkgs/applications/audio/bitmeter/default.nix29
-rw-r--r--nixpkgs/pkgs/applications/audio/bitwig-studio/bitwig-studio1.nix98
-rw-r--r--nixpkgs/pkgs/applications/audio/bitwig-studio/bitwig-studio2.nix16
-rw-r--r--nixpkgs/pkgs/applications/audio/bristol/default.nix34
-rw-r--r--nixpkgs/pkgs/applications/audio/bs1770gain/default.nix22
-rw-r--r--nixpkgs/pkgs/applications/audio/cadence/default.nix81
-rw-r--r--nixpkgs/pkgs/applications/audio/calf/default.nix34
-rw-r--r--nixpkgs/pkgs/applications/audio/cantata/default.nix88
-rw-r--r--nixpkgs/pkgs/applications/audio/caps/default.nix30
-rw-r--r--nixpkgs/pkgs/applications/audio/caudec/default.nix38
-rw-r--r--nixpkgs/pkgs/applications/audio/cava/default.nix38
-rw-r--r--nixpkgs/pkgs/applications/audio/cd-discid/default.nix31
-rw-r--r--nixpkgs/pkgs/applications/audio/cdparanoia/default.nix43
-rw-r--r--nixpkgs/pkgs/applications/audio/cdparanoia/fix_private_keyword.patch468
-rw-r--r--nixpkgs/pkgs/applications/audio/cdparanoia/utils.patch68
-rw-r--r--nixpkgs/pkgs/applications/audio/chuck/clang.patch58
-rw-r--r--nixpkgs/pkgs/applications/audio/chuck/darwin-limits.patch13
-rw-r--r--nixpkgs/pkgs/applications/audio/chuck/default.nix43
-rw-r--r--nixpkgs/pkgs/applications/audio/clementine/clementine-spotify-blob-remove-from-build.patch21
-rw-r--r--nixpkgs/pkgs/applications/audio/clementine/clementine-spotify-blob.patch13
-rw-r--r--nixpkgs/pkgs/applications/audio/clementine/default.nix136
-rw-r--r--nixpkgs/pkgs/applications/audio/clerk/default.nix30
-rw-r--r--nixpkgs/pkgs/applications/audio/cmus/default.nix134
-rw-r--r--nixpkgs/pkgs/applications/audio/cmus/option-debugging.patch42
-rw-r--r--nixpkgs/pkgs/applications/audio/cmusfm/default.nix36
-rw-r--r--nixpkgs/pkgs/applications/audio/cozy-audiobooks/default.nix79
-rw-r--r--nixpkgs/pkgs/applications/audio/crip/default.nix67
-rw-r--r--nixpkgs/pkgs/applications/audio/csa/default.nix28
-rw-r--r--nixpkgs/pkgs/applications/audio/csound/csound-qt/default.nix49
-rw-r--r--nixpkgs/pkgs/applications/audio/csound/csound-qt/rtmidipath.patch17
-rw-r--r--nixpkgs/pkgs/applications/audio/csound/default.nix51
-rw-r--r--nixpkgs/pkgs/applications/audio/deadbeef/default.nix100
-rw-r--r--nixpkgs/pkgs/applications/audio/deadbeef/plugins/headerbar-gtk3.nix30
-rw-r--r--nixpkgs/pkgs/applications/audio/deadbeef/plugins/infobar.nix33
-rw-r--r--nixpkgs/pkgs/applications/audio/deadbeef/plugins/mpris2.nix23
-rw-r--r--nixpkgs/pkgs/applications/audio/deadbeef/plugins/opus.nix31
-rw-r--r--nixpkgs/pkgs/applications/audio/deadbeef/wrapper.nix14
-rw-r--r--nixpkgs/pkgs/applications/audio/denemo/default.nix37
-rw-r--r--nixpkgs/pkgs/applications/audio/dfasma/default.nix66
-rw-r--r--nixpkgs/pkgs/applications/audio/dirt/default.nix29
-rw-r--r--nixpkgs/pkgs/applications/audio/distrho/default.nix58
-rw-r--r--nixpkgs/pkgs/applications/audio/dr14_tmeter/default.nix29
-rw-r--r--nixpkgs/pkgs/applications/audio/dragonfly-reverb/default.nix35
-rw-r--r--nixpkgs/pkgs/applications/audio/drumgizmo/default.nix28
-rw-r--r--nixpkgs/pkgs/applications/audio/drumkv1/default.nix23
-rw-r--r--nixpkgs/pkgs/applications/audio/easytag/default.nix41
-rw-r--r--nixpkgs/pkgs/applications/audio/ecasound/default.nix32
-rw-r--r--nixpkgs/pkgs/applications/audio/eflite/default.nix51
-rw-r--r--nixpkgs/pkgs/applications/audio/eflite/format.patch11
-rw-r--r--nixpkgs/pkgs/applications/audio/ekho/default.nix38
-rw-r--r--nixpkgs/pkgs/applications/audio/elisa/default.nix35
-rw-r--r--nixpkgs/pkgs/applications/audio/eq10q/default.nix47
-rw-r--r--nixpkgs/pkgs/applications/audio/espeak-ng/default.nix35
-rw-r--r--nixpkgs/pkgs/applications/audio/espeak/default.nix35
-rw-r--r--nixpkgs/pkgs/applications/audio/espeak/edit.nix60
-rw-r--r--nixpkgs/pkgs/applications/audio/espeak/espeakedit-configurable-path-espeak-data.patch15
-rw-r--r--nixpkgs/pkgs/applications/audio/espeak/espeakedit-configurable-sox-path.patch27
-rw-r--r--nixpkgs/pkgs/applications/audio/espeak/espeakedit-fix-makefile.patch26
-rw-r--r--nixpkgs/pkgs/applications/audio/espeak/espeakedit-gcc6.patch57
-rw-r--r--nixpkgs/pkgs/applications/audio/espeak/gcc6.patch13
-rw-r--r--nixpkgs/pkgs/applications/audio/eteroj.lv2/default.nix24
-rw-r--r--nixpkgs/pkgs/applications/audio/faust/faust1.nix207
-rw-r--r--nixpkgs/pkgs/applications/audio/faust/faust2.nix245
-rw-r--r--nixpkgs/pkgs/applications/audio/faust/faust2alqt.nix15
-rw-r--r--nixpkgs/pkgs/applications/audio/faust/faust2alsa.nix29
-rw-r--r--nixpkgs/pkgs/applications/audio/faust/faust2csound.nix20
-rw-r--r--nixpkgs/pkgs/applications/audio/faust/faust2firefox.nix14
-rw-r--r--nixpkgs/pkgs/applications/audio/faust/faust2jack.nix25
-rw-r--r--nixpkgs/pkgs/applications/audio/faust/faust2jaqt.nix24
-rw-r--r--nixpkgs/pkgs/applications/audio/faust/faust2ladspa.nix12
-rw-r--r--nixpkgs/pkgs/applications/audio/faust/faust2lv2.nix14
-rw-r--r--nixpkgs/pkgs/applications/audio/faust/faustlive.nix35
-rw-r--r--nixpkgs/pkgs/applications/audio/flac/default.nix23
-rw-r--r--nixpkgs/pkgs/applications/audio/flac123/default.nix21
-rw-r--r--nixpkgs/pkgs/applications/audio/flacon/default.nix34
-rw-r--r--nixpkgs/pkgs/applications/audio/fldigi/default.nix23
-rw-r--r--nixpkgs/pkgs/applications/audio/fluidsynth/default.nix48
-rw-r--r--nixpkgs/pkgs/applications/audio/fmit/default.nix53
-rw-r--r--nixpkgs/pkgs/applications/audio/fmsynth/default.nix49
-rw-r--r--nixpkgs/pkgs/applications/audio/fomp/default.nix22
-rw-r--r--nixpkgs/pkgs/applications/audio/foo-yc20/default.nix29
-rw-r--r--nixpkgs/pkgs/applications/audio/freewheeling/am_path_sdl.patch40
-rw-r--r--nixpkgs/pkgs/applications/audio/freewheeling/default.nix51
-rw-r--r--nixpkgs/pkgs/applications/audio/freewheeling/xml.patch13
-rw-r--r--nixpkgs/pkgs/applications/audio/game-music-emu/default.nix21
-rw-r--r--nixpkgs/pkgs/applications/audio/gbsplay/default.nix28
-rw-r--r--nixpkgs/pkgs/applications/audio/gigedit/default.nix31
-rw-r--r--nixpkgs/pkgs/applications/audio/gigedit/gigedit-1.1.0-pangomm-2.40.1.patch15
-rw-r--r--nixpkgs/pkgs/applications/audio/gjay/default.nix25
-rw-r--r--nixpkgs/pkgs/applications/audio/gmpc/default.nix40
-rw-r--r--nixpkgs/pkgs/applications/audio/gmpc/libmpd-11.8.17-remove-strndup.patch15
-rw-r--r--nixpkgs/pkgs/applications/audio/gmu/default.nix31
-rw-r--r--nixpkgs/pkgs/applications/audio/gnaural/default.nix19
-rw-r--r--nixpkgs/pkgs/applications/audio/gnome-podcasts/default.nix44
-rw-r--r--nixpkgs/pkgs/applications/audio/google-musicmanager/default.nix77
-rw-r--r--nixpkgs/pkgs/applications/audio/google-play-music-desktop-player/default.nix80
-rw-r--r--nixpkgs/pkgs/applications/audio/gpodder/default.nix77
-rw-r--r--nixpkgs/pkgs/applications/audio/gradio/0001-Remove-post-install-script-that-hardcodes-paths.patch23
-rw-r--r--nixpkgs/pkgs/applications/audio/gradio/default.nix71
-rw-r--r--nixpkgs/pkgs/applications/audio/greg/default.nix26
-rw-r--r--nixpkgs/pkgs/applications/audio/gtklick/default.nix34
-rw-r--r--nixpkgs/pkgs/applications/audio/gtkpod/default.nix34
-rw-r--r--nixpkgs/pkgs/applications/audio/guitarix/default.nix70
-rw-r--r--nixpkgs/pkgs/applications/audio/gxplugins-lv2/default.nix29
-rw-r--r--nixpkgs/pkgs/applications/audio/helm/default.nix60
-rw-r--r--nixpkgs/pkgs/applications/audio/hybridreverb2/default.nix49
-rw-r--r--nixpkgs/pkgs/applications/audio/hydrogen/default.nix25
-rw-r--r--nixpkgs/pkgs/applications/audio/i-score/default.nix85
-rw-r--r--nixpkgs/pkgs/applications/audio/iannix/default.nix30
-rw-r--r--nixpkgs/pkgs/applications/audio/id3v2/default.nix28
-rw-r--r--nixpkgs/pkgs/applications/audio/infamousPlugins/default.nix37
-rw-r--r--nixpkgs/pkgs/applications/audio/ingen/default.nix45
-rw-r--r--nixpkgs/pkgs/applications/audio/ir.lv2/default.nix36
-rw-r--r--nixpkgs/pkgs/applications/audio/jaaa/default.nix32
-rw-r--r--nixpkgs/pkgs/applications/audio/jack-capture/default.nix31
-rw-r--r--nixpkgs/pkgs/applications/audio/jack-oscrolloscope/default.nix27
-rw-r--r--nixpkgs/pkgs/applications/audio/jack-rack/default.nix29
-rw-r--r--nixpkgs/pkgs/applications/audio/jackmeter/default.nix21
-rw-r--r--nixpkgs/pkgs/applications/audio/jackmix/default.nix31
-rw-r--r--nixpkgs/pkgs/applications/audio/jackmix/no_error.patch13
-rw-r--r--nixpkgs/pkgs/applications/audio/jalv/default.nix25
-rw-r--r--nixpkgs/pkgs/applications/audio/jamin/default.nix28
-rw-r--r--nixpkgs/pkgs/applications/audio/japa/default.nix30
-rw-r--r--nixpkgs/pkgs/applications/audio/keyfinder-cli/default.nix31
-rw-r--r--nixpkgs/pkgs/applications/audio/keyfinder/default.nix41
-rw-r--r--nixpkgs/pkgs/applications/audio/kid3/default.nix75
-rw-r--r--nixpkgs/pkgs/applications/audio/klick/default.nix24
-rw-r--r--nixpkgs/pkgs/applications/audio/ladspa-plugins/default.nix30
-rw-r--r--nixpkgs/pkgs/applications/audio/ladspa-sdk/default.nix28
-rw-r--r--nixpkgs/pkgs/applications/audio/ladspa-sdk/ladspah.nix26
-rw-r--r--nixpkgs/pkgs/applications/audio/lash/default.nix43
-rw-r--r--nixpkgs/pkgs/applications/audio/lash/gcc-47.patch11
-rw-r--r--nixpkgs/pkgs/applications/audio/lash/socket.patch16
-rw-r--r--nixpkgs/pkgs/applications/audio/lastfmsubmitd/default.nix21
-rw-r--r--nixpkgs/pkgs/applications/audio/lastwatch/default.nix25
-rw-r--r--nixpkgs/pkgs/applications/audio/lingot/default.nix25
-rw-r--r--nixpkgs/pkgs/applications/audio/linuxband/default.nix37
-rw-r--r--nixpkgs/pkgs/applications/audio/linuxsampler/default.nix41
-rw-r--r--nixpkgs/pkgs/applications/audio/lmms/default.nix49
-rw-r--r--nixpkgs/pkgs/applications/audio/lollypop/default.nix70
-rw-r--r--nixpkgs/pkgs/applications/audio/lsp-plugins/default.nix160
-rw-r--r--nixpkgs/pkgs/applications/audio/ltc-tools/default.nix25
-rw-r--r--nixpkgs/pkgs/applications/audio/luppp/build-install.patch16
-rw-r--r--nixpkgs/pkgs/applications/audio/luppp/default.nix40
-rw-r--r--nixpkgs/pkgs/applications/audio/lv2bm/default.nix28
-rw-r--r--nixpkgs/pkgs/applications/audio/magnetophonDSP/CharacterCompressor/default.nix37
-rw-r--r--nixpkgs/pkgs/applications/audio/magnetophonDSP/CompBus/default.nix43
-rw-r--r--nixpkgs/pkgs/applications/audio/magnetophonDSP/ConstantDetuneChorus/default.nix33
-rw-r--r--nixpkgs/pkgs/applications/audio/magnetophonDSP/LazyLimiter/default.nix33
-rw-r--r--nixpkgs/pkgs/applications/audio/magnetophonDSP/MBdistortion/default.nix33
-rw-r--r--nixpkgs/pkgs/applications/audio/magnetophonDSP/RhythmDelay/default.nix33
-rw-r--r--nixpkgs/pkgs/applications/audio/magnetophonDSP/VoiceOfFaust/default.nix56
-rw-r--r--nixpkgs/pkgs/applications/audio/magnetophonDSP/faustCompressors/default.nix46
-rw-r--r--nixpkgs/pkgs/applications/audio/magnetophonDSP/pluginUtils/default.nix40
-rw-r--r--nixpkgs/pkgs/applications/audio/magnetophonDSP/shelfMultiBand/default.nix37
-rw-r--r--nixpkgs/pkgs/applications/audio/mda-lv2/default.nix22
-rw-r--r--nixpkgs/pkgs/applications/audio/meterbridge/buf_rect.patch12
-rw-r--r--nixpkgs/pkgs/applications/audio/meterbridge/default.nix26
-rw-r--r--nixpkgs/pkgs/applications/audio/meterbridge/fix_build_with_gcc-5.patch31
-rw-r--r--nixpkgs/pkgs/applications/audio/meters_lv2/default.nix48
-rw-r--r--nixpkgs/pkgs/applications/audio/mhwaveedit/default.nix39
-rw-r--r--nixpkgs/pkgs/applications/audio/mi2ly/default.nix41
-rw-r--r--nixpkgs/pkgs/applications/audio/mi2ly/default.upstream3
-rw-r--r--nixpkgs/pkgs/applications/audio/mid2key/default.nix26
-rw-r--r--nixpkgs/pkgs/applications/audio/midas/generic.nix43
-rw-r--r--nixpkgs/pkgs/applications/audio/midas/m32edit.nix9
-rw-r--r--nixpkgs/pkgs/applications/audio/midas/x32edit.nix9
-rw-r--r--nixpkgs/pkgs/applications/audio/midisheetmusic/default.nix60
-rw-r--r--nixpkgs/pkgs/applications/audio/mikmod/default.nix20
-rw-r--r--nixpkgs/pkgs/applications/audio/milkytracker/default.nix26
-rw-r--r--nixpkgs/pkgs/applications/audio/mimic/default.nix35
-rw-r--r--nixpkgs/pkgs/applications/audio/mimms/default.nix31
-rw-r--r--nixpkgs/pkgs/applications/audio/minimodem/default.nix42
-rw-r--r--nixpkgs/pkgs/applications/audio/mixxx/default.nix47
-rw-r--r--nixpkgs/pkgs/applications/audio/moc/default.nix29
-rw-r--r--nixpkgs/pkgs/applications/audio/mod-distortion/default.nix25
-rw-r--r--nixpkgs/pkgs/applications/audio/monkeys-audio/buildfix.diff49
-rw-r--r--nixpkgs/pkgs/applications/audio/monkeys-audio/default.nix19
-rw-r--r--nixpkgs/pkgs/applications/audio/mopidy/default.nix44
-rw-r--r--nixpkgs/pkgs/applications/audio/mopidy/gmusic.nix28
-rw-r--r--nixpkgs/pkgs/applications/audio/mopidy/iris.nix34
-rw-r--r--nixpkgs/pkgs/applications/audio/mopidy/local-images.nix32
-rw-r--r--nixpkgs/pkgs/applications/audio/mopidy/local-sqlite.nix25
-rw-r--r--nixpkgs/pkgs/applications/audio/mopidy/moped.nix26
-rw-r--r--nixpkgs/pkgs/applications/audio/mopidy/mopify.nix23
-rw-r--r--nixpkgs/pkgs/applications/audio/mopidy/musicbox-webclient.nix23
-rw-r--r--nixpkgs/pkgs/applications/audio/mopidy/soundcloud.nix23
-rw-r--r--nixpkgs/pkgs/applications/audio/mopidy/spotify-tunigo.nix23
-rw-r--r--nixpkgs/pkgs/applications/audio/mopidy/spotify.nix23
-rw-r--r--nixpkgs/pkgs/applications/audio/mopidy/youtube.nix23
-rw-r--r--nixpkgs/pkgs/applications/audio/mp3blaster/default.nix30
-rw-r--r--nixpkgs/pkgs/applications/audio/mp3gain/default.nix27
-rw-r--r--nixpkgs/pkgs/applications/audio/mp3info/default.nix45
-rw-r--r--nixpkgs/pkgs/applications/audio/mp3splt/default.nix27
-rw-r--r--nixpkgs/pkgs/applications/audio/mp3val/default.nix37
-rw-r--r--nixpkgs/pkgs/applications/audio/mpc/default.nix27
-rw-r--r--nixpkgs/pkgs/applications/audio/mpc123/default.nix32
-rw-r--r--nixpkgs/pkgs/applications/audio/mpc123/use-gcc.patch13
-rw-r--r--nixpkgs/pkgs/applications/audio/mpg123/default.nix26
-rw-r--r--nixpkgs/pkgs/applications/audio/mpg321/default.nix35
-rw-r--r--nixpkgs/pkgs/applications/audio/muse/default.nix76
-rw-r--r--nixpkgs/pkgs/applications/audio/musescore/darwin.nix34
-rw-r--r--nixpkgs/pkgs/applications/audio/musescore/default.nix40
-rw-r--r--nixpkgs/pkgs/applications/audio/musescore/remove_qtwebengine_install_hack.patch25
-rw-r--r--nixpkgs/pkgs/applications/audio/ncmpc/default.nix25
-rw-r--r--nixpkgs/pkgs/applications/audio/ncmpcpp/default.nix41
-rw-r--r--nixpkgs/pkgs/applications/audio/ncpamixer/default.nix33
-rw-r--r--nixpkgs/pkgs/applications/audio/non/default.nix27
-rw-r--r--nixpkgs/pkgs/applications/audio/normalize/default.nix20
-rw-r--r--nixpkgs/pkgs/applications/audio/nova-filters/default.nix31
-rw-r--r--nixpkgs/pkgs/applications/audio/openmpt123/default.nix30
-rw-r--r--nixpkgs/pkgs/applications/audio/opus-tools/default.nix20
-rw-r--r--nixpkgs/pkgs/applications/audio/opusfile/default.nix23
-rw-r--r--nixpkgs/pkgs/applications/audio/opusfile/include-multistream.patch12
-rw-r--r--nixpkgs/pkgs/applications/audio/padthv1/default.nix23
-rw-r--r--nixpkgs/pkgs/applications/audio/pamix/default.nix30
-rw-r--r--nixpkgs/pkgs/applications/audio/pamixer/default.nix42
-rw-r--r--nixpkgs/pkgs/applications/audio/paprefs/default.nix30
-rw-r--r--nixpkgs/pkgs/applications/audio/patchage/default.nix26
-rw-r--r--nixpkgs/pkgs/applications/audio/pavucontrol/default.nix41
-rw-r--r--nixpkgs/pkgs/applications/audio/pd-plugins/cyclone/default.nix33
-rw-r--r--nixpkgs/pkgs/applications/audio/pd-plugins/helmholtz/default.nix46
-rw-r--r--nixpkgs/pkgs/applications/audio/pd-plugins/maxlib/default.nix33
-rw-r--r--nixpkgs/pkgs/applications/audio/pd-plugins/mrpeach/default.nix62
-rw-r--r--nixpkgs/pkgs/applications/audio/pd-plugins/puremapping/default.nix31
-rw-r--r--nixpkgs/pkgs/applications/audio/pd-plugins/timbreid/default.nix45
-rw-r--r--nixpkgs/pkgs/applications/audio/pd-plugins/zexy/default.nix36
-rw-r--r--nixpkgs/pkgs/applications/audio/petrifoo/default.nix27
-rw-r--r--nixpkgs/pkgs/applications/audio/pianobar/default.nix27
-rw-r--r--nixpkgs/pkgs/applications/audio/pianobooster/default.nix34
-rw-r--r--nixpkgs/pkgs/applications/audio/pianobooster/pianobooster-0.6.4b-cmake-gcc4.7.patch11
-rw-r--r--nixpkgs/pkgs/applications/audio/pianobooster/pianobooster-0.6.4b-cmake.patch44
-rw-r--r--nixpkgs/pkgs/applications/audio/picard/default.nix41
-rw-r--r--nixpkgs/pkgs/applications/audio/pithos/default.nix40
-rw-r--r--nixpkgs/pkgs/applications/audio/playbar2/default.nix37
-rw-r--r--nixpkgs/pkgs/applications/audio/plugin-torture/default.nix30
-rw-r--r--nixpkgs/pkgs/applications/audio/pmidi/default.nix21
-rw-r--r--nixpkgs/pkgs/applications/audio/ponymix/default.nix26
-rw-r--r--nixpkgs/pkgs/applications/audio/praat/default.nix30
-rw-r--r--nixpkgs/pkgs/applications/audio/projectm/default.nix57
-rw-r--r--nixpkgs/pkgs/applications/audio/puddletag/default.nix37
-rw-r--r--nixpkgs/pkgs/applications/audio/pulseaudio-ctl/default.nix41
-rw-r--r--nixpkgs/pkgs/applications/audio/pulseaudio-dlna/default.nix50
-rw-r--r--nixpkgs/pkgs/applications/audio/pulseaudio-modules-bt/default.nix82
-rw-r--r--nixpkgs/pkgs/applications/audio/pulseaudio-modules-bt/fix-install-path.patch20
-rw-r--r--nixpkgs/pkgs/applications/audio/pulseeffects/default.nix111
-rw-r--r--nixpkgs/pkgs/applications/audio/puredata/default.nix38
-rw-r--r--nixpkgs/pkgs/applications/audio/puredata/wrapper.nix16
-rw-r--r--nixpkgs/pkgs/applications/audio/qjackctl/default.nix34
-rw-r--r--nixpkgs/pkgs/applications/audio/qmidinet/default.nix25
-rw-r--r--nixpkgs/pkgs/applications/audio/qmidiroute/default.nix30
-rw-r--r--nixpkgs/pkgs/applications/audio/qmmp/default.nix64
-rw-r--r--nixpkgs/pkgs/applications/audio/qsampler/default.nix27
-rw-r--r--nixpkgs/pkgs/applications/audio/qsynth/default.nix31
-rw-r--r--nixpkgs/pkgs/applications/audio/qtractor/default.nix29
-rw-r--r--nixpkgs/pkgs/applications/audio/qtscrobbler/default.nix34
-rw-r--r--nixpkgs/pkgs/applications/audio/quodlibet/default.nix69
-rw-r--r--nixpkgs/pkgs/applications/audio/radiotray-ng/default.nix98
-rw-r--r--nixpkgs/pkgs/applications/audio/rakarrack/default.nix27
-rw-r--r--nixpkgs/pkgs/applications/audio/rakarrack/fltk-path.patch35
-rw-r--r--nixpkgs/pkgs/applications/audio/reaper/default.nix60
-rw-r--r--nixpkgs/pkgs/applications/audio/redoflacs/default.nix39
-rw-r--r--nixpkgs/pkgs/applications/audio/renoise/default.nix74
-rw-r--r--nixpkgs/pkgs/applications/audio/rhvoice/default.nix40
-rw-r--r--nixpkgs/pkgs/applications/audio/rhvoice/honor_nix_environment.patch14
-rw-r--r--nixpkgs/pkgs/applications/audio/rhythmbox/default.nix75
-rw-r--r--nixpkgs/pkgs/applications/audio/rkrlv2/default.nix26
-rw-r--r--nixpkgs/pkgs/applications/audio/rosegarden/default.nix52
-rw-r--r--nixpkgs/pkgs/applications/audio/rubyripper/default.nix23
-rw-r--r--nixpkgs/pkgs/applications/audio/samplv1/default.nix23
-rw-r--r--nixpkgs/pkgs/applications/audio/sayonara/default.nix45
-rw-r--r--nixpkgs/pkgs/applications/audio/schismtracker/default.nix30
-rw-r--r--nixpkgs/pkgs/applications/audio/seq24/default.nix24
-rw-r--r--nixpkgs/pkgs/applications/audio/seq24/mutex_no_nameclash.patch58
-rw-r--r--nixpkgs/pkgs/applications/audio/setbfree/default.nix33
-rw-r--r--nixpkgs/pkgs/applications/audio/sfxr-qt/default.nix36
-rw-r--r--nixpkgs/pkgs/applications/audio/shntool/default.nix21
-rw-r--r--nixpkgs/pkgs/applications/audio/sidplayfp/default.nix22
-rw-r--r--nixpkgs/pkgs/applications/audio/sisco.lv2/default.nix44
-rw-r--r--nixpkgs/pkgs/applications/audio/snapcast/default.nix66
-rw-r--r--nixpkgs/pkgs/applications/audio/snd/default.nix30
-rw-r--r--nixpkgs/pkgs/applications/audio/sonata/default.nix69
-rw-r--r--nixpkgs/pkgs/applications/audio/sonic-pi/default.nix99
-rw-r--r--nixpkgs/pkgs/applications/audio/sonic-visualiser/default.nix56
-rw-r--r--nixpkgs/pkgs/applications/audio/sooperlooper/default.nix45
-rw-r--r--nixpkgs/pkgs/applications/audio/sorcer/default.nix29
-rw-r--r--nixpkgs/pkgs/applications/audio/sound-juicer/default.nix41
-rw-r--r--nixpkgs/pkgs/applications/audio/soundscape-renderer/default.nix54
-rw-r--r--nixpkgs/pkgs/applications/audio/spectmorph/default.nix22
-rw-r--r--nixpkgs/pkgs/applications/audio/spectrojack/default.nix31
-rw-r--r--nixpkgs/pkgs/applications/audio/spek/default.nix27
-rw-r--r--nixpkgs/pkgs/applications/audio/split2flac/default.nix62
-rw-r--r--nixpkgs/pkgs/applications/audio/spotify/default.nix160
-rwxr-xr-xnixpkgs/pkgs/applications/audio/spotify/update.sh96
-rw-r--r--nixpkgs/pkgs/applications/audio/spotifywm/default.nix31
-rw-r--r--nixpkgs/pkgs/applications/audio/squeezelite/default.nix26
-rw-r--r--nixpkgs/pkgs/applications/audio/squishyball/default.nix50
-rw-r--r--nixpkgs/pkgs/applications/audio/squishyball/gnu-screen.patch20
-rw-r--r--nixpkgs/pkgs/applications/audio/ssrc/default.nix42
-rw-r--r--nixpkgs/pkgs/applications/audio/streamripper/default.nix21
-rw-r--r--nixpkgs/pkgs/applications/audio/sunvox/default.nix48
-rw-r--r--nixpkgs/pkgs/applications/audio/svox/default.nix43
-rw-r--r--nixpkgs/pkgs/applications/audio/swh-lv2/default.nix37
-rw-r--r--nixpkgs/pkgs/applications/audio/synthv1/default.nix23
-rw-r--r--nixpkgs/pkgs/applications/audio/tambura/default.nix34
-rw-r--r--nixpkgs/pkgs/applications/audio/tetraproc/default.nix43
-rw-r--r--nixpkgs/pkgs/applications/audio/timemachine/default.nix34
-rw-r--r--nixpkgs/pkgs/applications/audio/tomahawk/default.nix56
-rw-r--r--nixpkgs/pkgs/applications/audio/transcode/default.nix27
-rw-r--r--nixpkgs/pkgs/applications/audio/transcribe/default.nix72
-rw-r--r--nixpkgs/pkgs/applications/audio/traverso/default.nix31
-rw-r--r--nixpkgs/pkgs/applications/audio/uade123/default.nix24
-rw-r--r--nixpkgs/pkgs/applications/audio/vcv-rack/default.nix80
-rw-r--r--nixpkgs/pkgs/applications/audio/vimpc/default.nix30
-rw-r--r--nixpkgs/pkgs/applications/audio/vkeybd/default.nix32
-rw-r--r--nixpkgs/pkgs/applications/audio/vmpk/default.nix25
-rw-r--r--nixpkgs/pkgs/applications/audio/vocal/default.nix53
-rw-r--r--nixpkgs/pkgs/applications/audio/vorbis-tools/default.nix37
-rw-r--r--nixpkgs/pkgs/applications/audio/wavegain/default.nix24
-rw-r--r--nixpkgs/pkgs/applications/audio/whipper/default.nix51
-rw-r--r--nixpkgs/pkgs/applications/audio/whipper/paths.patch32
-rw-r--r--nixpkgs/pkgs/applications/audio/wolf-shaper/default.nix47
-rw-r--r--nixpkgs/pkgs/applications/audio/x42-plugins/default.nix39
-rw-r--r--nixpkgs/pkgs/applications/audio/xmp/default.nix20
-rw-r--r--nixpkgs/pkgs/applications/audio/xsynth-dssi/default.nix37
-rw-r--r--nixpkgs/pkgs/applications/audio/yasr/10_fix_openpty_forkpty_declarations25
-rw-r--r--nixpkgs/pkgs/applications/audio/yasr/20_maxpathlen11
-rw-r--r--nixpkgs/pkgs/applications/audio/yasr/30_conf18
-rw-r--r--nixpkgs/pkgs/applications/audio/yasr/40_dectalk_extended_chars14
-rw-r--r--nixpkgs/pkgs/applications/audio/yasr/default.nix28
-rw-r--r--nixpkgs/pkgs/applications/audio/ympd/default.nix24
-rw-r--r--nixpkgs/pkgs/applications/audio/yoshimi/default.nix44
-rw-r--r--nixpkgs/pkgs/applications/audio/zam-plugins/default.nix32
-rw-r--r--nixpkgs/pkgs/applications/audio/zita-njbridge/default.nix32
-rw-r--r--nixpkgs/pkgs/applications/audio/zynaddsubfx/default.nix30
362 files changed, 14897 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/applications/audio/AMB-plugins/default.nix b/nixpkgs/pkgs/applications/audio/AMB-plugins/default.nix
new file mode 100644
index 000000000000..3ea7b90f84a7
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/AMB-plugins/default.nix
@@ -0,0 +1,33 @@
+{ stdenv, fetchurl, ladspaH
+}:
+
+stdenv.mkDerivation rec {
+  name = "AMB-plugins-${version}";
+  version = "0.8.1";
+  src = fetchurl {
+    url = "http://kokkinizita.linuxaudio.org/linuxaudio/downloads/${name}.tar.bz2";
+    sha256 = "0x4blm4visjqj0ndqr0cg776v3b7lvplpc8cgi9n51llhavn0jpl";
+  };
+
+  buildInputs = [ ladspaH ];
+
+  patchPhase = ''
+    sed -i 's@/usr/bin/install@install@g' Makefile
+    sed -i 's@/bin/rm@rm@g' Makefile
+    sed -i 's@/usr/lib/ladspa@$(out)/lib/ladspa@g' Makefile
+  '';
+
+  preInstall="mkdir -p $out/lib/ladspa";
+
+  meta = {
+    description = ''A set of ambisonics ladspa plugins'';
+    longDescription = ''
+      Mono and stereo to B-format panning, horizontal rotator, square, hexagon and cube decoders.
+    '';
+    version = "${version}";
+    homepage = http://kokkinizita.linuxaudio.org/linuxaudio/ladspa/index.html;
+    license = stdenv.lib.licenses.gpl2Plus;
+    maintainers = [ stdenv.lib.maintainers.magnetophon ];
+    platforms = stdenv.lib.platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/FIL-plugins/default.nix b/nixpkgs/pkgs/applications/audio/FIL-plugins/default.nix
new file mode 100644
index 000000000000..b9322c37df00
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/FIL-plugins/default.nix
@@ -0,0 +1,37 @@
+{ stdenv, fetchurl, ladspaH
+}:
+
+stdenv.mkDerivation rec {
+  name = "FIL-plugins-${version}";
+  version = "0.3.0";
+  src = fetchurl {
+    url = "http://kokkinizita.linuxaudio.org/linuxaudio/downloads/${name}.tar.bz2";
+    sha256 = "1scfv9j7jrp50r565haa4rvxn1vk2ss86xssl5qgcr8r45qz42qw";
+  };
+
+  buildInputs = [ ladspaH ];
+
+  patchPhase = ''
+    sed -i 's@/usr/bin/install@install@g' Makefile
+    sed -i 's@/bin/rm@rm@g' Makefile
+    sed -i 's@/usr/lib/ladspa@$(out)/lib/ladspa@g' Makefile
+  '';
+
+  preInstall="mkdir -p $out/lib/ladspa";
+
+  meta = {
+    description = ''a four-band parametric equaliser, which has the nice property of being stable even while parameters are being changed'';
+    longDescription = ''
+      Each section has an active/bypass switch, frequency, bandwidth and gain controls.
+      There is also a global bypass switch and gain control.
+      The 2nd order resonant filters are implemented using a Mitra-Regalia style lattice filter.
+      All switches and controls are internally smoothed, so they can be used 'live' whithout any clicks or zipper noises.
+      This should make this plugin a good candidate for use in systems that allow automation of plugin control ports, such as Ardour, or for stage use.
+    '';
+    version = "${version}";
+    homepage = http://kokkinizita.linuxaudio.org/linuxaudio/ladspa/index.html;
+    license = stdenv.lib.licenses.gpl2Plus;
+    maintainers = [ stdenv.lib.maintainers.magnetophon ];
+    platforms = stdenv.lib.platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/MMA/default.nix b/nixpkgs/pkgs/applications/audio/MMA/default.nix
new file mode 100644
index 000000000000..ed7a8481f693
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/MMA/default.nix
@@ -0,0 +1,68 @@
+{ stdenv, fetchurl, makeWrapper, python3, alsaUtils, timidity }:
+
+  stdenv.mkDerivation rec {
+  version = "16.06";
+  name = "mma-${version}";
+
+  src = fetchurl {
+    url = "https://www.mellowood.ca/mma/mma-bin-${version}.tar.gz";
+    sha256 = "1g4gvc0nr0qjc0fyqrnx037zpaasgymgmrm5s7cdxqnld9wqw8ww";
+  };
+
+  buildInputs = [ makeWrapper python3 alsaUtils timidity ];
+
+  patchPhase = ''
+    sed -i 's@/usr/bin/aplaymidi@/${alsaUtils}/bin/aplaymidi@g' mma-splitrec
+    sed -i 's@/usr/bin/aplaymidi@/${alsaUtils}/bin/aplaymidi@g' util/mma-splitrec.py
+    sed -i 's@/usr/bin/arecord@/${alsaUtils}/bin/arecord@g' mma-splitrec
+    sed -i 's@/usr/bin/arecord@/${alsaUtils}/bin/arecord@g' util/mma-splitrec.py
+    sed -i 's@/usr/bin/timidity@/${timidity}/bin/timidity@g' mma-splitrec
+    sed -i 's@/usr/bin/timidity@/${timidity}/bin/timidity@g' util/mma-splitrec.py
+    find . -type f | xargs sed -i 's@/usr/bin/env python@${python3.interpreter}@g'
+  '';
+
+  installPhase = ''
+    mkdir -p $out/{bin,share/mma,share/man/man1,share/man/man8}
+    mkdir -p $out/etc
+
+    cp mma.py $out/bin/mma
+    cp mma-gb $out/bin/mma-gb
+    cp mma-libdoc $out/bin/mma-libdoc
+    cp mma-renum $out/bin/mma-renum
+    cp mma-splitrec $out/bin/mma-splitrec
+    cp util/mma-mnx.py $out/bin/mma-mnx
+    cp util/mma-rm2std.py $out/bin/mma-rm2std
+    cp util/mmatabs.py $out/bin/mmatabs
+    cp util/mup2mma.py $out/bin/mup2mma
+    cp util/pg2mma.py $out/bin/pg2mma
+    cp util/synthsplit.py $out/bin/mma-synthsplit
+    cp -r {docs,egs,includes,lib,MMA,text} $out/share/mma
+    rmdir $out/share/mma/includes/aria
+
+    cp util/README.* $out/share/mma/docs
+    mv $out/share/mma/docs/man/mma-libdoc.8 $out/share/man/man8
+    mv $out/share/mma/docs/man/mma-renum.1 $out/share/man/man1
+    mv $out/share/mma/docs/man/mma.1 $out/share/man/man1
+    mv $out/share/mma/docs/man/mma-gb.1 $out/share/man/man1
+    rm -rf $out/share/mma/docs/man
+    find $out -type f | xargs sed -i "s@/usr/share/mma@$out/share/mma@g"
+  '';
+
+  preFixup = ''
+    PYTHONPATH=$out/share/mma/:$PYTHONPATH
+    for f in $out/bin/*; do
+          wrapProgram $f \
+           --prefix PYTHONPATH : $PYTHONPATH
+    done
+    cd $out/share/mma/
+    $out/bin/mma -G
+  '';
+
+  meta = {
+    description = "Creates MIDI tracks for a soloist to perform over from a user supplied file containing chords";
+    homepage =  http://www.mellowood.ca/mma/index.html;
+    license = stdenv.lib.licenses.gpl2;
+    maintainers = [ stdenv.lib.maintainers.magnetophon ];
+    platforms = stdenv.lib.platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/a2jmidid/default.nix b/nixpkgs/pkgs/applications/audio/a2jmidid/default.nix
new file mode 100644
index 000000000000..70709ae4ac4c
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/a2jmidid/default.nix
@@ -0,0 +1,40 @@
+{ stdenv, fetchurl, fetchpatch, makeWrapper, pkgconfig, alsaLib, dbus, libjack2
+, wafHook
+, python2Packages}:
+
+let
+  inherit (python2Packages) python dbus-python;
+in stdenv.mkDerivation rec {
+  name = "a2jmidid-${version}";
+  version = "8";
+
+  src = fetchurl {
+    url = "https://repo.or.cz/a2jmidid.git/snapshot/7383d268c4bfe85df9f10df6351677659211d1ca.tar.gz";
+    sha256 = "06dgf5655znbvrd7fhrv8msv6zw8vk0hjqglcqkh90960mnnmwz7";
+  };
+
+  nativeBuildInputs = [ pkgconfig makeWrapper wafHook ];
+  buildInputs = [ alsaLib dbus libjack2 python dbus-python ];
+
+  patches = [
+    (fetchpatch {
+      url = https://repo.or.cz/a2jmidid.git/patch/24e3b8e543256ae8fdfb4b75eb9fd775f07c46e2;
+      sha256 = "1nxrvnhxlgqc9wbxnp1gnpw4wjyzxvymwcg1gh2nqzmssgfykfkc";
+    })
+    (fetchpatch {
+      url = https://repo.or.cz/a2jmidid.git/patch/7f82da7eb2f540a94db23331be98d42a58ddc269;
+      sha256 = "1nab9zf0agbcj5pvhl90pz0cx1d204d4janqflc5ymjhy8jyrsdv";
+    })
+  ];
+
+  postInstall = ''
+    wrapProgram $out/bin/a2j_control --set PYTHONPATH $PYTHONPATH
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Daemon for exposing legacy ALSA sequencer applications in JACK MIDI system";
+    license = licenses.gpl2;
+    maintainers = [ maintainers.goibhniu ];
+    platforms = [ "i686-linux" "x86_64-linux" ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/aacgain/default.nix b/nixpkgs/pkgs/applications/audio/aacgain/default.nix
new file mode 100644
index 000000000000..32ae107ed9cb
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/aacgain/default.nix
@@ -0,0 +1,63 @@
+{ stdenv, fetchFromGitHub, fetchpatch }:
+
+stdenv.mkDerivation {
+  name = "aacgain-1.9.0";
+
+  src = fetchFromGitHub {
+    owner = "mulx";
+    repo = "aacgain";
+    rev = "7c29dccd878ade1301710959aeebe87a8f0828f5";
+    sha256 = "07hl432vsscqg01b6wr99qmsj4gbx0i02x4k565432y6zpfmaxm0";
+  };
+
+  hardeningDisable = [ "format" ];
+
+  postPatch = ''
+    (
+      cd mp4v2
+      patch -p0 < ${fetchpatch {
+        name = "fix_missing_ptr_deref.patch";
+        url = "https://aur.archlinux.org/cgit/aur.git/plain/fix_missing_ptr_deref.patch?h=aacgain-cvs&id=e1a19c920f57063e64bab75cb0d8624731f6e3d7";
+        sha256 = "1cq7r005nvmwdjb25z80grcam7jv6k57jnl2bh349mg3ajmslbq9";
+      }}
+    )
+  '';
+
+  configurePhase = ''
+    runHook preConfigure
+    cd mp4v2
+    ./configure
+
+    cd ../faad2
+    ./configure
+
+    cd ..
+    ./configure
+    runHook postConfigure
+  '';
+
+  buildPhase = ''
+    runHook preBuild
+    cd mp4v2
+    make libmp4v2.la
+
+    cd ../faad2
+    make LDFLAGS=-static
+
+    cd ..
+    make
+    runHook postBuild
+  '';
+
+  installPhase = ''
+    install -D aacgain/aacgain "$out/bin/aacgain"
+  '';
+
+  meta = with stdenv.lib; {
+    description = "ReplayGain for AAC files";
+    homepage = https://github.com/mulx/aacgain;
+    license = licenses.gpl2;
+    platforms = platforms.linux;
+    maintainers = [ maintainers.robbinch ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/abcde/default.nix b/nixpkgs/pkgs/applications/audio/abcde/default.nix
new file mode 100644
index 000000000000..240729811352
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/abcde/default.nix
@@ -0,0 +1,60 @@
+{ stdenv, fetchurl, libcdio-paranoia, cddiscid, wget, which, vorbis-tools, id3v2, eyeD3
+, lame, flac, glyr
+, perlPackages
+, makeWrapper }:
+
+let version = "2.9.2";
+in
+  stdenv.mkDerivation {
+    name = "abcde-${version}";
+    src = fetchurl {
+      url = "https://abcde.einval.com/download/abcde-${version}.tar.gz";
+      sha256 = "13c5yvp87ckqgha160ym5rdr1a4divgvyqbjh0yb6ffclip6qd9l";
+    };
+
+    # FIXME: This package does not support `distmp3', `eject', etc.
+
+    configurePhase = ''
+      sed -i "s|^[[:blank:]]*prefix *=.*$|prefix = $out|g ;
+              s|^[[:blank:]]*etcdir *=.*$|etcdir = $out/etc|g ;
+              s|^[[:blank:]]*INSTALL *=.*$|INSTALL = install -c|g" \
+        "Makefile";
+
+      echo 'CDPARANOIA=${libcdio-paranoia}/bin/cd-paranoia' >>abcde.conf
+      echo CDROMREADERSYNTAX=cdparanoia >>abcde.conf
+
+      substituteInPlace "abcde" \
+        --replace "/etc/abcde.conf" "$out/etc/abcde.conf"
+    '';
+
+    nativeBuildInputs = [ makeWrapper ];
+
+    buildInputs = with perlPackages; [ perl MusicBrainz MusicBrainzDiscID ];
+
+    installFlags = [ "sysconfdir=$(out)/etc" ];
+
+    postFixup = ''
+      for cmd in abcde cddb-tool abcde-musicbrainz-tool; do
+        wrapProgram "$out/bin/$cmd" \
+          --prefix PERL5LIB : "$PERL5LIB" \
+          --prefix PATH ":" ${stdenv.lib.makeBinPath [
+            "$out" which libcdio-paranoia cddiscid wget
+            vorbis-tools id3v2 eyeD3 lame flac glyr
+          ]}
+      done
+    '';
+
+    meta = with stdenv.lib; {
+      homepage = http://abcde.einval.com/wiki/;
+      license = licenses.gpl2Plus;
+      maintainers = with maintainers; [ gebner ];
+      description = "Command-line audio CD ripper";
+      longDescription = ''
+        abcde is a front-end command-line utility (actually, a shell
+        script) that grabs tracks off a CD, encodes them to
+        Ogg/Vorbis, MP3, FLAC, Ogg/Speex and/or MPP/MP+ (Musepack)
+        format, and tags them, all in one go.
+      '';
+      platforms = platforms.linux;
+    };
+  }
diff --git a/nixpkgs/pkgs/applications/audio/aeolus/default.nix b/nixpkgs/pkgs/applications/audio/aeolus/default.nix
new file mode 100644
index 000000000000..7b80b32331bc
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/aeolus/default.nix
@@ -0,0 +1,32 @@
+{ stdenv, fetchurl, libclthreads, zita-alsa-pcmi, alsaLib, libjack2
+, libclxclient, libX11, libXft, readline
+}:
+
+stdenv.mkDerivation rec {
+  name = "aeolus-${version}";
+  version = "0.9.7";
+
+  src = fetchurl {
+    url = "https://kokkinizita.linuxaudio.org/linuxaudio/downloads/${name}.tar.bz2";
+    sha256 = "0lhbr95hmbfj8ynbcpawn7jzjbpvrkm6k2yda39yhqk1bzg38v2k";
+  };
+
+  buildInputs = [
+    libclthreads zita-alsa-pcmi alsaLib libjack2 libclxclient
+    libX11 libXft readline
+  ];
+
+  patchPhase = ''sed "s@ldconfig.*@@" -i source/Makefile'';
+
+  preBuild = "cd source";
+
+  makeFlags = "DESTDIR= PREFIX=$(out)";
+
+  meta = {
+    description = "Synthetized (not sampled) pipe organ emulator";
+    homepage = http://kokkinizita.linuxaudio.org/linuxaudio/aeolus/index.html;
+    license = stdenv.lib.licenses.lgpl3;
+    platforms = stdenv.lib.platforms.linux;
+    maintainers = [ stdenv.lib.maintainers.nico202 ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/airwave/default.nix b/nixpkgs/pkgs/applications/audio/airwave/default.nix
new file mode 100644
index 000000000000..737e73421c9b
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/airwave/default.nix
@@ -0,0 +1,91 @@
+{ stdenv, multiStdenv, cmake, fetchFromGitHub, file, libX11, makeWrapper
+, qt5, requireFile, unzip, wine
+}:
+
+let
+
+  version = "1.3.3";
+
+  airwave-src = fetchFromGitHub {
+    owner = "phantom-code";
+    repo = "airwave";
+    rev = version;
+    sha256 = "1ban59skw422mak3cp57lj27hgq5d3a4f6y79ysjnamf8rpz9x4s";
+  };
+
+  vst-sdk = stdenv.mkDerivation rec {
+    name = "vstsdk368_08_11_2017_build_121";
+    src = requireFile {
+      name = "${name}.zip";
+      url = "http://www.steinberg.net/en/company/developers.html";
+      sha256 = "e0f235d8826d70f1ae0ae5929cd198acae1ecff74612fde5c60cbfb45c2f4a70";
+    };
+    nativeBuildInputs = [ unzip ];
+    installPhase = "cp -r . $out";
+  };
+
+  wine-wow64 = wine.override {
+    wineRelease = "stable";
+    wineBuild = "wineWow";
+  };
+
+  wine-xembed = wine-wow64.overrideDerivation (oldAttrs: {
+    patchFlags = [ "-p2" ];
+    patches = [ "${airwave-src}/fix-xembed-wine-windows.patch" ];
+  });
+
+in
+
+multiStdenv.mkDerivation {
+  name = "airwave-${version}";
+
+  src = airwave-src;
+
+  nativeBuildInputs = [ cmake makeWrapper ];
+
+  buildInputs = [ file libX11 qt5.qtbase wine-xembed ];
+
+  postPatch = ''
+    # Binaries not used directly should land in libexec/.
+    substituteInPlace src/common/storage.cpp --replace '"/bin"' '"/libexec"'
+
+    # For airwave-host-32.exe.so, point wineg++ to 32-bit versions of
+    # these libraries, as $NIX_LDFLAGS contains only 64-bit ones.
+    substituteInPlace src/host/CMakeLists.txt --replace '-m32' \
+      '-m32 -L${wine-xembed}/lib -L${wine-xembed}/lib/wine -L${multiStdenv.cc.libc.out}/lib/32'
+  '';
+
+  # libstdc++.so link gets lost in 64-bit executables during
+  # shrinking.
+  dontPatchELF = true;
+
+  # Cf. https://github.com/phantom-code/airwave/issues/57
+  hardeningDisable = [ "format" ];
+
+  cmakeFlags = "-DVSTSDK_PATH=${vst-sdk}/VST2_SDK";
+
+  postInstall = ''
+    mv $out/bin $out/libexec
+    mkdir $out/bin
+    mv $out/libexec/airwave-manager $out/bin
+    wrapProgram $out/libexec/airwave-host-32.exe --set WINELOADER ${wine-xembed}/bin/wine
+    wrapProgram $out/libexec/airwave-host-64.exe --set WINELOADER ${wine-xembed}/bin/wine64
+  '';
+
+  meta = with stdenv.lib; {
+    description = "WINE-based VST bridge for Linux VST hosts";
+    longDescription = ''
+      Airwave is a wine based VST bridge, that allows for the use of
+      Windows 32- and 64-bit VST 2.4 audio plugins with Linux VST
+      hosts. Due to the use of shared memory, only one extra copying
+      is made for each data transfer. Airwave also uses the XEMBED
+      protocol to correctly embed the plugin editor into the host
+      window.
+    '';
+    homepage = https://github.com/phantom-code/airwave;
+    license = licenses.mit;
+    platforms = [ "x86_64-linux" ];
+    maintainers = with maintainers; [ michalrus ];
+    hydraPlatforms = [];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/aj-snapshot/default.nix b/nixpkgs/pkgs/applications/audio/aj-snapshot/default.nix
new file mode 100644
index 000000000000..f84958e1f820
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/aj-snapshot/default.nix
@@ -0,0 +1,32 @@
+{ stdenv, fetchurl, alsaLib, jack2Full, minixml, pkgconfig }:
+
+stdenv.mkDerivation rec {
+  name =  packageName + "-" + version ;
+  packageName = "aj-snapshot" ;
+  version = "0.9.8";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/${packageName}/${name}.tar.bz2";
+    sha256 = "0wilky1g2mb88v2z0520s7sw1dsn10iwanc8id5p6z1xsnhg7b6p";
+  };
+
+  doCheck = false;
+
+  nativeBuildInputs = [ pkgconfig ];
+  buildInputs = [ alsaLib minixml jack2Full ];
+
+  meta = with stdenv.lib; {
+    description = "Tool for storing/restoring JACK and/or ALSA connections to/from cml files";
+    longDescription = ''
+    Aj-snapshot is a small program that can be used to make snapshots of the connections made between JACK and/or ALSA clients. 
+    Because JACK can provide both audio and MIDI support to programs, aj-snapshot can store both types of connections for JACK. 
+    ALSA, on the other hand, only provides routing facilities for MIDI clients. 
+    You can also run aj-snapshot in daemon mode if you want to have your connections continually restored.
+    '';
+
+    homepage = http://aj-snapshot.sourceforge.net/;
+    license = licenses.gpl2;
+    maintainers = [ maintainers.mrVanDalo ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/amarok/default.nix b/nixpkgs/pkgs/applications/audio/amarok/default.nix
new file mode 100644
index 000000000000..855d31aadbb0
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/amarok/default.nix
@@ -0,0 +1,42 @@
+{ mkDerivation, fetchgit, lib
+, extra-cmake-modules, kdoctools
+, qca-qt5, qjson, qtquickcontrols2, qtscript, qtwebengine
+, karchive, kcmutils, kconfig, kdnssd, kguiaddons, kinit, kirigami2, knewstuff, knotifyconfig, ktexteditor, kwindowsystem
+, fftw, phonon, plasma-framework, threadweaver
+, curl, ffmpeg, gdk_pixbuf, libaio, libmtp, loudmouth, lzo, lz4, mysql57, pcre, snappy, taglib, taglib_extras
+}:
+
+let
+  pname = "amarok";
+  version = "2.9.0-20180618";
+
+in mkDerivation {
+  name = "${pname}-${version}";
+
+  src = fetchgit {
+    # master has the Qt5 version as of April 2018 but a formal release has not
+    # yet been made so change this back to the proper upstream when such a
+    # release is out
+    url    = git://anongit.kde.org/amarok.git;
+    # url = "mirror://kde/stable/${pname}/${version}/src/${name}.tar.xz";
+    rev    = "5d43efa454b6a6c9c833a6f3d7f8ff3cae738c96";
+    sha256 = "0fyrbgldg4wbb2darm4aav5fpzbacxzfjrdqwkhv9xr13j7zsvm3";
+  };
+
+  nativeBuildInputs = [ extra-cmake-modules kdoctools ];
+
+  propagatedBuildInputs = [
+    qca-qt5 qjson qtquickcontrols2 qtscript qtwebengine
+    karchive kcmutils kconfig kdnssd kguiaddons kinit kirigami2 knewstuff knotifyconfig ktexteditor kwindowsystem
+    phonon plasma-framework threadweaver
+    curl fftw ffmpeg gdk_pixbuf libaio libmtp loudmouth lz4 lzo mysql57.server mysql57.server.static
+    pcre snappy taglib taglib_extras
+  ];
+
+  enableParallelBuilding = true;
+
+  meta = with lib; {
+    license = licenses.gpl2;
+    maintainers = with maintainers; [ peterhoeg ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/ams-lv2/default.nix b/nixpkgs/pkgs/applications/audio/ams-lv2/default.nix
new file mode 100644
index 000000000000..7383623a5ff1
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/ams-lv2/default.nix
@@ -0,0 +1,27 @@
+{ stdenv, fetchFromGitHub, cairo, fftw, gtkmm2, lv2, lvtk, pkgconfig, python3
+, wafHook }:
+
+stdenv.mkDerivation  rec {
+  name = "ams-lv2-${version}";
+  version = "1.2.1";
+
+  src = fetchFromGitHub {
+    owner = "blablack";
+    repo = "ams-lv2";
+    rev = version;
+    sha256 = "1n1dnqnj24xhiy9323lj52nswr5120cj56fpckg802miss05sr6x";
+  };
+
+  nativeBuildInputs = [ pkgconfig wafHook ];
+  buildInputs = [ cairo fftw gtkmm2 lv2 lvtk ];
+
+  meta = with stdenv.lib; {
+    description = "An LV2 port of the internal modules found in Alsa Modular Synth";
+    homepage = http://objectivewave.wordpress.com/ams-lv2;
+    license = licenses.gpl3;
+    maintainers = [ maintainers.goibhniu ];
+    platforms = platforms.linux;
+    # Build uses `-msse` and `-mfpmath=sse`
+    badPlatforms = [ "aarch64-linux" ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/ardour/default.nix b/nixpkgs/pkgs/applications/audio/ardour/default.nix
new file mode 100644
index 000000000000..1bb1e404b5c4
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/ardour/default.nix
@@ -0,0 +1,91 @@
+{ stdenv, fetchgit, alsaLib, aubio, boost, cairomm, curl, doxygen
+, fftwSinglePrec, flac, glibc, glibmm, graphviz, gtkmm2, libjack2
+, libgnomecanvas, libgnomecanvasmm, liblo, libmad, libogg, librdf
+, librdf_raptor, librdf_rasqal, libsamplerate, libsigcxx, libsndfile
+, libusb, libuuid, libxml2, libxslt, lilv, lv2, makeWrapper
+, perl, pkgconfig, python2, rubberband, serd, sord, sratom
+, taglib, vampSDK, dbus, fftw, pango, suil, libarchive
+, wafHook }:
+
+let
+
+  # Ardour git repo uses a mix of annotated and lightweight tags. Annotated
+  # tags are used for MAJOR.MINOR versioning, and lightweight tags are used
+  # in-between; MAJOR.MINOR.REV where REV is the number of commits since the
+  # last annotated tag. A slightly different version string format is needed
+  # for the 'revision' info that is built into the binary; it is the format of
+  # "git describe" when _not_ on an annotated tag(!): MAJOR.MINOR-REV-HASH.
+
+  # Version to build.
+  tag = "5.12";
+
+in
+
+stdenv.mkDerivation rec {
+  name = "ardour-${tag}";
+
+  src = fetchgit {
+    url = "git://git.ardour.org/ardour/ardour.git";
+    rev = "ae0dcdc0c5d13483271065c360e378202d20170a";
+    sha256 = "0mla5lm51ryikc2rrk53max2m7a5ds6i1ai921l2h95wrha45nkr";
+  };
+
+  nativeBuildInputs = [ wafHook ];
+  buildInputs =
+    [ alsaLib aubio boost cairomm curl doxygen dbus fftw fftwSinglePrec flac
+      glibmm graphviz gtkmm2 libjack2 libgnomecanvas libgnomecanvasmm liblo
+      libmad libogg librdf librdf_raptor librdf_rasqal libsamplerate
+      libsigcxx libsndfile libusb libuuid libxml2 libxslt lilv lv2
+      makeWrapper pango perl pkgconfig python2 rubberband serd sord
+      sratom suil taglib vampSDK libarchive
+    ];
+
+  # ardour's wscript has a "tarball" target but that required the git revision
+  # be available. Since this is an unzipped tarball fetched from github we
+  # have to do that ourself.
+  patchPhase = ''
+    printf '#include "libs/ardour/ardour/revision.h"\nnamespace ARDOUR { const char* revision = \"${tag}-${builtins.substring 0 8 src.rev}\"; }\n' > libs/ardour/revision.cc
+    sed 's|/usr/include/libintl.h|${glibc.dev}/include/libintl.h|' -i wscript
+    patchShebangs ./tools/
+  '';
+
+  configureFlags = [
+    "--optimize"
+    "--docs"
+    "--with-backends=jack,alsa,dummy"
+  ];
+
+  postInstall = ''
+    # Install desktop file
+    mkdir -p "$out/share/applications"
+    cat > "$out/share/applications/ardour.desktop" << EOF
+    [Desktop Entry]
+    Name=Ardour 5
+    GenericName=Digital Audio Workstation
+    Comment=Multitrack harddisk recorder
+    Exec=$out/bin/ardour5
+    Icon=$out/share/ardour5/resources/Ardour-icon_256px.png
+    Terminal=false
+    Type=Application
+    X-MultipleArgs=false
+    Categories=GTK;Audio;AudioVideoEditing;AudioVideo;Video;
+    EOF
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Multi-track hard disk recording software";
+    longDescription = ''
+      Ardour is a digital audio workstation (DAW), You can use it to
+      record, edit and mix multi-track audio and midi. Produce your
+      own CDs. Mix video soundtracks. Experiment with new ideas about
+      music and sound.
+
+      Please consider supporting the ardour project financially:
+      https://community.ardour.org/node/8288
+    '';
+    homepage = http://ardour.org/;
+    license = licenses.gpl2;
+    platforms = platforms.linux;
+    maintainers = [ maintainers.goibhniu maintainers.fps ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/ario/default.nix b/nixpkgs/pkgs/applications/audio/ario/default.nix
new file mode 100644
index 000000000000..02d818410df4
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/ario/default.nix
@@ -0,0 +1,27 @@
+{ stdenv, fetchurl, pkgconfig, gettext, gtk3, intltool,
+  wrapGAppsHook, libxml2, curl, mpd_clientlib, dbus-glib,
+  libsoup, avahi, taglib
+  }:
+
+stdenv.mkDerivation rec {
+  version = "1.6";
+  name = "ario-${version}";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/ario-player/${name}.tar.gz";
+    sha256 = "16nhfb3h5pc7flagfdz7xy0iq6kvgy6h4bfpi523i57rxvlfshhl";
+  };
+
+  nativeBuildInputs = [ pkgconfig gettext intltool wrapGAppsHook ];
+  buildInputs = [
+    gtk3 libxml2 curl mpd_clientlib dbus-glib libsoup avahi taglib
+  ];
+
+  meta = {
+    description = "GTK client for MPD (Music player daemon)";
+    homepage = http://ario-player.sourceforge.net/;
+    license = stdenv.lib.licenses.gpl2Plus;
+    maintainers = [ stdenv.lib.maintainers.garrison ];
+    platforms = stdenv.lib.platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/artyFX/default.nix b/nixpkgs/pkgs/applications/audio/artyFX/default.nix
new file mode 100644
index 000000000000..91a0a1f140c2
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/artyFX/default.nix
@@ -0,0 +1,26 @@
+{ stdenv, fetchFromGitHub , cairomm, cmake, libjack2, libpthreadstubs, libXdmcp, libxshmfence, libsndfile, lv2, ntk, pkgconfig }:
+
+stdenv.mkDerivation rec {
+  name = "artyFX-${version}";
+  version = "1.3";
+
+  src = fetchFromGitHub {
+    owner = "openAVproductions";
+    repo = "openAV-ArtyFX";
+    rev = "release-${version}";
+    sha256 = "012hcy1mxl7gs2lipfcqp5x0xv1azb9hjrwf0h59yyxnzx96h7c9";
+  };
+
+  nativeBuildInputs = [ pkgconfig ];
+  buildInputs = [ cairomm cmake libjack2 libpthreadstubs libXdmcp libxshmfence libsndfile lv2 ntk   ];
+
+  meta = with stdenv.lib; {
+    homepage = http://openavproductions.com/artyfx/;
+    description = "A LV2 plugin bundle of artistic realtime effects";
+    license = licenses.gpl2;
+    maintainers = [ maintainers.magnetophon ];
+    platforms = platforms.linux;
+    # Build uses `-msse` and `-mfpmath=sse`
+    badPlatforms = [ "aarch64-linux" ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/asunder/default.nix b/nixpkgs/pkgs/applications/audio/asunder/default.nix
new file mode 100644
index 000000000000..9c42c98ba5e3
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/asunder/default.nix
@@ -0,0 +1,52 @@
+{ stdenv, fetchurl, makeWrapper, gtk2, libcddb, intltool, pkgconfig, cdparanoia
+, mp3Support ? false, lame
+, oggSupport ? true, vorbis-tools
+, flacSupport ? true, flac
+, opusSupport ? false, opusTools
+, wavpackSupport ? false, wavpack
+#, musepackSupport ? false, TODO: mpcenc
+, monkeysAudioSupport ? false, monkeysAudio
+#, aacSupport ? false, TODO: neroAacEnc
+}:
+
+with stdenv.lib;
+
+stdenv.mkDerivation rec {
+  version = "2.9.3";
+  name = "asunder-${version}";
+  src = fetchurl {
+    url = "http://littlesvr.ca/asunder/releases/${name}.tar.bz2";
+    sha256 = "1630i1df06y840v3fgdf75jxw1s8kwbfn5bhi0686viah0scccw5";
+  };
+
+  nativeBuildInputs = [ pkgconfig ];
+  buildInputs = [ gtk2 libcddb intltool makeWrapper ];
+
+  runtimeDeps =
+    optional mp3Support lame ++
+    optional oggSupport vorbis-tools ++
+    optional flacSupport flac ++
+    optional opusSupport opusTools ++
+    optional wavpackSupport wavpack ++
+    optional monkeysAudioSupport monkeysAudio ++
+    [ cdparanoia ];
+
+  postInstall = ''
+    wrapProgram "$out/bin/asunder" \
+      --prefix PATH : "${makeBinPath runtimeDeps}"
+  '';
+
+  meta = {
+    description = "A graphical Audio CD ripper and encoder for Linux";
+    homepage = http://littlesvr.ca/asunder/index.php;
+    license = licenses.gpl2;
+    maintainers = with maintainers; [ mudri ];
+    platforms = platforms.linux;
+
+    longDescription = ''
+      Asunder is a graphical Audio CD ripper and encoder for Linux. You can use
+      it to save tracks from an Audio CD as any of WAV, MP3, OGG, FLAC, Opus,
+      WavPack, Musepack, AAC, and Monkey's Audio files.
+    '';
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/audacious/default.nix b/nixpkgs/pkgs/applications/audio/audacious/default.nix
new file mode 100644
index 000000000000..19cb55d93c98
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/audacious/default.nix
@@ -0,0 +1,71 @@
+{ stdenv, fetchurl, pkgconfig, wrapGAppsHook, gettext, glib, gtk3
+, libmowgli, dbus-glib, libxml2, xorg, gnome3, alsaLib
+, libpulseaudio, libjack2, fluidsynth, libmad, libogg, libvorbis
+, libcdio, libcddb, flac, ffmpeg, mpg123, libcue, libmms, libbs2b
+, libsndfile, libmodplug, libsamplerate, soxr, lirc, curl, wavpack
+, neon, faad2, lame, libnotify, libsidplayfp
+}:
+
+stdenv.mkDerivation rec {
+  name = "audacious-${version}";
+  version = "3.9";
+
+  src = fetchurl {
+    url = "https://distfiles.audacious-media-player.org/audacious-${version}-gtk3.tar.bz2";
+    sha256 = "0dc7fg0v2l2j4h9cz1baz7rf4n0a5jgk09qvsj806sh6jp7w6ipm";
+  };
+
+  pluginsSrc = fetchurl {
+    url = "http://distfiles.audacious-media-player.org/audacious-plugins-${version}-gtk3.tar.bz2";
+    sha256 = "1gck37c5pnzxdhrnb1g75b5hi31s2dc952wifxns45pkdlayrmra";
+  };
+
+  nativeBuildInputs = [
+    pkgconfig wrapGAppsHook
+  ];
+
+  buildInputs = [
+    gettext glib gtk3 libmowgli dbus-glib libxml2
+    xorg.libXcomposite gnome3.defaultIconTheme alsaLib libjack2
+    libpulseaudio fluidsynth libmad libogg libvorbis libcdio
+    libcddb flac ffmpeg mpg123 libcue libmms libbs2b libsndfile
+    libmodplug libsamplerate soxr lirc curl wavpack neon faad2
+    lame libnotify libsidplayfp
+  ];
+
+  configureFlags = [ "--enable-statusicon" ];
+
+  # Here we build both audacious and audacious-plugins in one
+  # derivations, since they really expect to be in the same prefix.
+  # This is slighly tricky.
+  builder = builtins.toFile "builder.sh" ''
+    # First build audacious.
+    (
+      source $stdenv/setup
+      genericBuild
+    )
+
+    # Then build the plugins.
+    (
+      dontWrapGApps=true
+      nativeBuildInputs="$out $nativeBuildInputs" # to find audacious
+      source $stdenv/setup
+      rm -rfv audacious-*
+      src=$pluginsSrc
+      genericBuild
+    )
+  '';
+
+  enableParallelBuilding = true;
+
+  meta = with stdenv.lib; {
+    description = "Audio player";
+    homepage = https://audacious-media-player.org/;
+    maintainers = with maintainers; [ eelco ramkromberg ];
+    platforms = with platforms; linux;
+    license = with licenses; [
+      bsd2 bsd3 #https://github.com/audacious-media-player/audacious/blob/master/COPYING
+      gpl2 gpl3 lgpl2Plus #http://redmine.audacious-media-player.org/issues/46
+    ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/audacious/qt-5.nix b/nixpkgs/pkgs/applications/audio/audacious/qt-5.nix
new file mode 100644
index 000000000000..019bde7cc64a
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/audacious/qt-5.nix
@@ -0,0 +1,92 @@
+{
+  mkDerivation, lib, fetchurl, fetchpatch,
+  gettext, pkgconfig,
+  qtbase,
+  alsaLib, curl, faad2, ffmpeg, flac, fluidsynth, gdk_pixbuf, lame, libbs2b,
+  libcddb, libcdio, libcue, libjack2, libmad, libmms, libmodplug,
+  libmowgli, libnotify, libogg, libpulseaudio, libsamplerate, libsidplayfp,
+  libsndfile, libvorbis, libxml2, lirc, mpg123, neon, qtmultimedia, soxr,
+  wavpack
+}:
+
+let
+  version = "3.9";
+  sources = {
+    "audacious-${version}" = fetchurl {
+      url = "http://distfiles.audacious-media-player.org/audacious-${version}.tar.bz2";
+      sha256 = "0pmhrhsjhqnrq3zh4rhfys5jas53ph5ijkq010dxg1n779kl901d";
+    };
+
+    "audacious-plugins-${version}" = fetchurl {
+      url = "http://distfiles.audacious-media-player.org/audacious-plugins-${version}.tar.bz2";
+      sha256 = "1f17r7ar0mngcf7z41s6xh073vjafw3i7iy9ijb0cd6bi48g5xwb";
+    };
+  };
+
+  qt510_plugins_patch = fetchpatch {
+    url = "https://github.com/audacious-media-player/audacious-plugins/commit/971f7ff7c3d8a0b9b420bf4fd19ab97755607637.patch";
+    sha256 = "15fy37syj9ygl2ibkkz3g3b9wd22vk9bjfmvqhhkpxphry2zwb17";
+  };
+in
+
+mkDerivation {
+  inherit version;
+  name = "audacious-qt5-${version}";
+
+  sourceFiles = lib.attrValues sources;
+  sourceRoots = lib.attrNames sources;
+
+  nativeBuildInputs = [ gettext pkgconfig ];
+
+  inherit qt510_plugins_patch;
+
+  buildInputs = [
+    # Core dependencies
+    qtbase
+
+    # Plugin dependencies
+    alsaLib curl faad2 ffmpeg flac fluidsynth gdk_pixbuf lame libbs2b libcddb
+    libcdio libcue libjack2 libmad libmms libmodplug libmowgli
+    libnotify libogg libpulseaudio libsamplerate libsidplayfp libsndfile
+    libvorbis libxml2 lirc mpg123 neon qtmultimedia soxr wavpack
+  ];
+
+  configureFlags = [ "--enable-qt" "--disable-gtk" ];
+
+  # Here we build both audacious and audacious-plugins in one
+  # derivations, since they really expect to be in the same prefix.
+  # This is slighly tricky.
+  builder = builtins.toFile "builder.sh" ''
+    sourceFiles=( $sourceFiles )
+    sourceRoots=( $sourceRoots )
+    for (( i=0 ; i < ''${#sourceFiles[*]} ; i++ )); do
+
+      (
+        # only patch the plugins
+        if [ "$i" -eq "1" ]; then
+          patches=( $qt510_plugins_patch )
+        fi
+        src=''${sourceFiles[$i]}
+        sourceRoot=''${sourceRoots[$i]}
+        source $stdenv/setup
+        genericBuild
+      )
+
+      if [ $i == 0 ]; then
+        nativeBuildInputs="$out $nativeBuildInputs"
+      fi
+
+    done
+  '';
+
+  meta = with lib; {
+    description = "Audio player";
+    homepage = https://audacious-media-player.org/;
+    maintainers = with maintainers; [ ttuegel ];
+    platforms = with platforms; linux;
+    license = with licenses; [
+      bsd2 bsd3 #https://github.com/audacious-media-player/audacious/blob/master/COPYING
+      gpl2 gpl3 lgpl2Plus #http://redmine.audacious-media-player.org/issues/46
+    ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/audacity/default.nix b/nixpkgs/pkgs/applications/audio/audacity/default.nix
new file mode 100644
index 000000000000..fc32eb799cf9
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/audacity/default.nix
@@ -0,0 +1,66 @@
+{ stdenv, fetchurl, wxGTK30, pkgconfig, file, gettext, gtk2,
+  libvorbis, libmad, libjack2, lv2, lilv, serd, sord, sratom, suil, alsaLib, libsndfile, soxr, flac, lame,
+  expat, libid3tag, ffmpeg, soundtouch, /*, portaudio - given up fighting their portaudio.patch */
+  autoconf, automake, libtool
+  }:
+
+with stdenv.lib;
+
+stdenv.mkDerivation rec {
+  version = "2.3.0";
+  name = "audacity-${version}";
+
+  src = fetchurl {
+    url = "https://github.com/audacity/audacity/archive/Audacity-${version}.tar.gz";
+    sha256 = "0pi7ksm8hfvwbn580z4kkc55sbaylrrr7v08s04dmdgfvil7y4ip";
+  };
+
+  preConfigure = /* we prefer system-wide libs */ ''
+    autoreconf -vi # use system libraries
+
+    # we will get a (possibly harmless) warning during configure without this
+    substituteInPlace configure \
+      --replace /usr/bin/file ${file}/bin/file
+  '';
+
+  configureFlags = [
+    "--with-libsamplerate"
+  ];
+
+  # audacity only looks for lame and ffmpeg at runtime, so we need to link them in manually
+  NIX_LDFLAGS = [
+    # LAME
+    "-lmp3lame"
+    # ffmpeg
+    "-lavcodec"
+    "-lavdevice"
+    "-lavfilter"
+    "-lavformat"
+    "-lavresample"
+    "-lavutil"
+    "-lpostproc"
+    "-lswresample"
+    "-lswscale"
+  ];
+
+  nativeBuildInputs = [ pkgconfig ];
+  buildInputs = [
+    file gettext wxGTK30 expat alsaLib
+    libsndfile soxr libid3tag libjack2 lv2 lilv serd sord sratom suil gtk2
+    ffmpeg libmad lame libvorbis flac soundtouch
+    autoconf automake libtool # for the preConfigure phase
+  ]; #ToDo: detach sbsms
+
+  enableParallelBuilding = true;
+
+  dontDisableStatic = true;
+  doCheck = false; # Test fails
+
+  meta = with stdenv.lib; {
+    description = "Sound editor with graphical UI";
+    homepage = http://audacityteam.org/;
+    license = licenses.gpl2Plus;
+    platforms = with platforms; linux;
+    maintainers = with maintainers; [ the-kenny ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/audio-recorder/default.nix b/nixpkgs/pkgs/applications/audio/audio-recorder/default.nix
new file mode 100644
index 000000000000..2ac7e3af7ab2
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/audio-recorder/default.nix
@@ -0,0 +1,44 @@
+{ stdenv, fetchurl
+, pkgconfig, intltool, gnome3
+, glib, dbus, gtk3, libappindicator-gtk3, gst_all_1
+, librsvg, wrapGAppsHook
+, pulseaudioSupport ? true, libpulseaudio ? null }:
+
+stdenv.mkDerivation rec {
+  name = "audio-recorder-${version}";
+  version = "2.1.3";
+
+  src = fetchurl {
+    name = "${name}.tar.gz";
+    url = "${meta.homepage}/+archive/ubuntu/ppa/+files/audio-recorder_${version}%7Ebionic.tar.gz";
+    sha256 = "160pnmnmc9zwzyclsci3w1qwlgxkfx1y3x5ck6i587w78570an1r";
+  };
+
+  # https://bugs.launchpad.net/audio-recorder/+bug/1784622
+  NIX_CFLAGS_COMPILE = "-I${gnome3.glib.dev}/include/gio-unix-2.0";
+
+  nativeBuildInputs = [ pkgconfig intltool wrapGAppsHook ];
+
+  buildInputs = [
+    glib dbus gtk3 librsvg libappindicator-gtk3
+  ] ++ (with gst_all_1; [
+    gstreamer gst-plugins-base gst-plugins-good gst-plugins-bad gst-plugins-ugly gst-libav
+  ]) ++ stdenv.lib.optional pulseaudioSupport libpulseaudio;
+
+  meta = with stdenv.lib; {
+    description = "Audio recorder for GNOME and Unity Desktops";
+    longDescription = ''
+      This program allows you to record your favourite music or audio to a file.
+      It can record audio from your system soundcard, microphones, browsers and
+      webcams. Put simply; if it plays out of your loudspeakers you can record it.
+      This program has a timer that can start, stop or pause recording on certain
+      conditions such as audio level, file size and clock time. This recorder can
+      automatically record your Skype calls. It supports several audio (output)
+      formats such as OGG audio, Flac, MP3 and WAV.
+    '';
+    homepage = https://launchpad.net/~audio-recorder;
+    license = licenses.gpl3;
+    platforms = platforms.linux;
+    maintainers = [ maintainers.msteen ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/aumix/default.nix b/nixpkgs/pkgs/applications/audio/aumix/default.nix
new file mode 100644
index 000000000000..db5f081c4ed4
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/aumix/default.nix
@@ -0,0 +1,30 @@
+{stdenv, fetchurl, gettext, ncurses
+, gtkGUI ? false
+, pkgconfig ? null
+, gtk2 ? null}:
+
+assert gtkGUI -> pkgconfig != null && gtk2 != null;
+
+stdenv.mkDerivation rec {
+  name = "aumix-2.9.1";
+  src = fetchurl {
+    url = "http://www.jpj.net/~trevor/aumix/releases/${name}.tar.bz2";
+    sha256 = "0a8fwyxnc5qdxff8sl2sfsbnvgh6pkij4yafiln0fxgg6bal7knj";
+  };
+
+  buildInputs = [ gettext ncurses ]
+    ++ (if gtkGUI then [pkgconfig gtk2] else []);
+
+  meta = {
+    description = "Audio mixer for X and the console";
+    longDescription = ''
+      Aumix adjusts an audio mixer from X, the console, a terminal,
+      the command line or a script.
+    '';
+    homepage = http://www.jpj.net/~trevor/aumix.html;
+    license = stdenv.lib.licenses.gpl2Plus;
+
+    maintainers = [ ];
+    platforms = stdenv.lib.platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/avldrums-lv2/default.nix b/nixpkgs/pkgs/applications/audio/avldrums-lv2/default.nix
new file mode 100644
index 000000000000..75b6d8e27580
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/avldrums-lv2/default.nix
@@ -0,0 +1,30 @@
+{ stdenv, fetchFromGitHub, pkgconfig, pango, cairo, libGLU, lv2 }:
+
+stdenv.mkDerivation rec {
+  name = "${pname}-${version}";
+  pname = "avldrums.lv2";
+  version = "0.3.1";
+
+  src = fetchFromGitHub {
+    owner = "x42";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "0yhq3n5bahhqpj40mvlkxcjsdsw63jsbz20pl77bx2qj30w25i2j";
+    fetchSubmodules = true;
+  };
+
+  installFlags = "PREFIX=$(out)";
+
+  nativeBuildInputs = [ pkgconfig ];
+  buildInputs = [
+    pango cairo libGLU lv2
+  ];
+
+  meta = with stdenv.lib; {
+    description = "Dedicated AVLDrumkits LV2 Plugin";
+    homepage    = http://x42-plugins.com/x42/x42-avldrums;
+    license     = licenses.gpl2;
+    maintainers = [ maintainers.magnetophon ];
+    platforms   = [ "i686-linux" "x86_64-linux" ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/axoloti/default.nix b/nixpkgs/pkgs/applications/audio/axoloti/default.nix
new file mode 100644
index 000000000000..e3f1b6acf874
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/axoloti/default.nix
@@ -0,0 +1,101 @@
+{ stdenv, fetchFromGitHub, fetchurl, makeWrapper, unzip
+, gnumake, gcc-arm-embedded, binutils-arm-embedded
+, dfu-util-axoloti, jdk, ant, libfaketime }:
+
+stdenv.mkDerivation rec {
+  version = "1.0.12-2";
+  name = "axoloti-${version}";
+
+  src = fetchFromGitHub {
+    owner = "axoloti";
+    repo = "axoloti";
+    rev = "${version}";
+    sha256 = "1qffis277wshldr3i939b0r2x3a2mlr53samxqmr2nk1sfm2b4w9";
+  };
+
+  chibi_version = "2.6.9";
+  chibi_name = "ChibiOS_${chibi_version}";
+
+  chibios = fetchurl {
+    url = "mirror://sourceforge/project/chibios/ChibiOS_RT%20stable/Version%20${chibi_version}/${chibi_name}.zip";
+    sha256 = "0lb5s8pkj80mqhsy47mmq0lqk34s2a2m3xagzihalvabwd0frhlj";
+  };
+
+  nativeBuildInputs = [
+    makeWrapper
+    unzip
+    gcc-arm-embedded
+    binutils-arm-embedded
+    dfu-util-axoloti
+    ant
+  ];
+  buildInputs = [jdk libfaketime ];
+
+  patchPhase = ''
+    unzip ${chibios}
+    mv ${chibi_name} chibios
+    (cd chibios/ext; unzip -q -o fatfs-0.9-patched.zip)
+
+    # Remove source of non-determinism in ChibiOS
+    substituteInPlace "chibios/os/various/shell.c" \
+      --replace "#ifdef __DATE__" "#if 0"
+
+    # Hardcode path to "make"
+    for f in "firmware/compile_firmware_linux.sh" \
+             "firmware/compile_patch_linux.sh"; do
+      substituteInPlace "$f" \
+        --replace "make" "${gnumake}/bin/make"
+    done
+
+    # Hardcode dfu-util path
+    substituteInPlace "platform_linux/upload_fw_dfu.sh" \
+      --replace "/bin/dfu-util" ""
+    substituteInPlace "platform_linux/upload_fw_dfu.sh" \
+      --replace "./dfu-util" "${dfu-util-axoloti}/bin/dfu-util"
+
+    # Fix build version
+    substituteInPlace "build.xml" \
+      --replace "(git missing)" "${version}"
+
+    # Remove build time
+    substituteInPlace "build.xml" \
+      --replace "<tstamp>" ""
+    substituteInPlace "build.xml" \
+      --replace \
+        '<format property="build.time" pattern="dd/MM/yyyy HH:mm:ss z"/>' \
+        '<property name="build.time" value=""/>'
+    substituteInPlace "build.xml" \
+      --replace "</tstamp>" ""
+    substituteInPlace "build.xml" \
+      --replace \
+       '{line.separator}</echo>' \
+       '{line.separator}</echo> <touch file="src/main/java/axoloti/Version.java" millis="0" />'
+  '';
+
+  buildPhase = ''
+    find . -exec touch -d '1970-01-01 00:00' {} \;
+    (cd platform_linux; sh compile_firmware.sh)
+    faketime "1970-01-01 00:00:00" ant -Dbuild.runtime=true
+  '';
+
+  installPhase = ''
+    mkdir -p $out/bin $out/share/axoloti
+
+    cp -r doc firmware chibios platform_linux CMSIS *.txt $out/share/axoloti/
+    install -vD dist/Axoloti.jar $out/share/axoloti/
+
+    makeWrapper ${jdk}/bin/java $out/bin/axoloti --add-flags "-Daxoloti_release=$out/share/axoloti -Daxoloti_runtime=$out/share/axoloti -jar $out/share/axoloti/Axoloti.jar"
+  '';
+
+  meta = with stdenv.lib; {
+    homepage = http://www.axoloti.com;
+    description = ''
+      Sketching embedded digital audio algorithms.
+
+      To fix permissions of the Axoloti USB device node, add a similar udev rule to <literal>services.udev.extraRules</literal>:
+      <literal>SUBSYSTEM=="usb", ATTR{idVendor}=="16c0", ATTR{idProduct}=="0442", OWNER="someuser", GROUP="somegroup"</literal>
+    '';
+    license = licenses.gpl3;
+    maintainers = with maintainers; [ ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/axoloti/dfu-util.nix b/nixpkgs/pkgs/applications/audio/axoloti/dfu-util.nix
new file mode 100644
index 000000000000..07a78260991f
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/axoloti/dfu-util.nix
@@ -0,0 +1,31 @@
+{ stdenv, fetchurl, pkgconfig, libusb1-axoloti }:
+
+stdenv.mkDerivation rec {
+  name="dfu-util-${version}";
+  version = "0.8";
+
+  nativeBuildInputs = [ pkgconfig ];
+  buildInputs = [ libusb1-axoloti ];
+
+  src = fetchurl {
+    url = "http://dfu-util.sourceforge.net/releases/${name}.tar.gz";
+    sha256 = "0n7h08avlzin04j93m6hkq9id6hxjiiix7ff9gc2n89aw6dxxjsm";
+  };
+
+  meta = with stdenv.lib; {
+    description = "Device firmware update (DFU) USB programmer";
+    longDescription = ''
+      dfu-util is a program that implements the host (PC) side of the USB
+      DFU 1.0 and 1.1 (Universal Serial Bus Device Firmware Upgrade) protocol.
+
+      DFU is intended to download and upload firmware to devices connected over
+      USB. It ranges from small devices like micro-controller boards up to mobile
+      phones. With dfu-util you are able to download firmware to your device or
+      upload firmware from it.
+    '';
+    homepage = http://dfu-util.sourceforge.net;
+    license = licenses.gpl2Plus;
+    platforms = platforms.unix;
+    maintainers = [ ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/axoloti/libusb1.nix b/nixpkgs/pkgs/applications/audio/axoloti/libusb1.nix
new file mode 100644
index 000000000000..1a6ebd346cca
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/axoloti/libusb1.nix
@@ -0,0 +1,38 @@
+{ stdenv, fetchurl, pkgconfig, systemd ? null, libobjc, IOKit, fetchpatch }:
+
+stdenv.mkDerivation rec {
+  name = "libusb-1.0.19";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/libusb/${name}.tar.bz2";
+    sha256 = "0h38p9rxfpg9vkrbyb120i1diq57qcln82h5fr7hvy82c20jql3c";
+  };
+
+  outputs = [ "out" "dev" ]; # get rid of propagating systemd closure
+
+  buildInputs = [ pkgconfig ];
+  propagatedBuildInputs =
+    stdenv.lib.optional stdenv.isLinux systemd ++
+    stdenv.lib.optionals stdenv.isDarwin [ libobjc IOKit ];
+
+  patches = [
+    (fetchpatch {
+      name = "libusb.stdfu.patch";
+      url = "https://raw.githubusercontent.com/axoloti/axoloti/1.0.12/platform_linux/src/libusb.stdfu.patch";
+      sha256 = "194j7j61i4q6x0ihm9ms8dxd4vliw20n2rj6cm9h17qzdl9xr33d";
+    })
+  ];
+
+  NIX_LDFLAGS = stdenv.lib.optionalString stdenv.isLinux "-lgcc_s";
+
+  preFixup = stdenv.lib.optionalString stdenv.isLinux ''
+    sed 's,-ludev,-L${systemd.lib}/lib -ludev,' -i $out/lib/libusb-1.0.la
+  '';
+
+  meta = with stdenv.lib; {
+    homepage = http://www.libusb.info;
+    description = "User-space USB library";
+    platforms = platforms.unix;
+    license = licenses.lgpl21;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/baudline/default.nix b/nixpkgs/pkgs/applications/audio/baudline/default.nix
new file mode 100644
index 000000000000..6827d12b3217
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/baudline/default.nix
@@ -0,0 +1,70 @@
+{ stdenv, fetchurl, libXmu, libXt, libX11, libXext, libXxf86vm, libjack2
+, makeWrapper
+}:
+
+let
+  rpath = stdenv.lib.makeLibraryPath
+    [ libXmu libXt libX11 libXext libXxf86vm libjack2 ];
+in
+stdenv.mkDerivation rec {
+  name = "baudline-${version}";
+  version = "1.08";
+
+  src =
+    if stdenv.hostPlatform.system == "x86_64-linux" then
+      fetchurl {
+        url = "http://www.baudline.com/baudline_${version}_linux_x86_64.tar.gz";
+        sha256 = "09fn0046i69in1jpizkzbaq5ggij0mpflcsparyskm3wh71mbzvr";
+      }
+    else if stdenv.hostPlatform.system == "i686-linux" then
+      fetchurl {
+        url = "http://www.baudline.com/baudline_${version}_linux_i686.tar.gz";
+        sha256 = "1waip5pmcf5ffcfvn8lf1rvsaq2ab66imrbfqs777scz7k8fhhjb";
+      }
+    else
+      throw "baudline isn't supported (yet?) on ${stdenv.hostPlatform.system}";
+
+  buildInputs = [ makeWrapper ];
+
+  # Prebuilt binary distribution.
+  # "patchelf --set-rpath" seems to break the application (cannot start), using
+  # LD_LIBRARY_PATH wrapper script instead.
+  dontBuild = true;
+  installPhase = ''
+    mkdir -p "$out/bin"
+    mkdir -p "$out/libexec/baudline"
+
+    cp -r . "$out/libexec/baudline/"
+
+    interpreter="$(echo ${stdenv.glibc.out}/lib/ld-linux*)"
+    for prog in "$out"/libexec/baudline/baudline*; do
+        patchelf --interpreter "$interpreter" "$prog"
+        ln -sr "$prog" "$out/bin/"
+    done
+    for prog in "$out"/bin/*; do
+        wrapProgram "$prog" --prefix LD_LIBRARY_PATH : ${rpath}
+    done
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Scientific signal analysis application";
+    longDescription = ''
+      Baudline is a time-frequency browser designed for scientific
+      visualization of the spectral domain.  Signal analysis is performed by
+      Fourier, correlation, and raster transforms that create colorful
+      spectrograms with vibrant detail.  Conduct test and measurement
+      experiments with the built in function generator, or play back audio
+      files with a multitude of effects and filters.  The baudline signal
+      analyzer combines fast digital signal processing, versatile high speed
+      displays, and continuous capture tools for hunting down and studying
+      elusive signal characteristics.
+    '';
+    homepage = http://www.baudline.com/;
+    # See http://www.baudline.com/faq.html#licensing_terms.
+    # (Do NOT (re)distribute on hydra.)
+    license = licenses.unfree;
+    platforms = [ "x86_64-linux" "i686-linux" ];
+    maintainers = [ maintainers.bjornfor ];
+  };
+
+}
diff --git a/nixpkgs/pkgs/applications/audio/beast/default.nix b/nixpkgs/pkgs/applications/audio/beast/default.nix
new file mode 100644
index 000000000000..29cecb169998
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/beast/default.nix
@@ -0,0 +1,38 @@
+{ stdenv, fetchurl, zlib, guile, libart_lgpl, pkgconfig, intltool
+, gtk2, glib, libogg, libvorbis, libgnomecanvas, gettext, perl }:
+
+stdenv.mkDerivation rec {
+  name = "beast-0.7.1";
+
+  src = fetchurl {
+    url = "https://ftp.gtk.org/pub/beast/v0.7/${name}.tar.bz2";
+    sha256 = "0jyl1i1918rsn4296w07fsf6wx3clvad522m3bzgf8ms7gxivg5l";
+  };
+
+  buildInputs =
+    [ zlib guile libart_lgpl pkgconfig intltool gtk2 glib
+      libogg libvorbis libgnomecanvas gettext
+    ];
+
+  patchPhase = ''
+    unset patchPhase; patchPhase
+    sed 's=-DG_DISABLE_DEPRECATED==g' -i `find -type f` # the patches didn't remove all occurences
+    sed 's=/bin/bash=/${stdenv.shell}=g' -i `find -type f`
+    sed 's=/usr/bin/perl=/${perl}/bin/perl=g' -i `find -type f`
+  '';
+
+  patches =
+    [ (fetchurl {
+        url = mirror://gentoo/distfiles/beast-0.7.1-guile-1.8.diff.bz2;
+        sha256 = "dc5194deff4b0a0eec368a69090db682d0c3113044ce2c2ed017ddfec9d3814e";
+      })
+      ./patch.patch # patches taken from gentoo
+    ];
+
+  meta = with stdenv.lib; {
+    description = "A music composition and modular synthesis application";
+    homepage = http://beast.gtk.org;
+    license = with licenses; [ gpl2 lgpl21 ];
+    broken = true;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/beast/patch.patch b/nixpkgs/pkgs/applications/audio/beast/patch.patch
new file mode 100644
index 000000000000..9d9f82cf4b4b
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/beast/patch.patch
@@ -0,0 +1,187 @@
+Index: beast-0.7.1/shell/Makefile.in
+===================================================================
+--- beast-0.7.1.orig/shell/Makefile.in
++++ beast-0.7.1/shell/Makefile.in
+@@ -859,10 +859,7 @@ check-before: check-installation
+ check-installation:
+ 	@for p in $(bin_PROGRAMS) ; do					\
+ 	  pp="$(DESTDIR)$(bindir)/$$p" ;				\
+-	  echo "TEST: test -x \"$$pp\"" ;				\
+-	  test -x "$$pp" ||						\
+-	    { echo "Failed to verify installation of executable: $$pp";	\
+-	      exit 1 ; }						\
++	  echo "TEST: test -x \"$$pp\" Test disabled" ;				\
+ 	done
+ # Tell versions [3.59,3.63) of GNU make to not export all variables.
+ # Otherwise a system limit (for SysV at least) may be exceeded.
+Index: beast-0.7.1/shell/Makefile.am
+===================================================================
+--- beast-0.7.1.orig/shell/Makefile.am
++++ beast-0.7.1/shell/Makefile.am
+@@ -859,10 +859,7 @@ check-before: check-installation
+ check-installation:
+ 	@for p in $(bin_PROGRAMS) ; do					\
+ 	  pp="$(DESTDIR)$(bindir)/$$p" ;				\
+-	  echo "TEST: test -x \"$$pp\"" ;				\
+-	  test -x "$$pp" ||						\
+-	    { echo "Failed to verify installation of executable: $$pp";	\
+-	      exit 1 ; }						\
++	  echo "TEST: test -x \"$$pp\" Test disabled" ;				\
+ 	done
+ # Tell versions [3.59,3.63) of GNU make to not export all variables.
+ # Otherwise a system limit (for SysV at least) may be exceeded.
+Index: beast-0.7.1/birnet/birnettests.h
+===================================================================
+--- beast-0.7.1.orig/birnet/birnettests.h
++++ beast-0.7.1/birnet/birnettests.h
+@@ -27,6 +27,7 @@
+ 
+ #include <glib.h>
+ #include <string.h>
++#include <signal.h>
+ 
+ BIRNET_EXTERN_C_BEGIN();
+ 
+Index: beast-0.7.1/tools/bseloopfuncs.c
+===================================================================
+--- beast-0.7.1.orig/tools/bseloopfuncs.c
++++ beast-0.7.1/tools/bseloopfuncs.c
+@@ -21,6 +21,7 @@
+ #include <string.h>
+ #include <stdio.h>
+ #include <math.h>
++#include <signal.h>
+ 
+ typedef struct {
+   gdouble score;
+--- beast-0.7.1.orig/bse/Makefile.am	2008-06-01 13:12:28.116708321 +0200
++++ beast-0.7.1/bse/Makefile.am	2008-06-01 13:12:40.000000000 +0200
+@@ -10,7 +10,7 @@
+ # need -I$(top_builddir) for <sfi/sficonfig.h>
+ # need -I$(srcdir) for "bseserver.h" in .genprc.c
+ # need -I. (builddir) for "bsecore.genidl.hh" in bsecore.cc
+-INCLUDES += -I$(top_srcdir) -I$(top_builddir) -I$(srcdir) -I. $(BSE_CFLAGS) -DG_DISABLE_DEPRECATED -DG_DISABLE_CONST_RETURNS
++INCLUDES += -I$(top_srcdir) -I$(top_builddir) -I$(srcdir) -I. $(BSE_CFLAGS) -DG_DISABLE_CONST_RETURNS
+ DEFS     += $(strip \
+ 	$(patsubst %, -DG_LOG_DOMAIN=\"BSE\" -DBSE_COMPILATION, \
+ 	              $(filter $(<F), $(bse_sources) $(bse_sources))) \
+--- beast-0.7.1.orig/bse/zintern/Makefile.am	2008-06-01 13:14:25.880028999 +0200
++++ beast-0.7.1/bse/zintern/Makefile.am	2008-06-01 13:14:38.000000000 +0200
+@@ -4,7 +4,7 @@
+ ## GNU Lesser General Public License version 2 or any later version.
+ include $(top_srcdir)/Makefile.decl
+ 
+-INCLUDES += -I$(top_srcdir) -I$(top_builddir) $(BSE_CFLAGS) -DG_DISABLE_DEPRECATED -DG_DISABLE_CONST_RETURNS
++INCLUDES += -I$(top_srcdir) -I$(top_builddir) $(BSE_CFLAGS) -DG_DISABLE_CONST_RETURNS
+ 
+ ZFILE_DEFS = $(strip \
+ 	wave-mono		$(srcdir)/wave-mono.bse		\
+--- a/configure.in	2008-06-01 15:19:46.000000000 +0200
++++ b/configure.in	2008-06-01 15:27:45.000000000 +0200
+@@ -159,39 +159,33 @@
+ dnl # Define package requirements.
+ dnl #
+ dnl ## include acintltool.m4 to provide IT_PROG_INTLTOOL
+-builtin(include, acintltool.m4)dnl
+-AC_DEFUN([AC_I18N_REQUIREMENTS],
+-[
+-    ALL_LINGUAS=`cat "$srcdir/po/LINGUAS" | grep -v '^#' | xargs echo -n `
+-    AC_SUBST(ALL_LINGUAS)
+-    AC_SUBST([CONFIG_STATUS_DEPENDENCIES], ['$(top_srcdir)/po/LINGUAS'])
+-
+-    dnl # versioned BEAST gettext domain (po/)
+-    BST_GETTEXT_DOMAIN=beast-v$BIN_VERSION    # version without -rcZ
+-    AC_SUBST(BST_GETTEXT_DOMAIN)
+-    AC_DEFINE_UNQUOTED(BST_GETTEXT_DOMAIN, "$BST_GETTEXT_DOMAIN", [Versioned BEAST gettext domain])
+-    GETTEXT_PACKAGE=$BST_GETTEXT_DOMAIN
+-    AC_SUBST(GETTEXT_PACKAGE)
+-
+-    dnl # locale directory for all domains
+-    dnl # (AM_GLIB_DEFINE_LOCALEDIR() could do this if it would do AC_SUBST())
+-    saved_prefix="$prefix"
+-    saved_exec_prefix="$exec_prefix"
+-    test "x$prefix" = xNONE && prefix=$ac_default_prefix
+-    test "x$exec_prefix" = xNONE && exec_prefix=$prefix
+-    if test "x$CATOBJEXT" = "x.mo" ; then
+-      beastlocaledir=`eval echo "${libdir}/locale"`
+-    else
+-      beastlocaledir=`eval echo "${datadir}/locale"`
+-    fi
+-    exec_prefix="$saved_exec_prefix"
+-    prefix="$saved_prefix"
+-    AC_SUBST(beastlocaledir)
+-
+-    dnl # do gettext checks and prepare for intltool
+-    AM_GLIB_GNU_GETTEXT
+-    IT_PROG_INTLTOOL
+-])
++IT_PROG_INTLTOOL([0.35.0])
++
++dnl # versioned BEAST gettext domain (po/)
++BST_GETTEXT_DOMAIN=beast-v$BIN_VERSION    # version without -rcZ
++AC_SUBST(BST_GETTEXT_DOMAIN)
++AC_DEFINE_UNQUOTED(BST_GETTEXT_DOMAIN, "$BST_GETTEXT_DOMAIN", [Versioned BEAST gettext domain])
++GETTEXT_PACKAGE=$BST_GETTEXT_DOMAIN
++AC_SUBST(GETTEXT_PACKAGE)
++
++dnl # locale directory for all domains
++dnl # (AM_GLIB_DEFINE_LOCALEDIR() could do this if it would do AC_SUBST())
++saved_prefix="$prefix"
++saved_exec_prefix="$exec_prefix"
++test "x$prefix" = xNONE && prefix=$ac_default_prefix
++test "x$exec_prefix" = xNONE && exec_prefix=$prefix
++if test "x$CATOBJEXT" = "x.mo" ; then
++  beastlocaledir=`eval echo "${libdir}/locale"`
++else
++  beastlocaledir=`eval echo "${datadir}/locale"`
++fi
++exec_prefix="$saved_exec_prefix"
++prefix="$saved_prefix"
++AC_SUBST(beastlocaledir)
++
++dnl # do gettext checks and prepare for intltool
++AM_GLIB_GNU_GETTEXT
++
+ AC_DEFUN([AC_SFI_REQUIREMENTS],
+ [
+     dnl # check for GLib libs, libbirnet already provides gthread-2.0 and glib-2.0
+@@ -570,7 +564,6 @@
+ AC_BIRNET_REQUIREMENTS
+ 
+ # Check requirement sets
+-AC_I18N_REQUIREMENTS
+ AC_SFI_REQUIREMENTS
+ AC_BSE_REQUIREMENTS
+ AC_BSESCM_REQUIREMENTS
+--- a/po/POTFILES.in	2008-06-22 15:12:10.000000000 +0200
++++ b/po/POTFILES.in	2008-06-22 15:13:28.000000000 +0200
+@@ -131,3 +131,29 @@
+ plugins/davxtalstrings.c
+ plugins/freeverb/bsefreeverb.c
+ tools/bsewavetool.cc
++
++beast-gtk/bstgentypes.c
++birnet/birnetcpu.cc
++birnet/birnetutils.hh
++bse/bsebus.genprc.c
++bse/bsebusmodule.genidl.hh
++bse/bsecontainer.genprc.c
++bse/bsecore.genidl.hh
++bse/bseieee754.h
++bse/bseladspamodule.c
++bse/bseparasite.genprc.c
++bse/bsesong.genprc.c
++bse/bsesource.genprc.c
++bse/bsetrack.genprc.c
++plugins/artscompressor.genidl.hh
++plugins/bseamplifier.genidl.hh
++plugins/bsebalance.genidl.hh
++plugins/bsecontribsampleandhold.genidl.hh
++plugins/bsenoise.genidl.hh
++plugins/bsequantizer.genidl.hh
++plugins/bsesummation.genidl.hh
++plugins/davbassfilter.genidl.hh
++plugins/davchorus.genidl.hh
++plugins/standardguspatchenvelope.genidl.hh
++plugins/standardsaturator.genidl.hh
++tests/latency/bselatencytest.genidl.hh
diff --git a/nixpkgs/pkgs/applications/audio/bitmeter/default.nix b/nixpkgs/pkgs/applications/audio/bitmeter/default.nix
new file mode 100644
index 000000000000..fbe2c97042f0
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/bitmeter/default.nix
@@ -0,0 +1,29 @@
+{ stdenv, autoreconfHook, fetchurl, libjack2, gtk2, pkgconfig }:
+
+stdenv.mkDerivation rec {
+  name = "bitmeter-${version}";
+  version = "1.2";
+
+  src = fetchurl {
+    url = "https://devel.tlrmx.org/audio/source/${name}.tar.gz";
+    sha256 = "09ck2gxqky701dc1p0ip61rrn16v0pdc7ih2hc2sd63zcw53g2a7";
+  };
+
+  nativeBuildInputs = [ autoreconfHook pkgconfig ];
+  buildInputs = [ libjack2 gtk2 ];
+
+  patches = [
+    (fetchurl {
+      url = https://gitweb.gentoo.org/repo/gentoo.git/plain/media-sound/bitmeter/files/bitmeter-1.2-fix-build-system.patch;
+      sha256 = "021mz6933iw7mpk6b9cbjr8naj6smbq1hwqjszlyx72qbwrrid7k";
+    })
+  ];
+
+  meta = with stdenv.lib; {
+    homepage = http://devel.tlrmx.org/audio/bitmeter/;
+    description = "Also known as jack bitscope. Useful to detect denormals";
+    license = licenses.gpl2;
+    maintainers = [ maintainers.magnetophon ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/bitwig-studio/bitwig-studio1.nix b/nixpkgs/pkgs/applications/audio/bitwig-studio/bitwig-studio1.nix
new file mode 100644
index 000000000000..7a80fecab718
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/bitwig-studio/bitwig-studio1.nix
@@ -0,0 +1,98 @@
+{ stdenv, fetchurl, alsaLib, bzip2, cairo, dpkg, freetype, gdk_pixbuf
+, wrapGAppsHook, gtk2, gtk3, harfbuzz, jdk, lib, xorg
+, libbsd, libjack2, libpng, ffmpeg
+, libxkbcommon
+, makeWrapper, pixman, autoPatchelfHook
+, xdg_utils, zenity, zlib }:
+
+stdenv.mkDerivation rec {
+  name = "bitwig-studio-${version}";
+  version = "1.3.16";
+
+  src = fetchurl {
+    url    = "https://downloads.bitwig.com/stable/${version}/bitwig-studio-${version}.deb";
+    sha256 = "0n0fxh9gnmilwskjcayvjsjfcs3fz9hn00wh7b3gg0cv3qqhich8";
+  };
+
+  nativeBuildInputs = [ dpkg makeWrapper autoPatchelfHook wrapGAppsHook ];
+
+  unpackCmd = "mkdir root ; dpkg-deb -x $curSrc root";
+
+  dontBuild    = true;
+  dontWrapGApps = true; # we only want $gappsWrapperArgs here
+
+  buildInputs = with xorg; [
+    alsaLib bzip2.out cairo freetype gdk_pixbuf gtk2 gtk3 harfbuzz libX11 libXau
+    libXcursor libXdmcp libXext libXfixes libXrender libbsd libjack2 libpng libxcb
+    libxkbfile pixman xcbutil xcbutilwm zlib
+  ];
+
+  binPath = lib.makeBinPath [
+    xdg_utils zenity ffmpeg
+  ];
+
+  installPhase = ''
+    mkdir -p $out
+    cp -r opt/bitwig-studio $out/libexec
+
+    # Use NixOS versions of these libs instead of the bundled ones.
+    (
+      cd $out/libexec/lib/bitwig-studio
+      rm libbz2.so* libxkbfile.so* libXcursor.so* libXau.so* \
+         libXdmcp.so* libpng16.so* libxcb*.so* libharfbuzz.so* \
+         libcairo.so* libfreetype.so*
+      ln -s ${bzip2.out}/lib/libbz2.so.1.0.6 libbz2.so.1.0
+    )
+
+    # Use our OpenJDK instead of Bitwig’s bundled—and commercial!—one.
+    rm -rf $out/libexec/lib/jre
+    ln -s ${jdk.home}/jre $out/libexec/lib/jre
+
+    mkdir -p $out/bin
+    ln -s $out/libexec/bitwig-studio $out/bin/bitwig-studio
+
+    cp -r usr/share $out/share
+    substitute usr/share/applications/bitwig-studio.desktop \
+      $out/share/applications/bitwig-studio.desktop \
+      --replace /usr/bin/bitwig-studio $out/bin/bitwig-studio
+  '';
+
+  postFixup = ''
+    # Bitwig’s `libx11-windowing-system.so` has several problems:
+    #
+    #   • has some old version of libxkbcommon linked statically (ಠ_ಠ),
+    #
+    #   • hardcodes path to `/usr/share/X11/xkb`,
+    #
+    #   • even if we redirected it with libredirect (after adding
+    #     `eaccess()` to libredirect!), their version of libxkbcommon
+    #     is unable to parse our xkeyboardconfig. Been there, done that.
+    #
+    # However, it suffices to override theirs with our libxkbcommon
+    # in LD_PRELOAD. :-)
+
+    find $out -type f -executable \
+      -not -name '*.so.*' \
+      -not -name '*.so' \
+      -not -path '*/resources/*' | \
+    while IFS= read -r f ; do
+      wrapProgram $f \
+        --prefix PATH : "${binPath}" \
+        "''${gappsWrapperArgs[@]}" \
+        --set LD_PRELOAD "${libxkbcommon.out}/lib/libxkbcommon.so" || true
+    done
+  '';
+
+  meta = with stdenv.lib; {
+    description = "A digital audio workstation";
+    longDescription = ''
+      Bitwig Studio is a multi-platform music-creation system for
+      production, performance and DJing, with a focus on flexible
+      editing tools and a super-fast workflow.
+    '';
+    homepage = http://www.bitwig.com/;
+    license = licenses.unfree;
+    platforms = [ "x86_64-linux" ];
+    maintainers = with maintainers; [ michalrus mrVanDalo ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/bitwig-studio/bitwig-studio2.nix b/nixpkgs/pkgs/applications/audio/bitwig-studio/bitwig-studio2.nix
new file mode 100644
index 000000000000..0b7adefb3056
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/bitwig-studio/bitwig-studio2.nix
@@ -0,0 +1,16 @@
+{ stdenv, fetchurl, bitwig-studio1,
+  xdg_utils, zenity, ffmpeg, pulseaudio }:
+
+bitwig-studio1.overrideAttrs (oldAttrs: rec {
+  name = "bitwig-studio-${version}";
+  version = "2.4.3";
+
+  src = fetchurl {
+    url    = "https://downloads.bitwig.com/stable/${version}/bitwig-studio-${version}.deb";
+    sha256 = "17754y4ni0zj9vjxl8ldivi33gdb0nk6sdlcmlpskgffrlx8di08";
+  };
+
+  runtimeDependencies = [
+    pulseaudio
+  ];
+})
diff --git a/nixpkgs/pkgs/applications/audio/bristol/default.nix b/nixpkgs/pkgs/applications/audio/bristol/default.nix
new file mode 100644
index 000000000000..e1ed12b9bd2e
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/bristol/default.nix
@@ -0,0 +1,34 @@
+{ stdenv, fetchurl, alsaLib, libjack2, pkgconfig, libpulseaudio, xorg }:
+
+stdenv.mkDerivation  rec {
+  name = "bristol-${version}";
+  version = "0.60.11";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/bristol/${name}.tar.gz";
+    sha256 = "1fi2m4gmvxdi260821y09lxsimq82yv4k5bbgk3kyc3x1nyhn7vx";
+  };
+
+  nativeBuildInputs = [ pkgconfig ];
+  buildInputs = [
+    alsaLib libjack2 libpulseaudio xorg.libX11 xorg.libXext
+    xorg.xorgproto
+  ];
+
+  patchPhase = "sed -i '41,43d' libbristolaudio/audioEngineJack.c"; # disable alsa/iatomic
+
+  configurePhase = "./configure --prefix=$out --enable-jack-default-audio --enable-jack-default-midi";
+
+  preInstall = ''
+    sed -e "s@\`which bristol\`@$out/bin/bristol@g" -i bin/startBristol
+    sed -e "s@\`which brighton\`@$out/bin/brighton@g" -i bin/startBristol
+  '';
+
+  meta = with stdenv.lib; {
+    description = "A range of synthesiser, electric piano and organ emulations";
+    homepage = http://bristol.sourceforge.net;
+    license = licenses.gpl3;
+    platforms = ["x86_64-linux" "i686-linux"];
+    maintainers = [ maintainers.goibhniu ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/bs1770gain/default.nix b/nixpkgs/pkgs/applications/audio/bs1770gain/default.nix
new file mode 100644
index 000000000000..44296d3c8b99
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/bs1770gain/default.nix
@@ -0,0 +1,22 @@
+{ stdenv, fetchurl, ffmpeg, sox }:
+
+stdenv.mkDerivation rec {
+  name = "bs1770gain-${version}";
+  version = "0.5.1";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/bs1770gain/${name}.tar.gz";
+    sha256 = "0r4fbajgfmnwgl63hcm56f1j8m5f135q6j5jkzdvrrhpcj39yx06";
+  };
+
+  buildInputs = [ ffmpeg sox ];
+
+  NIX_CFLAGS_COMPILE = "-Wno-error";
+
+  meta = with stdenv.lib; {
+    description = "A audio/video loudness scanner implementing ITU-R BS.1770";
+    license = licenses.gpl2Plus;
+    homepage = http://bs1770gain.sourceforge.net/;
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/cadence/default.nix b/nixpkgs/pkgs/applications/audio/cadence/default.nix
new file mode 100644
index 000000000000..ef7eeab4b60c
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/cadence/default.nix
@@ -0,0 +1,81 @@
+{ stdenv
+, fetchzip
+, pkgconfig
+, qtbase
+, makeWrapper
+, jack2Full
+, python3Packages
+, a2jmidid
+}:
+
+ stdenv.mkDerivation rec {
+  version = "0.9.0";
+  pname = "cadence";
+
+  src = fetchzip {
+    url = "https://github.com/falkTX/Cadence/archive/v${version}.tar.gz";
+    sha256 = "08vcggypkdfr70v49innahs5s11hi222dhhnm5wcqzdgksphqzwx";
+  };
+
+  nativeBuildInputs = [ makeWrapper pkgconfig ];
+  buildInputs = [ qtbase ];
+
+  makeFlags = ''
+    PREFIX=""
+    DESTDIR=$(out)
+  '';
+
+  propagatedBuildInputs = with python3Packages; [ pyqt5_with_qtwebkit ];
+
+  postInstall = ''
+    # replace with our own wrappers. They need to be changed manually since it wouldn't work otherwise
+    rm $out/bin/cadence
+    makeWrapper ${python3Packages.python.interpreter} $out/bin/cadence \
+      --set PYTHONPATH "$PYTHONPATH:$out/share/cadence" \
+      --add-flags "-O $out/share/cadence/src/cadence.py"
+    rm $out/bin/claudia
+    makeWrapper ${python3Packages.python.interpreter} $out/bin/claudia \
+      --set PYTHONPATH "$PYTHONPATH:$out/share/cadence" \
+      --add-flags "-O $out/share/cadence/src/claudia.py"
+    rm $out/bin/catarina
+    makeWrapper ${python3Packages.python.interpreter} $out/bin/catarina \
+      --set PYTHONPATH "$PYTHONPATH:$out/share/cadence" \
+      --add-flags "-O $out/share/cadence/src/catarina.py"
+    rm $out/bin/catia
+    makeWrapper ${python3Packages.python.interpreter} $out/bin/catia \
+      --set PYTHONPATH "$PYTHONPATH:$out/share/cadence" \
+      --add-flags "-O $out/share/cadence/src/catia.py"
+    rm $out/bin/cadence-jacksettings
+    makeWrapper ${python3Packages.python.interpreter} $out/bin/cadence-jacksettings \
+      --set PYTHONPATH "$PYTHONPATH:$out/share/cadence" \
+      --add-flags "-O $out/share/cadence/src/jacksettings.py"
+    rm $out/bin/cadence-aloop-daemon
+    makeWrapper ${python3Packages.python.interpreter} $out/bin/cadence-aloop-daemon \
+      --set PYTHONPATH "$PYTHONPATH:$out/share/cadence" \
+      --add-flags "-O $out/share/cadence/src/cadence_aloop_daemon.py"
+    rm $out/bin/cadence-logs
+    makeWrapper ${python3Packages.python.interpreter} $out/bin/cadence-logs \
+      --set PYTHONPATH "$PYTHONPATH:$out/share/cadence" \
+      --add-flags "-O $out/share/cadence/src/logs.py"
+    rm $out/bin/cadence-render
+    makeWrapper ${python3Packages.python.interpreter} $out/bin/cadence-render \
+      --set PYTHONPATH "$PYTHONPATH:$out/share/cadence" \
+      --add-flags "-O $out/share/cadence/src/render.py"
+    rm $out/bin/claudia-launcher
+    makeWrapper ${python3Packages.python.interpreter} $out/bin/claudia-launcher \
+      --set PYTHONPATH "$PYTHONPATH:$out/share/cadence" \
+      --add-flags "-O $out/share/cadence/src/claudia_launcher.py"
+    rm $out/bin/cadence-session-start
+    makeWrapper ${python3Packages.python.interpreter} $out/bin/cadence-session-start \
+      --set PYTHONPATH "$PYTHONPATH:$out/share/cadence" \
+      --add-flags "-O $out/share/cadence/src/cadence_session_start.py"
+  '';
+
+  meta = {
+    homepage = https://github.com/falkTX/Cadence/;
+    description = "Collection of tools useful for audio production";
+    license = stdenv.lib.licenses.gpl2Plus;
+    maintainers = with stdenv.lib.maintainers; [ genesis ];
+    platforms = [ "x86_64-linux" ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/calf/default.nix b/nixpkgs/pkgs/applications/audio/calf/default.nix
new file mode 100644
index 000000000000..94b43fc544ac
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/calf/default.nix
@@ -0,0 +1,34 @@
+{ stdenv, fetchurl, fetchpatch, cairo, expat, fftwSinglePrec, fluidsynth, glib
+, gtk2, libjack2, ladspaH , libglade, lv2, pkgconfig }:
+
+stdenv.mkDerivation rec {
+  name = "calf-${version}";
+  version = "0.90.0";
+
+  src = fetchurl {
+    url = "https://calf-studio-gear.org/files/${name}.tar.gz";
+    sha256 = "0dijv2j7vlp76l10s4v8gbav26ibaqk8s24ci74vrc398xy00cib";
+  };
+
+  patches = [
+    # Fix memory leak in limiter
+    # https://github.com/flathub/com.github.wwmm.pulseeffects/issues/12
+    (fetchpatch {
+      url = https://github.com/calf-studio-gear/calf/commit/7afdefc0d0489a6227fd10f15843d81dc82afd62.patch;
+      sha256 = "056662iw6hp4ykwk4jyrzg5yarcn17ni97yc060y5kcnzy29ddg6";
+    })
+  ];
+
+  buildInputs = [
+    cairo expat fftwSinglePrec fluidsynth glib gtk2 libjack2 ladspaH
+    libglade lv2 pkgconfig
+  ];
+
+  meta = with stdenv.lib; {
+    homepage = http://calf-studio-gear.org;
+    description = "A set of high quality open source audio plugins for musicians";
+    license = licenses.lgpl2;
+    maintainers = [ maintainers.goibhniu ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/cantata/default.nix b/nixpkgs/pkgs/applications/audio/cantata/default.nix
new file mode 100644
index 000000000000..64e99768dedb
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/cantata/default.nix
@@ -0,0 +1,88 @@
+{ stdenv, fetchFromGitHub, fetchpatch, cmake, pkgconfig, vlc
+, qtbase, qtmultimedia, qtsvg, qttools
+
+# Cantata doesn't build with cdparanoia enabled so we disable that
+# default for now until I (or someone else) figure it out.
+, withCdda ? false, cdparanoia
+, withCddb ? false, libcddb
+, withLame ? false, lame
+, withMusicbrainz ? false, libmusicbrainz5
+
+, withTaglib ? true, taglib, taglib_extras
+, withReplaygain ? true, ffmpeg, speex, mpg123
+, withMtp ? true, libmtp
+, withOnlineServices ? true
+, withDevices ? true, udisks2
+, withDynamic ? true
+, withHttpServer ? true
+, withStreams ? true
+}:
+
+# Inter-dependencies.
+assert withCddb -> withCdda && withTaglib;
+assert withCdda -> withCddb && withMusicbrainz;
+assert withLame -> withCdda && withTaglib;
+assert withMtp -> withTaglib;
+assert withMusicbrainz -> withCdda && withTaglib;
+assert withOnlineServices -> withTaglib;
+assert withReplaygain -> withTaglib;
+
+let
+  version = "2.3.3";
+  pname = "cantata";
+  fstat = x: fn: "-DENABLE_" + fn + "=" + (if x then "ON" else "OFF");
+  fstats = x: map (fstat x);
+
+  withUdisks = (withTaglib && withDevices);
+
+in stdenv.mkDerivation rec {
+  name = "${pname}-${version}";
+
+  src = fetchFromGitHub {
+    owner  = "CDrummond";
+    repo   = "cantata";
+    rev    = "v${version}";
+    sha256 = "1m651fmdbnb50glym75kzma0bllvqbmrb2afp1g9g5cxm1898c0f";
+  };
+
+  buildInputs = [ vlc qtbase qtmultimedia qtsvg ]
+    ++ stdenv.lib.optionals withTaglib [ taglib taglib_extras ]
+    ++ stdenv.lib.optionals withReplaygain [ ffmpeg speex mpg123 ]
+    ++ stdenv.lib.optional  withCdda cdparanoia
+    ++ stdenv.lib.optional  withCddb libcddb
+    ++ stdenv.lib.optional  withLame lame
+    ++ stdenv.lib.optional  withMtp libmtp
+    ++ stdenv.lib.optional  withMusicbrainz libmusicbrainz5
+    ++ stdenv.lib.optional  withUdisks udisks2;
+
+  nativeBuildInputs = [ cmake pkgconfig qttools ];
+
+  enableParallelBuilding = true;
+
+  cmakeFlags = stdenv.lib.flatten [
+    (fstats withTaglib        [ "TAGLIB" "TAGLIB_EXTRAS" ])
+    (fstats withReplaygain    [ "FFMPEG" "MPG123" "SPEEXDSP" ])
+    (fstat withCdda           "CDPARANOIA")
+    (fstat withCddb           "CDDB")
+    (fstat withLame           "LAME")
+    (fstat withMtp            "MTP")
+    (fstat withMusicbrainz    "MUSICBRAINZ")
+    (fstat withOnlineServices "ONLINE_SERVICES")
+    (fstat withDynamic        "DYNAMIC")
+    (fstat withDevices        "DEVICES_SUPPORT")
+    (fstat withHttpServer     "HTTP_SERVER")
+    (fstat withStreams        "STREAMS")
+    (fstat withUdisks         "UDISKS2")
+    "-DENABLE_HTTPS_SUPPORT=ON"
+  ];
+
+  meta = with stdenv.lib; {
+    homepage    = https://github.com/cdrummond/cantata;
+    description = "A graphical client for MPD";
+    license     = licenses.gpl3;
+    maintainers = with maintainers; [ fuuzetsu peterhoeg ];
+    # Technically Cantata can run on Windows so if someone wants to
+    # bother figuring that one out, be my guest.
+    platforms   = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/caps/default.nix b/nixpkgs/pkgs/applications/audio/caps/default.nix
new file mode 100644
index 000000000000..1f53809e9059
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/caps/default.nix
@@ -0,0 +1,30 @@
+{ stdenv, fetchurl }:
+stdenv.mkDerivation rec {
+  name = "caps-${version}";
+  version = "0.9.26";
+  src = fetchurl {
+    url = "http://www.quitte.de/dsp/caps_${version}.tar.bz2";
+    sha256 = "1jcq9y51vdnk93q27r566y9qmddvadhr4ddnvkiypaq5rrdnqjg7";
+  };
+
+  configurePhase = ''
+    echo "PREFIX = $out" > defines.make
+  '';
+
+  meta = {
+    description = "A selection of LADSPA plugins implementing classic effects";
+    longDescription = ''
+      The C* Audio Plugin Suite is a selection of classic effects,
+      unique filters and signal generators.  The digital guitarist
+      finds in CAPS a range of processors recreating key aspects of
+      the formation of tone in traditional electronic instrument
+      amplification.  Beyond sound quality, central design
+      considerations are latency-free realtime operation, modesty of
+      resource demands and meaningful control interfaces.
+    '';
+    homepage = http://www.quitte.de/dsp/caps.html;
+    license = stdenv.lib.licenses.gpl3;
+    maintainers = [ stdenv.lib.maintainers.astsmtl ];
+    platforms = stdenv.lib.platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/caudec/default.nix b/nixpkgs/pkgs/applications/audio/caudec/default.nix
new file mode 100644
index 000000000000..04f0f9d30259
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/caudec/default.nix
@@ -0,0 +1,38 @@
+{ stdenv, fetchurl, makeWrapper, bash, bc, findutils, flac, lame, opusTools, procps, sox }:
+
+let
+  version = "1.7.5";
+in
+
+stdenv.mkDerivation rec {
+  name = "caudec-${version}";
+
+  src = fetchurl {
+    url = "http://caudec.net/downloads/caudec-${version}.tar.gz";
+    sha256 = "5d1f5ab3286bb748bd29cbf45df2ad2faf5ed86070f90deccf71c60be832f3d5";
+  };
+
+  preBuild = ''
+    patchShebangs ./install.sh
+  '';
+
+  buildInputs = [ bash makeWrapper ];
+
+  installPhase = ''
+    ./install.sh --prefix=$out/bin
+  '';
+
+  postFixup = ''
+    for executable in $(cd $out/bin && ls); do
+	wrapProgram $out/bin/$executable \
+	  --prefix PATH : "${stdenv.lib.makeBinPath [ bc findutils sox procps opusTools lame flac ]}"
+    done
+  '';
+
+   meta = with stdenv.lib; {
+    homepage = http://caudec.net/;
+    description = "A multiprocess audio converter that supports many formats (FLAC, MP3, Ogg Vorbis, Windows codecs and many more)";
+    license     = licenses.gpl3;
+    platforms   = platforms.linux ++ platforms.darwin;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/cava/default.nix b/nixpkgs/pkgs/applications/audio/cava/default.nix
new file mode 100644
index 000000000000..439175b090a8
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/cava/default.nix
@@ -0,0 +1,38 @@
+{ stdenv, fetchFromGitHub, autoreconfHook, alsaLib, fftw,
+  libpulseaudio, ncurses }:
+
+stdenv.mkDerivation rec {
+  name = "cava-${version}";
+  version = "0.6.1";
+
+  buildInputs = [
+    alsaLib
+    fftw
+    libpulseaudio
+    ncurses
+  ];
+
+  src = fetchFromGitHub {
+    owner = "karlstav";
+    repo = "cava";
+    rev = version;
+    sha256 = "1kvhqgijs29909w3sq9m0bslx2zxxn4b3i07kdz4hb0dqkppxpjy";
+  };
+
+  nativeBuildInputs = [ autoreconfHook ];
+
+  postConfigure = ''
+    substituteInPlace Makefile.am \
+      --replace "-L/usr/local/lib -Wl,-rpath /usr/local/lib" ""
+    substituteInPlace configure.ac \
+      --replace "/usr/share/consolefonts" "$out/share/consolefonts"
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Console-based Audio Visualizer for Alsa";
+    homepage = https://github.com/karlstav/cava;
+    license = licenses.mit;
+    maintainers = with maintainers; [ offline mirrexagon ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/cd-discid/default.nix b/nixpkgs/pkgs/applications/audio/cd-discid/default.nix
new file mode 100644
index 000000000000..382d4a1b6675
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/cd-discid/default.nix
@@ -0,0 +1,31 @@
+{ fetchurl, stdenv
+, IOKit ? null }:
+
+stdenv.mkDerivation rec {
+  name = "cd-discid-${version}";
+  version = "1.4";
+
+  src = fetchurl {
+    url = "http://linukz.org/download/${name}.tar.gz";
+    sha256 = "0qrcvn7227qaayjcd5rm7z0k5q89qfy5qkdgwr5pd7ih0va8rmpz";
+  };
+
+  installFlags = "PREFIX=$(out) INSTALL=install";
+
+  buildInputs = []
+    ++ stdenv.lib.optional stdenv.isDarwin IOKit;
+
+  meta = with stdenv.lib; {
+    homepage = http://linukz.org/cd-discid.shtml;
+    license = licenses.gpl2Plus;
+    maintainers = [ maintainers.rycee ];
+    platforms = platforms.unix;
+    description = "Command-line utility to get CDDB discid information from a CD-ROM disc";
+
+    longDescription = ''
+      cd-discid is a backend utility to get CDDB discid information
+      from a CD-ROM disc.  It was originally designed for cdgrab (now
+      abcde), but can be used for any purpose requiring CDDB data.
+    '';
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/cdparanoia/default.nix b/nixpkgs/pkgs/applications/audio/cdparanoia/default.nix
new file mode 100644
index 000000000000..c419d141d1ba
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/cdparanoia/default.nix
@@ -0,0 +1,43 @@
+{ stdenv, fetchurl, autoreconfHook, gnu-config, IOKit, Carbon }:
+
+stdenv.mkDerivation rec {
+  name = "cdparanoia-III-10.2";
+
+  src = fetchurl {
+    url = "http://downloads.xiph.org/releases/cdparanoia/${name}.src.tgz";
+    sha256 = "1pv4zrajm46za0f6lv162iqffih57a8ly4pc69f7y0gfyigb8p80";
+  };
+
+  patches = stdenv.lib.optionals stdenv.isDarwin [
+    (fetchurl {
+      url = "https://trac.macports.org/export/70964/trunk/dports/audio/cdparanoia/files/osx_interface.patch";
+      sha256 = "1n86kzm2ssl8fdf5wlhp6ncb2bf6b9xlb5vg0mhc85r69prqzjiy";
+    })
+    (fetchurl {
+      url = "https://trac.macports.org/export/70964/trunk/dports/audio/cdparanoia/files/patch-paranoia_paranoia.c.10.4.diff";
+      sha256 = "17l2qhn8sh4jy6ryy5si6ll6dndcm0r537rlmk4a6a8vkn852vad";
+    })
+    ] ++ stdenv.lib.optional stdenv.hostPlatform.isMusl ./utils.patch
+    ++ [./fix_private_keyword.patch];
+
+  buildInputs = stdenv.lib.optional stdenv.isAarch64 autoreconfHook;
+
+  propagatedBuildInputs = stdenv.lib.optionals stdenv.isDarwin [
+    Carbon
+    IOKit
+  ];
+
+  hardeningDisable = [ "format" ];
+
+  preConfigure = "unset CC" + stdenv.lib.optionalString stdenv.isAarch64 ''\n
+    cp ${gnu-config}/config.sub configure.sub
+    cp ${gnu-config}/config.guess configure.guess
+  '';
+
+  meta = with stdenv.lib; {
+    homepage = https://xiph.org/paranoia;
+    description = "A tool and library for reading digital audio from CDs";
+    license = with licenses; [ gpl2Plus lgpl21Plus ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/cdparanoia/fix_private_keyword.patch b/nixpkgs/pkgs/applications/audio/cdparanoia/fix_private_keyword.patch
new file mode 100644
index 000000000000..3e9cbe2bd8c2
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/cdparanoia/fix_private_keyword.patch
@@ -0,0 +1,468 @@
+--- cdparanoia-III-10.2/interface/cdda_interface.h	(revision 15337)
++++ cdparanoia-III-10.2/interface/cdda_interface.h	(revision 15338)
+@@ -85,5 +85,5 @@
+   int is_mmc;
+ 
+-  cdda_private_data_t *private;
++  cdda_private_data_t *private_data;
+   void         *reserved;
+   unsigned char inqbytes[4];
+--- cdparanoia-III-10.2/interface/cooked_interface.c	(revision 15337)
++++ cdparanoia-III-10.2/interface/cooked_interface.c	(revision 15338)
+@@ -14,11 +14,11 @@
+   struct timespec tv1;
+   struct timespec tv2;
+-  int ret1=clock_gettime(d->private->clock,&tv1);
++  int ret1=clock_gettime(d->private_data->clock,&tv1);
+   int ret2=ioctl(fd, command,arg);
+-  int ret3=clock_gettime(d->private->clock,&tv2);
++  int ret3=clock_gettime(d->private_data->clock,&tv2);
+   if(ret1<0 || ret3<0){
+-    d->private->last_milliseconds=-1;
++    d->private_data->last_milliseconds=-1;
+   }else{
+-    d->private->last_milliseconds = (tv2.tv_sec-tv1.tv_sec)*1000. + (tv2.tv_nsec-tv1.tv_nsec)/1000000.;
++    d->private_data->last_milliseconds = (tv2.tv_sec-tv1.tv_sec)*1000. + (tv2.tv_nsec-tv1.tv_nsec)/1000000.;
+   }
+   return ret2;
+--- cdparanoia-III-10.2/interface/interface.c	(revision 15337)
++++ cdparanoia-III-10.2/interface/interface.c	(revision 15338)
+@@ -40,7 +40,7 @@
+     if(d->cdda_fd!=-1)close(d->cdda_fd);
+     if(d->ioctl_fd!=-1 && d->ioctl_fd!=d->cdda_fd)close(d->ioctl_fd);
+-    if(d->private){
+-      if(d->private->sg_hd)free(d->private->sg_hd);
+-      free(d->private);
++    if(d->private_data){
++      if(d->private_data->sg_hd)free(d->private_data->sg_hd);
++      free(d->private_data);
+     }
+ 
+@@ -128,5 +128,5 @@
+       }	
+     }
+-    if(ms)*ms=d->private->last_milliseconds;
++    if(ms)*ms=d->private_data->last_milliseconds;
+     return(sectors);
+   }
+--- cdparanoia-III-10.2/interface/scan_devices.c	(revision 15337)
++++ cdparanoia-III-10.2/interface/scan_devices.c	(revision 15338)
+@@ -265,9 +265,9 @@
+   d->bigendianp=-1; /* We don't know yet... */
+   d->nsectors=-1;
+-  d->private=calloc(1,sizeof(*d->private));
++  d->private_data=calloc(1,sizeof(*d->private_data));
+   {
+     /* goddamnit */
+     struct timespec tv;
+-    d->private->clock=(clock_gettime(CLOCK_MONOTONIC,&tv)<0?CLOCK_REALTIME:CLOCK_MONOTONIC);
++    d->private_data->clock=(clock_gettime(CLOCK_MONOTONIC,&tv)<0?CLOCK_REALTIME:CLOCK_MONOTONIC);
+   }
+   idmessage(messagedest,messages,"\t\tCDROM sensed: %s\n",description);
+@@ -675,13 +675,13 @@
+   d->nsectors=-1;
+   d->messagedest = messagedest;
+-  d->private=calloc(1,sizeof(*d->private));
++  d->private_data=calloc(1,sizeof(*d->private_data));
+   {
+     /* goddamnit */
+     struct timespec tv;
+-    d->private->clock=(clock_gettime(CLOCK_MONOTONIC,&tv)<0?CLOCK_REALTIME:CLOCK_MONOTONIC);
++    d->private_data->clock=(clock_gettime(CLOCK_MONOTONIC,&tv)<0?CLOCK_REALTIME:CLOCK_MONOTONIC);
+   }
+   if(use_sgio){
+     d->interface=SGIO_SCSI;
+-    d->private->sg_buffer=(unsigned char *)(d->private->sg_hd=malloc(MAX_BIG_BUFF_SIZE));
++    d->private_data->sg_buffer=(unsigned char *)(d->private_data->sg_hd=malloc(MAX_BIG_BUFF_SIZE));
+     g_fd=d->cdda_fd=dup(d->ioctl_fd);
+   }else{
+@@ -697,6 +697,6 @@
+ 
+     /* malloc our big buffer for scsi commands */
+-    d->private->sg_hd=malloc(MAX_BIG_BUFF_SIZE);
+-    d->private->sg_buffer=((unsigned char *)d->private->sg_hd)+SG_OFF;
++    d->private_data->sg_hd=malloc(MAX_BIG_BUFF_SIZE);
++    d->private_data->sg_buffer=((unsigned char *)d->private_data->sg_hd)+SG_OFF;
+   }
+ 
+@@ -773,7 +773,7 @@
+   if(g_fd!=-1)close(g_fd);
+   if(d){
+-    if(d->private){
+-      if(d->private->sg_hd)free(d->private->sg_hd);
+-      free(d->private);
++    if(d->private_data){
++      if(d->private_data->sg_hd)free(d->private_data->sg_hd);
++      free(d->private_data);
+     }
+     free(d);
+@@ -822,5 +822,5 @@
+   d->bigendianp=-1; /* We don't know yet... */
+   d->nsectors=-1;
+-  d->private=calloc(1,sizeof(*d->private));
++  d->private_data=calloc(1,sizeof(*d->private_data));
+   d->drive_model=copystring("File based test interface");
+   idmessage(messagedest,messages,"\t\tCDROM sensed: %s\n",d->drive_model);
+--- cdparanoia-III-10.2/interface/scsi_interface.c	(revision 15337)
++++ cdparanoia-III-10.2/interface/scsi_interface.c	(revision 15338)
+@@ -16,11 +16,11 @@
+   struct timespec tv1;
+   struct timespec tv2;
+-  int ret1=clock_gettime(d->private->clock,&tv1);
++  int ret1=clock_gettime(d->private_data->clock,&tv1);
+   int ret2=ioctl(fd, command,arg);
+-  int ret3=clock_gettime(d->private->clock,&tv2);
++  int ret3=clock_gettime(d->private_data->clock,&tv2);
+   if(ret1<0 || ret3<0){
+-    d->private->last_milliseconds=-1;
++    d->private_data->last_milliseconds=-1;
+   }else{
+-    d->private->last_milliseconds = (tv2.tv_sec-tv1.tv_sec)*1000. + (tv2.tv_nsec-tv1.tv_nsec)/1000000.;
++    d->private_data->last_milliseconds = (tv2.tv_sec-tv1.tv_sec)*1000. + (tv2.tv_nsec-tv1.tv_nsec)/1000000.;
+   }
+   return ret2;
+@@ -97,5 +97,5 @@
+   fd_set fdset;
+   struct timeval tv;
+-  struct sg_header *sg_hd=d->private->sg_hd;
++  struct sg_header *sg_hd=d->private_data->sg_hd;
+   int flag=0;
+ 
+@@ -186,5 +186,5 @@
+   int tret1,tret2;
+   int status = 0;
+-  struct sg_header *sg_hd=d->private->sg_hd;
++  struct sg_header *sg_hd=d->private_data->sg_hd;
+   long writebytes=SG_OFF+cmd_len+in_size;
+ 
+@@ -196,5 +196,5 @@
+   memset(sg_hd,0,sizeof(sg_hd)); 
+   memset(sense_buffer,0,SG_MAX_SENSE); 
+-  memcpy(d->private->sg_buffer,cmd,cmd_len+in_size);
++  memcpy(d->private_data->sg_buffer,cmd,cmd_len+in_size);
+   sg_hd->twelve_byte = cmd_len == 12;
+   sg_hd->result = 0;
+@@ -210,5 +210,5 @@
+ 
+   if(bytecheck && out_size>in_size){
+-    memset(d->private->sg_buffer+cmd_len+in_size,bytefill,out_size-in_size); 
++    memset(d->private_data->sg_buffer+cmd_len+in_size,bytefill,out_size-in_size); 
+     /* the size does not remove cmd_len due to the way the kernel
+        driver copies buffers */
+@@ -244,5 +244,5 @@
+ 
+   sigprocmask (SIG_BLOCK, &(d->sigset), NULL );
+-  tret1=clock_gettime(d->private->clock,&tv1);  
++  tret1=clock_gettime(d->private_data->clock,&tv1);  
+   errno=0;
+   status = write(d->cdda_fd, sg_hd, writebytes );
+@@ -290,5 +290,5 @@
+   }
+ 
+-  tret2=clock_gettime(d->private->clock,&tv2);  
++  tret2=clock_gettime(d->private_data->clock,&tv2);  
+   errno=0;
+   status = read(d->cdda_fd, sg_hd, SG_OFF + out_size);
+@@ -314,5 +314,5 @@
+     long i,flag=0;
+     for(i=in_size;i<out_size;i++)
+-      if(d->private->sg_buffer[i]!=bytefill){
++      if(d->private_data->sg_buffer[i]!=bytefill){
+ 	flag=1;
+ 	break;
+@@ -327,7 +327,7 @@
+   errno=0;
+   if(tret1<0 || tret2<0){
+-    d->private->last_milliseconds=-1;
++    d->private_data->last_milliseconds=-1;
+   }else{
+-    d->private->last_milliseconds = (tv2.tv_sec-tv1.tv_sec)*1000 + (tv2.tv_nsec-tv1.tv_nsec)/1000000;
++    d->private_data->last_milliseconds = (tv2.tv_sec-tv1.tv_sec)*1000 + (tv2.tv_nsec-tv1.tv_nsec)/1000000;
+   }
+   return(0);
+@@ -348,5 +348,5 @@
+   memset(&hdr,0,sizeof(hdr));
+   memset(sense,0,sizeof(sense));
+-  memcpy(d->private->sg_buffer,cmd+cmd_len,in_size);
++  memcpy(d->private_data->sg_buffer,cmd+cmd_len,in_size);
+ 
+   hdr.cmdp = cmd;
+@@ -356,5 +356,5 @@
+   hdr.timeout = 50000;
+   hdr.interface_id = 'S';
+-  hdr.dxferp =  d->private->sg_buffer;
++  hdr.dxferp =  d->private_data->sg_buffer;
+   hdr.flags = SG_FLAG_DIRECT_IO;  /* direct IO if we can get it */
+ 
+@@ -401,5 +401,5 @@
+     long i,flag=0;
+     for(i=in_size;i<out_size;i++)
+-      if(d->private->sg_buffer[i]!=bytefill){
++      if(d->private_data->sg_buffer[i]!=bytefill){
+ 	flag=1;
+ 	break;
+@@ -413,5 +413,5 @@
+ 
+   /* Can't rely on .duration because we can't be certain kernel has HZ set to something useful */
+-  /* d->private->last_milliseconds = hdr.duration; */
++  /* d->private_data->last_milliseconds = hdr.duration; */
+ 
+   errno = 0;
+@@ -446,7 +446,7 @@
+   handle_scsi_cmd(d, cmd, 6, 0, 56, 0,0, sense);
+ 
+-  key = d->private->sg_buffer[2] & 0xf;
+-  ASC = d->private->sg_buffer[12];
+-  ASCQ = d->private->sg_buffer[13];
++  key = d->private_data->sg_buffer[2] & 0xf;
++  ASC = d->private_data->sg_buffer[12];
++  ASCQ = d->private_data->sg_buffer[13];
+   
+   if(key == 2 && ASC == 4 && ASCQ == 1) return 0;
+@@ -493,5 +493,5 @@
+ 
+   {
+-    unsigned char *b=d->private->sg_buffer;
++    unsigned char *b=d->private_data->sg_buffer;
+     if(b[0])return(1); /* Handles only up to 256 bytes */
+     if(b[6])return(1); /* Handles only up to 256 bytes */
+@@ -605,6 +605,6 @@
+   if(mode_sense(d,12,0x01))return(-1);
+ 
+-  d->orgdens = d->private->sg_buffer[4];
+-  return(d->orgsize = ((int)(d->private->sg_buffer[10])<<8)+d->private->sg_buffer[11]);
++  d->orgdens = d->private_data->sg_buffer[4];
++  return(d->orgsize = ((int)(d->private_data->sg_buffer[10])<<8)+d->private_data->sg_buffer[11]);
+ }
+ 
+@@ -665,6 +665,6 @@
+   }
+ 
+-  first=d->private->sg_buffer[2];
+-  last=d->private->sg_buffer[3];
++  first=d->private_data->sg_buffer[2];
++  last=d->private_data->sg_buffer[3];
+   tracks=last-first+1;
+ 
+@@ -684,5 +684,5 @@
+     }
+     {
+-      scsi_TOC *toc=(scsi_TOC *)(d->private->sg_buffer+4);
++      scsi_TOC *toc=(scsi_TOC *)(d->private_data->sg_buffer+4);
+ 
+       d->disc_toc[i-first].bFlags=toc->bFlags;
+@@ -705,5 +705,5 @@
+   }
+   {
+-    scsi_TOC *toc=(scsi_TOC *)(d->private->sg_buffer+4);
++    scsi_TOC *toc=(scsi_TOC *)(d->private_data->sg_buffer+4);
+     
+     d->disc_toc[i-first].bFlags=toc->bFlags;
+@@ -739,5 +739,5 @@
+ 
+   /* copy to our structure and convert start sector */
+-  tracks = d->private->sg_buffer[1];
++  tracks = d->private_data->sg_buffer[1];
+   if (tracks > MAXTRK) {
+     cderror(d,"003: CDROM reporting illegal number of tracks\n");
+@@ -755,31 +755,31 @@
+     }
+     
+-    d->disc_toc[i].bFlags = d->private->sg_buffer[10];
++    d->disc_toc[i].bFlags = d->private_data->sg_buffer[10];
+     d->disc_toc[i].bTrack = i + 1;
+ 
+     d->disc_toc[i].dwStartSector= d->adjust_ssize * 
+-	(((signed char)(d->private->sg_buffer[2])<<24) | 
+-	 (d->private->sg_buffer[3]<<16)|
+-	 (d->private->sg_buffer[4]<<8)|
+-	 (d->private->sg_buffer[5]));
++	(((signed char)(d->private_data->sg_buffer[2])<<24) | 
++	 (d->private_data->sg_buffer[3]<<16)|
++	 (d->private_data->sg_buffer[4]<<8)|
++	 (d->private_data->sg_buffer[5]));
+   }
+ 
+   d->disc_toc[i].bFlags = 0;
+   d->disc_toc[i].bTrack = i + 1;
+-  memcpy (&foo, d->private->sg_buffer+2, 4);
+-  memcpy (&bar, d->private->sg_buffer+6, 4);
++  memcpy (&foo, d->private_data->sg_buffer+2, 4);
++  memcpy (&bar, d->private_data->sg_buffer+6, 4);
+   d->disc_toc[i].dwStartSector = d->adjust_ssize * (be32_to_cpu(foo) +
+ 						    be32_to_cpu(bar));
+ 
+   d->disc_toc[i].dwStartSector= d->adjust_ssize * 
+-    ((((signed char)(d->private->sg_buffer[2])<<24) | 
+-      (d->private->sg_buffer[3]<<16)|
+-      (d->private->sg_buffer[4]<<8)|
+-      (d->private->sg_buffer[5]))+
++    ((((signed char)(d->private_data->sg_buffer[2])<<24) | 
++      (d->private_data->sg_buffer[3]<<16)|
++      (d->private_data->sg_buffer[4]<<8)|
++      (d->private_data->sg_buffer[5]))+
+      
+-     ((((signed char)(d->private->sg_buffer[6])<<24) | 
+-       (d->private->sg_buffer[7]<<16)|
+-       (d->private->sg_buffer[8]<<8)|
+-       (d->private->sg_buffer[9]))));
++     ((((signed char)(d->private_data->sg_buffer[6])<<24) | 
++       (d->private_data->sg_buffer[7]<<16)|
++       (d->private_data->sg_buffer[8]<<8)|
++       (d->private_data->sg_buffer[9]))));
+ 
+ 
+@@ -818,5 +818,5 @@
+   if((ret=handle_scsi_cmd(d,cmd,10,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense)))
+     return(ret);
+-  if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW);
++  if(p)memcpy(p,d->private_data->sg_buffer,sectors*CD_FRAMESIZE_RAW);
+   return(0);
+ }
+@@ -837,5 +837,5 @@
+   if((ret=handle_scsi_cmd(d,cmd,12,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense)))
+     return(ret);
+-  if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW);
++  if(p)memcpy(p,d->private_data->sg_buffer,sectors*CD_FRAMESIZE_RAW);
+   return(0);
+ }
+@@ -855,5 +855,5 @@
+   if((ret=handle_scsi_cmd(d,cmd,10,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense)))
+     return(ret);
+-  if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW);
++  if(p)memcpy(p,d->private_data->sg_buffer,sectors*CD_FRAMESIZE_RAW);
+   return(0);
+ }
+@@ -873,5 +873,5 @@
+   if((ret=handle_scsi_cmd(d,cmd,12,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense)))
+     return(ret);
+-  if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW);
++  if(p)memcpy(p,d->private_data->sg_buffer,sectors*CD_FRAMESIZE_RAW);
+   return(0);
+ }
+@@ -891,5 +891,5 @@
+   if((ret=handle_scsi_cmd(d,cmd,10,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense)))
+     return(ret);
+-  if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW);
++  if(p)memcpy(p,d->private_data->sg_buffer,sectors*CD_FRAMESIZE_RAW);
+   return(0);
+ }
+@@ -909,5 +909,5 @@
+   if((ret=handle_scsi_cmd(d,cmd,12,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense)))
+     return(ret);
+-  if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW);
++  if(p)memcpy(p,d->private_data->sg_buffer,sectors*CD_FRAMESIZE_RAW);
+   return(0);
+ }
+@@ -923,5 +923,5 @@
+   if((ret=handle_scsi_cmd(d,cmd,12,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense)))
+     return(ret);
+-  if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW);
++  if(p)memcpy(p,d->private_data->sg_buffer,sectors*CD_FRAMESIZE_RAW);
+   return(0);
+ }
+@@ -937,5 +937,5 @@
+   if((ret=handle_scsi_cmd(d,cmd,12,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense)))
+     return(ret);
+-  if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW);
++  if(p)memcpy(p,d->private_data->sg_buffer,sectors*CD_FRAMESIZE_RAW);
+   return(0);
+ }
+@@ -951,5 +951,5 @@
+   if((ret=handle_scsi_cmd(d,cmd,12,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense)))
+     return(ret);
+-  if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW);
++  if(p)memcpy(p,d->private_data->sg_buffer,sectors*CD_FRAMESIZE_RAW);
+   return(0);
+ }
+@@ -965,5 +965,5 @@
+   if((ret=handle_scsi_cmd(d,cmd,12,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense)))
+     return(ret);
+-  if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW);
++  if(p)memcpy(p,d->private_data->sg_buffer,sectors*CD_FRAMESIZE_RAW);
+   return(0);
+ }
+@@ -979,5 +979,5 @@
+   if((ret=handle_scsi_cmd(d,cmd,12,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense)))
+     return(ret);
+-  if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW);
++  if(p)memcpy(p,d->private_data->sg_buffer,sectors*CD_FRAMESIZE_RAW);
+   return(0);
+ }
+@@ -993,5 +993,5 @@
+   if((ret=handle_scsi_cmd(d,cmd,12,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense)))
+     return(ret);
+-  if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW);
++  if(p)memcpy(p,d->private_data->sg_buffer,sectors*CD_FRAMESIZE_RAW);
+   return(0);
+ }
+@@ -1027,5 +1027,5 @@
+   if((ret=handle_scsi_cmd(d,cmd,12,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense)))
+     return(ret);
+-  if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW);
++  if(p)memcpy(p,d->private_data->sg_buffer,sectors*CD_FRAMESIZE_RAW);
+   return(0);
+ }
+@@ -1040,5 +1040,5 @@
+   if((ret=handle_scsi_cmd(d,cmd,12,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense)))
+     return(ret);
+-  if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW);
++  if(p)memcpy(p,d->private_data->sg_buffer,sectors*CD_FRAMESIZE_RAW);
+   return(0);
+ }
+@@ -1053,5 +1053,5 @@
+   if((ret=handle_scsi_cmd(d,cmd,12,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense)))
+     return(ret);
+-  if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW);
++  if(p)memcpy(p,d->private_data->sg_buffer,sectors*CD_FRAMESIZE_RAW);
+   return(0);
+ }
+@@ -1276,5 +1276,5 @@
+   long i;
+   for(i=2351;i>=0;i--)
+-    if(d->private->sg_buffer[i]!=(unsigned char)'\177')
++    if(d->private_data->sg_buffer[i]!=(unsigned char)'\177')
+       return(((i+3)>>2)<<2);
+ 
+@@ -1285,5 +1285,5 @@
+   long i,flag=0;
+   for(i=0;i<2352;i++)
+-    if(d->private->sg_buffer[i]!=0){
++    if(d->private_data->sg_buffer[i]!=0){
+       flag=1;
+       break;
+@@ -1622,5 +1622,5 @@
+   if(mode_sense(d,22,0x2A)==0){
+   
+-    b=d->private->sg_buffer;
++    b=d->private_data->sg_buffer;
+     b+=b[3]+4;
+     
+@@ -1670,5 +1670,5 @@
+     return(NULL);
+   }
+-  return (d->private->sg_buffer);
++  return (d->private_data->sg_buffer);
+ }
+ 
+@@ -1726,6 +1726,6 @@
+ 
+   d->error_retry=1;
+-  d->private->sg_hd=realloc(d->private->sg_hd,d->nsectors*CD_FRAMESIZE_RAW + SG_OFF + 128);
+-  d->private->sg_buffer=((unsigned char *)d->private->sg_hd)+SG_OFF;
++  d->private_data->sg_hd=realloc(d->private_data->sg_hd,d->nsectors*CD_FRAMESIZE_RAW + SG_OFF + 128);
++  d->private_data->sg_buffer=((unsigned char *)d->private_data->sg_hd)+SG_OFF;
+   d->report_all=1;
+   return(0);
+--- cdparanoia-III-10.2/interface/test_interface.c	(revision 15337)
++++ cdparanoia-III-10.2/interface/test_interface.c	(revision 15338)
+@@ -67,7 +67,7 @@
+ 
+   if(begin<lastread)
+-    d->private->last_milliseconds=20;
++    d->private_data->last_milliseconds=20;
+   else
+-    d->private->last_milliseconds=sectors;
++    d->private_data->last_milliseconds=sectors;
+ 
+ #ifdef CDDA_TEST_UNDERRUN
diff --git a/nixpkgs/pkgs/applications/audio/cdparanoia/utils.patch b/nixpkgs/pkgs/applications/audio/cdparanoia/utils.patch
new file mode 100644
index 000000000000..338e5303dcd0
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/cdparanoia/utils.patch
@@ -0,0 +1,68 @@
+diff --git cdparanoia-III-10.2/interface/utils.h cdparanoia-III-10.2/interface/utils.h
+index c9647da..68c1a3a 100644
+--- cdparanoia-III-10.2/interface/utils.h
++++ cdparanoia-III-10.2/interface/utils.h
+@@ -1,4 +1,6 @@
+-#include <endian.h>
++#include <unistd.h>
++#include <stdint.h>
++#include <stdlib.h>
+ #include <stdio.h>
+ #include <errno.h>
+ #include <string.h>
+@@ -14,15 +16,15 @@ static inline int bigendianp(void){
+ }
+ 
+ static inline int32_t swap32(int32_t x){
+-  return((((u_int32_t)x & 0x000000ffU) << 24) | 
+-	 (((u_int32_t)x & 0x0000ff00U) <<  8) | 
+-	 (((u_int32_t)x & 0x00ff0000U) >>  8) | 
+-	 (((u_int32_t)x & 0xff000000U) >> 24));
++  return((((uint32_t)x & 0x000000ffU) << 24) | 
++	 (((uint32_t)x & 0x0000ff00U) <<  8) | 
++	 (((uint32_t)x & 0x00ff0000U) >>  8) | 
++	 (((uint32_t)x & 0xff000000U) >> 24));
+ }
+ 
+ static inline int16_t swap16(int16_t x){
+-  return((((u_int16_t)x & 0x00ffU) <<  8) | 
+-	 (((u_int16_t)x & 0xff00U) >>  8));
++  return((((uint16_t)x & 0x00ffU) <<  8) | 
++	 (((uint16_t)x & 0xff00U) >>  8));
+ }
+ 
+ #if BYTE_ORDER == LITTLE_ENDIAN
+diff --git cdparanoia-III-10.2/utils.h cdparanoia-III-10.2/utils.h
+index 10dce58..6211ce3 100644
+--- cdparanoia-III-10.2/utils.h
++++ cdparanoia-III-10.2/utils.h
+@@ -1,5 +1,6 @@
++#include <unistd.h>
++#include <stdint.h>
+ #include <stdlib.h>
+-#include <endian.h>
+ #include <stdio.h>
+ #include <errno.h>
+ #include <string.h>
+@@ -18,15 +19,15 @@ static inline int bigendianp(void){
+ }
+ 
+ static inline int32_t swap32(int32_t x){
+-  return((((u_int32_t)x & 0x000000ffU) << 24) | 
+-	 (((u_int32_t)x & 0x0000ff00U) <<  8) | 
+-	 (((u_int32_t)x & 0x00ff0000U) >>  8) | 
+-	 (((u_int32_t)x & 0xff000000U) >> 24));
++  return((((uint32_t)x & 0x000000ffU) << 24) | 
++	 (((uint32_t)x & 0x0000ff00U) <<  8) | 
++	 (((uint32_t)x & 0x00ff0000U) >>  8) | 
++	 (((uint32_t)x & 0xff000000U) >> 24));
+ }
+ 
+ static inline int16_t swap16(int16_t x){
+-  return((((u_int16_t)x & 0x00ffU) <<  8) | 
+-	 (((u_int16_t)x & 0xff00U) >>  8));
++  return((((uint16_t)x & 0x00ffU) <<  8) | 
++	 (((uint16_t)x & 0xff00U) >>  8));
+ }
+ 
+ #if BYTE_ORDER == LITTLE_ENDIAN
diff --git a/nixpkgs/pkgs/applications/audio/chuck/clang.patch b/nixpkgs/pkgs/applications/audio/chuck/clang.patch
new file mode 100644
index 000000000000..77227ef0fd44
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/chuck/clang.patch
@@ -0,0 +1,58 @@
+diff --git a/src/ugen_osc.cpp b/src/ugen_osc.cpp
+index 6b93c6b..dbefe4f 100644
+--- a/src/ugen_osc.cpp
++++ b/src/ugen_osc.cpp
+@@ -1232,7 +1232,7 @@ CK_DLL_CTRL( gen5_coeffs )
+     Chuck_Array8 * in_args = (Chuck_Array8 *)GET_CK_OBJECT(ARGS);
+     
+     // fprintf(stdout, "calling gen10coeffs, %d\n", weights);
+-    if(in_args<0) return;
++    if(in_args!=0) return;
+     size = in_args->size();
+     if(size >= genX_MAX_COEFFS) size = genX_MAX_COEFFS - 1;
+     
+@@ -1287,7 +1287,7 @@ CK_DLL_CTRL( gen7_coeffs )
+     Chuck_Array8 * in_args = (Chuck_Array8 *)GET_CK_OBJECT(ARGS);
+     
+     // fprintf(stdout, "calling gen10coeffs, %d\n", weights);
+-    if(in_args<0) return;
++    if(in_args!=0) return;
+     size = in_args->size();
+     if(size >= genX_MAX_COEFFS) size = genX_MAX_COEFFS - 1;
+     
+@@ -1340,7 +1340,7 @@ CK_DLL_CTRL( gen9_coeffs )
+     Chuck_Array8 * weights = (Chuck_Array8 *)GET_CK_OBJECT(ARGS);
+     
+     // fprintf(stdout, "calling gen10coeffs, %d\n", weights);
+-    if(weights<0) return;
++    if(weights!=0) return;
+     size = weights->size();
+     if(size >= genX_MAX_COEFFS) size = genX_MAX_COEFFS - 1;
+     
+@@ -1390,7 +1390,7 @@ CK_DLL_CTRL( gen10_coeffs )
+     Chuck_Array8 * weights = (Chuck_Array8 *)GET_CK_OBJECT(ARGS);
+     
+     // fprintf(stdout, "calling gen10coeffs, %d\n", weights);
+-    if(weights<0) return;
++    if(weights!=0) return;
+     size = weights->size();
+     if(size >= genX_MAX_COEFFS) size = genX_MAX_COEFFS - 1;
+     
+@@ -1441,7 +1441,7 @@ CK_DLL_CTRL( gen17_coeffs )
+     Chuck_Array8 * weights = (Chuck_Array8 *)GET_CK_OBJECT(ARGS);
+     
+     // fprintf(stdout, "calling gen17coeffs, %d\n", weights);
+-    if(weights<0) return;
++    if(weights!=0) return;
+     size = weights->size();
+     if(size >= genX_MAX_COEFFS) size = genX_MAX_COEFFS - 1;
+     
+@@ -1502,7 +1502,7 @@ CK_DLL_CTRL( curve_coeffs )
+     Chuck_Array8 * weights = (Chuck_Array8 *)GET_CK_OBJECT(ARGS);
+     
+     // fprintf(stdout, "calling gen17coeffs, %d\n", weights);
+-    if(weights<0) goto done;
++    if(weights!=0) goto done;
+ 
+     nargs = weights->size();
+     if (nargs < 5 || (nargs % 3) != 2)  {   // check number of args
diff --git a/nixpkgs/pkgs/applications/audio/chuck/darwin-limits.patch b/nixpkgs/pkgs/applications/audio/chuck/darwin-limits.patch
new file mode 100644
index 000000000000..3387f7255441
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/chuck/darwin-limits.patch
@@ -0,0 +1,13 @@
+--- a/src/util_string.cpp	2014-10-27 22:52:11.875981552 +0100
++++ b/src/util_string.cpp	2014-10-27 22:54:18.613001994 +0100
+@@ -40,6 +40,10 @@
+ #include <linux/limits.h>
+ #endif // __PLATFORM_LINUX__
+ 
++#ifdef __PLATFORM_MACOSX__
++#include <limits.h>
++#endif // __PLATFORM_MACOSX__
++
+ #include <stdio.h>
+ using namespace std;
+ 
diff --git a/nixpkgs/pkgs/applications/audio/chuck/default.nix b/nixpkgs/pkgs/applications/audio/chuck/default.nix
new file mode 100644
index 000000000000..c10556260c71
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/chuck/default.nix
@@ -0,0 +1,43 @@
+{ stdenv, lib, fetchurl, alsaLib, bison, flex, libsndfile, which
+, AppKit, Carbon, CoreAudio, CoreMIDI, CoreServices, Kernel
+, xcbuild
+}:
+
+stdenv.mkDerivation rec {
+  version = "1.3.5.2";
+  name = "chuck-${version}";
+
+  src = fetchurl {
+    url = "http://chuck.cs.princeton.edu/release/files/chuck-${version}.tgz";
+    sha256 = "02z7sglax3j09grj5s1skmw8z6wz7b21hjrm95nrrdpwbxabh079";
+  };
+
+  nativeBuildInputs = [ flex bison which ];
+
+  buildInputs = [ libsndfile ]
+    ++ lib.optional (!stdenv.isDarwin) alsaLib
+    ++ lib.optional stdenv.isDarwin [ AppKit Carbon CoreAudio CoreMIDI CoreServices Kernel ];
+
+  patches = [ ./clang.patch ./darwin-limits.patch ];
+
+  NIX_CFLAGS_COMPILE = lib.optional stdenv.isDarwin "-Wno-missing-sysroot";
+  NIX_LDFLAGS = lib.optional stdenv.isDarwin "-framework MultitouchSupport";
+
+  postPatch = ''
+    substituteInPlace src/makefile --replace "/usr/bin" "$out/bin"
+    substituteInPlace src/makefile.osx \
+      --replace "weak_framework" "framework" \
+      --replace "MACOSX_DEPLOYMENT_TARGET=10.5" "MACOSX_DEPLOYMENT_TARGET=$MACOSX_DEPLOYMENT_TARGET"
+  '';
+
+  makeFlags = [ "-C src" "DESTDIR=$(out)/bin" ];
+  buildFlags = [ (if stdenv.isDarwin then "osx" else "linux-alsa") ];
+
+  meta = with lib; {
+    description = "Programming language for real-time sound synthesis and music creation";
+    homepage = http://chuck.cs.princeton.edu;
+    license = licenses.gpl2;
+    platforms = with platforms; linux ++ darwin;
+    maintainers = with maintainers; [ ftrvxmtrx ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/clementine/clementine-spotify-blob-remove-from-build.patch b/nixpkgs/pkgs/applications/audio/clementine/clementine-spotify-blob-remove-from-build.patch
new file mode 100644
index 000000000000..226536a13ba7
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/clementine/clementine-spotify-blob-remove-from-build.patch
@@ -0,0 +1,21 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 23070d9..83b6772 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -275,8 +275,6 @@ optional_component(LIBPULSE ON "Pulse audio integration"
+ optional_component(VISUALISATIONS ON "Visualisations")
+ 
+ if(NOT HAVE_SPOTIFY_BLOB AND NOT CRYPTOPP_FOUND)
+-  message(FATAL_ERROR "Either crypto++ must be available or the non-GPL Spotify "
+-          "code must be compiled in")
+ elseif(CRYPTOPP_FOUND)
+   set(HAVE_CRYPTOPP ON)
+   set(HAVE_SPOTIFY_DOWNLOADER ON)
+@@ -434,7 +432,6 @@ if(HAVE_BREAKPAD)
+ endif(HAVE_BREAKPAD)
+ 
+ if(HAVE_SPOTIFY_BLOB)
+-  add_subdirectory(ext/clementine-spotifyblob)
+ endif(HAVE_SPOTIFY_BLOB)
+ 
+ if(HAVE_MOODBAR)
diff --git a/nixpkgs/pkgs/applications/audio/clementine/clementine-spotify-blob.patch b/nixpkgs/pkgs/applications/audio/clementine/clementine-spotify-blob.patch
new file mode 100644
index 000000000000..344fc31d70dc
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/clementine/clementine-spotify-blob.patch
@@ -0,0 +1,13 @@
+diff --git a/src/internet/spotify/spotifyservice.cpp b/src/internet/spotify/spotifyservice.cpp
+index 88c7383..6e0893c 100644
+--- a/src/internet/spotify/spotifyservice.cpp
++++ b/src/internet/spotify/spotifyservice.cpp
+@@ -94,7 +94,7 @@ SpotifyService::SpotifyService(Application* app, InternetModel* parent)
+   system_blob_path_ = QCoreApplication::applicationDirPath() +
+                       "/../PlugIns/clementine-spotifyblob";
+ #else
+-  system_blob_path_ = QCoreApplication::applicationDirPath() +
++  system_blob_path_ = qgetenv("CLEMENTINE_SPOTIFYBLOB") +
+                       "/clementine-spotifyblob" CMAKE_EXECUTABLE_SUFFIX;
+ #endif
+ 
diff --git a/nixpkgs/pkgs/applications/audio/clementine/default.nix b/nixpkgs/pkgs/applications/audio/clementine/default.nix
new file mode 100644
index 000000000000..b3a0c6377214
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/clementine/default.nix
@@ -0,0 +1,136 @@
+{ stdenv, fetchFromGitHub, fetchpatch, boost, cmake, chromaprint, gettext, gst_all_1, liblastfm
+, qt4, taglib, fftw, glew, qjson, sqlite, libgpod, libplist, usbmuxd, libmtp
+, libpulseaudio, gvfs, libcdio, libechonest, libspotify, pcre, projectm, protobuf
+, qca2, pkgconfig, sparsehash, config, makeWrapper, gst_plugins }:
+
+let
+  withIpod = config.clementine.ipod or false;
+  withMTP = config.clementine.mtp or true;
+  withCD = config.clementine.cd or true;
+  withCloud = config.clementine.cloud or true;
+
+  version = "1.3.1";
+
+  src = fetchFromGitHub {
+    owner = "clementine-player";
+    repo = "Clementine";
+    rev = version;
+    sha256 = "0i3jkfs8dbfkh47jq3cnx7pip47naqg7w66vmfszk4d8vj37j62j";
+  };
+
+  patches = [
+    ./clementine-spotify-blob.patch
+    # Required so as to avoid adding libspotify as a build dependency (as it is
+    # unfree and thus would prevent us from having a free package).
+    ./clementine-spotify-blob-remove-from-build.patch
+    (fetchpatch {
+      # Fix w/gcc7
+      url = "https://github.com/clementine-player/Clementine/pull/5630.patch";
+      sha256 = "0px7xp1m4nvrncx8sga1qlxppk562wrk2qqk19iiry84nxg20mk4";
+    })
+  ];
+
+  nativeBuildInputs = [ cmake pkgconfig ];
+
+  buildInputs = [
+    boost
+    chromaprint
+    fftw
+    gettext
+    glew
+    gst_all_1.gst-plugins-base
+    gst_all_1.gstreamer
+    gvfs
+    libechonest
+    liblastfm
+    libpulseaudio
+    pcre
+    projectm
+    protobuf
+    qca2
+    qjson
+    qt4
+    sqlite
+    taglib
+  ]
+  ++ stdenv.lib.optionals (withIpod) [libgpod libplist usbmuxd]
+  ++ stdenv.lib.optionals (withMTP) [libmtp]
+  ++ stdenv.lib.optionals (withCD) [libcdio]
+  ++ stdenv.lib.optionals (withCloud) [sparsehash];
+
+  postPatch = ''
+    sed -i src/CMakeLists.txt \
+      -e 's,-Werror,,g' \
+      -e 's,-Wno-unknown-warning-option,,g' \
+      -e 's,-Wno-unused-private-field,,g'
+    sed -i CMakeLists.txt \
+      -e 's,libprotobuf.a,protobuf,g'
+  '';
+
+  free = stdenv.mkDerivation {
+    name = "clementine-free-${version}";
+    inherit src patches nativeBuildInputs postPatch;
+
+    # gst_plugins needed for setup-hooks
+    buildInputs = buildInputs ++ [ makeWrapper gst_plugins ];
+
+    cmakeFlags = [ "-DUSE_SYSTEM_PROJECTM=ON" ];
+
+    enableParallelBuilding = true;
+
+    passthru.unfree = unfree;
+
+    postInstall = ''
+      wrapProgram $out/bin/clementine \
+        --prefix GST_PLUGIN_SYSTEM_PATH_1_0 : "$GST_PLUGIN_SYSTEM_PATH_1_0"
+    '';
+
+    meta = with stdenv.lib; {
+      homepage = http://www.clementine-player.org;
+      description = "A multiplatform music player";
+      license = licenses.gpl3Plus;
+      platforms = platforms.linux;
+      maintainers = [ maintainers.ttuegel ];
+    };
+  };
+
+  # Unfree Spotify blob for Clementine
+  unfree = stdenv.mkDerivation {
+    name = "clementine-blob-${version}";
+    # Use the same patches and sources as Clementine
+    inherit src nativeBuildInputs postPatch;
+
+    patches = [
+      ./clementine-spotify-blob.patch
+    ];
+
+    buildInputs = buildInputs ++ [ libspotify makeWrapper ];
+    # Only build and install the Spotify blob
+    preBuild = ''
+      cd ext/clementine-spotifyblob
+    '';
+    postInstall = ''
+      mkdir -p $out/libexec/clementine
+      mv $out/bin/clementine-spotifyblob $out/libexec/clementine
+      rmdir $out/bin
+
+      makeWrapper ${free}/bin/clementine $out/bin/clementine \
+        --set CLEMENTINE_SPOTIFYBLOB $out/libexec/clementine
+
+      mkdir -p $out/share
+      for dir in applications icons kde4; do
+        ln -s "$free/share/$dir" "$out/share/$dir"
+      done
+    '';
+    enableParallelBuilding = true;
+    meta = with stdenv.lib; {
+      homepage = http://www.clementine-player.org;
+      description = "Spotify integration for Clementine";
+      # The blob itself is Apache-licensed, although libspotify is unfree.
+      license = licenses.asl20;
+      platforms = platforms.linux;
+      maintainers = [ maintainers.ttuegel ];
+    };
+  };
+
+in free
diff --git a/nixpkgs/pkgs/applications/audio/clerk/default.nix b/nixpkgs/pkgs/applications/audio/clerk/default.nix
new file mode 100644
index 000000000000..4da2228c6c13
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/clerk/default.nix
@@ -0,0 +1,30 @@
+{ stdenv, fetchFromGitHub, makeWrapper, rofi, mpc_cli, perl,
+utillinux, pythonPackages, libnotify }:
+
+stdenv.mkDerivation {
+  name = "clerk-2016-10-14";
+
+  src = fetchFromGitHub {
+    owner = "carnager";
+    repo = "clerk";
+    rev = "875963bcae095ac1db174627183c76ebe165f787";
+    sha256 = "0y045my65hr3hjyx13jrnyg6g3wb41phqb1m7azc4l6vx6r4124b";
+  };
+
+  buildInputs = [ makeWrapper pythonPackages.mpd2 ];
+
+  dontBuild = true;
+
+  installPhase = ''
+    DESTDIR=$out PREFIX=/ make install
+    wrapProgram $out/bin/clerk \
+      --prefix PATH : "${stdenv.lib.makeBinPath [ rofi mpc_cli perl utillinux libnotify ]}"
+  '';
+
+  meta = with stdenv.lib; {
+    description = "An MPD client built on top of rofi";
+    homepage    = https://github.com/carnager/clerk;
+    license     = licenses.mit;
+    maintainers = with maintainers; [ anderspapitto ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/cmus/default.nix b/nixpkgs/pkgs/applications/audio/cmus/default.nix
new file mode 100644
index 000000000000..e36d01b8d2e7
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/cmus/default.nix
@@ -0,0 +1,134 @@
+{ stdenv, fetchFromGitHub, runCommand, ncurses, pkgconfig
+, libiconv, CoreAudio
+
+, alsaSupport ? stdenv.isLinux, alsaLib ? null
+# simple fallback for everyone else
+, aoSupport ? !stdenv.isLinux, libao ? null
+, jackSupport ? false, libjack ? null
+, samplerateSupport ? jackSupport, libsamplerate ? null
+, ossSupport ? false, alsaOss ? null
+, pulseaudioSupport ? false, libpulseaudio ? null
+
+# TODO: add these
+#, artsSupport
+#, roarSupport
+#, sndioSupport
+#, sunSupport
+#, waveoutSupport
+
+, cddbSupport ? true, libcddb ? null
+, cdioSupport ? true, libcdio ? null, libcdio-paranoia ? null
+, cueSupport ? true, libcue ? null
+, discidSupport ? (!stdenv.isDarwin), libdiscid ? null
+, ffmpegSupport ? true, ffmpeg ? null
+, flacSupport ? true, flac ? null
+, madSupport ? true, libmad ? null
+, mikmodSupport ? true, libmikmod ? null
+, modplugSupport ? true, libmodplug ? null
+, mpcSupport ? true, libmpcdec ? null
+, tremorSupport ? false, tremor ? null
+, vorbisSupport ? true, libvorbis ? null
+, wavpackSupport ? true, wavpack ? null
+, opusSupport ? true, opusfile ? null
+
+, aacSupport ? false, faad2 ? null # already handled by ffmpeg
+, mp4Support ? false, mp4v2 ? null # ffmpeg does support mp4 better
+
+# not in nixpkgs
+#, vtxSupport ? true, libayemu ? null
+}:
+
+with stdenv.lib;
+
+assert samplerateSupport -> jackSupport;
+
+# vorbis and tremor are mutually exclusive
+assert vorbisSupport -> !tremorSupport;
+assert tremorSupport -> !vorbisSupport;
+
+let
+
+  mkFlag = b: f: dep: if b
+    then { flags = [ f ]; deps = [ dep ]; }
+    else { flags = []; deps = []; };
+
+  opts = [
+    # Audio output
+    (mkFlag alsaSupport       "CONFIG_ALSA=y"       alsaLib)
+    (mkFlag aoSupport         "CONFIG_AO=y"         libao)
+    (mkFlag jackSupport       "CONFIG_JACK=y"       libjack)
+    (mkFlag samplerateSupport "CONFIG_SAMPLERATE=y" libsamplerate)
+    (mkFlag ossSupport        "CONFIG_OSS=y"        alsaOss)
+    (mkFlag pulseaudioSupport "CONFIG_PULSE=y"      libpulseaudio)
+
+    #(mkFlag artsSupport      "CONFIG_ARTS=y")
+    #(mkFlag roarSupport      "CONFIG_ROAR=y")
+    #(mkFlag sndioSupport     "CONFIG_SNDIO=y")
+    #(mkFlag sunSupport       "CONFIG_SUN=y")
+    #(mkFlag waveoutSupport   "CONFIG_WAVEOUT=y")
+
+    # Input file formats
+    (mkFlag cddbSupport    "CONFIG_CDDB=y"    libcddb)
+    (mkFlag cdioSupport    "CONFIG_CDIO=y"    [ libcdio libcdio-paranoia ])
+    (mkFlag cueSupport     "CONFIG_CUE=y"     libcue)
+    (mkFlag discidSupport  "CONFIG_DISCID=y"  libdiscid)
+    (mkFlag ffmpegSupport  "CONFIG_FFMPEG=y"  ffmpeg)
+    (mkFlag flacSupport    "CONFIG_FLAC=y"    flac)
+    (mkFlag madSupport     "CONFIG_MAD=y"     libmad)
+    (mkFlag mikmodSupport  "CONFIG_MIKMOD=y"  libmikmod)
+    (mkFlag modplugSupport "CONFIG_MODPLUG=y" libmodplug)
+    (mkFlag mpcSupport     "CONFIG_MPC=y"     libmpcdec)
+    (mkFlag tremorSupport  "CONFIG_TREMOR=y"  tremor)
+    (mkFlag vorbisSupport  "CONFIG_VORBIS=y"  libvorbis)
+    (mkFlag wavpackSupport "CONFIG_WAVPACK=y" wavpack)
+    (mkFlag opusSupport   "CONFIG_OPUS=y"    opusfile)
+
+    (mkFlag mp4Support    "CONFIG_MP4=y"     mp4v2)
+    (mkFlag aacSupport    "CONFIG_AAC=y"     faad2)
+
+    #(mkFlag vtxSupport    "CONFIG_VTX=y"     libayemu)
+  ];
+
+  clangGCC = runCommand "clang-gcc" {} ''
+    #! ${stdenv.shell}
+    mkdir -p $out/bin
+    ln -s ${stdenv.cc}/bin/clang $out/bin/gcc
+    ln -s ${stdenv.cc}/bin/clang++ $out/bin/g++
+  '';
+
+in
+
+stdenv.mkDerivation rec {
+  name = "cmus-${version}";
+  version = "2.8.0";
+
+  src = fetchFromGitHub {
+    owner  = "cmus";
+    repo   = "cmus";
+    rev    = "v${version}";
+    sha256 = "1ydnvq13ay8b8mfmmgwi5qsgyf220yi1d01acbnxqn775dghmwar";
+  };
+
+  patches = [ ./option-debugging.patch ];
+
+  configurePhase = "./configure " + concatStringsSep " " ([
+    "prefix=$out"
+    "CONFIG_WAV=y"
+  ] ++ concatMap (a: a.flags) opts);
+
+  nativeBuildInputs = [ pkgconfig ];
+  buildInputs = [ ncurses ]
+    ++ stdenv.lib.optional stdenv.cc.isClang clangGCC
+    ++ stdenv.lib.optionals stdenv.isDarwin [ libiconv CoreAudio ]
+    ++ concatMap (a: a.deps) opts;
+
+  makeFlags = [ "LD=$(CC)" ];
+
+  meta = with stdenv.lib; {
+    description = "Small, fast and powerful console music player for Linux and *BSD";
+    homepage = https://cmus.github.io/;
+    license = licenses.gpl2;
+    maintainers = [ maintainers.oxij ];
+    platforms = platforms.linux ++ platforms.darwin;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/cmus/option-debugging.patch b/nixpkgs/pkgs/applications/audio/cmus/option-debugging.patch
new file mode 100644
index 000000000000..84115e1480e1
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/cmus/option-debugging.patch
@@ -0,0 +1,42 @@
+Shows build and link errors in configure for ease of debugging which
+options require what.
+diff --git a/scripts/checks.sh b/scripts/checks.sh
+index 64cbbf3..fab4d9b 100644
+--- a/scripts/checks.sh
++++ b/scripts/checks.sh
+@@ -425,7 +425,7 @@ try_compile()
+ 		echo "$1" > $__src || exit 1
+ 		shift
+ 		__cmd="$CC -c $CFLAGS $@ $__src -o $__obj"
+-		$CC -c $CFLAGS "$@" $__src -o $__obj 2>/dev/null
++		$CC -c $CFLAGS "$@" $__src -o $__obj
+ 		;;
+ 	cxx)
+ 		__src=`tmp_file prog.cc`
+@@ -433,7 +433,7 @@ try_compile()
+ 		echo "$1" > $__src || exit 1
+ 		shift
+ 		__cmd="$CXX -c $CXXFLAGS $@ $__src -o $__obj"
+-		$CXX -c $CXXFLAGS "$@" $__src -o $__obj 2>/dev/null
++		$CXX -c $CXXFLAGS "$@" $__src -o $__obj
+ 		;;
+ 	esac
+ 	return $?
+@@ -451,7 +451,7 @@ try_compile_link()
+ 		echo "$1" > $__src || exit 1
+ 		shift
+ 		__cmd="$CC $__src -o $__exe $CFLAGS $LDFLAGS $@"
+-		$CC $__src -o $__exe $CFLAGS $LDFLAGS "$@" 2>/dev/null
++		$CC $__src -o $__exe $CFLAGS $LDFLAGS "$@"
+ 		;;
+ 	cxx)
+ 		__src=`tmp_file prog.cc`
+@@ -459,7 +459,7 @@ try_compile_link()
+ 		echo "$1" > $__src || exit 1
+ 		shift
+ 		__cmd="$CXX $__src -o $__exe $CXXFLAGS $CXXLDFLAGS $@"
+-		$CXX $__src -o $__exe $CXXFLAGS $CXXLDFLAGS "$@" 2>/dev/null
++		$CXX $__src -o $__exe $CXXFLAGS $CXXLDFLAGS "$@"
+ 		;;
+ 	esac
+ 	return $?
diff --git a/nixpkgs/pkgs/applications/audio/cmusfm/default.nix b/nixpkgs/pkgs/applications/audio/cmusfm/default.nix
new file mode 100644
index 000000000000..e528e9699a73
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/cmusfm/default.nix
@@ -0,0 +1,36 @@
+{ stdenv, fetchFromGitHub, autoreconfHook, pkgconfig, curl, libnotify, gdk_pixbuf }:
+
+stdenv.mkDerivation rec {
+  version = "2018-10-11";
+  name = "cmusfm-unstable-${version}";
+  src = fetchFromGitHub {
+    owner = "Arkq";
+    repo = "cmusfm";
+    rev = "ad2fd0aad3f4f1a25add1b8c2f179e8859885873";
+    sha256 = "0wpwdwgyrp64nvwc6shy0n387p31j6aw6cnmfi9x2y1jhl5hbv6b";
+  };
+  # building
+  configureFlags = [ "--enable-libnotify" ];
+  nativeBuildInputs = [ autoreconfHook pkgconfig ];
+  buildInputs = [ curl libnotify gdk_pixbuf ];
+
+  meta = with stdenv.lib; {
+    description = "Last.fm and Libre.fm standalone scrobbler for the cmus music player";
+    longDescription = ''
+      Features:
+      + Listening now notification support
+      + Off-line played track cache for later submission
+      + POSIX ERE-based file name parser
+      + Desktop notification support (optionally)
+      + Customizable scrobbling service
+      + Small memory footprint
+      Configuration:
+      + run `cmusfm init` to generate configuration file under ~/.config/cmus/cmusfm.conf
+      + Inside cmus run `:set status_display_program=cmusfm` to set up cmusfm
+    '';
+    homepage = https://github.com/Arkq/cmusfm/;
+    maintainers = with stdenv.lib.maintainers; [ CharlesHD ];
+    license = licenses.gpl3Plus;
+    platforms = platforms.linux ++ platforms.darwin;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/cozy-audiobooks/default.nix b/nixpkgs/pkgs/applications/audio/cozy-audiobooks/default.nix
new file mode 100644
index 000000000000..b7b8a4410b7f
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/cozy-audiobooks/default.nix
@@ -0,0 +1,79 @@
+{ stdenv, fetchFromGitHub
+, ninja
+, boost
+, meson
+, pkgconfig
+, wrapGAppsHook
+, appstream-glib
+, desktop-file-utils
+, gtk3
+, gst_all_1
+, gobject-introspection
+, python3Packages
+, file
+, cairo
+, sqlite
+, gettext
+, gnome3
+}:
+
+python3Packages.buildPythonApplication rec {
+
+  format = "other"; # no setup.py
+
+  pname = "cozy";
+  version = "0.6.7";
+
+  src = fetchFromGitHub {
+    owner = "geigi";
+    repo = pname;
+    rev = version;
+    sha256 = "0f8dyqj6111czn8spgsnic1fqs3kimjwl1b19mw55fa924b9bhsa";
+  };
+
+  nativeBuildInputs = [
+    meson ninja pkgconfig
+    wrapGAppsHook
+    appstream-glib
+    desktop-file-utils
+    gobject-introspection
+  ];
+
+  buildInputs = [
+    gtk3
+    cairo
+    gettext
+    gnome3.defaultIconTheme
+  ] ++ (with gst_all_1; [
+    gstreamer
+    gst-plugins-good
+    gst-plugins-ugly
+    gst-plugins-base
+  ]);
+
+  propagatedBuildInputs = with python3Packages; [
+    gst-python
+    pygobject3
+    dbus-python
+    mutagen
+    peewee
+    magic
+  ];
+
+  postPatch = ''
+    chmod +x data/meson_post_install.py
+    patchShebangs data/meson_post_install.py
+    substituteInPlace cozy/magic/magic.py --replace "ctypes.util.find_library('magic')" "'${file}/lib/libmagic${stdenv.hostPlatform.extensions.sharedLibrary}'"
+  '';
+
+  postInstall = ''
+    ln -s $out/bin/com.github.geigi.cozy $out/bin/cozy
+  '';
+
+  meta = with stdenv.lib; {
+    description = "A modern audio book player for Linux using GTK+ 3";
+    homepage = https://cozy.geigi.de/;
+    maintainers = [ maintainers.makefu ];
+    license = licenses.gpl3;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/crip/default.nix b/nixpkgs/pkgs/applications/audio/crip/default.nix
new file mode 100644
index 000000000000..f7bf919c2212
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/crip/default.nix
@@ -0,0 +1,67 @@
+{ stdenv
+, fetchurl
+, makeWrapper
+
+, perlPackages
+
+, cdparanoia
+, coreutils
+, eject
+, flac
+, gnugrep
+, nano
+, sox
+, vorbis-tools
+, vorbisgain
+, which
+}:
+
+with stdenv.lib;
+
+stdenv.mkDerivation rec {
+  name = "crip-3.9";
+  src = fetchurl {
+    url = "http://bach.dynet.com/crip/src/${name}.tar.gz";
+    sha256 = "0pk9152wll6fmkj1pki3fz3ijlf06jyk32v31yarwvdkwrk7s9xz";
+  };
+
+  buildInputs = [ perlPackages.perl perlPackages.CDDB_get ];
+  nativeBuildInputs = [ makeWrapper ];
+
+  toolDeps = makeBinPath [
+    cdparanoia
+    coreutils
+    eject
+    flac
+    gnugrep
+    sox
+    vorbis-tools
+    vorbisgain
+    which
+  ];
+
+  scripts = [ "crip" "editcomment" "editfilenames" ];
+
+  installPhase = ''
+    mkdir -p $out/bin/
+
+    for script in ${escapeShellArgs scripts}; do
+      cp $script $out/bin/
+
+      substituteInPlace $out/bin/$script \
+        --replace '$editor = "vim";' '$editor = "${nano}/bin/nano";'
+
+      wrapProgram $out/bin/$script \
+        --set PERL5LIB "${perlPackages.makePerlPath [ perlPackages.CDDB_get ]}" \
+        --set PATH "${toolDeps}"
+    done
+  '';
+
+  meta = {
+    homepage = http://bach.dynet.com/crip/;
+    description = "Terminal-based ripper/encoder/tagger tool for creating Ogg Vorbis/FLAC files";
+    license = stdenv.lib.licenses.gpl1;
+    platforms = stdenv.lib.platforms.linux;
+    maintainers = [ maintainers.endgame ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/csa/default.nix b/nixpkgs/pkgs/applications/audio/csa/default.nix
new file mode 100644
index 000000000000..c3b3b9441357
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/csa/default.nix
@@ -0,0 +1,28 @@
+{ stdenv, fetchurl }:
+
+stdenv.mkDerivation rec {
+  name = "csa-${version}";
+  version = "0.5.100810";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/csa/${name}.tar.gz";
+    sha256 = "1syg81dzdil0dyx1mlx1n7if3qsf2iz243p2zv34a1acfqm509r3";
+  };
+
+  # after running either cellular leveler mono or stereo, the other stops working,
+  # so we remove one of them:
+  postInstall = "rm $out/lib/ladspa/celllm_3890.*";
+
+  meta = with stdenv.lib; {
+    homepage = https://sourceforge.net/projects/csa/;
+    description = "A group of LADSPA Audio plugins for FM broadcast and more";
+    longDescription = ''
+      CSA means : Contrôle Signal Audio.
+      It contains the following plugins:
+      Emphazised Limiter, Cellular Leveler, Simple right/left amplifier. Blind Peak Meter.
+    '';
+    license = licenses.gpl3;
+    maintainers = [ maintainers.magnetophon ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/csound/csound-qt/default.nix b/nixpkgs/pkgs/applications/audio/csound/csound-qt/default.nix
new file mode 100644
index 000000000000..e9415335388e
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/csound/csound-qt/default.nix
@@ -0,0 +1,49 @@
+{ stdenv, csound, desktop-file-utils,
+  fetchFromGitHub, python, python-qt, qmake,
+  qtwebengine, rtmidi, unzip }:
+
+stdenv.mkDerivation rec {
+  name = "csound-qt-${version}";
+  version = "0.9.6-beta2";
+
+  src = fetchFromGitHub {
+    owner = "CsoundQt";
+    repo = "CsoundQt";
+    rev = "${version}";
+    sha256 = "12jv7cvns3wj2npha0mvpn88kkkfsxsvhgzs2wrw04kbrvbhbffi";
+  };
+
+  patches = [ ./rtmidipath.patch ];
+
+  nativeBuildInputs = [ qmake qtwebengine ];
+
+  buildInputs = [ csound desktop-file-utils rtmidi unzip ];
+
+  qmakeFlags = [ "qcs.pro" "CONFIG+=rtmidi" "CONFIG+=pythonqt"
+                 "CSOUND_INCLUDE_DIR=${csound}/include/csound"
+                 "CSOUND_LIBRARY_DIR=${csound}/lib"
+                 "RTMIDI_DIR=${rtmidi.src}"
+                 "PYTHONQT_SRC_DIR=${python-qt}/lib"
+                 "PYTHONQT_LIB_DIR=${python-qt}/lib"
+                 "LIBS+=${python-qt}/lib/libPythonQt-Qt5-Python2.7.so"
+                 "LIBS+=${python-qt}/lib/libPythonQt_QtAll-Qt5-Python2.7.so"
+                 "INCLUDEPATH+=${python-qt}/include/PythonQt"
+                 "INCLUDEPATH+=${python}/include/python2.7"
+                 "INSTALL_DIR=$(out)"
+                 "SHARE_DIR=$(out)/share"
+                 ];
+
+  installPhase = ''
+    mkdir -p $out
+    cp -r bin $out
+    make install
+  '';
+
+  meta = with stdenv.lib; {
+    description = "CsoundQt is a frontend for Csound with editor, integrated help, widgets and other features.";
+    homepage = https://csoundqt.github.io/;
+    license = licenses.gpl2;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ hlolli ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/csound/csound-qt/rtmidipath.patch b/nixpkgs/pkgs/applications/audio/csound/csound-qt/rtmidipath.patch
new file mode 100644
index 000000000000..f9522adb4b32
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/csound/csound-qt/rtmidipath.patch
@@ -0,0 +1,17 @@
+diff --git a/src/src.pri b/src/src.pri
+index e5e0c896..9a9fa513 100644
+--- a/src/src.pri
++++ b/src/src.pri
+@@ -155,9 +155,9 @@ pythonqt {
+         "src/pyqcsobject.cpp"
+ }
+ rtmidi {
+-    HEADERS += "src/../$${RTMIDI_DIR}/RtMidi.h"
+-    SOURCES += "src/../$${RTMIDI_DIR}/RtMidi.cpp"
+-    INCLUDEPATH += src/../$${RTMIDI_DIR}
++    HEADERS += "$${RTMIDI_DIR}/RtMidi.h"
++    SOURCES += "$${RTMIDI_DIR}/RtMidi.cpp"
++    INCLUDEPATH += $${RTMIDI_DIR}
+ }
+
+ perfThread_build {
diff --git a/nixpkgs/pkgs/applications/audio/csound/default.nix b/nixpkgs/pkgs/applications/audio/csound/default.nix
new file mode 100644
index 000000000000..b11f525e9d2b
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/csound/default.nix
@@ -0,0 +1,51 @@
+{ stdenv, fetchFromGitHub, cmake, libsndfile, libsamplerate, flex, bison, boost, gettext
+, alsaLib ? null
+, libpulseaudio ? null
+, libjack2 ? null
+, liblo ? null
+, ladspa-sdk ? null
+, fluidsynth ? null
+# , gmm ? null  # opcodes don't build with gmm 5.1
+, eigen ? null
+, curl ? null
+, tcltk ? null
+, fltk ? null
+}:
+
+stdenv.mkDerivation rec {
+  name = "csound-${version}";
+  # When updating, please check if https://github.com/csound/csound/issues/1078
+  # has been fixed in the new version so we can use the normal fluidsynth
+  # version and remove fluidsynth 1.x from nixpkgs again.
+  version = "6.12.2";
+
+  enableParallelBuilding = true;
+
+  hardeningDisable = [ "format" ];
+
+  src = fetchFromGitHub {
+    owner = "csound";
+    repo = "csound";
+    rev = version;
+    sha256 = "01krxcf0alw9k7p5sv0s707600an4sl7lhw3bymbwgqrj0v2p9z2";
+  };
+
+  cmakeFlags = [ "-DBUILD_CSOUND_AC=0" ] # fails to find Score.hpp
+    ++ stdenv.lib.optional (libjack2 != null) "-DJACK_HEADER=${libjack2}/include/jack/jack.h";
+
+  nativeBuildInputs = [ cmake flex bison gettext ];
+  buildInputs = [ libsndfile libsamplerate boost ]
+    ++ builtins.filter (optional: optional != null) [
+      alsaLib libpulseaudio libjack2
+      liblo ladspa-sdk fluidsynth eigen
+      curl tcltk fltk ];
+
+  meta = with stdenv.lib; {
+    description = "Sound design, audio synthesis, and signal processing system, providing facilities for music composition and performance on all major operating systems and platforms";
+    homepage = http://www.csounds.com/;
+    license = licenses.gpl2;
+    maintainers = [maintainers.marcweber];
+    platforms = platforms.linux;
+  };
+}
+
diff --git a/nixpkgs/pkgs/applications/audio/deadbeef/default.nix b/nixpkgs/pkgs/applications/audio/deadbeef/default.nix
new file mode 100644
index 000000000000..e2fcc3c4626a
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/deadbeef/default.nix
@@ -0,0 +1,100 @@
+{ stdenv, fetchurl, intltool, pkgconfig, jansson
+# deadbeef can use either gtk2 or gtk3
+, gtk2Support ? false, gtk2 ? null
+, gtk3Support ? true, gtk3 ? null, gsettings-desktop-schemas ? null, wrapGAppsHook ? null
+# input plugins
+, vorbisSupport ? true, libvorbis ? null
+, mp123Support ? true, libmad ? null
+, flacSupport ? true, flac ? null
+, wavSupport ? true, libsndfile ? null
+, cdaSupport ? true, libcdio ? null, libcddb ? null
+, aacSupport ? true, faad2 ? null
+, midiSupport ? false, wildmidi ? null
+, wavpackSupport ? false, wavpack ? null
+, ffmpegSupport ? false, ffmpeg ? null
+, apeSupport ? true, yasm ? null
+# misc plugins
+, zipSupport ? true, libzip ? null
+, artworkSupport ? true, imlib2 ? null
+, hotkeysSupport ? true, libX11 ? null
+, osdSupport ? true, dbus ? null
+# output plugins
+, alsaSupport ? true, alsaLib ? null
+, pulseSupport ? true, libpulseaudio ? null
+# effect plugins
+, resamplerSupport ? true, libsamplerate ? null
+, overloadSupport ? true, zlib ? null
+# transports
+, remoteSupport ? true, curl ? null
+}:
+
+assert gtk2Support || gtk3Support;
+assert gtk2Support -> gtk2 != null;
+assert gtk3Support -> gtk3 != null && gsettings-desktop-schemas != null && wrapGAppsHook != null;
+assert vorbisSupport -> libvorbis != null;
+assert mp123Support -> libmad != null;
+assert flacSupport -> flac != null;
+assert wavSupport -> libsndfile != null;
+assert cdaSupport -> (libcdio != null && libcddb != null);
+assert aacSupport -> faad2 != null;
+assert zipSupport -> libzip != null;
+assert ffmpegSupport -> ffmpeg != null;
+assert apeSupport -> yasm != null;
+assert artworkSupport -> imlib2 != null;
+assert hotkeysSupport -> libX11 != null;
+assert osdSupport -> dbus != null;
+assert alsaSupport -> alsaLib != null;
+assert pulseSupport -> libpulseaudio != null;
+assert resamplerSupport -> libsamplerate != null;
+assert overloadSupport -> zlib != null;
+assert midiSupport -> wildmidi != null;
+assert wavpackSupport -> wavpack != null;
+assert remoteSupport -> curl != null;
+
+stdenv.mkDerivation rec {
+  name = "deadbeef-${version}";
+  version = "0.7.2";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/project/deadbeef/${name}.tar.bz2";
+    sha256 = "1168hgr1nf27pf24n1rlfh1kx1wiscwhpbhqw0rprwy203gsnqwa";
+  };
+
+  buildInputs = with stdenv.lib; [ jansson ]
+    ++ optional gtk2Support gtk2
+    ++ optionals gtk3Support [ gtk3 gsettings-desktop-schemas ]
+    ++ optional vorbisSupport libvorbis
+    ++ optional mp123Support libmad
+    ++ optional flacSupport flac
+    ++ optional wavSupport libsndfile
+    ++ optionals cdaSupport [ libcdio libcddb ]
+    ++ optional aacSupport faad2
+    ++ optional zipSupport libzip
+    ++ optional ffmpegSupport ffmpeg
+    ++ optional apeSupport yasm
+    ++ optional artworkSupport imlib2
+    ++ optional hotkeysSupport libX11
+    ++ optional osdSupport dbus
+    ++ optional alsaSupport alsaLib
+    ++ optional pulseSupport libpulseaudio
+    ++ optional resamplerSupport libsamplerate
+    ++ optional overloadSupport zlib
+    ++ optional midiSupport wildmidi
+    ++ optional wavpackSupport wavpack
+    ++ optional remoteSupport curl
+    ;
+
+  nativeBuildInputs = with stdenv.lib; [ intltool pkgconfig ]
+    ++ optional gtk3Support wrapGAppsHook;
+
+  enableParallelBuilding = true;
+
+  meta = with stdenv.lib; {
+    description = "Ultimate Music Player for GNU/Linux";
+    homepage = http://deadbeef.sourceforge.net/;
+    license = licenses.gpl2;
+    platforms = [ "x86_64-linux" "i686-linux" ];
+    maintainers = [ maintainers.abbradar ];
+    repositories.git = "https://github.com/Alexey-Yakovenko/deadbeef";
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/deadbeef/plugins/headerbar-gtk3.nix b/nixpkgs/pkgs/applications/audio/deadbeef/plugins/headerbar-gtk3.nix
new file mode 100644
index 000000000000..dab3a97f6e73
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/deadbeef/plugins/headerbar-gtk3.nix
@@ -0,0 +1,30 @@
+{ stdenv, fetchFromGitHub, autoconf, automake, libtool, pkgconfig, libxml2, deadbeef, glib, gtk3 }:
+
+stdenv.mkDerivation rec {
+  name = "deadbeef-headerbar-gtk3-plugin-${version}";
+  version = "1.2";
+
+  src = fetchFromGitHub {
+    owner = "saivert";
+    repo = "ddb_misc_headerbar_GTK3";
+    rev = "v${version}";
+    sha256 = "1v1schvnps7ypjqgcbqi74a45w8r2gbhrawz7filym22h1qr9wn0";
+  };
+
+  nativeBuildInputs = [ autoconf automake libtool pkgconfig libxml2 ];
+  buildInputs = [ deadbeef glib gtk3 ];
+
+  # Choose correct installation path
+  # https://github.com/saivert/ddb_misc_headerbar_GTK3/commit/50ff75f76aa9d40761e352311670a894bfcd5cf6#r30319680
+  makeFlags = [ "pkglibdir=$(out)/lib/deadbeef" ];
+
+  preConfigure = "./autogen.sh";
+
+  meta = with stdenv.lib; {
+    description = "Plug-in that adds GTK 3 header bar to the DeaDBeeF music player";
+    homepage = https://github.com/saivert/ddb_misc_headerbar_GTK3;
+    license = licenses.gpl2Plus;
+    maintainers = [ maintainers.jtojnar ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/deadbeef/plugins/infobar.nix b/nixpkgs/pkgs/applications/audio/deadbeef/plugins/infobar.nix
new file mode 100644
index 000000000000..92f566e36578
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/deadbeef/plugins/infobar.nix
@@ -0,0 +1,33 @@
+{ stdenv, fetchurl, pkgconfig, deadbeef, gtk3, libxml2 }:
+
+stdenv.mkDerivation rec {
+  name = "deadbeef-infobar-plugin-${version}";
+  version = "1.4";
+
+  src = fetchurl {
+    url = "https://bitbucket.org/dsimbiriatin/deadbeef-infobar/downloads/deadbeef-infobar-${version}.tar.gz";
+    sha256 = "0c9wh3wh1hdww7v96i8cy797la06mylhfi0880k8vwh88079aapf";
+  };
+
+  nativeBuildInputs = [ pkgconfig ];
+  buildInputs = [ deadbeef gtk3 libxml2 ];
+
+  buildFlags = [ "gtk3" ];
+
+  installPhase = ''
+    runHook preInstall
+
+    mkdir -p $out/lib/deadbeef
+    cp gtk3/ddb_infobar_gtk3.so $out/lib/deadbeef
+
+    runHook postInstall
+  '';
+
+  meta = with stdenv.lib; {
+    description = "DeadBeeF Infobar Plugin";
+    homepage = https://bitbucket.org/dsimbiriatin/deadbeef-infobar;
+    license = licenses.gpl2Plus;
+    maintainers = [ maintainers.jtojnar ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/deadbeef/plugins/mpris2.nix b/nixpkgs/pkgs/applications/audio/deadbeef/plugins/mpris2.nix
new file mode 100644
index 000000000000..4e2e75953f35
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/deadbeef/plugins/mpris2.nix
@@ -0,0 +1,23 @@
+{ stdenv, fetchurl, pkgconfig, deadbeef, glib }:
+
+stdenv.mkDerivation rec {
+  name = "deadbeef-mpris2-plugin-${version}";
+  version = "1.11";
+
+  src = fetchurl {
+    url = "https://github.com/Serranya/deadbeef-mpris2-plugin/releases/download/v${version}/${name}.tar.xz";
+    sha256 = "1j631z34rwxf6wdjpsf8c2f1saq6qas1qmkgsg63m6zzpwqyizw0";
+  };
+
+  nativeBuildInputs = [ pkgconfig ];
+
+  buildInputs = [ deadbeef glib ];
+
+  meta = with stdenv.lib; {
+    description = "MPRISv2 plugin for the DeaDBeeF music player";
+    homepage = https://github.com/Serranya/deadbeef-mpris2-plugin/;
+    license = licenses.gpl2;
+    platforms = platforms.linux;
+    maintainers = [ maintainers.abbradar ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/deadbeef/plugins/opus.nix b/nixpkgs/pkgs/applications/audio/deadbeef/plugins/opus.nix
new file mode 100644
index 000000000000..55db00c15bf6
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/deadbeef/plugins/opus.nix
@@ -0,0 +1,31 @@
+{ stdenv, fetchFromBitbucket, opusfile, libopus, libogg, openssl, deadbeef }:
+
+stdenv.mkDerivation rec {
+  name = "deadbeef-opus-plugin-${version}";
+  version = "0.8";
+
+  src = fetchFromBitbucket {
+    owner = "Lithopsian";
+    repo = "deadbeef-opus";
+    rev = "v${version}";
+    sha256 = "057rgsw4563gs63k05s7zsdc0n4djxwlbyqabf7c88f23z35ryyi";
+  };
+
+  makeFlags = [
+    "PREFIX=$(out)"
+  ];
+
+  NIX_CFLAGS_COMPILE = [
+    "-I${opusfile}/include/opus"
+  ];
+
+  buildInputs = [ deadbeef opusfile libopus libogg openssl ];
+
+  meta = with stdenv.lib; {
+    description = "Ogg Opus decoder plugin for the DeaDBeeF music player";
+    homepage = https://bitbucket.org/Lithopsian/deadbeef-opus;
+    license = licenses.gpl2; # There are three files, each licensed under different license: zlib, gpl2Plus and lgpl2
+    maintainers = [ maintainers.jtojnar ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/deadbeef/wrapper.nix b/nixpkgs/pkgs/applications/audio/deadbeef/wrapper.nix
new file mode 100644
index 000000000000..cd45ef5926b0
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/deadbeef/wrapper.nix
@@ -0,0 +1,14 @@
+{ symlinkJoin, deadbeef, makeWrapper, plugins }:
+
+symlinkJoin {
+  name = "deadbeef-with-plugins-${deadbeef.version}";
+
+  paths = [ deadbeef ] ++ plugins;
+
+  buildInputs = [ makeWrapper ];
+
+  postBuild = ''
+    wrapProgram $out/bin/deadbeef \
+      --set DEADBEEF_PLUGIN_DIR "$out/lib/deadbeef"
+  '';
+}
diff --git a/nixpkgs/pkgs/applications/audio/denemo/default.nix b/nixpkgs/pkgs/applications/audio/denemo/default.nix
new file mode 100644
index 000000000000..6c1536c0a610
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/denemo/default.nix
@@ -0,0 +1,37 @@
+{ stdenv, fetchurl, pkgconfig
+, libjack2, gettext, intltool, guile_2_0, lilypond
+, glib, libxml2, librsvg, libsndfile, aubio
+, gtk3, gtksourceview, evince, fluidsynth, rubberband
+, portaudio, portmidi, fftw, makeWrapper }:
+
+stdenv.mkDerivation rec {
+  name = "denemo-${version}";
+  version = "2.2.0";
+
+  src = fetchurl {
+    url = "https://ftp.gnu.org/gnu/denemo/denemo-${version}.tar.gz";
+    sha256 = "18zcs4xmfj4vpzi15dj7k5bjzzzlr3sjf9xhrrgy4samrrdpqzfh";
+  };
+
+  buildInputs = [
+    libjack2 gettext guile_2_0 lilypond pkgconfig glib libxml2 librsvg libsndfile
+    aubio gtk3 gtksourceview evince fluidsynth rubberband portaudio fftw portmidi
+    makeWrapper
+  ];
+
+  postInstall = ''
+    wrapProgram $out/bin/denemo --prefix PATH : ${lilypond}/bin
+  '';
+
+  nativeBuildInputs = [
+    intltool
+  ];
+
+  meta = with stdenv.lib; {
+    description = "Music notation and composition software used with lilypond";
+    homepage = http://denemo.org;
+    license = licenses.gpl3;
+    platforms = platforms.linux;
+    maintainers = [ maintainers.olynch ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/dfasma/default.nix b/nixpkgs/pkgs/applications/audio/dfasma/default.nix
new file mode 100644
index 000000000000..d16534b03d32
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/dfasma/default.nix
@@ -0,0 +1,66 @@
+{ stdenv, fetchFromGitHub, fftw, libsndfile, qtbase, qtmultimedia, qmake }:
+
+let
+
+  reaperFork = {
+    src = fetchFromGitHub {
+      sha256 = "07m2wf2gqyya95b65gawrnr4pvc9jyzmg6h8sinzgxlpskz93wwc";
+      rev = "39053e8896eedd7b3e8a9e9a9ffd80f1fc6ceb16";
+      repo = "REAPER";
+      owner = "gillesdegottex";
+    };
+    meta = with stdenv.lib; {
+     license = licenses.asl20;
+    };
+  };
+
+  libqaudioextra = {
+    src = fetchFromGitHub {
+      sha256 = "0m6x1qm7lbjplqasr2jhnd2ndi0y6z9ybbiiixnlwfm23sp15wci";
+      rev = "9ae051989a8fed0b2f8194b1501151909a821a89";
+      repo = "libqaudioextra";
+      owner = "gillesdegottex";
+    };
+    meta = with stdenv.lib; {
+     license = licenses.gpl3Plus;
+    };
+  };
+
+in stdenv.mkDerivation rec {
+  name = "dfasma-${version}";
+  version = "1.4.5";
+
+  src = fetchFromGitHub {
+    sha256 = "09fcyjm0hg3y51fnjax88m93im39nbynxj79ffdknsazmqw9ac0h";
+    rev = "v${version}";
+    repo = "dfasma";
+    owner = "gillesdegottex";
+  };
+
+  buildInputs = [ fftw libsndfile qtbase qtmultimedia ];
+
+  nativeBuildInputs = [ qmake ];
+
+  postPatch = ''
+    cp -Rv "${reaperFork.src}"/* external/REAPER
+    cp -Rv "${libqaudioextra.src}"/* external/libqaudioextra
+    substituteInPlace dfasma.pro --replace "CONFIG += file_sdif" "";
+  '';
+
+  enableParallelBuilding = true;
+
+  meta = with stdenv.lib; {
+    description = "Analyse and compare audio files in time and frequency";
+    longDescription = ''
+      DFasma is free open-source software to compare audio files by time and
+      frequency. The comparison is first visual, using wavforms and spectra. It
+      is also possible to listen to time-frequency segments in order to allow
+      perceptual comparison. It is basically dedicated to analysis. Even though
+      there are basic functionalities to align the signals in time and
+      amplitude, this software does not aim to be an audio editor.
+    '';
+    homepage = http://gillesdegottex.github.io/dfasma/;
+    license = [ licenses.gpl3Plus reaperFork.meta.license ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/dirt/default.nix b/nixpkgs/pkgs/applications/audio/dirt/default.nix
new file mode 100644
index 000000000000..6d56f53bd16f
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/dirt/default.nix
@@ -0,0 +1,29 @@
+{ stdenv, fetchFromGitHub, libsndfile, libsamplerate, liblo, libjack2 }:
+
+stdenv.mkDerivation rec {
+  name = "dirt-2018-01-01";
+  src = fetchFromGitHub {
+    repo = "Dirt";
+    owner = "tidalcycles";
+    rev = "b09604c7d8e581bc7799d7e2ad293e7cdd254bda";
+    sha256 = "13adglk2d31d7mswfvi02b0rjdhzmsv11cc8smhidmrns3f9s96n";
+    fetchSubmodules = true;
+  };
+  buildInputs = [ libsndfile libsamplerate liblo libjack2 ];
+  postPatch = ''
+    sed -i "s|./samples|$out/share/dirt/samples|" dirt.c
+  '';
+  makeFlags = ["PREFIX=$(out)"];
+  postInstall = ''
+    mkdir -p $out/share/dirt/
+    cp -r samples $out/share/dirt/
+  '';
+
+  meta = with stdenv.lib; {
+    description = "An unimpressive thingie for playing bits of samples with some level of accuracy";
+    homepage = https://github.com/tidalcycles/Dirt;
+    license = licenses.gpl3;
+    maintainers = with maintainers; [ anderspapitto ];
+    platforms = with platforms; linux;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/distrho/default.nix b/nixpkgs/pkgs/applications/audio/distrho/default.nix
new file mode 100644
index 000000000000..1c41451b08f3
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/distrho/default.nix
@@ -0,0 +1,58 @@
+{ stdenv, fetchFromGitHub, alsaLib, fftwSinglePrec, freetype, libjack2
+, pkgconfig, ladspa-sdk, premake3
+, libX11, libXcomposite, libXcursor, libXext, libXinerama, libXrender
+}:
+
+let
+  premakeos = if stdenv.hostPlatform.isDarwin then "osx"
+              else if stdenv.hostPlatform.isWindows then "mingw"
+              else "linux";
+in stdenv.mkDerivation rec {
+  name = "distrho-ports-${version}";
+  version = "2018-04-16";
+
+  src = fetchFromGitHub {
+    owner = "DISTRHO";
+    repo = "DISTRHO-Ports";
+    rev = version;
+    sha256 = "0l4zwl4mli8jzch32a1fh7c88r9q17xnkxsdw17ds5hadnxlk12v";
+  };
+
+  configurePhase = ''
+    runHook preConfigure
+
+    sh ./scripts/premake-update.sh ${premakeos}
+
+    runHook postConfigure
+  '';
+
+  patchPhase = ''
+    sed -e "s#@./scripts#sh scripts#" -i Makefile
+  '';
+
+  nativeBuildInputs = [ pkgconfig premake3 ];
+  buildInputs = [
+    alsaLib fftwSinglePrec freetype libjack2
+    libX11 libXcomposite libXcursor libXext
+    libXinerama libXrender ladspa-sdk
+  ];
+
+  makeFlags = "PREFIX=$(out)";
+
+  meta = with stdenv.lib; {
+    homepage = http://distrho.sourceforge.net;
+    description = "A collection of cross-platform audio effects and plugins";
+    longDescription = ''
+      Includes:
+      Dexed drowaudio-distortion drowaudio-distortionshaper drowaudio-flanger
+      drowaudio-reverb drowaudio-tremolo drumsynth EasySSP eqinox HiReSam
+      JuceDemoPlugin KlangFalter LUFSMeter LUFSMeterMulti Luftikus Obxd
+      PitchedDelay ReFine StereoSourceSeparation TAL-Dub-3 TAL-Filter
+      TAL-Filter-2 TAL-NoiseMaker TAL-Reverb TAL-Reverb-2 TAL-Reverb-3
+      TAL-Vocoder-2 TheFunction ThePilgrim Vex Wolpertinger
+    '';
+    license = with licenses; [ gpl2 gpl3 gpl2Plus lgpl3 mit ];
+    maintainers = [ maintainers.goibhniu ];
+    platforms = [ "x86_64-linux" ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/dr14_tmeter/default.nix b/nixpkgs/pkgs/applications/audio/dr14_tmeter/default.nix
new file mode 100644
index 000000000000..ea0ce8cb5f30
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/dr14_tmeter/default.nix
@@ -0,0 +1,29 @@
+{ stdenv, fetchFromGitHub, python3Packages, pkgs }:
+
+python3Packages.buildPythonApplication rec {
+  pname = "dr14_tmeter";
+  version = "1.0.16";
+
+  disabled = !python3Packages.isPy3k;
+
+  src = fetchFromGitHub {
+    owner = "simon-r";
+    repo = "dr14_t.meter";
+    rev = "v${version}";
+    sha256 = "1nfsasi7kx0myxkahbd7rz8796mcf5nsadrsjjpx2kgaaw5nkv1m";
+  };
+
+  propagatedBuildInputs = with pkgs; [
+    python3Packages.numpy flac vorbis-tools ffmpeg faad2 lame
+  ];
+
+  # There are no tests
+  doCheck = false;
+
+  meta = with stdenv.lib; {
+    description = "Compute the DR14 of a given audio file according to the procedure described by the Pleasurize Music Foundation";
+    license = licenses.gpl3Plus;
+    homepage = http://dr14tmeter.sourceforge.net/;
+    maintainers = [ maintainers.adisbladis ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/dragonfly-reverb/default.nix b/nixpkgs/pkgs/applications/audio/dragonfly-reverb/default.nix
new file mode 100644
index 000000000000..1710931aa229
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/dragonfly-reverb/default.nix
@@ -0,0 +1,35 @@
+{ stdenv, fetchFromGitHub, libjack2, libGL, pkgconfig, xorg }:
+
+stdenv.mkDerivation rec {
+  name = "dragonfly-reverb-${src.rev}";
+
+  src = fetchFromGitHub {
+    owner = "michaelwillis";
+    repo = "dragonfly-reverb";
+    rev = "1.0.0";
+    sha256 = "05m4hd8lg0a7iiia6cbiw5qmc4p8vbkxp2qh7ywaabawiwa9r24x";
+    fetchSubmodules = true;
+  };
+
+  patchPhase = ''
+    patchShebangs dpf/utils/generate-ttl.sh
+  '';
+
+  nativeBuildInputs = [ pkgconfig ];
+  buildInputs = [
+    libjack2 xorg.libX11 libGL
+  ];
+
+  installPhase = ''
+    mkdir -p $out/lib/lv2/
+    cp -a bin/DragonflyReverb.lv2/ $out/lib/lv2/
+  '';
+
+  meta = with stdenv.lib; {
+    homepage = https://github.com/michaelwillis/dragonfly-reverb;
+    description = "A hall-style reverb based on freeverb3 algorithms";
+    maintainers = [ maintainers.magnetophon ];
+    license = licenses.gpl2;
+    platforms = ["x86_64-linux"];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/drumgizmo/default.nix b/nixpkgs/pkgs/applications/audio/drumgizmo/default.nix
new file mode 100644
index 000000000000..53949da43e0d
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/drumgizmo/default.nix
@@ -0,0 +1,28 @@
+{ stdenv, fetchurl, alsaLib, expat, glib, libjack2, libXext, libX11, libpng
+, libpthreadstubs, libsmf, libsndfile, lv2, pkgconfig, zita-resampler
+}:
+
+stdenv.mkDerivation rec {
+  version = "0.9.16";
+  name = "drumgizmo-${version}";
+
+  src = fetchurl {
+    url = "https://www.drumgizmo.org/releases/${name}/${name}.tar.gz";
+    sha256 = "0ivr61n9gpigsfgn20rh3n09li8sxh1q095r6wiw0shqhn3vaxlg";
+  };
+
+  configureFlags = [ "--enable-lv2" ];
+
+  buildInputs = [
+    alsaLib expat glib libjack2 libXext libX11 libpng libpthreadstubs
+    libsmf libsndfile lv2 pkgconfig zita-resampler
+  ];
+
+  meta = with stdenv.lib; {
+    description = "An LV2 sample based drum plugin";
+    homepage = https://www.drumgizmo.org;
+    license = licenses.lgpl3;
+    platforms = platforms.linux;
+    maintainers = [ maintainers.goibhniu maintainers.nico202 ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/drumkv1/default.nix b/nixpkgs/pkgs/applications/audio/drumkv1/default.nix
new file mode 100644
index 000000000000..fd5cc4a416e2
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/drumkv1/default.nix
@@ -0,0 +1,23 @@
+{ stdenv, fetchurl, pkgconfig, libjack2, alsaLib, libsndfile, liblo, lv2, qt5 }:
+
+stdenv.mkDerivation rec {
+  name = "drumkv1-${version}";
+  version = "0.9.4";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/drumkv1/${name}.tar.gz";
+    sha256 = "02j10khl3wd17z0wfs3crr55wv7h9f0qhhg90xg0kvrxvw83vzy9";
+  };
+
+  buildInputs = [ libjack2 alsaLib libsndfile liblo lv2 qt5.qtbase qt5.qttools ];
+
+  nativeBuildInputs = [ pkgconfig ];
+
+  meta = with stdenv.lib; {
+    description = "An old-school drum-kit sampler synthesizer with stereo fx";
+    homepage = http://drumkv1.sourceforge.net/;
+    license = licenses.gpl2Plus;
+    platforms = platforms.linux;
+    maintainers = [ maintainers.goibhniu ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/easytag/default.nix b/nixpkgs/pkgs/applications/audio/easytag/default.nix
new file mode 100644
index 000000000000..e61b9d8b290d
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/easytag/default.nix
@@ -0,0 +1,41 @@
+{ stdenv, fetchurl, pkgconfig, intltool, gtk3, glib, libid3tag, id3lib, taglib
+, libvorbis, libogg, opusfile, flac, itstool, libxml2, gsettings-desktop-schemas
+, gnome3, wrapGAppsHook
+}:
+
+let
+  pname = "easytag";
+  version = "2.4.3";
+in stdenv.mkDerivation rec {
+  name = "${pname}-${version}";
+
+  src = fetchurl {
+    url = "mirror://gnome/sources/${pname}/${stdenv.lib.versions.majorMinor version}/${name}.tar.xz";
+    sha256 = "1mbxnqrw1fwcgraa1bgik25vdzvf97vma5pzknbwbqq5ly9fwlgw";
+  };
+
+  NIX_LDFLAGS = "-lid3tag -lz";
+
+  nativeBuildInputs = [ pkgconfig intltool itstool libxml2 wrapGAppsHook ];
+  buildInputs = [
+    gtk3 glib libid3tag id3lib taglib libvorbis libogg opusfile flac
+    gsettings-desktop-schemas gnome3.defaultIconTheme
+  ];
+
+  doCheck = false; # fails 1 out of 9 tests
+
+  passthru = {
+    updateScript = gnome3.updateScript {
+      packageName = pname;
+      versionPolicy = "none";
+    };
+  };
+
+  meta = with stdenv.lib; {
+    description = "View and edit tags for various audio files";
+    homepage = https://wiki.gnome.org/Apps/EasyTAG;
+    license = licenses.gpl2Plus;
+    maintainers = with maintainers; [ fuuzetsu ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/ecasound/default.nix b/nixpkgs/pkgs/applications/audio/ecasound/default.nix
new file mode 100644
index 000000000000..a9d84eb6e6c5
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/ecasound/default.nix
@@ -0,0 +1,32 @@
+{ stdenv
+, fetchurl
+, alsaLib
+, audiofile
+, libjack2
+, liblo
+, liboil
+, libsamplerate
+, libsndfile
+, lilv
+, lv2
+}:
+
+# TODO: fix readline, ncurses, lilv, liblo, liboil and python. See configure log.
+
+stdenv.mkDerivation rec {
+  name = "ecasound-${version}";
+  version = "2.9.1";
+
+  src = fetchurl {
+    url = "https://ecasound.seul.org/download/ecasound-${version}.tar.gz";
+    sha256 = "1wyws3xc4f9pglrrqv6k9137sarv4asizqrxz8h0dn44rnzfiz1r";
+  };
+
+  buildInputs = [ alsaLib audiofile libjack2 liblo liboil libsamplerate libsndfile lilv lv2 ];
+
+  meta = {
+    description = "Ecasound is a software package designed for multitrack audio processing";
+    license = with stdenv.lib.licenses;  [ gpl2 lgpl21 ];
+    homepage = http://nosignal.fi/ecasound/;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/eflite/default.nix b/nixpkgs/pkgs/applications/audio/eflite/default.nix
new file mode 100644
index 000000000000..4138a07ec067
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/eflite/default.nix
@@ -0,0 +1,51 @@
+{ stdenv, fetchurl, fetchpatch, flite, alsaLib, debug ? false }:
+
+stdenv.mkDerivation rec {
+  name = "eflite-${version}";
+  version = "0.4.1";
+
+  src = fetchurl {
+    url = "https://sourceforge.net/projects/eflite/files/eflite/${version}/${name}.tar.gz";
+    sha256 = "088p9w816s02s64grfs28gai3lnibzdjb9d1jwxzr8smbs2qbbci";
+  };
+
+  buildInputs = [ flite alsaLib ];
+
+  configureFlags = [
+    "flite_dir=${flite}"
+    "--with-audio=alsa"
+    "--with-vox=cmu_us_kal16"
+  ];
+
+  patches = [
+    (fetchpatch {
+      url = "https://sources.debian.org/data/main/e/eflite/0.4.1-8/debian/patches/cvs-update";
+      sha256 = "0r631vzmky7b7qyhm152557y4fr0xqrpi3y4w66fcn6p4rj03j05";
+    })
+    (fetchpatch {
+      url = "https://sources.debian.org/data/main/e/eflite/0.4.1-8/debian/patches/buf-overflow";
+      sha256 = "071qk133kb7n7bq6kxgh3p9bba6hcl1ixsn4lx8vp8klijgrvkmx";
+    })
+    (fetchpatch {
+      url = "https://sources.debian.org/data/main/e/eflite/0.4.1-8/debian/patches/link";
+      sha256 = "0p833dp4pdsya72bwh3syvkq85927pm6snxvx13lvcppisbhj0fc";
+    })
+    ./format.patch
+  ];
+
+  CFLAGS = stdenv.lib.optionalString debug " -DDEBUG=2";
+
+  meta = {
+    homepage = http://eflite.sourceforge.net;
+    description = "EFlite is a speech server for screen readers";
+    longDescription = ''
+      EFlite is a speech server for Emacspeak and other screen
+      readers that allows them to interface with Festival Lite,
+      a free text-to-speech engine developed at the CMU Speech
+      Center as an off-shoot of Festival.
+    '';
+    license = stdenv.lib.licenses.gpl2;
+    platforms = stdenv.lib.platforms.linux;
+    maintainers = with stdenv.lib.maintainers; [ jhhuh ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/eflite/format.patch b/nixpkgs/pkgs/applications/audio/eflite/format.patch
new file mode 100644
index 000000000000..d1a81aac4801
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/eflite/format.patch
@@ -0,0 +1,11 @@
+--- eflite-0.4.1.orig/es.c	2017-03-02 14:38:36.009731423 +0100
++++ eflite-0.4.1/es.c	2017-03-02 14:39:06.285894934 +0100
+@@ -449,7 +449,7 @@
+   fclose(fp);
+   if (flags & LOG_STDERR)
+   {
+-    fprintf(stderr, buf);
++    fprintf(stderr, "%s", buf);
+     fprintf(stderr, "\n");
+   }
+ #endif
diff --git a/nixpkgs/pkgs/applications/audio/ekho/default.nix b/nixpkgs/pkgs/applications/audio/ekho/default.nix
new file mode 100644
index 000000000000..209ffa05bf28
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/ekho/default.nix
@@ -0,0 +1,38 @@
+{ stdenv, fetchurl, pkgconfig
+, libsndfile, libpulseaudio
+}:
+
+let
+  version = "5.8.2";
+in stdenv.mkDerivation rec {
+  name = "ekho-${version}";
+
+  meta = with stdenv.lib; {
+    description = "Chinese text-to-speech software";
+    homepage    = "http://www.eguidedog.net/ekho.php";
+    longDescription = ''
+      Ekho (余音) is a free, open source and multilingual text-to-speech (TTS)
+      software. It supports Cantonese (Chinese dialect spoken in Hong Kong and
+      part of Guangdong province), Mandarin (standard Chinese), Zhaoan Hakka
+      (a dialect in Taiwan), Tibetan, Ngangien (an ancient Chinese before
+      Yuan Dynasty) and Korean (in trial).
+    '';
+    license        = licenses.gpl2Plus;
+    platforms      = platforms.linux;
+    hydraPlatforms = [];
+  };
+
+  src = fetchurl {
+    url = "mirror://sourceforge/e-guidedog/Ekho/${version}/${name}.tar.xz";
+    sha256 = "0ym6lpcpsvwvsiwlzkl1509a2hljwcw7synngrmqjq1n49ww00nj";
+  };
+
+  preConfigure = with stdenv.lib; ''
+    NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE ${optionalString stdenv.is64bit "-D_x86_64"}"
+    NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -DEKHO_DATA_PATH=\"$out/share/ekho-data\""
+  '';
+
+  nativeBuildInputs = [ pkgconfig ];
+
+  buildInputs = [ libsndfile libpulseaudio ];
+}
diff --git a/nixpkgs/pkgs/applications/audio/elisa/default.nix b/nixpkgs/pkgs/applications/audio/elisa/default.nix
new file mode 100644
index 000000000000..00e10a2ff1e2
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/elisa/default.nix
@@ -0,0 +1,35 @@
+{ mkDerivation, fetchFromGitHub, lib
+, extra-cmake-modules, kdoctools, wrapGAppsHook
+, qtmultimedia, qtquickcontrols2, qtwebsockets
+, kconfig, kcmutils, kcrash, kdeclarative, kfilemetadata, kinit
+, baloo
+}:
+
+mkDerivation rec {
+  name = "elisa-${version}";
+  version = "0.3.0";
+
+  src = fetchFromGitHub {
+    owner  = "KDE";
+    repo   = "elisa";
+    rev    = "v${version}";
+    sha256 = "0bpkr5rp9nfa2wzm6w3xkhsfgf5dbgxbmhckjh9wkxal3mncpkg4";
+  };
+
+  nativeBuildInputs = [ extra-cmake-modules kdoctools wrapGAppsHook ];
+
+  propagatedBuildInputs = [
+    qtmultimedia qtquickcontrols2 qtwebsockets
+    kconfig kcmutils kcrash kdeclarative kfilemetadata kinit
+    baloo
+  ];
+
+  enableParallelBuilding = true;
+
+  meta = with lib; {
+    description = "Elisa Music Player";
+    license     = licenses.gpl3;
+    maintainers = with maintainers; [ peterhoeg ];
+    inherit (kconfig.meta) platforms;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/eq10q/default.nix b/nixpkgs/pkgs/applications/audio/eq10q/default.nix
new file mode 100644
index 000000000000..651604c71a11
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/eq10q/default.nix
@@ -0,0 +1,47 @@
+{ stdenv, fetchurl, fetchpatch, cmake, fftw, gtkmm2, libxcb, lv2, pkgconfig
+, xorg }:
+stdenv.mkDerivation rec {
+  name = "eq10q-${version}";
+  version = "2.2";
+  src = fetchurl {
+    url = "mirror://sourceforge/project/eq10q/${name}.tar.gz";
+    sha256 = "16mhcav8gwkp29k9ki4dlkajlcgh1i2wvldabxb046d37dq4qzrk";
+  };
+
+  nativeBuildInputs = [ pkgconfig ];
+  buildInputs = [ cmake fftw gtkmm2 libxcb lv2 xorg.libpthreadstubs xorg.libXdmcp xorg.libxshmfence ];
+
+  patches = [
+    (fetchpatch {
+      # glibc 2.27 compatibility
+      url = https://sources.debian.org/data/main/e/eq10q/2.2~repack0-2.1/debian/patches/05-pow10.patch;
+      sha256 = "07b0wf6k4xqgigv4h095bzfaw8r218wa36r9w1817jcys13r6c5r";
+    })
+  ];
+
+  installFlags = ''
+    DESTDIR=$(out)
+  '';
+
+  fixupPhase = ''
+    cp -r $out/var/empty/local/lib $out
+    rm -R $out/var
+  '';
+
+  meta = {
+    description = "LV2 EQ plugins and more, with 64 bit processing";
+    longDescription = ''
+      Up to 10-Bands parametric equalizer with mono and stereo versions.
+      Versatile noise-gate plugin with mono and stereo versions.
+      Compressor plugin with mono and stereo versions.
+      BassUp plugin - Enhanceing the bass guitar sound or other low frequency sounding instruments.
+      Improved high frequency response for peaking filter (in equalizers).
+      64 bits floating point internal audio processing.
+      Nice GUI with powerful metering for every plugin.
+    '';
+    homepage = http://eq10q.sourceforge.net/;
+    license = stdenv.lib.licenses.gpl3;
+    maintainers = [ stdenv.lib.maintainers.magnetophon ];
+    platforms = stdenv.lib.platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/espeak-ng/default.nix b/nixpkgs/pkgs/applications/audio/espeak-ng/default.nix
new file mode 100644
index 000000000000..5d0af8cf17ab
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/espeak-ng/default.nix
@@ -0,0 +1,35 @@
+{ stdenv, lib, fetchFromGitHub, autoconf, automake, which, libtool, pkgconfig
+, ronn
+, pcaudiolibSupport ? true, pcaudiolib
+, sonicSupport ? true, sonic }:
+
+stdenv.mkDerivation rec {
+  name = "espeak-ng-${version}";
+  version = "1.49.2";
+
+  src = fetchFromGitHub {
+    owner = "espeak-ng";
+    repo = "espeak-ng";
+    rev = version;
+    sha256 = "17bbl3zi8214iaaj8kjnancjvmvizwybg3sg17qjq4mf5c6xfg2c";
+  };
+
+  nativeBuildInputs = [ autoconf automake which libtool pkgconfig ronn ];
+
+  buildInputs = lib.optional pcaudiolibSupport pcaudiolib
+             ++ lib.optional sonicSupport sonic;
+
+  preConfigure = "./autogen.sh";
+
+  postInstall = ''
+    patchelf --set-rpath "$(patchelf --print-rpath $out/bin/espeak-ng)" $out/bin/speak-ng
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Open source speech synthesizer that supports over 70 languages, based on eSpeak";
+    homepage = src.meta.homepage;
+    license = licenses.gpl3;
+    maintainers = with maintainers; [ aske ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/espeak/default.nix b/nixpkgs/pkgs/applications/audio/espeak/default.nix
new file mode 100644
index 000000000000..6b5101b50b5a
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/espeak/default.nix
@@ -0,0 +1,35 @@
+{ stdenv, fetchurl, unzip, portaudio }:
+
+stdenv.mkDerivation rec {
+  name = "espeak-1.48.04";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/espeak/${name}-source.zip";
+    sha256 = "0n86gwh9pw0jqqpdz7mxggllfr8k0r7pc67ayy7w5z6z79kig6mz";
+  };
+
+  buildInputs = [ unzip portaudio ];
+
+  patches = [
+    ./gcc6.patch
+  ];
+
+  prePatch = ''
+    sed -e s,/bin/ln,ln,g -i src/Makefile
+    sed -e 's,^CXXFLAGS=-O2,CXXFLAGS=-O2 -D PATH_ESPEAK_DATA=\\\"$(DATADIR)\\\",' -i src/Makefile
+  '' + (if portaudio.api_version == 19 then ''
+    cp src/portaudio19.h src/portaudio.h
+  '' else "");
+
+  configurePhase = ''
+    cd src
+    makeFlags="PREFIX=$out DATADIR=$out/share/espeak-data"
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Compact open source software speech synthesizer";
+    homepage = http://espeak.sourceforge.net/;
+    license = licenses.gpl3Plus;
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/espeak/edit.nix b/nixpkgs/pkgs/applications/audio/espeak/edit.nix
new file mode 100644
index 000000000000..8d7db50fd323
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/espeak/edit.nix
@@ -0,0 +1,60 @@
+{ stdenv, fetchurl, pkgconfig, unzip, portaudio, wxGTK, sox }:
+
+stdenv.mkDerivation rec {
+  name = "espeakedit-1.48.03";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/espeak/${name}.zip";
+    sha256 = "0x8s7vpb7rw5x37yjzy1f98m4f2csdg89libb74fm36gn8ly0hli";
+  };
+
+  nativeBuildInputs = [ pkgconfig ];
+  buildInputs = [ unzip portaudio wxGTK ];
+
+  # TODO:
+  # Uhm, seems like espeakedit still wants espeak-data/ in $HOME, even thought
+  # it should use $espeak/share/espeak-data. Have to contact upstream to get
+  # this fixed.
+  #
+  # Workaround:
+  #  cp -r $(nix-build -A espeak)/share/espeak-data ~
+  #  chmod +w ~/espeak-data
+
+  patches = [
+    ./gcc6.patch
+    ./espeakedit-fix-makefile.patch
+    ./espeakedit-configurable-sox-path.patch
+    ./espeakedit-configurable-path-espeak-data.patch
+    ./espeakedit-gcc6.patch
+  ];
+
+  postPatch = ''
+    # Disable -Wall flag because it's noisy
+    sed -i "s/-Wall//g" src/Makefile
+
+    # Fixup paths (file names from above espeak-configurable* patches)
+    for file in src/compiledata.cpp src/readclause.cpp src/speech.h; do
+        sed -e "s|@sox@|${sox}/bin/sox|" \
+            -e "s|@prefix@|$out|" \
+            -i "$file"
+    done
+  '' + stdenv.lib.optionalString (portaudio.api_version == 19) ''
+    cp src/portaudio19.h src/portaudio.h
+  '';
+
+  buildPhase = ''
+    make -C src
+  '';
+
+  installPhase = ''
+    mkdir -p "$out/bin"
+    cp src/espeakedit "$out/bin"
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Phoneme editor for espeak";
+    homepage = http://espeak.sourceforge.net/;
+    license = licenses.gpl3Plus;
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/espeak/espeakedit-configurable-path-espeak-data.patch b/nixpkgs/pkgs/applications/audio/espeak/espeakedit-configurable-path-espeak-data.patch
new file mode 100644
index 000000000000..e5c761a11b35
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/espeak/espeakedit-configurable-path-espeak-data.patch
@@ -0,0 +1,15 @@
+Don't hardcode /usr, use @prefix@.
+
+Author: Bjørn Forsman
+diff -uNr espeakedit-1.48.03.orig/src/speech.h espeakedit-1.48.03/src/speech.h
+--- espeakedit-1.48.03.orig/src/speech.h	2014-03-04 17:48:12.000000000 +0100
++++ espeakedit-1.48.03/src/speech.h	2014-07-22 18:21:40.860790719 +0200
+@@ -58,7 +58,7 @@
+ 
+ // will look for espeak_data directory here, and also in user's home directory
+ #ifndef PATH_ESPEAK_DATA
+-   #define PATH_ESPEAK_DATA  "/usr/share/espeak-data"
++   #define PATH_ESPEAK_DATA  "@prefix@/share/espeak-data"
+ #endif
+ 
+ typedef unsigned short USHORT;
diff --git a/nixpkgs/pkgs/applications/audio/espeak/espeakedit-configurable-sox-path.patch b/nixpkgs/pkgs/applications/audio/espeak/espeakedit-configurable-sox-path.patch
new file mode 100644
index 000000000000..1c5dfc21941a
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/espeak/espeakedit-configurable-sox-path.patch
@@ -0,0 +1,27 @@
+Make the path to 'sox' configurable by marking it '@sox@' (easy to match with sed).
+
+Author: Bjørn Forsman
+diff -uNr espeakedit-1.48.03.orig/src/compiledata.cpp espeakedit-1.48.03/src/compiledata.cpp
+--- espeakedit-1.48.03.orig/src/compiledata.cpp	2014-03-04 17:48:11.000000000 +0100
++++ espeakedit-1.48.03/src/compiledata.cpp	2014-07-22 16:38:50.261388452 +0200
+@@ -1884,7 +1884,7 @@
+             fname2 = msg;
+         }
+ 
+-        sprintf(command,"sox \"%s%s.wav\" -r %d -c1 -t wav %s\n",path_source,fname2,samplerate_native, fname_temp);
++        sprintf(command,"@sox@ \"%s%s.wav\" -r %d -c1 -t wav %s\n",path_source,fname2,samplerate_native, fname_temp);
+         if(system(command) != 0)
+         {
+             failed = 1;
+diff -uNr espeakedit-1.48.03.orig/src/readclause.cpp espeakedit-1.48.03/src/readclause.cpp
+--- espeakedit-1.48.03.orig/src/readclause.cpp	2014-03-04 17:48:11.000000000 +0100
++++ espeakedit-1.48.03/src/readclause.cpp	2014-07-22 16:38:37.190440504 +0200
+@@ -892,7 +892,7 @@
+ 			if((fd_temp = mkstemp(fname_temp)) >= 0)
+ 			{
+ 				close(fd_temp);
+-				sprintf(command,"sox \"%s\" -r %d -c1 -t wav %s\n", fname, samplerate, fname_temp);
++				sprintf(command,"@sox@ \"%s\" -r %d -c1 -t wav %s\n", fname, samplerate, fname_temp);
+ 				if(system(command) == 0)
+ 				{
+ 					fname = fname_temp;
diff --git a/nixpkgs/pkgs/applications/audio/espeak/espeakedit-fix-makefile.patch b/nixpkgs/pkgs/applications/audio/espeak/espeakedit-fix-makefile.patch
new file mode 100644
index 000000000000..9f8a65d2b0ca
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/espeak/espeakedit-fix-makefile.patch
@@ -0,0 +1,26 @@
+Fix broken Makefile:
+
+* fix syntax error (missing '\' to continue line):
+    Makefile:19: *** recipe commences before first target.  Stop.
+* Get portaudio library flags from pkg-config (to get -Lpath/to/portaudio/lib etc.)
+
+Author: Bjørn Forsman
+diff -uNr espeakedit-1.48.03.orig/src/Makefile espeakedit-1.48.03/src/Makefile
+--- espeakedit-1.48.03.orig/src/Makefile	2013-03-13 15:52:02.000000000 +0100
++++ espeakedit-1.48.03/src/Makefile	2014-07-22 15:34:17.524114822 +0200
+@@ -12,12 +12,11 @@
+ 
+ WX_LIBS = -pthread   `wx-config --libs`
+ 
+-LIBS=-lstdc++ -lportaudio
++LIBS=-lstdc++ `pkg-config --libs portaudio-2.0`
+ #LIBS=-lstdc++ /usr/lib/x86_64-linux-gnu/libportaudio.so.2
+ 
+-CPPFLAGS =  -Wall -g -fexceptions `wx-config --cflags`
+-	-I/usr/include/wx-2.8 \
+-	-DGTK_NO_CHECK_CASTS -D__WXGTK__ -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES
++CPPFLAGS =  -Wall -g -fexceptions `wx-config --cflags` \
++	-DGTK_NO_CHECK_CASTS -D__WXGTK__ -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES \
+ 	-D_LARGEFILE_SOURCE=1 -DNO_GCC_PRAGMA -D_ESPEAKEDIT
+ 
+ CXXFLAGS = -O2  -Wall -fexceptions `wx-config --cflags` \
diff --git a/nixpkgs/pkgs/applications/audio/espeak/espeakedit-gcc6.patch b/nixpkgs/pkgs/applications/audio/espeak/espeakedit-gcc6.patch
new file mode 100644
index 000000000000..1e0cb20bbf76
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/espeak/espeakedit-gcc6.patch
@@ -0,0 +1,57 @@
+diff --git i/src/compiledata.cpp w/src/compiledata.cpp
+index f1bcb30..30e9e2d 100755
+--- i/src/compiledata.cpp
++++ w/src/compiledata.cpp
+@@ -212,7 +212,7 @@ enum {
+ 	kTUNE_SPLIT,
+ };
+ 
+-static const char utf8_bom[] = {0xef,0xbb,0xbf,0};
++static const char utf8_bom[] = {char(0xef),char(0xbb),char(0xbf),0};
+ 
+ static keywtab_t k_intonation[] = {
+ 	{"tune",      0,   kTUNE},
+diff --git i/src/espeakedit.cpp w/src/espeakedit.cpp
+index bde03ea..071689d 100755
+--- i/src/espeakedit.cpp
++++ w/src/espeakedit.cpp
+@@ -744,7 +744,7 @@ void MyFrame::OnTools(wxCommandEvent& event)
+ 	int debug_flag=0;
+ 	char fname_log[sizeof(path_dsource)+12];
+ 	char err_fname[sizeof(path_home)+15];
+-	static const char utf8_bom[] = {0xef,0xbb,0xbf,0};
++	static const char utf8_bom[] = {char(0xef),char(0xbb),char(0xbf),0};
+ 
+ 	switch(event.GetId())
+ 	{
+diff --git i/src/extras.cpp w/src/extras.cpp
+index fa6ac3b..ee68f59 100644
+--- i/src/extras.cpp
++++ w/src/extras.cpp
+@@ -335,16 +335,16 @@ void Lexicon_It(int pass)
+ 	static const char *vowels1 = "aeiou";
+ 	static const char *vowels2 = "aeou";
+ 
+-	static const char ex1[] = {'a',0xc3,0xac,0};  // aì
+-	static const char ex2[] = {'e',0xc3,0xac,0};  // eì
+-	static const char ex3[] = {0xc3,0xb9,'a',0};  // ùa
+-	static const char ex4[] = {0xc3,0xb9,'e',0};  // ùe
+-	static const char ex5[] = {0xc3,0xb9,'i',0};  // ùi
+-	static const char ex6[] = {0xc3,0xb9,'o',0};  // ùo
+-	static const char ex7[] = {'c',0xc3,0xac,'a',0};  // cìa
+-	static const char ex8[] = {'c',0xc3,0xac,'o',0};  // cìo
+-	static const char ex9[] = {'c',0xc3,0xac,'u',0};  // cìu
+-	static const char ex10[] = {'g','l',0xc3,0xac,0};  // glì
++	static const char ex1[] = {'a',char(0xc3),char(0xac),0};  // aì
++	static const char ex2[] = {'e',char(0xc3),char(0xac),0};  // eì
++	static const char ex3[] = {char(0xc3),char(0xb9),'a',0};  // ùa
++	static const char ex4[] = {char(0xc3),char(0xb9),'e',0};  // ùe
++	static const char ex5[] = {char(0xc3),char(0xb9),'i',0};  // ùi
++	static const char ex6[] = {char(0xc3),char(0xb9),'o',0};  // ùo
++	static const char ex7[] = {'c',char(0xc3),char(0xac),'a',0};  // cìa
++	static const char ex8[] = {'c',char(0xc3),char(0xac),'o',0};  // cìo
++	static const char ex9[] = {'c',char(0xc3),char(0xac),'u',0};  // cìu
++	static const char ex10[] = {'g','l',char(0xc3),char(0xac),0};  // glì
+ 
+ 
+ 	static const char *exceptions[] = {ex1, ex2, ex3, ex4, ex5, ex6, ex7, ex8, ex9, ex10, NULL};
diff --git a/nixpkgs/pkgs/applications/audio/espeak/gcc6.patch b/nixpkgs/pkgs/applications/audio/espeak/gcc6.patch
new file mode 100644
index 000000000000..58036ecbe509
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/espeak/gcc6.patch
@@ -0,0 +1,13 @@
+diff --git c/src/tr_languages.cpp i/src/tr_languages.cpp
+index ec210a5..9503f47 100755
+--- c/src/tr_languages.cpp
++++ i/src/tr_languages.cpp
+@@ -198,7 +198,7 @@ static const unsigned short chars_ignore_zwnj_hyphen[] = {
+ 	0x200d,  1, // zero width joiner
+ 	0, 0 };
+ 
+-const char string_ordinal[] = {0xc2,0xba,0};  // masculine ordinal character, UTF-8
++const char string_ordinal[] = {char(0xc2),char(0xba),0};  // masculine ordinal character, UTF-8
+ 
+ 
+ static Translator* NewTranslator(void)
diff --git a/nixpkgs/pkgs/applications/audio/eteroj.lv2/default.nix b/nixpkgs/pkgs/applications/audio/eteroj.lv2/default.nix
new file mode 100644
index 000000000000..28e4879efdc0
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/eteroj.lv2/default.nix
@@ -0,0 +1,24 @@
+{ stdenv, fetchFromGitHub, cmake, pkgconfig, libuv, lv2 }:
+
+stdenv.mkDerivation rec {
+  pname = "eteroj.lv2";
+  version = "0.4.0";
+  name = "${pname}-${version}";
+
+  src = fetchFromGitHub {
+    owner  = "OpenMusicKontrollers";
+    repo   = pname;
+    rev    = version;
+    sha256 = "0lzdk7hlz3vqgshrfpj0izjad1fmsnzk2vxqrry70xgz8xglvnmn";
+  };
+
+  buildInputs = [ libuv lv2 ];
+  nativeBuildInputs = [ cmake pkgconfig ];
+
+  meta = with stdenv.lib; {
+    description = "OSC injection/ejection from/to UDP/TCP/Serial for LV2";
+    homepage = https://open-music-kontrollers.ch/lv2/eteroj;
+    license = licenses.artistic2;
+    maintainers = with maintainers; [ magnetophon ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/faust/faust1.nix b/nixpkgs/pkgs/applications/audio/faust/faust1.nix
new file mode 100644
index 000000000000..6e47d921d345
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/faust/faust1.nix
@@ -0,0 +1,207 @@
+{ stdenv
+, coreutils
+, fetchurl
+, makeWrapper
+, pkgconfig
+}:
+
+with stdenv.lib.strings;
+
+let
+
+  version = "0.9.90";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/project/faudiostream/faust-${version}.tgz";
+    sha256 = "0d1fqwymyfb73zkmpwv4zk4gsg4ji7qs20mfsr20skmnqx30xvna";
+  };
+
+  meta = with stdenv.lib; {
+    homepage = http://faust.grame.fr/;
+    downloadPage = https://sourceforge.net/projects/faudiostream/files/;
+    license = licenses.gpl2;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ magnetophon pmahoney ];
+  };
+
+  faust = stdenv.mkDerivation {
+    name = "faust-${version}";
+
+    inherit src;
+
+    buildInputs = [ makeWrapper ];
+
+    passthru = {
+      inherit wrap wrapWithBuildEnv;
+    };
+
+    preConfigure = ''
+      makeFlags="$makeFlags prefix=$out"
+
+      # The faust makefiles use 'system ?= $(shell uname -s)' but nix
+      # defines 'system' env var, so undefine that so faust detects the
+      # correct system.
+      unset system
+    '';
+
+    # Remove most faust2appl scripts since they won't run properly
+    # without additional paths setup. See faust.wrap,
+    # faust.wrapWithBuildEnv.
+    postInstall = ''
+      # syntax error when eval'd directly
+      pattern="faust2!(*@(atomsnippets|graph|graphviewer|md|plot|sig|sigviewer|svg))"
+      (shopt -s extglob; rm "$out"/bin/$pattern)
+    '';
+
+    postFixup = ''
+      # Set faustpath explicitly.
+      substituteInPlace "$out"/bin/faustpath \
+        --replace "/usr/local /usr /opt /opt/local" "$out"
+
+      # The 'faustoptflags' is 'source'd into other faust scripts and
+      # not used as an executable, so patch 'uname' usage directly
+      # rather than use makeWrapper.
+      substituteInPlace "$out"/bin/faustoptflags \
+        --replace uname "${coreutils}/bin/uname"
+
+      # wrapper for scripts that don't need faust.wrap*
+      for script in "$out"/bin/faust2*; do
+        wrapProgram "$script" \
+          --prefix PATH : "$out"/bin
+      done
+    '';
+
+    meta = meta // {
+      description = "A functional programming language for realtime audio signal processing";
+      longDescription = ''
+        FAUST (Functional Audio Stream) is a functional programming
+        language specifically designed for real-time signal processing
+        and synthesis. FAUST targets high-performance signal processing
+        applications and audio plug-ins for a variety of platforms and
+        standards.
+        The Faust compiler translates DSP specifications into very
+        efficient C++ code. Thanks to the notion of architecture,
+        FAUST programs can be easily deployed on a large variety of
+        audio platforms and plugin formats (jack, alsa, ladspa, maxmsp,
+        puredata, csound, supercollider, pure, vst, coreaudio) without
+        any change to the FAUST code.
+
+        This package has just the compiler, libraries, and headers.
+        Install faust2* for specific faust2appl scripts.
+      '';
+    };
+
+  };
+
+  # Default values for faust2appl.
+  faust2ApplBase =
+    { baseName
+    , dir ? "tools/faust2appls"
+    , scripts ? [ baseName ]
+    , ...
+    }@args:
+
+    args // {
+      name = "${baseName}-${version}";
+
+      inherit src;
+
+      dontBuild = true;
+
+      installPhase = ''
+        runHook preInstall
+
+        mkdir -p "$out/bin"
+        for script in ${concatStringsSep " " scripts}; do
+          cp "${dir}/$script" "$out/bin/"
+        done
+
+        runHook postInstall
+      '';
+
+      postInstall = ''
+        # For the faust2appl script, change 'faustpath' and
+        # 'faustoptflags' to absolute paths.
+        for script in "$out"/bin/*; do
+          substituteInPlace "$script" \
+            --replace ". faustpath" ". '${faust}/bin/faustpath'" \
+            --replace ". faustoptflags" ". '${faust}/bin/faustoptflags'"
+        done
+      '';
+
+      meta = meta // {
+        description = "The ${baseName} script, part of faust functional programming language for realtime audio signal processing";
+      };
+    };
+
+  # Some 'faust2appl' scripts, such as faust2alsa, run faust to
+  # generate cpp code, then invoke the c++ compiler to build the code.
+  # This builder wraps these scripts in parts of the stdenv such that
+  # when the scripts are called outside any nix build, they behave as
+  # if they were running inside a nix build in terms of compilers and
+  # paths being configured (e.g. rpath is set so that compiled
+  # binaries link to the libs inside the nix store)
+  #
+  # The function takes two main args: the appl name (e.g.
+  # 'faust2alsa') and an optional list of propagatedBuildInputs. It
+  # returns a derivation that contains only the bin/${appl} script,
+  # wrapped up so that it will run as if it was inside a nix build
+  # with those build inputs.
+  #
+  # The build input 'faust' is automatically added to the
+  # propagatedBuildInputs.
+  wrapWithBuildEnv =
+    { baseName
+    , propagatedBuildInputs ? [ ]
+    , ...
+    }@args:
+
+    stdenv.mkDerivation ((faust2ApplBase args) // {
+
+      nativeBuildInputs = [ pkgconfig ];
+      buildInputs = [ makeWrapper ];
+
+      propagatedBuildInputs = [ faust ] ++ propagatedBuildInputs;
+
+      postFixup = ''
+
+        # export parts of the build environment
+        for script in "$out"/bin/*; do
+          wrapProgram "$script" \
+            --set FAUSTLIB "${faust}/lib/faust" \
+            --set FAUSTINC "${faust}/include/faust" \
+            --prefix PATH : "$PATH" \
+            --prefix PKG_CONFIG_PATH : "$PKG_CONFIG_PATH" \
+            --set NIX_CFLAGS_COMPILE "$NIX_CFLAGS_COMPILE" \
+            --set NIX_LDFLAGS "$NIX_LDFLAGS"
+        done
+      '';
+    });
+
+  # Builder for 'faust2appl' scripts, such as faust2firefox that
+  # simply need to be wrapped with some dependencies on PATH.
+  #
+  # The build input 'faust' is automatically added to the PATH.
+  wrap =
+    { baseName
+    , runtimeInputs ? [ ]
+    , ...
+    }@args:
+
+    let
+
+      runtimePath = concatStringsSep ":" (map (p: "${p}/bin") ([ faust ] ++ runtimeInputs));
+
+    in stdenv.mkDerivation ((faust2ApplBase args) // {
+
+      buildInputs = [ makeWrapper ];
+
+      postFixup = ''
+        for script in "$out"/bin/*; do
+          wrapProgram "$script" --prefix PATH : "${runtimePath}"
+        done
+      '';
+
+    });
+
+in faust
diff --git a/nixpkgs/pkgs/applications/audio/faust/faust2.nix b/nixpkgs/pkgs/applications/audio/faust/faust2.nix
new file mode 100644
index 000000000000..383d2deb10bb
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/faust/faust2.nix
@@ -0,0 +1,245 @@
+{ stdenv
+, coreutils
+, fetchFromGitHub
+, makeWrapper
+, pkgconfig
+, llvm
+, emscripten
+, openssl
+, libsndfile
+, libmicrohttpd
+, vim
+}:
+
+with stdenv.lib.strings;
+
+let
+
+  version = "2.5.23";
+
+  src = fetchFromGitHub {
+    owner = "grame-cncm";
+    repo = "faust";
+    rev = "${version}";
+    sha256 = "1pci8ac6sqrm3mb3yikmmr3iy35g3nj4iihazif1amqkbdz719rc";
+    fetchSubmodules = true;
+  };
+
+  meta = with stdenv.lib; {
+    homepage = http://faust.grame.fr/;
+    downloadPage = https://sourceforge.net/projects/faudiostream/files/;
+    license = licenses.gpl2;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ magnetophon pmahoney ];
+  };
+
+  faust = stdenv.mkDerivation {
+
+    name = "faust-${version}";
+
+    inherit src;
+
+    nativeBuildInputs = [ makeWrapper pkgconfig vim ];
+    buildInputs = [ llvm emscripten openssl libsndfile libmicrohttpd ];
+
+
+    passthru = {
+      inherit wrap wrapWithBuildEnv;
+    };
+
+
+    preConfigure = ''
+      makeFlags="$makeFlags prefix=$out LLVM_CONFIG='${llvm}/bin/llvm-config' world"
+
+      # The faust makefiles use 'system ?= $(shell uname -s)' but nix
+      # defines 'system' env var, so undefine that so faust detects the
+      # correct system.
+      unset system
+      # sed -e "232s/LLVM_STATIC_LIBS/LLVMLIBS/" -i compiler/Makefile.unix
+
+      # The makefile sets LLVM_<version> depending on the current llvm
+      # version, but the detection code is quite brittle.
+      #
+      # Failing to properly detect the llvm version means that the macro
+      # LLVM_VERSION ends up being the raw output of `llvm-config --version`, while
+      # the code assumes that it's set to a symbol like `LLVM_35`.  Two problems result:
+      # * <command-line>:0:1: error: macro names must be identifiers.; and
+      # * a bunch of undefined reference errors due to conditional definitions relying on
+      #   LLVM_XY being defined.
+      #
+      # For now, fix this by 1) pinning the llvm version; 2) manually setting LLVM_VERSION
+      # to something the makefile will recognize.
+      sed '52iLLVM_VERSION=${stdenv.lib.getVersion llvm}' -i compiler/Makefile.unix
+    '';
+
+    postPatch = ''
+      # fix build with llvm 5.0.2 by adding it to the list of known versions
+      # TODO: check if still needed on next update
+      substituteInPlace compiler/Makefile.unix \
+        --replace "5.0.0 5.0.1" "5.0.0 5.0.1 5.0.2"
+    '';
+
+    # Remove most faust2appl scripts since they won't run properly
+    # without additional paths setup. See faust.wrap,
+    # faust.wrapWithBuildEnv.
+    postInstall = ''
+      # syntax error when eval'd directly
+      pattern="faust2!(*@(atomsnippets|graph|graphviewer|md|plot|sig|sigviewer|svg))"
+      (shopt -s extglob; rm "$out"/bin/$pattern)
+    '';
+
+    postFixup = ''
+      # Set faustpath explicitly.
+      substituteInPlace "$out"/bin/faustpath \
+        --replace "/usr/local /usr /opt /opt/local" "$out"
+
+      # The 'faustoptflags' is 'source'd into other faust scripts and
+      # not used as an executable, so patch 'uname' usage directly
+      # rather than use makeWrapper.
+      substituteInPlace "$out"/bin/faustoptflags \
+        --replace uname "${coreutils}/bin/uname"
+
+      # wrapper for scripts that don't need faust.wrap*
+      for script in "$out"/bin/faust2*; do
+        wrapProgram "$script" \
+          --prefix PATH : "$out"/bin
+      done
+    '';
+
+    meta = meta // {
+      description = "A functional programming language for realtime audio signal processing";
+      longDescription = ''
+        FAUST (Functional Audio Stream) is a functional programming
+        language specifically designed for real-time signal processing
+        and synthesis. FAUST targets high-performance signal processing
+        applications and audio plug-ins for a variety of platforms and
+        standards.
+        The Faust compiler translates DSP specifications into very
+        efficient C++ code. Thanks to the notion of architecture,
+        FAUST programs can be easily deployed on a large variety of
+        audio platforms and plugin formats (jack, alsa, ladspa, maxmsp,
+        puredata, csound, supercollider, pure, vst, coreaudio) without
+        any change to the FAUST code.
+
+        This package has just the compiler, libraries, and headers.
+        Install faust2* for specific faust2appl scripts.
+      '';
+    };
+
+  };
+
+  # Default values for faust2appl.
+  faust2ApplBase =
+    { baseName
+    , dir ? "tools/faust2appls"
+    , scripts ? [ baseName ]
+    , ...
+    }@args:
+
+    args // {
+      name = "${baseName}-${version}";
+
+      inherit src;
+
+      dontBuild = true;
+
+      installPhase = ''
+        runHook preInstall
+
+        mkdir -p "$out/bin"
+        for script in ${concatStringsSep " " scripts}; do
+          cp "${dir}/$script" "$out/bin/"
+        done
+
+        runHook postInstall
+      '';
+
+      postInstall = ''
+        # For the faust2appl script, change 'faustpath' and
+        # 'faustoptflags' to absolute paths.
+        for script in "$out"/bin/*; do
+          substituteInPlace "$script" \
+            --replace ". faustpath" ". '${faust}/bin/faustpath'" \
+            --replace ". faustoptflags" ". '${faust}/bin/faustoptflags'" \
+            --replace " error " "echo"
+        done
+      '';
+
+      meta = meta // {
+        description = "The ${baseName} script, part of faust functional programming language for realtime audio signal processing";
+      };
+    };
+
+  # Some 'faust2appl' scripts, such as faust2alsa, run faust to
+  # generate cpp code, then invoke the c++ compiler to build the code.
+  # This builder wraps these scripts in parts of the stdenv such that
+  # when the scripts are called outside any nix build, they behave as
+  # if they were running inside a nix build in terms of compilers and
+  # paths being configured (e.g. rpath is set so that compiled
+  # binaries link to the libs inside the nix store)
+  #
+  # The function takes two main args: the appl name (e.g.
+  # 'faust2alsa') and an optional list of propagatedBuildInputs. It
+  # returns a derivation that contains only the bin/${appl} script,
+  # wrapped up so that it will run as if it was inside a nix build
+  # with those build inputs.
+  #
+  # The build input 'faust' is automatically added to the
+  # propagatedBuildInputs.
+  wrapWithBuildEnv =
+    { baseName
+    , propagatedBuildInputs ? [ ]
+    , ...
+    }@args:
+
+    stdenv.mkDerivation ((faust2ApplBase args) // {
+
+      nativeBuildInputs = [ pkgconfig ];
+      buildInputs = [ makeWrapper ];
+
+      propagatedBuildInputs = [ faust ] ++ propagatedBuildInputs;
+
+
+      postFixup = ''
+
+        # export parts of the build environment
+        for script in "$out"/bin/*; do
+          wrapProgram "$script" \
+            --set FAUSTLIB "${faust}/share/faust" \
+            --set FAUST_LIB_PATH "${faust}/share/faust" \
+            --set FAUSTINC "${faust}/include/faust" \
+            --prefix PATH : "$PATH" \
+            --prefix PKG_CONFIG_PATH : "$PKG_CONFIG_PATH" \
+            --set NIX_CFLAGS_COMPILE "$NIX_CFLAGS_COMPILE" \
+            --set NIX_LDFLAGS "$NIX_LDFLAGS"
+        done
+      '';
+    });
+
+  # Builder for 'faust2appl' scripts, such as faust2firefox that
+  # simply need to be wrapped with some dependencies on PATH.
+  #
+  # The build input 'faust' is automatically added to the PATH.
+  wrap =
+    { baseName
+    , runtimeInputs ? [ ]
+    , ...
+    }@args:
+
+    let
+
+      runtimePath = concatStringsSep ":" (map (p: "${p}/bin") ([ faust ] ++ runtimeInputs));
+
+    in stdenv.mkDerivation ((faust2ApplBase args) // {
+
+      buildInputs = [ makeWrapper ];
+
+      postFixup = ''
+        for script in "$out"/bin/*; do
+          wrapProgram "$script" --prefix PATH : "${runtimePath}"
+        done
+      '';
+
+    });
+
+in faust
diff --git a/nixpkgs/pkgs/applications/audio/faust/faust2alqt.nix b/nixpkgs/pkgs/applications/audio/faust/faust2alqt.nix
new file mode 100644
index 000000000000..8ac26e488b37
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/faust/faust2alqt.nix
@@ -0,0 +1,15 @@
+{ faust
+, alsaLib
+, qt4
+}:
+
+faust.wrapWithBuildEnv {
+
+  baseName = "faust2alqt";
+
+  propagatedBuildInputs = [
+    alsaLib
+    qt4
+  ];
+
+}
diff --git a/nixpkgs/pkgs/applications/audio/faust/faust2alsa.nix b/nixpkgs/pkgs/applications/audio/faust/faust2alsa.nix
new file mode 100644
index 000000000000..17cec46f6c6a
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/faust/faust2alsa.nix
@@ -0,0 +1,29 @@
+{ faust
+, alsaLib
+, atk
+, cairo
+, fontconfig
+, freetype
+, gdk_pixbuf
+, glib
+, gtk2
+, pango
+}:
+
+faust.wrapWithBuildEnv {
+
+  baseName = "faust2alsa";
+
+  propagatedBuildInputs = [
+    alsaLib
+    atk
+    cairo
+    fontconfig
+    freetype
+    gdk_pixbuf
+    glib
+    gtk2
+    pango
+  ];
+
+}
diff --git a/nixpkgs/pkgs/applications/audio/faust/faust2csound.nix b/nixpkgs/pkgs/applications/audio/faust/faust2csound.nix
new file mode 100644
index 000000000000..eb5e5831cddd
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/faust/faust2csound.nix
@@ -0,0 +1,20 @@
+{ faust
+, csound
+}:
+
+faust.wrapWithBuildEnv {
+
+  baseName = "faust2csound";
+
+  propagatedBuildInputs = [
+    csound
+  ];
+
+  # faust2csound generated .cpp files have
+  #   #include "csdl.h"
+  # but that file is in the csound/ subdirectory
+  preFixup = ''
+    NIX_CFLAGS_COMPILE="$(printf '%s' "$NIX_CFLAGS_COMPILE" | sed 's%${csound}/include%${csound}/include/csound%')"
+  '';
+
+}
diff --git a/nixpkgs/pkgs/applications/audio/faust/faust2firefox.nix b/nixpkgs/pkgs/applications/audio/faust/faust2firefox.nix
new file mode 100644
index 000000000000..b2cc6f464575
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/faust/faust2firefox.nix
@@ -0,0 +1,14 @@
+{ faust
+, xdg_utils
+}:
+
+# This just runs faust2svg, then attempts to open a browser using
+# 'xdg-open'.
+
+faust.wrap {
+
+  baseName = "faust2firefox";
+
+  runtimeInputs = [ xdg_utils ];
+
+}
diff --git a/nixpkgs/pkgs/applications/audio/faust/faust2jack.nix b/nixpkgs/pkgs/applications/audio/faust/faust2jack.nix
new file mode 100644
index 000000000000..7762ca393690
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/faust/faust2jack.nix
@@ -0,0 +1,25 @@
+{ faust
+, gtk2
+, jack2Full
+, opencv
+, libsndfile
+}:
+
+faust.wrapWithBuildEnv {
+
+  baseName = "faust2jack";
+
+  scripts = [
+    "faust2jack"
+    "faust2jackinternal"
+    "faust2jackconsole"
+  ];
+
+  propagatedBuildInputs = [
+    gtk2
+    jack2Full
+    opencv
+    libsndfile
+  ];
+
+}
diff --git a/nixpkgs/pkgs/applications/audio/faust/faust2jaqt.nix b/nixpkgs/pkgs/applications/audio/faust/faust2jaqt.nix
new file mode 100644
index 000000000000..5a015e5ca31e
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/faust/faust2jaqt.nix
@@ -0,0 +1,24 @@
+{ faust
+, jack2Full
+, opencv
+, qt4
+, libsndfile
+}:
+
+faust.wrapWithBuildEnv {
+
+  baseName = "faust2jaqt";
+
+  scripts = [
+    "faust2jaqt"
+    "faust2jackserver"
+  ];
+
+  propagatedBuildInputs = [
+    jack2Full
+    opencv
+    qt4
+    libsndfile
+  ];
+
+}
diff --git a/nixpkgs/pkgs/applications/audio/faust/faust2ladspa.nix b/nixpkgs/pkgs/applications/audio/faust/faust2ladspa.nix
new file mode 100644
index 000000000000..67de98cab9a2
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/faust/faust2ladspa.nix
@@ -0,0 +1,12 @@
+{ boost
+, faust
+, ladspaH
+}:
+
+faust.wrapWithBuildEnv {
+
+  baseName = "faust2ladspa";
+
+  propagatedBuildInputs = [ boost ladspaH ];
+
+}
diff --git a/nixpkgs/pkgs/applications/audio/faust/faust2lv2.nix b/nixpkgs/pkgs/applications/audio/faust/faust2lv2.nix
new file mode 100644
index 000000000000..3472ce5047eb
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/faust/faust2lv2.nix
@@ -0,0 +1,14 @@
+{ boost
+, faust
+, lv2
+, qt4
+
+}:
+
+faust.wrapWithBuildEnv {
+
+  baseName = "faust2lv2";
+
+  propagatedBuildInputs = [ boost lv2 qt4 ];
+
+}
diff --git a/nixpkgs/pkgs/applications/audio/faust/faustlive.nix b/nixpkgs/pkgs/applications/audio/faust/faustlive.nix
new file mode 100644
index 000000000000..754c48070603
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/faust/faustlive.nix
@@ -0,0 +1,35 @@
+{ stdenv, fetchFromGitHub
+, llvm, qt48Full, qrencode, libmicrohttpd, libjack2, alsaLib, faust, curl
+, bc, coreutils, which
+}:
+
+stdenv.mkDerivation rec {
+  name = "faustlive-${version}";
+  version = "2017-12-05";
+  src = fetchFromGitHub {
+    owner = "grame-cncm";
+    repo = "faustlive";
+    rev = "281fcb852dcd94f8c57ade1b2a7a3937542e1b2d";
+    sha256 = "0sw44yd9928rid9ib0b5mx2x129m7zljrayfm6jz6hrwdc5q3k9a";
+  };
+
+  buildInputs = [
+    llvm qt48Full qrencode libmicrohttpd libjack2 alsaLib faust curl
+    bc coreutils which
+  ];
+
+  makeFlags = [ "PREFIX=$(out)" ];
+
+  preBuild = "patchShebangs Build/Linux/buildversion";
+
+  meta = with stdenv.lib; {
+    description = "A standalone just-in-time Faust compiler";
+    longDescription = ''
+      FaustLive is a standalone just-in-time Faust compiler. It tries to bring
+      together the convenience of a standalone interpreted language with the
+      efficiency of a compiled language. It's ideal for fast prototyping.
+    '';
+    homepage = http://faust.grame.fr/;
+    license = licenses.gpl3;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/flac/default.nix b/nixpkgs/pkgs/applications/audio/flac/default.nix
new file mode 100644
index 000000000000..fb5390cb46ef
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/flac/default.nix
@@ -0,0 +1,23 @@
+{ stdenv, fetchurl, libogg }:
+
+stdenv.mkDerivation rec {
+  name = "flac-1.3.2";
+
+  src = fetchurl {
+    url = "http://downloads.xiph.org/releases/flac/${name}.tar.xz";
+    sha256 = "0gymm2j3276kr9nz6vmgfwsdfrq6c449n40a0mzz8h6wc7nw7kwi";
+  };
+
+  buildInputs = [ libogg ];
+
+  #doCheck = true; # takes lots of time
+
+  outputs = [ "bin" "dev" "out" "man" "doc" ];
+
+  meta = with stdenv.lib; {
+    homepage = https://xiph.org/flac/;
+    description = "Library and tools for encoding and decoding the FLAC lossless audio file format";
+    platforms = platforms.all;
+    license = licenses.bsd3;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/flac123/default.nix b/nixpkgs/pkgs/applications/audio/flac123/default.nix
new file mode 100644
index 000000000000..f0863bfc50b0
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/flac123/default.nix
@@ -0,0 +1,21 @@
+{ stdenv, fetchurl, autoreconfHook, flac, libao, libogg, popt }:
+
+stdenv.mkDerivation rec {
+  name = "flac123-${version}";
+  version = "0.0.12";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/flac-tools/${name}-release.tar.gz";
+    sha256 = "0zg4ahkg7v81za518x32wldf42g0rrvlrcqhrg9sv3li9bayyxhr";
+  };
+
+  nativeBuildInputs = [ autoreconfHook ];
+  buildInputs = [ flac libao libogg popt ];
+
+  meta = with stdenv.lib; {
+    homepage = http://flac-tools.sourceforge.net/;
+    description = "A command-line program for playing FLAC audio files";
+    license = licenses.gpl2Plus;
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/flacon/default.nix b/nixpkgs/pkgs/applications/audio/flacon/default.nix
new file mode 100644
index 000000000000..1c5eaba78b27
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/flacon/default.nix
@@ -0,0 +1,34 @@
+{ stdenv, lib, fetchFromGitHub, cmake, qt5, libuchardet, pkgconfig, makeWrapper
+, shntool, flac, opusTools, vorbis-tools, mp3gain, lame, wavpack, vorbisgain
+, gtk3
+}:
+
+stdenv.mkDerivation rec {
+  name = "flacon-${version}";
+  version = "5.1.0";
+
+  src = fetchFromGitHub {
+    owner = "flacon";
+    repo = "flacon";
+    rev = "v${version}";
+    sha256 = "18m077z1hqjg10chy5rgajd9q1wnrcxhiidivgjcdchc9q5d4b08";
+  };
+
+  nativeBuildInputs = [ cmake pkgconfig makeWrapper ];
+  buildInputs = [ qt5.qtbase qt5.qttools libuchardet ];
+
+  postInstall = ''
+    wrapProgram $out/bin/flacon \
+      --suffix XDG_DATA_DIRS : "${gtk3}/share/gsettings-schemas/${gtk3.name}" \
+      --prefix PATH : "${lib.makeBinPath [ shntool flac opusTools vorbis-tools
+     mp3gain lame wavpack vorbisgain ]}"
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Extracts audio tracks from an audio CD image to separate tracks.";
+    homepage = https://flacon.github.io/;
+    license = licenses.lgpl21;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ ndowens nico202 ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/fldigi/default.nix b/nixpkgs/pkgs/applications/audio/fldigi/default.nix
new file mode 100644
index 000000000000..ad5b120b7883
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/fldigi/default.nix
@@ -0,0 +1,23 @@
+{ stdenv, fetchurl, hamlib, fltk13, libjpeg, libpng, portaudio, libsndfile,
+  libsamplerate, libpulseaudio, libXinerama, gettext, pkgconfig, alsaLib }:
+
+stdenv.mkDerivation rec {
+  version = "4.1.00";
+  pname = "fldigi";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/${pname}/${pname}-${version}.tar.gz";
+    sha256 = "1hm2n4p3pdd029kizgzwf3zzgsy1m6z83z7rr2kyjhrq2vp5gf0s";
+  };
+
+  buildInputs = [ libXinerama gettext hamlib fltk13 libjpeg libpng portaudio
+                  libsndfile libsamplerate libpulseaudio pkgconfig alsaLib ];
+
+  meta = {
+    description = "Digital modem program";
+    homepage = https://sourceforge.net/projects/fldigi/;
+    license = stdenv.lib.licenses.gpl3Plus;
+    maintainers = with stdenv.lib.maintainers; [ relrod ftrvxmtrx ];
+    platforms = stdenv.lib.platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/fluidsynth/default.nix b/nixpkgs/pkgs/applications/audio/fluidsynth/default.nix
new file mode 100644
index 000000000000..3eb5806aa4c1
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/fluidsynth/default.nix
@@ -0,0 +1,48 @@
+{ stdenv, lib, fetchFromGitHub, pkgconfig, cmake
+, alsaLib, glib, libjack2, libsndfile, libpulseaudio
+, AudioUnit, CoreAudio, CoreMIDI, CoreServices
+, version ? "2"
+}:
+
+let
+  versionMap = {
+    "1" = {
+      fluidsynthVersion = "1.1.11";
+      sha256 = "0n75jq3xgq46hfmjkaaxz3gic77shs4fzajq40c8gk043i84xbdh";
+    };
+    "2" = {
+      fluidsynthVersion = "2.0.2";
+      sha256 = "02vs5sfsyh1dl7wlcvgs4w3x0qcmsl7vi000qgp99ynwh3wjb274";
+    };
+  };
+in
+
+with versionMap.${version};
+
+stdenv.mkDerivation  rec {
+  name = "fluidsynth-${fluidsynthVersion}";
+  version = fluidsynthVersion;
+
+  src = fetchFromGitHub {
+    owner = "FluidSynth";
+    repo = "fluidsynth";
+    rev = "v${fluidsynthVersion}";
+    inherit sha256;
+  };
+
+  nativeBuildInputs = [ pkgconfig cmake ];
+
+  buildInputs = [ glib libsndfile ]
+    ++ lib.optionals (!stdenv.isDarwin) [ alsaLib libpulseaudio libjack2 ]
+    ++ lib.optionals stdenv.isDarwin [ AudioUnit CoreAudio CoreMIDI CoreServices ];
+
+  cmakeFlags = lib.optional stdenv.isDarwin "-Denable-framework=off";
+
+  meta = with lib; {
+    description = "Real-time software synthesizer based on the SoundFont 2 specifications";
+    homepage    = http://www.fluidsynth.org;
+    license     = licenses.lgpl21Plus;
+    maintainers = with maintainers; [ goibhniu lovek323 ];
+    platforms   = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/fmit/default.nix b/nixpkgs/pkgs/applications/audio/fmit/default.nix
new file mode 100644
index 000000000000..a61f7dc0a905
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/fmit/default.nix
@@ -0,0 +1,53 @@
+{ stdenv, fetchFromGitHub, fftw, qtbase, qtmultimedia, qmake
+, alsaSupport ? true, alsaLib ? null
+, jackSupport ? false, libjack2 ? null
+, portaudioSupport ? false, portaudio ? null }:
+
+assert alsaSupport -> alsaLib != null;
+assert jackSupport -> libjack2 != null;
+assert portaudioSupport -> portaudio != null;
+
+with stdenv.lib;
+
+stdenv.mkDerivation rec {
+  name = "fmit-${version}";
+  version = "1.1.14";
+
+  src = fetchFromGitHub {
+    sha256 = "18gvl8smcnigzldy1acs5h8rscf287b39xi4y2cl5armqbj0y38x";
+    rev = "v${version}";
+    repo = "fmit";
+    owner = "gillesdegottex";
+  };
+
+  nativeBuildInputs = [ qmake ];
+  buildInputs = [ fftw qtbase qtmultimedia ]
+    ++ optionals alsaSupport [ alsaLib ]
+    ++ optionals jackSupport [ libjack2 ]
+    ++ optionals portaudioSupport [ portaudio ];
+
+  postPatch = ''
+    substituteInPlace fmit.pro --replace '$$FMITVERSIONGITPRO' '${version}'
+  '';
+
+  preConfigure = ''
+    qmakeFlags="$qmakeFlags \
+      CONFIG+=${optionalString alsaSupport "acs_alsa"} \
+      CONFIG+=${optionalString jackSupport "acs_jack"} \
+      CONFIG+=${optionalString portaudioSupport "acs_portaudio"} \
+      PREFIXSHORTCUT=$out"
+  '';
+
+  enableParallelBuilding = true;
+
+  meta = {
+    description = "Free Musical Instrument Tuner";
+    longDescription = ''
+      FMIT is a graphical utility for tuning musical instruments, with error
+      and volume history, and advanced features.
+    '';
+    homepage = http://gillesdegottex.github.io/fmit/;
+    license = licenses.gpl3Plus;
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/fmsynth/default.nix b/nixpkgs/pkgs/applications/audio/fmsynth/default.nix
new file mode 100644
index 000000000000..58d095080fe5
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/fmsynth/default.nix
@@ -0,0 +1,49 @@
+{ stdenv, fetchFromGitHub, gtkmm2, lv2, lvtk, pkgconfig }:
+stdenv.mkDerivation rec {
+  name = "fmsynth-unstable-${version}";
+  version = "2015-02-07";
+  src = fetchFromGitHub {
+    owner = "Themaister";
+    repo = "libfmsynth";
+    rev = "9ffa1d2fea287f1209b210d2dbde2f0f60f37176";
+    sha256 = "1bk0bpr069hzx2508rgfbwpxiqgr7dmdkhqdywmd2i4rmibgrm1q";
+  };
+
+  nativeBuildInputs = [ pkgconfig ];
+  buildInputs = [ gtkmm2 lv2 lvtk ];
+
+  buildPhase = ''
+    cd lv2
+    substituteInPlace GNUmakefile --replace "/usr/lib/lv2" "$out/lib/lv2"
+    make
+  '';
+
+  preInstall = "mkdir -p $out/lib/lv2";
+
+  meta = {
+    description = "a flexible 8 operator FM synthesizer for LV2";
+    longDescription = ''
+      The synth core supports:
+
+      - Arbitrary amounts of polyphony
+      - 8 operators
+      - No fixed "algorithms"
+      - Arbitrary modulation, every operator can modulate any other operator, even itself
+      - Arbitrary carrier selection, every operator can be a carrier
+      - Sine LFO, separate LFO per voice, modulates amplitude and frequency of operators
+      - Envelope per operator
+      - Carrier stereo panning
+      - Velocity sensitivity per operator
+      - Mod wheel sensitivity per operator
+      - Pitch bend
+      - Keyboard scaling
+      - Sustain, sustained keys can overlap each other for a very rich sound
+      - Full floating point implementation optimized for SIMD
+      - Hard real-time constraints
+    '';
+    homepage = https://github.com/Themaister/libfmsynth;
+    license = stdenv.lib.licenses.mit;
+    maintainers = [ stdenv.lib.maintainers.magnetophon ];
+    platforms = stdenv.lib.platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/fomp/default.nix b/nixpkgs/pkgs/applications/audio/fomp/default.nix
new file mode 100644
index 000000000000..680fab4ca643
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/fomp/default.nix
@@ -0,0 +1,22 @@
+{ stdenv, fetchurl, lv2, pkgconfig, python2, wafHook }:
+
+stdenv.mkDerivation rec {
+  name = "fomp-${version}";
+  version = "1.0.0";
+
+  src = fetchurl {
+    url = "https://download.drobilla.net/${name}.tar.bz2";
+    sha256 = "1hh2xhknanqn3iwp12ihl6bf8p7bqxryms9qk7mh21lixl42b8k5";
+  };
+
+  nativeBuildInputs = [ pkgconfig wafHook ];
+  buildInputs = [ lv2 python2 ];
+
+  meta = with stdenv.lib; {
+    homepage = http://drobilla.net/software/fomp/;
+    description = "An LV2 port of the MCP, VCO, FIL, and WAH plugins by Fons Adriaensen";
+    license = licenses.gpl2;
+    maintainers = [ maintainers.magnetophon ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/foo-yc20/default.nix b/nixpkgs/pkgs/applications/audio/foo-yc20/default.nix
new file mode 100644
index 000000000000..28b2cd98e02c
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/foo-yc20/default.nix
@@ -0,0 +1,29 @@
+{ stdenv, fetchFromGitHub,  libjack2, gtk2, lv2, faust, pkgconfig }:
+
+stdenv.mkDerivation rec {
+  version = "git-2015-05-21";
+  name = "foo-yc20-${version}";
+  src = fetchFromGitHub {
+    owner = "sampov2";
+    repo = "foo-yc20";
+    rev = "edd9d14c91229429b14270a181743e1046160ca8";
+    sha256 = "0i8261n95n4xic766h70xkrpbvw3sag96n1883ahmg6h7yb94avq";
+  };
+
+  nativeBuildInputs = [ pkgconfig ];
+  buildInputs = [ libjack2 gtk2 lv2 faust ];
+
+  makeFlags = "PREFIX=$(out)";
+
+  # remove lv2 until https://github.com/sampov2/foo-yc20/issues/6 is resolved
+  postInstallFixup = "rm -rf $out/lib/lv2";
+
+  meta = {
+    broken = true; # see: https://github.com/sampov2/foo-yc20/issues/7
+    description = "A Faust implementation of a 1969 designed Yamaha combo organ, the YC-20";
+    homepage = https://github.com/sampov2/foo-yc20;
+    license     = "BSD";
+    maintainers = [ stdenv.lib.maintainers.magnetophon ];
+    platforms = stdenv.lib.platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/freewheeling/am_path_sdl.patch b/nixpkgs/pkgs/applications/audio/freewheeling/am_path_sdl.patch
new file mode 100644
index 000000000000..2bc3b4f45ac2
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/freewheeling/am_path_sdl.patch
@@ -0,0 +1,40 @@
+--- code-r100/configure.ac	2014-09-25 23:44:41.059174904 +0200
++++ code-r100.new/configure.ac	2014-09-26 01:37:18.507017390 +0200
+@@ -44,6 +44,8 @@
+   [AC_MSG_ERROR(CONFIG: You need libxml2-dev installed.
+ 	        http://www.xmlsoft.org/)])
+ 
++PKG_CHECK_MODULES([libxml], [libxml-2.0])
++
+ AC_CHECK_LIB([m], [sqrt], , [AC_MSG_ERROR(CORE: You need libm installed)])
+ AC_CHECK_LIB([pthread], [pthread_self], , [AC_MSG_ERROR(CORE: You need libpthread installed)])
+ 
+@@ -79,12 +81,12 @@
+    echo "--- Enabling USB LCD display --";
+ fi
+ 
+-#SDL_VERSION=1.2.4
+-#AM_PATH_SDL($SDL_VERSION,
+-#            :,
+-#	    AC_MSG_ERROR([VIDEO: *** SDL version $SDL_VERSION not found!
+-#		          http://www.libsdl.org/])
+-#)
++SDL_VERSION=1.2.4
++AM_PATH_SDL($SDL_VERSION,
++            :,
++	    AC_MSG_ERROR([VIDEO: *** SDL version $SDL_VERSION not found!
++		          http://www.libsdl.org/])
++)
+ 
+ AC_CHECK_LIB([vorbis], [main], , 
+   [AC_MSG_ERROR(AUDIO: You need libvorbis-dev installed.
+@@ -95,6 +97,9 @@
+ AC_CHECK_LIB([vorbisenc], [main], , 
+   [AC_MSG_ERROR(AUDIO: You need libvorbis-dev installed.
+ 		http://www.xiph.org/ogg/vorbis/)])
++AC_CHECK_LIB([ogg], [main], , 
++  [AC_MSG_ERROR(AUDIO: You need libogg-dev installed.
++		http://www.xiph.org/ogg/)])
+ 
+ AC_CHECK_LIB([sndfile], [main], , 
+   [AC_MSG_ERROR(AUDIO: you need libsndfile installed.
diff --git a/nixpkgs/pkgs/applications/audio/freewheeling/default.nix b/nixpkgs/pkgs/applications/audio/freewheeling/default.nix
new file mode 100644
index 000000000000..4266b8c69bb8
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/freewheeling/default.nix
@@ -0,0 +1,51 @@
+{ lib, stdenv, fetchFromGitHub, pkgconfig, autoreconfHook, gnutls, freetype
+, SDL, SDL_gfx, SDL_ttf, liblo, libxml2, alsaLib, libjack2, libvorbis
+, libSM, libsndfile, libogg, libtool
+}:
+let
+  makeSDLFlags = map (p: "-I${lib.getDev p}/include/SDL");
+in
+
+stdenv.mkDerivation rec {
+  name = "freewheeling-${version}";
+  version = "0.6.4";
+
+  src = fetchFromGitHub {
+    owner = "free-wheeling";
+    repo = "freewheeling";
+    rev = "v${version}";
+    sha256 = "1xflbbnjdibjmyxb1zq8liylaw5k03nnl1z3272jh204pqh17ri9";
+  };
+
+  nativeBuildInputs = [ pkgconfig autoreconfHook libtool ];
+  buildInputs = [
+    freetype SDL SDL_gfx SDL_ttf
+    liblo libxml2 libjack2 alsaLib libvorbis libsndfile libogg libSM
+    (gnutls.overrideAttrs (oldAttrs: {
+      configureFlags = oldAttrs.configureFlags ++ [ "--enable-openssl-compatibility" ];
+    }))
+  ];
+  NIX_CFLAGS_COMPILE = makeSDLFlags [ SDL SDL_ttf SDL_gfx ] ++ [ "-I${libxml2.dev}/include/libxml2" ];
+
+  hardeningDisable = [ "format" ];
+
+  meta = {
+    description = "A live looping instrument with JACK and MIDI support";
+    longDescription = ''
+        Freewheeling allows us to build repetitive grooves
+        by sampling and directing loops from within spirited improvisation.
+
+        It works because, down to the core, it's built around
+        improv. We leave mice and menus, and dive into our own process
+        of making sound.
+
+        Freewheeling runs under macOS and Linux, and is open source
+        software, released under the GNU GPL license.
+    '' ;
+
+    homepage = http://freewheeling.sourceforge.net;
+    license = stdenv.lib.licenses.gpl2;
+    maintainers = [ stdenv.lib.maintainers.sepi ];
+    platforms = stdenv.lib.platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/freewheeling/xml.patch b/nixpkgs/pkgs/applications/audio/freewheeling/xml.patch
new file mode 100644
index 000000000000..fd9d4fb39fe4
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/freewheeling/xml.patch
@@ -0,0 +1,13 @@
+--- code-r100/src/Makefile.am	2014-09-25 23:44:41.043174832 +0200
++++ code-r100.new/src/Makefile.am	2014-09-26 01:21:03.750015888 +0200
+@@ -24,7 +24,8 @@
+ 
+ fweelindir = $(datadir)/fweelin
+ 
+-FWEELIN_CFLAGS = -I. -g -Wall -Wno-write-strings -Wno-non-virtual-dtor -D_REENTRANT -DPTHREADS -DNDEBUG -DVERSION=\"$(VERSION)\" -DFWEELIN_DATADIR=\"$(fweelindir)\" -DADDON_DIR=\"/usr/local/lib/jack\" -I/usr/include/freetype2 -I/usr/include/libxml2 -funroll-loops -finline-functions -fomit-frame-pointer -ffast-math -fexpensive-optimizations -fstrict-aliasing -falign-loops=2 -falign-jumps=2 -falign-functions=2 -O9
++XML_CFLAGS = `xml2-config --cflags`
++FWEELIN_CFLAGS = -I. -g -Wall -Wno-write-strings -Wno-non-virtual-dtor -D_REENTRANT -DPTHREADS -DNDEBUG -DVERSION=\"$(VERSION)\" -DFWEELIN_DATADIR=\"$(fweelindir)\" -DADDON_DIR=\"/usr/local/lib/jack\" -I/usr/include/freetype2 $(XML_CFLAGS) -funroll-loops -finline-functions -fomit-frame-pointer -ffast-math -fexpensive-optimizations -fstrict-aliasing -falign-loops=2 -falign-jumps=2 -falign-functions=2 -O9
+ 
+ AM_CFLAGS = $(CFLAGS) $(FWEELIN_CFLAGS)
+-AM_CXXFLAGS = $(CFLAGS) $(CXXFLAGS) $(FWEELIN_CFLAGS)
++AM_CXXFLAGS = $(CFLAGS) $(CXXFLAGS) $(FWEELIN_CFLAGS) ${libxml2_CFLAGS}
diff --git a/nixpkgs/pkgs/applications/audio/game-music-emu/default.nix b/nixpkgs/pkgs/applications/audio/game-music-emu/default.nix
new file mode 100644
index 000000000000..a0a79785283c
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/game-music-emu/default.nix
@@ -0,0 +1,21 @@
+{ stdenv, fetchurl, cmake }:
+
+stdenv.mkDerivation rec {
+  version = "0.6.1";
+  name = "game-music-emu-${version}";
+
+  src = fetchurl {
+    url = "https://bitbucket.org/mpyne/game-music-emu/downloads/${name}.tar.bz2";
+    sha256 = "08fk7zddpn7v93d0fa7fcypx7hvgwx9b5psj9l6m8b87k2hbw4fw";
+  };
+
+  buildInputs = [ cmake ];
+
+  meta = with stdenv.lib; {
+    homepage = https://bitbucket.org/mpyne/game-music-emu/wiki/Home;
+    description = "A collection of video game music file emulators";
+    license = licenses.lgpl21Plus;
+    platforms = platforms.all;
+    maintainers = [ ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/gbsplay/default.nix b/nixpkgs/pkgs/applications/audio/gbsplay/default.nix
new file mode 100644
index 000000000000..9ff9b8dc1145
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/gbsplay/default.nix
@@ -0,0 +1,28 @@
+{ stdenv, fetchFromGitHub, libpulseaudio }:
+
+stdenv.mkDerivation {
+  name = "gbsplay-2016-12-17";
+
+  src = fetchFromGitHub {
+    owner = "mmitch";
+    repo = "gbsplay";
+    rev = "2c4486e17fd4f4cdea8c3fd79ae898c892616b70";
+    sha256 = "1214j67sr87zfhvym41cw2g823fmqh4hr451r7y1s9ql3jpjqhpz";
+  };
+
+  buildInputs = [ libpulseaudio ];
+  
+  configureFlagsArray =
+   [ "--without-test" "--without-contrib" "--disable-devdsp"
+     "--enable-pulse" "--disable-alsa" "--disable-midi"
+     "--disable-nas" "--disable-dsound" "--disable-i18n" ];
+
+  makeFlagsArray = [ "tests=" ];
+
+  meta = with stdenv.lib; {
+    description = "gameboy sound player";
+    license = licenses.gpl1;
+    platforms = ["i686-linux" "x86_64-linux"];
+    maintainers = with maintainers; [ dasuxullebt ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/gigedit/default.nix b/nixpkgs/pkgs/applications/audio/gigedit/default.nix
new file mode 100644
index 000000000000..e9ce20f6c80a
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/gigedit/default.nix
@@ -0,0 +1,31 @@
+{ stdenv, fetchurl, autoconf, automake, intltool, libtool, pkgconfig, which
+, docbook_xml_dtd_45, docbook_xsl, gtkmm2, libgig, libsndfile, libxslt
+}:
+
+stdenv.mkDerivation rec {
+  name = "gigedit-${version}";
+  version = "1.1.0";
+
+  src = fetchurl {
+    url = "https://download.linuxsampler.org/packages/${name}.tar.bz2";
+    sha256 = "087pc919q28r1vw31c7w4m14bqnp4md1i2wbmk8w0vmwv2cbx2ni";
+  };
+
+  patches = [ ./gigedit-1.1.0-pangomm-2.40.1.patch ];
+
+  preConfigure = "make -f Makefile.svn";
+
+  nativeBuildInputs = [ autoconf automake intltool libtool pkgconfig which ];
+
+  buildInputs = [ docbook_xml_dtd_45 docbook_xsl gtkmm2 libgig libsndfile libxslt ];
+
+  enableParallelBuilding = true;
+
+  meta = with stdenv.lib; {
+    homepage = http://www.linuxsampler.org;
+    description = "Gigasampler file access library";
+    license = licenses.gpl2;
+    maintainers = [ maintainers.goibhniu ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/gigedit/gigedit-1.1.0-pangomm-2.40.1.patch b/nixpkgs/pkgs/applications/audio/gigedit/gigedit-1.1.0-pangomm-2.40.1.patch
new file mode 100644
index 000000000000..eb00fcc87a24
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/gigedit/gigedit-1.1.0-pangomm-2.40.1.patch
@@ -0,0 +1,15 @@
+--- a/src/gigedit/wrapLabel.cc
++++ b/src/gigedit/wrapLabel.cc
+@@ -64,12 +64,7 @@ WrapLabel::WrapLabel(const Glib::ustring &text) // IN: The label text
+    : mWrapWidth(0),
+      mWrapHeight(0)
+ {
+-   // pangomm >= 2.35.1
+-#if PANGOMM_MAJOR_VERSION > 2 || (PANGOMM_MAJOR_VERSION == 2 && (PANGOMM_MINOR_VERSION > 35 || (PANGOMM_MINOR_VERSION == 35 && PANGOMM_MICRO_VERSION >= 1)))
+-   get_layout()->set_wrap(Pango::WrapMode::WORD_CHAR);
+-#else
+    get_layout()->set_wrap(Pango::WRAP_WORD_CHAR);
+-#endif
+    set_alignment(0.0, 0.0);
+    set_text(text);
+ }
diff --git a/nixpkgs/pkgs/applications/audio/gjay/default.nix b/nixpkgs/pkgs/applications/audio/gjay/default.nix
new file mode 100644
index 000000000000..42285ba4bf86
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/gjay/default.nix
@@ -0,0 +1,25 @@
+{ stdenv, fetchurl, pkgconfig, mpd_clientlib, dbus-glib, audacious, gtk2, gsl
+, libaudclient }:
+
+stdenv.mkDerivation {
+  name = "gjay-0.3.2";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/project/gjay/gjay-0.3.2.tar.gz";
+    sha256 = "1a1vv4r0vnxjdyl0jyv7gga3zfd5azxlwjm1l6hjrf71lb228zn8";
+  };
+
+  nativeBuildInputs = [ pkgconfig ];
+
+  buildInputs = [ mpd_clientlib dbus-glib audacious gtk2 gsl libaudclient ];
+
+  hardeningDisable = [ "format" ];
+
+  meta = with stdenv.lib; {
+    description = "Generates playlists such that each song sounds good following the previous song";
+    homepage = http://gjay.sourceforge.net/;
+    license = licenses.gpl2;
+    maintainers = with maintainers; [ pSub ];
+    platforms = with platforms; linux;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/gmpc/default.nix b/nixpkgs/pkgs/applications/audio/gmpc/default.nix
new file mode 100644
index 000000000000..099e4428016e
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/gmpc/default.nix
@@ -0,0 +1,40 @@
+{ stdenv, fetchurl, libtool, intltool, pkgconfig, glib
+, gtk2, curl, mpd_clientlib, libsoup, gob2, vala, libunique
+, libSM, libICE, sqlite, hicolor-icon-theme, wrapGAppsHook
+}:
+
+stdenv.mkDerivation rec {
+  name = "gmpc-${version}";
+  version = "11.8.16";
+
+  libmpd = stdenv.mkDerivation {
+    name = "libmpd-11.8.17";
+    src = fetchurl {
+      url = http://download.sarine.nl/Programs/gmpc/11.8/libmpd-11.8.17.tar.gz;
+      sha256 = "10vspwsgr8pwf3qp2bviw6b2l8prgdiswgv7qiqiyr0h1mmk487y";
+    };
+    patches = [ ./libmpd-11.8.17-remove-strndup.patch ];
+
+    nativeBuildInputs = [ pkgconfig ];
+    buildInputs = [ glib ];
+  };
+
+  src = fetchurl {
+    url = "http://download.sarine.nl/Programs/gmpc/11.8/gmpc-11.8.16.tar.gz";
+    sha256 = "0b3bnxf98i5lhjyljvgxgx9xmb6p46cn3a9cccrng14nagri9556";
+  };
+
+  nativeBuildInputs = [ pkgconfig libtool intltool gob2 vala wrapGAppsHook ];
+  buildInputs = [
+    glib gtk2 curl mpd_clientlib libsoup
+    libunique libmpd libSM libICE sqlite hicolor-icon-theme
+  ];
+
+  meta = with stdenv.lib; {
+    homepage = https://gmpclient.org;
+    description = "A GTK2 frontend for Music Player Daemon";
+    license = licenses.gpl2;
+    maintainers = [ maintainers.rickynils ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/gmpc/libmpd-11.8.17-remove-strndup.patch b/nixpkgs/pkgs/applications/audio/gmpc/libmpd-11.8.17-remove-strndup.patch
new file mode 100644
index 000000000000..ad4fdc02ef3e
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/gmpc/libmpd-11.8.17-remove-strndup.patch
@@ -0,0 +1,15 @@
+diff --git a/src/libmpd-internal.h b/src/libmpd-internal.h
+index c84c3a4..51be441 100644
+--- a/src/libmpd-internal.h
++++ b/src/libmpd-internal.h
+@@ -206,10 +206,6 @@ int mpd_unlock_conn(MpdObj *mi);
+ MpdData * mpd_misc_sort_tag_list(MpdData *data);
+ 
+ 
+-#ifndef HAVE_STRNDUP
+-char * 		strndup					(const char *s, size_t n);
+-#endif
+-
+ int mpd_server_get_allowed_commands(MpdObj *mi);
+ typedef enum _MpdSearchType {
+ 	MPD_SEARCH_TYPE_NONE,
diff --git a/nixpkgs/pkgs/applications/audio/gmu/default.nix b/nixpkgs/pkgs/applications/audio/gmu/default.nix
new file mode 100644
index 000000000000..8446855d190c
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/gmu/default.nix
@@ -0,0 +1,31 @@
+{stdenv, fetchurl, SDL, SDL_gfx, SDL_image, tremor, flac, mpg123, libmikmod
+, speex, ncurses
+, keymap ? "default"
+, conf ? "unknown"
+}:
+
+stdenv.mkDerivation rec {
+  name = "gmu-0.10.1";
+
+  src = fetchurl {
+    url = "http://wejp.k.vu/files/${name}.tar.gz";
+    sha256 = "03x0mc0xw2if0bpf0a15yprcyx1xccki039zvl2099dagwk6xskv";
+  };
+
+  buildInputs = [ SDL SDL_gfx SDL_image tremor flac mpg123 libmikmod speex ncurses ];
+
+  makeFlags = [ "PREFIX=$(out)" ];
+
+  postInstall = ''
+    cp ${keymap}.keymap $out/share/gmu/default.keymap
+    cp gmuinput.${conf}.conf $out/share/gmu/gmuinput.conf
+    mkdir -p $out/etc/gmu
+    cp gmu.${conf}.conf $out/etc/gmu/gmu.conf
+  '';
+
+  meta = {
+    homepage = http://wejp.k.vu/projects/gmu;
+    description = "Open source music player for portable gaming consoles and handhelds";
+    license = stdenv.lib.licenses.gpl2;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/gnaural/default.nix b/nixpkgs/pkgs/applications/audio/gnaural/default.nix
new file mode 100644
index 000000000000..f5887e870db6
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/gnaural/default.nix
@@ -0,0 +1,19 @@
+{ stdenv, fetchurl, pkgconfig, gtk2, libsndfile, portaudio }:
+
+stdenv.mkDerivation rec {
+  name = "gnaural-1.0.20110606";
+  nativeBuildInputs = [ pkgconfig ];
+  buildInputs = [ gtk2 libsndfile portaudio ];
+  src = fetchurl {
+    url = "mirror://sourceforge/gnaural/Gnaural/${name}.tar.gz";
+    sha256 = "0p9rasz1jmxf16vnpj17g3vzdjygcyz3l6nmbq6wr402l61f1vy5";
+  };
+  meta = with stdenv.lib;
+    { description = "Auditory binaural-beat generator";
+      homepage = http://gnaural.sourceforge.net/;
+      license = licenses.gpl2;
+      maintainers = [ maintainers.ehmry ];
+      platforms = platforms.linux;
+      broken = true;
+    };
+}
diff --git a/nixpkgs/pkgs/applications/audio/gnome-podcasts/default.nix b/nixpkgs/pkgs/applications/audio/gnome-podcasts/default.nix
new file mode 100644
index 000000000000..c8db1ac6d10a
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/gnome-podcasts/default.nix
@@ -0,0 +1,44 @@
+{ stdenv, fetchurl, fetchFromGitLab, meson, ninja, gettext, cargo, rustc, python3, rustPlatform, pkgconfig, gnome3
+, glib, libhandy, gtk3, dbus, openssl, sqlite, gst_all_1, wrapGAppsHook }:
+
+# TODO: build from git for easier updates
+# rustPlatform.buildRustPackage rec {
+stdenv.mkDerivation rec {
+  version = "0.4.6";
+  name = "gnome-podcasts-${version}";
+
+  src = fetchurl {
+    url = https://gitlab.gnome.org/World/podcasts/uploads/e59ac5d618d7daf4c7f33ba72957c466/gnome-podcasts-0.4.6.tar.xz;
+    sha256 = "0g2rk3w251fp5jwbxs5ya1adv8nsgdqjy1vmfg8qqab6qyndhbrc";
+  };
+
+  # src = fetchFromGitLab {
+  #   domain = "gitlab.gnome.org";
+  #   owner = "World";
+  #   repo = "podcasts";
+  #   rev = version;
+  #   sha256 = "15xj98dhxvys0cnya9488qsfsm0ys1wy69wkc39z8j6hwdm7byq2";
+  # };
+
+  nativeBuildInputs = [
+    meson ninja pkgconfig gettext cargo rustc python3 wrapGAppsHook
+  ];
+  buildInputs = [
+    glib gtk3 libhandy dbus openssl sqlite gst_all_1.gstreamer gst_all_1.gst-plugins-base gst_all_1.gst-plugins-bad
+  ];
+
+  # cargoSha256 = "0721b5f700vvvzvmdl8nfjaa6j412q1fjssgrjv8n6rmn9z13d2v";
+
+  postPatch = ''
+    chmod +x scripts/compile-gschema.py # patchShebangs requires executable file
+    patchShebangs scripts/compile-gschema.py
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Listen to your favorite podcasts";
+    homepage = https://wiki.gnome.org/Apps/Podcasts;
+    license = licenses.gpl3;
+    maintainers = gnome3.maintainers;
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/google-musicmanager/default.nix b/nixpkgs/pkgs/applications/audio/google-musicmanager/default.nix
new file mode 100644
index 000000000000..b4fe78dcbfcd
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/google-musicmanager/default.nix
@@ -0,0 +1,77 @@
+{ stdenv, fetchurl
+, flac, expat, libidn, qtbase, qtwebkit, libvorbis }:
+assert stdenv.hostPlatform.system == "x86_64-linux";
+
+stdenv.mkDerivation rec {
+  version = "beta_1.0.467.4929-r0"; # friendly to nix-env version sorting algo
+  product = "google-musicmanager";
+  name    = "${product}-${version}";
+
+  # When looking for newer versions, since google doesn't let you list their repo dirs,
+  # curl http://dl.google.com/linux/musicmanager/deb/dists/stable/Release
+  # fetch an appropriate packages file such as main/binary-amd64/Packages:
+  # curl http://dl.google.com/linux/musicmanager/deb/dists/stable/main/binary-amd64/Packages
+  # which will contain the links to all available *.debs for the arch.
+
+  src = fetchurl {
+    url    = "http://dl.google.com/linux/musicmanager/deb/pool/main/g/google-musicmanager-beta/${name}_amd64.deb";
+    sha256 = "0yaprpbp44var88kdj1h11fqkhgcklixr69jyia49v9m22529gg2";
+  };
+
+  unpackPhase = ''
+    ar vx ${src}
+    tar xvf data.tar.xz
+    tar xvf control.tar.gz
+  '';
+
+  prePatch = ''
+    sed -i "s@\(Exec=\).*@\1$out/bin/google-musicmanager@" opt/google/musicmanager/google-musicmanager.desktop
+  '';
+
+  installPhase = ''
+    mkdir -p $out/bin
+    mkdir -p $out/lib
+    mkdir -p $out/share/applications
+
+    cp -r opt $out
+    find -name "*.so*" -exec cp "{}" $out/lib \;
+    ln -s $out/opt/google/musicmanager/google-musicmanager $out/bin
+    ln -s $out/opt/google/musicmanager/google-musicmanager.desktop $out/share/applications
+
+    for i in 16 32 48 128
+    do
+      iconDirectory=$out/usr/share/icons/hicolor/"$i"x"$i"/apps
+
+      mkdir -p $iconDirectory
+      ln -s $out/opt/google/musicmanager/product_logo_"$i".png $iconDirectory/google-musicmanager.png
+    done
+  '';
+
+  postFixup = ''
+    patchelf \
+      --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
+      --set-rpath "$(patchelf --print-rpath $out/opt/google/musicmanager/minidump_upload):${stdenv.lib.makeLibraryPath [ stdenv.cc.cc.lib ]}" \
+      $out/opt/google/musicmanager/minidump_upload
+
+    patchelf \
+      --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
+      --set-rpath "$(patchelf --print-rpath $out/opt/google/musicmanager/MusicManager):$out/lib:${stdenv.lib.makeLibraryPath [
+        flac
+        expat
+        libidn
+        qtbase
+        qtwebkit
+        libvorbis
+        stdenv.cc.cc.lib
+      ]}" \
+      $out/opt/google/musicmanager/MusicManager
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Uploads music from your computer to Google Play";
+    homepage    = "https://support.google.com/googleplay/answer/1229970";
+    license     = licenses.unfree;
+    maintainers = with maintainers; [ lovek323 ];
+    platforms   = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/google-play-music-desktop-player/default.nix b/nixpkgs/pkgs/applications/audio/google-play-music-desktop-player/default.nix
new file mode 100644
index 000000000000..5951572dd246
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/google-play-music-desktop-player/default.nix
@@ -0,0 +1,80 @@
+{ stdenv, alsaLib, atk, cairo, cups, dbus, dpkg, expat, fontconfig, freetype
+, fetchurl, GConf, gdk_pixbuf, glib, gtk2, gtk3, libpulseaudio, makeWrapper, nspr
+, nss, pango, udev, xorg
+}:
+
+let
+  version = "4.6.1";
+
+  deps = [
+    alsaLib
+    atk
+    cairo
+    cups
+    dbus
+    expat
+    fontconfig
+    freetype
+    GConf
+    gdk_pixbuf
+    glib
+    gtk2
+    gtk3
+    libpulseaudio
+    nspr
+    nss
+    pango
+    stdenv.cc.cc
+    udev
+    xorg.libX11
+    xorg.libxcb
+    xorg.libXcomposite
+    xorg.libXcursor
+    xorg.libXdamage
+    xorg.libXext
+    xorg.libXfixes
+    xorg.libXi
+    xorg.libXrandr
+    xorg.libXrender
+    xorg.libXScrnSaver
+    xorg.libXtst
+  ];
+
+in
+
+stdenv.mkDerivation {
+  name = "google-play-music-desktop-player-${version}";
+
+  src = fetchurl {
+    url = "https://github.com/MarshallOfSound/Google-Play-Music-Desktop-Player-UNOFFICIAL-/releases/download/v${version}/google-play-music-desktop-player_${version}_amd64.deb";
+    sha256 = "0dyn2fxhcri9d9nmcprszs6yg79gsr09bjfzzb1p10yjmi77cj2g";
+  };
+
+  dontBuild = true;
+  buildInputs = [ dpkg makeWrapper ];
+
+  unpackPhase = ''
+    dpkg -x $src .
+  '';
+
+  installPhase = ''
+    mkdir -p $out
+    cp -r ./usr/share $out
+    cp -r ./usr/bin $out
+
+    patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
+             "$out/share/google-play-music-desktop-player/Google Play Music Desktop Player"
+
+    wrapProgram $out/bin/google-play-music-desktop-player \
+      --prefix LD_LIBRARY_PATH : "$out/share/google-play-music-desktop-player" \
+      --prefix LD_LIBRARY_PATH : "${stdenv.lib.makeLibraryPath deps}"
+  '';
+
+  meta = {
+    homepage = https://www.googleplaymusicdesktopplayer.com/;
+    description = "A beautiful cross platform Desktop Player for Google Play Music";
+    license = stdenv.lib.licenses.mit;
+    platforms = [ "x86_64-linux" ];
+    maintainers = [ stdenv.lib.maintainers.SuprDewd ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/gpodder/default.nix b/nixpkgs/pkgs/applications/audio/gpodder/default.nix
new file mode 100644
index 000000000000..2544be383e5d
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/gpodder/default.nix
@@ -0,0 +1,77 @@
+{ stdenv, fetchFromGitHub, python3, python3Packages, intltool
+, glibcLocales, gnome3, gtk3, wrapGAppsHook
+, ipodSupport ? false, libgpod, gobject-introspection
+}:
+
+python3Packages.buildPythonApplication rec {
+  pname = "gpodder";
+  version = "3.10.7";
+  format = "other";
+
+  src = fetchFromGitHub {
+    owner = pname;
+    repo = pname;
+    rev = version;
+    sha256 = "0sx9rj6dpvd2xz7lak2yi0zlgr3lp2ng1fw23s39la9ly4g1835j";
+  };
+
+  postPatch = with stdenv.lib; ''
+    sed -i -re 's,^( *gpodder_dir *= *).*,\1"'"$out"'",' bin/gpodder
+  '';
+
+  nativeBuildInputs = [
+    intltool
+    wrapGAppsHook
+    glibcLocales
+  ];
+
+  buildInputs = [
+    python3
+    gobject-introspection
+    gnome3.defaultIconTheme
+  ];
+
+  checkInputs = with python3Packages; [
+    coverage minimock
+  ];
+
+  doCheck = true;
+
+  propagatedBuildInputs = with python3Packages; [
+    feedparser
+    dbus-python
+    mygpoclient
+    pygobject3
+    eyeD3
+    podcastparser
+    html5lib
+    gtk3
+  ] ++ stdenv.lib.optional ipodSupport libgpod;
+
+  makeFlags = [
+    "PREFIX=$(out)"
+    "share/applications/gpodder-url-handler.desktop"
+    "share/applications/gpodder.desktop"
+    "share/dbus-1/services/org.gpodder.service"
+  ];
+
+  preBuild = ''
+    export LC_ALL="en_US.UTF-8"
+  '';
+
+  installCheckPhase = ''
+    LC_ALL=C PYTHONPATH=./src:$PYTHONPATH python3 -m gpodder.unittests
+  '';
+
+  meta = with stdenv.lib; {
+    description = "A podcatcher written in python";
+    longDescription = ''
+      gPodder downloads and manages free audio and video content (podcasts)
+      for you. Listen directly on your computer or on your mobile devices.
+    '';
+    homepage = http://gpodder.org/;
+    license = licenses.gpl3;
+    platforms = platforms.linux ++ platforms.darwin;
+    maintainers = with maintainers; [ skeidel mic92 ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/gradio/0001-Remove-post-install-script-that-hardcodes-paths.patch b/nixpkgs/pkgs/applications/audio/gradio/0001-Remove-post-install-script-that-hardcodes-paths.patch
new file mode 100644
index 000000000000..3a6296baaa64
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/gradio/0001-Remove-post-install-script-that-hardcodes-paths.patch
@@ -0,0 +1,23 @@
+From 184c64718ee68b2738647f4a106b260c47f00437 Mon Sep 17 00:00:00 2001
+From: Sam Parkinson <sam@sam.today>
+Date: Thu, 26 Oct 2017 14:50:13 +1100
+Subject: [PATCH] Remove post-install script that hardcodes paths
+
+---
+ meson.build | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/meson.build b/meson.build
+index 25f3e1a..18b43bd 100644
+--- a/meson.build
++++ b/meson.build
+@@ -21,4 +21,5 @@ subdir('src')
+ # subdir('tests')
+ # TODO: unit tests
+ 
+-meson.add_install_script('meson_post_install.sh')
++# This does not work for nixos; it hard-codes paths
++# meson.add_install_script('meson_post_install.sh')
+-- 
+2.14.2
+
diff --git a/nixpkgs/pkgs/applications/audio/gradio/default.nix b/nixpkgs/pkgs/applications/audio/gradio/default.nix
new file mode 100644
index 000000000000..3aea07235d8a
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/gradio/default.nix
@@ -0,0 +1,71 @@
+{ stdenv, fetchFromGitHub, pkgconfig
+, python3
+, gsettings-desktop-schemas
+, desktop-file-utils
+, glib
+, gtk3
+, intltool
+, libsoup
+, json-glib
+, wrapGAppsHook
+, meson
+, ninja
+, vala
+, sqlite
+, gst_all_1
+, gst_plugins ? with gst_all_1; [ gst-plugins-good gst-plugins-ugly ]
+}:
+let
+  version = "7.2";
+
+in stdenv.mkDerivation rec {
+  name = "gradio-${version}";
+
+  src = fetchFromGitHub {
+    owner = "haecker-felix";
+    repo = "gradio";
+    rev = "v${version}";
+    sha256 = "0c4vlrfl0ljkiwarpwa8wcfmmihh6a5j4pi4yr0qshyl9xxvxiv3";
+  };
+
+  nativeBuildInputs = [
+    pkgconfig
+
+    meson
+    ninja
+    vala
+
+    python3
+  ];
+  buildInputs = [
+    sqlite
+
+    glib
+    intltool
+    libsoup
+    json-glib
+
+    gtk3
+    gst_all_1.gstreamer
+    gst_all_1.gst-plugins-base
+
+    wrapGAppsHook
+    desktop-file-utils
+    gsettings-desktop-schemas
+  ] ++ gst_plugins;
+
+  enableParallelBuilding = true;
+  postInstall = ''
+    glib-compile-schemas "$out"/share/glib-2.0/schemas
+  '';
+
+  patches = [ ./0001-Remove-post-install-script-that-hardcodes-paths.patch ];
+
+  meta = with stdenv.lib; {
+    homepage = https://github.com/haecker-felix/gradio;
+    description = "A GTK3 app for finding and listening to internet radio stations";
+    license = licenses.gpl3;
+    platforms = platforms.linux;
+    maintainers = [ maintainers.samdroid-apps ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/greg/default.nix b/nixpkgs/pkgs/applications/audio/greg/default.nix
new file mode 100644
index 000000000000..e7a23b6f204c
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/greg/default.nix
@@ -0,0 +1,26 @@
+{ stdenv, fetchFromGitHub, pythonPackages }:
+
+with pythonPackages; buildPythonApplication rec {
+  pname = "greg";
+  version = "0.4.7";
+  name = pname + "-" + version;
+
+  disabled = !isPy3k;
+
+  src = fetchFromGitHub {
+    owner = "manolomartinez";
+    repo = pname;
+    rev = "v" + version;
+    sha256 = "0bdzgh2k1ppgcvqiasxwp3w89q44s4jgwjidlips3ixx1bzm822v";
+  };
+
+  buildInputs = with pythonPackages; [ feedparser ];
+  propagatedBuildInputs = buildInputs;
+
+  meta = with stdenv.lib; {
+    homepage = "https://github.com/manolomartinez/greg";
+    description = "A command-line podcast aggregator";
+    license = licenses.gpl3;
+    maintainers = with maintainers; [ edwtjo ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/gtklick/default.nix b/nixpkgs/pkgs/applications/audio/gtklick/default.nix
new file mode 100644
index 000000000000..0434b00c7053
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/gtklick/default.nix
@@ -0,0 +1,34 @@
+{ stdenv, fetchurl, pythonPackages, gettext, klick}:
+
+pythonPackages.buildPythonApplication rec {
+  pname = "gtklick";
+  version = "0.6.4";
+
+  src = fetchurl {
+    url = "http://das.nasophon.de/download/${pname}-${version}.tar.gz";
+    sha256 = "7799d884126ccc818678aed79d58057f8cf3528e9f1be771c3fa5b694d9d0137";
+  };
+
+  pythonPath = with pythonPackages; [
+    pyliblo
+    pyGtkGlade
+  ];
+
+  buildInputs = [ gettext ];
+
+  propagatedBuildInputs = [ klick ];
+
+  # wrapPythonPrograms breaks gtklick in the postFixup phase.
+  # To fix it, apply wrapPythonPrograms and then clean up the wrapped file.
+  postFixup = ''
+    wrapPythonPrograms
+
+    sed -i "/import sys; sys.argv\[0\] = 'gtklick'/d" $out/bin/.gtklick-wrapped
+  '';
+
+  meta = {
+    homepage = http://das.nasophon.de/gtklick/;
+    description = "Simple metronome with an easy-to-use GTK interface";
+    license = stdenv.lib.licenses.gpl2Plus;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/gtkpod/default.nix b/nixpkgs/pkgs/applications/audio/gtkpod/default.nix
new file mode 100644
index 000000000000..c40f84348de1
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/gtkpod/default.nix
@@ -0,0 +1,34 @@
+{ stdenv, fetchurl, pkgconfig, wrapGAppsHook, intltool, libgpod, curl, flac,
+  gnome3, gtk3, gettext, perlPackages, flex, libid3tag, gdl,
+  libvorbis, gdk_pixbuf }:
+
+stdenv.mkDerivation rec {
+  version = "2.1.5";
+  name = "gtkpod-${version}";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/gtkpod/${name}.tar.gz";
+    sha256 = "0xisrpx069f7bjkyc8vqxb4k0480jmx1wscqxr6cpq1qj6pchzd5";
+  };
+
+  nativeBuildInputs = [ pkgconfig wrapGAppsHook intltool ];
+  buildInputs = [
+    curl gettext
+    flex libgpod libid3tag flac libvorbis gtk3 gdk_pixbuf
+    gdl gnome3.defaultIconTheme gnome3.anjuta
+  ] ++ (with perlPackages; [ perl XMLParser ]);
+
+  patchPhase = ''
+    sed -i 's/which/type -P/' scripts/*.sh
+  '';
+
+  enableParallelBuilding = true;
+
+  meta = with stdenv.lib; {
+    description = "GTK Manager for an Apple ipod";
+    homepage = http://gtkpod.sourceforge.net;
+    license = licenses.gpl2Plus;
+    platforms = platforms.linux;
+    maintainers = [ maintainers.skeidel ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/guitarix/default.nix b/nixpkgs/pkgs/applications/audio/guitarix/default.nix
new file mode 100644
index 000000000000..bc4c18aab085
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/guitarix/default.nix
@@ -0,0 +1,70 @@
+{ stdenv, fetchurl, gettext, intltool, pkgconfig, python2
+, avahi, bluez, boost, eigen, fftw, glib, glib-networking
+, glibmm, gsettings-desktop-schemas, gtkmm2, libjack2
+, ladspaH, libav, librdf, libsndfile, lilv, lv2, serd, sord, sratom
+, wrapGAppsHook, zita-convolver, zita-resampler, curl, wafHook
+, optimizationSupport ? false # Enable support for native CPU extensions
+}:
+
+let
+  inherit (stdenv.lib) optional;
+in
+
+stdenv.mkDerivation rec {
+  name = "guitarix-${version}";
+  version = "0.37.3";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/guitarix/guitarix2-${version}.tar.xz";
+    sha256 = "1wfm8wrwrnqpb4ihy75n7l9i6vml536jlq9pdx2pblbc4ba3paac";
+  };
+
+  nativeBuildInputs = [ gettext intltool wrapGAppsHook pkgconfig python2 wafHook ];
+
+  buildInputs = [
+    avahi bluez boost eigen fftw glib glibmm glib-networking.out
+    gsettings-desktop-schemas gtkmm2 libjack2 ladspaH libav librdf
+    libsndfile lilv lv2 serd sord sratom zita-convolver
+    zita-resampler curl
+  ];
+
+  configureFlags = [
+    "--shared-lib"
+    "--no-desktop-update"
+    "--enable-nls"
+    "--no-faust" # todo: find out why --faust doesn't work
+    "--install-roboto-font"
+    "--includeresampler"
+    "--convolver-ffmpeg"
+  ] ++ optional optimizationSupport "--optimization";
+
+  meta = with stdenv.lib; {
+    description = "A virtual guitar amplifier for Linux running with JACK";
+    longDescription = ''
+        guitarix is a virtual guitar amplifier for Linux running with
+      JACK (Jack Audio Connection Kit). It is free as in speech and
+      free as in beer. Its free sourcecode allows to build it for
+      other UNIX-like systems also, namely for BSD and for MacOSX.
+
+        It takes the signal from your guitar as any real amp would do:
+      as a mono-signal from your sound card. Your tone is processed by
+      a main amp and a rack-section. Both can be routed separately and
+      deliver a processed stereo-signal via JACK. You may fill the
+      rack with effects from more than 25 built-in modules spanning
+      from a simple noise-gate to brain-slashing modulation-fx like
+      flanger, phaser or auto-wah. Your signal is processed with
+      minimum latency. On any properly set-up Linux-system you do not
+      need to wait for more than 10 milli-seconds for your playing to
+      be delivered, processed by guitarix.
+
+        guitarix offers the range of sounds you would expect from a
+      full-featured universal guitar-amp. You can get crisp
+      clean-sounds, nice overdrive, fat distortion and a diversity of
+      crazy sounds never heard before.
+    '';
+    homepage = http://guitarix.sourceforge.net/;
+    license = licenses.gpl3Plus;
+    maintainers = with maintainers; [ astsmtl goibhniu ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/gxplugins-lv2/default.nix b/nixpkgs/pkgs/applications/audio/gxplugins-lv2/default.nix
new file mode 100644
index 000000000000..62f11cbfb740
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/gxplugins-lv2/default.nix
@@ -0,0 +1,29 @@
+{ stdenv, fetchFromGitHub, xorg, xorgproto, cairo, lv2, pkgconfig }:
+
+stdenv.mkDerivation rec {
+  name = "${pname}-${version}";
+  pname = "GxPlugins.lv2";
+  version = "0.5";
+
+  src = fetchFromGitHub {
+    owner = "brummer10";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "16r5bj7w726d9327flg530fn0bli4crkxjss7i56yhb1bsi39mbv";
+    fetchSubmodules = true;
+  };
+
+  nativeBuildInputs = [ pkgconfig ];
+  buildInputs = [
+    xorg.libX11 xorgproto cairo lv2
+  ];
+
+  installFlags = [ "INSTALL_DIR=$(out)/lib/lv2" ];
+
+  meta = with stdenv.lib; {
+    homepage = https://github.com/brummer10/GxPlugins.lv2;
+    description = "A set of extra lv2 plugins from the guitarix project";
+    maintainers = [ maintainers.magnetophon ];
+    license = licenses.gpl3;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/helm/default.nix b/nixpkgs/pkgs/applications/audio/helm/default.nix
new file mode 100644
index 000000000000..fa76a1a26e82
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/helm/default.nix
@@ -0,0 +1,60 @@
+  { stdenv, fetchFromGitHub , xorg, freetype, alsaLib, curl, libjack2
+  , lv2, pkgconfig, libGLU_combined }:
+
+  stdenv.mkDerivation rec {
+  version = "0.9.0";
+  name = "helm-${version}";
+
+  src = fetchFromGitHub {
+    owner = "mtytel";
+    repo = "helm";
+    rev = "927d2ed27f71a735c3ff2a1226ce3129d1544e7e";
+    sha256 = "17ys2vvhncx9i3ydg3xwgz1d3gqv4yr5mqi7vr0i0ca6nad6x3d4";
+  };
+
+  buildInputs = [
+    xorg.libX11 xorg.libXcomposite xorg.libXcursor xorg.libXext
+    xorg.libXinerama xorg.libXrender xorg.libXrandr
+    freetype alsaLib curl libjack2 pkgconfig libGLU_combined lv2
+  ];
+
+  CXXFLAGS = "-DHAVE_LROUND";
+
+  patchPhase = ''
+    sed -i 's|usr/||g' Makefile
+  '';
+
+  buildPhase = ''
+    make lv2
+    make standalone
+  '';
+
+  installPhase = ''
+   make DESTDIR="$out" install
+  '';
+
+  meta = with stdenv.lib; {
+    homepage = http://tytel.org/helm;
+    description = "A free, cross-platform, polyphonic synthesizer";
+    longDescription = ''
+      A free, cross-platform, polyphonic synthesizer.
+      Features:
+        32 voice polyphony
+        Interactive visual interface
+        Powerful modulation system with live visual feedback
+        Dual oscillators with cross modulation and up to 15 oscillators each
+        Unison and Harmony mode for oscillators
+        Oscillator feedback and saturation for waveshaping
+        12 different waveforms
+        7 filter types with keytracking
+        2 monophonic and 1 polyphonic LFO
+        Step sequencer
+        Lots of modulation sources including polyphonic aftertouch
+        Simple arpeggiator
+        Effects: Formant filter, stutter, delay
+    '';
+    license = stdenv.lib.licenses.gpl3;
+    maintainers = [ maintainers.magnetophon ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/hybridreverb2/default.nix b/nixpkgs/pkgs/applications/audio/hybridreverb2/default.nix
new file mode 100644
index 000000000000..19aac1bd1e95
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/hybridreverb2/default.nix
@@ -0,0 +1,49 @@
+{ stdenv, fetchFromGitHub, fetchzip, cmake, pkgconfig, lv2, alsaLib, libjack2,
+  freetype, libX11, gtk3, pcre, libpthreadstubs, libXdmcp, libxkbcommon,
+  epoxy, at-spi2-core, dbus, curl, fftwFloat }:
+
+let
+  pname = "HybridReverb2";
+  version = "2.1.1";
+  owner = "jpcima";
+  DBversion = "1.0.0";
+in
+
+stdenv.mkDerivation rec {
+  name = "${pname}-${version}";
+
+  impulseDB = fetchzip {
+    url = "https://github.com/${owner}/${pname}-impulse-response-database/archive/v${DBversion}.zip";
+    sha256 = "1hlfxbbkahm1k2sk3c3n2mjaz7k80ky3r55xil8nfbvbv0qan89z";
+  };
+
+  src = fetchFromGitHub {
+    inherit owner;
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "15mba9qvlis0qrklr50wp3jdysvmk33m7pvclp0k1is9pirj97cb";
+    fetchSubmodules = true;
+  };
+
+  nativeBuildInputs = [ pkgconfig cmake ];
+  buildInputs = [ lv2 alsaLib libjack2 freetype libX11 gtk3 pcre
+    libpthreadstubs libXdmcp libxkbcommon epoxy at-spi2-core dbus curl fftwFloat ];
+
+  cmakeFlags = [
+    "-DHybridReverb2_AdvancedJackStandalone=ON"
+    "-DHybridReverb2_UseLocalDatabase=ON"
+  ];
+
+  postInstall = ''
+    mkdir -p $out/share/${pname}/
+    cp  -r ${impulseDB}/* $out/share/${pname}/
+  '';
+
+  meta = with stdenv.lib; {
+    homepage = http://www2.ika.ruhr-uni-bochum.de/HybridReverb2;
+    description = "Reverb effect using hybrid impulse convolution";
+    license = licenses.gpl2Plus;
+    maintainers = [ maintainers.magnetophon ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/hydrogen/default.nix b/nixpkgs/pkgs/applications/audio/hydrogen/default.nix
new file mode 100644
index 000000000000..d68bfbf2ae4e
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/hydrogen/default.nix
@@ -0,0 +1,25 @@
+{ stdenv, fetchurl, alsaLib, boost, cmake, glib, lash, libjack2, libarchive
+, liblrdf, libsndfile, pkgconfig, qt4 }:
+
+stdenv.mkDerivation rec {
+  version = "0.9.7";
+  name = "hydrogen-${version}";
+
+  src = fetchurl {
+    url = "https://github.com/hydrogen-music/hydrogen/archive/${version}.tar.gz";
+    sha256 = "1dy2jfkdw0nchars4xi4isrz66fqn53a9qk13bqza7lhmsg3s3qy";
+  };
+
+  nativeBuildInputs = [ pkgconfig ];
+  buildInputs = [
+    alsaLib boost cmake glib lash libjack2 libarchive liblrdf libsndfile qt4
+  ];
+
+  meta = with stdenv.lib; {
+    description = "Advanced drum machine";
+    homepage = http://www.hydrogen-music.org;
+    license = licenses.gpl2;
+    platforms = platforms.linux;
+    maintainers = [ maintainers.goibhniu ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/i-score/default.nix b/nixpkgs/pkgs/applications/audio/i-score/default.nix
new file mode 100644
index 000000000000..69fc4b419c06
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/i-score/default.nix
@@ -0,0 +1,85 @@
+{
+  alsaLib,
+  boost,
+  cln,
+  cmake,
+  fetchFromGitHub,
+  gcc,
+  ginac,
+  jamomacore,
+  kdnssd,
+  libsndfile,
+  ninja,
+  portaudio,
+  portmidi,
+  qtbase,
+  qtdeclarative,
+  qtimageformats,
+  qtmultimedia,
+  qtquickcontrols2,
+  qtserialport,
+  qtsvg,
+  qttools,
+  qtwebsockets,
+  rtaudio,
+  stdenv
+}:
+
+stdenv.mkDerivation rec {
+  version = "1.0.0-b31";
+  name = "i-score-${version}";
+
+  src = fetchFromGitHub {
+    owner = "OSSIA";
+    repo = "i-score";
+    rev = "v${version}";
+    sha256 = "0g7s6n11w3wflrv5i2047dxx56lryms7xj0mznnlk5bii7g8dxzb";
+    fetchSubmodules = true;
+  };
+
+  buildInputs = [
+    alsaLib
+    boost
+    cln
+    cmake
+    ginac
+    gcc
+    jamomacore
+    kdnssd
+    libsndfile
+    ninja
+    portaudio
+    portmidi
+    qtbase
+    qtdeclarative
+    qtimageformats
+    qtmultimedia
+    qtquickcontrols2
+    qtserialport
+    qtsvg
+    qttools
+    qtwebsockets
+    rtaudio
+  ];
+
+  cmakeFlags = [
+    "-GNinja"
+    "-DISCORE_CONFIGURATION=static-release"
+    "-DISCORE_ENABLE_LTO=OFF"
+    "-DISCORE_BUILD_FOR_PACKAGE_MANAGER=True"
+  ];
+
+  preConfigure = ''
+    export CMAKE_PREFIX_PATH="$CMAKE_PREFIX_PATH:$(echo "${jamomacore}/jamoma/share/cmake/Jamoma")"
+  '';
+
+  postInstall = ''rm $out/bin/i-score.sh'';
+
+  meta = {
+    description = "An interactive sequencer for the intermedia arts";
+    homepage = http://i-score.org/;
+    license = stdenv.lib.licenses.cecill20;
+    maintainers = [ stdenv.lib.maintainers.magnetophon ];
+    platforms = stdenv.lib.platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/iannix/default.nix b/nixpkgs/pkgs/applications/audio/iannix/default.nix
new file mode 100644
index 000000000000..c26980e1bb26
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/iannix/default.nix
@@ -0,0 +1,30 @@
+{ stdenv, fetchFromGitHub, alsaLib, pkgconfig, qtbase, qtscript, qmake
+}:
+
+stdenv.mkDerivation rec {
+  name = "iannix-${version}";
+  version = "2016-01-31";
+  src = fetchFromGitHub {
+    owner = "iannix";
+    repo = "IanniX";
+    rev = "f84becdcbe154b20a53aa2622068cb8f6fda0755";
+    sha256 = "184ydb9f1303v332k5k3f1ki7cb6nkxhh6ij0yn72v7dp7figrgj";
+  };
+
+  nativeBuildInputs = [ pkgconfig qmake ];
+  buildInputs = [ alsaLib qtbase qtscript ];
+
+  qmakeFlags = [ "PREFIX=/" ];
+
+  installFlags = [ "INSTALL_ROOT=$(out)" ];
+
+  enableParallelBuilding = true;
+
+  meta = {
+    description = "Graphical open-source sequencer,";
+    homepage = https://www.iannix.org/;
+    license = stdenv.lib.licenses.lgpl3;
+    platforms = stdenv.lib.platforms.linux;
+    maintainers = [ stdenv.lib.maintainers.nico202 ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/id3v2/default.nix b/nixpkgs/pkgs/applications/audio/id3v2/default.nix
new file mode 100644
index 000000000000..d2720fcace67
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/id3v2/default.nix
@@ -0,0 +1,28 @@
+{stdenv, fetchurl, id3lib, groff, zlib}:
+
+stdenv.mkDerivation rec {
+  name = "id3v2-${version}";
+  version = "0.1.12";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/id3v2/${name}.tar.gz";
+    sha256 = "1gr22w8gar7zh5pyyvdy7cy26i47l57jp1l1nd60xfwx339zl1c1";
+  };
+
+  nativeBuildInputs = [ groff ];
+  buildInputs = [ id3lib zlib ];
+
+  makeFlags = [ "PREFIX=$(out)" ];
+  buildFlags = [ "clean" "all" ];
+
+  preInstall = ''
+    mkdir -p $out/{bin,share/man/man1}
+  '';
+
+  meta = with stdenv.lib; {
+    description = "A command line editor for id3v2 tags";
+    homepage = http://id3v2.sourceforge.net/;
+    license = licenses.gpl2Plus;
+    platforms = with platforms; unix;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/infamousPlugins/default.nix b/nixpkgs/pkgs/applications/audio/infamousPlugins/default.nix
new file mode 100644
index 000000000000..cae40929f95a
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/infamousPlugins/default.nix
@@ -0,0 +1,37 @@
+{ stdenv, fetchFromGitHub, pkgconfig, cairomm, cmake, lv2, libpthreadstubs, libXdmcp, libXft, ntk, pcre, fftwFloat, zita-resampler }:
+
+stdenv.mkDerivation rec {
+  name = "infamousPlugins-${version}";
+  version = "0.2.04";
+
+  src = fetchFromGitHub {
+    owner = "ssj71";
+    repo = "infamousPlugins";
+    rev = "v${version}";
+    sha256 = "0hmqk80w4qxq09iag7b7srf2g0wigkyhzq0ywxvhz2iz0hq9k0dh";
+  };
+
+  nativeBuildInputs = [ pkgconfig cmake ];
+  buildInputs = [ cairomm lv2 libpthreadstubs libXdmcp libXft ntk pcre fftwFloat zita-resampler ];
+
+  meta = with stdenv.lib; {
+    homepage = https://ssj71.github.io/infamousPlugins;
+    description = "A collection of open-source LV2 plugins";
+    longDescription = ''
+      These are audio plugins in the LV2 format, developed for linux. Most are suitable for live use.
+      This collection contains:
+        * Cellular Automaton Synth - additive synthesizer, where 16 harmonics are added according to rules of elementary cellular automata
+        * Envelope Follower - a fully featured envelope follower plugin
+        * Hip2B - a distortion/destroyer plugin
+        * cheap distortion - another distortion plugin, but this one I wanted to get it as light as possible
+        * stuck - a clone of the electro-harmonix freeze
+        * power cut - this effect is commonly called tape stop
+        * power up - the opposite of the power cut
+        * ewham - a whammy style pitchshifter
+        * lushlife - a simulated double tracking plugin capable of everything from a thin beatle effect to thick lush choruses to weird outlandish effects
+    '';
+    license = licenses.gpl2;
+    maintainers = [ maintainers.magnetophon ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/ingen/default.nix b/nixpkgs/pkgs/applications/audio/ingen/default.nix
new file mode 100644
index 000000000000..1e249b51fb76
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/ingen/default.nix
@@ -0,0 +1,45 @@
+{ stdenv, fetchgit, boost, ganv, glibmm, gtkmm2, libjack2, lilv
+, lv2Unstable, makeWrapper, pkgconfig, python, raul, rdflib, serd, sord, sratom
+, wafHook
+, suil
+}:
+
+stdenv.mkDerivation  rec {
+  name = "ingen-unstable-${rev}";
+  rev = "2017-07-22";
+
+  src = fetchgit {
+    url = "https://git.drobilla.net/cgit.cgi/ingen.git";
+    rev = "cc4a4db33f4d126a07a4a498e053c5fb9a883be3";
+    sha256 = "1gmwmml486r9zq4w65v91mfaz36af9zzyjkmi74m8qmh67ffqn3w";
+    deepClone = true;
+  };
+
+  nativeBuildInputs = [ pkgconfig wafHook ];
+  buildInputs = [
+    boost ganv glibmm gtkmm2 libjack2 lilv lv2Unstable makeWrapper
+    python raul serd sord sratom suil
+  ];
+
+  preConfigure = ''
+    sed -e "s@{PYTHONDIR}/'@out/'@" -i wscript
+  '';
+
+  propagatedBuildInputs = [ rdflib ];
+
+  postInstall = ''
+    for program in ingenams ingenish
+    do
+      wrapProgram $out/bin/$program \
+        --prefix PYTHONPATH : $out/${python.sitePackages}:$PYTHONPATH
+    done
+  '';
+
+  meta = with stdenv.lib; {
+    description = "A modular audio processing system using JACK and LV2 or LADSPA plugins";
+    homepage = http://drobilla.net/software/ingen;
+    license = licenses.gpl3;
+    maintainers = [ maintainers.goibhniu ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/ir.lv2/default.nix b/nixpkgs/pkgs/applications/audio/ir.lv2/default.nix
new file mode 100644
index 000000000000..84be6b866fae
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/ir.lv2/default.nix
@@ -0,0 +1,36 @@
+{ stdenv, fetchFromGitHub, fftw, gtk2, lv2, libsamplerate, libsndfile, pkgconfig, zita-convolver }:
+
+stdenv.mkDerivation rec {
+  name = "ir.lv2-${version}";
+  version = "1.2.4";
+
+  src = fetchFromGitHub {
+    owner = "tomszilagyi";
+    repo = "ir.lv2";
+    rev = "${version}";
+    sha256 = "1p6makmgr898fakdxzl4agh48qqwgv1k1kwm8cgq187n0mhiknp6";
+  };
+
+  buildInputs = [ fftw gtk2 lv2 libsamplerate libsndfile zita-convolver ];
+
+  nativeBuildInputs = [  pkgconfig ];
+
+  postBuild = "make convert4chan";
+
+  installPhase = ''
+    mkdir -p "$out/bin"
+    mkdir "$out/include"
+    mkdir -p "$out/share/doc"
+
+    make PREFIX="$out" INSTDIR="$out/lib/lv2" install
+    install -Dm755 convert4chan "$out/bin/convert4chan"
+  '';
+
+  meta = with stdenv.lib; {
+    homepage = http://factorial.hu/plugins/lv2/ir;
+    description = "Zero-latency, realtime, high performance signal convolver especially for creating reverb effects";
+    license = licenses.gpl2;
+    maintainers = [ maintainers.magnetophon ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/jaaa/default.nix b/nixpkgs/pkgs/applications/audio/jaaa/default.nix
new file mode 100644
index 000000000000..33c74f2b0443
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/jaaa/default.nix
@@ -0,0 +1,32 @@
+{ stdenv, fetchurl, alsaLib, libclthreads, libclxclient, libX11, libXft, libXrender, fftwFloat, libjack2, zita-alsa-pcmi }:
+
+stdenv.mkDerivation rec {
+  name = "jaaa-${version}";
+  version = "0.9.2";
+
+  src = fetchurl {
+    url = "https://kokkinizita.linuxaudio.org/linuxaudio/downloads/${name}.tar.bz2";
+    sha256 = "1czksxx2g8na07k7g57qlz0vvkkgi5bzajcx7vc7jhb94hwmmxbc";
+  };
+
+  buildInputs = [
+    alsaLib libclthreads libclxclient libX11 libXft libXrender fftwFloat libjack2 zita-alsa-pcmi
+  ];
+
+  makeFlags = [
+    "PREFIX=$(out)"
+    "SUFFIX=''"
+  ];
+
+  preConfigure = ''
+    cd ./source/
+  '';
+
+  meta = with stdenv.lib; {
+    homepage = http://kokkinizita.linuxaudio.org/linuxaudio/index.html;
+    description = "JACK and ALSA Audio Analyser";
+    license = licenses.gpl2;
+    maintainers = [ maintainers.magnetophon ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/jack-capture/default.nix b/nixpkgs/pkgs/applications/audio/jack-capture/default.nix
new file mode 100644
index 000000000000..f11bba34c74c
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/jack-capture/default.nix
@@ -0,0 +1,31 @@
+{ stdenv, fetchurl, libjack2, libsndfile, pkgconfig }:
+
+stdenv.mkDerivation rec {
+  name = "jack_capture-${version}";
+  version = "0.9.73";
+
+  src = fetchurl {
+    url = "https://archive.notam02.no/arkiv/src/${name}.tar.gz";
+    sha256 = "1pji0zdwm3kxjrkbzj7fnxhr8ncrc8pyqnwyrh47fhypgqjv1br1";
+  };
+
+  nativeBuildInputs = [ pkgconfig ];
+  buildInputs = [ libjack2 libsndfile ];
+
+  buildPhase = "PREFIX=$out make jack_capture";
+
+  installPhase = ''
+    mkdir -p $out/bin
+    cp jack_capture $out/bin/
+  '';
+
+  hardeningDisable = [ "format" ];
+
+  meta = with stdenv.lib; {
+    description = "A program for recording soundfiles with jack";
+    homepage = http://archive.notam02.no/arkiv/src;
+    license = licenses.gpl2;
+    maintainers = [ maintainers.goibhniu ];
+    platforms = stdenv.lib.platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/jack-oscrolloscope/default.nix b/nixpkgs/pkgs/applications/audio/jack-oscrolloscope/default.nix
new file mode 100644
index 000000000000..75a8a6a4b1a1
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/jack-oscrolloscope/default.nix
@@ -0,0 +1,27 @@
+{ stdenv, fetchurl, SDL, libjack2, libGLU_combined, pkgconfig }:
+
+stdenv.mkDerivation rec {
+  name = "jack_oscrolloscope-${version}";
+  version = "0.7";
+
+  src = fetchurl {
+    url = "http://das.nasophon.de/download/${name}.tar.gz";
+    sha256 = "1pl55in0sj7h5r06n1v91im7d18pplvhbjhjm1fdl39zwnyxiash";
+  };
+
+  nativeBuildInputs = [ pkgconfig ];
+  buildInputs = [ SDL libjack2 libGLU_combined ];
+
+  installPhase = ''
+    mkdir -p $out/bin
+    mv jack_oscrolloscope $out/bin/
+  '';
+
+  meta = with stdenv.lib; { 
+    description = "A simple waveform viewer for JACK";
+    homepage = http://das.nasophon.de/jack_oscrolloscope;
+    license = licenses.gpl2;
+    maintainers = [ maintainers.goibhniu ];
+    platforms = stdenv.lib.platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/jack-rack/default.nix b/nixpkgs/pkgs/applications/audio/jack-rack/default.nix
new file mode 100644
index 000000000000..26a717dbd6e4
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/jack-rack/default.nix
@@ -0,0 +1,29 @@
+{ stdenv, fetchurl, pkgconfig, libjack2, ladspaH, gtk2, alsaLib, libxml2, librdf }:
+stdenv.mkDerivation rec {
+  name = "jack-rack-1.4.7";
+  src = fetchurl {
+    url = "mirror://sourceforge/jack-rack/${name}.tar.bz2";
+    sha256 = "1lmibx9gicagcpcisacj6qhq6i08lkl5x8szysjqvbgpxl9qg045";
+  };
+  nativeBuildInputs = [ pkgconfig ];
+  buildInputs = [ libjack2 ladspaH gtk2 alsaLib libxml2 librdf ];
+  NIX_LDFLAGS = [
+    "-ldl"
+    "-lm"
+    "-lpthread"
+  ];
+
+  meta = {
+    description = ''An effects "rack" for the JACK low latency audio API'';
+    longDescription = ''
+      JACK Rack is an effects "rack" for the JACK low latency audio
+      API. The rack can be filled with LADSPA effects plugins and can
+      be controlled using the ALSA sequencer. It's phat; it turns your
+      computer into an effects box.
+    '';
+    homepage = http://jack-rack.sourceforge.net/;
+    license = stdenv.lib.licenses.gpl2Plus;
+    maintainers = [ stdenv.lib.maintainers.astsmtl ];
+    platforms = stdenv.lib.platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/jackmeter/default.nix b/nixpkgs/pkgs/applications/audio/jackmeter/default.nix
new file mode 100644
index 000000000000..e44dfddd37b7
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/jackmeter/default.nix
@@ -0,0 +1,21 @@
+{ stdenv, fetchurl, libjack2, pkgconfig }:
+
+stdenv.mkDerivation rec {
+  name = "jackmeter-0.4";
+
+  src = fetchurl {
+    url = "https://www.aelius.com/njh/jackmeter/${name}.tar.gz";
+    sha256 = "1cnvgx3jv0yvxlqy0l9k285zgvazmh5k8m4l7lxckjfm5bn6hm1r";
+  };
+
+  nativeBuildInputs = [ pkgconfig ];
+  buildInputs = [ libjack2 ];
+
+  meta = { 
+    description = "Console jack loudness meter";
+    homepage = https://www.aelius.com/njh/jackmeter/;
+    license = stdenv.lib.licenses.gpl2;
+    maintainers = [ stdenv.lib.maintainers.marcweber ];
+    platforms = stdenv.lib.platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/jackmix/default.nix b/nixpkgs/pkgs/applications/audio/jackmix/default.nix
new file mode 100644
index 000000000000..83644dd5ea51
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/jackmix/default.nix
@@ -0,0 +1,31 @@
+{ stdenv, fetchurl, pkgconfig, scons, qt4, lash, libjack2, jack ? libjack2 }:
+
+stdenv.mkDerivation rec {
+  name = "jackmix-0.5.2";
+  src = fetchurl {
+    url = https://github.com/kampfschlaefer/jackmix/archive/v0.5.2.tar.gz;
+    sha256 = "18f5v7g66mgarhs476frvayhch7fy4nyjf2xivixc061ipn0m82j";
+  };
+
+  patches = [ ./no_error.patch ];
+
+  nativeBuildInputs = [ pkgconfig ];
+  buildInputs = [
+    scons
+    qt4
+    lash
+    jack
+  ];
+
+  installPhase = ''
+    install -D jackmix/jackmix $out/bin/jackmix
+  '';
+
+  meta = {
+    description = "Matrix-Mixer for the Jack-Audio-connection-Kit";
+    homepage = http://www.arnoldarts.de/jackmix/;
+    license = stdenv.lib.licenses.gpl2;
+    maintainers = [ stdenv.lib.maintainers.kampfschlaefer ];
+    platforms = stdenv.lib.platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/jackmix/no_error.patch b/nixpkgs/pkgs/applications/audio/jackmix/no_error.patch
new file mode 100644
index 000000000000..d1a714ded9ca
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/jackmix/no_error.patch
@@ -0,0 +1,13 @@
+diff --git a/SConstruct b/SConstruct
+index 4290fa5..0a7a679 100644
+--- a/SConstruct
++++ b/SConstruct
+@@ -16,7 +16,7 @@ env = Environment(
+ env.Replace( LIBS="" )
+ env.Replace( LIBPATH="" )
+
+-env.MergeFlags( ['-Wall', '-Werror', '-g', '-fpic'] )
++env.MergeFlags( ['-g', '-fpic'] )
+
+ tests = { }
+ tests.update( env['PKGCONFIG_TESTS'] )
diff --git a/nixpkgs/pkgs/applications/audio/jalv/default.nix b/nixpkgs/pkgs/applications/audio/jalv/default.nix
new file mode 100644
index 000000000000..e2f0c7ea7af4
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/jalv/default.nix
@@ -0,0 +1,25 @@
+{ stdenv, fetchurl, gtk2, libjack2, lilv, lv2, pkgconfig, python
+, serd, sord , sratom, suil, wafHook }:
+
+stdenv.mkDerivation  rec {
+  name = "jalv-${version}";
+  version = "1.6.0";
+
+  src = fetchurl {
+    url = "https://download.drobilla.net/${name}.tar.bz2";
+    sha256 = "1x2wpzzx2cgvz3dgdcgsj8dr0w3zsasy62mvl199bsdj5fbjaili";
+  };
+
+  nativeBuildInputs = [ pkgconfig wafHook ];
+  buildInputs = [
+    gtk2 libjack2 lilv lv2 python serd sord sratom suil
+  ];
+
+  meta = with stdenv.lib; {
+    description = "A simple but fully featured LV2 host for Jack";
+    homepage = http://drobilla.net/software/jalv;
+    license = licenses.isc;
+    maintainers = [ maintainers.goibhniu ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/jamin/default.nix b/nixpkgs/pkgs/applications/audio/jamin/default.nix
new file mode 100644
index 000000000000..eea9de5a1597
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/jamin/default.nix
@@ -0,0 +1,28 @@
+{ stdenv, fetchurl, fftwFloat, gtk2, ladspaPlugins, libjack2, liblo, libxml2
+, makeWrapper, pkgconfig, perlPackages
+}:
+
+stdenv.mkDerivation {
+  name = "jamin-0.95.0";
+
+  src = fetchurl {
+    url = mirror://sourceforge/jamin/jamin-0.95.0.tar.gz;
+    sha256 = "0g5v74cm0q3p3pzl6xmnp4rqayaymfli7c6z8s78h9rgd24fwbvn";
+  };
+
+  nativeBuildInputs = [ pkgconfig ];
+  buildInputs = [ fftwFloat gtk2 ladspaPlugins libjack2 liblo libxml2 makeWrapper ]
+    ++ (with perlPackages; [ perl XMLParser ]);
+
+  postInstall = ''
+    wrapProgram $out/bin/jamin --set LADSPA_PATH ${ladspaPlugins}/lib/ladspa
+  '';
+
+  meta = with stdenv.lib; {
+    homepage = http://jamin.sourceforge.net;
+    description = "JACK Audio Mastering interface";
+    license = licenses.gpl2;
+    maintainers = [ maintainers.nico202 ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/japa/default.nix b/nixpkgs/pkgs/applications/audio/japa/default.nix
new file mode 100644
index 000000000000..18b7bcd1d568
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/japa/default.nix
@@ -0,0 +1,30 @@
+{ stdenv, fetchurl,   alsaLib, libjack2, fftwFloat, libclthreads, libclxclient, libX11,  libXft, zita-alsa-pcmi, }:
+
+stdenv.mkDerivation rec {
+  version = "0.9.2";
+  name = "japa-${version}";
+
+  src = fetchurl {
+    url = "https://kokkinizita.linuxaudio.org/linuxaudio/downloads/${name}.tar.bz2";
+    sha256 = "1zmi4wg23hwsypg3h6y3qb72cbrihqcs19qrbzgs5a67d13q4897";
+  };
+
+  buildInputs = [ alsaLib libjack2 fftwFloat libclthreads libclxclient libX11 libXft zita-alsa-pcmi ];
+
+  preConfigure = ''
+    cd ./source/
+  '';
+
+  makeFlags = [
+    "PREFIX=$(out)"
+    "SUFFIX=''"
+  ];
+
+  meta = {
+    description = "A 'perceptual' or 'psychoacoustic' audio spectrum analyser for JACK and ALSA";
+    homepage = http://kokkinizita.linuxaudio.org/linuxaudio/index.html;
+    license = stdenv.lib.licenses.gpl2;
+    maintainers = [ stdenv.lib.maintainers.magnetophon ];
+    platforms = stdenv.lib.platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/keyfinder-cli/default.nix b/nixpkgs/pkgs/applications/audio/keyfinder-cli/default.nix
new file mode 100644
index 000000000000..344e6894baf5
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/keyfinder-cli/default.nix
@@ -0,0 +1,31 @@
+{ stdenv, fetchFromGitHub, libav, libkeyfinder }:
+
+stdenv.mkDerivation rec {
+  name = "keyfinder-cli-${version}";
+  version = "2015-09-13";
+
+  src = fetchFromGitHub {
+    repo = "keyfinder-cli";
+    owner = "EvanPurkhiser";
+    rev = "8579282f15ab3ebad937fed398ec5c88843be03d";
+    sha256 = "0jylykigxmsqvdny265k58vpxa4cqs1hq2f7mph1nl3apfx2shrh";
+  };
+
+  buildInputs = [ libav libkeyfinder ];
+
+  makeFlags = [ "PREFIX=$(out)" ];
+
+  enableParallelBuilding = true;
+
+  meta = with stdenv.lib; {
+    inherit (src.meta) homepage;
+    description = "Musical key detection for digital audio (command-line tool)";
+    longDescription = ''
+      This small utility is the automation-oriented DJ's best friend. By making
+      use of Ibrahim Sha'ath's high quality libKeyFinder library, it can be
+      used to estimate the musical key of many different audio formats.
+    '';
+    license = licenses.gpl3Plus;
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/keyfinder/default.nix b/nixpkgs/pkgs/applications/audio/keyfinder/default.nix
new file mode 100644
index 000000000000..55039e8508bc
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/keyfinder/default.nix
@@ -0,0 +1,41 @@
+{ stdenv, fetchFromGitHub, libav_0_8, libkeyfinder, qtbase, qtxmlpatterns, qmake, taglib }:
+
+stdenv.mkDerivation rec {
+  name = "keyfinder-${version}";
+  version = "2.2";
+
+  src = fetchFromGitHub {
+    sha256 = "0vjszk1h8vj2qycgbffzy6k7amg75jlvlnzwaqhz9nll2pcvw0zl";
+    rev = version;
+    repo = "is_KeyFinder";
+    owner = "ibsh";
+  };
+
+  nativeBuildInputs = [ qmake ];
+  buildInputs = [ libav_0_8 libkeyfinder qtbase qtxmlpatterns taglib ];
+
+  postPatch = ''
+    substituteInPlace is_KeyFinder.pro \
+       --replace "keyfinder.0" "keyfinder" \
+       --replace "-stdlib=libc++" "" \
+       --replace "\$\$[QT_INSTALL_PREFIX]" "$out"
+  '';
+
+  enableParallelBuilding = true;
+
+  meta = with stdenv.lib; {
+    description = "Musical key detection for digital audio (graphical UI)";
+    longDescription = ''
+      KeyFinder is an open source key detection tool, for DJs interested in
+      harmonic and tonal mixing. Designed primarily for electronic and dance
+      music, it is highly configurable and can be applied to many genres. It
+      supports a huge range of codecs thanks to LibAV, and writes to metadata
+      tags using TagLib. It's intended to be very focused: no library
+      management, no track suggestions, no media player. Just a fast,
+      efficient workflow tool.
+    '';
+    homepage = http://www.ibrahimshaath.co.uk/keyfinder/;
+    license = licenses.gpl3Plus;
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/kid3/default.nix b/nixpkgs/pkgs/applications/audio/kid3/default.nix
new file mode 100644
index 000000000000..522ffa2a5338
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/kid3/default.nix
@@ -0,0 +1,75 @@
+{ stdenv, fetchurl
+, pkgconfig, cmake, python, ffmpeg, phonon, automoc4
+, chromaprint, docbook_xml_dtd_45, docbook_xsl, libxslt
+, id3lib, taglib, mp4v2, flac, libogg, libvorbis
+, zlib, readline , qtbase, qttools, qtmultimedia, qtquickcontrols
+, makeWrapper
+}:
+
+stdenv.mkDerivation rec {
+
+  name = "kid3-${version}";
+  version = "3.7.0";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/project/kid3/kid3/${version}/${name}.tar.gz";
+    sha256 = "1bj4kq9hklgfp81rbxcjzbxmdgxjqksx7cqnw3m9dc0pnns5jx0x";
+  };
+
+  buildInputs = with stdenv.lib;
+  [ pkgconfig cmake python ffmpeg phonon automoc4
+    chromaprint docbook_xml_dtd_45 docbook_xsl libxslt
+    id3lib taglib mp4v2 flac libogg libvorbis zlib readline
+    qtbase qttools qtmultimedia qtquickcontrols makeWrapper ];
+
+  cmakeFlags = [ "-DWITH_APPS=Qt;CLI" ];
+  NIX_LDFLAGS = "-lm -lpthread";
+
+  preConfigure = ''
+    export DOCBOOKDIR="${docbook_xsl}/xml/xsl/docbook/"
+  '';
+
+  postInstall = ''
+    wrapProgram $out/bin/kid3-qt --prefix QT_PLUGIN_PATH : $out/lib/qt5/plugins
+  '';
+
+  enableParallelBuilding = true;
+
+  meta = with stdenv.lib; {
+    description = "A simple and powerful audio tag editor";
+    longDescription = ''
+      If you want to easily tag multiple MP3, Ogg/Vorbis, FLAC, MPC,
+      MP4/AAC, MP2, Opus, Speex, TrueAudio, WavPack, WMA, WAV and AIFF
+      files (e.g. full albums) without typing the same information
+      again and again and have control over both ID3v1 and ID3v2 tags,
+      then Kid3 is the program you are looking for.
+
+      With Kid3 you can:
+      - Edit ID3v1.1 tags;
+      - Edit all ID3v2.3 and ID3v2.4 frames;
+      - Convert between ID3v1.1, ID3v2.3 and ID3v2.4 tags
+      - Edit tags in MP3, Ogg/Vorbis, FLAC, MPC, MP4/AAC, MP2, Opus,
+        Speex, TrueAudio, WavPack, WMA, WAV, AIFF files and tracker
+        modules (MOD, S3M, IT, XM);
+      -  Edit tags of multiple files, e.g. the artist, album, year and
+         genre of all files of an album typically have the same values
+         and can be set together;
+      - Generate tags from filenames;
+      - Generate tags from the contents of tag fields;
+      - Generate filenames from tags;
+      - Rename and create directories from tags;
+      - Generate playlist files;
+      - Automatically convert upper and lower case and replace strings;
+      - Import from gnudb.org, TrackType.org, MusicBrainz, Discogs,
+        Amazon and other sources of album data;
+      - Export tags as CSV, HTML, playlists, Kover XML and in other
+        formats;
+      - Edit synchronized lyrics and event timing codes, import and
+        export LRC files
+    '';
+    homepage = http://kid3.sourceforge.net/;
+    license = licenses.lgpl2Plus;
+    maintainers = [ maintainers.AndersonTorres ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/klick/default.nix b/nixpkgs/pkgs/applications/audio/klick/default.nix
new file mode 100644
index 000000000000..5e54609f8bf0
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/klick/default.nix
@@ -0,0 +1,24 @@
+{ stdenv, fetchurl, sconsPackages, pkgconfig
+, libsamplerate, libsndfile, liblo, libjack2, boost }:
+
+stdenv.mkDerivation rec {
+  name = "klick-${version}";
+  version = "0.12.2";
+
+  src = fetchurl {
+    url = "http://das.nasophon.de/download/${name}.tar.gz";
+    sha256 = "1289533c0849b1b66463bf27f7ce5f71736b655cfb7672ef884c7e6eb957ac42";
+  };
+
+  nativeBuildInputs = [ sconsPackages.scons_3_0_1 pkgconfig ];
+  buildInputs = [ libsamplerate libsndfile liblo libjack2 boost ];
+  prefixKey = "PREFIX=";
+  NIX_CFLAGS_COMPILE = "-fpermissive";
+
+  meta = {
+    homepage = http://das.nasophon.de/klick/;
+    description = "Advanced command-line metronome for JACK";
+    license = stdenv.lib.licenses.gpl2Plus;
+    platforms = stdenv.lib.platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/ladspa-plugins/default.nix b/nixpkgs/pkgs/applications/audio/ladspa-plugins/default.nix
new file mode 100644
index 000000000000..a60b3db2fb86
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/ladspa-plugins/default.nix
@@ -0,0 +1,30 @@
+{ stdenv, fetchurl, autoreconfHook, automake, fftw, ladspaH, libxml2, pkgconfig
+, perlPackages }:
+
+stdenv.mkDerivation rec {
+  name = "swh-plugins-${version}";
+  version = "0.4.17";
+
+
+  src = fetchurl {
+    url = "https://github.com/swh/ladspa/archive/v${version}.tar.gz";
+    sha256 = "1rqwh8xrw6hnp69dg4gy336bfbfpmbx4fjrk0nb8ypjcxkz91c6i";
+  };
+
+  nativeBuildInputs = [ autoreconfHook pkgconfig ];
+  buildInputs = [ fftw ladspaH libxml2 perlPackages.perl  perlPackages.XMLParser ];
+
+  patchPhase = ''
+    patchShebangs .
+    patchShebangs ./metadata/
+    cp ${automake}/share/automake-*/mkinstalldirs .
+  '';
+
+  meta = with stdenv.lib; {
+    homepage = http://plugin.org.uk/;
+    description = "LADSPA format audio plugins";
+    license = licenses.gpl2;
+    maintainers = [ maintainers.magnetophon ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/ladspa-sdk/default.nix b/nixpkgs/pkgs/applications/audio/ladspa-sdk/default.nix
new file mode 100644
index 000000000000..296a4f86a848
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/ladspa-sdk/default.nix
@@ -0,0 +1,28 @@
+{ stdenv, fetchurl }:
+stdenv.mkDerivation rec {
+  name = "ladspa-sdk-${version}";
+  version = "1.13";
+  src = fetchurl {
+    url = "https://www.ladspa.org/download/ladspa_sdk_${version}.tgz";
+    sha256 = "0srh5n2l63354bc0srcrv58rzjkn4gv8qjqzg8dnq3rs4m7kzvdm";
+  };
+
+  patchPhase = ''
+    cd src
+    sed -i 's@/usr/@$(out)/@g'  makefile
+    sed -i 's@-mkdirhier@mkdir -p@g'  makefile
+  '';
+
+  meta = {
+    description = "The SDK for the LADSPA audio plugin standard";
+    longDescription = ''
+      The LADSPA SDK, including the ladspa.h API header file,
+      ten example LADSPA plugins and
+      three example programs (applyplugin, analyseplugin and listplugins).
+    '';
+    homepage = http://www.ladspa.org/ladspa_sdk/overview.html;
+    license = stdenv.lib.licenses.lgpl2;
+    maintainers = [ stdenv.lib.maintainers.magnetophon ];
+    platforms = stdenv.lib.platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/ladspa-sdk/ladspah.nix b/nixpkgs/pkgs/applications/audio/ladspa-sdk/ladspah.nix
new file mode 100644
index 000000000000..01acc0d01f7e
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/ladspa-sdk/ladspah.nix
@@ -0,0 +1,26 @@
+{ stdenv, fetchurl }:
+stdenv.mkDerivation rec {
+  name = "ladspa.h-${version}";
+  version = "1.13";
+  src = fetchurl {
+    url = "https://www.ladspa.org/download/ladspa_sdk_${version}.tgz";
+    sha256 = "0srh5n2l63354bc0srcrv58rzjkn4gv8qjqzg8dnq3rs4m7kzvdm";
+  };
+
+  installPhase = ''
+    mkdir -p $out/include
+    cp src/ladspa.h $out/include/ladspa.h
+  '';
+
+  meta = {
+    description = "LADSPA format audio plugins header file";
+    longDescription = ''
+      The ladspa.h API header file from the LADSPA SDK.
+      For the full SDK, use the ladspa-sdk package.
+    '';
+    homepage = http://www.ladspa.org/ladspa_sdk/overview.html;
+    license = stdenv.lib.licenses.lgpl2;
+    maintainers = [ stdenv.lib.maintainers.magnetophon ];
+    platforms = stdenv.lib.platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/lash/default.nix b/nixpkgs/pkgs/applications/audio/lash/default.nix
new file mode 100644
index 000000000000..7fb5a01e2c80
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/lash/default.nix
@@ -0,0 +1,43 @@
+{ stdenv, fetchurl, alsaLib, gtk2, libjack2, libuuid, libxml2
+, makeWrapper, pkgconfig, readline }:
+
+assert libuuid != null;
+
+stdenv.mkDerivation  rec {
+  name = "lash-${version}";
+  version = "0.5.4";
+
+  src = fetchurl {
+    url = "mirror://savannah/lash/${name}.tar.gz";
+    sha256 = "05kc4brcx8mncai0rj2gz4s4bsrsy9q8xlnaddf75i0m8jl7snhh";
+  };
+
+  # http://permalink.gmane.org/gmane.linux.redhat.fedora.extras.cvs/822346
+  patches = [ ./socket.patch ./gcc-47.patch ];
+
+  buildInputs = [ alsaLib gtk2 libjack2 libxml2 makeWrapper
+    pkgconfig readline ];
+  propagatedBuildInputs = [ libuuid ];
+  NIX_LDFLAGS = [
+    "-lm"
+    "-lpthread"
+    "-luuid"
+  ];
+
+  postInstall = ''
+    for i in lash_control lash_panel
+      do wrapProgram "$out/bin/$i" --prefix LD_LIBRARY_PATH ":" "${libuuid}/lib"
+    done
+  '';
+
+  meta = with stdenv.lib; {
+    description = "A Linux Audio Session Handler";
+    longDescription = ''
+      Session management system for GNU/Linux audio applications.
+    '';
+    homepage = https://www.nongnu.org/lash;
+    license = licenses.gpl2Plus;
+    platforms = platforms.linux;
+    maintainers = [ maintainers.goibhniu ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/lash/gcc-47.patch b/nixpkgs/pkgs/applications/audio/lash/gcc-47.patch
new file mode 100644
index 000000000000..774add431fab
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/lash/gcc-47.patch
@@ -0,0 +1,11 @@
+diff -rupN liblash/lash.c lash-0.5.4/liblash/lash.c
+--- a/liblash/lash.c	2007-03-09 10:34:40.000000000 -0500
++++ b/liblash/lash.c	2012-07-22 18:17:46.003963521 -0400
+@@ -22,6 +22,7 @@
+ #include <string.h>
+ #include <strings.h>
+ #include <pthread.h>
++#include <sys/resource.h>
+ #include <sys/types.h>
+ #include <sys/wait.h>
+ #include <sys/socket.h>
diff --git a/nixpkgs/pkgs/applications/audio/lash/socket.patch b/nixpkgs/pkgs/applications/audio/lash/socket.patch
new file mode 100644
index 000000000000..c28259214443
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/lash/socket.patch
@@ -0,0 +1,16 @@
+Via http://bugs.gentoo.org/show_bug.cgi?id=229603
+
+--- lash-0.5.4/liblash/socket.c	2008-06-26 15:20:44.227064193 +0200
++++ lash-0.5.4/liblash/socket.c	2008-06-26 15:21:18.245063129 +0200
+@@ -20,6 +20,11 @@ 
+ 
+ #define _POSIX_SOURCE /* addrinfo */
+ 
++#ifdef LASH_BUILD
++#define _GNU_SOURCE
++#include "config.h"
++#endif /* LASH_BUILD */
++
+ #include <stdint.h>
+ #include <sys/types.h>
+ #include <sys/socket.h>
diff --git a/nixpkgs/pkgs/applications/audio/lastfmsubmitd/default.nix b/nixpkgs/pkgs/applications/audio/lastfmsubmitd/default.nix
new file mode 100644
index 000000000000..3135a00334c7
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/lastfmsubmitd/default.nix
@@ -0,0 +1,21 @@
+{ lib, fetchurl, pythonPackages }:
+
+pythonPackages.buildPythonApplication rec {
+  pname = "lastfmsubmitd";
+  version = "1.0.6";
+
+  src = fetchurl {
+    url = "https://www.red-bean.com/decklin/lastfmsubmitd/lastfmsubmitd-${version}.tar.gz";
+    sha256 = "c2636d5095a95167366bacd458624d67b046e060244fa54ba2c2e3efb79f9b0e";
+  };
+
+  doCheck = false;
+
+  installCommand = "python setup.py install --prefix=$out";
+
+  meta = {
+    homepage = https://www.red-bean.com/decklin/lastfmsubmitd/;
+    license = lib.licenses.mit;
+    description = "An last.fm audio scrobbler and daemon";
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/lastwatch/default.nix b/nixpkgs/pkgs/applications/audio/lastwatch/default.nix
new file mode 100644
index 000000000000..d2ef7434c4db
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/lastwatch/default.nix
@@ -0,0 +1,25 @@
+{ stdenv, fetchgit, python2Packages }:
+
+python2Packages.buildPythonApplication rec {
+  pname = "lastwatch";
+  version = "0.4.1";
+
+  src = fetchgit {
+    url = "git://github.com/aszlig/LastWatch.git";
+    rev = "refs/tags/v${version}";
+    sha256 = "0nlng3595j5jvnikk8i5hb915zak5zsmfn2306cc4gfcns9xzjwp";
+  };
+
+  propagatedBuildInputs = with python2Packages; [
+    pyinotify
+    pylast
+    mutagen
+  ];
+
+  meta = {
+    homepage = https://github.com/aszlig/LastWatch;
+    description = "An inotify-based last.fm audio scrobbler";
+    license = stdenv.lib.licenses.gpl2;
+    platforms = stdenv.lib.platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/lingot/default.nix b/nixpkgs/pkgs/applications/audio/lingot/default.nix
new file mode 100644
index 000000000000..d2ec92e0654a
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/lingot/default.nix
@@ -0,0 +1,25 @@
+{ stdenv, fetchurl, pkgconfig, intltool, gtk2, alsaLib, libglade }:
+
+stdenv.mkDerivation {
+  name = "lingot-0.9.1";
+
+  src = fetchurl {
+    url = mirror://savannah/lingot/lingot-0.9.1.tar.gz;
+    sha256 = "0ygras6ndw2fylwxx86ac11pcr2y2bcfvvgiwrh92z6zncx254gc";
+  };
+
+  hardeningDisable = [ "format" ];
+
+  nativeBuildInputs = [ pkgconfig ];
+  buildInputs = [ intltool gtk2 alsaLib libglade ];
+
+  configureFlags = [ "--disable-jack" ];
+
+  meta = {
+    description = "Not a Guitar-Only tuner";
+    homepage = https://www.nongnu.org/lingot/;
+    license = stdenv.lib.licenses.gpl2Plus;
+    platforms = with stdenv.lib.platforms; linux;
+    maintainers = with stdenv.lib.maintainers; [viric];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/linuxband/default.nix b/nixpkgs/pkgs/applications/audio/linuxband/default.nix
new file mode 100644
index 000000000000..a8e33c23dc0d
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/linuxband/default.nix
@@ -0,0 +1,37 @@
+{ stdenv, fetchurl, makeWrapper, pkgconfig, MMA, libjack2, libsmf, python2Packages }:
+
+let
+  inherit (python2Packages) pyGtkGlade pygtksourceview python;
+in stdenv.mkDerivation rec {
+  version = "12.02.1";
+  name = "linuxband-${version}";
+
+  src = fetchurl {
+    url = "http://linuxband.org/assets/sources/${name}.tar.gz";
+    sha256 = "1r71h4yg775m4gax4irrvygmrsclgn503ykmc2qwjsxa42ri4n2n";
+  };
+
+  nativeBuildInputs = [ pkgconfig ];
+  buildInputs = [ makeWrapper MMA libjack2 libsmf python pyGtkGlade pygtksourceview ];
+
+  patchPhase = ''
+    sed -i 's@/usr/@${MMA}/@g' src/main/config/linuxband.rc.in
+    cat src/main/config/linuxband.rc.in
+  '';
+
+  postFixup = ''
+    PYTHONPATH=$pyGtkGlade/share/:pygtksourceview/share/:$PYTHONPATH
+    for f in $out/bin/*; do
+      wrapProgram $f \
+      --prefix PYTHONPATH : $PYTHONPATH
+    done
+  '';
+
+  meta = {
+    description = "A GUI front-end for MMA: Type in the chords, choose the groove and it will play an accompaniment";
+    homepage = http://linuxband.org/;
+    license = stdenv.lib.licenses.gpl2;
+    maintainers = [ stdenv.lib.maintainers.magnetophon ];
+    platforms = stdenv.lib.platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/linuxsampler/default.nix b/nixpkgs/pkgs/applications/audio/linuxsampler/default.nix
new file mode 100644
index 000000000000..f173e41321f0
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/linuxsampler/default.nix
@@ -0,0 +1,41 @@
+{ stdenv, fetchurl, autoconf, automake, bison, libtool, pkgconfig, which
+, alsaLib, asio, libjack2, libgig, libsndfile, lv2 }:
+
+stdenv.mkDerivation rec {
+  name = "linuxsampler-${version}";
+  version = "2.1.0";
+
+  src = fetchurl {
+    url = "https://download.linuxsampler.org/packages/${name}.tar.bz2";
+    sha256 = "0fdxpw7jjfi058l95131d6d8538h05z7n94l60i6mhp9xbplj2jf";
+  };
+
+  preConfigure = ''
+    make -f Makefile.svn
+  '';
+
+  nativeBuildInputs = [ autoconf automake bison libtool pkgconfig which ];
+
+  buildInputs = [ alsaLib asio libjack2 libgig libsndfile lv2 ];
+
+  enableParallelBuilding = true;
+
+  meta = with stdenv.lib; {
+    homepage = http://www.linuxsampler.org;
+    description = "Sampler backend";
+    longDescription = ''
+      Includes sampler engine, audio and MIDI drivers, network layer
+      (LSCP) API and native C++ API.
+
+      LinuxSampler is licensed under the GNU GPL with the exception
+      that USAGE of the source code, libraries and applications FOR
+      COMMERCIAL HARDWARE OR SOFTWARE PRODUCTS IS NOT ALLOWED without
+      prior written permission by the LinuxSampler authors. If you
+      have questions on the subject, that are not yet covered by the
+      FAQ, please contact us.
+    '';
+    license = licenses.unfree;
+    maintainers = [ maintainers.goibhniu ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/lmms/default.nix b/nixpkgs/pkgs/applications/audio/lmms/default.nix
new file mode 100644
index 000000000000..59e94e0bdad5
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/lmms/default.nix
@@ -0,0 +1,49 @@
+{ stdenv, fetchFromGitHub, cmake, pkgconfig, alsaLib ? null, fftwFloat, fltk13
+, fluidsynth_1 ? null, lame ? null, libgig ? null, libjack2 ? null, libpulseaudio ? null
+, libsamplerate, libsoundio ? null, libsndfile, libvorbis ? null, portaudio ? null
+, qtbase, qtx11extras, qttools, SDL ? null }:
+
+stdenv.mkDerivation rec {
+  name = "lmms-${version}";
+  version = "1.2.0-rc7";
+
+  src = fetchFromGitHub {
+    owner = "LMMS";
+    repo = "lmms";
+    rev = "v${version}";
+    sha256 = "1hshzf2sbdfw37y9rz1ksgvn81kp2n23dp74lsaasc2n7wzjwdis";
+    fetchSubmodules = true;
+  };
+
+  nativeBuildInputs = [ cmake qttools pkgconfig ];
+
+  buildInputs = [
+    alsaLib
+    fftwFloat
+    fltk13
+    fluidsynth_1
+    lame
+    libgig
+    libjack2
+    libpulseaudio
+    libsamplerate
+    libsndfile
+    libsoundio
+    libvorbis
+    portaudio
+    qtbase
+    qtx11extras
+    SDL # TODO: switch to SDL2 in the next version
+  ];
+
+  cmakeFlags = [ "-DWANT_QT5=ON" ];
+  enableParallelBuilding = true;
+
+  meta = with stdenv.lib; {
+    description = "DAW similar to FL Studio (music production software)";
+    homepage = https://lmms.io;
+    license = licenses.gpl2Plus;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ goibhniu yegortimoshenko ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/lollypop/default.nix b/nixpkgs/pkgs/applications/audio/lollypop/default.nix
new file mode 100644
index 000000000000..03d27177656a
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/lollypop/default.nix
@@ -0,0 +1,70 @@
+{ stdenv, fetchgit, meson, ninja, pkgconfig
+, python3, gtk3, gst_all_1, libsecret, libsoup
+, appstream-glib, desktop-file-utils, totem-pl-parser
+, gobject-introspection, wrapGAppsHook }:
+
+python3.pkgs.buildPythonApplication rec  {
+  pname = "lollypop";
+  version = "0.9.915";
+
+  format = "other";
+  doCheck = false;
+
+  src = fetchgit {
+    url = "https://gitlab.gnome.org/World/lollypop";
+    rev = "refs/tags/${version}";
+    fetchSubmodules = true;
+    sha256 = "133qmqb015ghif4d4zh6sf8585fpfgbq00rv6qdj5xn13wziipwh";
+  };
+
+  nativeBuildInputs = [
+    appstream-glib
+    desktop-file-utils
+    gobject-introspection
+    meson
+    ninja
+    pkgconfig
+    wrapGAppsHook
+  ];
+
+  buildInputs = with gst_all_1; [
+    gst-libav
+    gst-plugins-bad
+    gst-plugins-base
+    gst-plugins-good
+    gst-plugins-ugly
+    gstreamer
+    gtk3
+    libsecret
+    libsoup
+    totem-pl-parser
+  ];
+
+  propagatedBuildInputs = with python3.pkgs; [
+    beautifulsoup4
+    gst-python
+    pillow
+    pycairo
+    pydbus
+    pygobject3
+    pylast
+  ];
+
+  postPatch = ''
+    chmod +x meson_post_install.py
+    patchShebangs meson_post_install.py
+  '';
+
+  preFixup = ''
+    buildPythonPath "$out $propagatedBuildInputs"
+    patchPythonScript "$out/libexec/lollypop-sp"
+  '';
+
+  meta = with stdenv.lib; {
+    description = "A modern music player for GNOME";
+    homepage = https://wiki.gnome.org/Apps/Lollypop;
+    license = licenses.gpl3Plus;
+    maintainers = with maintainers; [ worldofpeace ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/lsp-plugins/default.nix b/nixpkgs/pkgs/applications/audio/lsp-plugins/default.nix
new file mode 100644
index 000000000000..d567dc584d8b
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/lsp-plugins/default.nix
@@ -0,0 +1,160 @@
+{ stdenv, fetchFromGitHub, pkgconfig, makeWrapper
+, libsndfile, jack2Full
+, libGLU, libGL, lv2, cairo
+, ladspaH, php, expat }:
+
+stdenv.mkDerivation rec {
+  pname = "lsp-plugins";
+  version = "1.1.4";
+  name = "${pname}-${version}";
+
+  src = fetchFromGitHub {
+    owner = "sadko4u";
+    repo = "${pname}";
+    rev = "${name}";
+    sha256 = "0vb8ax0w4d2a153wxrhkpi21fxsv7c24k57vhfgmm1lqwv6pbl69";
+  };
+
+  nativeBuildInputs = [ pkgconfig php expat ];
+  buildInputs = [ jack2Full libsndfile libGLU libGL lv2 cairo ladspaH makeWrapper ];
+
+  makeFlags = [
+    "BIN_PATH=$(out)/bin"
+    "LIB_PATH=$(out)/lib"
+    "DOC_PATH=$(out)/share/doc"
+  ];
+
+  NIX_CFLAGS_COMPILE = [ "-DLSP_NO_EXPERIMENTAL" ];
+
+  patchPhase = ''
+    runHook prePatch
+    substituteInPlace Makefile --replace "/usr/lib" "$out/lib"
+    substituteInPlace ./include/container/jack/main.h --replace "/usr/lib" "$out/lib"
+    substituteInPlace ./include/container/vst/main.h --replace "/usr/lib" "$out/lib"
+    # for https://github.com/sadko4u/lsp-plugins/issues/7#issuecomment-426561549 :
+    sed -i '/X11__NET_WM_WINDOW_TYPE_DOCK;/d' ./src/ui/ws/x11/X11Window.cpp
+    runHook postPatch
+  '';
+
+  doCheck = true;
+
+  checkPhase = ''
+    runHook preCheck
+    TEST_PATH=$(pwd)".build-test"
+    make OBJDIR=$TEST_PATH test
+    $TEST_PATH/lsp-plugins-test utest
+    runHook postCheck
+  '';
+
+  buildFlags = "release";
+
+  meta = with stdenv.lib;
+    { description = "Collection of open-source audio plugins";
+      longDescription = ''
+        Compatible with follwing formats:
+
+        - LADSPA - set of plugins for Linux Audio Developer's Simple Plugin API
+        - LV2 - set of plugins and UIs for Linux Audio Developer's Simple Plugin API (LADSPA) version 2
+        - LinuxVST - set of plugins and UIs for Steinberg's VST 2.4 format ported on GNU/Linux Platform
+        - JACK - Standalone versions for JACK Audio connection Kit with UI
+
+        Contains the following plugins:
+
+        - Limiter Mono - Begrenzer Mono
+        - Limiter Stereo - Begrenzer Stereo
+        - Dynamic Processor LeftRight - Dynamikprozessor LeftRight
+        - Dynamic Processor MidSide - Dynamikprozessor MidSide
+        - Dynamic Processor Mono - Dynamikprozessor Mono
+        - Dynamic Processor Stereo - Dynamikprozessor Stereo
+        - Expander LeftRight - Expander LeftRight
+        - Expander MidSide - Expander MidSide
+        - Expander Mono - Expander Mono
+        - Expander Stereo - Expander Stereo
+        - Gate LeftRight - Gate LeftRight
+        - Gate MidSide - Gate MidSide
+        - Gate Mono - Gate Mono
+        - Gate Stereo - Gate Stereo
+        - Graphic Equalizer x16 LeftRight - Grafischer Entzerrer x16 LeftRight
+        - Graphic Equalizer x16 MidSide - Grafischer Entzerrer x16 MidSide
+        - Graphic Equalizer x16 Mono - Grafischer Entzerrer x16 Mono
+        - Graphic Equalizer x16 Stereo - Grafischer Entzerrer x16 Stereo
+        - Graphic Equalizer x32 LeftRight - Grafischer Entzerrer x32 LeftRight
+        - Graphic Equalizer x32 MidSide - Grafischer Entzerrer x32 MidSide
+        - Graphic Equalizer x32 Mono - Grafischer Entzerrer x32 Mono
+        - Graphic Equalizer x32 Stereo - Grafischer Entzerrer x32 Stereo
+        - Impulse Responses Mono - Impulsantworten Mono
+        - Impulse Responses Stereo - Impulsantworten Stereo
+        - Impulse Reverb Mono - Impulsnachhall Mono
+        - Impulse Reverb Stereo - Impulsnachhall Stereo
+        - Sampler Mono - Klangerzeuger Mono
+        - Sampler Stereo - Klangerzeuger Stereo
+        - Compressor LeftRight - Kompressor LeftRight
+        - Compressor MidSide - Kompressor MidSide
+        - Compressor Mono - Kompressor Mono
+        - Compressor Stereo - Kompressor Stereo
+        - Latency Meter - Latenzmessgerät
+        - Multiband Compressor LeftRight x8 - Multi-band Kompressor LeftRight x8
+        - Multiband Compressor MidSide x8 - Multi-band Kompressor MidSide x8
+        - Multiband Compressor Mono x8 - Multi-band Kompressor Mono x8
+        - Multiband Compressor Stereo x8 - Multi-band Kompressor Stereo x8
+        - Oscillator Mono - Oszillator Mono
+        - Parametric Equalizer x16 LeftRight - Parametrischer Entzerrer x16 LeftRight
+        - Parametric Equalizer x16 MidSide - Parametrischer Entzerrer x16 MidSide
+        - Parametric Equalizer x16 Mono - Parametrischer Entzerrer x16 Mono
+        - Parametric Equalizer x16 Stereo - Parametrischer Entzerrer x16 Stereo
+        - Parametric Equalizer x32 LeftRight - Parametrischer Entzerrer x32 LeftRight
+        - Parametric Equalizer x32 MidSide - Parametrischer Entzerrer x32 MidSide
+        - Parametric Equalizer x32 Mono - Parametrischer Entzerrer x32 Mono
+        - Parametric Equalizer x32 Stereo - Parametrischer Entzerrer x32 Stereo
+        - Phase Detector - Phasendetektor
+        - Profiler Mono - Profiler Mono
+        - Multi-Sampler x12 DirectOut - Schlagzeug x12 Direktausgabe
+        - Multi-Sampler x12 Stereo - Schlagzeug x12 Stereo
+        - Multi-Sampler x24 DirectOut - Schlagzeug x24 Direktausgabe
+        - Multi-Sampler x24 Stereo - Schlagzeug x24 Stereo
+        - Multi-Sampler x48 DirectOut - Schlagzeug x48 Direktausgabe
+        - Multi-Sampler x48 Stereo - Schlagzeug x48 Stereo
+        - Sidechain Multiband Compressor LeftRight x8 - Sidechain Multi-band Kompressor LeftRight x8
+        - Sidechain Multiband Compressor MidSide x8 - Sidechain Multi-band Kompressor MidSide x8
+        - Sidechain Multiband Compressor Mono x8 - Sidechain Multi-band Kompressor Mono x8
+        - Sidechain Multiband Compressor Stereo x8 - Sidechain Multi-band Kompressor Stereo x8
+        - Sidechain Limiter Mono - Sidechain-Begrenzer Mono
+        - Sidechain Limiter Stereo - Sidechain-Begrenzer Stereo
+        - Sidechain Dynamic Processor LeftRight - Sidechain-Dynamikprozessor LeftRight
+        - Sidechain Dynamic Processor MidSide - Sidechain-Dynamikprozessor MidSide
+        - Sidechain Dynamic Processor Mono - Sidechain-Dynamikprozessor Mono
+        - Sidechain Dynamic Processor Stereo - Sidechain-Dynamikprozessor Stereo
+        - Sidechain Expander LeftRight - Sidechain-Expander LeftRight
+        - Sidechain Expander MidSide - Sidechain-Expander MidSide
+        - Sidechain Expander Mono - Sidechain-Expander Mono
+        - Sidechain Expander Stereo - Sidechain-Expander Stereo
+        - Sidechain Gate LeftRight - Sidechain-Gate LeftRight
+        - Sidechain Gate MidSide - Sidechain-Gate MidSide
+        - Sidechain Gate Mono - Sidechain-Gate Mono
+        - Sidechain Gate Stereo - Sidechain-Gate Stereo
+        - Sidechain Compressor LeftRight - Sidechain-Kompressor LeftRight
+        - Sidechain Compressor MidSide - Sidechain-Kompressor MidSide
+        - Sidechain Compressor Mono - Sidechain-Kompressor Mono
+        - Sidechain Compressor Stereo - Sidechain-Kompressor Stereo
+        - Slapback Delay Mono - Slapback-Delay Mono
+        - Slapback Delay Stereo - Slapback-Delay Stereo
+        - Spectrum Analyzer x1 - Spektrumanalysator x1
+        - Spectrum Analyzer x12 - Spektrumanalysator x12
+        - Spectrum Analyzer x16 - Spektrumanalysator x16
+        - Spectrum Analyzer x2 - Spektrumanalysator x2
+        - Spectrum Analyzer x4 - Spektrumanalysator x4
+        - Spectrum Analyzer x8 - Spektrumanalysator x8
+        - Trigger MIDI Mono - Triggersensor MIDI Mono
+        - Trigger MIDI Stereo - Triggersensor MIDI Stereo
+        - Trigger Mono - Triggersensor Mono
+        - Trigger Stereo - Triggersensor Stereo
+        - Delay Compensator Mono - Verzögerungsausgleicher Mono
+        - Delay Compensator Stereo - Verzögerungsausgleicher Stereo
+        - Delay Compensator x2 Stereo - Verzögerungsausgleicher x2 Stereo
+      '';
+      homepage = http://lsp-plug.in;
+      maintainers = with maintainers; [ magnetophon ];
+      license = licenses.gpl2;
+      platforms = platforms.linux;
+    };
+}
diff --git a/nixpkgs/pkgs/applications/audio/ltc-tools/default.nix b/nixpkgs/pkgs/applications/audio/ltc-tools/default.nix
new file mode 100644
index 000000000000..79edfdef5040
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/ltc-tools/default.nix
@@ -0,0 +1,25 @@
+{stdenv, fetchFromGitHub, pkgconfig, libltc, libsndfile, jack2}:
+
+stdenv.mkDerivation rec {
+  name = "ltc-tools-${version}";
+  version = "0.6.4";
+
+  src = fetchFromGitHub {
+    owner = "x42";
+    repo = "ltc-tools";
+    rev = "v${version}";
+    sha256 = "1a7r99mwc7p5j5y453mrgph67wlznd674v4k2pfmlvc91s6lh44y";
+  };
+
+  buildInputs = [ pkgconfig libltc libsndfile jack2 ];
+
+  makeFlags = [ "PREFIX=$(out)" ];
+
+  meta = with stdenv.lib; {
+    homepage = "https://github.com/x42/ltc-tools";
+    description = "Tools to deal with linear-timecode (LTC)";
+    license = licenses.gpl2;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ tg-x ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/luppp/build-install.patch b/nixpkgs/pkgs/applications/audio/luppp/build-install.patch
new file mode 100644
index 000000000000..4dae65438cb5
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/luppp/build-install.patch
@@ -0,0 +1,16 @@
+commit 4ec09e6f6e00e40622a5207ed24dc657da9a9090
+Author: Pavol Rusnak <stick@gk2.sk>
+Date:   Tue Dec 4 12:06:22 2018 +0100
+
+    build: add install: true to executable in meson.build
+
+diff --git a/meson.build b/meson.build
+index 050e1b1..9224ed5 100644
+--- a/meson.build
++++ b/meson.build
+@@ -39,4 +39,5 @@ endforeach
+ 
+ # compile the main project
+ executable('luppp', luppp_src + [version_hxx],
++    install: true,
+     dependencies: deps)
diff --git a/nixpkgs/pkgs/applications/audio/luppp/default.nix b/nixpkgs/pkgs/applications/audio/luppp/default.nix
new file mode 100644
index 000000000000..fdba836a6ae2
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/luppp/default.nix
@@ -0,0 +1,40 @@
+{ stdenv, fetchFromGitHub
+, meson
+, ninja
+, pkgconfig
+, jack2
+, cairo
+, liblo
+, libsndfile
+, libsamplerate
+, ntk
+}:
+
+stdenv.mkDerivation rec {
+  pname = "luppp";
+  version = "1.2.0";
+  patches = [ ./build-install.patch ];
+
+  src = fetchFromGitHub {
+    owner = "openAVproductions";
+    repo = "openAV-Luppp";
+    rev = "release-${version}";
+    sha256 = "194yq0lqc2psq9vyxmzif40ccawcvd9jndcn18mkz4f8h5w5rc1a";
+  };
+
+  nativeBuildInputs = [
+    meson ninja pkgconfig
+  ];
+
+  buildInputs = [
+    jack2 cairo liblo libsndfile libsamplerate ntk
+  ];
+
+  meta = with stdenv.lib; {
+    homepage = http://openavproductions.com/luppp/;
+    description = "A music creation tool, intended for live use";
+    license = licenses.gpl3Plus;
+    maintainers = with maintainers; [ prusnak ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/lv2bm/default.nix b/nixpkgs/pkgs/applications/audio/lv2bm/default.nix
new file mode 100644
index 000000000000..d3821c51fbc6
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/lv2bm/default.nix
@@ -0,0 +1,28 @@
+{ stdenv, fetchFromGitHub, glib, lilv, lv2, pkgconfig, serd, sord, sratom }:
+
+stdenv.mkDerivation rec {
+  name = "lv2bm-${version}";
+  version = "git-2015-11-29";
+
+  src = fetchFromGitHub {
+    owner = "moddevices";
+    repo = "lv2bm";
+    rev = "e844931503b7597f45da6d61ff506bb9fca2e9ca";
+    sha256 = "1rrz5sp04zjal6v34ldkl6fjj9xqidb8xm1iscjyljf6z4l516cx";
+  };
+
+  nativeBuildInputs = [ pkgconfig ];
+  buildInputs = [ glib lilv lv2 serd sord sratom ];
+
+  installPhase = ''
+    make install PREFIX=$out
+  '';
+
+  meta = with stdenv.lib; {
+    homepage = https://github.com/portalmod/lv2bm;
+    description = "A benchmark tool for LV2 plugins";
+    license = licenses.gpl3;
+    maintainers = [ maintainers.magnetophon ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/magnetophonDSP/CharacterCompressor/default.nix b/nixpkgs/pkgs/applications/audio/magnetophonDSP/CharacterCompressor/default.nix
new file mode 100644
index 000000000000..f355c540f301
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/magnetophonDSP/CharacterCompressor/default.nix
@@ -0,0 +1,37 @@
+{ stdenv, fetchFromGitHub, faust2jaqt, faust2lv2 }:
+stdenv.mkDerivation rec {
+  name = "CharacterCompressor-${version}";
+  version = "0.3.3";
+
+  src = fetchFromGitHub {
+    owner = "magnetophon";
+    repo = "CharacterCompressor";
+    rev = "V${version}";
+    sha256 = "1h0bhjhx023476gbijq842b6f8z71zcyn4c9mddwyb18w9cdamp5";
+  };
+
+  buildInputs = [ faust2jaqt faust2lv2 ];
+
+  buildPhase = ''
+    faust2jaqt -vec -time -t 99999 CharacterCompressor.dsp
+    faust2jaqt -vec -time -t 99999 CharacterCompressorMono.dsp
+    faust2lv2 -vec -time -gui -t 99999 CharacterCompressor.dsp
+    faust2lv2 -vec -time -gui -t 99999 CharacterCompressorMono.dsp
+  '';
+
+  installPhase = ''
+    mkdir -p $out/bin
+    cp CharacterCompressor $out/bin/
+    cp CharacterCompressorMono $out/bin/
+    mkdir -p $out/lib/lv2
+    cp -r CharacterCompressor.lv2/ $out/lib/lv2
+    cp -r CharacterCompressorMono.lv2/ $out/lib/lv2
+  '';
+
+  meta = {
+    description = "A compressor with character. For jack and lv2";
+    homepage = https://github.com/magnetophon/CharacterCompressor;
+    license = stdenv.lib.licenses.gpl3;
+    maintainers = [ stdenv.lib.maintainers.magnetophon ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/magnetophonDSP/CompBus/default.nix b/nixpkgs/pkgs/applications/audio/magnetophonDSP/CompBus/default.nix
new file mode 100644
index 000000000000..90e4eabeef0b
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/magnetophonDSP/CompBus/default.nix
@@ -0,0 +1,43 @@
+{ stdenv, fetchFromGitHub, faust2jaqt, faust2lv2 }:
+stdenv.mkDerivation rec {
+  name = "CompBus-${version}";
+  version = "1.1.1";
+
+  src = fetchFromGitHub {
+    owner = "magnetophon";
+    repo = "CompBus";
+    rev = "V${version}";
+    sha256 = "0yhj680zgk4dn4fi8j3apm72f3z2mjk12amf2a7p0lwn9iyh4a2z";
+  };
+
+  buildInputs = [ faust2jaqt faust2lv2 ];
+
+  buildPhase = ''
+    for f in *.dsp;
+    do
+      faust2jaqt -time -vec -double -t 99999 $f
+    done
+
+    for f in *.dsp;
+    do
+      faust2lv2  -time -vec -double -gui -t 99999 $f
+    done
+  '';
+
+  installPhase = ''
+    mkdir -p $out/lib/lv2
+    mv *.lv2/ $out/lib/lv2
+    mkdir -p $out/bin
+    for f in $(find . -executable -type f);
+    do
+      cp $f $out/bin/
+    done
+  '';
+
+  meta = {
+    description = "A group of compressors mixed into a bus, sidechained from that mix bus. For jack and lv2";
+    homepage = https://github.com/magnetophon/CompBus;
+    license = stdenv.lib.licenses.gpl3;
+    maintainers = [ stdenv.lib.maintainers.magnetophon ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/magnetophonDSP/ConstantDetuneChorus/default.nix b/nixpkgs/pkgs/applications/audio/magnetophonDSP/ConstantDetuneChorus/default.nix
new file mode 100644
index 000000000000..73dd7b48e9c4
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/magnetophonDSP/ConstantDetuneChorus/default.nix
@@ -0,0 +1,33 @@
+{ stdenv, fetchFromGitHub, faust2jaqt, faust2lv2 }:
+stdenv.mkDerivation rec {
+  name = "constant-detune-chorus-${version}";
+  version = "0.1.3";
+
+  src = fetchFromGitHub {
+    owner = "magnetophon";
+    repo = "constant-detune-chorus";
+    rev = "V${version}";
+    sha256 = "1sipmc25fr7w7xqx1r0y6i2zwfkgszzwvhk1v15mnsb3cqvk8ybn";
+  };
+
+  buildInputs = [ faust2jaqt faust2lv2 ];
+
+  buildPhase = ''
+    faust2jaqt -time -vec -t 99999 ConstantDetuneChorus.dsp
+    faust2lv2  -time -vec -t 99999 -gui ConstantDetuneChorus.dsp
+  '';
+
+  installPhase = ''
+    mkdir -p $out/bin
+    cp ConstantDetuneChorus $out/bin/
+    mkdir -p $out/lib/lv2
+    cp -r ConstantDetuneChorus.lv2/ $out/lib/lv2
+  '';
+
+  meta = {
+    description = "A chorus algorithm that maintains constant and symmetric detuning depth (in cents), regardless of modulation rate. For jack and lv2";
+    homepage = https://github.com/magnetophon/constant-detune-chorus;
+    license = stdenv.lib.licenses.gpl3;
+    maintainers = [ stdenv.lib.maintainers.magnetophon ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/magnetophonDSP/LazyLimiter/default.nix b/nixpkgs/pkgs/applications/audio/magnetophonDSP/LazyLimiter/default.nix
new file mode 100644
index 000000000000..39065db6edeb
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/magnetophonDSP/LazyLimiter/default.nix
@@ -0,0 +1,33 @@
+{ stdenv, fetchFromGitHub, faust2jaqt, faust2lv2 }:
+stdenv.mkDerivation rec {
+  name = "LazyLimiter-${version}";
+  version = "0.3.2";
+
+  src = fetchFromGitHub {
+    owner = "magnetophon";
+    repo = "LazyLimiter";
+    rev = "V${version}";
+    sha256 = "10xdydwmsnkx8hzsm74pa546yahp29wifydbc48yywv3sfj5anm7";
+  };
+
+  buildInputs = [ faust2jaqt faust2lv2 ];
+
+  buildPhase = ''
+    faust2jaqt -vec -time -t 99999 LazyLimiter.dsp
+    faust2lv2 -vec -time -t 99999  -gui LazyLimiter.dsp
+  '';
+
+  installPhase = ''
+    mkdir -p $out/bin
+    cp LazyLimiter $out/bin/
+    mkdir -p $out/lib/lv2
+    cp -r LazyLimiter.lv2/ $out/lib/lv2
+  '';
+
+  meta = {
+    description = "A fast yet clean lookahead limiter for jack and lv2";
+    homepage = https://magnetophon.github.io/LazyLimiter/;
+    license = stdenv.lib.licenses.gpl2;
+    maintainers = [ stdenv.lib.maintainers.magnetophon ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/magnetophonDSP/MBdistortion/default.nix b/nixpkgs/pkgs/applications/audio/magnetophonDSP/MBdistortion/default.nix
new file mode 100644
index 000000000000..362451988d38
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/magnetophonDSP/MBdistortion/default.nix
@@ -0,0 +1,33 @@
+{ stdenv, fetchFromGitHub, faust2jaqt, faust2lv2 }:
+stdenv.mkDerivation rec {
+  name = "MBdistortion-${version}";
+  version = "1.1.1";
+
+  src = fetchFromGitHub {
+    owner = "magnetophon";
+    repo = "MBdistortion";
+    rev = "V${version}";
+    sha256 = "0mdzaqmxzgspfgx9w1hdip18y17hwpdcgjyq1rrfm843vkascwip";
+  };
+
+  buildInputs = [ faust2jaqt faust2lv2 ];
+
+  buildPhase = ''
+    faust2jaqt -time -vec -t 99999 MBdistortion.dsp
+    faust2lv2 -time -vec -gui -t 99999 MBdistortion.dsp
+  '';
+
+  installPhase = ''
+    mkdir -p $out/bin
+    cp MBdistortion $out/bin/
+    mkdir -p $out/lib/lv2
+    cp -r MBdistortion.lv2/ $out/lib/lv2
+  '';
+
+  meta = {
+    description = "Mid-side multiband distortion for jack and lv2";
+    homepage = https://github.com/magnetophon/MBdistortion;
+    license = stdenv.lib.licenses.gpl2;
+    maintainers = [ stdenv.lib.maintainers.magnetophon ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/magnetophonDSP/RhythmDelay/default.nix b/nixpkgs/pkgs/applications/audio/magnetophonDSP/RhythmDelay/default.nix
new file mode 100644
index 000000000000..3f809aa78474
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/magnetophonDSP/RhythmDelay/default.nix
@@ -0,0 +1,33 @@
+{ stdenv, fetchFromGitHub, faust2jaqt, faust2lv2 }:
+stdenv.mkDerivation rec {
+  name = "RhythmDelay-${version}";
+  version = "2.1";
+
+  src = fetchFromGitHub {
+    owner = "magnetophon";
+    repo = "RhythmDelay";
+    rev = "V${version}";
+    sha256 = "1j0bjl9agz43dcrcrbiqd7fv7xsxgd65s4ahhv5pvcr729y0fxg4";
+  };
+
+  buildInputs = [ faust2jaqt faust2lv2 ];
+
+  buildPhase = ''
+    faust2jaqt -time -vec -t 99999 RhythmDelay.dsp
+    faust2lv2  -time -vec -t 99999 -gui RhythmDelay.dsp
+  '';
+
+  installPhase = ''
+    mkdir -p $out/bin
+    cp RhythmDelay $out/bin/
+    mkdir -p $out/lib/lv2
+    cp -r RhythmDelay.lv2/ $out/lib/lv2
+  '';
+
+  meta = {
+    description = "Tap a rhythm into your delay! For jack and lv2";
+    homepage = https://github.com/magnetophon/RhythmDelay;
+    license = stdenv.lib.licenses.gpl3;
+    maintainers = [ stdenv.lib.maintainers.magnetophon ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/magnetophonDSP/VoiceOfFaust/default.nix b/nixpkgs/pkgs/applications/audio/magnetophonDSP/VoiceOfFaust/default.nix
new file mode 100644
index 000000000000..740763889ffd
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/magnetophonDSP/VoiceOfFaust/default.nix
@@ -0,0 +1,56 @@
+{ stdenv, fetchFromGitHub, faust2jack, faust2lv2, helmholtz, mrpeach, puredata-with-plugins }:
+stdenv.mkDerivation rec {
+  name = "VoiceOfFaust-${version}";
+  version = "1.1.4";
+
+  src = fetchFromGitHub {
+    owner = "magnetophon";
+    repo = "VoiceOfFaust";
+    rev = "V${version}";
+    sha256 = "0la9b806qwrlsxgbir7n1db8v3w24wmd6k43p6qpr1fjjpkhrrgw";
+  };
+
+  plugins = [ helmholtz mrpeach ];
+
+  pitchTracker = puredata-with-plugins plugins;
+
+  buildInputs = [ faust2jack faust2lv2 ];
+
+  runtimeInputs = [ pitchTracker ];
+
+  patchPhase = ''
+    sed -i "s@pd -nodac@${pitchTracker}/bin/pd -nodac@g" launchers/synthWrapper
+    sed -i "s@../PureData/OscSendVoc.pd@$out/PureData/OscSendVoc.pd@g" launchers/pitchTracker
+  '';
+
+  buildPhase = ''
+    sh install.sh
+    # so it doesn;t end up in /bin/ :
+    rm -f install.sh
+  '';
+
+  installPhase = ''
+    mkdir -p $out/bin
+
+    for file in ./*; do
+      if test -x "$file" && test -f "$file"; then
+        cp "$file" "$out/bin"
+      fi
+    done
+
+    cp launchers/* $out/bin/
+    mkdir $out/PureData/
+    # cp PureData/OscSendVoc.pd $out/PureData/OscSendVoc.pd
+    cp PureData/* $out/PureData/
+
+    mkdir -p $out/lib/lv2
+    cp -r *.lv2/ $out/lib/lv2
+  '';
+
+  meta = {
+    description = "Turn your voice into a synthesizer";
+    homepage = https://github.com/magnetophon/VoiceOfFaust;
+    license = stdenv.lib.licenses.gpl3;
+    maintainers = [ stdenv.lib.maintainers.magnetophon ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/magnetophonDSP/faustCompressors/default.nix b/nixpkgs/pkgs/applications/audio/magnetophonDSP/faustCompressors/default.nix
new file mode 100644
index 000000000000..fece392ab1cc
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/magnetophonDSP/faustCompressors/default.nix
@@ -0,0 +1,46 @@
+{ stdenv, fetchFromGitHub, faust2jaqt, faust2lv2 }:
+stdenv.mkDerivation rec {
+  name = "faustCompressors-v${version}";
+  version = "1.2";
+
+  src = fetchFromGitHub {
+    owner = "magnetophon";
+    repo = "faustCompressors";
+    rev = "v${version}";
+    sha256 = "144f6g17q4m50kxzdncsfzdyycdfprnpwdaxcwgxj4jky1xsha1d";
+  };
+
+  buildInputs = [ faust2jaqt faust2lv2 ];
+
+  buildPhase = ''
+    for f in *.dsp;
+    do
+      echo "compiling standalone from" $f
+      faust2jaqt -time -double -t 99999 $f
+    done
+
+    for f in *.dsp;
+    do
+      echo "Compiling plugin from" $f
+      faust2lv2  -time -double -gui -t 99999 $f
+    done
+  '';
+
+  installPhase = ''
+    mkdir -p $out/lib/lv2
+    mv *.lv2/ $out/lib/lv2
+    mkdir -p $out/bin
+    rm newlib.sh
+    for f in $(find . -executable -type f);
+    do
+      cp $f $out/bin/
+    done
+  '';
+
+  meta = {
+    description = "A collection of bread and butter compressors";
+    homepage = https://github.com/magnetophon/faustCompressors;
+    license = stdenv.lib.licenses.gpl3;
+    maintainers = [ stdenv.lib.maintainers.magnetophon ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/magnetophonDSP/pluginUtils/default.nix b/nixpkgs/pkgs/applications/audio/magnetophonDSP/pluginUtils/default.nix
new file mode 100644
index 000000000000..6237628e600c
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/magnetophonDSP/pluginUtils/default.nix
@@ -0,0 +1,40 @@
+{ stdenv, fetchFromGitHub, faust2jaqt, faust2lv2 }:
+stdenv.mkDerivation rec {
+  name = "pluginUtils-${version}";
+  version = "1.1";
+
+  src = fetchFromGitHub {
+    owner = "magnetophon";
+    repo = "pluginUtils";
+    rev = "V${version}";
+    sha256 = "1hnr5sp7k6ypf4ks61lnyqx44dkv35yllf3a3xcbrw7yqzagwr1c";
+  };
+
+  buildInputs = [ faust2jaqt faust2lv2 ];
+
+  buildPhase = ''
+    for f in *.dsp
+      do
+        echo "Building jack standalone for $f"
+        faust2jaqt -vec -time -t 99999 "$f"
+        echo "Building lv2 for $f"
+        faust2lv2 -vec -time -gui -t 99999 "$f"
+      done
+  '';
+
+  installPhase = ''
+    rm -f *.dsp
+    rm -f *.lib
+    mkdir -p $out/lib/lv2
+    mv *.lv2/ $out/lib/lv2
+    mkdir -p $out/bin
+    cp * $out/bin/
+  '';
+
+  meta = {
+    description = "Some simple utility lv2 plugins";
+    homepage = https://github.com/magnetophon/pluginUtils;
+    license = stdenv.lib.licenses.gpl3;
+    maintainers = [ stdenv.lib.maintainers.magnetophon ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/magnetophonDSP/shelfMultiBand/default.nix b/nixpkgs/pkgs/applications/audio/magnetophonDSP/shelfMultiBand/default.nix
new file mode 100644
index 000000000000..cb9247fd3d08
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/magnetophonDSP/shelfMultiBand/default.nix
@@ -0,0 +1,37 @@
+{ stdenv, fetchFromGitHub, faust2jaqt, faust2lv2 }:
+stdenv.mkDerivation rec {
+  name = "shelfMultiBand-${version}";
+  version = "0.6.1";
+
+  src = fetchFromGitHub {
+    owner = "magnetophon";
+    repo = "shelfMultiBand";
+    rev = "V${version}";
+    sha256 = "1b1h4z5fs2xm7wvw11p9wnd0bxs3m88124f5phh0gwvpsdrd0im5";
+  };
+
+  buildInputs = [ faust2jaqt faust2lv2 ];
+
+  buildPhase = ''
+    faust2jaqt -vec -double -time -t 99999 shelfMultiBand.dsp
+    faust2jaqt -vec -double -time -t 99999 shelfMultiBandMono.dsp
+    faust2lv2 -vec -double -time -gui -t 99999 shelfMultiBandMono.dsp
+    faust2lv2 -vec -double -time -gui -t 99999 shelfMultiBand.dsp
+  '';
+
+  installPhase = ''
+    mkdir -p $out/bin
+    cp shelfMultiBand $out/bin/
+    cp shelfMultiBandMono $out/bin/
+    mkdir -p $out/lib/lv2
+    cp -r shelfMultiBand.lv2/ $out/lib/lv2
+    cp -r shelfMultiBandMono.lv2/ $out/lib/lv2
+  '';
+
+  meta = {
+    description = "A multiband compressor made from shelving filters.";
+    homepage = https://github.com/magnetophon/shelfMultiBand;
+    license = stdenv.lib.licenses.gpl3;
+    maintainers = [ stdenv.lib.maintainers.magnetophon ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/mda-lv2/default.nix b/nixpkgs/pkgs/applications/audio/mda-lv2/default.nix
new file mode 100644
index 000000000000..26290e5bf888
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/mda-lv2/default.nix
@@ -0,0 +1,22 @@
+{ stdenv, fetchurl, fftwSinglePrec, lv2, pkgconfig, python, wafHook }:
+
+stdenv.mkDerivation rec {
+  name = "mda-lv2-${version}";
+  version = "1.2.2";
+
+  src = fetchurl {
+    url = "https://download.drobilla.net/${name}.tar.bz2";
+    sha256 = "0hh40c5d2m0k5gb3vw031l6lqn59dg804an3mkmhkc7qv4gc6xm4";
+  };
+
+  nativeBuildInputs = [ pkgconfig wafHook ];
+  buildInputs = [ fftwSinglePrec lv2 python ];
+
+  meta = with stdenv.lib; {
+    homepage = http://drobilla.net/software/mda-lv2/;
+    description = "An LV2 port of the MDA plugins by Paul Kellett";
+    license = licenses.gpl2Plus;
+    maintainers = [ maintainers.goibhniu ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/meterbridge/buf_rect.patch b/nixpkgs/pkgs/applications/audio/meterbridge/buf_rect.patch
new file mode 100644
index 000000000000..f108b80c1019
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/meterbridge/buf_rect.patch
@@ -0,0 +1,12 @@
+--- ../tmp-orig/meterbridge-0.9.2/src/main.h	2003-06-05 11:42:41.000000000 +0200
++++ ./src/main.h	2004-12-29 10:27:24.160912488 +0100
+@@ -8,7 +8,7 @@
+ 
+ extern SDL_Surface *screen;
+ extern SDL_Surface *image, *meter, *meter_buf;
+-extern SDL_Rect win, buf_rect[MAX_METERS], dest[MAX_METERS];
++extern SDL_Rect win, dest[MAX_METERS];
+ 
+ extern jack_port_t *input_ports[MAX_METERS];
+ extern jack_port_t *output_ports[MAX_METERS];
+
diff --git a/nixpkgs/pkgs/applications/audio/meterbridge/default.nix b/nixpkgs/pkgs/applications/audio/meterbridge/default.nix
new file mode 100644
index 000000000000..d16107e4c292
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/meterbridge/default.nix
@@ -0,0 +1,26 @@
+{ stdenv, fetchurl, pkgconfig, SDL, SDL_image, libjack2
+}:
+
+stdenv.mkDerivation rec {
+  version = "0.9.3";
+  name = "meterbridge-${version}";
+
+  src = fetchurl {
+    url = "http://plugin.org.uk/meterbridge/${name}.tar.gz";
+    sha256 = "0s7n3czfpil94vsd7iblv4xrck9c7zvsz4r3yfbkqcv85pjz1viz";
+  };
+
+  patches = [ ./buf_rect.patch ./fix_build_with_gcc-5.patch];
+
+  buildInputs =
+    [ pkgconfig SDL SDL_image libjack2
+    ];
+
+  meta = with stdenv.lib; {
+    description = "Various meters (VU, PPM, DPM, JF, SCO) for Jack Audio Connection Kit";
+    homepage = http://plugin.org.uk/meterbridge/;
+    license = licenses.gpl2;
+    platforms = platforms.linux;
+    maintainers = [ maintainers.nico202 ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/meterbridge/fix_build_with_gcc-5.patch b/nixpkgs/pkgs/applications/audio/meterbridge/fix_build_with_gcc-5.patch
new file mode 100644
index 000000000000..a738cd0b82a9
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/meterbridge/fix_build_with_gcc-5.patch
@@ -0,0 +1,31 @@
+Description: Fix build with gcc-5
+Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=778003
+Author: Jaromír Mikeš <mira.mikes@seznam.cz>
+Forwarded: No
+
+Index: meterbridge/src/linedraw.h
+===================================================================
+--- meterbridge.orig/src/linedraw.h
++++ meterbridge/src/linedraw.h
+@@ -1,7 +1,7 @@
+ #ifndef LINEDRAW_H
+ #define LINEDRAW_H
+ 
+-inline void set_rgba(SDL_Surface *surface, Uint32 x, Uint32 y, Uint32 col);
++void set_rgba(SDL_Surface *surface, Uint32 x, Uint32 y, Uint32 col);
+ 
+ void draw_ptr(SDL_Surface *surface, int x1, int y1, int x2, int y2, Uint32 nedle_col, Uint32 aa_col);
+ 
+Index: meterbridge/src/linedraw.c
+===================================================================
+--- meterbridge.orig/src/linedraw.c
++++ meterbridge/src/linedraw.c
+@@ -4,7 +4,7 @@
+ /* set a pixel on an SDL_Surface, assumes that the surface is 32bit RGBA,
+  * ordered ABGR (I think), probably wont work on bigendian systems */
+ 
+-inline void set_rgba(SDL_Surface *surface, Uint32 x, Uint32 y, Uint32 col)
++void set_rgba(SDL_Surface *surface, Uint32 x, Uint32 y, Uint32 col)
+ {
+ 	Uint32 *bufp = (Uint32 *)surface->pixels + y*surface->pitch/4 + x;
+ 	*bufp = col;
diff --git a/nixpkgs/pkgs/applications/audio/meters_lv2/default.nix b/nixpkgs/pkgs/applications/audio/meters_lv2/default.nix
new file mode 100644
index 000000000000..669ffbb2688a
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/meters_lv2/default.nix
@@ -0,0 +1,48 @@
+{ stdenv, fetchurl, pkgconfig
+, lv2, libGLU_combined, gtk2, cairo, pango, fftw }:
+
+let
+  version = "0.8.1";
+  name = "meters.lv2-${version}";
+
+  # robtk submodule is pegged to this version
+  robtkVersion = "0.3.0";
+  robtkName = "robtk-${robtkVersion}";
+
+  src = fetchurl {
+    name = "${name}.tar.gz";
+    url = "https://github.com/x42/meters.lv2/archive/v${version}.tar.gz";
+    sha256 = "142dg0j34mv5b0agajj2x1n9kgsmkfh08n1cjzk0j8n4xk2wb6ri";
+  };
+
+  robtkSrc = fetchurl {
+    name = "${robtkName}.tar.gz";
+    url = "https://github.com/x42/robtk/archive/v${robtkVersion}.tar.gz";
+    sha256 = "1ny89i2sgga56k7fxskp9y8sb7pfhp6wgw5mni842p19z6q7h8rq";
+  };
+
+in
+stdenv.mkDerivation {
+  inherit name;
+
+  nativeBuildInputs = [ pkgconfig ];
+  buildInputs = [ lv2 libGLU_combined gtk2 cairo pango fftw ];
+
+  srcs = [ src robtkSrc ];
+  sourceRoot = name;
+
+  postUnpack = "mv ${robtkName}/* ${name}/robtk"; # */
+
+  postPatch = "sed -i 's/fftw3f/fftw3/' Makefile";
+
+  preConfigure = "makeFlagsArray=( PREFIX=$out )";
+  meter_VERSION = version;
+
+  meta = with stdenv.lib;
+    { description = "Collection of audio level meters with GUI in LV2 plugin format";
+      homepage = http://x42.github.io/meters.lv2/;
+      maintainers = with maintainers; [ ehmry ];
+      license = licenses.gpl2;
+      platforms = platforms.linux;
+    };
+}
diff --git a/nixpkgs/pkgs/applications/audio/mhwaveedit/default.nix b/nixpkgs/pkgs/applications/audio/mhwaveedit/default.nix
new file mode 100644
index 000000000000..db70e59218b3
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/mhwaveedit/default.nix
@@ -0,0 +1,39 @@
+{ stdenv, fetchFromGitHub, makeWrapper, SDL, alsaLib, autoreconfHook, gtk2, libjack2, ladspaH
+, ladspaPlugins, libsamplerate, libsndfile, pkgconfig, libpulseaudio, lame
+, vorbis-tools }:
+
+stdenv.mkDerivation rec {
+  name = "mhwaveedit-${version}";
+  version = "1.4.24";
+
+  src = fetchFromGitHub {
+    owner = "magnush";
+    repo = "mhwaveedit";
+    rev = "v${version}";
+    sha256 = "037pbq23kh8hsih994x2sv483imglwcrqrx6m8visq9c46fi0j1y";
+  };
+
+  nativeBuildInputs = [ autoreconfHook makeWrapper pkgconfig ];
+
+  preAutoreconf = "(cd docgen && sh gendocs.sh)";
+
+  buildInputs = [
+    SDL alsaLib gtk2 libjack2 ladspaH libsamplerate libsndfile libpulseaudio
+  ];
+
+  configureFlags = [ "--with-default-ladspa-path=${ladspaPlugins}/lib/ladspa" ];
+
+  postInstall = ''
+    wrapProgram $out/bin/mhwaveedit \
+      --prefix PATH : ${lame}/bin/ \
+      --prefix PATH : ${vorbis-tools}/bin/
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Graphical program for editing, playing and recording sound files";
+    homepage = https://github.com/magnush/mhwaveedit;
+    license = licenses.gpl2Plus;
+    platforms = platforms.linux;
+    maintainers = [ maintainers.goibhniu ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/mi2ly/default.nix b/nixpkgs/pkgs/applications/audio/mi2ly/default.nix
new file mode 100644
index 000000000000..58c1690a9bb0
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/mi2ly/default.nix
@@ -0,0 +1,41 @@
+{stdenv, fetchurl}:
+let
+  s = # Generated upstream information
+  rec {
+    baseName="mi2ly";
+    version="0.12";
+    name="${baseName}-${version}";
+    hash="1b14zcwlvnxhjxr3ymyzg0mg4sbijkinzpxm641s859jxcgylmll";
+    url="https://download.savannah.gnu.org/releases/mi2ly/mi2ly.0.12.tar.bz2";
+    sha256="1b14zcwlvnxhjxr3ymyzg0mg4sbijkinzpxm641s859jxcgylmll";
+  };
+  buildInputs = [
+  ];
+in
+stdenv.mkDerivation {
+  inherit (s) name version;
+  inherit buildInputs;
+  src = fetchurl {
+    inherit (s) url sha256;
+  };
+
+  sourceRoot=".";
+
+  hardeningDisable = [ "format" ];
+
+  buildPhase = "./cc";
+  installPhase = ''
+    mkdir -p "$out"/{bin,share/doc/mi2ly}
+    cp mi2ly "$out/bin"
+    cp README Doc.txt COPYING Manual.txt "$out/share/doc/mi2ly"
+  '';
+
+  meta = {
+    inherit (s) version;
+    description = ''MIDI to Lilypond converter'';
+    license = stdenv.lib.licenses.gpl2Plus ;
+    maintainers = [stdenv.lib.maintainers.raskin];
+    platforms = stdenv.lib.platforms.linux;
+    broken = true; # 2018-04-11
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/mi2ly/default.upstream b/nixpkgs/pkgs/applications/audio/mi2ly/default.upstream
new file mode 100644
index 000000000000..0b2607989aa2
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/mi2ly/default.upstream
@@ -0,0 +1,3 @@
+url https://download.savannah.gnu.org/releases/mi2ly/
+ensure_choice
+version '.*/mi2ly[.]([0-9.]+)[.]tar.*' '\1'
diff --git a/nixpkgs/pkgs/applications/audio/mid2key/default.nix b/nixpkgs/pkgs/applications/audio/mid2key/default.nix
new file mode 100644
index 000000000000..3c5660724d39
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/mid2key/default.nix
@@ -0,0 +1,26 @@
+{ stdenv, fetchurl, alsaLib, libX11, libXi, libXtst, xorgproto }:
+
+stdenv.mkDerivation rec {
+  name = "mid2key-r1";
+
+  src = fetchurl {
+    url = "http://mid2key.googlecode.com/files/${name}.tar.gz";
+    sha256 = "0j2vsjvdgx51nd1qmaa18mcy0yw9pwrhbv2mdwnf913bwsk4y904";
+  };
+
+  unpackPhase = "tar xvzf $src";
+
+  buildInputs = [ alsaLib libX11 libXi libXtst xorgproto ];
+
+  buildPhase = "make";
+
+  installPhase = "mkdir -p $out/bin && mv mid2key $out/bin";
+
+  meta = with stdenv.lib; {
+    homepage = http://code.google.com/p/mid2key/;
+    description = "A simple tool which maps midi notes to simulated keystrokes";
+    license = licenses.gpl3;
+    maintainers = [ maintainers.goibhniu ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/midas/generic.nix b/nixpkgs/pkgs/applications/audio/midas/generic.nix
new file mode 100644
index 000000000000..293d1b0b6c82
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/midas/generic.nix
@@ -0,0 +1,43 @@
+{ stdenv, fetchurl, lib, libX11, libXext, alsaLib, freetype, brand, type, version, homepage, sha256, ... }:
+stdenv.mkDerivation rec {
+  inherit type;
+  baseName = "${type}-Edit";
+  name = "${lib.toLower baseName}-${version}";
+
+  src = fetchurl {
+    url = "http://downloads.music-group.com/software/behringer/${type}/${type}-Edit_LINUX_64bit_${version}.tar.gz";
+    inherit sha256;
+  };
+
+  sourceRoot = ".";
+  dontBuild = true;
+  dontStrip = true;
+
+  installPhase = ''
+    mkdir -p $out/bin
+    cp ${baseName} $out/bin
+  '';
+  preFixup = let
+    # we prepare our library path in the let clause to avoid it become part of the input of mkDerivation
+    libPath = lib.makeLibraryPath [
+      libX11           # libX11.so.6
+      libXext          # libXext.so.6
+      alsaLib          # libasound.so.2
+      freetype         # libfreetype.so.6
+      stdenv.cc.cc.lib # libstdc++.so.6
+    ];
+  in ''
+    patchelf \
+      --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
+      --set-rpath "${libPath}" \
+      $out/bin/${baseName}
+  '';
+
+  meta = with stdenv.lib; {
+    inherit homepage;
+    description = "Editor for the ${brand} ${type} digital mixer";
+    license = licenses.unfree;
+    platforms = platforms.linux;
+    maintainers = [ maintainers.magnetophon ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/midas/m32edit.nix b/nixpkgs/pkgs/applications/audio/midas/m32edit.nix
new file mode 100644
index 000000000000..c8a751c235b1
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/midas/m32edit.nix
@@ -0,0 +1,9 @@
+{ callPackage, ... } @ args:
+
+callPackage ./generic.nix (args // {
+  brand = "Midas";
+  type = "M32";
+  version = "3.2";
+  sha256 = "1cds6qinz37086l6pmmgrzrxadygjr2z96sjjyznnai2wz4z2nrd";
+  homepage = http://www.musictri.be/Categories/Midas/Mixers/Digital/M32/p/P0B3I/downloads;
+})
diff --git a/nixpkgs/pkgs/applications/audio/midas/x32edit.nix b/nixpkgs/pkgs/applications/audio/midas/x32edit.nix
new file mode 100644
index 000000000000..4aacfcc89a36
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/midas/x32edit.nix
@@ -0,0 +1,9 @@
+{ callPackage, ... } @ args:
+
+callPackage ./generic.nix (args // {
+  brand = "Behringer";
+  type = "X32";
+  version = "3.2";
+  sha256 = "1lzmhd0sqnlzc0khpwm82sfi48qhv7rg153a57qjih7hhhy41mzk";
+  homepage = http://www.musictri.be/Categories/Behringer/Mixers/Digital/X32/p/P0ASF/downloads;
+})
diff --git a/nixpkgs/pkgs/applications/audio/midisheetmusic/default.nix b/nixpkgs/pkgs/applications/audio/midisheetmusic/default.nix
new file mode 100644
index 000000000000..448977e5705b
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/midisheetmusic/default.nix
@@ -0,0 +1,60 @@
+{ stdenv, fetchurl
+, mono, dotnetPackages, makeWrapper
+, gtk2, cups, timidity }:
+
+let
+  version = "2.6";
+in stdenv.mkDerivation {
+  name = "midisheetmusic-${version}";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/midisheetmusic/MidiSheetMusic-${version}-linux-src.tar.gz";
+    sha256 = "05c6zskj50g29f51lx8fvgzsi3f31z01zj6ssjjrgr7jfs7ak70p";
+  };
+
+  checkInputs = (with dotnetPackages; [ NUnitConsole ]);
+  nativeBuildInputs = [ mono makeWrapper ];
+
+  buildPhase = ''
+    for i in Classes/MidiPlayer.cs Classes/MidiSheetMusic.cs
+    do
+      substituteInPlace $i --replace "/usr/bin/timidity" "${timidity}/bin/timidity"
+    done
+
+    ./build.sh
+  '';
+
+  # include missing file with unit tests for building
+  # switch from mono nunit dll to standalone dll otherwise mono compiler barks
+  # run via nunit3 console, because mono nunit console wants access $HOME
+  checkPhase = ''
+    substituteInPlace UnitTestDLL.csproj \
+      --replace "</Compile>" '</Compile><Compile Include="Classes\UnitTest.cs"/>' \
+      --replace nunit.framework.dll "${dotnetPackages.NUnit}/lib/dotnet/NUnit/nunit.framework.dll"
+    ./build_unit_test.sh
+    nunit3-console bin/Debug/UnitTest.dll
+  '';
+
+  # 2 tests of 47 are still failing
+  doCheck = false;
+
+  installPhase = ''
+    mkdir -p $out/share/applications $out/share/pixmaps $out/bin
+
+    cp deb/midisheetmusic.desktop $out/share/applications
+    cp NotePair.png $out/share/pixmaps/midisheetmusic.png
+    cp bin/Debug/MidiSheetMusic.exe $out/bin/.MidiSheetMusic.exe
+
+    makeWrapper ${mono}/bin/mono $out/bin/midisheetmusic.mono.exe \
+      --prefix LD_LIBRARY_PATH : ${stdenv.lib.makeLibraryPath [ gtk2 cups ]} \
+      --add-flags $out/bin/.MidiSheetMusic.exe
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Convert MIDI Files to Piano Sheet Music for two hands";
+    homepage = http://midisheetmusic.com;
+    license = licenses.gpl2;
+    maintainers = [ maintainers.gnidorah ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/mikmod/default.nix b/nixpkgs/pkgs/applications/audio/mikmod/default.nix
new file mode 100644
index 000000000000..42fa8b7621a5
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/mikmod/default.nix
@@ -0,0 +1,20 @@
+{ stdenv, fetchurl, libmikmod, ncurses }:
+
+stdenv.mkDerivation rec {
+  name = "mikmod-3.2.8";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/mikmod/${name}.tar.gz";
+    sha256 = "1k54p8pn3jinha0f2i23ad15pf1pamibzcxjrbzjbklpcz1ipc6v";
+  };
+
+  buildInputs = [ libmikmod ncurses ];
+
+  meta = {
+    description = "Tracker music player for the terminal";
+    homepage = http://mikmod.shlomifish.org/;
+    license = stdenv.lib.licenses.gpl2Plus;
+    maintainers = with stdenv.lib.maintainers; [ ];
+    platforms = with stdenv.lib.platforms; linux;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/milkytracker/default.nix b/nixpkgs/pkgs/applications/audio/milkytracker/default.nix
new file mode 100644
index 000000000000..6b3abeb1e23c
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/milkytracker/default.nix
@@ -0,0 +1,26 @@
+{ stdenv, fetchFromGitHub, cmake, pkgconfig, makeWrapper
+, SDL2, alsaLib, libjack2, lhasa, perl, rtmidi, zlib, zziplib }:
+
+stdenv.mkDerivation rec {
+  version = "1.02.00";
+  name = "milkytracker-${version}";
+
+  src = fetchFromGitHub {
+    owner  = "milkytracker";
+    repo   = "MilkyTracker";
+    rev    = "v${version}";
+    sha256 = "05a6d7l98k9i82dwrgi855dnccm3f2lkb144gi244vhk1156n0ca";
+  };
+
+  nativeBuildInputs = [ cmake pkgconfig makeWrapper ];
+
+  buildInputs = [ SDL2 alsaLib libjack2 lhasa perl rtmidi zlib zziplib ];
+
+  meta = with stdenv.lib; {
+    description = "Music tracker application, similar to Fasttracker II";
+    homepage = http://milkytracker.org;
+    license = licenses.gpl3Plus;
+    platforms = [ "x86_64-linux" "i686-linux" ];
+    maintainers = with maintainers; [ zoomulator ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/mimic/default.nix b/nixpkgs/pkgs/applications/audio/mimic/default.nix
new file mode 100644
index 000000000000..a4cd0c944dc2
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/mimic/default.nix
@@ -0,0 +1,35 @@
+{ stdenv, autoreconfHook, fetchFromGitHub, pkgconfig
+, alsaLib, libtool, icu
+, pulseaudioSupport ? true, libpulseaudio }:
+
+stdenv.mkDerivation rec {
+  name = "mimic-${version}";
+  version = "1.2.0.2";
+
+  src = fetchFromGitHub {
+    rev = version;
+    repo = "mimic";
+    owner = "MycroftAI";
+    sha256 = "1wkpbwk88lsahzkc7pzbznmyy0lc02vsp0vkj8f1ags1gh0lc52j";
+  };
+
+  nativeBuildInputs = [ 
+    autoreconfHook
+    pkgconfig
+  ];
+
+  buildInputs = [
+    alsaLib
+    libtool
+    icu 
+  ] ++ stdenv.lib.optional pulseaudioSupport libpulseaudio;
+
+  meta = {
+    description = "Mycroft's TTS engine, based on CMU's Flite (Festival Lite)";
+    homepage = https://mimic.mycroft.ai/; 
+    license = stdenv.lib.licenses.free;
+    platforms = stdenv.lib.platforms.linux;
+    maintainers = [ stdenv.lib.maintainers.noneucat ]; 
+  };
+}
+
diff --git a/nixpkgs/pkgs/applications/audio/mimms/default.nix b/nixpkgs/pkgs/applications/audio/mimms/default.nix
new file mode 100644
index 000000000000..2d301a8b6a96
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/mimms/default.nix
@@ -0,0 +1,31 @@
+{ fetchurl, stdenv, pythonPackages, libmms }:
+
+pythonPackages.buildPythonApplication rec {
+  pname = "mimms";
+  version = "3.2";
+
+  src = fetchurl {
+    url = "https://download.savannah.gnu.org/releases/mimms/mimms-${version}.tar.bz2";
+    sha256 = "0zmcd670mpq85cs3nvdq3i805ba0d1alqahfy1m9cpf7kxrivfml";
+  };
+
+  postInstall = ''
+    wrapProgram $out/bin/mimms \
+      --prefix LD_LIBRARY_PATH : ${libmms}/lib
+  '';
+
+  meta = {
+    homepage = https://savannah.nongnu.org/projects/mimms/;
+    license = stdenv.lib.licenses.gpl3;
+    description = "An mms (e.g. mms://) stream downloader";
+
+    longDescription = ''
+      mimms is a program designed to allow you to download streams
+      using the MMS protocol and save them to your computer, as
+      opposed to watching them live. Similar functionality is
+      available in full media player suites such as Xine, MPlayer,
+      and VLC, but mimms is quick and easy to use and, for the time
+      being, remains a useful program.
+    '';
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/minimodem/default.nix b/nixpkgs/pkgs/applications/audio/minimodem/default.nix
new file mode 100644
index 000000000000..8d179e8eed11
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/minimodem/default.nix
@@ -0,0 +1,42 @@
+{ stdenv, fetchFromGitHub, pkgconfig, autoconf, automake, libtool
+, fftw, fftwSinglePrec, alsaLib, libsndfile, libpulseaudio
+}:
+
+stdenv.mkDerivation rec {
+  version = "0.24-1";
+  pname = "minimodem";
+  name = "${pname}-${version}";
+
+  src = fetchFromGitHub {
+    owner = "kamalmostafa";
+    repo = "minimodem";
+    rev = "${pname}-${version}";
+    sha256 = "1b5xy36fjcp7vkp115dpx4mlmqg2fc7xvxdy648fb8im953bw7ql";
+  };
+
+  nativeBuildInputs = [ pkgconfig autoconf automake libtool ];
+  buildInputs = [ fftw fftwSinglePrec alsaLib libsndfile libpulseaudio ];
+
+  preConfigure = ''
+    aclocal \
+    && autoheader \
+    && automake --gnu --add-missing \
+    && autoconf
+  '';
+
+  meta = {
+    description = "General-purpose software audio FSK modem";
+    longDescription = ''
+    Minimodem is a command-line program which decodes (or generates) audio
+    modem tones at any specified baud rate, using various framing protocols. It
+    acts a general-purpose software FSK modem, and includes support for various
+    standard FSK protocols such as Bell103, Bell202, RTTY, NOAA SAME, and
+    Caller-ID.
+    '';
+    homepage = http://www.whence.com/minimodem/;
+    license = stdenv.lib.licenses.gpl3Plus;
+    platforms = with stdenv.lib.platforms; linux;
+    maintainers = with stdenv.lib.maintainers; [ relrod ];
+  };
+}
+
diff --git a/nixpkgs/pkgs/applications/audio/mixxx/default.nix b/nixpkgs/pkgs/applications/audio/mixxx/default.nix
new file mode 100644
index 000000000000..4c84fb3c3f77
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/mixxx/default.nix
@@ -0,0 +1,47 @@
+{ stdenv, fetchFromGitHub, makeWrapper, chromaprint, fetchpatch
+, fftw, flac, faad2, glibcLocales, mp4v2
+, libid3tag, libmad, libopus, libshout, libsndfile, libusb1, libvorbis
+, opusfile
+, pkgconfig, portaudio, portmidi, protobuf, qt4, rubberband, scons, sqlite
+, taglib, upower, vampSDK
+}:
+
+stdenv.mkDerivation rec {
+  name = "mixxx-${version}";
+  version = "2.1.5";
+
+  src = fetchFromGitHub {
+    owner = "mixxxdj";
+    repo = "mixxx";
+    rev = "release-${version}";
+    sha256 = "0h14pwglz03sdmgzviypv1qa1xfjclrnhyqaq5nd60j47h4z39dr";
+  };
+
+  nativeBuildInputs = [ makeWrapper ];
+
+  buildInputs = [
+    chromaprint fftw flac faad2 glibcLocales mp4v2 libid3tag libmad libopus libshout libsndfile
+    libusb1 libvorbis opusfile pkgconfig portaudio portmidi protobuf qt4
+    rubberband scons sqlite taglib upower vampSDK
+  ];
+
+  sconsFlags = [
+    "build=release"
+    "qtdir=${qt4}"
+    "faad=1"
+    "opus=1"
+  ];
+
+  fixupPhase = ''
+    wrapProgram $out/bin/mixxx \
+      --set LOCALE_ARCHIVE ${glibcLocales}/lib/locale/locale-archive;
+  '';
+
+  meta = with stdenv.lib; {
+    homepage = https://mixxx.org;
+    description = "Digital DJ mixing software";
+    license = licenses.gpl2Plus;
+    maintainers = [ maintainers.aszlig maintainers.goibhniu maintainers.bfortz ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/moc/default.nix b/nixpkgs/pkgs/applications/audio/moc/default.nix
new file mode 100644
index 000000000000..ea83a1012ebb
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/moc/default.nix
@@ -0,0 +1,29 @@
+{ stdenv, fetchurl, ncurses, pkgconfig, alsaLib, flac, libmad, speex, ffmpeg
+, libvorbis, libmpc, libsndfile, libjack2, db, libmodplug, timidity, libid3tag
+, libtool
+}:
+
+stdenv.mkDerivation rec {
+  name = "moc-${version}";
+  version = "2.5.2";
+
+  src = fetchurl {
+    url = "http://ftp.daper.net/pub/soft/moc/stable/moc-${version}.tar.bz2";
+    sha256 = "026v977kwb0wbmlmf6mnik328plxg8wykfx9ryvqhirac0aq39pk";
+  };
+
+  nativeBuildInputs = [ pkgconfig ];
+
+  buildInputs = [
+    ncurses alsaLib flac libmad speex ffmpeg libvorbis libmpc libsndfile libjack2
+    db libmodplug timidity libid3tag libtool
+  ];
+
+  meta = with stdenv.lib; {
+    description = "An ncurses console audio player designed to be powerful and easy to use";
+    homepage = http://moc.daper.net/;
+    license = licenses.gpl2;
+    maintainers = with maintainers; [ pSub jagajaga ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/mod-distortion/default.nix b/nixpkgs/pkgs/applications/audio/mod-distortion/default.nix
new file mode 100644
index 000000000000..c66f78373228
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/mod-distortion/default.nix
@@ -0,0 +1,25 @@
+{ stdenv, fetchFromGitHub, lv2 }:
+
+stdenv.mkDerivation rec {
+  name = "mod-distortion-git-${version}";
+  version = "2016-08-19";
+
+  src = fetchFromGitHub {
+    owner = "portalmod";
+    repo = "mod-distortion";
+    rev = "e672d5feb9d631798e3d56eb96e8958c3d2c6821";
+    sha256 = "005wdkbhn9dgjqv019cwnziqg86yryc5vh7j5qayrzh9v446dw34";
+  };
+
+  buildInputs = [ lv2 ];
+
+  installFlags = [ "INSTALL_PATH=$(out)/lib/lv2" ];
+
+  meta = with stdenv.lib; {
+    homepage = https://github.com/portalmod/mod-distortion;
+    description = "Analog distortion emulation lv2 plugins";
+    license = licenses.gpl3;
+    maintainers = [ maintainers.magnetophon ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/monkeys-audio/buildfix.diff b/nixpkgs/pkgs/applications/audio/monkeys-audio/buildfix.diff
new file mode 100644
index 000000000000..9684e5bf8e43
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/monkeys-audio/buildfix.diff
@@ -0,0 +1,49 @@
+diff --git a/src/MACLib/APELink.cpp b/src/MACLib/APELink.cpp
+index d349f4b..b00ec83 100644
+--- a/src/MACLib/APELink.cpp
++++ b/src/MACLib/APELink.cpp
+@@ -63,10 +63,10 @@ void CAPELink::ParseData(const char * pData, const str_utf16 * pFilename)
+     if (pData != NULL)
+     {
+         // parse out the information
+-        char * pHeader = strstr(pData, APE_LINK_HEADER);
+-        char * pImageFile = strstr(pData, APE_LINK_IMAGE_FILE_TAG);
+-        char * pStartBlock = strstr(pData, APE_LINK_START_BLOCK_TAG);
+-        char * pFinishBlock = strstr(pData, APE_LINK_FINISH_BLOCK_TAG);
++        const char * pHeader = strstr(pData, APE_LINK_HEADER);
++        const char * pImageFile = strstr(pData, APE_LINK_IMAGE_FILE_TAG);
++        const char * pStartBlock = strstr(pData, APE_LINK_START_BLOCK_TAG);
++        const char * pFinishBlock = strstr(pData, APE_LINK_FINISH_BLOCK_TAG);
+ 
+         if (pHeader && pImageFile && pStartBlock && pFinishBlock)
+         {
+@@ -81,7 +81,7 @@ void CAPELink::ParseData(const char * pData, const str_utf16 * pFilename)
+                 
+                 // get the path
+                 char cImageFile[MAX_PATH + 1]; int nIndex = 0;
+-                char * pImageCharacter = &pImageFile[strlen(APE_LINK_IMAGE_FILE_TAG)];
++                const char * pImageCharacter = &pImageFile[strlen(APE_LINK_IMAGE_FILE_TAG)];
+                 while ((*pImageCharacter != 0) && (*pImageCharacter != '\r') && (*pImageCharacter != '\n'))
+                     cImageFile[nIndex++] = *pImageCharacter++;
+                 cImageFile[nIndex] = 0;
+diff --git a/src/Shared/All.h b/src/Shared/All.h
+index 328addc..7730e89 100644
+--- a/src/Shared/All.h
++++ b/src/Shared/All.h
+@@ -21,6 +21,8 @@ Global includes
+     #include <windows.h>
+ #endif
+ 
++#include <stdlib.h>
++
+ #ifdef _WIN32
+     #include <mmsystem.h>
+     #include <tchar.h>
+@@ -34,7 +36,6 @@ Global includes
+     #include "NoWindows.h"
+ #endif
+ 
+-#include <stdlib.h>
+ #include <memory.h>
+ #include <stdio.h>
+ #include <math.h>
diff --git a/nixpkgs/pkgs/applications/audio/monkeys-audio/default.nix b/nixpkgs/pkgs/applications/audio/monkeys-audio/default.nix
new file mode 100644
index 000000000000..1b3e89d4885e
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/monkeys-audio/default.nix
@@ -0,0 +1,19 @@
+{stdenv, fetchurl}:
+
+stdenv.mkDerivation rec {
+  version = "3.99-u4-b5";
+  pname = "monkeys-audio";
+  name = pname + "-" + version;
+
+  patches = [ ./buildfix.diff ];
+
+  src = fetchurl {
+    url = "https://deb-multimedia.org/pool/main/m/${pname}/${pname}_${version}.orig.tar.gz";
+    sha256 = "0kjfwzfxfx7f958b2b1kf8yj655lp0ppmn0sh57gbkjvj8lml7nz";
+  };
+
+  meta = with stdenv.lib; {
+    platforms = platforms.linux;
+    maintainers = [ ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/mopidy/default.nix b/nixpkgs/pkgs/applications/audio/mopidy/default.nix
new file mode 100644
index 000000000000..9015a8c749a8
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/mopidy/default.nix
@@ -0,0 +1,44 @@
+{ stdenv, fetchFromGitHub, pythonPackages, wrapGAppsHook
+, gst_all_1, glib-networking, gobject-introspection
+}:
+
+pythonPackages.buildPythonApplication rec {
+  pname = "mopidy";
+  version = "2.2.2";
+
+  src = fetchFromGitHub {
+    owner = "mopidy";
+    repo = "mopidy";
+    rev = "v${version}";
+    sha256 = "01vl162c7ssf69b0m65ys9fxnsqnfa1whwbprnc063lkcnrnlkr1";
+  };
+
+  nativeBuildInputs = [ wrapGAppsHook ];
+
+  buildInputs = with gst_all_1; [
+    gst-plugins-base gst-plugins-good gst-plugins-ugly gst-plugins-bad
+    glib-networking gobject-introspection
+  ];
+
+  propagatedBuildInputs = with pythonPackages; [
+    gst-python pygobject3 pykka tornado_4 requests
+  ] ++ stdenv.lib.optional (!stdenv.isDarwin) dbus-python;
+
+  # There are no tests
+  doCheck = false;
+
+  preFixup = ''
+    gappsWrapperArgs+=(--prefix GST_PLUGIN_SYSTEM_PATH : "$GST_PLUGIN_SYSTEM_PATH")
+  '';
+
+  meta = with stdenv.lib; {
+    homepage = https://www.mopidy.com/;
+    description = ''
+      An extensible music server that plays music from local disk, Spotify,
+      SoundCloud, Google Play Music, and more
+    '';
+    license = licenses.asl20;
+    maintainers = with maintainers; [ rickynils fpletz ];
+    hydraPlatforms = [];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/mopidy/gmusic.nix b/nixpkgs/pkgs/applications/audio/mopidy/gmusic.nix
new file mode 100644
index 000000000000..8c173140efd8
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/mopidy/gmusic.nix
@@ -0,0 +1,28 @@
+{ stdenv, fetchurl, pythonPackages, mopidy }:
+
+pythonPackages.buildPythonApplication rec {
+  pname = "mopidy-gmusic";
+  version = "3.0.0";
+
+  src = fetchurl {
+    url = "https://github.com/mopidy/mopidy-gmusic/archive/v${version}.tar.gz";
+    sha256 = "0a2s4xrrhnkv85rx4w5bj6ih9xm34jy0q71fdvbzmi827g9dw5sz";
+  };
+
+  propagatedBuildInputs = [
+    mopidy
+    pythonPackages.requests
+    pythonPackages.gmusicapi
+    pythonPackages.cachetools
+  ];
+
+  doCheck = false;
+
+  meta = with stdenv.lib; {
+    homepage = https://www.mopidy.com/;
+    description = "Mopidy extension for playing music from Google Play Music";
+    license = licenses.asl20;
+    maintainers = [ maintainers.jgillich ];
+    hydraPlatforms = [];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/mopidy/iris.nix b/nixpkgs/pkgs/applications/audio/mopidy/iris.nix
new file mode 100644
index 000000000000..6e61e0377f80
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/mopidy/iris.nix
@@ -0,0 +1,34 @@
+{ stdenv, pythonPackages, mopidy, mopidy-local-images }:
+
+pythonPackages.buildPythonApplication rec {
+  pname = "Mopidy-Iris";
+  version = "3.32.1";
+
+  src = pythonPackages.fetchPypi {
+    inherit pname version;
+    sha256 = "0cbb3v9gysi0800ls9vva7clilyg295jcvawyvf0czdmv4wxg3mq";
+  };
+
+  propagatedBuildInputs = [
+    mopidy
+    mopidy-local-images
+  ] ++ (with pythonPackages; [
+    configobj
+    pylast
+    spotipy
+    raven
+    tornado_4
+  ]);
+
+  postPatch = "sed -i /tornado/d setup.py";
+
+  # no tests implemented
+  doCheck = false;
+
+  meta = with stdenv.lib; {
+    homepage = https://github.com/jaedb/Iris;
+    description = "A fully-functional Mopidy web client encompassing Spotify and many other backends";
+    license = licenses.asl20;
+    maintainers = [ maintainers.rvolosatovs ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/mopidy/local-images.nix b/nixpkgs/pkgs/applications/audio/mopidy/local-images.nix
new file mode 100644
index 000000000000..2ffc736572bf
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/mopidy/local-images.nix
@@ -0,0 +1,32 @@
+{ stdenv, fetchFromGitHub, pythonPackages, mopidy, gobject-introspection }:
+
+pythonPackages.buildPythonApplication rec {
+  pname = "mopidy-local-images";
+  version = "1.0.0";
+
+  src = fetchFromGitHub {
+    owner = "mopidy";
+    repo = "mopidy-local-images";
+    rev = "v${version}";
+    sha256 = "0gdqxws0jish50mmi57mlqcs659wrllzv00czl18niz94vzvyc0d";
+  };
+
+  buildInputs = [ gobject-introspection ];
+
+  checkInputs = [
+    pythonPackages.mock
+  ];
+
+  propagatedBuildInputs = [
+    mopidy
+    pythonPackages.pykka
+    pythonPackages.uritools
+  ];
+
+  meta = with stdenv.lib; {
+    homepage = https://github.com/mopidy/mopidy-local-images;
+    description = "Mopidy local library proxy extension for handling embedded album art";
+    license = licenses.asl20;
+    maintainers = [ maintainers.rvolosatovs ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/mopidy/local-sqlite.nix b/nixpkgs/pkgs/applications/audio/mopidy/local-sqlite.nix
new file mode 100644
index 000000000000..6d0cc370ff34
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/mopidy/local-sqlite.nix
@@ -0,0 +1,25 @@
+{ stdenv, fetchFromGitHub, pythonPackages, mopidy }:
+
+pythonPackages.buildPythonApplication rec {
+  pname = "mopidy-local-sqlite";
+  version = "1.0.0";
+
+  src = fetchFromGitHub {
+    owner = "mopidy";
+    repo = "mopidy-local-sqlite";
+    rev = "v${version}";
+    sha256 = "1fjd9ydbfwd1n9b9zw8zjn4l7c5hpam2n0xs51pjkjn82m3zq9zv";
+  };
+
+  propagatedBuildInputs = [
+    mopidy
+    pythonPackages.uritools
+  ];
+
+  meta = with stdenv.lib; {
+    homepage = https://github.com/mopidy/mopidy-local-sqlite;
+    description = "Mopidy SQLite local library extension";
+    license = licenses.asl20;
+    maintainers = [ maintainers.rvolosatovs ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/mopidy/moped.nix b/nixpkgs/pkgs/applications/audio/mopidy/moped.nix
new file mode 100644
index 000000000000..3754bf763b20
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/mopidy/moped.nix
@@ -0,0 +1,26 @@
+{ stdenv, pythonPackages, mopidy, glibcLocales }:
+
+pythonPackages.buildPythonApplication rec {
+  pname = "Mopidy-Moped";
+  version = "0.7.1";
+
+  src = pythonPackages.fetchPypi {
+    inherit pname version;
+    sha256 = "15461174037d87af93dd59a236d4275c5abf71cea0670ffff24a7d0399a8a2e4";
+  };
+
+  LC_ALL = "en_US.UTF-8";
+  buildInputs = [ glibcLocales ];
+  propagatedBuildInputs = [ mopidy ];
+
+  # no tests implemented
+  doCheck = false;
+
+  meta = with stdenv.lib; {
+    homepage = https://github.com/martijnboland/moped;
+    description = "A web client for Mopidy";
+    license = licenses.mit;
+    maintainers = [ maintainers.rickynils ];
+    hydraPlatforms = [];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/mopidy/mopify.nix b/nixpkgs/pkgs/applications/audio/mopidy/mopify.nix
new file mode 100644
index 000000000000..b657f69e26ee
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/mopidy/mopify.nix
@@ -0,0 +1,23 @@
+{ stdenv, pythonPackages, mopidy }:
+
+pythonPackages.buildPythonApplication rec {
+  pname = "Mopidy-Mopify";
+  version = "1.6.1";
+
+  src = pythonPackages.fetchPypi {
+    inherit pname version;
+    sha256 = "93ad2b3d38b1450c8f2698bb908b0b077a96b3f64cdd6486519e518132e23a5c";
+  };
+
+  propagatedBuildInputs = with pythonPackages; [ mopidy configobj ];
+
+  # no tests implemented
+  doCheck = false;
+
+  meta = with stdenv.lib; {
+    homepage = https://github.com/dirkgroenen/mopidy-mopify;
+    description = "A mopidy webclient based on the Spotify webbased interface";
+    license = licenses.gpl3;
+    maintainers = [ maintainers.Gonzih ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/mopidy/musicbox-webclient.nix b/nixpkgs/pkgs/applications/audio/mopidy/musicbox-webclient.nix
new file mode 100644
index 000000000000..b0abefd7a1fd
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/mopidy/musicbox-webclient.nix
@@ -0,0 +1,23 @@
+{ stdenv, fetchFromGitHub, pythonPackages, mopidy }:
+
+pythonPackages.buildPythonApplication rec {
+  pname = "mopidy-musicbox-webclient";
+  version = "2.3.0";
+
+  src = fetchFromGitHub {
+    owner = "pimusicbox";
+    repo = "mopidy-musicbox-webclient";
+    rev = "v${version}";
+    sha256 = "1jcfrwsi7axiph3jplqzmcqia9pc46xb2yf13d8h6lnh3h49rwvz";
+  };
+
+  propagatedBuildInputs = [ mopidy ];
+
+  doCheck = false;
+
+  meta = with stdenv.lib; {
+    description = "Mopidy extension for playing music from SoundCloud";
+    license = licenses.mit;
+    maintainers = [ maintainers.spwhitt ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/mopidy/soundcloud.nix b/nixpkgs/pkgs/applications/audio/mopidy/soundcloud.nix
new file mode 100644
index 000000000000..8002feb0f901
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/mopidy/soundcloud.nix
@@ -0,0 +1,23 @@
+{ stdenv, fetchFromGitHub, pythonPackages, mopidy }:
+
+pythonPackages.buildPythonApplication rec {
+  pname = "mopidy-soundcloud";
+  version = "2.1.0";
+
+  src = fetchFromGitHub {
+    owner = "mopidy";
+    repo = "mopidy-soundcloud";
+    rev = "v${version}";
+    sha256 = "131qdm9i0j3ayff0js11qcmbjv50ws5s6iiqr6x5b66ymjl4scfv";
+  };
+
+  propagatedBuildInputs = [ mopidy ];
+
+  doCheck = false;
+
+  meta = with stdenv.lib; {
+    description = "Mopidy extension for playing music from SoundCloud";
+    license = licenses.mit;
+    maintainers = [ maintainers.spwhitt ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/mopidy/spotify-tunigo.nix b/nixpkgs/pkgs/applications/audio/mopidy/spotify-tunigo.nix
new file mode 100644
index 000000000000..4b75af5ed579
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/mopidy/spotify-tunigo.nix
@@ -0,0 +1,23 @@
+{ stdenv, fetchFromGitHub, pythonPackages, mopidy, mopidy-spotify }:
+
+pythonPackages.buildPythonApplication rec {
+  pname = "mopidy-spotify-tunigo";
+  version = "1.0.0";
+
+  src = fetchFromGitHub {
+    owner = "trygveaa";
+    repo = "mopidy-spotify-tunigo";
+    rev = "v${version}";
+    sha256 = "1jwk0b2iz4z09qynnhcr07w15lx6i1ra09s9lp48vslqcf2fp36x";
+  };
+
+  propagatedBuildInputs = [ mopidy mopidy-spotify pythonPackages.tunigo ];
+
+  doCheck = false;
+
+  meta = with stdenv.lib; {
+    description = "Mopidy extension for providing the browse feature of Spotify";
+    license = licenses.asl20;
+    maintainers = [ maintainers.spwhitt ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/mopidy/spotify.nix b/nixpkgs/pkgs/applications/audio/mopidy/spotify.nix
new file mode 100644
index 000000000000..9a6e1bef994c
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/mopidy/spotify.nix
@@ -0,0 +1,23 @@
+{ stdenv, fetchurl, pythonPackages, mopidy }:
+
+pythonPackages.buildPythonApplication rec {
+  pname = "mopidy-spotify";
+  version = "3.1.0";
+
+  src = fetchurl {
+    url = "https://github.com/mopidy/mopidy-spotify/archive/v${version}.tar.gz";
+    sha256 = "1mh87w4j0ypvsrnax7kkjgfxfpnw3l290jvfzg56b8qlwf20khjl";
+  };
+
+  propagatedBuildInputs = [ mopidy pythonPackages.pyspotify ];
+
+  doCheck = false;
+
+  meta = with stdenv.lib; {
+    homepage = https://www.mopidy.com/;
+    description = "Mopidy extension for playing music from Spotify";
+    license = licenses.asl20;
+    maintainers = [ maintainers.rickynils ];
+    hydraPlatforms = [];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/mopidy/youtube.nix b/nixpkgs/pkgs/applications/audio/mopidy/youtube.nix
new file mode 100644
index 000000000000..b8e22a41cabf
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/mopidy/youtube.nix
@@ -0,0 +1,23 @@
+{ stdenv, fetchFromGitHub, pythonPackages, mopidy }:
+
+pythonPackages.buildPythonApplication rec {
+  pname = "mopidy-youtube";
+  version = "2.0.2";
+
+  src = fetchFromGitHub {
+    owner = "mopidy";
+    repo = "mopidy-youtube";
+    rev = "v${version}";
+    sha256 = "06r3ikyg2ch5n7fbn3sgj04hk6icpfpk1r856qch41995k3bbfg7";
+  };
+
+  propagatedBuildInputs = with pythonPackages; [ mopidy pafy ];
+
+  doCheck = false;
+
+  meta = with stdenv.lib; {
+    description = "Mopidy extension for playing music from YouTube";
+    license = licenses.asl20;
+    maintainers = [ maintainers.spwhitt ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/mp3blaster/default.nix b/nixpkgs/pkgs/applications/audio/mp3blaster/default.nix
new file mode 100644
index 000000000000..eb5aa7c036cc
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/mp3blaster/default.nix
@@ -0,0 +1,30 @@
+{ stdenv, fetchFromGitHub, ncurses, libvorbis, SDL }:
+stdenv.mkDerivation rec {
+
+  version = "3.2.6";
+
+  name = "mp3blaster-${version}";
+
+  src = fetchFromGitHub {
+    owner = "stragulus";
+    repo = "mp3blaster";
+    rev = "v${version}";
+    sha256 = "0pzwml3yhysn8vyffw9q9p9rs8gixqkmg4n715vm23ib6wxbliqs";
+  };
+
+  buildInputs = [
+    ncurses
+    libvorbis
+  ] ++ stdenv.lib.optional stdenv.isDarwin SDL;
+
+  buildFlags = [ "CXXFLAGS=-Wno-narrowing" ];
+
+  meta = with stdenv.lib; {
+    description = "An audio player for the text console";
+    homepage = http://www.mp3blaster.org/;
+    license = licenses.gpl2;
+    maintainers = with maintainers; [ earldouglas ];
+    platforms = platforms.all;
+  };
+
+}
diff --git a/nixpkgs/pkgs/applications/audio/mp3gain/default.nix b/nixpkgs/pkgs/applications/audio/mp3gain/default.nix
new file mode 100644
index 000000000000..907d4b8be168
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/mp3gain/default.nix
@@ -0,0 +1,27 @@
+{ stdenv, fetchurl, unzip }:
+
+stdenv.mkDerivation {
+  name = "mp3gain-1.5.2";
+  src = fetchurl {
+    url = "mirror://sourceforge/mp3gain/mp3gain-1_5_2-src.zip";
+    sha256 = "1jkgry59m8cnnfq05b9y1h4x4wpy3iq8j68slb9qffwa3ajcgbfv";
+  };
+
+  buildInputs = [ unzip ];
+
+  sourceRoot = ".";
+
+  buildFlags = [ "OSTYPE=linux" ];
+
+  installPhase = ''
+    install -vD mp3gain "$out/bin/mp3gain"
+  '';
+
+  meta = {
+    description = "Lossless mp3 normalizer with statistical analysis";
+    homepage = http://mp3gain.sourceforge.net/;
+    license = stdenv.lib.licenses.lgpl21;
+    platforms = stdenv.lib.platforms.linux;
+    maintainers = [ stdenv.lib.maintainers.devhell ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/mp3info/default.nix b/nixpkgs/pkgs/applications/audio/mp3info/default.nix
new file mode 100644
index 000000000000..6700f21fc8cc
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/mp3info/default.nix
@@ -0,0 +1,45 @@
+{ fetchurl, stdenv, ncurses, pkgconfig, gtk2 }:
+
+stdenv.mkDerivation rec {
+  name = "mp3info-0.8.5a";
+
+  src = fetchurl {
+    url = "ftp://ftp.ibiblio.org/pub/linux/apps/sound/mp3-utils/mp3info/${name}.tgz";
+    sha256 = "042f1czcs9n2sbqvg4rsvfwlqib2gk976mfa2kxlfjghx5laqf04";
+  };
+
+  nativeBuildInputs = [ pkgconfig ];
+  buildInputs = [ ncurses gtk2 ];
+
+  hardeningDisable = [ "format" ];
+
+  configurePhase =
+    '' sed -i Makefile \
+           -e "s|^prefix=.*$|prefix=$out|g ;
+               s|/bin/rm|rm|g ;
+               s|/usr/bin/install|install|g"
+    '';
+
+  preInstall =
+    '' mkdir -p "$out/bin"
+       mkdir -p "$out/man/man1"
+    '';
+
+  meta = {
+    description = "MP3 technical info viewer and ID3 1.x tag editor";
+
+    longDescription =
+      '' MP3Info is a little utility used to read and modify the ID3 tags of
+         MP3 files.  MP3Info can also display various techincal aspects of an
+         MP3 file including playing time, bit-rate, sampling frequency and
+         other attributes in a pre-defined or user-specifiable output format.
+      '';
+
+    homepage = http://www.ibiblio.org/mp3info/;
+
+    license = stdenv.lib.licenses.gpl2Plus;
+
+    maintainers = [ ];
+    platforms = stdenv.lib.platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/mp3splt/default.nix b/nixpkgs/pkgs/applications/audio/mp3splt/default.nix
new file mode 100644
index 000000000000..f2922e7eecf9
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/mp3splt/default.nix
@@ -0,0 +1,27 @@
+{ stdenv, fetchurl, pkgconfig, libmp3splt }:
+
+stdenv.mkDerivation rec {
+  pname = "mp3splt";
+  version = "2.6.2";
+  name = "${pname}-${version}";
+
+
+  src = fetchurl {
+    url = "mirror://sourceforge/${pname}/${name}.tar.gz";
+    sha256 = "1aiv20gypb6r84qabz8gblk8vi42cg3x333vk2pi3fyqvl82phry";
+  };
+
+  configureFlags = [ "--enable-oggsplt-symlink" "--enable-flacsplt-symlink" ];
+  nativeBuildInputs = [ pkgconfig ];
+  buildInputs = [ libmp3splt ];
+
+  outputs = [ "out" "man" ];
+
+  meta = with stdenv.lib; {
+    description = "Utility to split mp3, ogg vorbis and FLAC files without decoding";
+    homepage = https://sourceforge.net/projects/mp3splt/;
+    license = licenses.gpl2;
+    maintainers = [ maintainers.bosu ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/mp3val/default.nix b/nixpkgs/pkgs/applications/audio/mp3val/default.nix
new file mode 100644
index 000000000000..7477bea7602c
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/mp3val/default.nix
@@ -0,0 +1,37 @@
+{ stdenv, fetchurl }:
+
+stdenv.mkDerivation rec {
+  name = "mp3val-${version}";
+  version = "0.1.8";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/mp3val/${name}-src.tar.gz";
+    sha256 = "17y3646ghr38r620vkrxin3dksxqig5yb3nn4cfv6arm7kz6x8cm";
+  };
+
+  makefile = "Makefile.linux";
+
+  installPhase = ''
+    install -Dv mp3val "$out/bin/mp3val"
+  '';
+
+  hardeningDisable = [ "fortify" ];
+
+  meta = {
+    description = "A tool for validating and repairing MPEG audio streams";
+    longDescription = ''
+      MP3val is a small, high-speed, free software tool for checking MPEG audio
+      files' integrity. It can be useful for finding corrupted files (e.g.
+      incompletely downloaded, truncated, containing garbage). MP3val is
+      also able to fix most of the problems. Being a multiplatform application,
+      MP3val can be runned both under Windows and under Linux (or BSD). The most
+      common MPEG audio file type is MPEG 1 Layer III (mp3), but MP3val supports
+      also other MPEG versions and layers. The tool is also aware of the most
+      common types of tags (ID3v1, ID3v2, APEv2).
+    '';
+    homepage = http://mp3val.sourceforge.net/index.shtml;
+    license = stdenv.lib.licenses.gpl2;
+    platforms = stdenv.lib.platforms.unix;
+    maintainers = [ stdenv.lib.maintainers.devhell ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/mpc/default.nix b/nixpkgs/pkgs/applications/audio/mpc/default.nix
new file mode 100644
index 000000000000..220e72b568af
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/mpc/default.nix
@@ -0,0 +1,27 @@
+{ stdenv, fetchFromGitHub, autoreconfHook, pkgconfig, mpd_clientlib }:
+
+stdenv.mkDerivation rec {
+  name = "mpc-${version}";
+  version = "0.28";
+
+  src = fetchFromGitHub {
+    owner  = "MusicPlayerDaemon";
+    repo   = "mpc";
+    rev    = "v${version}";
+    sha256 = "1g8i4q5xsqdhidyjpvj6hzbhxacv27cb47ndv9k68whd80c5f9n9";
+  };
+
+  buildInputs = [ mpd_clientlib ];
+
+  nativeBuildInputs = [ autoreconfHook pkgconfig ];
+
+  enableParallelBuilding = true;
+
+  meta = with stdenv.lib; {
+    description = "A minimalist command line interface to MPD";
+    homepage = https://www.musicpd.org/clients/mpc/;
+    license = licenses.gpl2;
+    maintainers = with maintainers; [ algorith ];
+    platforms = with platforms; linux ++ darwin;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/mpc123/default.nix b/nixpkgs/pkgs/applications/audio/mpc123/default.nix
new file mode 100644
index 000000000000..efaef97257e0
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/mpc123/default.nix
@@ -0,0 +1,32 @@
+{ fetchurl, stdenv, gettext, libmpcdec, libao }:
+
+let version = "0.2.4"; in
+stdenv.mkDerivation rec {
+  name = "mpc123-${version}";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/mpc123/version%20${version}/${name}.tar.gz";
+    sha256 = "0sf4pns0245009z6mbxpx7kqy4kwl69bc95wz9v23wgappsvxgy1";
+  };
+
+  patches = [ ./use-gcc.patch ];
+
+  buildInputs = [ gettext libmpcdec libao ];
+
+  installPhase =
+    # XXX: Should install locales too (though there's only 1 available).
+    '' mkdir -p "$out/bin"
+       cp -v mpc123 "$out/bin"
+    '';
+
+  meta = {
+    homepage = http://mpc123.sourceforge.net/;
+
+    description = "A Musepack (.mpc) audio player";
+
+    license = stdenv.lib.licenses.gpl2Plus;
+
+    maintainers = [ ];
+    platforms = stdenv.lib.platforms.gnu ++ stdenv.lib.platforms.linux; # arbitrary choice
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/mpc123/use-gcc.patch b/nixpkgs/pkgs/applications/audio/mpc123/use-gcc.patch
new file mode 100644
index 000000000000..ca4cf84591ce
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/mpc123/use-gcc.patch
@@ -0,0 +1,13 @@
+Don't worry, just use GCC and everything's gonna be alright.
+
+--- mpc123-0.2.4/Makefile	2008-03-21 22:14:38.000000000 +0100
++++ mpc123-0.2.4/Makefile	2010-01-28 23:26:49.000000000 +0100
+@@ -17,7 +17,7 @@
+ # along with this program; if not, write to the Free Software Foundation,
+ # Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ 
+-CC := $(shell which colorgcc || which cc)
++CC := gcc
+ 
+ TAGSPRG := ctags
+ 
diff --git a/nixpkgs/pkgs/applications/audio/mpg123/default.nix b/nixpkgs/pkgs/applications/audio/mpg123/default.nix
new file mode 100644
index 000000000000..44f1c681ec1a
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/mpg123/default.nix
@@ -0,0 +1,26 @@
+{ stdenv
+, fetchurl, alsaLib
+}:
+
+stdenv.mkDerivation rec {
+  name = "mpg123-1.25.10";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/mpg123/${name}.tar.bz2";
+    sha256 = "08vhp8lz7d9ybhxcmkq3adwfryhivfvp0745k4r9kgz4wap3f4vc";
+  };
+
+  buildInputs = stdenv.lib.optional (!stdenv.isDarwin) alsaLib;
+
+  configureFlags = stdenv.lib.optional
+    (stdenv.hostPlatform ? mpg123)
+    "--with-cpu=${stdenv.hostPlatform.mpg123.cpu}";
+
+  meta = {
+    description = "Fast console MPEG Audio Player and decoder library";
+    homepage = http://mpg123.org;
+    license = stdenv.lib.licenses.lgpl21;
+    maintainers = [ stdenv.lib.maintainers.ftrvxmtrx ];
+    platforms = stdenv.lib.platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/mpg321/default.nix b/nixpkgs/pkgs/applications/audio/mpg321/default.nix
new file mode 100644
index 000000000000..3ffc5265f7a0
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/mpg321/default.nix
@@ -0,0 +1,35 @@
+{stdenv, fetchurl, libao, libmad, libid3tag, zlib, alsaLib
+# Specify default libao output plugin to use (e.g. "alsa", "pulse" …).
+# If null, it will use the libao system default.
+, defaultAudio ? null
+}:
+
+stdenv.mkDerivation rec {
+  name = "mpg321-${version}";
+  version = "0.3.2";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/mpg321/${version}/mpg321_${version}.orig.tar.gz";
+    sha256 = "0ki8mh76bbmdh77qsiw682dvi8y468yhbdabqwg05igmwc1wqvq5";
+  };
+
+  hardeningDisable = [ "format" ];
+
+  configureFlags =
+    [ ("--enable-alsa=" + (if stdenv.isLinux then "yes" else "no")) ]
+    ++ (stdenv.lib.optional (defaultAudio != null)
+         "--with-default-audio=${defaultAudio}");
+
+  buildInputs = [libao libid3tag libmad zlib]
+    ++ stdenv.lib.optional stdenv.isLinux alsaLib;
+
+  installTargets = "install install-man";
+
+  meta = with stdenv.lib; {
+    description = "Command-line MP3 player";
+    homepage = http://mpg321.sourceforge.net/;
+    license = licenses.gpl2;
+    maintainers = [ maintainers.rycee ];
+    platforms = platforms.gnu ++ platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/muse/default.nix b/nixpkgs/pkgs/applications/audio/muse/default.nix
new file mode 100644
index 000000000000..9687ff3106bd
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/muse/default.nix
@@ -0,0 +1,76 @@
+{ stdenv
+, fetchFromGitHub
+, libjack2
+, qt5
+, cmake
+, libsndfile
+, libsamplerate
+, ladspaH
+, fluidsynth
+, alsaLib
+, rtaudio
+, lash
+, dssi
+, liblo
+, pkgconfig
+, gitAndTools
+}:
+
+stdenv.mkDerivation rec {
+  name = "muse-sequencer-${version}";
+  version = "3.0.2";
+
+  meta = with stdenv.lib; {
+    homepage = http://www.muse-sequencer.org;
+    description = "MIDI/Audio sequencer with recording and editing capabilities";
+    longDescription = ''
+      MusE is a MIDI/Audio sequencer with recording and editing capabilities
+      written originally by Werner Schweer now developed and maintained
+      by the MusE development team.
+
+      MusE aims to be a complete multitrack virtual studio for Linux,
+      it is published under the GNU General Public License.
+    '';
+    license = stdenv.lib.licenses.gpl2;
+  };
+
+  src =
+    fetchFromGitHub {
+      owner = "muse-sequencer";
+      repo = "muse";
+      rev = "02d9dc6abd757c3c1783fdd46dacd3c4ef2c0a6d";
+      sha256 = "0pn0mcg79z3bhjwxbss3ylypdz3gg70q5d1ij3x8yw65ryxbqf51";
+    };
+
+
+  buildInputs = [
+    libjack2
+    qt5.qtsvg
+    qt5.qttools
+    cmake
+    libsndfile
+    libsamplerate
+    ladspaH
+    fluidsynth
+    alsaLib
+    rtaudio
+    lash
+    dssi
+    liblo
+    pkgconfig
+    gitAndTools.gitFull
+  ];
+
+  sourceRoot = "source/muse3";
+
+  buildPhase = ''
+    cd ..
+    bash compile_muse.sh
+  '';
+
+  installPhase = ''
+    mkdir $out
+    cd build
+    make install
+  '';
+}
diff --git a/nixpkgs/pkgs/applications/audio/musescore/darwin.nix b/nixpkgs/pkgs/applications/audio/musescore/darwin.nix
new file mode 100644
index 000000000000..e14594ae3b2d
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/musescore/darwin.nix
@@ -0,0 +1,34 @@
+{ stdenv, lib, fetchurl, undmg }:
+
+let
+  versionComponents = [ "2" "1" ];
+  appName = "MuseScore ${builtins.head versionComponents}";
+in
+
+with lib;
+
+stdenv.mkDerivation rec {
+  name = "musescore-darwin-${version}";
+  version = "${concatStringsSep "." versionComponents}";
+
+  src = fetchurl {
+    url =  "ftp://ftp.osuosl.org/pub/musescore/releases/MuseScore-${concatStringsSep "." (take 3 versionComponents)}/MuseScore-${version}.dmg";
+    sha256 = "19xkaxlkbrhvfip6n3iw6q7463ngr6y5gfisrpjqg2xl2igyl795";
+  };
+
+  buildInputs = [ undmg ];
+  installPhase = ''
+    mkdir -p "$out/Applications/${appName}.app"
+    cp -R . "$out/Applications/${appName}.app"
+    chmod a+x "$out/Applications/${appName}.app/Contents/MacOS/mscore"
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Music notation and composition software";
+    homepage = https://musescore.org/;
+    license = licenses.gpl2;
+    platforms = platforms.darwin;
+    maintainers = with maintainers; [ yurrriq ];
+    repositories.git = https://github.com/musescore/MuseScore;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/musescore/default.nix b/nixpkgs/pkgs/applications/audio/musescore/default.nix
new file mode 100644
index 000000000000..8ec4a342522d
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/musescore/default.nix
@@ -0,0 +1,40 @@
+{ stdenv, lib, fetchzip, cmake, pkgconfig
+, alsaLib, freetype, libjack2, lame, libogg, libpulseaudio, libsndfile, libvorbis
+, portaudio, portmidi, qtbase, qtdeclarative, qtscript, qtsvg, qttools
+, qtwebengine, qtxmlpatterns
+}:
+
+stdenv.mkDerivation rec {
+  name = "musescore-${version}";
+  version = "3.0.1";
+
+  src = fetchzip {
+    url = "https://download.musescore.com/releases/MuseScore-${version}/MuseScore-${version}.zip";
+    sha256 = "1l9djxq5hdfqiya2jwcag7qq4dhmb9qcv68y27dlza19imrnim80";
+    stripRoot = false;
+  };
+
+  patches = [
+    ./remove_qtwebengine_install_hack.patch
+  ];
+
+  cmakeFlags = [
+  ] ++ lib.optional (lib.versionAtLeast freetype.version "2.5.2") "-DUSE_SYSTEM_FREETYPE=ON";
+
+  nativeBuildInputs = [ cmake pkgconfig ];
+
+  buildInputs = [
+    alsaLib libjack2 freetype lame libogg libpulseaudio libsndfile libvorbis
+    portaudio portmidi # tesseract
+    qtbase qtdeclarative qtscript qtsvg qttools qtwebengine qtxmlpatterns
+  ];
+
+  meta = with stdenv.lib; {
+    description = "Music notation and composition software";
+    homepage = https://musescore.org/;
+    license = licenses.gpl2;
+    maintainers = with maintainers; [ vandenoever ];
+    platforms = platforms.linux;
+    repositories.git = https://github.com/musescore/MuseScore;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/musescore/remove_qtwebengine_install_hack.patch b/nixpkgs/pkgs/applications/audio/musescore/remove_qtwebengine_install_hack.patch
new file mode 100644
index 000000000000..53a0c90ce46e
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/musescore/remove_qtwebengine_install_hack.patch
@@ -0,0 +1,25 @@
+--- a/mscore/CMakeLists.txt
++++ b/mscore/CMakeLists.txt
+@@ -660,22 +660,6 @@ if (MINGW)
+ else (MINGW)
+
+    if ( NOT MSVC )
+-## install qwebengine core
+-      if (NOT APPLE AND USE_WEBENGINE)
+-         install(FILES
+-            ${QT_INSTALL_LIBEXECS}/QtWebEngineProcess
+-            DESTINATION bin
+-            )
+-         install(DIRECTORY
+-            ${QT_INSTALL_DATA}/resources
+-            DESTINATION lib/qt5
+-            )
+-         install(DIRECTORY
+-            ${QT_INSTALL_TRANSLATIONS}/qtwebengine_locales
+-            DESTINATION lib/qt5/translations
+-            )
+-      endif(NOT APPLE AND USE_WEBENGINE)
+-
+       target_link_libraries(mscore
+          ${ALSA_LIB}
+          ${QT_LIBRARIES}
diff --git a/nixpkgs/pkgs/applications/audio/ncmpc/default.nix b/nixpkgs/pkgs/applications/audio/ncmpc/default.nix
new file mode 100644
index 000000000000..7089f4dba920
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/ncmpc/default.nix
@@ -0,0 +1,25 @@
+{ stdenv, fetchFromGitHub, meson, ninja, pkgconfig, glib, ncurses
+, mpd_clientlib, gettext, boost }:
+
+stdenv.mkDerivation rec {
+  name = "ncmpc-${version}";
+  version = "0.33";
+
+  src = fetchFromGitHub {
+    owner  = "MusicPlayerDaemon";
+    repo   = "ncmpc";
+    rev    = "v${version}";
+    sha256 = "1ymnxb85v2pc0qpk0yz5gdxayc0ialk82ba521lgdw66li7fr4as";
+  };
+
+  buildInputs = [ glib ncurses mpd_clientlib boost ];
+  nativeBuildInputs = [ meson ninja pkgconfig gettext ];
+
+  meta = with stdenv.lib; {
+    description = "Curses-based interface for MPD (music player daemon)";
+    homepage    = https://www.musicpd.org/clients/ncmpc/;
+    license     = licenses.gpl2Plus;
+    platforms   = platforms.all;
+    maintainers = with maintainers; [ fpletz ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/ncmpcpp/default.nix b/nixpkgs/pkgs/applications/audio/ncmpcpp/default.nix
new file mode 100644
index 000000000000..87f5f94bb30b
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/ncmpcpp/default.nix
@@ -0,0 +1,41 @@
+{ stdenv, fetchurl, boost, mpd_clientlib, ncurses, pkgconfig, readline
+, libiconv, icu, curl
+, outputsSupport ? false # outputs screen
+, visualizerSupport ? false, fftw ? null # visualizer screen
+, clockSupport ? false # clock screen
+, taglibSupport ? true, taglib ? null # tag editor
+}:
+
+assert visualizerSupport -> (fftw != null);
+assert taglibSupport -> (taglib != null);
+
+with stdenv.lib;
+stdenv.mkDerivation rec {
+  name = "ncmpcpp-${version}";
+  version = "0.8.2";
+
+  src = fetchurl {
+    url = "https://ncmpcpp.rybczak.net/stable/${name}.tar.bz2";
+    sha256 = "0m0mjb049sl62vx13h9waavysa30mk0rphacksnvf94n13la62v5";
+  };
+
+  configureFlags = [ "BOOST_LIB_SUFFIX=" ]
+    ++ optional outputsSupport "--enable-outputs"
+    ++ optional visualizerSupport "--enable-visualizer --with-fftw"
+    ++ optional clockSupport "--enable-clock"
+    ++ optional taglibSupport "--with-taglib";
+
+  nativeBuildInputs = [ pkgconfig ];
+
+  buildInputs = [ boost mpd_clientlib ncurses readline libiconv icu curl ]
+    ++ optional visualizerSupport fftw
+    ++ optional taglibSupport taglib;
+
+  meta = {
+    description = "A featureful ncurses based MPD client inspired by ncmpc";
+    homepage    = https://ncmpcpp.rybczak.net/;
+    license     = licenses.gpl2Plus;
+    maintainers = with maintainers; [ jfrankenau koral lovek323 ];
+    platforms   = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/ncpamixer/default.nix b/nixpkgs/pkgs/applications/audio/ncpamixer/default.nix
new file mode 100644
index 000000000000..3eb70ce0c11e
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/ncpamixer/default.nix
@@ -0,0 +1,33 @@
+{ stdenv, fetchFromGitHub, cmake, ncurses, libpulseaudio, pkgconfig }:
+
+stdenv.mkDerivation rec {
+
+  name = "ncpamixer-${version}";
+  version = "1.3";
+
+  src = fetchFromGitHub {
+    owner = "fulhax";
+    repo = "ncpamixer";
+    rev = version;
+    sha256 = "02v8vsx26w3wrzkg61457diaxv1hyzsh103p53j80la9vglamdsh";
+  };
+
+  buildInputs = [ ncurses libpulseaudio ];
+  nativeBuildInputs = [ cmake pkgconfig ];
+
+  configurePhase = ''
+    make PREFIX=$out build/Makefile
+  '';
+
+  buildPhase = ''
+    make build
+  '';
+
+  meta = with stdenv.lib; {
+    description = "An ncurses mixer for PulseAudio inspired by pavucontrol";
+    homepage = https://github.com/fulhax/ncpamixer;
+    license = licenses.mit;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ StijnDW ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/non/default.nix b/nixpkgs/pkgs/applications/audio/non/default.nix
new file mode 100644
index 000000000000..44dd0d2d4ec3
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/non/default.nix
@@ -0,0 +1,27 @@
+{ stdenv, fetchFromGitHub, pkgconfig, python2, cairo, libjpeg, ntk, libjack2
+, libsndfile, ladspaH, liblrdf, liblo, libsigcxx, wafHook
+}:
+
+stdenv.mkDerivation rec {
+  name = "non-${version}";
+  version = "2018-02-15";
+  src = fetchFromGitHub {
+    owner = "original-male";
+    repo = "non";
+    rev = "5ae43bb27c42387052a73e5ffc5d33efb9d946a9";
+    sha256 = "1cljkkyi9dxqpqhx8y6l2ja4zjmlya26m26kqxml8gx08vyvddhx";
+  };
+
+  nativeBuildInputs = [ pkgconfig wafHook ];
+  buildInputs = [ python2 cairo libjpeg ntk libjack2 libsndfile
+    ladspaH liblrdf liblo libsigcxx
+  ];
+
+  meta = {
+    description = "Lightweight and lightning fast modular Digital Audio Workstation";
+    homepage = http://non.tuxfamily.org;
+    license = stdenv.lib.licenses.lgpl21;
+    platforms = stdenv.lib.platforms.linux;
+    maintainers = [ stdenv.lib.maintainers.nico202 ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/normalize/default.nix b/nixpkgs/pkgs/applications/audio/normalize/default.nix
new file mode 100644
index 000000000000..85c902d38396
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/normalize/default.nix
@@ -0,0 +1,20 @@
+{ stdenv, fetchurl, libmad }:
+
+stdenv.mkDerivation rec {
+  name = "normalize-${version}";
+  version = "0.7.7";
+
+  src = fetchurl {
+    url = "mirror://savannah/normalize/${name}.tar.gz";
+    sha256 = "1n5khss10vjjp6w69q9qcl4kqfkd0pr555lgqghrchn6rjms4mb0";
+  };
+
+  buildInputs = [ libmad ];
+
+  meta = with stdenv.lib; {
+    homepage = https://www.nongnu.org/normalize/;
+    description = "Audio file normalizer";
+    license = licenses.gpl2;
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/nova-filters/default.nix b/nixpkgs/pkgs/applications/audio/nova-filters/default.nix
new file mode 100644
index 000000000000..bb186687c66e
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/nova-filters/default.nix
@@ -0,0 +1,31 @@
+{stdenv, fetchurl, sconsPackages, boost, ladspaH, pkgconfig }:
+
+stdenv.mkDerivation rec {
+  version = "0.2-2";
+  name = "nova-filters-${version}";
+
+  src = fetchurl {
+    url = https://klingt.org/~tim/nova-filters/nova-filters_0.2-2.tar.gz;
+    sha256 = "16064vvl2w5lz4xi3lyjk4xx7fphwsxc14ajykvndiz170q32s6i";
+  };
+
+  nativeBuildInputs = [ pkgconfig sconsPackages.scons_3_0_1 ];
+  buildInputs = [ boost ladspaH ];
+
+  patchPhase = ''
+    # remove TERM:
+    sed -i -e '4d' SConstruct
+    sed -i "s@mfpmath=sse@mfpmath=sse -I ${boost.dev}/include@g" SConstruct
+    sed -i "s@ladspa.h@${ladspaH}/include/ladspa.h@g" filters.cpp
+    sed -i "s@LADSPA_HINT_SAMPLE_RATE, 0, 0.5@LADSPA_HINT_SAMPLE_RATE, 0.0001, 0.5@g" filters.cpp
+    sed -i "s/= check/= detail::filter_base<internal_type, checked>::check/" nova/source/dsp/filter.hpp
+  '';
+
+  meta = with stdenv.lib; {
+    description = "LADSPA plugins based on filters of nova";
+    homepage = http://klingt.org/~tim/nova-filters/;
+    license = licenses.gpl2Plus;
+    maintainers = [ maintainers.magnetophon ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/openmpt123/default.nix b/nixpkgs/pkgs/applications/audio/openmpt123/default.nix
new file mode 100644
index 000000000000..af8597022922
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/openmpt123/default.nix
@@ -0,0 +1,30 @@
+{ stdenv, fetchurl, zlib, pkgconfig, mpg123, libogg, libvorbis, portaudio, libsndfile, flac
+, usePulseAudio ? false, libpulseaudio }:
+
+let
+  version = "0.4.1";
+in stdenv.mkDerivation rec {
+  name = "openmpt123-${version}";
+
+  src = fetchurl {
+    url = "https://lib.openmpt.org/files/libopenmpt/src/libopenmpt-${version}+release.autotools.tar.gz";
+    sha256 = "1k1m1adjh4s2q9lxgkf836k5243akxrzq1hsdjhrkg4idd3pxzp4";
+  };
+
+  enableParallelBuilding = true;
+  doCheck = true;
+
+  nativeBuildInputs = [ pkgconfig ];
+  buildInputs = [ zlib mpg123 libogg libvorbis portaudio libsndfile flac ]
+  ++ stdenv.lib.optional usePulseAudio libpulseaudio;
+
+  configureFlags = stdenv.lib.optional (!usePulseAudio) [ "--without-pulseaudio" ];
+
+  meta = with stdenv.lib; {
+    description = "A cross-platform command-line based module file player";
+    homepage = https://lib.openmpt.org/libopenmpt/;
+    license = licenses.bsd3;
+    maintainers = with maintainers; [ gnidorah ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/opus-tools/default.nix b/nixpkgs/pkgs/applications/audio/opus-tools/default.nix
new file mode 100644
index 000000000000..85d0e1fbaf71
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/opus-tools/default.nix
@@ -0,0 +1,20 @@
+{stdenv, fetchurl, libogg, libao, pkgconfig, flac, opusfile, libopusenc}:
+
+stdenv.mkDerivation rec {
+  name = "opus-tools-0.2";
+  src = fetchurl {
+    url = "http://downloads.xiph.org/releases/opus/${name}.tar.gz";
+    sha256 = "11pzl27s4vcz4m18ch72nivbhww2zmzn56wspb7rll1y1nq6rrdl";
+  };
+
+  nativeBuildInputs = [ pkgconfig ];
+  buildInputs = [ libogg libao flac opusfile libopusenc ];
+
+  meta = {
+    description = "Tools to work with opus encoded audio streams";
+    homepage = http://www.opus-codec.org/;
+    license = stdenv.lib.licenses.bsd2;
+    maintainers = with stdenv.lib.maintainers; [ fuuzetsu ];
+    platforms = with stdenv.lib.platforms; unix;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/opusfile/default.nix b/nixpkgs/pkgs/applications/audio/opusfile/default.nix
new file mode 100644
index 000000000000..993e3c4fe8c5
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/opusfile/default.nix
@@ -0,0 +1,23 @@
+{ stdenv, fetchurl, pkgconfig, openssl, libogg, libopus }:
+
+stdenv.mkDerivation rec {
+  name = "opusfile-0.11";
+  src = fetchurl {
+    url = "http://downloads.xiph.org/releases/opus/${name}.tar.gz";
+    sha256 = "1gq3aszzl5glgbajw5p1f5a1kdyf23w5vjdmwwrk246syin9pkkl";
+  };
+
+  nativeBuildInputs = [ pkgconfig ];
+  buildInputs = [ openssl libogg ];
+  propagatedBuildInputs = [ libopus ];
+  patches = [ ./include-multistream.patch ];
+  configureFlags = [ "--disable-examples" ];
+
+  meta = with stdenv.lib; {
+    description = "High-level API for decoding and seeking in .opus files";
+    homepage = http://www.opus-codec.org/;
+    license = licenses.bsd3;
+    platforms = platforms.linux ++ platforms.darwin;
+    maintainers = with maintainers; [ fuuzetsu ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/opusfile/include-multistream.patch b/nixpkgs/pkgs/applications/audio/opusfile/include-multistream.patch
new file mode 100644
index 000000000000..7c6dd8475963
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/opusfile/include-multistream.patch
@@ -0,0 +1,12 @@
+diff -Naur a/include/opusfile.h b/include/opusfile.h
+--- a/include/opusfile.h	2014-04-29 19:07:09.000000000 +0200
++++ b/include/opusfile.h	2016-09-05 17:50:15.147553798 +0200
+@@ -107,7 +107,7 @@
+ # include <stdarg.h>
+ # include <stdio.h>
+ # include <ogg/ogg.h>
+-# include <opus_multistream.h>
++# include <opus/opus_multistream.h>
+ 
+ /**@cond PRIVATE*/
+ 
diff --git a/nixpkgs/pkgs/applications/audio/padthv1/default.nix b/nixpkgs/pkgs/applications/audio/padthv1/default.nix
new file mode 100644
index 000000000000..084487fd407a
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/padthv1/default.nix
@@ -0,0 +1,23 @@
+{ stdenv, fetchurl, pkgconfig, libjack2, alsaLib, libsndfile, liblo, lv2, qt5, fftw }:
+
+stdenv.mkDerivation rec {
+  name = "padthv1-${version}";
+  version = "0.9.4";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/padthv1/${name}.tar.gz";
+    sha256 = "0k4vlg3clsn2i4k12imvcjiwlp9nx1mikwyrnarg9shxzzdzcf4y";
+  };
+
+  buildInputs = [ libjack2 alsaLib libsndfile liblo lv2 qt5.qtbase qt5.qttools fftw ];
+
+  nativeBuildInputs = [ pkgconfig ];
+
+  meta = with stdenv.lib; {
+    description = "polyphonic additive synthesizer";
+    homepage = http://padthv1.sourceforge.net/;
+    license = licenses.gpl2Plus;
+    platforms = platforms.linux;
+    maintainers = [ maintainers.magnetophon ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/pamix/default.nix b/nixpkgs/pkgs/applications/audio/pamix/default.nix
new file mode 100644
index 000000000000..cc4a781ef66c
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/pamix/default.nix
@@ -0,0 +1,30 @@
+{ stdenv, fetchFromGitHub
+, pkgconfig, cmake
+, libpulseaudio, ncurses }:
+
+stdenv.mkDerivation rec {
+  name = "pamix-${version}";
+  version = "1.6";
+
+  src = fetchFromGitHub {
+    owner  = "patroclos";
+    repo   = "pamix";
+    rev    = version;
+    sha256 = "1d44ggnwkf2gff62959pj45v3a2k091q8v154wc5pmzamam458wp";
+  };
+
+  preConfigure = ''
+    substituteInPlace CMakeLists.txt --replace "/etc" "$out/etc/xdg"
+  '';
+
+  nativeBuildInputs = [ cmake pkgconfig ];
+  buildInputs = [ libpulseaudio ncurses ];
+
+  meta = with stdenv.lib; {
+    description = "Pulseaudio terminal mixer";
+    homepage    = https://github.com/patroclos/PAmix;
+    license     = licenses.mit;
+    platforms   = platforms.linux;
+    maintainers = with maintainers; [ ericsagnes ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/pamixer/default.nix b/nixpkgs/pkgs/applications/audio/pamixer/default.nix
new file mode 100644
index 000000000000..322a4e238461
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/pamixer/default.nix
@@ -0,0 +1,42 @@
+{ stdenv, fetchFromGitHub, fetchpatch, boost, libpulseaudio }:
+
+stdenv.mkDerivation rec {
+  name = "pamixer-${version}";
+  version = "1.3.1";
+
+  src = fetchFromGitHub {
+    owner = "cdemoulins";
+    repo = "pamixer";
+    rev = version;
+    sha256 = "15zs2x4hnrpxphqn542b6qqm4ymvhkvbcfyffy69d6cki51chzzw";
+  };
+
+  # Remove after https://github.com/cdemoulins/pamixer/pull/16 gets fixed
+  patches = [(fetchpatch {
+    url = "https://github.com/oxij/pamixer/commit/dea1cd967aa837940e5c0b04ef7ebc47a7a93d63.patch";
+    sha256 = "0s77xmsiwywyyp6f4bjxg1sqdgms1k5fiy7na6ws0aswshfnzfjb";
+  })];
+
+  buildInputs = [ boost libpulseaudio ];
+
+  installPhase = ''
+    mkdir -p $out/bin
+    cp pamixer $out/bin
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Pulseaudio command line mixer";
+    longDescription = ''
+      Features:
+        - Get the current volume of the default sink, the default source or a selected one by his id
+        - Set the volume for the default sink, the default source or any other device
+        - List the sinks
+        - List the sources
+        - Increase / Decrease the volume for a device
+        - Mute or unmute a device
+    '';
+    homepage = https://github.com/cdemoulins/pamixer;
+    license = licenses.gpl3;
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/paprefs/default.nix b/nixpkgs/pkgs/applications/audio/paprefs/default.nix
new file mode 100644
index 000000000000..23ba3582ce61
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/paprefs/default.nix
@@ -0,0 +1,30 @@
+{ fetchurl, stdenv, meson, ninja, gettext, pkgconfig, pulseaudioFull, gtkmm3, dbus-glib, wrapGAppsHook }:
+
+stdenv.mkDerivation rec {
+  name = "paprefs-1.0";
+
+  src = fetchurl {
+    url = "https://freedesktop.org/software/pulseaudio/paprefs/${name}.tar.xz";
+    sha256 = "0y77i9gaaassvvjrpwb4xbgqcmr51zmj5rh4z8zm687i5izf84md";
+  };
+
+  nativeBuildInputs = [ meson ninja gettext pkgconfig wrapGAppsHook ];
+
+  buildInputs = [ pulseaudioFull gtkmm3 dbus-glib ];
+
+  meta = with stdenv.lib; {
+    description = "PulseAudio Preferences";
+
+    longDescription = ''
+      PulseAudio Preferences (paprefs) is a simple GTK based configuration
+      dialog for the PulseAudio sound server.
+    '';
+
+    homepage = http://freedesktop.org/software/pulseaudio/paprefs/;
+
+    license = licenses.gpl2Plus;
+
+    maintainers = [ maintainers.abbradar ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/patchage/default.nix b/nixpkgs/pkgs/applications/audio/patchage/default.nix
new file mode 100644
index 000000000000..7f3940e0ae9c
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/patchage/default.nix
@@ -0,0 +1,26 @@
+{ stdenv, alsaLib, boost, dbus-glib, fetchsvn, ganv, glibmm
+, gtkmm2, libjack2, pkgconfig, python2, wafHook
+}:
+
+stdenv.mkDerivation rec {
+  name = "patchage-${version}";
+  version = "1.0.1";
+  src = fetchsvn {
+    url = http://svn.drobilla.net/lad/trunk/patchage/;
+    rev = "5821";
+    sha256 = "1ar64l0sg468qzxj7i6ppgfqjpm92awcp5lzskamrf3ln17lrgj7";
+  };
+
+  buildInputs = [
+    alsaLib boost dbus-glib ganv glibmm gtkmm2 libjack2
+    pkgconfig python2 wafHook
+  ];
+
+  meta = {
+    description = "Modular patch bay for Jack and ALSA systems";
+    homepage = http://non.tuxfamily.org;
+    license = stdenv.lib.licenses.lgpl3;
+    platforms = stdenv.lib.platforms.linux;
+    maintainers = [ stdenv.lib.maintainers.nico202 ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/pavucontrol/default.nix b/nixpkgs/pkgs/applications/audio/pavucontrol/default.nix
new file mode 100644
index 000000000000..06398324491b
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/pavucontrol/default.nix
@@ -0,0 +1,41 @@
+{ fetchurl, stdenv, pkgconfig, intltool, libpulseaudio, gtkmm3
+, libcanberra-gtk3, makeWrapper, gnome3 }:
+
+stdenv.mkDerivation rec {
+  name = "pavucontrol-3.0";
+
+  src = fetchurl {
+    url = "https://freedesktop.org/software/pulseaudio/pavucontrol/${name}.tar.xz";
+    sha256 = "14486c6lmmirkhscbfygz114f6yzf97h35n3h3pdr27w4mdfmlmk";
+  };
+
+  preFixup = ''
+    wrapProgram "$out/bin/pavucontrol" \
+     --set GDK_PIXBUF_MODULE_FILE "$GDK_PIXBUF_MODULE_FILE" \
+     --prefix XDG_DATA_DIRS : "$XDG_ICON_DIRS"
+  '';
+
+  buildInputs = [ libpulseaudio gtkmm3 libcanberra-gtk3 makeWrapper
+                  gnome3.defaultIconTheme ];
+
+  nativeBuildInputs = [ pkgconfig intltool ];
+
+  configureFlags = [ "--disable-lynx" ];
+
+  meta = with stdenv.lib; {
+    description = "PulseAudio Volume Control";
+
+    longDescription = ''
+      PulseAudio Volume Control (pavucontrol) provides a GTK+
+      graphical user interface to connect to a PulseAudio server and
+      easily control the volume of all clients, sinks, etc.
+    '';
+
+    homepage = http://freedesktop.org/software/pulseaudio/pavucontrol/;
+
+    license = stdenv.lib.licenses.gpl2Plus;
+
+    maintainers = with maintainers; [ abbradar jgeerds ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/pd-plugins/cyclone/default.nix b/nixpkgs/pkgs/applications/audio/pd-plugins/cyclone/default.nix
new file mode 100644
index 000000000000..ae43bad5b2c2
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/pd-plugins/cyclone/default.nix
@@ -0,0 +1,33 @@
+{ stdenv, fetchFromGitHub, puredata }:
+
+stdenv.mkDerivation rec {
+  name = "cyclone-${version}";
+  version = "0.3beta-2";
+
+  src = fetchFromGitHub {
+    owner = "porres";
+    repo = "pd-cyclone";
+    rev = "cyclone${version}";
+    sha256 = "192jrq3bdsv626js1ymq10gwp9wwcszjs63ys6ap9ig8xdkbhr3q";
+  };
+
+  buildInputs = [ puredata ];
+
+  makeFlags = [
+    "pdincludepath=${puredata}/include/pd"
+    "prefix=$(out)"
+  ];
+
+  postInstall = ''
+    mv "$out/lib/pd-externals/cyclone" "$out/"
+    rm -rf $out/lib
+  '';
+
+  meta = {
+    description = "A library of PureData classes, bringing some level of compatibility between Max/MSP and Pd environments";
+    homepage = http://puredata.info/downloads/cyclone;
+    license = stdenv.lib.licenses.tcltk;
+    maintainers = [ stdenv.lib.maintainers.magnetophon ];
+    platforms = stdenv.lib.platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/pd-plugins/helmholtz/default.nix b/nixpkgs/pkgs/applications/audio/pd-plugins/helmholtz/default.nix
new file mode 100644
index 000000000000..faa914e13287
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/pd-plugins/helmholtz/default.nix
@@ -0,0 +1,46 @@
+{ stdenv, fetchurl, unzip, puredata }:
+
+stdenv.mkDerivation rec {
+  name = "helmholtz";
+
+  src = fetchurl {
+    url = "https://www.katjaas.nl/helmholtz/helmholtz~.zip";
+    name = "helmholtz.zip";
+    curlOpts = "--user-agent ''";
+    sha256 = "0h1fj7lmvq9j6rmw33rb8k0byxb898bi2xhcwkqalb84avhywgvs";
+  };
+
+  buildInputs = [ unzip puredata ];
+
+  unpackPhase = ''
+    unzip $src
+    mv helmholtz~/src/helmholtz\~.cpp .
+    mv helmholtz~/src/Helmholtz.cpp .
+    mv helmholtz~/src/include/ .
+    mv helmholtz~/src/Makefile .
+    rm -rf helmholtz~/src/
+    rm helmholtz~/helmholtz~.pd_darwin
+    rm helmholtz~/helmholtz~.pd_linux
+    rm helmholtz~/helmholtz~.dll
+    rm -rf __MACOSX
+  '';
+
+  patchPhase = ''
+    mkdir -p $out/helmholtz~
+    sed -i "s@current: pd_darwin@current: pd_linux@g" Makefile
+    sed -i "s@-Wl@@g" Makefile
+    sed -i "s@\$(NAME).pd_linux \.\./\$(NAME).pd_linux@helmholtz~.pd_linux $out/helmholtz~/@g" Makefile
+  '';
+
+  installPhase = ''
+    cp -r helmholtz~/ $out/
+  '';
+
+  meta = {
+    description = "Time domain pitch tracker for Pure Data";
+    homepage = http://www.katjaas.nl/helmholtz/helmholtz.html;
+    license = stdenv.lib.licenses.bsd3;
+    maintainers = [ stdenv.lib.maintainers.magnetophon ];
+    platforms = stdenv.lib.platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/pd-plugins/maxlib/default.nix b/nixpkgs/pkgs/applications/audio/pd-plugins/maxlib/default.nix
new file mode 100644
index 000000000000..0eb75d77c68c
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/pd-plugins/maxlib/default.nix
@@ -0,0 +1,33 @@
+{ stdenv, fetchFromGitHub, puredata }:
+
+stdenv.mkDerivation rec {
+  name = "maxlib-${version}";
+  version = "1.5.7";
+
+  src = fetchFromGitHub {
+    owner = "electrickery";
+    repo = "pd-maxlib";
+    rev = "v${version}";
+    sha256 = "10w9qfgn26lj3zqjksf2r1wsjpf5xy4dx22jay9l6idy9q62mxsn";
+  };
+
+  buildInputs = [ puredata ];
+
+  hardeningDisable = [ "format" ];
+
+  makeFlags = [ "prefix=$(out)" ];
+
+  postInstall = ''
+    mv $out/lib/pd-externals/maxlib/ $out
+    rm -rf $out/local/
+    rm -rf $out/lib/
+  '';
+
+  meta = {
+    description = "A library of non-tilde externals for puredata, by Miller Puckette";
+    homepage = http://puredata.info/downloads/maxlib;
+    license = stdenv.lib.licenses.gpl2;
+    maintainers = [ stdenv.lib.maintainers.magnetophon ];
+    platforms = stdenv.lib.platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/pd-plugins/mrpeach/default.nix b/nixpkgs/pkgs/applications/audio/pd-plugins/mrpeach/default.nix
new file mode 100644
index 000000000000..972a162b73f4
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/pd-plugins/mrpeach/default.nix
@@ -0,0 +1,62 @@
+{ stdenv, fetchurl, puredata }:
+
+stdenv.mkDerivation rec {
+  name = "mrpeach-${version}";
+  version = "1.1";
+
+  # this was to only usable url I could find:
+  # - The main url changes hash: http://pure-data.cvs.sourceforge.net/viewvc/pure-data/externals/mrpeach/?view=tar
+  # - There are lot's of places where this SW is available as part of a big pkg: pd-extended, pd-l2ork
+  # - It's just 211K
+
+  src = fetchurl {
+    url = "http://slackonly.com/pub/korgie/sources/pd_mrpeach-2011.10.21.tar.gz";
+    sha256 = "12jqba3jsdrk20ib9wc2wiivki88ypcd4mkzgsri9siywbbz9w8x";
+  };
+
+  buildInputs = [ puredata ];
+
+  hardeningDisable = [ "format" ];
+
+  patchPhase = ''
+    for D in net osc
+    do
+      sed -i "s@prefix = /usr/local@prefix = $out@g" $D/Makefile
+      for i in ${puredata}/include/pd/*; do
+        ln -s $i $D/
+      done
+    done
+  '';
+
+  buildPhase = ''
+    for D in net osc
+    do
+      cd $D
+      make
+      cd ..
+    done
+  '';
+
+  installPhase = ''
+    for D in net osc
+    do
+      cd $D
+      make install
+      cd ..
+    done
+  '';
+
+  fixupPhase = ''
+    mv $out/lib/pd-externals/net $out
+    mv $out/lib/pd-externals/osc $out
+    rm -rf $out/lib
+  '';
+
+  meta = {
+    description = "A collection of Pd objectclasses for OSC-messages";
+    homepage = http://puredata.info/downloads/osc;
+    license = stdenv.lib.licenses.gpl2;
+    maintainers = [ stdenv.lib.maintainers.magnetophon ];
+    platforms = stdenv.lib.platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/pd-plugins/puremapping/default.nix b/nixpkgs/pkgs/applications/audio/pd-plugins/puremapping/default.nix
new file mode 100644
index 000000000000..37d692a3ab5a
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/pd-plugins/puremapping/default.nix
@@ -0,0 +1,31 @@
+{ stdenv, fetchurl, unzip, puredata }:
+
+stdenv.mkDerivation rec {
+  name = "puremapping-${version}";
+  version = "20160130";
+
+  src = fetchurl {
+    url = "https://www.chnry.net/data/puremapping-${version}-generic.zip";
+    name = "puremapping";
+    sha256 = "1h7qgqd8srrxw2y1rkdw5js4k6f5vc8x6nlm2mq9mq9vjck7n1j7";
+  };
+
+  buildInputs = [ unzip puredata ];
+
+  unpackPhase = ''
+    unzip $src
+  '';
+
+  installPhase = ''
+    mkdir -p $out/puremapping
+    mv puremapping/ $out
+  '';
+
+  meta = {
+    description = "Set of externals to facilitate the use of sensors within Pure Data and to create complex relations between input and output of a dynamic system";
+    homepage = http://www.chnry.net/ch/?090-Pure-Mapping&lang=en;
+    license = stdenv.lib.licenses.gpl1;
+    maintainers = [ stdenv.lib.maintainers.magnetophon ];
+    platforms = stdenv.lib.platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/pd-plugins/timbreid/default.nix b/nixpkgs/pkgs/applications/audio/pd-plugins/timbreid/default.nix
new file mode 100644
index 000000000000..f2e54b327fce
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/pd-plugins/timbreid/default.nix
@@ -0,0 +1,45 @@
+{ stdenv, fetchurl, unzip, puredata, fftw }:
+
+stdenv.mkDerivation rec {
+  version = "0.7.0";
+  name = "timbreid-${version}";
+
+  src = fetchurl {
+    url = "http://williambrent.conflations.com/pd/timbreID-${version}-src.zip";
+    sha256 = "14k2xk5zrzrw1zprdbwx45hrlc7ck8vq4drpd3l455i5r8yk4y6b";
+  };
+
+  buildInputs = [ unzip puredata fftw ];
+
+  unpackPhase = ''
+    mkdir source
+    cd source
+    unzip $src
+  '';
+
+  buildPhase = ''
+    make tIDLib.o all
+ '';
+
+  installPhase = ''
+    mkdir -p $out/
+    cp -r *.pd $out/
+    cp -r *.pd_linux $out/
+    cp -r audio/ $out/
+    cp -r data/ $out/
+    cp -r doc/ $out/
+  '';
+
+  postFixup = ''
+    mv $out/share/doc/ $out/
+    rm -rf $out/share/
+    '';
+
+  meta = {
+    description = "A collection of audio feature analysis externals for puredata";
+    homepage = http://williambrent.conflations.com/pages/research.html;
+    license = stdenv.lib.licenses.gpl3;
+    maintainers = [ stdenv.lib.maintainers.magnetophon ];
+    platforms = stdenv.lib.platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/pd-plugins/zexy/default.nix b/nixpkgs/pkgs/applications/audio/pd-plugins/zexy/default.nix
new file mode 100644
index 000000000000..d56462ccc844
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/pd-plugins/zexy/default.nix
@@ -0,0 +1,36 @@
+{ stdenv, fetchurl, autoconf, automake, puredata }:
+
+stdenv.mkDerivation rec {
+  name = "zexy-${version}";
+  version = "2.2.4";
+
+  src = fetchurl {
+    url = "https://puredata.info/downloads/zexy/releases/${version}/${name}.tar.gz";
+    sha256 = "1xpgl82c2lc6zfswjsa7z10yhv5jb7a4znzh3nc7ffrzm1z8vylp";
+  };
+
+  buildInputs = [ autoconf automake puredata ];
+
+  preBuild = ''
+    export LD=$CXX
+    cd src/
+    for i in ${puredata}/include/pd/*; do
+      ln -s $i .
+    done
+    ./bootstrap.sh
+    ./configure --enable-lpt=no --prefix=$out
+  '';
+
+  postInstall = ''
+    mv $out/lib/pd/extra/zexy $out
+    rm -rf $out/lib
+  '';
+
+  meta = {
+    description = "The swiss army knife for puredata";
+    homepage = http://puredata.info/downloads/zexy;
+    license = stdenv.lib.licenses.gpl2;
+    maintainers = [ stdenv.lib.maintainers.magnetophon ];
+    platforms = stdenv.lib.platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/petrifoo/default.nix b/nixpkgs/pkgs/applications/audio/petrifoo/default.nix
new file mode 100644
index 000000000000..d86e5aae2cd4
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/petrifoo/default.nix
@@ -0,0 +1,27 @@
+{ stdenv, fetchurl, alsaLib, cmake, gtk2, libjack2, libgnomecanvas
+, libpthreadstubs, libsamplerate, libsndfile, libtool, libxml2
+, pkgconfig, openssl }:
+
+stdenv.mkDerivation  rec {
+  name = "petri-foo-${version}";
+  version = "0.1.87";
+
+  src = fetchurl {
+    url =  "mirror://sourceforge/petri-foo/${name}.tar.bz2";
+    sha256 = "0b25iicgn8c42487fdw32ycfrll1pm2zjgy5djvgw6mfcaa4gizh";
+  };
+
+  buildInputs =
+   [ alsaLib cmake gtk2 libjack2 libgnomecanvas libpthreadstubs
+     libsamplerate libsndfile libtool libxml2 pkgconfig openssl
+   ];
+
+  meta = with stdenv.lib; {
+    description = "MIDI controllable audio sampler";
+    longDescription = "a fork of Specimen";
+    homepage = http://petri-foo.sourceforge.net;
+    license = licenses.gpl2Plus;
+    platforms = platforms.linux;
+    maintainers = [ maintainers.goibhniu ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/pianobar/default.nix b/nixpkgs/pkgs/applications/audio/pianobar/default.nix
new file mode 100644
index 000000000000..60cd2567f625
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/pianobar/default.nix
@@ -0,0 +1,27 @@
+{ fetchurl, stdenv, pkgconfig, libao, json_c, libgcrypt, ffmpeg, curl }:
+
+stdenv.mkDerivation rec {
+  name = "pianobar-2018.06.22";
+
+  src = fetchurl {
+    url = "http://6xq.net/projects/pianobar/${name}.tar.bz2";
+    sha256 = "1hnlif62vsxgh8j9mcibxwj4gybpgqc11ba729kflpvvi9qmfqwl";
+  };
+
+  nativeBuildInputs = [ pkgconfig ];
+  buildInputs = [
+    libao json_c libgcrypt ffmpeg curl
+  ];
+
+  makeFlags="PREFIX=$(out)";
+
+  CC = "gcc";
+  CFLAGS = "-std=c99";
+
+  meta = with stdenv.lib; {
+    description = "A console front-end for Pandora.com";
+    homepage = http://6xq.net/projects/pianobar/;
+    platforms = platforms.linux;
+    license = licenses.mit; # expat version
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/pianobooster/default.nix b/nixpkgs/pkgs/applications/audio/pianobooster/default.nix
new file mode 100644
index 000000000000..53afcdd2306a
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/pianobooster/default.nix
@@ -0,0 +1,34 @@
+{ stdenv, fetchurl, alsaLib, cmake, libGLU_combined, makeWrapper, qt4 }:
+
+stdenv.mkDerivation  rec {
+  name = "pianobooster-${version}";
+  version = "0.6.4b";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/pianobooster/pianobooster-src-0.6.4b.tar.gz";
+    sha256 = "1xwyap0288xcl0ihjv52vv4ijsjl0yq67scc509aia4plmlm6l35";
+  };
+
+  patches = [
+    ./pianobooster-0.6.4b-cmake.patch
+    ./pianobooster-0.6.4b-cmake-gcc4.7.patch
+  ];
+
+  preConfigure = "cd src";
+
+  buildInputs = [ alsaLib cmake makeWrapper libGLU_combined qt4 ];
+  NIX_LDFLAGS = [ "-lGL" "-lpthread" ];
+
+  postInstall = ''
+    wrapProgram $out/bin/pianobooster \
+      --prefix LD_LIBRARY_PATH : ${libGLU_combined}/lib
+  '';
+
+  meta = with stdenv.lib; {
+    description = "A MIDI file player that teaches you how to play the piano";
+    homepage = http://pianobooster.sourceforge.net;
+    license = licenses.gpl3;
+    platforms = platforms.linux;
+    maintainers = [ maintainers.goibhniu ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/pianobooster/pianobooster-0.6.4b-cmake-gcc4.7.patch b/nixpkgs/pkgs/applications/audio/pianobooster/pianobooster-0.6.4b-cmake-gcc4.7.patch
new file mode 100644
index 000000000000..2b1b28c5a849
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/pianobooster/pianobooster-0.6.4b-cmake-gcc4.7.patch
@@ -0,0 +1,11 @@
+--- pianobooster-src-0.6.4b/src/CMakeLists.txt.orig	2013-04-06 10:48:02.469532914 -0700
++++ pianobooster-src-0.6.4b/src/CMakeLists.txt	2013-04-06 10:48:12.989532445 -0700
+@@ -203,8 +203,6 @@
+         ${PIANOBOOSTER_UI_HDRS} )

+ ENDIF(WIN32)

+ 

+-SET_TARGET_PROPERTIES(pianobooster PROPERTIES LINK_FLAGS "-mwindows")

+-

+ IF (USE_PCH)

+ ADD_PRECOMPILED_HEADER( pianobooster ${CMAKE_CURRENT_SOURCE_DIR}/precompile/precompile.h )

+ ENDIF (USE_PCH)

diff --git a/nixpkgs/pkgs/applications/audio/pianobooster/pianobooster-0.6.4b-cmake.patch b/nixpkgs/pkgs/applications/audio/pianobooster/pianobooster-0.6.4b-cmake.patch
new file mode 100644
index 000000000000..8cdd8738e2b3
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/pianobooster/pianobooster-0.6.4b-cmake.patch
@@ -0,0 +1,44 @@
+--- pianobooster-src-0.6.4b/src/CMakeLists.txt.orig
++++ pianobooster-src-0.6.4b/src/CMakeLists.txt
+@@ -2,12 +2,6 @@
+ # for the debug build type cmake -DCMAKE_BUILD_TYPE=Debug

+ SET(CMAKE_BUILD_TYPE Release)

+ SET(CMAKE_VERBOSE_MAKEFILE OFF)

+-SET(USE_FLUIDSYNTH OFF)

+-

+-# The inplace directory is mainly for windows builds

+-# SET(FLUIDSYNTH_INPLACE_DIR C:/download/misc/ljb/fluidsynth-1.0.9)

+-SET(FLUIDSYNTH_INPLACE_DIR /home/louis/build/fluidsynth-1.0.9)

+-

+ 

+ # Testing precompiled headers  it does not work -- leave as OFF.

+ SET(USE_PCH OFF)

+@@ -78,18 +72,7 @@
+     ADD_DEFINITIONS(-DPB_USE_FLUIDSYNTH)

+     MESSAGE("Building using fluidsynth")

+     SET( PB_BASE_SRCS MidiDeviceFluidSynth.cpp )

+-

+-    IF(FLUIDSYNTH_INPLACE_DIR)

+-        INCLUDE_DIRECTORIES(${FLUIDSYNTH_INPLACE_DIR}/include/)

+-        IF(WIN32)

+-            LINK_LIBRARIES( ${FLUIDSYNTH_INPLACE_DIR}/src/.libs/libfluidsynth.dll.a)

+-        ENDIF(WIN32)

+-        IF(UNIX)

+-            LINK_LIBRARIES(${FLUIDSYNTH_INPLACE_DIR}/src/.libs/libfluidsynth.so)

+-        ENDIF(UNIX)

+-    ELSEIF(FLUIDSYNTH_INPLACE_DIR)

+-        LINK_LIBRARIES( fluidsynth)

+-    ENDIF(FLUIDSYNTH_INPLACE_DIR)

++	LINK_LIBRARIES(fluidsynth)

+ ENDIF(USE_FLUIDSYNTH)

+ 

+ 

+@@ -214,8 +197,6 @@
+ INSTALL(TARGETS pianobooster RUNTIME DESTINATION bin)

+ #INSTALL( index.docbook INSTALL_DESTINATION ${HTML_INSTALL_DIR}/en  SUBDIR kmidimon )

+ 

+-INSTALL( FILES ../README.txt  DESTINATION share/doc/pianobooster )

+-

+ INSTALL ( FILES images/pianobooster.png DESTINATION share/pixmaps )

+ 

+ 

diff --git a/nixpkgs/pkgs/applications/audio/picard/default.nix b/nixpkgs/pkgs/applications/audio/picard/default.nix
new file mode 100644
index 000000000000..915b7d0cbb50
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/picard/default.nix
@@ -0,0 +1,41 @@
+{ stdenv, python3Packages, fetchFromGitHub, gettext, chromaprint }:
+
+let
+  pythonPackages = python3Packages;
+in pythonPackages.buildPythonApplication rec {
+  pname = "picard";
+  version = "2.1.2";
+
+  src = fetchFromGitHub {
+    owner = "metabrainz";
+    repo = pname;
+    rev = "release-${version}";
+    sha256 = "1p2bvfzby0nk1vh04yfmsvjcldgkj6m6s1hcv9v13hc8q1cbdfk5";
+  };
+
+  buildInputs = [ gettext ];
+
+  propagatedBuildInputs = with pythonPackages; [
+    pyqt5
+    mutagen
+    chromaprint
+    discid
+  ];
+
+  installPhase = ''
+    python setup.py install --prefix="$out"
+  '';
+
+  prePatch = ''
+    # Pesky unicode punctuation.
+    substituteInPlace setup.cfg --replace "‘" "'"
+  '';
+
+  meta = with stdenv.lib; {
+    homepage = http://musicbrainz.org/doc/MusicBrainz_Picard;
+    description = "The official MusicBrainz tagger";
+    maintainers = with maintainers; [ ehmry ];
+    license = licenses.gpl2;
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/pithos/default.nix b/nixpkgs/pkgs/applications/audio/pithos/default.nix
new file mode 100644
index 000000000000..c7bb1a4193f9
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/pithos/default.nix
@@ -0,0 +1,40 @@
+{ fetchFromGitHub, stdenv, pythonPackages, gtk3, gobject-introspection, libnotify
+, gst_all_1, wrapGAppsHook }:
+
+pythonPackages.buildPythonApplication rec {
+  pname = "pithos";
+  version = "1.1.2";
+
+  src = fetchFromGitHub {
+    owner = pname;
+    repo  = pname;
+    rev = version;
+    sha256 = "0zk9clfawsnwmgjbk7y5d526ksxd1pkh09ln6sb06v4ygaiifcxp";
+  };
+
+  # No tests in repo
+  doCheck = false;
+
+  postPatch = ''
+    substituteInPlace setup.py --replace "/usr/share" "$out/share"
+  '';
+
+  postInstall = ''
+    mkdir -p $out/share/applications
+    cp -v data/pithos.desktop $out/share/applications
+  '';
+
+  buildInputs = [ wrapGAppsHook ];
+
+  propagatedBuildInputs =
+    [ gtk3 gobject-introspection libnotify ] ++
+    (with gst_all_1; [ gstreamer gst-plugins-base gst-plugins-good gst-plugins-ugly gst-plugins-bad ]) ++
+    (with pythonPackages; [ pygobject3 pylast ]);
+
+  meta = with stdenv.lib; {
+    description = "Pandora Internet Radio player for GNOME";
+    homepage = https://pithos.github.io/;
+    license = licenses.gpl3;
+    maintainers = with maintainers; [ obadz jgeerds ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/playbar2/default.nix b/nixpkgs/pkgs/applications/audio/playbar2/default.nix
new file mode 100644
index 000000000000..16d5eb69cb97
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/playbar2/default.nix
@@ -0,0 +1,37 @@
+{ stdenv
+, cmake
+, extra-cmake-modules
+, plasma-framework
+, kwindowsystem
+, fetchFromGitHub
+}:
+
+stdenv.mkDerivation rec {
+  name = "playbar2-${version}";
+  version = "2.5";
+
+  src = fetchFromGitHub {
+    owner = "audoban";
+    repo = "PlayBar2";
+    rev = "v${version}";
+    sha256 = "0iv2m4flgaz2r0k7f6l0ca8p6cw8j8j2gin1gci2pg3l5g5khbch";
+  };
+
+  nativeBuildInputs = [
+    cmake
+    extra-cmake-modules
+  ];
+
+  buildInputs = [
+    plasma-framework
+    kwindowsystem
+  ];
+
+  meta = with stdenv.lib; {
+    description = "Mpris2 Client for Plasma5";
+    homepage = https://github.com/audoban/PlayBar2;
+    license = licenses.gpl3;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ pjones ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/plugin-torture/default.nix b/nixpkgs/pkgs/applications/audio/plugin-torture/default.nix
new file mode 100644
index 000000000000..5529998803cf
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/plugin-torture/default.nix
@@ -0,0 +1,30 @@
+{ stdenv, fetchFromGitHub, boost, ladspaH, lilv, lv2, pkgconfig, serd, sord, sratom }:
+
+stdenv.mkDerivation rec {
+  name = "plugin-torture-${version}";
+  version = "2016-07-25";
+
+  src = fetchFromGitHub {
+    owner = "cth103";
+    repo = "plugin-torture";
+    rev = "8b9c43197dca372da6b9c8212224ec86b5f16b4a";
+    sha256 = "1xyhvhm85d9z0kw716cjllrrzksn4s4bw34layg8hf4m5m31sp2p";
+  };
+
+  nativeBuildInputs = [ pkgconfig ];
+  buildInputs = [ boost ladspaH lilv lv2 serd sord sratom ];
+
+  installPhase = ''
+    mkdir -p $out/bin
+    cp plugin-torture $out/bin/
+    cp find-safe-plugins $out/bin/
+  '';
+
+  meta = with stdenv.lib; {
+    homepage = https://github.com/cth103/plugin-torture;
+    description = "A tool to test LADSPA and LV2 plugins";
+    license = licenses.gpl2;
+    maintainers = [ maintainers.magnetophon ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/pmidi/default.nix b/nixpkgs/pkgs/applications/audio/pmidi/default.nix
new file mode 100644
index 000000000000..9f51d3008259
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/pmidi/default.nix
@@ -0,0 +1,21 @@
+{ stdenv, fetchurl, alsaLib
+, version ? "1.7.1"
+, sourceSha256 ? "051mv6f13c8y13c1iv3279k1hhzpz4fm9sfczhgp9sim2bjdj055"
+}:
+stdenv.mkDerivation {
+  name = "pmidi-${version}";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/pmidi/${version}/pmidi-${version}.tar.gz";
+    sha256 = sourceSha256;
+  };
+
+  buildInputs = [ alsaLib ];
+
+  meta = with stdenv.lib; {
+    homepage = http://www.parabola.me.uk/alsa/pmidi.html;
+    description = "A straightforward command line program to play midi files through the ALSA sequencer";
+    maintainers = with maintainers; [ lheckemann ];
+    license = licenses.gpl2;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/ponymix/default.nix b/nixpkgs/pkgs/applications/audio/ponymix/default.nix
new file mode 100644
index 000000000000..5cfbb7bf5a48
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/ponymix/default.nix
@@ -0,0 +1,26 @@
+{ stdenv, fetchFromGitHub, libpulseaudio, libnotify, pkgconfig }:
+
+stdenv.mkDerivation rec {
+  name = "ponymix-${version}";
+  version = "5";
+
+  src = fetchFromGitHub {
+    owner  = "falconindy";
+    repo   = "ponymix";
+    rev    = version;
+    sha256 = "08yp7fprmzm6px5yx2rvzri0l60bra5h59l26pn0k071a37ks1rb";
+  };
+
+  buildInputs = [ libpulseaudio libnotify ];
+  nativeBuildInputs = [ pkgconfig ];
+
+  postPatch = ''substituteInPlace Makefile --replace "\$(DESTDIR)/usr" "$out"'';
+
+  meta = with stdenv.lib; {
+    description = "CLI PulseAudio Volume Control";
+    homepage = https://github.com/falconindy/ponymix;
+    license = licenses.mit;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ ericsagnes ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/praat/default.nix b/nixpkgs/pkgs/applications/audio/praat/default.nix
new file mode 100644
index 000000000000..5db5035c8352
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/praat/default.nix
@@ -0,0 +1,30 @@
+{ stdenv, fetchurl, alsaLib, gtk2, pkgconfig }:
+
+stdenv.mkDerivation rec {
+  name = "praat-${version}";
+  version = "6.0.43";
+
+  src = fetchurl {
+    url = "https://github.com/praat/praat/archive/v${version}.tar.gz";
+    sha256 = "1l13bvnl7sv8v6s5z63201bhzavnj6bnqcj446akippsam13z4sf";
+  };
+
+  configurePhase = ''
+    cp makefiles/makefile.defs.linux.alsa makefile.defs
+  '';
+
+  installPhase = ''
+    mkdir -p $out/bin
+    cp praat $out/bin
+  '';
+
+  nativeBuildInputs = [ pkgconfig ];
+  buildInputs = [ alsaLib gtk2 ];
+
+  meta = {
+    description = "Doing phonetics by computer";
+    homepage = http://www.fon.hum.uva.nl/praat/;
+    license = stdenv.lib.licenses.gpl2Plus; # Has some 3rd-party code in it though
+    platforms = stdenv.lib.platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/projectm/default.nix b/nixpkgs/pkgs/applications/audio/projectm/default.nix
new file mode 100644
index 000000000000..e7aace763a1b
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/projectm/default.nix
@@ -0,0 +1,57 @@
+{ stdenv, fetchurl, fetchpatch, pkgconfig, cmake
+, glew, ftgl, ttf_bitstream_vera
+, withQt ? true, qt4
+, withLibvisual ? false, libvisual, SDL
+, withJack ? false, libjack2
+, withPulseAudio ? true, libpulseaudio
+}:
+
+assert withJack       -> withQt;
+assert withPulseAudio -> withQt;
+
+stdenv.mkDerivation {
+  name = "projectm-2.1.0";
+
+  meta = {
+    description = "Music Visualizer";
+    homepage = http://projectm.sourceforge.net/;
+    license = stdenv.lib.licenses.lgpl21Plus;
+    platforms = stdenv.lib.platforms.linux;
+  };
+
+  src = fetchurl {
+    url = "mirror://sourceforge/projectm/2.1.0/projectM-complete-2.1.0-Source.tar.gz";
+    sha256 = "1vh6jk68a0jdb6qwppb6f8cbgmhnv2ba3bcavzfd6sq06gq08cji";
+  };
+
+  patch_gcc6 = fetchpatch {
+    url = https://raw.githubusercontent.com/gentoo/gentoo/45abd63abc6644b6e177c057b5b42d894dbf8e29/media-libs/libprojectm/files/libprojectm-2.1.0-fix-c++14.patch;
+    sha256 = "1i50scxv1jlqvb3jm3sql89a7wqckxhlpvnhz20vvmm1kii6lrsn";
+  };
+
+  patchPhase = ''
+    patch -d src/libprojectM -p1 -i "$patch_gcc6"
+    sed -i 's:''${LIBVISUAL_PLUGINSDIR}:''${CMAKE_INSTALL_PREFIX}/lib/libvisual-0.4:' \
+      src/projectM-libvisual/CMakeLists.txt
+  '';
+
+  nativeBuildInputs = [ pkgconfig cmake ];
+
+  cmakeFlags = ''
+    -DprojectM_FONT_MENU=${ttf_bitstream_vera}/share/fonts/truetype/VeraMono.ttf
+    -DprojectM_FONT_TITLE=${ttf_bitstream_vera}/share/fonts/truetype/Vera.ttf
+    -DINCLUDE-PROJECTM-TEST=OFF
+    -DINCLUDE-PROJECTM-QT=${if withQt then "ON" else "OFF"}
+    -DINCLUDE-PROJECTM-LIBVISUAL=${if withLibvisual then "ON" else "OFF"}
+    -DINCLUDE-PROJECTM-JACK=${if withJack then "ON" else "OFF"}
+    -DINCLUDE-PROJECTM-PULSEAUDIO=${if withPulseAudio then "ON" else "OFF"}
+  '';
+
+  buildInputs = with stdenv.lib;
+    [ glew ftgl ]
+    ++ optional withQt qt4
+    ++ optionals withLibvisual [ libvisual SDL ]
+    ++ optional withJack libjack2
+    ++ optional withPulseAudio libpulseaudio
+    ;
+}
diff --git a/nixpkgs/pkgs/applications/audio/puddletag/default.nix b/nixpkgs/pkgs/applications/audio/puddletag/default.nix
new file mode 100644
index 000000000000..915d7fcbd98b
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/puddletag/default.nix
@@ -0,0 +1,37 @@
+{ stdenv, fetchFromGitHub, python2Packages, chromaprint }:
+
+python2Packages.buildPythonApplication rec {
+  pname = "puddletag";
+  version = "1.2.0";
+
+  src = fetchFromGitHub {
+    owner  = "keithgg";
+    repo   = "puddletag";
+    rev    = "v${version}";
+    sha256 = "1g6wa91awy17z5b704yi9kfynnvfm9lkrvpfvwccscr1h8s3qmiz";
+  };
+
+  setSourceRoot = ''
+    sourceRoot=$(echo */source)
+  '';
+
+  disabled = python2Packages.isPy3k; # work to support python 3 has not begun
+
+  propagatedBuildInputs = [ chromaprint ] ++ (with python2Packages; [
+    configobj
+    mutagen
+    pyparsing
+    pyqt4
+  ]);
+
+  doCheck = false;   # there are no tests
+  dontStrip = true;  # we are not generating any binaries
+
+  meta = with stdenv.lib; {
+    homepage    = https://puddletag.net;
+    description = "An audio tag editor similar to the Windows program, Mp3tag";
+    license     = licenses.gpl3;
+    maintainers = with maintainers; [ peterhoeg ];
+    platforms   = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/pulseaudio-ctl/default.nix b/nixpkgs/pkgs/applications/audio/pulseaudio-ctl/default.nix
new file mode 100644
index 000000000000..1ad57efda7a0
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/pulseaudio-ctl/default.nix
@@ -0,0 +1,41 @@
+{ stdenv, fetchFromGitHub, makeWrapper
+, bc, dbus, gawk, gnused, libnotify, pulseaudio }:
+
+let
+  path = stdenv.lib.makeBinPath [ bc dbus gawk gnused libnotify pulseaudio ];
+  pname = "pulseaudio-ctl";
+
+in stdenv.mkDerivation rec {
+  name = "${pname}-${version}";
+  version = "1.66";
+
+  src = fetchFromGitHub {
+    owner = "graysky2";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "19a24w7y19551ar41q848w7r1imqkl9cpff4dpb7yry7qp1yjg0y";
+  };
+
+  postPatch = ''
+    substituteInPlace Makefile \
+      --replace /usr $out
+
+    substituteInPlace common/${pname}.in \
+      --replace '$0' ${pname}
+  '';
+
+  nativeBuildInputs = [ makeWrapper ];
+
+  postFixup = ''
+    wrapProgram $out/bin/${pname} \
+      --prefix PATH : ${path}
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Control pulseaudio volume from the shell or mapped to keyboard shortcuts. No need for alsa-utils.";
+    homepage = https://bbs.archlinux.org/viewtopic.php?id=124513;
+    license = licenses.mit;
+    maintainers = with maintainers; [ peterhoeg ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/pulseaudio-dlna/default.nix b/nixpkgs/pkgs/applications/audio/pulseaudio-dlna/default.nix
new file mode 100644
index 000000000000..72af8aff106b
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/pulseaudio-dlna/default.nix
@@ -0,0 +1,50 @@
+{ fetchFromGitHub, stdenv, pythonPackages
+, mp3Support ? true, lame ? null
+, opusSupport ? true, opusTools ? null
+, faacSupport ? false, faac ? null
+, flacSupport ? true, flac ? null
+, soxSupport ? true, sox ? null
+, vorbisSupport ? true, vorbisTools ? null 
+}:
+
+assert mp3Support -> lame != null;
+assert opusSupport -> opusTools != null;
+assert faacSupport -> faac != null;
+assert flacSupport -> flac != null;
+assert soxSupport -> sox != null;
+assert vorbisSupport -> vorbisTools != null;
+
+pythonPackages.buildPythonApplication rec {
+  pname = "pulseaudio-dlna";
+  version = "2017-11-01";
+
+  src = fetchFromGitHub {
+    owner = "masmu";
+    repo = "pulseaudio-dlna";
+    rev = "4472928dd23f274193f14289f59daec411023ab0";
+    sha256 = "1dfn7036vrq49kxv4an7rayypnm5dlawsf02pfsldw877hzdamqk";
+  };
+  
+  # pulseaudio-dlna has no tests
+  doCheck = false;
+
+  propagatedBuildInputs = with pythonPackages; [
+    dbus-python docopt requests setproctitle protobuf psutil futures
+    chardet notify2 netifaces pyroute2 pygobject2 lxml zeroconf ]
+    ++ stdenv.lib.optional mp3Support lame
+    ++ stdenv.lib.optional opusSupport opusTools
+    ++ stdenv.lib.optional faacSupport faac
+    ++ stdenv.lib.optional flacSupport flac
+    ++ stdenv.lib.optional soxSupport sox
+    ++ stdenv.lib.optional vorbisSupport vorbisTools;
+
+  meta = with stdenv.lib; {
+    description = "A lightweight streaming server which brings DLNA / UPNP and Chromecast support to PulseAudio and Linux";
+    homepage = https://github.com/masmu/pulseaudio-dlna;
+
+    license = licenses.gpl3Plus;
+
+    maintainers = with maintainers; [ mog ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/pulseaudio-modules-bt/default.nix b/nixpkgs/pkgs/applications/audio/pulseaudio-modules-bt/default.nix
new file mode 100644
index 000000000000..950b32a82013
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/pulseaudio-modules-bt/default.nix
@@ -0,0 +1,82 @@
+{ stdenv
+, runCommand
+, fetchFromGitHub
+, pulseaudio
+, pkgconfig
+, ffmpeg_4
+, patchelf
+, fdk_aac
+, libtool
+, cmake
+, bluez
+, dbus
+, sbc
+, lib
+}:
+
+let
+  pulseSources = runCommand "pulseaudio-sources" {} ''
+    mkdir $out
+    tar -xf ${pulseaudio.src}
+    mv pulseaudio*/* $out/
+  '';
+
+in stdenv.mkDerivation rec {
+  name = "pulseaudio-modules-bt-${version}";
+  version = "unstable-2019-01-05";
+
+  src = fetchFromGitHub {
+    owner = "EHfive";
+    repo = "pulseaudio-modules-bt";
+    rev = "4b0cde160c96f40d860fef267a6ded49ae045be0";
+    sha256 = "15jw5nf2dhqqdwzyh2x5kdkrq7f3qn140gw6gmspcai9kplhk24w";
+    fetchSubmodules = true;
+  };
+
+  patches = [
+    ./fix-install-path.patch
+  ];
+
+  nativeBuildInputs = [
+    pkgconfig
+    patchelf
+    cmake
+  ];
+
+  buildInputs = [
+    pulseaudio
+    ffmpeg_4
+    fdk_aac
+    libtool
+    bluez
+    dbus
+    sbc
+  ];
+
+  postPatch = ''
+    # Upstream bundles pulseaudio as a submodule
+    rm -r pa
+    ln -s ${pulseSources} pa
+
+    # Pulseaudio version is detected with a -rebootstrapped suffix which build system assumptions
+    substituteInPlace config.h.in --replace PulseAudio_VERSION ${pulseaudio.version}
+    substituteInPlace CMakeLists.txt --replace '${"\${PulseAudio_VERSION}"}' ${pulseaudio.version}
+  '';
+
+  postFixup = ''
+    for so in $out/lib/pulse-${pulseaudio.version}/modules/*.so; do
+      orig_rpath=$(patchelf --print-rpath "$so")
+      patchelf \
+        --set-rpath "${lib.getLib ffmpeg_4}/lib:$out/lib/pulse-${pulseaudio.version}/modules:$orig_rpath" \
+        "$so"
+    done
+  '';
+
+  meta = with stdenv.lib; {
+    homepage = https://github.com/EHfive/pulseaudio-modules-bt;
+    description = "LDAC, aptX, aptX HD, AAC codecs (A2DP Audio) support for Linux PulseAudio";
+    platforms = platforms.linux;
+    license = licenses.mit;
+    maintainers = with maintainers; [ adisbladis ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/pulseaudio-modules-bt/fix-install-path.patch b/nixpkgs/pkgs/applications/audio/pulseaudio-modules-bt/fix-install-path.patch
new file mode 100644
index 000000000000..e500d1fb1333
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/pulseaudio-modules-bt/fix-install-path.patch
@@ -0,0 +1,20 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index d869979..185144d 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -143,13 +143,13 @@ INSTALL(TARGETS
+         module-bluez5-device
+         module-bluetooth-discover
+         module-bluetooth-policy
+-        LIBRARY DESTINATION ${PulseAudio_modlibexecdir})
++        LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/pulse-${PulseAudio_VERSION}/modules/)
+ 
+ if(NOT ${HAVE_SYSTEM_LDAC})
+ 
+ INSTALL(TARGETS
+         ldacBT_enc
+         ldacBT_abr
+-        LIBRARY DESTINATION ${PulseAudio_modlibexecdir})
++        LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/pulse-${PulseAudio_VERSION}/modules/)
+ 
+ endif()
diff --git a/nixpkgs/pkgs/applications/audio/pulseeffects/default.nix b/nixpkgs/pkgs/applications/audio/pulseeffects/default.nix
new file mode 100644
index 000000000000..736f5c9f6744
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/pulseeffects/default.nix
@@ -0,0 +1,111 @@
+{ stdenv
+, fetchFromGitHub
+, meson
+, ninja
+, pkgconfig
+, itstool
+, python3
+, libxml2
+, desktop-file-utils
+, wrapGAppsHook
+, gst_all_1
+, pulseaudio
+, gtk3
+, glib
+, glibmm
+, gtkmm3
+, lilv
+, lv2
+, serd
+, sord
+, sratom
+, libbs2b
+, libsamplerate
+, libsndfile
+, libebur128
+, boost
+, dbus
+, fftwFloat
+, calf
+, zita-convolver
+, zam-plugins
+, rubberband
+, mda_lv2
+, lsp-plugins
+, hicolor-icon-theme
+}:
+
+let
+  lv2Plugins = [
+    calf # limiter, compressor exciter, bass enhancer and others
+    mda_lv2 # loudness
+    lsp-plugins # delay
+  ];
+  ladspaPlugins = [
+    rubberband # pitch shifting
+    zam-plugins # maximizer
+  ];
+in stdenv.mkDerivation rec {
+  pname = "pulseeffects";
+  version = "4.4.7";
+
+  src = fetchFromGitHub {
+    owner = "wwmm";
+    repo = "pulseeffects";
+    rev = "v${version}";
+    sha256 = "14sxwy3mayzn9k5hy58mjzhxaj4wqxvs257xaj03mwvm48k7c7ia";
+  };
+
+  nativeBuildInputs = [
+    meson
+    ninja
+    pkgconfig
+    libxml2
+    itstool
+    python3
+    desktop-file-utils
+    wrapGAppsHook
+  ];
+
+  buildInputs = [
+    pulseaudio
+    glib
+    glibmm
+    gtk3
+    gtkmm3
+    gst_all_1.gstreamer
+    gst_all_1.gst-plugins-base
+    gst_all_1.gst-plugins-good
+    gst_all_1.gst-plugins-bad
+    lilv lv2 serd sord sratom
+    libbs2b
+    libebur128
+    libsamplerate
+    libsndfile
+    boost
+    dbus
+    fftwFloat
+    zita-convolver
+    hicolor-icon-theme
+  ];
+
+  postPatch = ''
+    chmod +x meson_post_install.py
+    patchShebangs meson_post_install.py
+  '';
+
+  preFixup = ''
+    gappsWrapperArgs+=(
+      --set LV2_PATH "${stdenv.lib.makeSearchPath "lib/lv2" lv2Plugins}"
+      --set LADSPA_PATH "${stdenv.lib.makeSearchPath "lib/ladspa" ladspaPlugins}"
+    )
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Limiter, compressor, reverberation, equalizer and auto volume effects for Pulseaudio applications";
+    homepage = https://github.com/wwmm/pulseeffects;
+    license = licenses.gpl3;
+    maintainers = with maintainers; [ jtojnar ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/puredata/default.nix b/nixpkgs/pkgs/applications/audio/puredata/default.nix
new file mode 100644
index 000000000000..6ade9042b532
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/puredata/default.nix
@@ -0,0 +1,38 @@
+{ stdenv, fetchurl, autoreconfHook, gettext, makeWrapper
+, alsaLib, libjack2, tk, fftw
+}:
+
+stdenv.mkDerivation  rec {
+  name = "puredata-${version}";
+  version = "0.49-0";
+
+  src = fetchurl {
+    url = "http://msp.ucsd.edu/Software/pd-${version}.src.tar.gz";
+    sha256 = "18rzqbpgnnvyslap7k0ly87aw1bbxkb0rk5agpr423ibs9slxq6j";
+  };
+
+  nativeBuildInputs = [ autoreconfHook gettext makeWrapper ];
+
+  buildInputs = [ alsaLib libjack2 fftw ];
+
+  configureFlags = [
+    "--enable-alsa"
+    "--enable-jack"
+    "--enable-fftw"
+    "--disable-portaudio"
+    "--disable-oss"
+  ];
+
+  postInstall = ''
+    wrapProgram $out/bin/pd --prefix PATH : ${tk}/bin
+  '';
+
+  meta = with stdenv.lib; {
+    description = ''A real-time graphical programming environment for
+                    audio, video, and graphical processing'';
+    homepage = http://puredata.info;
+    license = licenses.bsd3;
+    platforms = platforms.linux;
+    maintainers = [ maintainers.goibhniu ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/puredata/wrapper.nix b/nixpkgs/pkgs/applications/audio/puredata/wrapper.nix
new file mode 100644
index 000000000000..80968e2700b4
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/puredata/wrapper.nix
@@ -0,0 +1,16 @@
+{ symlinkJoin, puredata, makeWrapper, plugins }:
+
+let
+puredataFlags = map (x: "-path ${x}/") plugins;
+in symlinkJoin {
+  name = "puredata-with-plugins-${puredata.version}";
+
+  paths = [ puredata ] ++ plugins;
+
+  buildInputs = [ makeWrapper ];
+
+  postBuild = ''
+    wrapProgram $out/bin/pd \
+      --add-flags "${toString puredataFlags}"
+  '';
+}
diff --git a/nixpkgs/pkgs/applications/audio/qjackctl/default.nix b/nixpkgs/pkgs/applications/audio/qjackctl/default.nix
new file mode 100644
index 000000000000..eafde7957a21
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/qjackctl/default.nix
@@ -0,0 +1,34 @@
+{ stdenv, fetchurl, pkgconfig, alsaLib, libjack2, dbus, qtbase, qttools, qtx11extras }:
+
+stdenv.mkDerivation rec {
+  version = "0.5.5";
+  name = "qjackctl-${version}";
+
+  # some dependencies such as killall have to be installed additionally
+
+  src = fetchurl {
+    url = "mirror://sourceforge/qjackctl/${name}.tar.gz";
+    sha256 = "1rzzqa39a6llr52vjkjr0a86nc776kmr5xs52qqga8ms9697psz5";
+  };
+
+  buildInputs = [
+    qtbase
+    qtx11extras
+    qttools
+    alsaLib
+    libjack2
+    dbus
+  ];
+
+  nativeBuildInputs = [ pkgconfig ];
+
+  configureFlags = [ "--enable-jack-version" ];
+
+  meta = with stdenv.lib; {
+    description = "A Qt application to control the JACK sound server daemon";
+    homepage = http://qjackctl.sourceforge.net/;
+    license = licenses.gpl2Plus;
+    maintainers = [ maintainers.goibhniu ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/qmidinet/default.nix b/nixpkgs/pkgs/applications/audio/qmidinet/default.nix
new file mode 100644
index 000000000000..37677cc211cc
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/qmidinet/default.nix
@@ -0,0 +1,25 @@
+{ stdenv, fetchurl, pkgconfig, qt5, alsaLib, libjack2 }:
+
+stdenv.mkDerivation rec {
+  version = "0.5.2";
+  name = "qmidinet-${version}";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/qmidinet/${name}.tar.gz";
+    sha256 = "0y2w3rymvc35r291sp2qaxn36wjwvxzk2iaw9y30q9fqc0vlpdns";
+  };
+
+  hardeningDisable = [ "format" ];
+
+  buildInputs = [  qt5.qtbase qt5.qttools alsaLib libjack2 ];
+
+  nativeBuildInputs = [ pkgconfig ];
+
+  meta = with stdenv.lib; {
+    description = "A MIDI network gateway application that sends and receives MIDI data (ALSA Sequencer and/or JACK MIDI) over the network";
+    homepage = http://qmidinet.sourceforge.net/;
+    license = licenses.gpl2Plus;
+    maintainers = [ maintainers.magnetophon ];
+    platforms = stdenv.lib.platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/qmidiroute/default.nix b/nixpkgs/pkgs/applications/audio/qmidiroute/default.nix
new file mode 100644
index 000000000000..7f5191a02c20
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/qmidiroute/default.nix
@@ -0,0 +1,30 @@
+{ stdenv, fetchurl, pkgconfig, qt4, alsaLib }:
+
+stdenv.mkDerivation rec {
+  version = "0.4.0";
+  name = "qmidiroute-${version}";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/project/alsamodular/QMidiRoute/${version}/${name}.tar.gz";
+    sha256 = "0vmjwarsxr5540rafhmdcc62yarf0w2l05bjjl9s28zzr5m39z3n";
+  };
+
+  nativeBuildInputs = [ pkgconfig ];
+  buildInputs = [ qt4 alsaLib ];
+
+  meta = with stdenv.lib; {
+    description = "MIDI event processor and router";
+    longDescription = ''
+    qmidiroute is a versatile MIDI event processor and router for the ALSA
+    sequencer.  The graphical  interface  is  based  on  the  Qt4  toolkit.
+    qmidiroute permits setting up an unlimited number of MIDI maps in which
+    incoming events are selected, modified or even changed in  type  before
+    being  directed  to  a  dedicated  ALSA  output  port. The maps work in
+    parallel, and they are organized in tabs.
+    '';
+
+    license = licenses.gpl2;
+    maintainers = [ maintainers.lebastr ];
+    platforms = stdenv.lib.platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/qmmp/default.nix b/nixpkgs/pkgs/applications/audio/qmmp/default.nix
new file mode 100644
index 000000000000..c10358eed1e4
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/qmmp/default.nix
@@ -0,0 +1,64 @@
+{ stdenv, fetchurl, cmake, pkgconfig, xlibsWrapper
+, qtbase, qttools, qtmultimedia, qtx11extras
+# transports
+, curl, libmms
+# input plugins
+, libmad, taglib, libvorbis, libogg, flac, libmpcdec, libmodplug, libsndfile
+, libcdio, cdparanoia, libcddb, faad2, ffmpeg, wildmidi
+# output plugins
+, alsaLib, libpulseaudio
+# effect plugins
+, libsamplerate
+}:
+
+# Additional plugins that can be added:
+#  wavpack (http://www.wavpack.com/)
+#  gme (Game music support)
+#  Ogg Opus support
+#  BS2B effect plugin (http://bs2b.sourceforge.net/)
+#  JACK audio support
+#  ProjectM visualization plugin
+
+# To make MIDI work we must tell Qmmp what instrument configuration to use (and
+# this can unfortunately not be set at configure time):
+# Go to settings (ctrl-p), navigate to the WildMidi plugin and click on
+# Preferences. In the instrument configuration field, type the path to
+# /nix/store/*wildmidi*/etc/wildmidi.cfg (or your own custom cfg file).
+
+# Qmmp installs working .desktop file(s) all by itself, so we don't need to
+# handle that.
+
+stdenv.mkDerivation rec {
+  name = "qmmp-1.2.5";
+
+  src = fetchurl {
+    url = "http://qmmp.ylsoftware.com/files/${name}.tar.bz2";
+    sha256 = "1xs8kg65088yzdhdkymmknkp1s4adzv095f5jhjvy62s8ymyjvnx";
+  };
+
+  buildInputs =
+    [ # basic requirements
+      cmake pkgconfig xlibsWrapper
+      qtbase qttools qtmultimedia qtx11extras
+      # transports
+      curl libmms
+      # input plugins
+      libmad taglib libvorbis libogg flac libmpcdec libmodplug libsndfile
+      libcdio cdparanoia libcddb faad2 ffmpeg wildmidi
+      # output plugins
+      alsaLib libpulseaudio
+      # effect plugins
+      libsamplerate
+    ];
+
+  enableParallelBuilding = true;
+
+  meta = with stdenv.lib; {
+    description = "Qt-based audio player that looks like Winamp";
+    homepage = http://qmmp.ylsoftware.com/;
+    license = licenses.gpl2;
+    platforms = platforms.linux;
+    maintainers = [ maintainers.bjornfor ];
+    repositories.svn = http://qmmp.googlecode.com/svn/;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/qsampler/default.nix b/nixpkgs/pkgs/applications/audio/qsampler/default.nix
new file mode 100644
index 000000000000..69bf41e1e4fb
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/qsampler/default.nix
@@ -0,0 +1,27 @@
+{ stdenv, fetchurl, autoconf, automake, libtool, pkgconfig, qttools
+, liblscp, libgig, qtbase }:
+
+stdenv.mkDerivation rec {
+  name = "qsampler-${version}";
+  version = "0.5.3";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/qsampler/${name}.tar.gz";
+    sha256 = "02xazvz8iaksglbgq3jhw4fq3f5pdcq9sss79jxs082md0mry17d";
+  };
+
+  nativeBuildInputs = [ autoconf automake libtool pkgconfig qttools ];
+  buildInputs = [ liblscp libgig qtbase ];
+
+  preConfigure = "make -f Makefile.svn";
+
+  enableParallelBuilding = true;
+
+  meta = with stdenv.lib; {
+    homepage = http://www.linuxsampler.org;
+    description = "Graphical frontend to LinuxSampler";
+    license = licenses.gpl2;
+    maintainers = [ maintainers.goibhniu ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/qsynth/default.nix b/nixpkgs/pkgs/applications/audio/qsynth/default.nix
new file mode 100644
index 000000000000..26adc6394349
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/qsynth/default.nix
@@ -0,0 +1,31 @@
+{ stdenv, fetchurl, alsaLib, fluidsynth, libjack2, qtbase, qttools, qtx11extras, cmake, pkgconfig }:
+
+stdenv.mkDerivation  rec {
+  name = "qsynth-${version}";
+  version = "0.5.2";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/qsynth/${name}.tar.gz";
+    sha256 = "1rfkaxq1pyc4hv3l0i6wicianbcbm1wp53kh9i5d4jsljgisd1dv";
+  };
+
+  # cmake is looking for qsynth.desktop.in and fails if it doesn't find it
+  # seems like a bug and can presumable go in the next version after 0.5.2
+  postPatch = ''
+    mv src/qsynth.desktop src/qsynth.desktop.in
+  '';
+
+  nativeBuildInputs = [ cmake pkgconfig ];
+
+  buildInputs = [ alsaLib fluidsynth libjack2 qtbase qttools qtx11extras ];
+
+  enableParallelBuilding = true;
+
+  meta = with stdenv.lib; {
+    description = "Fluidsynth GUI";
+    homepage = https://sourceforge.net/projects/qsynth;
+    license = licenses.gpl2Plus;
+    maintainers = with maintainers; [ goibhniu ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/qtractor/default.nix b/nixpkgs/pkgs/applications/audio/qtractor/default.nix
new file mode 100644
index 000000000000..9e0abac5ce47
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/qtractor/default.nix
@@ -0,0 +1,29 @@
+{ alsaLib, autoconf, automake, dssi, fetchurl, gtk2, libjack2
+, ladspaH, ladspaPlugins, liblo, libmad, libsamplerate, libsndfile
+, libtool, libvorbis, lilv, lv2, pkgconfig, qt4, rubberband, serd
+, sord, sratom, stdenv, suil }:
+
+stdenv.mkDerivation rec {
+  version = "0.6.7";
+  name = "qtractor-${version}";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/qtractor/${name}.tar.gz";
+    sha256 = "0h5nblfkl4s412c9f02b40nb8c8jq8ypz67z2qn3hkvhx6i9yxsg";
+  };
+
+  buildInputs =
+    [ alsaLib autoconf automake dssi gtk2 libjack2 ladspaH
+      ladspaPlugins liblo libmad libsamplerate libsndfile libtool
+      libvorbis lilv lv2 pkgconfig qt4 rubberband serd sord sratom
+      suil
+    ];
+
+  meta = with stdenv.lib; {
+    description = "Audio/MIDI multi-track sequencer";
+    homepage = http://qtractor.sourceforge.net;
+    license = licenses.gpl2Plus;
+    platforms = platforms.linux;
+    maintainers = [ maintainers.goibhniu ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/qtscrobbler/default.nix b/nixpkgs/pkgs/applications/audio/qtscrobbler/default.nix
new file mode 100644
index 000000000000..453da89953e0
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/qtscrobbler/default.nix
@@ -0,0 +1,34 @@
+{ stdenv, lib, fetchurl, withMtp ? true, libmtp, pkgconfig, which, qt4, qmake4Hook }:
+
+stdenv.mkDerivation rec {
+  name = "qtscrobbler-${version}";
+  version = "0.11";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/qtscrob/qtscrob/${version}/qtscrob-${version}.tar.bz2";
+    sha256 = "01c8e48f616ed09504833d27d92fd62f455bd645ea2d1cc2a5f4c287d641daba";
+  };
+
+  nativeBuildInputs = [ qmake4Hook ] ++ lib.optionals withMtp [ pkgconfig which ];
+  buildInputs = [ qt4 ] ++ lib.optional withMtp libmtp;
+
+  enableParallelBuilding = true;
+
+  postPatch = ''
+    cd src
+    sed -i -e "s,/usr/local,$out," -e "s,/usr,," common.pri
+  '';
+
+  meta = with lib; {
+    description = "Qt based last.fm scrobbler";
+    longDescription = ''
+      QTScrobbler is a tool to upload information about the tracks you have played from your Digital Audio Player (DAP) to your last.fm account.
+      It is able to gather this information from Apple iPods or DAPs running the Rockbox replacement firmware.
+    '';
+
+    homepage = http://qtscrob.sourceforge.net;
+    license = licenses.gpl2;
+    maintainers = [ maintainers.vanzef ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/quodlibet/default.nix b/nixpkgs/pkgs/applications/audio/quodlibet/default.nix
new file mode 100644
index 000000000000..a1d85ac91e85
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/quodlibet/default.nix
@@ -0,0 +1,69 @@
+{ stdenv, fetchurl, python3, wrapGAppsHook, gettext, libsoup, gnome3, gtk3, gdk_pixbuf,
+  tag ? "", xvfb_run, dbus, glibcLocales, glib, glib-networking, gobject-introspection,
+  gst_all_1, withGstPlugins ? true,
+  xineBackend ? false, xineLib,
+  withDbusPython ? false, withPyInotify ? false, withMusicBrainzNgs ? false, withPahoMqtt ? false,
+  webkitgtk ? null,
+  keybinder3 ? null, gtksourceview ? null, libmodplug ? null, kakasi ? null, libappindicator-gtk3 ? null }:
+
+let optionals = stdenv.lib.optionals; in
+python3.pkgs.buildPythonApplication rec {
+  pname = "quodlibet${tag}";
+  version = "4.2.1";
+
+  src = fetchurl {
+    url = "https://github.com/quodlibet/quodlibet/releases/download/release-${version}/quodlibet-${version}.tar.gz";
+    sha256 = "0b1rvr4hqs2bjmhayms7vxxkn3d92k9v7p1269rjhf11hpk122l7";
+  };
+
+  nativeBuildInputs = [ wrapGAppsHook gettext ];
+
+  checkInputs = with python3.pkgs; [ pytest pytest_xdist pyflakes pycodestyle polib xvfb_run dbus.daemon glibcLocales ];
+
+  buildInputs = [ gnome3.defaultIconTheme libsoup glib glib-networking gtk3 webkitgtk gdk_pixbuf keybinder3 gtksourceview libmodplug libappindicator-gtk3 kakasi gobject-introspection ]
+    ++ (if xineBackend then [ xineLib ] else with gst_all_1;
+    [ gstreamer gst-plugins-base ] ++ optionals withGstPlugins [ gst-plugins-good gst-plugins-ugly gst-plugins-bad ]);
+
+  propagatedBuildInputs = with python3.pkgs; [ pygobject3 pycairo mutagen gst-python feedparser ]
+      ++ optionals withDbusPython [ dbus-python ]
+      ++ optionals withPyInotify [ pyinotify ]
+      ++ optionals withMusicBrainzNgs [ musicbrainzngs ]
+      ++ optionals stdenv.isDarwin [ pyobjc ]
+      ++ optionals withPahoMqtt [ paho-mqtt ];
+
+  LC_ALL = "en_US.UTF-8";
+
+  checkPhase = ''
+    runHook preCheck
+    env XDG_DATA_DIRS="$out/share:${gtk3}/share/gsettings-schemas/${gtk3.name}:$XDG_DATA_DIRS" \
+      HOME=$(mktemp -d) \
+      xvfb-run -s '-screen 0 800x600x24' dbus-run-session \
+        --config-file=${dbus.daemon}/share/dbus-1/session.conf \
+        py.test${stdenv.lib.optionalString (xineBackend || !withGstPlugins) " --ignore=tests/plugin/test_replaygain.py"}
+    runHook postCheck
+  '';
+
+  preFixup = stdenv.lib.optionalString (kakasi != null) "gappsWrapperArgs+=(--prefix PATH : ${kakasi}/bin)";
+
+  meta = with stdenv.lib; {
+    description = "GTK+-based audio player written in Python, using the Mutagen tagging library";
+    license = licenses.gpl2Plus;
+
+    longDescription = ''
+      Quod Libet is a GTK+-based audio player written in Python, using
+      the Mutagen tagging library. It's designed around the idea that
+      you know how to organize your music better than we do. It lets
+      you make playlists based on regular expressions (don't worry,
+      regular searches work too). It lets you display and edit any
+      tags you want in the file. And it lets you do this for all the
+      file formats it supports. Quod Libet easily scales to libraries
+      of thousands (or even tens of thousands) of songs. It also
+      supports most of the features you expect from a modern media
+      player, like Unicode support, tag editing, Replay Gain, podcasts
+      & internet radio, and all major audio formats.
+    '';
+
+    maintainers = with maintainers; [ coroa sauyon ];
+    homepage = https://quodlibet.readthedocs.io/en/latest/;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/radiotray-ng/default.nix b/nixpkgs/pkgs/applications/audio/radiotray-ng/default.nix
new file mode 100644
index 000000000000..900c2bf7a41f
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/radiotray-ng/default.nix
@@ -0,0 +1,98 @@
+{ stdenv, fetchFromGitHub
+, cmake, pkgconfig
+# Transport
+, curl
+# Libraries
+, boost
+, jsoncpp
+, libbsd
+, pcre
+# GUI/Desktop
+, dbus
+, glibmm
+, gnome3
+, hicolor-icon-theme
+, libappindicator-gtk3
+, libnotify
+, libxdg_basedir
+, wxGTK
+# GStreamer
+, gst_all_1
+# User-agent info
+, lsb-release
+# rt2rtng
+, python2
+# Testing
+, gtest
+# Fixup
+, wrapGAppsHook
+, makeWrapper
+}:
+
+let
+  gstInputs = with gst_all_1; [
+    gstreamer gst-plugins-base
+    gst-plugins-good gst-plugins-bad gst-plugins-ugly
+    gst-libav
+  ];
+  # For the rt2rtng utility for converting bookmark file to -ng format
+  pythonInputs = with python2.pkgs; [ python2 lxml ];
+in
+stdenv.mkDerivation rec {
+  name = "radiotray-ng-${version}";
+  version = "0.2.4";
+
+  src = fetchFromGitHub {
+    owner = "ebruck";
+    repo = "radiotray-ng";
+    rev = "v${version}";
+    sha256 = "1jk80fv8ivwdx7waivls0mczn0rx4wv0fy7a28k77m88i5gkfgyw";
+  };
+
+  nativeBuildInputs = [ cmake pkgconfig wrapGAppsHook makeWrapper ];
+
+  buildInputs = [
+    curl
+    boost jsoncpp libbsd pcre
+    glibmm hicolor-icon-theme gnome3.gsettings-desktop-schemas libappindicator-gtk3 libnotify
+    libxdg_basedir
+    lsb-release
+    wxGTK
+  ] ++ gstInputs
+    ++ pythonInputs;
+
+  postPatch = ''
+    for x in debian/CMakeLists.txt include/radiotray-ng/common.hpp data/*.desktop; do
+      substituteInPlace $x --replace /usr $out
+    done
+
+    # We don't find the radiotray-ng-notification icon otherwise
+    substituteInPlace data/radiotray-ng.desktop \
+      --replace radiotray-ng-notification radiotray-ng-on
+    substituteInPlace data/rtng-bookmark-editor.desktop \
+      --replace radiotray-ng-notification radiotray-ng-on
+  '';
+
+  cmakeFlags = [
+    "-DBUILD_TESTS=${if doCheck then "ON" else "OFF"}"
+  ];
+
+  enableParallelBuilding = true;
+
+  checkInputs = [ gtest ];
+  # doCheck = stdenv.hostPlatform == stdenv.buildPlatform;
+  doCheck = false; # fails to pick up supplied gtest, tries to download it instead
+
+  preFixup = ''
+    gappsWrapperArgs+=(--suffix PATH : ${stdenv.lib.makeBinPath [ dbus ]})
+    wrapProgram $out/bin/rt2rtng --prefix PYTHONPATH : $PYTHONPATH
+  '';
+
+  meta = with stdenv.lib; {
+    description = "An internet radio player for linux";
+    homepage = https://github.com/ebruck/radiotray-ng;
+    license = licenses.gpl3;
+    maintainers = with maintainers; [ dtzWill ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/rakarrack/default.nix b/nixpkgs/pkgs/applications/audio/rakarrack/default.nix
new file mode 100644
index 000000000000..ec71cfb427c6
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/rakarrack/default.nix
@@ -0,0 +1,27 @@
+{ stdenv, fetchurl, alsaLib, alsaUtils, fltk, libjack2, libXft,
+libXpm, libjpeg, libpng, libsamplerate, libsndfile, zlib }:
+
+stdenv.mkDerivation  rec {
+  name = "rakarrack-${version}";
+  version = "0.6.1";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/rakarrack/${name}.tar.bz2";
+    sha256 = "1rpf63pdn54c4yg13k7cb1w1c7zsvl97c4qxcpz41c8l91xd55kn";
+  };
+
+  hardeningDisable = [ "format" ];
+
+  patches = [ ./fltk-path.patch ];
+
+  buildInputs = [ alsaLib alsaUtils fltk libjack2 libXft libXpm libjpeg
+    libpng libsamplerate libsndfile zlib ];
+
+  meta = with stdenv.lib; {
+    description = "Multi-effects processor emulating a guitar effects pedalboard";
+    homepage = http://rakarrack.sourceforge.net;
+    license = licenses.gpl2;
+    platforms = platforms.linux;
+    maintainers = [ maintainers.goibhniu ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/rakarrack/fltk-path.patch b/nixpkgs/pkgs/applications/audio/rakarrack/fltk-path.patch
new file mode 100644
index 000000000000..8f042bd3a669
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/rakarrack/fltk-path.patch
@@ -0,0 +1,35 @@
+commit 47245c3fd30dc326fedd7cdae444ddcf0fd97490
+Author: holborn <holborn@users.sourceforge.net>
+Date:   Tue Apr 19 15:02:26 2011 +0100
+
+            Fix FL path
+    
+    	modified:   src/global.h
+    	modified:   src/process.C
+
+diff --git a/src/global.h b/src/global.h
+index fc74b06..3e33da9 100644
+--- a/src/global.h
++++ b/src/global.h
+@@ -176,7 +176,7 @@ return y;
+ #include <X11/xpm.h>
+ #include <jack/jack.h>
+ #include <jack/midiport.h>
+-#include <Fl/Fl_Preferences.H>
++#include <FL/Fl_Preferences.H>
+ #include "FPreset.h"
+ #include "Reverb.h"
+ #include "Chorus.h"
+diff --git a/src/process.C b/src/process.C
+index 51bbc65..c993ff8 100644
+--- a/src/process.C
++++ b/src/process.C
+@@ -28,7 +28,7 @@
+ #include <fcntl.h>
+ #include <sys/types.h>
+ #include <unistd.h>
+-#include <Fl/Fl_Preferences.H>
++#include <FL/Fl_Preferences.H>
+ #include "global.h"
+ 
+ int Pexitprogram, preset;
diff --git a/nixpkgs/pkgs/applications/audio/reaper/default.nix b/nixpkgs/pkgs/applications/audio/reaper/default.nix
new file mode 100644
index 000000000000..cabebb6f18e9
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/reaper/default.nix
@@ -0,0 +1,60 @@
+{ stdenv, fetchurl, autoPatchelfHook, makeWrapper
+, alsaLib, xorg
+, gnome3, pango, gdk_pixbuf, cairo, glib, freetype
+, libpulseaudio, xdg_utils
+}:
+
+stdenv.mkDerivation rec {
+  name = "reaper-${version}";
+  version = "5.965";
+
+  src = fetchurl {
+    url = "https://www.reaper.fm/files/${stdenv.lib.versions.major version}.x/reaper${builtins.replaceStrings ["."] [""] version}_linux_x86_64.tar.xz";
+    sha256 = "05fn7r3v4qcb1b31g8layzvqilrwdr0s8yskr61yvbhx2dnjp9iw";
+  };
+
+  nativeBuildInputs = [ autoPatchelfHook makeWrapper ];
+
+  buildInputs = [
+    alsaLib
+
+    xorg.libX11
+    xorg.libXi
+
+    gdk_pixbuf
+    pango
+    cairo
+    glib
+    freetype
+
+    xdg_utils
+  ];
+
+  runtimeDependencies = [
+    gnome3.gtk
+  ];
+
+  dontBuild = true;
+
+  installPhase = ''
+    XDG_DATA_HOME="$out/share" ./install-reaper.sh \
+      --install $out/opt \
+      --integrate-user-desktop
+    rm $out/opt/REAPER/uninstall-reaper.sh
+
+    wrapProgram $out/opt/REAPER/reaper \
+      --prefix LD_LIBRARY_PATH : ${libpulseaudio}/lib
+
+    mkdir $out/bin
+    ln -s $out/opt/REAPER/reaper $out/bin/
+    ln -s $out/opt/REAPER/reamote-server $out/bin/
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Digital audio workstation";
+    homepage = https://www.reaper.fm/;
+    license = licenses.unfree;
+    platforms = [ "x86_64-linux" ];
+    maintainers = with maintainers; [ jfrankenau ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/redoflacs/default.nix b/nixpkgs/pkgs/applications/audio/redoflacs/default.nix
new file mode 100644
index 000000000000..1918fa9e3a99
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/redoflacs/default.nix
@@ -0,0 +1,39 @@
+{ stdenv, fetchFromGitHub, makeWrapper
+, flac, sox }:
+
+stdenv.mkDerivation rec {
+  name = "redoflacs-${version}";
+  version = "0.30.20150202";
+
+  src = fetchFromGitHub {
+    owner  = "sirjaren";
+    repo   = "redoflacs";
+    rev    = "86c6f5becca0909dcb2a0cb9ed747a575d7a4735";
+    sha256 = "1gzlmh4vnf2fl0x8ig2n1f76082ngldsv85i27dv15y2m1kffw2j";
+  };
+
+  dontBuild = true;
+
+  nativeBuildInputs = [ makeWrapper ];
+
+  installPhase = ''
+    runHook preInstall
+
+    install -Dm755 -t $out/bin redoflacs
+    install -Dm644 -t $out/share/doc/redoflacs LICENSE *.md
+
+    runHook postInstall
+  '';
+
+  postFixup = ''
+    wrapProgram $out/bin/redoflacs \
+      --prefix PATH : ${stdenv.lib.makeBinPath [ flac sox ]}
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Parallel BASH commandline FLAC compressor, verifier, organizer, analyzer, and retagger";
+    homepage    = src.meta.homepage;
+    license     = licenses.gpl2;
+    platforms   = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/renoise/default.nix b/nixpkgs/pkgs/applications/audio/renoise/default.nix
new file mode 100644
index 000000000000..081c4ab41acb
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/renoise/default.nix
@@ -0,0 +1,74 @@
+{ stdenv, fetchurl, libX11, libXext, libXcursor, libXrandr, libjack2, alsaLib
+, mpg123, releasePath ? null }:
+
+with stdenv.lib;
+
+# To use the full release version:
+# 1) Sign into https://backstage.renoise.com and download the appropriate (x86 or x86_64) version
+#    for your machine to some stable location.
+# 2) Override the releasePath attribute to point to the location of the newly downloaded bundle.
+# Note: Renoise creates an individual build for each license which screws somewhat with the
+# use of functions like requireFile as the hash will be different for every user.
+let
+  urlVersion = replaceStrings [ "." ] [ "_" ];
+in
+
+stdenv.mkDerivation rec {
+  name = "renoise-${version}";
+  version = "3.1.0";
+
+  src =
+    if stdenv.hostPlatform.system == "x86_64-linux" then
+        if builtins.isNull releasePath then
+        fetchurl {
+          url = "https://files.renoise.com/demo/Renoise_${urlVersion version}_Demo_x86_64.tar.bz2";
+          sha256 = "0pan68fr22xbj7a930y29527vpry3f07q3i9ya4fp6g7aawffsga";
+        }
+        else
+        releasePath
+    else if stdenv.hostPlatform.system == "i686-linux" then
+        if builtins.isNull releasePath then
+        fetchurl {
+          url = "http://files.renoise.com/demo/Renoise_${urlVersion version}_Demo_x86.tar.bz2";
+          sha256 = "1lccjj4k8hpqqxxham5v01v2rdwmx3c5kgy1p9lqvzqma88k4769";
+        }
+        else
+        releasePath
+    else throw "Platform is not supported by Renoise";
+
+  buildInputs = [ alsaLib libjack2 libX11 libXcursor libXext libXrandr ];
+
+  installPhase = ''
+    cp -r Resources $out
+
+    mkdir -p $out/lib/
+
+    mv $out/AudioPluginServer* $out/lib/
+
+    cp renoise $out/renoise
+
+    for path in ${toString buildInputs}; do
+      ln -s $path/lib/*.so* $out/lib/
+    done
+
+    ln -s ${stdenv.cc.cc.lib}/lib/libstdc++.so.6 $out/lib/
+
+    mkdir $out/bin
+    ln -s $out/renoise $out/bin/renoise
+  '';
+
+  postFixup = ''
+    patchelf \
+      --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \
+      --set-rpath ${mpg123}/lib:$out/lib \
+      $out/renoise
+  '';
+
+  meta = {
+    description = "Modern tracker-based DAW";
+    homepage = https://www.renoise.com/;
+    license = licenses.unfree;
+    maintainers = [];
+    platforms = [ "i686-linux" "x86_64-linux" ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/rhvoice/default.nix b/nixpkgs/pkgs/applications/audio/rhvoice/default.nix
new file mode 100644
index 000000000000..6516532df33f
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/rhvoice/default.nix
@@ -0,0 +1,40 @@
+{ stdenv, lib, pkgconfig, fetchFromGitHub, scons
+, python, glibmm, libpulseaudio, libao }:
+
+let
+  version = "unstable-2018-02-10";
+in stdenv.mkDerivation rec {
+  name = "rhvoice-${version}";
+
+  src = fetchFromGitHub {
+    owner = "Olga-Yakovleva";
+    repo = "RHVoice";
+    rev = "7a25a881b0465e47a12d8029b56f3b71a1d02312";
+    sha256 = "1gkrlmv7msh9qlm0gkjqpl9gswghpclfdwszr1p85v8vk6m63v0b";
+  };
+
+  nativeBuildInputs = [
+    scons pkgconfig
+  ];
+
+  buildInputs = [
+    python glibmm libpulseaudio libao
+  ];
+
+  # SConstruct patch
+  #     Scons creates an independent environment that assumes standard POSIX paths.
+  #     The patch is needed to push the nix environment.
+  #     - PATH
+  #     - PKG_CONFIG_PATH, to find available (sound) libraries
+  #     - RPATH, to link to the newly built libraries
+
+  patches = [ ./honor_nix_environment.patch ];
+
+  meta = {
+    description = "A free and open source speech synthesizer for Russian language and others";
+    homepage = https://github.com/Olga-Yakovleva/RHVoice/wiki;
+    license = lib.licenses.gpl3;
+    maintainers = with lib.maintainers; [ berce ];
+    platforms = with lib.platforms; all;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/rhvoice/honor_nix_environment.patch b/nixpkgs/pkgs/applications/audio/rhvoice/honor_nix_environment.patch
new file mode 100644
index 000000000000..ed180c92debc
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/rhvoice/honor_nix_environment.patch
@@ -0,0 +1,14 @@
+diff --git a/SConstruct b/SConstruct
+index 2421399..ba39254 100644
+--- a/SConstruct
++++ b/SConstruct
+@@ -147,6 +147,9 @@ def create_base_env(vars):
+     env_args["package_name"]="RHVoice"
+     env_args["CPPDEFINES"]=[("RHVOICE","1")]
+     env=Environment(**env_args)
++    env.PrependENVPath("PATH", os.environ["PATH"])
++    env["ENV"]["PKG_CONFIG_PATH"]=os.environ["PKG_CONFIG_PATH"]
++    env["RPATH"]=env["libdir"]
+     env["package_version"]=get_version(env["release"])
+     env.Append(CPPDEFINES=("PACKAGE",env.subst(r'\"$package_name\"')))
+     env.Append(CPPDEFINES=("VERSION",env.subst(r'\"$package_version\"')))
diff --git a/nixpkgs/pkgs/applications/audio/rhythmbox/default.nix b/nixpkgs/pkgs/applications/audio/rhythmbox/default.nix
new file mode 100644
index 000000000000..e540016ac81c
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/rhythmbox/default.nix
@@ -0,0 +1,75 @@
+{ stdenv, fetchurl, pkgconfig
+, python3
+, perl
+, perlPackages
+, gtk3
+, intltool
+, libsoup
+, gnome3
+, totem-pl-parser
+, tdb
+, json-glib
+, itstool
+, wrapGAppsHook
+, gst_all_1
+, gst_plugins ? with gst_all_1; [ gst-plugins-good gst-plugins-ugly ]
+}:
+let
+  pname = "rhythmbox";
+  version = "3.4.2";
+in stdenv.mkDerivation rec {
+  name = "${pname}-${version}";
+
+  src = fetchurl {
+    url = "mirror://gnome/sources/${pname}/${stdenv.lib.versions.majorMinor version}/${name}.tar.xz";
+    sha256 = "0hzcns8gf5yb0rm4ss8jd8qzarcaplp5cylk6plwilsqfvxj4xn2";
+  };
+
+  patches = [
+    # build with GStreamer 1.14 https://bugzilla.gnome.org/show_bug.cgi?id=788706
+    (fetchurl {
+      name = "fmradio-Fix-build-with-GStreamer-master.patch";
+      url = https://bugzilla.gnome.org/attachment.cgi?id=361178;
+      sha256 = "1h09mimlglj9hcmc3pfp0d6c277mqh2khwv9fryk43pkv3904d2w";
+    })
+  ];
+
+  nativeBuildInputs = [
+    pkgconfig
+    intltool perl perlPackages.XMLParser
+    itstool
+    wrapGAppsHook
+  ];
+
+  buildInputs = [
+    python3
+    libsoup
+    tdb
+    json-glib
+
+    gtk3
+    gnome3.libpeas
+    totem-pl-parser
+    gnome3.defaultIconTheme
+
+    gst_all_1.gstreamer
+    gst_all_1.gst-plugins-base
+  ] ++ gst_plugins;
+
+  enableParallelBuilding = true;
+
+  passthru = {
+    updateScript = gnome3.updateScript {
+      packageName = pname;
+      versionPolicy = "none";
+    };
+  };
+
+  meta = with stdenv.lib; {
+    homepage = https://wiki.gnome.org/Apps/Rhythmbox;
+    description = "A music playing application for GNOME";
+    license = licenses.gpl2;
+    platforms = platforms.linux;
+    maintainers = [ maintainers.rasendubi ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/rkrlv2/default.nix b/nixpkgs/pkgs/applications/audio/rkrlv2/default.nix
new file mode 100644
index 000000000000..0ff23102e755
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/rkrlv2/default.nix
@@ -0,0 +1,26 @@
+{ stdenv, fetchFromGitHub,
+automake, pkgconfig, lv2, fftw, cmake, xorg, libjack2, libsamplerate, libsndfile
+}:
+
+stdenv.mkDerivation rec {
+  repo = "rkrlv2";
+  name = "${repo}-b2.0";
+
+  src = fetchFromGitHub {
+    owner = "ssj71";
+    inherit repo;
+    rev = "beta_2";
+    sha256 = "128jcilbrd1l65c01w2bazsb21x78mng0jjkhi3x9crf1n9qbh2m";
+  };
+
+  nativeBuildInputs = [ pkgconfig ];
+  buildInputs = with xorg; [ automake lv2 fftw cmake libXpm libjack2 libsamplerate libsndfile libXft ];
+
+  meta = {
+    description = "Rakarrak effects ported to LV2";
+    homepage = https://github.com/ssj71/rkrlv2;
+    license = stdenv.lib.licenses.gpl3;
+    maintainers = [ stdenv.lib.maintainers.joelmo ];
+    platforms = stdenv.lib.platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/rosegarden/default.nix b/nixpkgs/pkgs/applications/audio/rosegarden/default.nix
new file mode 100644
index 000000000000..55e3b55472b8
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/rosegarden/default.nix
@@ -0,0 +1,52 @@
+{ stdenv, fetchurl, cmake, makedepend, perl, pkgconfig, qttools
+, dssi, fftwSinglePrec, ladspaH, ladspaPlugins, libjack2
+, liblo, liblrdf, libsamplerate, libsndfile, lirc ? null, qtbase }:
+
+stdenv.mkDerivation (rec {
+  version = "18.12";
+  name = "rosegarden-${version}";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/rosegarden/${name}.tar.bz2";
+    sha256 = "15i9fm0vkn3wsgahaxqi1j5zs0wc0j3wdwml0x49084gk2p328vb";
+  };
+
+  patchPhase = ''
+    substituteInPlace src/CMakeLists.txt --replace svnheader svnversion
+  '';
+
+  nativeBuildInputs = [ cmake makedepend perl pkgconfig qttools ];
+
+  buildInputs = [
+    dssi
+    fftwSinglePrec
+    ladspaH
+    ladspaPlugins
+    libjack2
+    liblo
+    liblrdf
+    libsamplerate
+    libsndfile
+    lirc
+    qtbase
+  ];
+
+  enableParallelBuilding = true;
+
+  meta = with stdenv.lib; {
+    homepage = https://www.rosegardenmusic.com/;
+    description = "Music composition and editing environment";
+    longDescription = ''
+      Rosegarden is a music composition and editing environment based around
+      a MIDI sequencer that features a rich understanding of music notation
+      and includes basic support for digital audio.
+
+      Rosegarden is an easy-to-learn, attractive application that runs on Linux,
+      ideal for composers, musicians, music students, and small studio or home
+      recording environments.
+    '';
+    maintainers = with maintainers; [ lebastr ];
+    license = licenses.lgpl2Plus;
+    platforms = platforms.linux;
+  };
+})
diff --git a/nixpkgs/pkgs/applications/audio/rubyripper/default.nix b/nixpkgs/pkgs/applications/audio/rubyripper/default.nix
new file mode 100644
index 000000000000..9e0a3712c971
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/rubyripper/default.nix
@@ -0,0 +1,23 @@
+{ stdenv, fetchurl, ruby, cdparanoia, makeWrapper }:
+stdenv.mkDerivation rec {
+  version = "0.6.2";
+  name = "rubyripper-${version}";
+  src = fetchurl {
+    url = "https://rubyripper.googlecode.com/files/rubyripper-${version}.tar.bz2";
+    sha256 = "1fwyk3y0f45l2vi3a481qd7drsy82ccqdb8g2flakv58m45q0yl1";
+  };
+
+  preConfigure = "patchShebangs .";
+
+  configureFlags = [ "--enable-cli" ];
+  buildInputs = [ ruby cdparanoia makeWrapper ];
+  postInstall = ''
+    wrapProgram "$out/bin/rrip_cli" \
+      --prefix PATH : "${ruby}/bin" \
+      --prefix PATH : "${cdparanoia}/bin"
+  '';
+
+  meta = {
+    platforms = stdenv.lib.platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/samplv1/default.nix b/nixpkgs/pkgs/applications/audio/samplv1/default.nix
new file mode 100644
index 000000000000..73f24e03e307
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/samplv1/default.nix
@@ -0,0 +1,23 @@
+{ stdenv, fetchurl, pkgconfig, libjack2, alsaLib, liblo, libsndfile, lv2, qt5 }:
+
+stdenv.mkDerivation rec {
+  name = "samplv1-${version}";
+  version = "0.9.4";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/samplv1/${name}.tar.gz";
+    sha256 = "17a61lliplhs14b3x83qz3kv7ww4dn3a02jfdlcx2z903hwn5sld";
+  };
+
+  buildInputs = [ libjack2 alsaLib liblo libsndfile lv2 qt5.qtbase qt5.qttools];
+
+  nativeBuildInputs = [ pkgconfig ];
+
+  meta = with stdenv.lib; {
+    description = "An old-school all-digital polyphonic sampler synthesizer with stereo fx";
+    homepage = http://samplv1.sourceforge.net/;
+    license = licenses.gpl2Plus;
+    platforms = platforms.linux;
+    maintainers = [ maintainers.goibhniu ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/sayonara/default.nix b/nixpkgs/pkgs/applications/audio/sayonara/default.nix
new file mode 100644
index 000000000000..fbe90c5377df
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/sayonara/default.nix
@@ -0,0 +1,45 @@
+{ stdenv, fetchurl, cmake, qt5, zlib, taglib, pkgconfig, pcre, gst_all_1 }:
+
+let
+  version = "1.1.1-git1-20180828";
+in
+stdenv.mkDerivation {
+  name = "sayonara-player-${version}";
+
+  src = fetchurl {
+    url = "https://sayonara-player.com/sw/sayonara-player-${version}.tar.gz";
+    sha256 = "0rvy47qvavrp03zjdrw025dmq9fq5aaii3q1qq8b94byarl0c5kn";
+  };
+
+  nativeBuildInputs = [ cmake pkgconfig ];
+  buildInputs = with qt5; with gst_all_1;
+      [ gstreamer gst-plugins-base gst-plugins-good gst-plugins-ugly
+        pcre qtbase qttools taglib zlib
+      ];
+
+  # CMake Error at src/GUI/Resources/Icons/cmake_install.cmake:49 (file):
+  #   file cannot create directory: /usr/share/icons.  Maybe need administrative
+  #   privileges.
+  # Call Stack (most recent call first):
+  #   src/GUI/Resources/cmake_install.cmake:50 (include)
+  #   src/GUI/cmake_install.cmake:50 (include)
+  #   src/cmake_install.cmake:59 (include)
+  #   cmake_install.cmake:42 (include)
+  postPatch = ''
+    substituteInPlace src/GUI/Resources/Icons/CMakeLists.txt \
+      --replace "/usr/share" "$out/share"
+  '';
+
+  # [ 65%] Building CXX object src/Components/Engine/CMakeFiles/say_comp_engine.dir/AbstractPipeline.cpp.o
+  # /tmp/nix-build-sayonara-player-1.0.0-git5-20180115.drv-0/sayonara-player/src/Components/Engine/AbstractPipeline.cpp:28:32: fatal error: gst/app/gstappsink.h: No such file or directory
+  #  #include <gst/app/gstappsink.h>
+  NIX_CFLAGS_COMPILE = "-I${gst_all_1.gst-plugins-base.dev}/include/gstreamer-1.0";
+
+  meta = with stdenv.lib;
+    { description = "Sayonara music player";
+      homepage = https://sayonara-player.com/;
+      license = licenses.gpl3;
+      platforms = platforms.linux;
+      maintainers = [ maintainers.deepfire ];
+    };
+}
diff --git a/nixpkgs/pkgs/applications/audio/schismtracker/default.nix b/nixpkgs/pkgs/applications/audio/schismtracker/default.nix
new file mode 100644
index 000000000000..ab1a6e387383
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/schismtracker/default.nix
@@ -0,0 +1,30 @@
+{ stdenv, fetchurl, alsaLib, python, SDL }:
+
+stdenv.mkDerivation rec {
+  version = "20120105";
+  name = "schismtracker-${version}";
+
+  src = fetchurl {
+    url = "http://schismtracker.org/dl/${name}.tar.bz2";
+    sha256 = "1ny7wv2wxm1av299wvpskall6438wjjpadphmqc7c0h6d0zg5kii";
+  };
+
+  preConfigure = ''
+    # Build fails on Linux with windres.
+    export ac_cv_prog_ac_ct_WINDRES=
+  '';
+
+  configureFlags = [ "--enable-dependency-tracking" ];
+
+  buildInputs = [ alsaLib python SDL ];
+
+  enableParallelBuilding = true;
+
+  meta = {
+    description = "Music tracker application, free reimplementation of Impulse Tracker";
+    homepage = http://schismtracker.org/;
+    license = stdenv.lib.licenses.gpl2;
+    platforms = [ "x86_64-linux" "i686-linux" ];
+    maintainers = [ stdenv.lib.maintainers.ftrvxmtrx ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/seq24/default.nix b/nixpkgs/pkgs/applications/audio/seq24/default.nix
new file mode 100644
index 000000000000..d47ede27ece2
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/seq24/default.nix
@@ -0,0 +1,24 @@
+{ stdenv, fetchurl, alsaLib, gtkmm2, libjack2, pkgconfig }:
+
+stdenv.mkDerivation  rec {
+  name = "seq24-${version}";
+  version = "0.9.3";
+
+  src = fetchurl {
+    url = "https://launchpad.net/seq24/trunk/${version}/+download/${name}.tar.gz";
+    sha256 = "1qpyb7355s21sgy6gibkybxpzx4ikha57a8w644lca6qy9mhcwi3";
+  };
+
+  patches = [ ./mutex_no_nameclash.patch ];
+
+  buildInputs = [ alsaLib gtkmm2 libjack2 ];
+  nativeBuildInputs = [ pkgconfig ];
+
+  meta = with stdenv.lib; {
+    description = "Minimal loop based midi sequencer";
+    homepage = http://www.filter24.org/seq24;
+    license = licenses.gpl2;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ goibhniu ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/seq24/mutex_no_nameclash.patch b/nixpkgs/pkgs/applications/audio/seq24/mutex_no_nameclash.patch
new file mode 100644
index 000000000000..dd82b1b0e09f
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/seq24/mutex_no_nameclash.patch
@@ -0,0 +1,58 @@
+--- a/src/mutex.cpp
++++ b/src/mutex.cpp
+@@ -20,23 +20,23 @@
+ 
+ #include "mutex.h"
+ 
+-const pthread_mutex_t mutex::recmutex = PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP;
++const pthread_mutex_t mutex_no_nameclash::recmutex = PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP;
+ const pthread_cond_t condition_var::cond  = PTHREAD_COND_INITIALIZER;
+ 
+-mutex::mutex( )
++mutex_no_nameclash::mutex_no_nameclash( )
+ {
+     m_mutex_lock = recmutex;
+ }
+ 
+ void
+-mutex::lock( )
++mutex_no_nameclash::lock( )
+ {
+     pthread_mutex_lock( &m_mutex_lock );
+ }
+ 
+ 
+ void
+-mutex::unlock( )
++mutex_no_nameclash::unlock( )
+ {
+     pthread_mutex_unlock( &m_mutex_lock );
+ }
+--- a/src/mutex.h
++++ b/src/mutex.h
+@@ -24,7 +24,7 @@
+ 
+ #include <pthread.h>
+ 
+-class mutex {
++class mutex_no_nameclash {
+ 
+ private:
+ 
+@@ -37,14 +37,14 @@
+ 
+ public:
+ 
+-    mutex();
++    mutex_no_nameclash();
+ 
+     void lock();
+     void unlock();
+ 
+ };
+ 
+-class condition_var : public mutex {
++class condition_var : public mutex_no_nameclash {
+ 
+ private:
+ 
diff --git a/nixpkgs/pkgs/applications/audio/setbfree/default.nix b/nixpkgs/pkgs/applications/audio/setbfree/default.nix
new file mode 100644
index 000000000000..1047734a2c18
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/setbfree/default.nix
@@ -0,0 +1,33 @@
+{ stdenv, fetchurl, alsaLib, freetype, ftgl, libjack2, libX11, lv2
+, libGLU_combined, pkgconfig, ttf_bitstream_vera
+}:
+
+stdenv.mkDerivation  rec {
+  name = "setbfree-${version}";
+  version = "0.8.8";
+
+  src = fetchurl {
+    url = "https://github.com/pantherb/setBfree/archive/v${version}.tar.gz";
+    sha256 = "1ldxwds99azingkjh246kz7x3j7307jhr0fls5rjjbcfchpg7v99";
+  };
+
+  patchPhase = ''
+    sed 's#/usr/local#$(out)#g' -i common.mak
+    sed 's#/usr/share/fonts/truetype/ttf-bitstream-vera#${ttf_bitstream_vera}/share/fonts/truetype#g' \
+      -i b_synth/Makefile
+  '';
+
+  nativeBuildInputs = [ pkgconfig ];
+  buildInputs = [
+    alsaLib freetype ftgl libjack2 libX11 lv2 libGLU_combined
+    ttf_bitstream_vera
+  ];
+
+  meta = with stdenv.lib; {
+    description = "A DSP tonewheel organ emulator";
+    homepage = http://setbfree.org;
+    license = licenses.gpl2;
+    platforms = platforms.linux;
+    maintainers = [ maintainers.goibhniu ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/sfxr-qt/default.nix b/nixpkgs/pkgs/applications/audio/sfxr-qt/default.nix
new file mode 100644
index 000000000000..a98d1431d65e
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/sfxr-qt/default.nix
@@ -0,0 +1,36 @@
+{ stdenv, fetchFromGitHub
+, cmake
+, qtbase, qtquickcontrols2
+, SDL
+, python3
+}:
+
+stdenv.mkDerivation rec {
+  name = "sfxr-qt-${version}";
+  version = "1.2.0";
+  src = fetchFromGitHub {
+    owner = "agateau";
+    repo = "sfxr-qt";
+    rev = version;
+    sha256 = "1ndw1dcmzvkrc6gnb0y057zb4lqlhwrv18jlbx26w3s4xrbxqr41";
+    fetchSubmodules = true;
+  };
+  nativeBuildInputs = [
+    cmake
+    (python3.withPackages (pp: with pp; [ pyyaml jinja2 ]))
+  ];
+  buildInputs = [
+    qtbase qtquickcontrols2
+    SDL
+  ];
+  configurePhase = "cmake . -DCMAKE_INSTALL_PREFIX=$out";
+
+  meta = with stdenv.lib; {
+    homepage = https://github.com/agateau/sfxr-qt;
+    description = "A sound effect generator, QtQuick port of sfxr";
+    license = licenses.gpl2;
+    maintainers = with maintainers; [ fgaz ];
+    platforms = platforms.linux;
+  };
+}
+
diff --git a/nixpkgs/pkgs/applications/audio/shntool/default.nix b/nixpkgs/pkgs/applications/audio/shntool/default.nix
new file mode 100644
index 000000000000..8645251b384d
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/shntool/default.nix
@@ -0,0 +1,21 @@
+{ stdenv, fetchurl, flac }:
+
+stdenv.mkDerivation rec {
+  version = "3.0.10";
+  name = "shntool-${version}";
+
+  src = fetchurl {
+    url = http://www.etree.org/shnutils/shntool/dist/src/shntool-3.0.10.tar.gz;
+    sha256 = "00i1rbjaaws3drkhiczaign3lnbhr161b7rbnjr8z83w8yn2wc3l";
+  };
+
+  buildInputs = [ flac ];
+
+  meta = {
+    description = "Multi-purpose WAVE data processing and reporting utility";
+    homepage = http://www.etree.org/shnutils/shntool/;
+    license = stdenv.lib.licenses.gpl2Plus;
+    platforms = stdenv.lib.platforms.all;
+    maintainers = with stdenv.lib.maintainers; [ jcumming ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/sidplayfp/default.nix b/nixpkgs/pkgs/applications/audio/sidplayfp/default.nix
new file mode 100644
index 000000000000..b857c5b68358
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/sidplayfp/default.nix
@@ -0,0 +1,22 @@
+{ stdenv, fetchurl, pkgconfig, libsidplayfp }:
+
+stdenv.mkDerivation rec {
+  version = "1.4.4";
+  name = "sidplayfp-${version}";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/sidplay-residfp/sidplayfp/1.4/${name}.tar.gz";
+    sha256 = "0arsrg3f0fsinal22qjmj3r6500bcbgqnx26fsz049ldl716kz1m";
+  };
+
+  nativeBuildInputs = [ pkgconfig ];
+  buildInputs = [ libsidplayfp ];
+
+  meta = with stdenv.lib; {
+    description = "A SID player using libsidplayfp";
+    homepage = https://sourceforge.net/projects/sidplay-residfp/;
+    license = with licenses; [ gpl2Plus ];
+    maintainers = with maintainers; [ dezgeg ];
+    platforms = with platforms; linux;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/sisco.lv2/default.nix b/nixpkgs/pkgs/applications/audio/sisco.lv2/default.nix
new file mode 100644
index 000000000000..32cfd0f74940
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/sisco.lv2/default.nix
@@ -0,0 +1,44 @@
+{ stdenv, fetchFromGitHub, lv2, pkgconfig, libGLU_combined, cairo, pango, libjack2 }:
+
+let
+  name = "sisco.lv2-${version}";
+  version = "0.7.0";
+
+  robtkVersion = "80a2585253a861c81f0bfb7e4579c75f5c73af89";
+  robtkName = "robtk-${robtkVersion}";
+
+  src = fetchFromGitHub {
+    owner = "x42";
+    repo = "sisco.lv2";
+    rev = "v${version}";
+    sha256 = "1r6g29yqbdqgkh01x6d3nvmvc58rk2dp94fd0qyyizq37a1qplj1";
+  };
+
+  robtkSrc = fetchFromGitHub {
+    owner = "x42";
+    repo = "robtk";
+    rev = robtkVersion;
+    sha256 = "0gk16nrvnrffqqw0yd015kja9wkgbzvb648bl1pagriabhznhfxl";
+  };
+in
+stdenv.mkDerivation rec {
+  inherit name;
+
+  srcs = [ src robtkSrc ];
+  sourceRoot = src.name;
+
+  nativeBuildInputs = [ pkgconfig ];
+  buildInputs = [ lv2 pango cairo libjack2 libGLU_combined ];
+
+  postUnpack = "chmod u+w -R ${robtkName}-src; mv ${robtkName}-src/* ${sourceRoot}/robtk";
+  sisco_VERSION = version;
+  preConfigure = "makeFlagsArray=(PREFIX=$out)";
+
+  meta = with stdenv.lib; {
+    description = "Simple audio oscilloscope with variable time scale, triggering, cursors and numeric readout in LV2 plugin format";
+    homepage = http://x42.github.io/sisco.lv2/;
+    license = licenses.gpl2;
+    maintainers = [ maintainers.e-user ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/snapcast/default.nix b/nixpkgs/pkgs/applications/audio/snapcast/default.nix
new file mode 100644
index 000000000000..5730dec6b994
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/snapcast/default.nix
@@ -0,0 +1,66 @@
+{ stdenv, lib, fetchFromGitHub, cmake, pkgconfig
+, alsaLib, asio, avahi, flac, libogg, libvorbis }:
+
+let
+
+  dependency = { name, version, sha256 }:
+  stdenv.mkDerivation {
+    name = "${name}-${version}";
+
+    src = fetchFromGitHub {
+      owner = "badaix";
+      repo  = name;
+      rev   = "v${version}";
+      inherit sha256;
+    };
+
+    nativeBuildInputs = [ cmake ];
+  };
+
+  aixlog = dependency {
+    name    = "aixlog";
+    version = "1.2.1";
+    sha256  = "1rh4jib5g41b85bqrxkl5g74hk5ryf187y9fw0am76g59xlymfpr";
+  };
+
+  popl = dependency {
+    name    = "popl";
+    version = "1.2.0";
+    sha256  = "1z6z7fwffs3d9h56mc2m24d5gp4fc5bi8836zyfb276s6fjyfcai";
+  };
+
+in
+
+stdenv.mkDerivation rec {
+  name = "snapcast-${version}";
+  version = "0.15.0";
+
+  src = fetchFromGitHub {
+    owner  = "badaix";
+    repo   = "snapcast";
+    rev    = "v${version}";
+    sha256 = "11rnpy6w3wm240qgmkp74k5w8wh5b7hzfx05qrnh6l7ng7m25ky2";
+  };
+
+  nativeBuildInputs = [ cmake pkgconfig ];
+  # snapcast also supports building against tremor but as we have libogg, that's
+  # not needed
+  buildInputs = [
+    alsaLib asio avahi flac libogg libvorbis
+    aixlog popl
+  ];
+
+  # Upstream systemd unit files are pretty awful, so we provide our own in a
+  # NixOS module. It might make sense to get that upstreamed...
+  postInstall = ''
+    install -d $out/share/doc/snapcast
+    cp -r ../doc/* ../*.md $out/share/doc/snapcast
+  '';
+
+  meta = with lib; {
+    description = "Synchronous multi-room audio player";
+    homepage = https://github.com/badaix/snapcast;
+    maintainers = with maintainers; [ fpletz ];
+    license = licenses.gpl3;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/snd/default.nix b/nixpkgs/pkgs/applications/audio/snd/default.nix
new file mode 100644
index 000000000000..8534d871c662
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/snd/default.nix
@@ -0,0 +1,30 @@
+{ stdenv, fetchurl, pkgconfig
+, gtk2, alsaLib
+, fftw, gsl
+}:
+
+stdenv.mkDerivation rec {
+  name = "snd-18.8";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/snd/${name}.tar.gz";
+    sha256 = "16p6cmxl8y58wa19k1z6i66qsqaz7rld4850b0sprbxjjb6cqhf7";
+  };
+
+  nativeBuildInputs = [ pkgconfig ];
+
+  buildInputs = [
+    gtk2 alsaLib
+    fftw gsl
+  ];
+
+  meta = {
+    description = "Sound editor";
+    homepage = http://ccrma.stanford.edu/software/snd;
+    platforms = stdenv.lib.platforms.linux;
+    license = stdenv.lib.licenses.free;
+    maintainers = with stdenv.lib.maintainers; [ fuuzetsu ];
+  };
+
+
+}
diff --git a/nixpkgs/pkgs/applications/audio/sonata/default.nix b/nixpkgs/pkgs/applications/audio/sonata/default.nix
new file mode 100644
index 000000000000..012270905cc8
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/sonata/default.nix
@@ -0,0 +1,69 @@
+{ stdenv, fetchFromGitHub, pkgconfig, intltool, wrapGAppsHook
+, python3Packages, gnome3, gtk3, gobject-introspection}:
+
+let
+  inherit (python3Packages) buildPythonApplication isPy3k dbus-python pygobject3 mpd2;
+in buildPythonApplication rec {
+  pname = "sonata";
+  version = "1.7b1";
+
+  src = fetchFromGitHub {
+    owner = "multani";
+    repo = "sonata";
+    rev = "v${version}";
+    sha256 = "1npbxlrg6k154qybfd250nq2p96kxdsdkj9wwnp93gljnii3g8wh";
+  };
+
+  disabled = !isPy3k;
+
+  nativeBuildInputs = [ pkgconfig ];
+  buildInputs = [
+    intltool wrapGAppsHook
+    gnome3.defaultIconTheme
+    gnome3.gsettings-desktop-schemas
+  ];
+
+  postPatch = ''
+    # Remove "Local MPD" tab which is not suitable for NixOS.
+    sed -i '/localmpd/d' sonata/consts.py
+  '';
+
+  propagatedBuildInputs = [
+    gobject-introspection gtk3 pygobject3
+  ];
+
+  # The optional tagpy dependency (for editing metadata) is not yet
+  # included because it's difficult to build.
+  pythonPath = [ dbus-python pygobject3 mpd2 ];
+
+  meta = {
+    description = "An elegant client for the Music Player Daemon";
+    longDescription = ''
+      Sonata is an elegant client for the Music Player Daemon.
+
+      Written in Python and using the GTK+ 3 widget set, its features
+      include:
+
+       - Expanded and collapsed views
+       - Automatic remote and local album art
+       - Library browsing by folders, or by genre/artist/album
+       - User-configurable columns
+       - Automatic fetching of lyrics
+       - Playlist and stream support
+       - Support for editing song tags (not in NixOS version)
+       - Drag and drop to copy files
+       - Popup notification
+       - Library and playlist searching, filter as you type
+       - Audioscrobbler (last.fm) 1.2 support
+       - Multiple MPD profiles
+       - Keyboard friendly
+       - Support for multimedia keys
+       - Commandline control
+       - Available in 24 languages
+    '';
+    homepage = https://www.nongnu.org/sonata/;
+    license = stdenv.lib.licenses.gpl3;
+    platforms = stdenv.lib.platforms.linux;
+    maintainers = [ stdenv.lib.maintainers.rvl ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/sonic-pi/default.nix b/nixpkgs/pkgs/applications/audio/sonic-pi/default.nix
new file mode 100644
index 000000000000..ee72b6cdb1a4
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/sonic-pi/default.nix
@@ -0,0 +1,99 @@
+{ stdenv
+, fetchFromGitHub
+, fftwSinglePrec
+, ruby
+, libffi
+, aubio
+, cmake
+, pkgconfig
+, qt5
+, libsForQt5
+, boost
+, bash
+, makeWrapper
+, jack2Full
+}:
+
+let
+  supercollider = libsForQt5.callPackage ../../../development/interpreters/supercollider {
+    fftw = fftwSinglePrec;
+  };
+
+in stdenv.mkDerivation rec {
+  version = "3.1.0";
+  name = "sonic-pi-${version}";
+
+  src = fetchFromGitHub {
+    owner = "samaaron";
+    repo = "sonic-pi";
+    rev = "v${version}";
+    sha256 = "0gi4a73szaa8iz5q1gxgpsnyvhhghcfqm6bfwwxbix4m5csbfgh9";
+  };
+
+  buildInputs = [
+    bash
+    cmake
+    makeWrapper
+    pkgconfig
+    qt5.qtbase
+    libsForQt5.qscintilla
+    libsForQt5.qwt
+    ruby
+    libffi
+    aubio
+    supercollider
+    boost
+  ];
+
+  dontUseCmakeConfigure = true;
+
+  preConfigure = ''
+    patchShebangs .
+    substituteInPlace app/gui/qt/mainwindow.cpp \
+      --subst-var-by ruby "${ruby}/bin/ruby" \
+      --subst-var out
+  '';
+
+  buildPhase = ''
+    export SONIC_PI_HOME=$TMPDIR
+    export AUBIO_LIB=${aubio}/lib/libaubio.so
+
+    pushd app/server/ruby/bin
+      ./compile-extensions.rb
+      ./i18n-tool.rb -t
+    popd
+
+    pushd app/gui/qt
+      cp -f ruby_help.tmpl ruby_help.h
+      ../../server/ruby/bin/qt-doc.rb -o ruby_help.h
+
+      substituteInPlace SonicPi.pro \
+        --replace "LIBS += -lrt -lqt5scintilla2" \
+                  "LIBS += -lrt -lqscintilla2 -lqwt"
+
+      lrelease SonicPi.pro
+      qmake SonicPi.pro
+
+      make
+    popd
+  '';
+
+  installPhase = ''
+    runHook preInstall
+
+    cp -r . $out
+    wrapProgram $out/bin/sonic-pi \
+      --prefix PATH : ${ruby}/bin:${bash}/bin:${supercollider}/bin:${jack2Full}/bin \
+      --set AUBIO_LIB "${aubio}/lib/libaubio.so"
+
+    runHook postInstall
+  '';
+
+  meta = {
+    homepage = http://sonic-pi.net/;
+    description = "Free live coding synth for everyone originally designed to support computing and music lessons within schools";
+    license = stdenv.lib.licenses.mit;
+    maintainers = with stdenv.lib.maintainers; [ Phlogistique kamilchm ];
+    platforms = stdenv.lib.platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/sonic-visualiser/default.nix b/nixpkgs/pkgs/applications/audio/sonic-visualiser/default.nix
new file mode 100644
index 000000000000..d5f613b45945
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/sonic-visualiser/default.nix
@@ -0,0 +1,56 @@
+# TODO add plugins having various licenses, see http://www.vamp-plugins.org/download.html
+
+{ stdenv, fetchurl, alsaLib, bzip2, fftw, libjack2, libX11, liblo
+, libmad, libogg, librdf, librdf_raptor, librdf_rasqal, libsamplerate
+, libsndfile, pkgconfig, libpulseaudio, qtbase, redland
+, qmake, rubberband, serd, sord, vampSDK, fftwFloat
+}:
+
+stdenv.mkDerivation rec {
+  name = "sonic-visualiser-${version}";
+  version = "2.4.1";
+
+  src = fetchurl {
+    url = "https://code.soundsoftware.ac.uk/attachments/download/1185/${name}.tar.gz";
+    sha256 = "06nlha70kgrby16nyhngrv5q846xagnxdinv608v7ga7vpywwmyb";
+  };
+
+  buildInputs =
+    [ libsndfile qtbase fftw fftwFloat bzip2 librdf rubberband
+      libsamplerate vampSDK alsaLib librdf_raptor librdf_rasqal redland
+      serd
+      sord
+      # optional
+      libjack2
+      # portaudio
+      libpulseaudio
+      libmad
+      libogg # ?
+      # fishsound
+      liblo
+      libX11
+    ];
+
+  nativeBuildInputs = [ pkgconfig qmake ];
+
+  configurePhase = ''
+    for i in sonic-visualiser svapp svcore svgui;
+      do cd $i && qmake PREFIX=$out && cd ..;
+    done
+  '';
+
+  installPhase = ''
+    mkdir -p $out/{bin,share/sonic-visualiser}
+    cp sonic-visualiser $out/bin/
+    cp -r samples $out/share/sonic-visualiser/
+  '';
+
+  meta = with stdenv.lib; {
+    description = "View and analyse contents of music audio files";
+    homepage = http://www.sonicvisualiser.org/;
+    license = licenses.gpl2Plus;
+    maintainers = [ maintainers.goibhniu maintainers.marcweber ];
+    platforms = platforms.linux;
+    broken = true;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/sooperlooper/default.nix b/nixpkgs/pkgs/applications/audio/sooperlooper/default.nix
new file mode 100644
index 000000000000..bf4d96c6fc4e
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/sooperlooper/default.nix
@@ -0,0 +1,45 @@
+{ stdenv, fetchFromGitHub, liblo, libxml2, libjack2, libsndfile, wxGTK, libsigcxx
+, libsamplerate, rubberband, pkgconfig, libtool, gettext, ncurses, which
+, autoreconfHook
+}:
+
+stdenv.mkDerivation rec {
+  name = "sooperlooper-git-${version}";
+  version = "2016-07-19";
+
+  src = fetchFromGitHub {
+    owner = "essej";
+    repo = "sooperlooper";
+    rev = "3bdfe184cd59b51c757b8048536abc1146fb0de4";
+    sha256 = "0qz25h4idv79m97ici2kzx72fwzks3lysyksk3p3rx72lsijhf3g";
+  };
+
+  autoreconfPhase = ''
+    patchShebangs ./autogen.sh
+    ./autogen.sh
+  '';
+
+  nativeBuildInputs = [ autoreconfHook pkgconfig which libtool ];
+
+  buildInputs = [
+    liblo libxml2 libjack2 libsndfile wxGTK libsigcxx
+    libsamplerate rubberband gettext ncurses
+  ];
+
+  meta = {
+    description = "A live looping sampler capable of immediate loop recording, overdubbing, multiplying, reversing and more";
+    longDescription = ''
+      It allows for multiple simultaneous multi-channel loops limited only by your computer's available memory.
+      The application is a standalone JACK client with an engine controllable via OSC and MIDI.
+      It also includes a GUI which communicates with the engine via OSC (even over a network) for user-friendly control on a desktop.
+      However, this kind of live performance looping tool is most effectively used via hardware (midi footpedals, etc)
+      and the engine can be run standalone on a computer without a monitor.
+    '';
+
+    version = "${version}";
+    homepage = http://essej.net/sooperlooper/index.html;
+    license = stdenv.lib.licenses.gpl2;
+    maintainers = [ stdenv.lib.maintainers.magnetophon ];
+    platforms = stdenv.lib.platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/sorcer/default.nix b/nixpkgs/pkgs/applications/audio/sorcer/default.nix
new file mode 100644
index 000000000000..cf0b5db81f62
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/sorcer/default.nix
@@ -0,0 +1,29 @@
+{ stdenv, fetchFromGitHub , boost, cairomm, cmake, libsndfile, lv2, ntk, pkgconfig, python }:
+
+stdenv.mkDerivation rec {
+  name = "sorcer-${version}";
+  version = "1.1.3";
+
+  src = fetchFromGitHub {
+    owner = "openAVproductions";
+    repo = "openAV-Sorcer";
+    rev = "release-${version}";
+    sha256 = "1x7pi77nal10717l02qpnhrx6d7w5nqrljkn9zx5w7gpb8fpb3vp";
+  };
+
+  nativeBuildInputs = [ pkgconfig ];
+  buildInputs = [ boost cairomm cmake libsndfile lv2 ntk python ];
+
+  installPhase = ''
+    make install
+    cp -a ../presets/* "$out/lib/lv2"
+  '';
+
+  meta = with stdenv.lib; {
+    homepage = http://openavproductions.com/sorcer/;
+    description = "A wavetable LV2 plugin synth, targeted at the electronic / dubstep genre";
+    license = licenses.gpl3;
+    maintainers = [ maintainers.magnetophon ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/sound-juicer/default.nix b/nixpkgs/pkgs/applications/audio/sound-juicer/default.nix
new file mode 100644
index 000000000000..686b27223a6f
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/sound-juicer/default.nix
@@ -0,0 +1,41 @@
+{ stdenv, fetchurl, pkgconfig, glib, gtk3, intltool, itstool, libxml2, brasero
+, libcanberra-gtk3, gnome3, gst_all_1, libmusicbrainz5, libdiscid, isocodes
+, wrapGAppsHook }:
+
+let
+  pname = "sound-juicer";
+  version = "3.24.0";
+in stdenv.mkDerivation rec{
+  name = "${pname}-${version}";
+
+  src = fetchurl {
+    url = "mirror://gnome/sources/${pname}/${stdenv.lib.versions.majorMinor version}/${name}.tar.xz";
+    sha256 = "19qg4xv0f9rkq34lragkmhii1llxsa87llbl28i759b0ks4f6sny";
+  };
+
+  nativeBuildInputs = [ pkgconfig intltool itstool libxml2 wrapGAppsHook ];
+  buildInputs = [
+    glib gtk3 brasero libcanberra-gtk3 gnome3.defaultIconTheme
+    gnome3.gsettings-desktop-schemas libmusicbrainz5 libdiscid isocodes
+    gst_all_1.gstreamer gst_all_1.gst-plugins-base
+    gst_all_1.gst-plugins-good gst_all_1.gst-plugins-bad
+    gst_all_1.gst-libav
+  ];
+
+  NIX_CFLAGS_COMPILE="-Wno-error=format-nonliteral";
+
+  passthru = {
+    updateScript = gnome3.updateScript {
+      packageName = pname;
+      attrPath = "gnome3.${pname}";
+    };
+  };
+
+  meta = with stdenv.lib; {
+    description = "A Gnome CD Ripper";
+    homepage = https://wiki.gnome.org/Apps/SoundJuicer;
+    maintainers = [ maintainers.bdimcheff ];
+    license = licenses.gpl2;
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/soundscape-renderer/default.nix b/nixpkgs/pkgs/applications/audio/soundscape-renderer/default.nix
new file mode 100644
index 000000000000..babe4edff9df
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/soundscape-renderer/default.nix
@@ -0,0 +1,54 @@
+{ stdenv
+, fetchgit
+, autoreconfHook
+, help2man
+, pkgconfig
+, libsndfile
+, fftwFloat
+, libjack2
+, libxml2
+, qt4
+, boost
+, ecasound
+, glibcLocales
+, libGLU_combined # Needed because help2man basically does a ./ssr-binaural  --help and ssr-binaural needs libGL
+}:
+
+stdenv.mkDerivation rec {
+  name = "soundscape-renderer-unstable-${version}";
+
+  version = "2016-11-03";
+
+  src = fetchgit {
+    url = https://github.com/SoundScapeRenderer/ssr;
+    rev = "0dd0136dd24e47b63d8a4e05de467f5c7b047ec9";
+    sha256 = "095x2spv9bmg6pi71mpajnghbqj58ziflg16f9854awx0qp9d8x7";
+  };
+
+  # Without it doesn't find all of the boost libraries.
+  BOOST_LIB_DIR="${boost}/lib";
+  # uses the deprecated get_generic_category() in boost_system
+  NIX_CFLAGS_COMPILE="-DBOOST_SYSTEM_ENABLE_DEPRECATED=1";
+
+  LC_ALL = "en_US.UTF-8";
+
+  nativeBuildInputs = [ autoreconfHook pkgconfig ];
+  buildInputs = [ boost boost.dev ecasound libGLU_combined help2man libsndfile fftwFloat libjack2 libxml2 qt4 glibcLocales ];
+
+  # 1) Fix detecting version. https://github.com/SoundScapeRenderer/ssr/pull/53
+  # 2) Make it find ecasound headers
+  # 3) Fix locale for help2man
+  prePatch = ''
+    substituteInPlace configure.ac --replace 'git describe ||' 'git describe 2> /dev/null ||';
+    substituteInPlace configure.ac --replace '/{usr,opt}/{,local/}' '${ecasound}/'
+    substituteInPlace man/Makefile.am --replace '--locale=en' '--locale=en_US.UTF-8'
+  '';
+
+  meta = {
+    homepage = http://spatialaudio.net/ssr/;
+    description = "The SoundScape Renderer (SSR) is a tool for real-time spatial audio reproduction";
+    license = stdenv.lib.licenses.gpl3;
+    maintainers = [ stdenv.lib.maintainers.fridh ];
+  };
+
+}
diff --git a/nixpkgs/pkgs/applications/audio/spectmorph/default.nix b/nixpkgs/pkgs/applications/audio/spectmorph/default.nix
new file mode 100644
index 000000000000..9557770418e8
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/spectmorph/default.nix
@@ -0,0 +1,22 @@
+{ stdenv, fetchurl, pkgconfig, libjack2, lv2, glib, qt5, libao, cairo, libsndfile, fftwFloat }:
+
+stdenv.mkDerivation rec {
+  name = "spectmorph-${version}";
+  version = "0.4.1";
+  src = fetchurl {
+    url = "http://spectmorph.org/files/releases/${name}.tar.bz2";
+    sha256 = "0z00yvv3jl8qsx6bz9msmg09mdnj5r5d4ws5bmnylwxk182whbrv";
+  };
+
+  buildInputs = [  libjack2 lv2 glib qt5.qtbase libao cairo libsndfile fftwFloat ];
+
+  nativeBuildInputs = [ pkgconfig ];
+
+  meta = with stdenv.lib; {
+    description = "Allows to analyze samples of musical instruments, and to combine them (morphing) to construct hybrid sounds";
+    homepage = http://spectmorph.org;
+    license = licenses.gpl3;
+    platforms = [ "x86_64-linux" "i686-linux" ];
+    maintainers = [ maintainers.magnetophon ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/spectrojack/default.nix b/nixpkgs/pkgs/applications/audio/spectrojack/default.nix
new file mode 100644
index 000000000000..6614e3702247
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/spectrojack/default.nix
@@ -0,0 +1,31 @@
+{ stdenv, fetchurl, pkgconfig, libjack2, fftwFloat, gtk2 }:
+
+stdenv.mkDerivation rec {
+  name = "spectrojack-${version}";
+  version = "0.4.1";
+
+  src = fetchurl {
+    url = "http://sed.free.fr/spectrojack/${name}.tar.gz";
+    sha256 = "1kiwx0kag7kq7rhg0bvckfm8r7pqmbk76ppa39cq2980jb5v8rfp";
+  };
+  nativeBuildInputs = [ pkgconfig ];
+  buildInputs = [ libjack2 fftwFloat gtk2 ];
+  configurePhase= ''
+    sed -i 's/.*home.*/#&/' ./Makefile
+    substituteInPlace ./Makefile \
+      --replace "/usr/share" "$out/usr/share"
+  '';
+  installPhase= ''
+    install -Dm755 spectrojack $out/bin/spectrojack
+    install -Dm644 spectrojack_icon.svg $out/usr/share/spectrojack/icon.svg
+    install -Dm644 -t $out/usr/share/spectrojack/colormaps colormaps/*
+  '';
+
+  meta = {
+    description = "A little spectrogram/audiogram/sonogram/whatever for JACK";
+    homepage = http://sed.free.fr/spectrojack;
+    license = stdenv.lib.licenses.publicDomain;
+    maintainers = with stdenv.lib.maintainers; [ sleexyz ];
+    platforms = with stdenv.lib.platforms; linux;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/spek/default.nix b/nixpkgs/pkgs/applications/audio/spek/default.nix
new file mode 100644
index 000000000000..8af7888f74bb
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/spek/default.nix
@@ -0,0 +1,27 @@
+{ stdenv, fetchzip, autoconf, automake, intltool, pkgconfig, ffmpeg, wxGTK }:
+
+stdenv.mkDerivation rec {
+  name = "spek-${version}";
+  version = "0.8.3";
+
+  src = fetchzip {
+    name = "${name}-src";
+    url = "https://github.com/alexkay/spek/archive/v${version}.tar.gz";
+    sha256 = "0y4hlhswpqkqpsglrhg5xbfy1a6f9fvasgdf336vhwcjqsc3k2xv";
+  };
+
+  nativeBuildInputs = [ pkgconfig ];
+  buildInputs = [ autoconf automake intltool ffmpeg wxGTK ];
+
+  preConfigure = ''
+    ./autogen.sh
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Analyse your audio files by showing their spectrogram";
+    homepage = http://spek.cc/;
+    license = licenses.gpl3;
+    platforms = platforms.all;
+    maintainers = [ maintainers.bjornfor ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/split2flac/default.nix b/nixpkgs/pkgs/applications/audio/split2flac/default.nix
new file mode 100644
index 000000000000..372e507ed0e9
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/split2flac/default.nix
@@ -0,0 +1,62 @@
+{ stdenv, fetchFromGitHub, makeWrapper
+, shntool, cuetools
+, flac, faac, mp4v2, wavpack, mac
+, imagemagick, libiconv, enca, lame, pythonPackages, vorbis-tools
+, aacgain, mp3gain, vorbisgain
+}:
+
+let
+  wrapSplit2flac =  format: ''
+    makeWrapper $out/bin/.split2flac-wrapped $out/bin/split2${format} \
+      --set SPLIT2FLAC_FORMAT ${format} \
+      --prefix PATH : ${stdenv.lib.makeBinPath [
+        shntool cuetools
+        flac faac mp4v2 wavpack mac
+        imagemagick libiconv enca lame pythonPackages.mutagen vorbis-tools
+        aacgain mp3gain vorbisgain
+      ]}
+  '';
+
+in stdenv.mkDerivation rec {
+  name = "split2flac-${version}";
+  version = "122";
+
+  src = fetchFromGitHub {
+    owner = "ftrvxmtrx";
+    repo = "split2flac";
+    rev = version;
+    sha256 = "1a71amamip25hhqx7wwzfcl3d5snry9xsiha0kw73iq2m83r2k63";
+  };
+
+  dontBuild = true;
+
+  nativeBuildInputs = [ makeWrapper ];
+
+  patchPhase = ''
+    substituteInPlace split2flac \
+      --replace 'FORMAT="''${0##*split2}"' 'FORMAT=''${SPLIT2FLAC_FORMAT:-flac}'
+  '';
+
+  installPhase = ''
+    mkdir -p $out/share/bash-completion/completions
+    cp split2flac-bash-completion.sh \
+      $out/share/bash-completion/completions/split2flac-bash-completion.sh
+
+    mkdir -p $out/bin
+    cp split2flac $out/bin/.split2flac-wrapped
+
+    ${wrapSplit2flac "flac"}
+    ${wrapSplit2flac "mp3"}
+    ${wrapSplit2flac "ogg"}
+    ${wrapSplit2flac "m4a"}
+    ${wrapSplit2flac "wav"}
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Split flac/ape/wv/wav + cue sheet into separate tracks";
+    homepage = https://github.com/ftrvxmtrx/split2flac;
+    license = licenses.mit;
+    platforms = platforms.all;
+    maintainers = with maintainers; [ jfrankenau ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/spotify/default.nix b/nixpkgs/pkgs/applications/audio/spotify/default.nix
new file mode 100644
index 000000000000..6afd8f2dff87
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/spotify/default.nix
@@ -0,0 +1,160 @@
+{ fetchurl, stdenv, squashfsTools, xorg, alsaLib, makeWrapper, openssl, freetype
+, glib, pango, cairo, atk, gdk_pixbuf, gtk2, cups, nspr, nss, libpng
+, libgcrypt, systemd, fontconfig, dbus, expat, ffmpeg, curl, zlib, gnome3
+, at-spi2-atk
+}:
+
+let
+  # TO UPDATE: just execute the ./update.sh script (won't do anything if there is no update)
+  # "rev" decides what is actually being downloaded
+  version = "1.0.96.181.gf6bc1b6b-12";
+  # To get the latest stable revision:
+  # curl -H 'X-Ubuntu-Series: 16' 'https://api.snapcraft.io/api/v1/snaps/details/spotify?channel=stable' | jq '.download_url,.version,.last_updated'
+  # To get general information:
+  # curl -H 'Snap-Device-Series: 16' 'https://api.snapcraft.io/v2/snaps/info/spotify' | jq '.'
+  # More examples of api usage:
+  # https://github.com/canonical-websites/snapcraft.io/blob/master/webapp/publisher/snaps/views.py
+  rev = "30";
+
+
+  deps = [
+    alsaLib
+    atk
+    at-spi2-atk
+    cairo
+    cups
+    curl
+    dbus
+    expat
+    ffmpeg
+    fontconfig
+    freetype
+    gdk_pixbuf
+    glib
+    gtk2
+    libgcrypt
+    libpng
+    nss
+    pango
+    stdenv.cc.cc
+    systemd
+    xorg.libX11
+    xorg.libXcomposite
+    xorg.libXcursor
+    xorg.libXdamage
+    xorg.libXext
+    xorg.libXfixes
+    xorg.libXi
+    xorg.libXrandr
+    xorg.libXrender
+    xorg.libXScrnSaver
+    xorg.libXtst
+    xorg.libxcb
+    zlib
+  ];
+
+in
+
+stdenv.mkDerivation {
+  name = "spotify-${version}";
+
+  # fetch from snapcraft instead of the debian repository most repos fetch from.
+  # That is a bit more cumbersome. But the debian repository only keeps the last
+  # two versions, while snapcraft should provide versions indefinately:
+  # https://forum.snapcraft.io/t/how-can-a-developer-remove-her-his-app-from-snap-store/512
+
+  # This is the next-best thing, since we're not allowed to re-distribute
+  # spotify ourselves:
+  # https://community.spotify.com/t5/Desktop-Linux/Redistribute-Spotify-on-Linux-Distributions/td-p/1695334
+  src = fetchurl {
+    url = "https://api.snapcraft.io/api/v1/snaps/download/pOBIoZ2LrCB3rDohMxoYGnbN14EHOgD7_${rev}.snap";
+    sha512 = "859730fbc80067f0828f7e13eee9a21b13b749f897a50e17c2da4ee672785cfd79e1af6336e609529d105e040dc40f61b6189524783ac93d49f991c4ea8b3c56";
+  };
+
+  buildInputs = [ squashfsTools makeWrapper ];
+
+  doConfigure = false;
+  doBuild = false;
+  dontStrip = true;
+  dontPatchELF = true;
+
+  unpackPhase = ''
+    runHook preUnpack
+    unsquashfs "$src" '/usr/share/spotify' '/usr/bin/spotify' '/meta/snap.yaml'
+    cd squashfs-root
+    if ! grep -q 'grade: stable' meta/snap.yaml; then
+      # Unfortunately this check is not reliable: At the moment (2018-07-26) the
+      # latest version in the "edge" channel is also marked as stable.
+      echo "The snap package is marked as unstable:"
+      grep 'grade: ' meta/snap.yaml
+      echo "You probably chose the wrong revision."
+      exit 1
+    fi
+    if ! grep -q '${version}' meta/snap.yaml; then
+      echo "Package version differs from version found in snap metadata:"
+      grep 'version: ' meta/snap.yaml
+      echo "While the nix package specifies: ${version}."
+      echo "You probably chose the wrong revision or forgot to update the nix version."
+      exit 1
+    fi
+    runHook postUnpack
+  '';
+
+  installPhase =
+    ''
+      runHook preInstall
+
+      libdir=$out/lib/spotify
+      mkdir -p $libdir
+      mv ./usr/* $out/
+
+      cp meta/snap.yaml $out
+
+      # Work around Spotify referring to a specific minor version of
+      # OpenSSL.
+
+      ln -s ${openssl.out}/lib/libssl.so $libdir/libssl.so.1.0.0
+      ln -s ${openssl.out}/lib/libcrypto.so $libdir/libcrypto.so.1.0.0
+      ln -s ${nspr.out}/lib/libnspr4.so $libdir/libnspr4.so
+      ln -s ${nspr.out}/lib/libplc4.so $libdir/libplc4.so
+
+      ln -s ${ffmpeg.out}/lib/libavcodec.so.56 $libdir/libavcodec-ffmpeg.so.56
+      ln -s ${ffmpeg.out}/lib/libavformat.so.56 $libdir/libavformat-ffmpeg.so.56
+
+      rpath="$out/share/spotify:$libdir"
+
+      patchelf \
+        --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
+        --set-rpath $rpath $out/share/spotify/spotify
+
+      librarypath="${stdenv.lib.makeLibraryPath deps}:$libdir"
+      wrapProgram $out/share/spotify/spotify \
+        --prefix LD_LIBRARY_PATH : "$librarypath" \
+        --prefix PATH : "${gnome3.zenity}/bin"
+
+      # fix Icon line in the desktop file (#48062)
+      sed -i "s:^Icon=.*:Icon=spotify-client:" "$out/share/spotify/spotify.desktop"
+
+      # Desktop file
+      mkdir -p "$out/share/applications/"
+      cp "$out/share/spotify/spotify.desktop" "$out/share/applications/"
+
+      # Icons
+      for i in 16 22 24 32 48 64 128 256 512; do
+        ixi="$i"x"$i"
+        mkdir -p "$out/share/icons/hicolor/$ixi/apps"
+        ln -s "$out/share/spotify/icons/spotify-linux-$i.png" \
+          "$out/share/icons/hicolor/$ixi/apps/spotify-client.png"
+      done
+
+      runHook postInstall
+    '';
+
+  meta = with stdenv.lib; {
+    homepage = https://www.spotify.com/;
+    description = "Play music from the Spotify music service";
+    license = licenses.unfree;
+    maintainers = with maintainers; [ eelco ftrvxmtrx sheenobu mudri ];
+    platforms = [ "x86_64-linux" ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/spotify/update.sh b/nixpkgs/pkgs/applications/audio/spotify/update.sh
new file mode 100755
index 000000000000..0e19ca1920b4
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/spotify/update.sh
@@ -0,0 +1,96 @@
+#!/usr/bin/env nix-shell
+#! nix-shell -i bash -p curl jq git gnused gnugrep
+
+
+# executing this script without arguments will
+# - find the newest stable spotify version avaiable on snapcraft (https://snapcraft.io/spotify)
+# - read the current spotify version from the current nix expression
+# - update the nix expression if the versions differ
+# - try to build the updated version, exit if that fails
+# - give instructions for upstreaming
+
+# Please test the update manually before pushing. There have been errors before
+# and because the service is proprietary and a paid account is necessary to do
+# anything with spotify automatic testing is not possible.
+
+# As an optional argument you can specify the snapcraft channel to update to.
+# Default is `stable` and only stable updates should be pushed to nixpkgs. For
+# testing you may specify `candidate` or `edge`.
+
+
+channel="${1:-stable}" # stable/candidate/edge
+nixpkgs="$(git rev-parse --show-toplevel)"
+spotify_nix="$nixpkgs/pkgs/applications/audio/spotify/default.nix"
+
+
+#
+# find the newest stable spotify version avaiable on snapcraft
+#
+
+# create bash array from snap info
+snap_info=($(
+	curl -H 'X-Ubuntu-Series: 16' \
+		"https://api.snapcraft.io/api/v1/snaps/details/spotify?channel=$channel" \
+	| jq --raw-output \
+		'.revision,.download_sha512,.version,.last_updated'
+))
+
+# "revision" is the actual version identifier on snapcraft, the "version" is
+# just for human consumption. Revision is just an integer that gets increased
+# by one every (stable or unstable) release.
+revision="${snap_info[0]}"
+sha512="${snap_info[1]}"
+upstream_version="${snap_info[2]}"
+last_updated="${snap_info[3]}"
+
+echo "Latest $channel release is $upstream_version from $last_updated."
+
+#
+# read the current spotify version from the currently *committed* nix expression
+#
+
+current_nix_version=$(
+	grep 'version\s*=' "$spotify_nix" \
+	| sed -Ene 's/.*"(.*)".*/\1/p'
+)
+
+echo "Current nix version: $current_nix_version"
+
+#
+# update the nix expression if the versions differ
+#
+
+if [[ "$current_nix_version" = "$upstream_version" ]]; then
+	echo "Spotify is already up ot date"
+	exit 0
+fi
+
+echo "Updating from ${current_nix_version} to ${upstream_version}, released on ${last_updated}"
+
+# search-and-replace revision, hash and version
+sed --regexp-extended \
+	-e 's/rev\s*=\s*"[0-9]+"\s*;/rev = "'"${revision}"'";/' \
+	-e 's/sha512\s*=\s*"[^"]*"\s*;/sha512 = "'"${sha512}"'";/' \
+	-e 's/version\s*=\s*".*"\s*;/version = "'"${upstream_version}"'";/' \
+	-i "$spotify_nix" 
+
+#
+# try to build the updated version
+#
+
+if ! nix-build -A spotify "$nixpkgs"; then
+	echo "The updated spotify failed to build."
+	exit 1
+fi
+
+#
+# give instructions for upstreaming
+#
+
+git add "$spotify_nix"
+# show changes for review
+git status
+echo 'Please review and test the changes (./result/bin/spotify).'
+echo 'Then stage the changes with `git add` and commit with:'
+# prepare commit message
+echo "git commit -m 'spotify: $current_nix_version -> $upstream_version'"
diff --git a/nixpkgs/pkgs/applications/audio/spotifywm/default.nix b/nixpkgs/pkgs/applications/audio/spotifywm/default.nix
new file mode 100644
index 000000000000..f22340b69412
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/spotifywm/default.nix
@@ -0,0 +1,31 @@
+{ stdenv, fetchFromGitHub, spotify, xorg }:
+stdenv.mkDerivation rec {
+  name = "spotifywm-unstable-${version}";
+  version = "2016-11-28";
+
+  src = fetchFromGitHub {
+    owner  = "dasJ";
+    repo   = "spotifywm";
+    rev    = "91dd5532ffb7a398d775abe94fe7781904ab406f";
+    sha256 = "01z088i83410bpx1vbp7c6cq01r431v55l7340x3izp53lnpp379";
+  };
+
+  buildInputs = [ xorg.libX11 ];
+
+  propagatedBuildInputs = [ spotify ];
+
+  installPhase = ''
+    echo "#!${stdenv.shell}" > spotifywm
+    echo "LD_PRELOAD="$out/lib/spotifywm.so" ${spotify}/bin/spotify \$*" >> spotifywm
+    install -Dm644 spotifywm.so $out/lib/spotifywm.so
+    install -Dm755 spotifywm $out/bin/spotifywm
+  '';
+
+  meta = with stdenv.lib; {
+    homepage = https://github.com/dasJ/spotifywm;
+    description = "Wrapper around Spotify that correctly sets class name before opening the window";
+    license = licenses.mit;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ jqueiroz ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/squeezelite/default.nix b/nixpkgs/pkgs/applications/audio/squeezelite/default.nix
new file mode 100644
index 000000000000..20f6271c7adf
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/squeezelite/default.nix
@@ -0,0 +1,26 @@
+{ stdenv, fetchFromGitHub, alsaLib, faad2, flac, libmad, libvorbis, mpg123 }:
+
+stdenv.mkDerivation {
+  name = "squeezelite-git-2016-05-27";
+
+  src = fetchFromGitHub {
+    owner = "ralph-irving";
+    repo = "squeezelite";
+    rev = "e37ed17fed9e11a7346cbe9f1e1deeccc051f42e";
+    sha256 = "15ihx2dbp4kr6k6r50g9q5npqad5zyv8nqf5cr37bhg964syvbdm";
+  };
+
+  buildInputs = [ alsaLib faad2 flac libmad libvorbis mpg123 ];
+
+  installPhase = ''
+    mkdir -p $out/bin
+    cp squeezelite $out/bin
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Lightweight headless squeezebox client emulator";
+    homepage = https://github.com/ralph-irving/squeezelite;
+    license = licenses.gpl3;
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/squishyball/default.nix b/nixpkgs/pkgs/applications/audio/squishyball/default.nix
new file mode 100644
index 000000000000..496ce779ffb5
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/squishyball/default.nix
@@ -0,0 +1,50 @@
+{ stdenv, autoreconfHook, fetchsvn, flac, libao, libvorbis, ncurses
+, opusfile, pkgconfig
+}:
+
+stdenv.mkDerivation rec {
+  name = "squishyball-${rev}";
+  rev = "19580";
+
+  src = fetchsvn {
+    url = "https://svn.xiph.org/trunk/squishyball";
+    rev = rev;
+    sha256 = "013vq52q9z6kpg9iyc2jnb3m2gihcjblvwpg4yj4wy1q2c05pzqp";
+  };
+
+  nativeBuildInputs = [ autoreconfHook pkgconfig ];
+
+  buildInputs = [ flac libao libvorbis ncurses opusfile ];
+
+  NIX_CFLAGS_COMPILE = "-DNCURSES_INTERNALS";
+
+  patches = [ ./gnu-screen.patch ];
+
+  postInstall = ''
+    # Why doesn’t this happen automagically?
+    mkdir -p $out/share/man/man1
+    cp squishyball.1 $out/share/man/man1
+  '';
+
+  meta = with stdenv.lib; {
+    description = "A tool to perform sample comparison testing on the command line";
+    longDescription = ''
+       squishyball is a simple command-line utility for performing
+       double-blind A/B, A/B/X or X/X/Y testing on the command line.
+       The user specifies two input files to be compared and uses the
+       keyboard during playback to flip between the randomized samples
+       to perform on-the-fly compar‐ isons.  After a predetermined
+       number of trials, squishyball prints the trial results to
+       stdout and exits.  Results (stdout) may be redirected to a file
+       without affecting interactive use of the terminal.
+
+       squishyball can also be used to perform casual, non-randomized
+       comparisons of groups of up to ten samples; this is the default
+       mode of operation.
+    '';
+    homepage = https://svn.xiph.org/trunk/squishyball;
+    license = licenses.gpl2Plus;
+    maintainers = with maintainers; [ michalrus ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/squishyball/gnu-screen.patch b/nixpkgs/pkgs/applications/audio/squishyball/gnu-screen.patch
new file mode 100644
index 000000000000..addc30d604c6
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/squishyball/gnu-screen.patch
@@ -0,0 +1,20 @@
+diff -Naur a/main.c b/main.c
+--- a/main.c	2016-09-06 13:37:32.259895631 +0200
++++ b/main.c	2016-09-07 01:41:51.014309863 +0200
+@@ -693,6 +693,11 @@
+     }
+ 
+     /* set up terminal */
++    if (!strncmp(getenv("TERM"), "screen", 6)) {
++      char term[256];
++      snprintf(term, sizeof(term), "xterm%s", getenv("TERM") + 6);
++      setenv("TERM", term, 1);
++    }
+     atexit(min_panel_remove);
+     panel_init(pcm, test_files, test_mode, start, end>0 ? end : len, len,
+                beep_mode, restart_mode, tests, running_score);
+@@ -1170,4 +1175,3 @@
+     fprintf(stderr,"Done.\n");
+   return 0;
+ }
+-
diff --git a/nixpkgs/pkgs/applications/audio/ssrc/default.nix b/nixpkgs/pkgs/applications/audio/ssrc/default.nix
new file mode 100644
index 000000000000..19386b477942
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/ssrc/default.nix
@@ -0,0 +1,42 @@
+{ stdenv, fetchFromGitHub }:
+
+stdenv.mkDerivation rec {
+  pname = "ssrc";
+  name = "${pname}-${version}";
+  version = "1.33";
+
+  src = fetchFromGitHub {
+    owner = "shibatch";
+    repo = "SSRC";
+    rev = "4adf75116dfc0ef709fef74a0e2f3360bd15007f";
+    sha256 = "0hgma66v7sszkpz5jkyscj0q6lmjfqdwf1hw57535c012pa2vdrh";
+  };
+
+  installPhase = ''
+    mkdir -p $out/bin
+    cp ssrc ssrc_hp $out/bin
+    '';
+
+  meta = with stdenv.lib; {
+    description = "A high quality audio sampling rate converter";
+    longDescription = ''
+      This program converts sampling rates of PCM wav files. This
+      program also has a function to apply dither to its output and
+      extend perceived dynamic range.
+
+      Sampling rates of 44.1kHz and 48kHz are popularly used, but the
+      ratio between these two frequencies is 147:160, which are not
+      small numbers. As a result, sampling rate conversion without
+      degradation of sound quality requires filter with very large
+      order, and it is difficult to have both quality and speed. This
+      program quickly converts between these sampling frequencies
+      without audible degradation.
+    '';
+
+    version = "${version}";
+    homepage = http://shibatch.sourceforge.net/;
+    license = licenses.gpl2;
+    maintainers = with maintainers; [ leenaars];
+    platforms = with platforms; [ linux ] ;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/streamripper/default.nix b/nixpkgs/pkgs/applications/audio/streamripper/default.nix
new file mode 100644
index 000000000000..39d1c266a373
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/streamripper/default.nix
@@ -0,0 +1,21 @@
+{ stdenv, fetchurl , glib, pkgconfig, libogg, libvorbis, libmad }:
+
+stdenv.mkDerivation rec {
+  name = "streamripper-${version}";
+  version = "1.64.6";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/streamripper/${name}.tar.gz";
+    sha256 = "0hnyv3206r0rfprn3k7k6a0j959kagsfyrmyjm3gsf3vkhp5zmy1";
+  };
+
+  nativeBuildInputs = [ pkgconfig ];
+  buildInputs = [ glib libogg libvorbis libmad ];
+
+  meta = with stdenv.lib; {
+    homepage = http://streamripper.sourceforge.net/;
+    description = "Application that lets you record streaming mp3 to your hard drive";
+    license = licenses.gpl2;
+    maintainers = with maintainers; [ the-kenny ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/sunvox/default.nix b/nixpkgs/pkgs/applications/audio/sunvox/default.nix
new file mode 100644
index 000000000000..47b0bf2e736c
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/sunvox/default.nix
@@ -0,0 +1,48 @@
+{ stdenv, fetchurl, unzip, alsaLib, libX11, libXi, SDL2 }:
+
+let
+  libPath = stdenv.lib.makeLibraryPath [ stdenv.cc.cc alsaLib libX11 libXi SDL2 ];
+  arch =
+    if stdenv.isAarch64
+    then "arm64"
+    else if stdenv.isAarch32
+    then "arm_armhf_raspberry_pi"
+    else if stdenv.is64bit
+    then "x86_64"
+    else "x86";
+in
+stdenv.mkDerivation rec {
+  name = "SunVox-${version}";
+  version = "1.9.3b";
+
+  src = fetchurl {
+    url = "http://www.warmplace.ru/soft/sunvox/sunvox-${version}.zip";
+    sha256 = "0k74rcq7niw4p17vj3zp9lpgi932896dmzqv4ln43g0pz7l18c8b";
+  };
+
+  buildInputs = [ unzip ];
+
+  unpackPhase = "unzip $src";
+
+  dontBuild = true;
+
+  installPhase = ''
+    mkdir -p $out/share $out/bin
+    mv sunvox $out/share/
+
+    bin="$out/share/sunvox/sunvox/linux_${arch}/sunvox"
+    patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
+             --set-rpath "${libPath}" \
+             "$bin"
+
+    ln -s "$bin" $out/bin/sunvox
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Small, fast and powerful modular synthesizer with pattern-based sequencer";
+    license = licenses.unfreeRedistributable;
+    homepage = "http://www.warmplace.ru/soft/sunvox/";
+    maintainers = with maintainers; [ puffnfresh ];
+    platforms = [ "i686-linux" "x86_64-linux" ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/svox/default.nix b/nixpkgs/pkgs/applications/audio/svox/default.nix
new file mode 100644
index 000000000000..5e26b6c1cdb8
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/svox/default.nix
@@ -0,0 +1,43 @@
+{ stdenv, fetchgit }:
+
+stdenv.mkDerivation rec {
+  name = "svox-${version}";
+  version = "2017-07-18";
+
+  src = fetchgit {
+    url = "https://android.googlesource.com/platform/external/svox";
+    rev = "7e68d0e9aac1b5d2ad15e92ddaa3bceb27973fcb";
+    sha256 = "1bqj12w23nn27x64ianm2flrqvkskpvgrnly7ah8gv6k8s8chh3r";
+  };
+
+  postPatch = ''
+    cd pico
+  '';
+
+  buildPhase = ''
+    cd lib
+    for i in *.c; do
+      $CC -O2 -fPIC -c -o ''${i%.c}.o $i
+    done
+    $CC -shared -o libttspico.so *.o
+    cd ..
+  '';
+
+  installPhase = ''
+    install -Dm755 lib/libttspico.so $out/lib/libttspico.so
+    mkdir -p $out/include
+    cp lib/*.h $out/include
+    mkdir -p $out/share/pico/lang
+    cp lang/*.bin $out/share/pico/lang
+  '';
+
+  NIX_CFLAGS_COMPILE = [ "-include stdint.h" ];
+
+  meta = with stdenv.lib; {
+    description = "Text-to-speech engine";
+    homepage = https://android.googlesource.com/platform/external/svox;
+    platforms = platforms.linux;
+    license = licenses.asl20;
+    maintainers = with maintainers; [ abbradar ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/swh-lv2/default.nix b/nixpkgs/pkgs/applications/audio/swh-lv2/default.nix
new file mode 100644
index 000000000000..6fa0eb7f8f2b
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/swh-lv2/default.nix
@@ -0,0 +1,37 @@
+{ stdenv, fetchurl, fftwSinglePrec, libxslt, lv2, pkgconfig }:
+
+stdenv.mkDerivation rec {
+  name = "swh-lv2-${version}";
+  version = "1.0.16";
+
+  src = fetchurl {
+    url = "https://github.com/swh/lv2/archive/v${version}.tar.gz";
+    sha256 = "0j1mih0lp4fds07knp5i32in515sh0df1qi6694pmyz2wqnm295w";
+  };
+
+  patchPhase = ''
+    sed -e "s#xsltproc#${libxslt.bin}/bin/xsltproc#" -i Makefile
+    sed -e "s#PREFIX = /usr/local#PREFIX = $out#" -i Makefile
+  '';
+
+  nativeBuildInputs = [ pkgconfig ];
+  buildInputs = [ fftwSinglePrec lv2 ];
+
+  installPhase = "make install-system";
+
+  meta = with stdenv.lib; {
+    homepage = http://plugin.org.uk;
+    description = "LV2 version of Steve Harris' SWH plugins";
+    longDescription = ''
+      SWH plugins include:
+      amp, fast overdrive, overdrive (with colourisation), comb
+      filter, waveshaper, ringmod, divider, diode, decliper, pitch
+      scaler, 16 band equaliser, sinus wavewrapper, hermes filter,
+      chorus, flanger, decimater, oscillator, gverb, phasers, harmonic
+      generators, surround encoders and more.
+    '';
+    license = licenses.gpl3;
+    maintainers = [ maintainers.goibhniu ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/synthv1/default.nix b/nixpkgs/pkgs/applications/audio/synthv1/default.nix
new file mode 100644
index 000000000000..e44df51404a4
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/synthv1/default.nix
@@ -0,0 +1,23 @@
+{ stdenv, fetchurl, pkgconfig, qt5, libjack2, alsaLib, liblo, lv2 }:
+
+stdenv.mkDerivation rec {
+  name = "synthv1-${version}";
+  version = "0.9.4";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/synthv1/${name}.tar.gz";
+    sha256 = "18xjj14g8gnnbwyrf39bdxc5aswb620w9i323skdf6rnaq229jyv";
+  };
+
+  buildInputs = [ qt5.qtbase qt5.qttools libjack2 alsaLib liblo lv2 ];
+
+  nativeBuildInputs = [ pkgconfig ];
+
+  meta = with stdenv.lib; {
+    description = "An old-school 4-oscillator subtractive polyphonic synthesizer with stereo fx";
+    homepage = https://synthv1.sourceforge.io/;
+    license = licenses.gpl2Plus;
+    platforms = platforms.linux;
+    maintainers = [ maintainers.goibhniu ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/tambura/default.nix b/nixpkgs/pkgs/applications/audio/tambura/default.nix
new file mode 100644
index 000000000000..a739d72898e2
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/tambura/default.nix
@@ -0,0 +1,34 @@
+{ stdenv, fetchFromGitHub, faust2jaqt, faust2lv2 }:
+stdenv.mkDerivation rec {
+  pname = "Tambura";
+  name = "${pname}-${version}";
+  version = "1.0";
+
+  src = fetchFromGitHub {
+    owner = "olilarkin";
+    repo = "${pname}";
+    rev = "v${version}";
+    sha256 = "1w80cmiyzca1wirf5gypg3hcix1ky777id8wnd3k92mn1jf4a24y";
+  };
+
+  buildInputs = [ faust2jaqt faust2lv2 ];
+
+  buildPhase = ''
+    faust2jaqt -vec -time -t 99999 ${pname}.dsp
+    faust2lv2 -vec -time -gui -t 99999 ${pname}.dsp
+  '';
+
+  installPhase = ''
+    mkdir -p $out/bin
+    cp ${pname} $out/bin/
+    mkdir -p $out/lib/lv2
+    cp -r ${pname}.lv2/ $out/lib/lv2
+  '';
+
+  meta = with stdenv.lib; {
+    description = "A FAUST patch inspired by the Indian Tambura/Tanpura - a four string drone instrument, known for its unique rich harmonic timbre";
+    homepage = https://github.com/olilarkin/Tambura;
+    license = licenses.gpl2;
+    maintainers = [ maintainers.magnetophon ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/tetraproc/default.nix b/nixpkgs/pkgs/applications/audio/tetraproc/default.nix
new file mode 100644
index 000000000000..257963de256f
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/tetraproc/default.nix
@@ -0,0 +1,43 @@
+{ stdenv, fetchurl, makeWrapper
+, expat, fftwFloat, fontconfig, freetype, libjack2, jack2Full, libclthreads, libclxclient
+, libsndfile, libxcb, xorg
+}:
+
+stdenv.mkDerivation rec {
+  name = "tetraproc-${version}";
+  version = "0.8.6";
+
+  src = fetchurl {
+    url = "https://kokkinizita.linuxaudio.org/linuxaudio/downloads/${name}.tar.bz2";
+    sha256 = "02155ljfwgvfgq9z258fb4z7jrz7qx022d054fj5gr0v007cv0r7";
+  };
+
+  nativeBuildInputs = [ makeWrapper ];
+
+  buildInputs = [
+    expat libjack2 libclthreads libclxclient fftwFloat fontconfig libsndfile freetype
+    libxcb xorg.libX11 xorg.libXau xorg.libXdmcp xorg.libXft xorg.libXrender
+  ];
+
+  makeFlags = [
+    "PREFIX=$(out)"
+    "SUFFIX=''"
+  ];
+
+  preConfigure = ''
+    cd ./source/
+  '';
+
+  postInstall = ''
+    # Make sure Jack is avalable in $PATH for tetraproc
+    wrapProgram $out/bin/tetraproc --prefix PATH : "${jack2Full}/bin"
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Converts the A-format signals from a tetrahedral Ambisonic microphone into B-format signals ready for recording";
+    homepage = http://kokkinizita.linuxaudio.org/linuxaudio/;
+    license = licenses.gpl2;
+    maintainers = with maintainers; [ magnetophon ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/timemachine/default.nix b/nixpkgs/pkgs/applications/audio/timemachine/default.nix
new file mode 100644
index 000000000000..643f50752985
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/timemachine/default.nix
@@ -0,0 +1,34 @@
+{ stdenv, fetchFromGitHub, autoconf, automake, pkgconfig, gtk2
+, libjack2, libsndfile
+}:
+
+stdenv.mkDerivation rec {
+  name = "timemachine-${version}";
+  version = "0.3.1";
+  src = fetchFromGitHub {
+    owner = "swh";
+    repo = "timemachine";
+    rev = "1966d8524d4e4c47c525473bab3b010a168adc98";
+    sha256 = "0w5alysixnvlkfl79wf7vs5wsw2vgxl3gqxxcm0zbmhjdpmjpcal";
+  };
+
+  nativeBuildInputs = [ pkgconfig ];
+    buildInputs = [ autoconf automake gtk2 libjack2
+      libsndfile
+    ];
+
+  preConfigure = "./autogen.sh";
+
+  NIX_LDFLAGS =  [
+    "-lm"
+  ];
+
+  meta = {
+    description = "JACK audio recorder";
+    homepage = http://plugin.org.uk/timemachine/;
+    license = stdenv.lib.licenses.lgpl2;
+    platforms = stdenv.lib.platforms.linux;
+    maintainers = [ stdenv.lib.maintainers.nico202 ];
+  };
+}
+
diff --git a/nixpkgs/pkgs/applications/audio/tomahawk/default.nix b/nixpkgs/pkgs/applications/audio/tomahawk/default.nix
new file mode 100644
index 000000000000..78bd43383539
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/tomahawk/default.nix
@@ -0,0 +1,56 @@
+{ stdenv, fetchurl, cmake, pkgconfig, attica, boost, gnutls, libechonest
+, liblastfm, lucenepp, phonon, phonon-backend-vlc, qca2, qjson, qt4
+, qtkeychain, quazip, sparsehash, taglib, websocketpp, makeWrapper
+
+, enableXMPP      ? true,  libjreen     ? null
+, enableKDE       ? false, kdelibs4     ? null
+, enableTelepathy ? false, telepathy-qt ? null
+}:
+
+assert enableXMPP      -> libjreen     != null;
+assert enableKDE       -> kdelibs4     != null;
+assert enableTelepathy -> telepathy-qt != null;
+
+stdenv.mkDerivation rec {
+  name = "tomahawk-${version}";
+  version = "0.8.4";
+
+  src = fetchurl {
+    url = "http://download.tomahawk-player.org/${name}.tar.bz2";
+    sha256 = "0j84h36wkjfjbsd7ybyji7rcc9wpjdbl0f1xdcc1g7h0nz34pc0g";
+  };
+
+  cmakeFlags = [
+    "-DLUCENEPP_INCLUDE_DIR=${lucenepp}/include"
+    "-DLUCENEPP_LIBRARY_DIR=${lucenepp}/lib"
+  ];
+
+  nativeBuildInputs = [ pkgconfig ];
+  buildInputs = [
+    cmake attica boost gnutls libechonest liblastfm lucenepp phonon
+    qca2 qjson qt4 qtkeychain quazip sparsehash taglib websocketpp
+    makeWrapper
+  ] ++ stdenv.lib.optional enableXMPP      libjreen
+    ++ stdenv.lib.optional enableKDE       kdelibs4
+    ++ stdenv.lib.optional enableTelepathy telepathy-qt;
+
+  postInstall = let
+    pluginPath = stdenv.lib.concatStringsSep ":" [
+      "${phonon-backend-vlc}/lib/kde4/plugins"
+    ];
+  in ''
+    for i in "$out"/bin/*; do
+      wrapProgram "$i" --prefix QT_PLUGIN_PATH : "${pluginPath}"
+    done
+  '';
+
+  enableParallelBuilding = true;
+
+  meta = with stdenv.lib; {
+    description = "A multi-source music player (unmaintained)";
+    homepage = http://tomahawk-player.org/;
+    license = licenses.gpl3Plus;
+    platforms = platforms.all;
+    broken = true; # 2018-06-25
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/transcode/default.nix b/nixpkgs/pkgs/applications/audio/transcode/default.nix
new file mode 100644
index 000000000000..d7d5b65375e9
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/transcode/default.nix
@@ -0,0 +1,27 @@
+{ stdenv, fetchurl, flac, lame, zlib, libjpeg, libvorbis, libtheora, libxml2
+, lzo, libdvdread, pkgconfig, x264, libmpeg2, xvidcore }:
+
+stdenv.mkDerivation rec {
+  name = "transcode-1.1.7";
+  src = fetchurl {
+    url = "https://bitbucket.org/france/transcode-tcforge/downloads/${name}.tar.bz2";
+    sha256 = "1e4e72d8e0dd62a80b8dd90699f5ca64c9b0cb37a5c9325c184166a9654f0a92";
+  };
+
+  buildInputs = [ flac lame zlib libjpeg libvorbis libtheora libxml2 lzo
+                  libdvdread pkgconfig x264 libmpeg2 xvidcore ];
+  configureFlags = [
+    "--disable-ffmpeg" "--disable-libavcodec" "--disable-libavformat"
+    "--enable-lzo" "--enable-ogg" "--enable-vorbis" "--enable-theora" "--enable-libxml2"
+    "--enable-x264" "--enable-libmpeg2" "--enable-xvid"
+  ];
+
+  enableParallelBuilding = true;
+
+  meta = with stdenv.lib; {
+    description = "Suite of command line utilities for transcoding video and audio codecs, and for converting between different container formats";
+    homepage = http://www.transcoding.org/;
+    license = licenses.lgpl2Plus;
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/transcribe/default.nix b/nixpkgs/pkgs/applications/audio/transcribe/default.nix
new file mode 100644
index 000000000000..9a76f2d15c73
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/transcribe/default.nix
@@ -0,0 +1,72 @@
+{ stdenv, fetchzip, wrapGAppsHook, alsaLib, atk, cairo, gdk_pixbuf
+, glib, gst_all_1,  gtk3, libSM, libX11, libpng12, pango, zlib }:
+
+stdenv.mkDerivation rec {
+  name = "transcribe-${version}";
+  version = "8.72";
+
+  src = if stdenv.hostPlatform.system == "i686-linux" then
+    fetchzip {
+      url = "https://www.seventhstring.com/xscribe/downlinux32/xscsetup.tar.gz";
+      sha256 = "1h5l7ry9c9awpxfnd29b0wm973ifrhj17xl5d2fdsclw2swsickb";
+    }
+  else if stdenv.hostPlatform.system == "x86_64-linux" then
+    fetchzip {
+      url = "https://www.seventhstring.com/xscribe/downlinux64/xsc64setup.tar.gz";
+      sha256 = "1rpd3ppnx5i5yrnfbjrx7h7dk48kwl99i9lnpa75ap7nxvbiznm0";
+    }
+  else throw "Platform not supported";
+
+  nativeBuildInputs = [ wrapGAppsHook ];
+
+  buildInputs = with gst_all_1; [ gst-plugins-base gst-plugins-good
+    gst-plugins-bad gst-plugins-ugly ];
+
+  dontPatchELF = true;
+
+  libPath = with gst_all_1; stdenv.lib.makeLibraryPath [
+    stdenv.cc.cc glib gtk3 atk pango cairo gdk_pixbuf alsaLib
+    libX11 libSM libpng12 gstreamer gst-plugins-base zlib
+  ];
+
+  installPhase = ''
+    mkdir -p $out/bin $out/libexec $out/share/doc
+    cp transcribe $out/libexec
+    cp xschelp.htb readme_gtk.html $out/share/doc
+    cp -r gtkicons $out/share/icons
+
+    ln -s $out/share/doc/xschelp.htb $out/libexec
+
+    patchelf \
+      --set-interpreter $(cat ${stdenv.cc}/nix-support/dynamic-linker) \
+      $out/libexec/transcribe
+  '';
+
+  preFixup = ''
+    gappsWrapperArgs+=(
+      --prefix GST_PLUGIN_SYSTEM_PATH : "$GST_PLUGIN_SYSTEM_PATH_1_0"
+      --prefix LD_LIBRARY_PATH : "${libPath}"
+    )
+  '';
+
+  postFixup = ''
+    ln -s $out/libexec/transcribe $out/bin/
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Software to help transcribe recorded music";
+    longDescription = ''
+      The Transcribe! application is an assistant for people who want
+      to work out a piece of music from a recording, in order to write
+      it out, or play it themselves, or both. It doesn't do the
+      transcribing for you, but it is essentially a specialised player
+      program which is optimised for the purpose of transcription. It
+      has many transcription-specific features not found on
+      conventional music players.
+    '';
+    homepage = https://www.seventhstring.com/xscribe/;
+    license = licenses.unfree;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ michalrus ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/traverso/default.nix b/nixpkgs/pkgs/applications/audio/traverso/default.nix
new file mode 100644
index 000000000000..9729b136d905
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/traverso/default.nix
@@ -0,0 +1,31 @@
+{ stdenv, fetchurl, cmake, pkgconfig
+, alsaLib, fftw, flac, lame, libjack2, libmad, libpulseaudio
+, libsamplerate, libsndfile, libvorbis, portaudio, qtbase, wavpack
+}:
+stdenv.mkDerivation rec {
+  name = "traverso-${version}";
+  version = "0.49.5";
+
+  src = fetchurl {
+    url = "http://traverso-daw.org/traverso-0.49.5.tar.gz";
+    sha256 = "169dsqrf807ciavrd82d3iil0xy0r3i1js08xshcrn80ws9hv63m";
+  };
+
+  nativeBuildInputs = [ cmake pkgconfig ];
+  buildInputs = [ alsaLib fftw flac.dev libjack2 lame
+                  libmad libpulseaudio libsamplerate.dev libsndfile.dev libvorbis
+                  portaudio qtbase wavpack ];
+
+  cmakeFlags = [ "-DWANT_PORTAUDIO=1" "-DWANT_PULSEAUDIO=1" "-DWANT_MP3_ENCODE=1" "-DWANT_LV2=0" ];
+
+  enableParallelBuilding = true;
+  hardeningDisable = [ "format" ];
+
+  meta = with stdenv.lib; {
+    description = "Cross-platform multitrack audio recording and audio editing suite";
+    homepage = http://traverso-daw.org/;
+    license = with licenses; [ gpl2Plus lgpl21Plus ];
+    platforms = platforms.all;
+    maintainers = with maintainers; [ coconnor ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/uade123/default.nix b/nixpkgs/pkgs/applications/audio/uade123/default.nix
new file mode 100644
index 000000000000..7db3b7ec2376
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/uade123/default.nix
@@ -0,0 +1,24 @@
+{ stdenv, fetchurl, which, libao, pkgconfig }:
+
+let
+  version = "2.13";
+in stdenv.mkDerivation rec {
+  name = "uade123-${version}";
+  src = fetchurl {
+    url = "http://zakalwe.fi/uade/uade2/uade-${version}.tar.bz2";
+    sha256 = "04nn5li7xy4g5ysyjjngmv5d3ibxppkbb86m10vrvadzxdd4w69v";
+  };
+  nativeBuildInputs = [ pkgconfig which ];
+  buildInputs = [ libao ];
+
+  enableParallelBuilding = true;
+  hardeningDisable = [ "format" ];
+
+  meta = with stdenv.lib; {
+    description = "Plays old Amiga tunes through UAE emulation and cloned m68k-assembler Eagleplayer API";
+    homepage = http://zakalwe.fi/uade/;
+    license = licenses.gpl2;
+    maintainers = [ stdenv.lib.maintainers.gnidorah ];
+    platforms = stdenv.lib.platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/vcv-rack/default.nix b/nixpkgs/pkgs/applications/audio/vcv-rack/default.nix
new file mode 100644
index 000000000000..27533084804a
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/vcv-rack/default.nix
@@ -0,0 +1,80 @@
+{ stdenv, makeWrapper, fetchFromBitbucket, fetchFromGitHub, pkgconfig
+, alsaLib, curl, glew, glfw, gtk2-x11, jansson, libjack2, libXext, libXi
+, libzip, rtaudio, rtmidi, speex }:
+
+let
+  glfw-git = glfw.overrideAttrs (oldAttrs: rec {
+    name = "glfw-git-${version}";
+    version = "unstable-2018-05-29";
+    src = fetchFromGitHub {
+      owner = "glfw";
+      repo = "glfw";
+      rev = "0be4f3f75aebd9d24583ee86590a38e741db0904";
+      sha256 = "0zbcjgc7ks25yi949k0wjknfl00a4dqmz45mhp00k62vlq2sj0i5";
+    };
+    buildInputs = oldAttrs.buildInputs ++ [ libXext libXi ];
+  });
+  pfft-source = fetchFromBitbucket {
+    owner = "jpommier";
+    repo = "pffft";
+    rev = "29e4f76ac53bef048938754f32231d7836401f79";
+    sha256 = "084csgqa6f1a270bhybjayrh3mpyi2jimc87qkdgsqcp8ycsx1l1";
+  };
+in
+with stdenv.lib; stdenv.mkDerivation rec {
+  name = "VCV-Rack-${version}";
+  version = "0.6.2b";
+
+  src = fetchFromGitHub {
+    owner = "VCVRack";
+    repo = "Rack";
+    rev = "v${version}";
+    sha256 = "17ynhxcci6dyn1yi871fd8yli4924fh12pmk510djwkcj5crhas6";
+    fetchSubmodules = true;
+  };
+
+  prePatch = ''
+    ln -s ${pfft-source} dep/jpommier-pffft-source
+
+    mkdir -p dep/include
+
+    cp dep/jpommier-pffft-source/*.h dep/include
+    cp dep/nanosvg/src/*.h dep/include
+    cp dep/nanovg/src/*.h dep/include
+    cp dep/osdialog/*.h dep/include
+    cp dep/oui-blendish/*.h dep/include
+
+    substituteInPlace include/audio.hpp --replace "<RtAudio.h>" "<rtaudio/RtAudio.h>"
+    substituteInPlace compile.mk --replace "-march=nocona" ""
+    substituteInPlace Makefile \
+       --replace "-Wl,-Bstatic" "" \
+       --replace "-lglfw3" "-lglfw"
+  '';
+
+  enableParallelBuilding = true;
+
+  nativeBuildInputs = [ makeWrapper pkgconfig ];
+  buildInputs = [ glfw-git alsaLib curl glew gtk2-x11 jansson libjack2 libzip rtaudio rtmidi speex ];
+
+  buildFlags = "Rack";
+
+  installPhase = ''
+    install -D -m755 -t $out/bin Rack
+    cp -r res $out/
+
+    mkdir -p $out/share/rack
+    cp LICENSE.txt LICENSE-dist.txt $out/share/rack
+
+    # Override the default global resource file directory
+    wrapProgram $out/bin/Rack --add-flags "-g $out"
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Open-source virtual modular synthesizer";
+    homepage = http://vcvrack.com/;
+    # The source is BSD-3 licensed, some of the art is CC-BY-NC 4.0 or unfree
+    license = [ licenses.bsd3 licenses.cc-by-nc-40 licenses.unfree ];
+    maintainers = with maintainers; [ moredread ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/vimpc/default.nix b/nixpkgs/pkgs/applications/audio/vimpc/default.nix
new file mode 100644
index 000000000000..96a6081c4d8f
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/vimpc/default.nix
@@ -0,0 +1,30 @@
+{ stdenv, fetchFromGitHub, autoreconfHook, mpd_clientlib, ncurses, pcre, pkgconfig
+, taglib }:
+
+stdenv.mkDerivation rec {
+  version = "0.09.1";
+  name = "vimpc-${version}";
+
+  src = fetchFromGitHub {
+    owner = "boysetsfrog";
+    repo = "vimpc";
+    rev = "v${version}";
+    sha256 = "1495a702df4nja8mlxq98mkbic2zv88sjiinimf9qddrfb38jxk6";
+  };
+
+  nativeBuildInputs = [ autoreconfHook pkgconfig ];
+  buildInputs = [ mpd_clientlib ncurses pcre taglib ];
+
+  postInstall = ''
+    mkdir -p $out/etc
+    cp doc/vimpcrc.example $out/etc
+  '';
+
+  meta = with stdenv.lib; {
+    description = "A vi/vim inspired client for the Music Player Daemon (mpd)";
+    homepage = https://github.com/boysetsfrog/vimpc;
+    license = licenses.gpl3;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ pSub ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/vkeybd/default.nix b/nixpkgs/pkgs/applications/audio/vkeybd/default.nix
new file mode 100644
index 000000000000..b7b0fba2d548
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/vkeybd/default.nix
@@ -0,0 +1,32 @@
+{ stdenv, fetchurl, alsaLib, libX11, makeWrapper, tcl, tk }:
+
+stdenv.mkDerivation  rec {
+  name = "vkeybd-${version}";
+  version = "0.1.18d";
+
+  src = fetchurl {
+    url = "ftp://ftp.suse.com/pub/people/tiwai/vkeybd/${name}.tar.bz2";
+    sha256 = "0107b5j1gf7dwp7qb4w2snj4bqiyps53d66qzl2rwj4jfpakws5a";
+  };
+
+  buildInputs = [ alsaLib libX11 makeWrapper tcl tk ];
+
+  configurePhase = ''
+    mkdir -p $out/bin
+    sed -e "s@/usr/local@$out@" -i Makefile
+  '';
+
+  makeFlags = [ "TKLIB=-l${tk.libPrefix}" "TCLLIB=-l${tcl.libPrefix}" ];
+
+  postInstall = ''
+    wrapProgram $out/bin/vkeybd --set TK_LIBRARY "${tk}/lib/${tk.libPrefix}"
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Virtual MIDI keyboard";
+    homepage = http://www.alsa-project.org/~tiwai/alsa.html;
+    license = licenses.gpl2Plus;
+    platforms = platforms.linux;
+    maintainers = [ maintainers.goibhniu ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/vmpk/default.nix b/nixpkgs/pkgs/applications/audio/vmpk/default.nix
new file mode 100644
index 000000000000..dde96764fe6c
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/vmpk/default.nix
@@ -0,0 +1,25 @@
+{ stdenv, fetchurl, cmake, pkgconfig
+, qt4, libjack2
+}:
+
+let
+  version = "0.5.1";
+in stdenv.mkDerivation rec {
+  name = "vmpk-${version}";
+
+  meta = with stdenv.lib; {
+    description = "Virtual MIDI Piano Keyboard";
+    homepage    = "http://vmpk.sourceforge.net/";
+    license     = licenses.gpl3Plus;
+    platforms   = platforms.linux;
+  };
+
+  src = fetchurl {
+    url = "mirror://sourceforge/vmpk/${version}/${name}.tar.bz2";
+    sha256 = "11fqnxgs9hr9255d93n7lazxzjwn8jpmn23nywdksh0pb1ffvfrc";
+  };
+
+  nativeBuildInputs = [ cmake pkgconfig ];
+
+  buildInputs = [ qt4 libjack2 ];
+}
diff --git a/nixpkgs/pkgs/applications/audio/vocal/default.nix b/nixpkgs/pkgs/applications/audio/vocal/default.nix
new file mode 100644
index 000000000000..75f67adf4645
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/vocal/default.nix
@@ -0,0 +1,53 @@
+{ stdenv, fetchFromGitHub, cmake, ninja, pkgconfig, vala_0_40, gtk3, libxml2, granite, webkitgtk, clutter-gtk
+, clutter-gst, libunity, libnotify, sqlite, gst_all_1, libsoup, json-glib, gnome3, gobject-introspection, wrapGAppsHook }:
+
+stdenv.mkDerivation rec {
+  pname = "vocal";
+  version = "2.3.0";
+
+  name = "${pname}-${version}";
+
+  src = fetchFromGitHub {
+    owner = "needle-and-thread";
+    repo = pname;
+    rev = version;
+    sha256 = "1wkkyai14in4yk3q4qq23wk3l49px2xi8z819y3glna236qsq6qp";
+  };
+
+  nativeBuildInputs = [
+    cmake
+    gobject-introspection
+    libxml2
+    ninja
+    pkgconfig
+    vala_0_40 # should be `elementary.vala` when elementary attribute set is merged
+    wrapGAppsHook
+  ];
+
+  buildInputs = with gst_all_1; [
+    clutter-gst
+    clutter-gtk
+    gnome3.defaultIconTheme # should be `elementary.defaultIconTheme`when elementary attribute set is merged
+    gnome3.libgee
+    granite
+    gst-plugins-base
+    gst-plugins-good
+    gstreamer
+    json-glib
+    libnotify
+    libunity
+    sqlite
+    webkitgtk
+  ];
+
+  meta = with stdenv.lib; {
+    description = "The podcast client for the modern free desktop";
+    longDescription = ''
+      Vocal is a powerful, fast, and intuitive application that helps users find new podcasts, manage their libraries, and enjoy the best that indepedent audio and video publishing has to offer. Vocal features full support for both episode downloading and streaming, native system integration, iTunes store search and top 100 charts (with international results support), iTunes link parsing, OPML importing and exporting, and so much more. Plus, it has great smart features like automatically keeping your library clean from old files, and the ability to set custom skip intervals.
+    '';
+    homepage = https://github.com/needle-and-thread/vocal;
+    license = licenses.gpl3Plus;
+    maintainers = with maintainers; [ worldofpeace ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/vorbis-tools/default.nix b/nixpkgs/pkgs/applications/audio/vorbis-tools/default.nix
new file mode 100644
index 000000000000..f815ac02e6e5
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/vorbis-tools/default.nix
@@ -0,0 +1,37 @@
+{ stdenv, fetchurl, fetchzip, libogg, libvorbis, libao, pkgconfig, curl
+, speex, flac }:
+
+let
+  debPatch = fetchzip {
+    url = "mirror://debian/pool/main/v/vorbis-tools/vorbis-tools_1.4.0-6.debian.tar.xz";
+    sha256 = "1xmmpdvxyr84lazlg23c6ck5ic97ga2rkiqabb1d98ix2zdzyqz5";
+  };
+in
+stdenv.mkDerivation {
+  name = "vorbis-tools-1.4.0";
+  src = fetchurl {
+    url = http://downloads.xiph.org/releases/vorbis/vorbis-tools-1.4.0.tar.gz;
+    sha256 = "1g12bnh5ah08v529y72kfdz5lhvy75iaz7f9jskyby23m9dkk2d3";
+  };
+
+  postPatch = ''
+    for patch in $(ls "${debPatch}"/patches/*.{diff,patch} | grep -v debian_subdir)
+    do patch -p1 < "$patch"
+    done
+  '';
+
+  nativeBuildInputs = [ pkgconfig ];
+  buildInputs = [ libogg libvorbis libao curl speex flac ];
+
+  meta = with stdenv.lib; {
+    description = "Extra tools for Ogg-Vorbis audio codec";
+    longDescription = ''
+      A set of command-line tools to manipulate Ogg Vorbis audio
+      files, notably the `ogg123' player and the `oggenc' encoder.
+    '';
+    homepage = https://xiph.org/vorbis/;
+    license = licenses.gpl2;
+    platforms = platforms.all;
+  };
+}
+
diff --git a/nixpkgs/pkgs/applications/audio/wavegain/default.nix b/nixpkgs/pkgs/applications/audio/wavegain/default.nix
new file mode 100644
index 000000000000..5f56fb7297f4
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/wavegain/default.nix
@@ -0,0 +1,24 @@
+{ stdenv, fetchFromGitHub }:
+
+stdenv.mkDerivation {
+  name = "wavegain-1.3.1";
+  src = fetchFromGitHub {
+    owner = "MestreLion";
+    repo = "wavegain";
+    rev = "c928eaf97aeec5732625491b64c882e08e314fee";
+    sha256 = "0wghqnsbypmr4xcrhb568bfjdnxzzp8qgnws3jslzmzf34dpk5ls";
+  };
+
+  installPhase = ''
+    strip -s wavegain
+    install -vD wavegain "$out/bin/wavegain"
+  '';
+
+  meta = {
+    description = "ReplayGain for wave files";
+    homepage = https://github.com/MestreLion/wavegain;
+    license = stdenv.lib.licenses.lgpl21;
+    platforms = stdenv.lib.platforms.linux;
+    maintainers = [ stdenv.lib.maintainers.robbinch ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/whipper/default.nix b/nixpkgs/pkgs/applications/audio/whipper/default.nix
new file mode 100644
index 000000000000..07ab9b55e5bd
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/whipper/default.nix
@@ -0,0 +1,51 @@
+{ stdenv, fetchFromGitHub, python2, cdparanoia, cdrdao, flac
+, sox, accuraterip-checksum, utillinux, substituteAll }:
+
+python2.pkgs.buildPythonApplication rec {
+  name = "whipper-${version}";
+  version = "0.7.3";
+
+  src = fetchFromGitHub {
+    owner = "whipper-team";
+    repo = "whipper";
+    rev = "v${version}";
+    sha256 = "0ypbgc458i7yvbyvg6wg6agz5yzlwm1v6zw7fmyq9h59xsv27mpr";
+  };
+
+  pythonPath = with python2.pkgs; [
+    pygobject3 musicbrainzngs urllib3 chardet
+    pycdio setuptools mutagen CDDB
+    requests
+  ];
+
+  checkInputs = with python2.pkgs; [
+    twisted
+  ];
+
+  patches = [
+    (substituteAll {
+      src = ./paths.patch;
+      inherit cdparanoia;
+    })
+  ];
+
+  makeWrapperArgs = [
+    "--prefix" "PATH" ":" "${stdenv.lib.makeBinPath [ accuraterip-checksum cdrdao utillinux flac sox ]}"
+  ];
+
+  # some tests require internet access
+  # https://github.com/JoeLametta/whipper/issues/291
+  doCheck = false;
+
+  preCheck = ''
+    HOME=$TMPDIR
+  '';
+
+  meta = with stdenv.lib; {
+    homepage = https://github.com/whipper-team/whipper;
+    description = "A CD ripper aiming for accuracy over speed";
+    maintainers = with maintainers; [ rycee jgeerds ];
+    license = licenses.gpl3Plus;
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/whipper/paths.patch b/nixpkgs/pkgs/applications/audio/whipper/paths.patch
new file mode 100644
index 000000000000..14b5384330da
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/whipper/paths.patch
@@ -0,0 +1,32 @@
+--- a/whipper/program/cdparanoia.py
++++ b/whipper/program/cdparanoia.py
+@@ -280,10 +280,10 @@
+ 
+         bufsize = 1024
+         if self._overread:
+-            argv = ["cd-paranoia", "--stderr-progress",
++            argv = ["@cdparanoia@/bin/cdparanoia", "--stderr-progress",
+                     "--sample-offset=%d" % self._offset, "--force-overread", ]
+         else:
+-            argv = ["cd-paranoia", "--stderr-progress",
++            argv = ["@cdparanoia@/bin/cdparanoia", "--stderr-progress",
+                     "--sample-offset=%d" % self._offset, ]
+         if self._device:
+             argv.extend(["--force-cdrom-device", self._device, ])
+@@ -560,7 +560,7 @@
+ 
+ def getCdParanoiaVersion():
+     getter = common.VersionGetter('cd-paranoia',
+-                                  ["cd-paranoia", "-V"],
++                                  ["@cdparanoia@/bin/cdparanoia", "-V"],
+                                   _VERSION_RE,
+                                   "%(version)s %(release)s")
+ 
+@@ -585,7 +585,7 @@
+     def __init__(self, device=None):
+         # cdparanoia -A *always* writes cdparanoia.log
+         self.cwd = tempfile.mkdtemp(suffix='.whipper.cache')
+-        self.command = ['cd-paranoia', '-A']
++        self.command = ['@cdparanoia@/bin/cdparanoia', '-A']
+         if device:
+             self.command += ['-d', device]
diff --git a/nixpkgs/pkgs/applications/audio/wolf-shaper/default.nix b/nixpkgs/pkgs/applications/audio/wolf-shaper/default.nix
new file mode 100644
index 000000000000..562fdc1be8b6
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/wolf-shaper/default.nix
@@ -0,0 +1,47 @@
+{ stdenv, fetchFromGitHub , libjack2, lv2, xorg, liblo, libGL, libXcursor, pkgconfig }:
+
+stdenv.mkDerivation rec {
+  name = "wolf-shaper-${version}";
+  version = "0.1.6";
+
+  src = fetchFromGitHub {
+    owner = "pdesaulniers";
+    repo = "wolf-shaper";
+    rev = "v${version}";
+    sha256 = "01h5dm1nrr0i54ancwznr7wn4vpw08dw0b69v3axy32r5j7plw6s";
+    fetchSubmodules = true;
+  };
+
+  nativeBuildInputs = [ pkgconfig ];
+  buildInputs = [ libjack2 lv2 xorg.libX11 liblo libGL libXcursor  ];
+
+  makeFlags = [
+    "BUILD_LV2=true"
+    "BUILD_DSSI=true"
+    "BUILD_VST2=true"
+    "BUILD_JACK=true"
+  ];
+
+  patchPhase = ''
+    patchShebangs ./dpf/utils/generate-ttl.sh
+  '';
+
+  installPhase = ''
+    mkdir -p $out/lib/lv2
+    mkdir -p $out/lib/dssi
+    mkdir -p $out/lib/vst
+    mkdir -p $out/bin/
+    cp -r bin/wolf-shaper.lv2    $out/lib/lv2/
+    cp -r bin/wolf-shaper-dssi*  $out/lib/dssi/
+    cp -r bin/wolf-shaper-vst.so $out/lib/vst/
+    cp -r bin/wolf-shaper        $out/bin/
+  '';
+
+  meta = with stdenv.lib; {
+    homepage = https://pdesaulniers.github.io/wolf-shaper/;
+    description = "Waveshaper plugin with spline-based graph editor";
+    license = licenses.gpl3;
+    maintainers = [ maintainers.magnetophon ];
+    platforms = [ "i686-linux" "x86_64-linux" ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/x42-plugins/default.nix b/nixpkgs/pkgs/applications/audio/x42-plugins/default.nix
new file mode 100644
index 000000000000..e6041dc9b1c5
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/x42-plugins/default.nix
@@ -0,0 +1,39 @@
+{ stdenv, fetchurl, pkgconfig
+, libltc, libsndfile, libsamplerate, ftgl, freefont_ttf, libjack2
+, libGLU, lv2, gtk2, cairo, pango, fftwFloat, zita-convolver }:
+
+stdenv.mkDerivation rec {
+  version = "20181103";
+  name = "x42-plugins-${version}";
+
+  src = fetchurl {
+    url = "https://gareus.org/misc/x42-plugins/${name}.tar.xz";
+    sha256 = "085d6qjj7nl22f0xamqdrnfxwi8zrfwgkwm1svm73bjkdv270438";
+  };
+
+  nativeBuildInputs = [ pkgconfig ];
+  buildInputs = [ libGLU ftgl freefont_ttf libjack2 libltc libsndfile libsamplerate lv2 gtk2 cairo pango fftwFloat zita-convolver ];
+
+  # Don't remove this. The default fails with 'do not know how to unpack source archive'
+  # every now and then on Hydra. No idea why.
+  unpackPhase = ''
+    tar xf $src
+    sourceRoot=$(echo x42-plugins-*)
+    chmod -R u+w $sourceRoot
+  '';
+
+  makeFlags = [ "PREFIX=$(out)" "FONTFILE=${freefont_ttf}/share/fonts/truetype/FreeSansBold.ttf" ];
+
+  patchPhase = ''
+    patchShebangs ./stepseq.lv2/gridgen.sh
+    sed -i 's|/usr/include/zita-convolver.h|${zita-convolver}/include/zita-convolver.h|g' ./convoLV2/Makefile
+  '';
+
+  meta = with stdenv.lib;
+    { description = "Collection of LV2 plugins by Robin Gareus";
+      homepage = https://github.com/x42/x42-plugins;
+      maintainers = with maintainers; [ magnetophon ];
+      license = licenses.gpl2;
+      platforms = [ "i686-linux" "x86_64-linux" ];
+    };
+}
diff --git a/nixpkgs/pkgs/applications/audio/xmp/default.nix b/nixpkgs/pkgs/applications/audio/xmp/default.nix
new file mode 100644
index 000000000000..d234f6b6b8cc
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/xmp/default.nix
@@ -0,0 +1,20 @@
+{ stdenv, fetchurl, pkgconfig, alsaLib, libxmp }:
+
+stdenv.mkDerivation rec {
+  name = "xmp-4.1.0";
+
+  meta = with stdenv.lib; {
+    description = "Extended module player";
+    homepage    = "http://xmp.sourceforge.net/";
+    license     = licenses.gpl2Plus;
+    platforms   = platforms.linux;
+  };
+
+  src = fetchurl {
+    url = "mirror://sourceforge/xmp/xmp/${name}.tar.gz";
+    sha256 = "17i8fc7x7yn3z1x963xp9iv108gxfakxmdgmpv3mlm438w3n3g8x";
+  };
+
+  nativeBuildInputs = [ pkgconfig ];
+  buildInputs = [ alsaLib libxmp ];
+}
diff --git a/nixpkgs/pkgs/applications/audio/xsynth-dssi/default.nix b/nixpkgs/pkgs/applications/audio/xsynth-dssi/default.nix
new file mode 100644
index 000000000000..a55b47a6c16b
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/xsynth-dssi/default.nix
@@ -0,0 +1,37 @@
+{ stdenv, fetchurl, alsaLib, autoconf, automake, dssi, gtk2, libjack2,
+ladspaH, ladspaPlugins, liblo, pkgconfig }:
+
+stdenv.mkDerivation  rec {
+  name = "xsynth-dssi-${version}";
+  version = "0.9.4";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/dssi/${name}.tar.gz";
+    sha256 = "00nwv2pqjbmxqdc6xdm0cljq6z05lv4y6bibmhz1kih9lm0lklnk";
+  };
+
+  buildInputs = [ alsaLib autoconf automake dssi gtk2 libjack2 ladspaH
+    ladspaPlugins liblo pkgconfig ];
+
+  installPhase = ''
+    mkdir -p $out/bin
+    mkdir -p $out/lib
+    cp src/Xsynth_gtk $out/bin
+    cp src/.libs/* $out/lib
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Classic-analog (VCOs-VCF-VCA) style software synthesizer";
+    longDescription = ''
+      Xsynth-DSSI is a classic-analog (VCOs-VCF-VCA) style software
+      synthesizer which operates as a plugin for the DSSI Soft Synth
+      Interface.  DSSI is a plugin API for software instruments (soft
+      synths) with user interfaces, permitting them to be hosted
+      in-process by audio applications.
+    '';
+    homepage = "http://dssi.sourceforge.net/download.html#Xsynth-DSSI";
+    license = licenses.gpl2Plus;
+    platforms = platforms.linux;
+    maintainers = [ maintainers.goibhniu ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/yasr/10_fix_openpty_forkpty_declarations b/nixpkgs/pkgs/applications/audio/yasr/10_fix_openpty_forkpty_declarations
new file mode 100644
index 000000000000..f575af5ecd31
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/yasr/10_fix_openpty_forkpty_declarations
@@ -0,0 +1,25 @@
+Disable openpty() and forkpty() prototypes when needed.
+--- a/yasr/yasr.h
++++ b/yasr/yasr.h
+@@ -308,8 +308,10 @@ extern void opt_set(int num, void *val);
+ extern void opt_queue_empty(int ll);
+ extern void opt_write(FILE * fp);
+ 
++#ifndef HAVE_OPENPTY
+ /* openpty.c prototypes */
+ extern int openpty(int *, int *, char *, struct termios *, struct winsize *);
++#endif
+ 
+ /* cfmakeraw.c prototypes */
+ extern void cfmakeraw(struct termios *);
+@@ -317,8 +319,10 @@ extern void cfmakeraw(struct termios *);
+ /* login_tty.c prototypes */
+ extern int login_tty(int);
+ 
++#ifndef HAVE_FORKPTY
+ /* forkpty.c prototypes */
+ extern int forkpty(int *, char *, struct termios *, struct winsize *);
++#endif
+ 
+ /* tbc - Would it be more efficient to ensure that "blank" grids always held
+    ascii 0x20 rather than ascii 0x00? */
diff --git a/nixpkgs/pkgs/applications/audio/yasr/20_maxpathlen b/nixpkgs/pkgs/applications/audio/yasr/20_maxpathlen
new file mode 100644
index 000000000000..386c6cbf22bd
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/yasr/20_maxpathlen
@@ -0,0 +1,11 @@
+--- a/yasr/config.c.orig	2011-11-28 03:56:58.764995828 +0100
++++ a/yasr/config.c	2011-11-28 03:57:00.048967703 +0100
+@@ -60,7 +60,7 @@
+   int args, arg[16], *argp;
+   int i, key, ln = 0, mode = 0;
+   char *home, *ptr, *s;
+-  char confname[MAXPATHLEN];
++  char confname[strlen(PACKAGE_DATA_DIR) + 10 + 1];
+ 
+   if ((home = getenv("HOME")) != NULL)
+   {
diff --git a/nixpkgs/pkgs/applications/audio/yasr/30_conf b/nixpkgs/pkgs/applications/audio/yasr/30_conf
new file mode 100644
index 000000000000..98e959f55f31
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/yasr/30_conf
@@ -0,0 +1,18 @@
+diff --git a/yasr.conf b/yasr.conf
+index 1e07fc6..72f5922 100644
+--- a/yasr.conf
++++ b/yasr.conf
+@@ -59,11 +59,11 @@ synthesizer=emacspeak server
+ #synthesizer=speech dispatcher
+ #synthesizer port=S0
+ #synthesizer port=l0
+-synthesizer port=|/usr/local/bin/eflite
++synthesizer port=|eflite
+ # Below line appropriate for Speech Dispatcher in its default configuration
+ #synthesizer port=127.0.0.1:6560
+ key echo=off
+-shell=/bin/bash
++shell=/bin/sh
+ special=off
+ up and down arrows=speak line
+ DisableKey=6925
diff --git a/nixpkgs/pkgs/applications/audio/yasr/40_dectalk_extended_chars b/nixpkgs/pkgs/applications/audio/yasr/40_dectalk_extended_chars
new file mode 100644
index 000000000000..cc1f0af86065
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/yasr/40_dectalk_extended_chars
@@ -0,0 +1,14 @@
+Index: yasr-0.6.9/yasr/tts.c
+===================================================================
+--- yasr-0.6.9.orig/yasr/tts.c	2008-02-03 00:10:07.000000000 +1100
++++ yasr-0.6.9/yasr/tts.c	2012-02-05 10:59:06.059007839 +1100
+@@ -281,6 +281,9 @@
+   char *p = synth[tts.synth].unspeakable;
+ 
+   if (ch < 32) return 1;
++  /* characters with high bit set cause DECTALK to crash */
++  if (tts.synth == TTS_DECTALK && ch & 0x80)
++    return 1;
+   while (*p)
+   {
+     if (*p++ == ch) return 1;
diff --git a/nixpkgs/pkgs/applications/audio/yasr/default.nix b/nixpkgs/pkgs/applications/audio/yasr/default.nix
new file mode 100644
index 000000000000..ca6d6240688a
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/yasr/default.nix
@@ -0,0 +1,28 @@
+{stdenv,fetchurl}:
+
+stdenv.mkDerivation rec {
+  name = "yasr-${version}";
+
+  version = "0.6.9";
+
+  src = fetchurl {
+    url = "https://sourceforge.net/projects/yasr/files/yasr/${version}/${name}.tar.gz";
+    sha256 = "1prv9r9y6jb5ga5578ldiw507fa414m60xhlvjl29278p3x7rwa1";
+  };
+
+  patches = [
+    ./10_fix_openpty_forkpty_declarations
+    ./20_maxpathlen
+    ./30_conf
+    ./40_dectalk_extended_chars
+  ]; # taken from the debian yasr package
+
+  meta = {
+    homepage = http://yasr.sourceforge.net;
+    description = "A general-purpose console screen reader";
+    longDescription = "Yasr is a general-purpose console screen reader for GNU/Linux and other Unix-like operating systems.";
+    platforms = stdenv.lib.platforms.linux;
+    license = stdenv.lib.licenses.gpl2;
+    maintainers = with stdenv.lib.maintainers; [ jhhuh ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/ympd/default.nix b/nixpkgs/pkgs/applications/audio/ympd/default.nix
new file mode 100644
index 000000000000..b800df016c9a
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/ympd/default.nix
@@ -0,0 +1,24 @@
+{ stdenv, fetchFromGitHub, cmake, pkgconfig, mpd_clientlib, openssl }:
+
+stdenv.mkDerivation rec {
+  name = "ympd-${version}";
+  version = "1.3.0";
+
+  src = fetchFromGitHub {
+    owner = "notandy";
+    repo = "ympd";
+    rev = "v${version}";
+    sha256 = "1nvb19jd556v2h2bi7w4dcl507p3p8xvjkqfzrcsy7ccy3502brq";
+  };
+
+  nativeBuildInputs = [ pkgconfig ];
+  buildInputs = [ cmake mpd_clientlib openssl ];
+
+  meta = {
+    homepage = https://www.ympd.org;
+    description = "Standalone MPD Web GUI written in C, utilizing Websockets and Bootstrap/JS";
+    maintainers = [ stdenv.lib.maintainers.siddharthist ];
+    platforms = stdenv.lib.platforms.unix;
+    license = stdenv.lib.licenses.gpl2;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/yoshimi/default.nix b/nixpkgs/pkgs/applications/audio/yoshimi/default.nix
new file mode 100644
index 000000000000..24c033001cb6
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/yoshimi/default.nix
@@ -0,0 +1,44 @@
+{ stdenv, fetchurl, alsaLib, boost, cairo, cmake, fftwSinglePrec, fltk, pcre
+, libjack2, libsndfile, libXdmcp, readline, lv2, libGLU_combined, minixml, pkgconfig, zlib, xorg
+}:
+
+assert stdenv ? glibc;
+
+stdenv.mkDerivation  rec {
+  name = "yoshimi-${version}";
+  version = "1.5.10.1";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/yoshimi/${name}.tar.bz2";
+    sha256 = "02mmy17sa3dlwmjjahn8rfd6h67c5s0q3fvkf6ljrc2mbbpwc375";
+  };
+
+  buildInputs = [
+    alsaLib boost cairo fftwSinglePrec fltk libjack2 libsndfile libXdmcp readline lv2 libGLU_combined
+    minixml zlib xorg.libpthreadstubs pcre
+  ];
+
+  nativeBuildInputs = [ cmake pkgconfig ];
+
+  patchPhase = ''
+    substituteInPlace src/Misc/Config.cpp --replace /usr $out
+    substituteInPlace src/Misc/Bank.cpp --replace /usr $out
+  '';
+
+  preConfigure = "cd src";
+
+  cmakeFlags = [ "-DFLTK_MATH_LIBRARY=${stdenv.glibc.out}/lib/libm.so" ];
+
+  meta = with stdenv.lib; {
+    description = "High quality software synthesizer based on ZynAddSubFX";
+    longDescription = ''
+      Yoshimi delivers the same synthesizer capabilities as
+      ZynAddSubFX along with very good Jack and Alsa midi/audio
+      functionality on Linux
+    '';
+    homepage = http://yoshimi.sourceforge.net;
+    license = licenses.gpl2;
+    platforms = platforms.linux;
+    maintainers = [ maintainers.goibhniu ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/zam-plugins/default.nix b/nixpkgs/pkgs/applications/audio/zam-plugins/default.nix
new file mode 100644
index 000000000000..210d0f7e989d
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/zam-plugins/default.nix
@@ -0,0 +1,32 @@
+{ stdenv, fetchgit , boost, libX11, libGLU_combined, liblo, libjack2, ladspaH, lv2, pkgconfig, rubberband, libsndfile, fftwFloat, libsamplerate }:
+
+stdenv.mkDerivation rec {
+  name = "zam-plugins-${version}";
+  version = "3.10";
+
+  src = fetchgit {
+    url = "https://github.com/zamaudio/zam-plugins.git";
+    deepClone = true;
+    rev = "a3321af1892a6994d64fb705e48ae8adf8d7df20";
+    sha256 = "0yqrs21ph2lx00p0jlc70qkmzfrnf9ihg1r3i9j5n2r903ljdg5p";
+  };
+
+  nativeBuildInputs = [ pkgconfig ];
+  buildInputs = [ boost libX11 libGLU_combined liblo libjack2 ladspaH lv2 rubberband libsndfile fftwFloat libsamplerate ];
+
+  patchPhase = ''
+    patchShebangs ./dpf/utils/generate-ttl.sh
+  '';
+
+  makeFlags = [
+    "PREFIX=$(out)"
+  ];
+
+  meta = with stdenv.lib; {
+    homepage = http://www.zamaudio.com/?p=976;
+    description = "A collection of LV2/LADSPA/VST/JACK audio plugins by ZamAudio";
+    license = licenses.gpl2Plus;
+    maintainers = [ maintainers.magnetophon ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/zita-njbridge/default.nix b/nixpkgs/pkgs/applications/audio/zita-njbridge/default.nix
new file mode 100644
index 000000000000..faa90e684aea
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/zita-njbridge/default.nix
@@ -0,0 +1,32 @@
+{ stdenv, fetchurl, libjack2, zita-resampler }:
+
+stdenv.mkDerivation rec {
+  version = "0.4.4";
+  name = "zita-njbridge-${version}";
+
+  src = fetchurl {
+    url = "https://kokkinizita.linuxaudio.org/linuxaudio/downloads/${name}.tar.bz2";
+    sha256 = "1l8rszdjhp0gq7mr54sdgfs6y6cmw11ssmqb1v9yrkrz5rmwzg8j";
+  };
+
+  buildInputs = [ libjack2 zita-resampler ];
+
+  preConfigure = ''
+    cd ./source/
+  '';
+
+  makeFlags = [
+    "PREFIX=$(out)"
+    "MANDIR=$(out)"
+    "SUFFIX=''"
+  ];
+
+
+  meta = with stdenv.lib; {
+    description = "command line Jack clients to transmit full quality multichannel audio over a local IP network";
+    homepage = http://kokkinizita.linuxaudio.org/linuxaudio/index.html;
+    license = licenses.gpl3;
+    maintainers = [ maintainers.magnetophon ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/audio/zynaddsubfx/default.nix b/nixpkgs/pkgs/applications/audio/zynaddsubfx/default.nix
new file mode 100644
index 000000000000..1b3429f39d7f
--- /dev/null
+++ b/nixpkgs/pkgs/applications/audio/zynaddsubfx/default.nix
@@ -0,0 +1,30 @@
+{ stdenv, fetchurl, alsaLib, cairo, cmake, libjack2, fftw, fltk13, lash,  libjpeg
+, libXpm, minixml, ntk, pkgconfig, zlib, liblo
+}:
+
+stdenv.mkDerivation  rec {
+  name = "zynaddsubfx-${version}";
+  version = "3.0.3";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/zynaddsubfx/zynaddsubfx-${version}.tar.bz2";
+    sha256 = "1hfpiqdm337gl4ynkmmp2qss2m5z8mzqzjrbiyg6w1v4js7l9phi";
+  };
+
+  buildInputs = [ alsaLib cairo libjack2 fftw fltk13 lash libjpeg libXpm minixml ntk zlib liblo ];
+  nativeBuildInputs = [ cmake pkgconfig ];
+
+  patchPhase = ''
+    substituteInPlace src/Misc/Config.cpp --replace /usr $out
+  '';
+
+  hardeningDisable = [ "format" ];
+
+  meta = with stdenv.lib; {
+    description = "High quality software synthesizer";
+    homepage = http://zynaddsubfx.sourceforge.net;
+    license = licenses.gpl2;
+    platforms = platforms.linux;
+    maintainers = [ maintainers.goibhniu maintainers.nico202 ];
+  };
+}