summary refs log tree commit diff
path: root/pkgs/applications/audio
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/applications/audio')
-rw-r--r--pkgs/applications/audio/AMB-plugins/default.nix33
-rw-r--r--pkgs/applications/audio/CHOWTapeModel/default.nix78
-rw-r--r--pkgs/applications/audio/ChowCentaur/default.nix53
-rw-r--r--pkgs/applications/audio/ChowKick/default.nix106
-rw-r--r--pkgs/applications/audio/FIL-plugins/default.nix37
-rw-r--r--pkgs/applications/audio/MMA/default.nix70
-rw-r--r--pkgs/applications/audio/a2jmidid/default.nix30
-rw-r--r--pkgs/applications/audio/aacgain/default.nix68
-rw-r--r--pkgs/applications/audio/abcde/default.nix61
-rw-r--r--pkgs/applications/audio/adlplug/default.nix105
-rw-r--r--pkgs/applications/audio/aeolus/default.nix32
-rw-r--r--pkgs/applications/audio/aether-lv2/default.nix33
-rw-r--r--pkgs/applications/audio/airwave/default.nix92
-rw-r--r--pkgs/applications/audio/aj-snapshot/default.nix32
-rw-r--r--pkgs/applications/audio/amarok/default.nix38
-rw-r--r--pkgs/applications/audio/ams-lv2/default.nix27
-rw-r--r--pkgs/applications/audio/ams/default.nix48
-rw-r--r--pkgs/applications/audio/apple-music-electron/default.nix32
-rw-r--r--pkgs/applications/audio/ardour/as-flags.patch12
-rw-r--r--pkgs/applications/audio/ardour/default.nix190
-rw-r--r--pkgs/applications/audio/ario/default.nix46
-rw-r--r--pkgs/applications/audio/artyFX/default.nix27
-rw-r--r--pkgs/applications/audio/ashuffle/default.nix34
-rw-r--r--pkgs/applications/audio/asunder/default.nix52
-rw-r--r--pkgs/applications/audio/aucatctl/default.nix37
-rw-r--r--pkgs/applications/audio/audacious/default.nix70
-rw-r--r--pkgs/applications/audio/audacity/0001-Use-a-different-approach-to-estimate-the-disk-space-.patch355
-rw-r--r--pkgs/applications/audio/audacity/default.nix182
-rw-r--r--pkgs/applications/audio/audio-recorder/default.nix44
-rw-r--r--pkgs/applications/audio/aumix/default.nix45
-rw-r--r--pkgs/applications/audio/autotalent/default.nix30
-rw-r--r--pkgs/applications/audio/axoloti/default.nix101
-rw-r--r--pkgs/applications/audio/axoloti/dfu-util.nix31
-rw-r--r--pkgs/applications/audio/axoloti/libusb1.nix39
-rw-r--r--pkgs/applications/audio/bambootracker/default.nix46
-rw-r--r--pkgs/applications/audio/baudline/default.nix70
-rw-r--r--pkgs/applications/audio/bchoppr/default.nix28
-rw-r--r--pkgs/applications/audio/beast/patch.patch187
-rw-r--r--pkgs/applications/audio/bespokesynth/default.nix147
-rw-r--r--pkgs/applications/audio/bitmeter/default.nix29
-rw-r--r--pkgs/applications/audio/bitwig-studio/bitwig-studio1.nix98
-rw-r--r--pkgs/applications/audio/bitwig-studio/bitwig-studio2.nix16
-rw-r--r--pkgs/applications/audio/bitwig-studio/bitwig-studio3.nix81
-rw-r--r--pkgs/applications/audio/bitwig-studio/bitwig-studio4.nix80
-rw-r--r--pkgs/applications/audio/bjumblr/default.nix28
-rw-r--r--pkgs/applications/audio/blanket/default.nix69
-rw-r--r--pkgs/applications/audio/boops/default.nix28
-rw-r--r--pkgs/applications/audio/bristol/default.nix34
-rw-r--r--pkgs/applications/audio/bschaffl/default.nix28
-rw-r--r--pkgs/applications/audio/bsequencer/default.nix28
-rw-r--r--pkgs/applications/audio/bshapr/default.nix28
-rw-r--r--pkgs/applications/audio/bslizr/default.nix28
-rw-r--r--pkgs/applications/audio/bucklespring/default.nix63
-rw-r--r--pkgs/applications/audio/cadence/default.nix114
-rw-r--r--pkgs/applications/audio/calf/default.nix27
-rw-r--r--pkgs/applications/audio/callaudiod/default.nix45
-rw-r--r--pkgs/applications/audio/cantata/default.nix121
-rw-r--r--pkgs/applications/audio/cantata/dont-check-for-perl-in-PATH.diff17
-rw-r--r--pkgs/applications/audio/caps/default.nix30
-rw-r--r--pkgs/applications/audio/cardinal/default.nix76
-rw-r--r--pkgs/applications/audio/carla/default.nix93
-rw-r--r--pkgs/applications/audio/caudec/default.nix35
-rw-r--r--pkgs/applications/audio/cava/default.nix38
-rw-r--r--pkgs/applications/audio/cd-discid/default.nix30
-rw-r--r--pkgs/applications/audio/cdparanoia/default.nix53
-rw-r--r--pkgs/applications/audio/cdparanoia/fix_private_keyword.patch468
-rw-r--r--pkgs/applications/audio/cdparanoia/utils.patch68
-rw-r--r--pkgs/applications/audio/cheesecutter/0001-Drop-baked-in-build-date-for-r13y.patch39
-rw-r--r--pkgs/applications/audio/cheesecutter/0002-Prepend-libSDL.dylib-to-macOS-SDL-loader.patch25
-rw-r--r--pkgs/applications/audio/cheesecutter/default.nix59
-rw-r--r--pkgs/applications/audio/chuck/darwin-limits.patch13
-rw-r--r--pkgs/applications/audio/chuck/default.nix41
-rw-r--r--pkgs/applications/audio/cider/default.nix30
-rw-r--r--pkgs/applications/audio/clementine/clementine-spotify-blob.patch13
-rw-r--r--pkgs/applications/audio/clementine/default.nix196
-rw-r--r--pkgs/applications/audio/clerk/default.nix56
-rw-r--r--pkgs/applications/audio/cmt/default.nix33
-rw-r--r--pkgs/applications/audio/cmus/default.nix136
-rw-r--r--pkgs/applications/audio/cmus/option-debugging.patch42
-rw-r--r--pkgs/applications/audio/cmusfm/default.nix36
-rw-r--r--pkgs/applications/audio/cozy/default.nix92
-rw-r--r--pkgs/applications/audio/crip/default.nix68
-rw-r--r--pkgs/applications/audio/csa/default.nix28
-rw-r--r--pkgs/applications/audio/csound/csound-manual/default.nix44
-rw-r--r--pkgs/applications/audio/csound/csound-qt/default.nix52
-rw-r--r--pkgs/applications/audio/csound/csound-qt/rtmidipath.patch17
-rw-r--r--pkgs/applications/audio/csound/default.nix46
-rw-r--r--pkgs/applications/audio/curseradio/default.nix36
-rw-r--r--pkgs/applications/audio/curseradio/mpv.patch11
-rw-r--r--pkgs/applications/audio/cyanrip/default.nix34
-rw-r--r--pkgs/applications/audio/deadbeef/default.nix117
-rw-r--r--pkgs/applications/audio/deadbeef/plugins/headerbar-gtk3.nix30
-rw-r--r--pkgs/applications/audio/deadbeef/plugins/infobar.nix34
-rw-r--r--pkgs/applications/audio/deadbeef/plugins/lyricbar.nix26
-rw-r--r--pkgs/applications/audio/deadbeef/plugins/mpris2.nix23
-rw-r--r--pkgs/applications/audio/deadbeef/plugins/statusnotifier.nix39
-rw-r--r--pkgs/applications/audio/deadbeef/wrapper.nix14
-rw-r--r--pkgs/applications/audio/denemo/default.nix41
-rw-r--r--pkgs/applications/audio/dfasma/default.nix64
-rw-r--r--pkgs/applications/audio/diopser/default.nix76
-rw-r--r--pkgs/applications/audio/dirt/default.nix30
-rw-r--r--pkgs/applications/audio/distrho/default.nix98
-rw-r--r--pkgs/applications/audio/dr14_tmeter/default.nix29
-rw-r--r--pkgs/applications/audio/dragonfly-reverb/default.nix45
-rw-r--r--pkgs/applications/audio/drumgizmo/default.nix30
-rw-r--r--pkgs/applications/audio/drumkv1/default.nix23
-rw-r--r--pkgs/applications/audio/dsf2flac/default.nix34
-rw-r--r--pkgs/applications/audio/easyeffects/default.nix113
-rw-r--r--pkgs/applications/audio/easytag/default.nix41
-rw-r--r--pkgs/applications/audio/ebumeter/default.nix33
-rw-r--r--pkgs/applications/audio/ecasound/default.nix77
-rw-r--r--pkgs/applications/audio/eflite/default.nix51
-rw-r--r--pkgs/applications/audio/eflite/format.patch11
-rw-r--r--pkgs/applications/audio/ekho/default.nix39
-rw-r--r--pkgs/applications/audio/ensemble-chorus/default.nix28
-rw-r--r--pkgs/applications/audio/eq10q/default.nix51
-rw-r--r--pkgs/applications/audio/espeak-ng/default.nix60
-rw-r--r--pkgs/applications/audio/espeak-ng/mbrola.patch22
-rw-r--r--pkgs/applications/audio/espeak/default.nix37
-rw-r--r--pkgs/applications/audio/espeak/edit.nix61
-rw-r--r--pkgs/applications/audio/espeak/espeakedit-configurable-path-espeak-data.patch15
-rw-r--r--pkgs/applications/audio/espeak/espeakedit-configurable-sox-path.patch27
-rw-r--r--pkgs/applications/audio/espeak/espeakedit-fix-makefile.patch26
-rw-r--r--pkgs/applications/audio/espeak/espeakedit-gcc6.patch57
-rw-r--r--pkgs/applications/audio/espeak/gcc6.patch13
-rw-r--r--pkgs/applications/audio/exaile/default.nix107
-rw-r--r--pkgs/applications/audio/faust/faust1.nix207
-rw-r--r--pkgs/applications/audio/faust/faust2.nix229
-rw-r--r--pkgs/applications/audio/faust/faust2alqt.nix15
-rw-r--r--pkgs/applications/audio/faust/faust2alsa.nix29
-rw-r--r--pkgs/applications/audio/faust/faust2csound.nix20
-rw-r--r--pkgs/applications/audio/faust/faust2firefox.nix14
-rw-r--r--pkgs/applications/audio/faust/faust2jack.nix28
-rw-r--r--pkgs/applications/audio/faust/faust2jackrust.nix17
-rw-r--r--pkgs/applications/audio/faust/faust2jaqt.nix26
-rw-r--r--pkgs/applications/audio/faust/faust2ladspa.nix12
-rw-r--r--pkgs/applications/audio/faust/faust2lv2.nix15
-rw-r--r--pkgs/applications/audio/faust/faustlive.nix46
-rw-r--r--pkgs/applications/audio/faustPhysicalModeling/default.nix39
-rw-r--r--pkgs/applications/audio/faustStk/default.nix39
-rw-r--r--pkgs/applications/audio/fdkaac/default.nix31
-rw-r--r--pkgs/applications/audio/flac/default.nix32
-rw-r--r--pkgs/applications/audio/flac123/default.nix21
-rw-r--r--pkgs/applications/audio/flacon/default.nix44
-rw-r--r--pkgs/applications/audio/fluidsynth/default.nix32
-rw-r--r--pkgs/applications/audio/fmit/default.nix51
-rw-r--r--pkgs/applications/audio/fmsynth/default.nix49
-rw-r--r--pkgs/applications/audio/fomp/default.nix22
-rw-r--r--pkgs/applications/audio/foo-yc20/default.nix29
-rw-r--r--pkgs/applications/audio/freac/default.nix38
-rw-r--r--pkgs/applications/audio/freewheeling/default.nix52
-rw-r--r--pkgs/applications/audio/freqtweak/default.nix30
-rw-r--r--pkgs/applications/audio/friture/default.nix68
-rw-r--r--pkgs/applications/audio/ft2-clone/default.nix62
-rw-r--r--pkgs/applications/audio/furnace/default.nix100
-rw-r--r--pkgs/applications/audio/fverb/default.nix34
-rw-r--r--pkgs/applications/audio/game-music-emu/default.nix21
-rw-r--r--pkgs/applications/audio/gbsplay/default.nix32
-rw-r--r--pkgs/applications/audio/geonkick/default.nix31
-rw-r--r--pkgs/applications/audio/giada/default.nix82
-rw-r--r--pkgs/applications/audio/gigedit/default.nix46
-rw-r--r--pkgs/applications/audio/gjay/default.nix42
-rw-r--r--pkgs/applications/audio/gmpc/default.nix66
-rw-r--r--pkgs/applications/audio/gmpc/libmpd-11.8.17-remove-strndup.patch15
-rw-r--r--pkgs/applications/audio/gmu/default.nix50
-rw-r--r--pkgs/applications/audio/gnaural/default.nix33
-rw-r--r--pkgs/applications/audio/gnome-podcasts/default.nix84
-rw-r--r--pkgs/applications/audio/goattracker/default.nix73
-rw-r--r--pkgs/applications/audio/google-play-music-desktop-player/default.nix82
-rw-r--r--pkgs/applications/audio/gpodder/default.nix91
-rw-r--r--pkgs/applications/audio/gpodder/disable-autoupdate.patch34
-rw-r--r--pkgs/applications/audio/gradio/0001-Remove-post-install-script-that-hardcodes-paths.patch23
-rw-r--r--pkgs/applications/audio/gradio/default.nix71
-rw-r--r--pkgs/applications/audio/grandorgue/default.nix32
-rw-r--r--pkgs/applications/audio/greg/default.nix24
-rw-r--r--pkgs/applications/audio/gspeech/default.nix73
-rw-r--r--pkgs/applications/audio/gtkpod/default.nix34
-rw-r--r--pkgs/applications/audio/guitarix/default.nix140
-rw-r--r--pkgs/applications/audio/gwc/default.nix47
-rw-r--r--pkgs/applications/audio/gxmatcheq-lv2/default.nix30
-rw-r--r--pkgs/applications/audio/gxplugins-lv2/default.nix34
-rw-r--r--pkgs/applications/audio/helio-workstation/default.nix49
-rw-r--r--pkgs/applications/audio/helm/default.nix74
-rw-r--r--pkgs/applications/audio/helvum/default.nix60
-rw-r--r--pkgs/applications/audio/hivelytracker/default.nix89
-rw-r--r--pkgs/applications/audio/hqplayer-desktop/default.nix91
-rw-r--r--pkgs/applications/audio/hushboard/default.nix73
-rw-r--r--pkgs/applications/audio/hybridreverb2/default.nix84
-rw-r--r--pkgs/applications/audio/hydrogen/0.nix48
-rw-r--r--pkgs/applications/audio/hydrogen/default.nix34
-rw-r--r--pkgs/applications/audio/iannix/default.nix29
-rw-r--r--pkgs/applications/audio/id3v2/default.nix28
-rw-r--r--pkgs/applications/audio/in-formant/default.nix45
-rw-r--r--pkgs/applications/audio/indicator-sound-switcher/default.nix62
-rw-r--r--pkgs/applications/audio/industrializer/default.nix50
-rw-r--r--pkgs/applications/audio/infamousPlugins/default.nix43
-rw-r--r--pkgs/applications/audio/ingen/default.nix43
-rw-r--r--pkgs/applications/audio/ir.lv2/default.nix43
-rw-r--r--pkgs/applications/audio/jaaa/default.nix32
-rw-r--r--pkgs/applications/audio/jack-capture/default.nix31
-rw-r--r--pkgs/applications/audio/jack-oscrolloscope/default.nix27
-rw-r--r--pkgs/applications/audio/jack-rack/default.nix26
-rw-r--r--pkgs/applications/audio/jackmeter/default.nix22
-rw-r--r--pkgs/applications/audio/jackmix/default.nix35
-rw-r--r--pkgs/applications/audio/jackmix/no_error.patch13
-rw-r--r--pkgs/applications/audio/jalv/default.nix25
-rw-r--r--pkgs/applications/audio/jamesdsp/default.nix60
-rw-r--r--pkgs/applications/audio/jamin/default.nix31
-rw-r--r--pkgs/applications/audio/jamulus/default.nix27
-rw-r--r--pkgs/applications/audio/japa/default.nix30
-rw-r--r--pkgs/applications/audio/jconvolver/default.nix114
-rw-r--r--pkgs/applications/audio/jellycli/default.nix33
-rw-r--r--pkgs/applications/audio/jellycli/fix-test-dir.patch13
-rw-r--r--pkgs/applications/audio/jmusicbot/default.nix31
-rw-r--r--pkgs/applications/audio/kapitonov-plugins-pack/default.nix43
-rw-r--r--pkgs/applications/audio/keyfinder-cli/default.nix31
-rw-r--r--pkgs/applications/audio/keyfinder/default.nix40
-rw-r--r--pkgs/applications/audio/kid3/default.nix109
-rw-r--r--pkgs/applications/audio/klick/default.nix24
-rw-r--r--pkgs/applications/audio/klystrack/default.nix52
-rw-r--r--pkgs/applications/audio/kmetronome/default.nix25
-rw-r--r--pkgs/applications/audio/ladspa-plugins/default.nix40
-rw-r--r--pkgs/applications/audio/ladspa-sdk/default.nix28
-rw-r--r--pkgs/applications/audio/ladspa-sdk/ladspah.nix26
-rw-r--r--pkgs/applications/audio/lash/default.nix39
-rw-r--r--pkgs/applications/audio/lash/gcc-47.patch11
-rw-r--r--pkgs/applications/audio/lash/socket.patch16
-rw-r--r--pkgs/applications/audio/libopenmpt/default.nix42
-rw-r--r--pkgs/applications/audio/librespot/default.nix40
-rw-r--r--pkgs/applications/audio/lingot/default.nix45
-rw-r--r--pkgs/applications/audio/linuxsampler/default.nix41
-rw-r--r--pkgs/applications/audio/littlegptracker/0001-Remove-coherency-checks.patch52
-rw-r--r--pkgs/applications/audio/littlegptracker/default.nix74
-rw-r--r--pkgs/applications/audio/lmms/default.nix48
-rw-r--r--pkgs/applications/audio/lollypop/default.nix112
-rw-r--r--pkgs/applications/audio/losslessaudiochecker/default.nix29
-rw-r--r--pkgs/applications/audio/lsp-plugins/default.nix182
-rw-r--r--pkgs/applications/audio/ltc-tools/default.nix25
-rw-r--r--pkgs/applications/audio/luppp/default.nix47
-rw-r--r--pkgs/applications/audio/lv2-cpp-tools/default.nix28
-rw-r--r--pkgs/applications/audio/lv2bm/default.nix28
-rw-r--r--pkgs/applications/audio/lv2lint/default.nix22
-rw-r--r--pkgs/applications/audio/lyrebird/default.nix63
-rw-r--r--pkgs/applications/audio/m4acut/default.nix24
-rw-r--r--pkgs/applications/audio/magnetophonDSP/CharacterCompressor/default.nix37
-rw-r--r--pkgs/applications/audio/magnetophonDSP/CompBus/default.nix43
-rw-r--r--pkgs/applications/audio/magnetophonDSP/ConstantDetuneChorus/default.nix33
-rw-r--r--pkgs/applications/audio/magnetophonDSP/LazyLimiter/default.nix33
-rw-r--r--pkgs/applications/audio/magnetophonDSP/MBdistortion/default.nix40
-rw-r--r--pkgs/applications/audio/magnetophonDSP/RhythmDelay/default.nix33
-rw-r--r--pkgs/applications/audio/magnetophonDSP/VoiceOfFaust/default.nix56
-rw-r--r--pkgs/applications/audio/magnetophonDSP/faustCompressors/default.nix48
-rw-r--r--pkgs/applications/audio/magnetophonDSP/pluginUtils/default.nix40
-rw-r--r--pkgs/applications/audio/magnetophonDSP/shelfMultiBand/default.nix37
-rw-r--r--pkgs/applications/audio/mamba/default.nix41
-rw-r--r--pkgs/applications/audio/mbrola/default.nix42
-rw-r--r--pkgs/applications/audio/mda-lv2/default.nix22
-rw-r--r--pkgs/applications/audio/mellowplayer/default.nix70
-rw-r--r--pkgs/applications/audio/melmatcheq.lv2/default.nix28
-rw-r--r--pkgs/applications/audio/meterbridge/buf_rect.patch12
-rw-r--r--pkgs/applications/audio/meterbridge/default.nix26
-rw-r--r--pkgs/applications/audio/meterbridge/fix_build_with_gcc-5.patch31
-rw-r--r--pkgs/applications/audio/meters_lv2/default.nix53
-rw-r--r--pkgs/applications/audio/mhwaveedit/default.nix39
-rw-r--r--pkgs/applications/audio/mi2ly/default.nix32
-rw-r--r--pkgs/applications/audio/mid2key/default.nix26
-rw-r--r--pkgs/applications/audio/midas/generic.nix43
-rw-r--r--pkgs/applications/audio/midas/m32edit.nix10
-rw-r--r--pkgs/applications/audio/midas/x32edit.nix10
-rw-r--r--pkgs/applications/audio/midi-visualizer/default.nix42
-rw-r--r--pkgs/applications/audio/midisheetmusic/default.nix62
-rw-r--r--pkgs/applications/audio/mikmod/default.nix21
-rw-r--r--pkgs/applications/audio/milkytracker/default.nix41
-rw-r--r--pkgs/applications/audio/mimic/default.nix42
-rw-r--r--pkgs/applications/audio/miniaudicle/default.nix59
-rw-r--r--pkgs/applications/audio/mixxx/default.nix142
-rw-r--r--pkgs/applications/audio/mmtc/default.nix32
-rw-r--r--pkgs/applications/audio/moc/default.nix102
-rw-r--r--pkgs/applications/audio/moc/moc-ffmpeg4.patch33
-rw-r--r--pkgs/applications/audio/moc/pulseaudio.patch800
-rw-r--r--pkgs/applications/audio/mod-arpeggiator-lv2/default.nix26
-rw-r--r--pkgs/applications/audio/mod-distortion/default.nix25
-rw-r--r--pkgs/applications/audio/molot-lite/default.nix34
-rw-r--r--pkgs/applications/audio/monkeys-audio/buildfix.diff49
-rw-r--r--pkgs/applications/audio/monkeys-audio/default.nix20
-rw-r--r--pkgs/applications/audio/mooSpace/default.nix35
-rw-r--r--pkgs/applications/audio/mopidy/default.nix47
-rw-r--r--pkgs/applications/audio/mopidy/iris.nix29
-rw-r--r--pkgs/applications/audio/mopidy/jellyfin.nix25
-rw-r--r--pkgs/applications/audio/mopidy/local.nix30
-rw-r--r--pkgs/applications/audio/mopidy/moped.nix26
-rw-r--r--pkgs/applications/audio/mopidy/mopidy.nix51
-rw-r--r--pkgs/applications/audio/mopidy/mopify.nix23
-rw-r--r--pkgs/applications/audio/mopidy/mpd.nix24
-rw-r--r--pkgs/applications/audio/mopidy/mpris.nix27
-rw-r--r--pkgs/applications/audio/mopidy/muse.nix29
-rw-r--r--pkgs/applications/audio/mopidy/musicbox-webclient.nix24
-rw-r--r--pkgs/applications/audio/mopidy/podcast.nix31
-rw-r--r--pkgs/applications/audio/mopidy/scrobbler.nix24
-rw-r--r--pkgs/applications/audio/mopidy/somafm.nix26
-rw-r--r--pkgs/applications/audio/mopidy/soundcloud.nix23
-rw-r--r--pkgs/applications/audio/mopidy/spotify-tunigo.nix23
-rw-r--r--pkgs/applications/audio/mopidy/spotify.nix25
-rw-r--r--pkgs/applications/audio/mopidy/subidy.nix24
-rw-r--r--pkgs/applications/audio/mopidy/tunein.nix25
-rw-r--r--pkgs/applications/audio/mopidy/youtube.nix56
-rw-r--r--pkgs/applications/audio/mopidy/ytmusic.nix35
-rw-r--r--pkgs/applications/audio/mousai/default.nix79
-rw-r--r--pkgs/applications/audio/mousai/paths.patch13
-rw-r--r--pkgs/applications/audio/mp3blaster/default.nix42
-rw-r--r--pkgs/applications/audio/mp3gain/default.nix37
-rw-r--r--pkgs/applications/audio/mp3info/default.nix46
-rw-r--r--pkgs/applications/audio/mp3splt/default.nix26
-rw-r--r--pkgs/applications/audio/mp3val/default.nix37
-rw-r--r--pkgs/applications/audio/mpc/default.nix62
-rw-r--r--pkgs/applications/audio/mpc123/default.nix33
-rw-r--r--pkgs/applications/audio/mpc123/use-gcc.patch13
-rw-r--r--pkgs/applications/audio/mpdevil/default.nix53
-rw-r--r--pkgs/applications/audio/mpg123/default.nix72
-rw-r--r--pkgs/applications/audio/mpg321/default.nix42
-rw-r--r--pkgs/applications/audio/munt/libmt32emu.nix38
-rw-r--r--pkgs/applications/audio/munt/mt32emu-qt.nix75
-rw-r--r--pkgs/applications/audio/munt/mt32emu-smf2wav.nix50
-rw-r--r--pkgs/applications/audio/mup/default.nix41
-rw-r--r--pkgs/applications/audio/mup/ghostscript-permit-file-write.patch5
-rw-r--r--pkgs/applications/audio/muse/default.nix46
-rw-r--r--pkgs/applications/audio/muse/fix-parallel-building.patch93
-rw-r--r--pkgs/applications/audio/musescore/darwin.nix37
-rw-r--r--pkgs/applications/audio/musescore/default.nix56
-rw-r--r--pkgs/applications/audio/musescore/remove_qtwebengine_install_hack.patch19
-rw-r--r--pkgs/applications/audio/musikcube/default.nix70
-rw-r--r--pkgs/applications/audio/musly/default.nix33
-rw-r--r--pkgs/applications/audio/muso/default.nix37
-rw-r--r--pkgs/applications/audio/mympd/default.nix52
-rw-r--r--pkgs/applications/audio/myxer/default.nix38
-rw-r--r--pkgs/applications/audio/ncmpc/default.nix46
-rw-r--r--pkgs/applications/audio/ncmpcpp/default.nix52
-rw-r--r--pkgs/applications/audio/ncpamixer/default.nix29
-rw-r--r--pkgs/applications/audio/ncspot/default.nix49
-rw-r--r--pkgs/applications/audio/ncspot/rust_1_57_support.patch21
-rw-r--r--pkgs/applications/audio/netease-cloud-music-gtk/cargo-lock.patch2007
-rw-r--r--pkgs/applications/audio/netease-cloud-music-gtk/default.nix60
-rwxr-xr-xpkgs/applications/audio/netease-cloud-music-gtk/update-cargo-lock.sh20
-rw-r--r--pkgs/applications/audio/netease-music-tui/cargo-lock.patch2655
-rw-r--r--pkgs/applications/audio/netease-music-tui/default.nix27
-rw-r--r--pkgs/applications/audio/netease-music-tui/update-cargo-lock.sh20
-rw-r--r--pkgs/applications/audio/new-session-manager/default.nix27
-rw-r--r--pkgs/applications/audio/ninjas2/default.nix39
-rw-r--r--pkgs/applications/audio/noise-repellent/default.nix29
-rw-r--r--pkgs/applications/audio/noisetorch/default.nix42
-rw-r--r--pkgs/applications/audio/non/default.nix27
-rw-r--r--pkgs/applications/audio/nootka/default.nix34
-rw-r--r--pkgs/applications/audio/nootka/unstable.nix53
-rw-r--r--pkgs/applications/audio/normalize/default.nix20
-rw-r--r--pkgs/applications/audio/nova-filters/default.nix31
-rw-r--r--pkgs/applications/audio/nuclear/default.nix32
-rw-r--r--pkgs/applications/audio/ocenaudio/default.nix54
-rw-r--r--pkgs/applications/audio/open-music-kontrollers/eteroj.nix10
-rw-r--r--pkgs/applications/audio/open-music-kontrollers/generic.nix37
-rw-r--r--pkgs/applications/audio/open-music-kontrollers/jit.nix12
-rw-r--r--pkgs/applications/audio/open-music-kontrollers/mephisto.nix17
-rw-r--r--pkgs/applications/audio/open-music-kontrollers/midi_matrix.nix10
-rw-r--r--pkgs/applications/audio/open-music-kontrollers/moony.nix13
-rw-r--r--pkgs/applications/audio/open-music-kontrollers/orbit.nix12
-rw-r--r--pkgs/applications/audio/open-music-kontrollers/patchmatrix.nix13
-rw-r--r--pkgs/applications/audio/open-music-kontrollers/router.nix11
-rw-r--r--pkgs/applications/audio/open-music-kontrollers/sherlock.nix12
-rw-r--r--pkgs/applications/audio/open-music-kontrollers/synthpod.nix13
-rw-r--r--pkgs/applications/audio/open-music-kontrollers/vm.nix10
-rw-r--r--pkgs/applications/audio/opus-tools/default.nix22
-rw-r--r--pkgs/applications/audio/opusfile/default.nix27
-rw-r--r--pkgs/applications/audio/opusfile/disable-cert-store.patch35
-rw-r--r--pkgs/applications/audio/opusfile/include-multistream.patch12
-rw-r--r--pkgs/applications/audio/opustags/default.nix37
-rw-r--r--pkgs/applications/audio/orca-c/default.nix38
-rw-r--r--pkgs/applications/audio/osmid/default.nix37
-rw-r--r--pkgs/applications/audio/oxefmsynth/default.nix43
-rw-r--r--pkgs/applications/audio/padthv1/default.nix23
-rw-r--r--pkgs/applications/audio/pamix/default.nix44
-rw-r--r--pkgs/applications/audio/pamixer/default.nix35
-rw-r--r--pkgs/applications/audio/paprefs/default.nix52
-rw-r--r--pkgs/applications/audio/parlatype/default.nix66
-rw-r--r--pkgs/applications/audio/patchage/default.nix26
-rw-r--r--pkgs/applications/audio/paulstretch/default.nix59
-rw-r--r--pkgs/applications/audio/pavucontrol/default.nix54
-rw-r--r--pkgs/applications/audio/pd-plugins/cyclone/default.nix33
-rw-r--r--pkgs/applications/audio/pd-plugins/gem/default.nix50
-rw-r--r--pkgs/applications/audio/pd-plugins/helmholtz/default.nix47
-rw-r--r--pkgs/applications/audio/pd-plugins/maxlib/default.nix33
-rw-r--r--pkgs/applications/audio/pd-plugins/mrpeach/default.nix62
-rw-r--r--pkgs/applications/audio/pd-plugins/puremapping/default.nix32
-rw-r--r--pkgs/applications/audio/pd-plugins/timbreid/default.nix46
-rw-r--r--pkgs/applications/audio/pd-plugins/zexy/default.nix36
-rw-r--r--pkgs/applications/audio/petrifoo/default.nix27
-rw-r--r--pkgs/applications/audio/pianobar/default.nix28
-rw-r--r--pkgs/applications/audio/pianobooster/default.nix31
-rw-r--r--pkgs/applications/audio/pianoteq/default.nix200
-rw-r--r--pkgs/applications/audio/picard/default.nix69
-rw-r--r--pkgs/applications/audio/picoloop/default.nix50
-rw-r--r--pkgs/applications/audio/pithos/default.nix36
-rw-r--r--pkgs/applications/audio/playbar2/default.nix39
-rw-r--r--pkgs/applications/audio/plexamp/default.nix41
-rwxr-xr-xpkgs/applications/audio/plexamp/update-plexamp.sh54
-rw-r--r--pkgs/applications/audio/plugin-torture/default.nix30
-rw-r--r--pkgs/applications/audio/plujain-ramp/default.nix27
-rw-r--r--pkgs/applications/audio/pmidi/default.nix22
-rw-r--r--pkgs/applications/audio/pocket-casts/default.nix55
-rw-r--r--pkgs/applications/audio/polyphone/default.nix49
-rw-r--r--pkgs/applications/audio/ponymix/default.nix26
-rw-r--r--pkgs/applications/audio/praat/default.nix34
-rw-r--r--pkgs/applications/audio/pragha/default.nix103
-rw-r--r--pkgs/applications/audio/projectm/default.nix65
-rw-r--r--pkgs/applications/audio/psst/default.nix39
-rw-r--r--pkgs/applications/audio/pt2-clone/default.nix37
-rw-r--r--pkgs/applications/audio/ptcollab/default.nix53
-rw-r--r--pkgs/applications/audio/puddletag/default.nix76
-rw-r--r--pkgs/applications/audio/pulseaudio-ctl/default.nix41
-rw-r--r--pkgs/applications/audio/pulseaudio-dlna/0001-setup.py-remove-dbus-python-from-list.patch25
-rw-r--r--pkgs/applications/audio/pulseaudio-dlna/default.nix75
-rw-r--r--pkgs/applications/audio/pulseaudio-dlna/zeroconf.nix30
-rw-r--r--pkgs/applications/audio/pulseaudio-modules-bt/default.nix91
-rw-r--r--pkgs/applications/audio/pulseaudio-modules-bt/fix-install-path.patch11
-rw-r--r--pkgs/applications/audio/pulseeffects-legacy/default.nix115
-rw-r--r--pkgs/applications/audio/puredata/default.nix38
-rw-r--r--pkgs/applications/audio/puredata/wrapper.nix16
-rw-r--r--pkgs/applications/audio/pyradio/default.nix30
-rw-r--r--pkgs/applications/audio/qjackctl/default.nix46
-rw-r--r--pkgs/applications/audio/qmidiarp/default.nix49
-rw-r--r--pkgs/applications/audio/qmidinet/default.nix25
-rw-r--r--pkgs/applications/audio/qmidiroute/default.nix30
-rw-r--r--pkgs/applications/audio/qmmp/default.nix63
-rw-r--r--pkgs/applications/audio/qpwgraph/default.nix34
-rw-r--r--pkgs/applications/audio/qsampler/default.nix27
-rw-r--r--pkgs/applications/audio/qsynth/default.nix27
-rw-r--r--pkgs/applications/audio/qtractor/default.nix79
-rw-r--r--pkgs/applications/audio/qtscrobbler/default.nix34
-rw-r--r--pkgs/applications/audio/quadrafuzz/default.nix43
-rw-r--r--pkgs/applications/audio/quodlibet/default.nix86
-rw-r--r--pkgs/applications/audio/r128gain/default.nix44
-rw-r--r--pkgs/applications/audio/r128gain/ffmpeg-location.patch29
-rw-r--r--pkgs/applications/audio/radiotray-ng/default.nix98
-rw-r--r--pkgs/applications/audio/radiotray-ng/no-dl-googletest.patch55
-rw-r--r--pkgs/applications/audio/rakarrack/default.nix27
-rw-r--r--pkgs/applications/audio/rakarrack/fltk-path.patch35
-rw-r--r--pkgs/applications/audio/real_time_config_quick_scan/default.nix53
-rw-r--r--pkgs/applications/audio/reaper/default.nix83
-rw-r--r--pkgs/applications/audio/redoflacs/default.nix47
-rw-r--r--pkgs/applications/audio/redux/default.nix49
-rw-r--r--pkgs/applications/audio/renoise/default.nix86
-rw-r--r--pkgs/applications/audio/rhvoice/default.nix41
-rw-r--r--pkgs/applications/audio/rhvoice/honor_nix_environment.patch14
-rw-r--r--pkgs/applications/audio/rhythmbox/default.nix102
-rw-r--r--pkgs/applications/audio/rkrlv2/default.nix26
-rw-r--r--pkgs/applications/audio/rofi-mpd/default.nix26
-rw-r--r--pkgs/applications/audio/rofi-pulse-select/default.nix40
-rw-r--r--pkgs/applications/audio/roomeqwizard/default.nix118
-rw-r--r--pkgs/applications/audio/rosegarden/default.nix70
-rw-r--r--pkgs/applications/audio/rubyripper/default.nix38
-rw-r--r--pkgs/applications/audio/rymcast/default.nix32
-rw-r--r--pkgs/applications/audio/samplv1/default.nix26
-rw-r--r--pkgs/applications/audio/sayonara/default.nix78
-rw-r--r--pkgs/applications/audio/sc68/default.nix39
-rw-r--r--pkgs/applications/audio/schismtracker/default.nix37
-rw-r--r--pkgs/applications/audio/scream/default.nix46
-rw-r--r--pkgs/applications/audio/seq24/default.nix24
-rw-r--r--pkgs/applications/audio/seq24/mutex_no_nameclash.patch58
-rw-r--r--pkgs/applications/audio/seq66/default.nix37
-rw-r--r--pkgs/applications/audio/setbfree/default.nix35
-rw-r--r--pkgs/applications/audio/sfizz/default.nix59
-rw-r--r--pkgs/applications/audio/sfxr-qt/default.nix43
-rw-r--r--pkgs/applications/audio/sfxr/default.nix56
-rw-r--r--pkgs/applications/audio/shntool/default.nix21
-rw-r--r--pkgs/applications/audio/shortwave/default.nix87
-rw-r--r--pkgs/applications/audio/sidplayfp/default.nix54
-rw-r--r--pkgs/applications/audio/sisco.lv2/default.nix44
-rw-r--r--pkgs/applications/audio/snapcast/default.nix73
-rw-r--r--pkgs/applications/audio/snd/default.nix33
-rw-r--r--pkgs/applications/audio/sndpeek/default.nix56
-rw-r--r--pkgs/applications/audio/sndpeek/pthread.patch13
-rw-r--r--pkgs/applications/audio/sonata/default.nix81
-rw-r--r--pkgs/applications/audio/songrec/default.nix40
-rw-r--r--pkgs/applications/audio/sonic-lineup/default.nix38
-rw-r--r--pkgs/applications/audio/sonic-pi/default.nix121
-rw-r--r--pkgs/applications/audio/sonic-visualiser/default.nix54
-rw-r--r--pkgs/applications/audio/sony-headphones-client/default.nix44
-rw-r--r--pkgs/applications/audio/sooperlooper/default.nix70
-rw-r--r--pkgs/applications/audio/sorcer/default.nix35
-rw-r--r--pkgs/applications/audio/sound-juicer/default.nix70
-rw-r--r--pkgs/applications/audio/soundconverter/default.nix85
-rw-r--r--pkgs/applications/audio/soundkonverter/default.nix106
-rw-r--r--pkgs/applications/audio/soundscape-renderer/default.nix56
-rw-r--r--pkgs/applications/audio/soundtracker/default.nix75
-rwxr-xr-xpkgs/applications/audio/soundwireserver/default.nix39
-rw-r--r--pkgs/applications/audio/spectmorph/default.nix24
-rw-r--r--pkgs/applications/audio/spectrojack/default.nix31
-rw-r--r--pkgs/applications/audio/speech-denoiser/default.nix44
-rw-r--r--pkgs/applications/audio/spek/default.nix28
-rw-r--r--pkgs/applications/audio/split2flac/default.nix62
-rw-r--r--pkgs/applications/audio/spot/default.nix84
-rw-r--r--pkgs/applications/audio/spotify-cli-linux/default.nix29
-rw-r--r--pkgs/applications/audio/spotify-qt/default.nix36
-rw-r--r--pkgs/applications/audio/spotify-tui/default.nix35
-rw-r--r--pkgs/applications/audio/spotify/default.nix174
-rwxr-xr-xpkgs/applications/audio/spotify/update.sh88
-rw-r--r--pkgs/applications/audio/spotify/wrapper.nix31
-rw-r--r--pkgs/applications/audio/spotifyd/default.nix48
-rw-r--r--pkgs/applications/audio/spotifywm/default.nix31
-rw-r--r--pkgs/applications/audio/sptlrx/default.nix24
-rw-r--r--pkgs/applications/audio/squeezelite/default.nix88
-rw-r--r--pkgs/applications/audio/squishyball/default.nix60
-rw-r--r--pkgs/applications/audio/squishyball/gnu-screen.patch20
-rw-r--r--pkgs/applications/audio/ssrc/default.nix41
-rw-r--r--pkgs/applications/audio/stochas/default.nix33
-rw-r--r--pkgs/applications/audio/stone-phaser/default.nix34
-rw-r--r--pkgs/applications/audio/strawberry/default.nix104
-rw-r--r--pkgs/applications/audio/streamripper/default.nix20
-rw-r--r--pkgs/applications/audio/string-machine/default.nix36
-rw-r--r--pkgs/applications/audio/sublime-music/default.nix97
-rw-r--r--pkgs/applications/audio/sunvox/default.nix48
-rw-r--r--pkgs/applications/audio/surge-XT/default.nix93
-rw-r--r--pkgs/applications/audio/surge/default.nix54
-rw-r--r--pkgs/applications/audio/svox/default.nix30
-rw-r--r--pkgs/applications/audio/swh-lv2/default.nix39
-rw-r--r--pkgs/applications/audio/synthv1/default.nix23
-rw-r--r--pkgs/applications/audio/tageditor/default.nix56
-rw-r--r--pkgs/applications/audio/tagutil/default.nix45
-rw-r--r--pkgs/applications/audio/talentedhack/default.nix36
-rw-r--r--pkgs/applications/audio/tambura/default.nix33
-rw-r--r--pkgs/applications/audio/tamgamp.lv2/default.nix53
-rw-r--r--pkgs/applications/audio/tap-plugins/default.nix32
-rw-r--r--pkgs/applications/audio/tauon/default.nix122
-rw-r--r--pkgs/applications/audio/tenacity/default.nix148
-rw-r--r--pkgs/applications/audio/termusic/default.nix28
-rw-r--r--pkgs/applications/audio/tetraproc/default.nix43
-rw-r--r--pkgs/applications/audio/timemachine/default.nix32
-rw-r--r--pkgs/applications/audio/tonelib-gfx/default.nix58
-rw-r--r--pkgs/applications/audio/tonelib-jam/default.nix61
-rw-r--r--pkgs/applications/audio/tonelib-zoom/default.nix63
-rw-r--r--pkgs/applications/audio/tony/default.nix38
-rw-r--r--pkgs/applications/audio/transcode/default.nix28
-rw-r--r--pkgs/applications/audio/transcribe/default.nix101
-rw-r--r--pkgs/applications/audio/traverso/default.nix30
-rw-r--r--pkgs/applications/audio/tree-from-tags/Gemfile3
-rw-r--r--pkgs/applications/audio/tree-from-tags/Gemfile.lock13
-rw-r--r--pkgs/applications/audio/tree-from-tags/default.nix38
-rw-r--r--pkgs/applications/audio/tree-from-tags/gemset.nix10
-rw-r--r--pkgs/applications/audio/tunefish/default.nix43
-rw-r--r--pkgs/applications/audio/uade123/default.nix74
-rw-r--r--pkgs/applications/audio/uhhyou.lv2/default.nix67
-rw-r--r--pkgs/applications/audio/vcv-rack/default.nix101
-rw-r--r--pkgs/applications/audio/vcv-rack/rack-minimize-vendoring.patch13
-rw-r--r--pkgs/applications/audio/vgmstream/default.nix42
-rwxr-xr-xpkgs/applications/audio/vgmstream/update.sh77
-rw-r--r--pkgs/applications/audio/vimpc/default.nix50
-rw-r--r--pkgs/applications/audio/virtual-ans/default.nix89
-rw-r--r--pkgs/applications/audio/vkeybd/default.nix33
-rw-r--r--pkgs/applications/audio/vmpk/default.nix31
-rw-r--r--pkgs/applications/audio/vocal/default.nix99
-rw-r--r--pkgs/applications/audio/vocproc/default.nix27
-rw-r--r--pkgs/applications/audio/vorbis-tools/default.nix28
-rw-r--r--pkgs/applications/audio/waon/default.nix30
-rw-r--r--pkgs/applications/audio/wavegain/default.nix37
-rw-r--r--pkgs/applications/audio/whipper/default.nix81
-rw-r--r--pkgs/applications/audio/wolf-shaper/default.nix47
-rw-r--r--pkgs/applications/audio/x42-avldrums/default.nix31
-rw-r--r--pkgs/applications/audio/x42-gmsynth/default.nix30
-rw-r--r--pkgs/applications/audio/x42-plugins/default.nix41
-rw-r--r--pkgs/applications/audio/xmp/default.nix21
-rw-r--r--pkgs/applications/audio/xsynth-dssi/default.nix37
-rw-r--r--pkgs/applications/audio/xtuner/default.nix39
-rw-r--r--pkgs/applications/audio/yams/default.nix29
-rw-r--r--pkgs/applications/audio/yasr/10_fix_openpty_forkpty_declarations.patch25
-rw-r--r--pkgs/applications/audio/yasr/20_maxpathlen.patch11
-rw-r--r--pkgs/applications/audio/yasr/30_conf.patch18
-rw-r--r--pkgs/applications/audio/yasr/40_dectalk_extended_chars.patch14
-rw-r--r--pkgs/applications/audio/yasr/default.nix28
-rw-r--r--pkgs/applications/audio/ympd/default.nix31
-rw-r--r--pkgs/applications/audio/yoshimi/default.nix77
-rw-r--r--pkgs/applications/audio/ytmdesktop/default.nix36
-rw-r--r--pkgs/applications/audio/zam-plugins/default.nix35
-rw-r--r--pkgs/applications/audio/zita-ajbridge/default.nix32
-rw-r--r--pkgs/applications/audio/zita-at1/default.nix37
-rw-r--r--pkgs/applications/audio/zita-njbridge/default.nix32
-rw-r--r--pkgs/applications/audio/zrythm/default.nix174
-rw-r--r--pkgs/applications/audio/zynaddsubfx/default.nix130
-rw-r--r--pkgs/applications/audio/zynaddsubfx/mruby-zest/default.nix109
-rw-r--r--pkgs/applications/audio/zynaddsubfx/mruby-zest/force-gcc-as-linker.patch13
-rw-r--r--pkgs/applications/audio/zynaddsubfx/mruby-zest/system-libuv.patch113
588 files changed, 33711 insertions, 0 deletions
diff --git a/pkgs/applications/audio/AMB-plugins/default.nix b/pkgs/applications/audio/AMB-plugins/default.nix
new file mode 100644
index 00000000000..8b03a97d128
--- /dev/null
+++ b/pkgs/applications/audio/AMB-plugins/default.nix
@@ -0,0 +1,33 @@
+{ lib, stdenv, fetchurl, ladspaH
+}:
+
+stdenv.mkDerivation rec {
+  pname = "AMB-plugins";
+  version = "0.8.1";
+  src = fetchurl {
+    url = "http://kokkinizita.linuxaudio.org/linuxaudio/downloads/${pname}-${version}.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 = lib.licenses.gpl2Plus;
+    maintainers = [ lib.maintainers.magnetophon ];
+    platforms = lib.platforms.linux;
+  };
+}
diff --git a/pkgs/applications/audio/CHOWTapeModel/default.nix b/pkgs/applications/audio/CHOWTapeModel/default.nix
new file mode 100644
index 00000000000..3eff818cca9
--- /dev/null
+++ b/pkgs/applications/audio/CHOWTapeModel/default.nix
@@ -0,0 +1,78 @@
+{ alsa-lib, at-spi2-core, cmake, curl, dbus, libepoxy, fetchFromGitHub, freeglut
+, freetype, gcc-unwrapped, gtk3, lib, libGL, libXcursor, libXdmcp, libXext
+, libXinerama, libXrandr, libXtst, libdatrie, libjack2, libpsl, libselinux
+, libsepol, libsysprof-capture, libthai, libxkbcommon, lv2, pcre, pkg-config
+, python3, sqlite, stdenv }:
+
+stdenv.mkDerivation rec {
+  pname = "CHOWTapeModel";
+  version = "2.10.0";
+
+  src = fetchFromGitHub {
+    owner = "jatinchowdhury18";
+    repo = "AnalogTapeModel";
+    rev = "v${version}";
+    sha256 = "sha256-iuT7OBRBtMkjcTHayCcne1mNqkcxzKnEYl62n65V7Z4=";
+    fetchSubmodules = true;
+  };
+
+  nativeBuildInputs = [ pkg-config cmake ];
+
+  buildInputs = [
+    alsa-lib
+    at-spi2-core
+    curl
+    dbus
+    libepoxy
+    freeglut
+    freetype
+    gtk3
+    libGL
+    libXcursor
+    libXdmcp
+    libXext
+    libXinerama
+    libXrandr
+    libXtst
+    libdatrie
+    libjack2
+    libpsl
+    libselinux
+    libsepol
+    libsysprof-capture
+    libthai
+    libxkbcommon
+    lv2
+    pcre
+    python3
+    sqlite
+    gcc-unwrapped
+  ];
+
+  cmakeFlags = [
+    "-DCMAKE_AR=${gcc-unwrapped}/bin/gcc-ar"
+    "-DCMAKE_RANLIB=${gcc-unwrapped}/bin/gcc-ranlib"
+    "-DCMAKE_NM=${gcc-unwrapped}/bin/gcc-nm"
+  ];
+
+  postPatch = "cd Plugin";
+
+  installPhase = ''
+    mkdir -p $out/lib/lv2 $out/lib/vst3 $out/bin $out/share/doc/CHOWTapeModel/
+    cd CHOWTapeModel_artefacts/Release
+    cp libCHOWTapeModel_SharedCode.a  $out/lib
+    cp -r LV2/CHOWTapeModel.lv2 $out/lib/lv2
+    cp -r VST3/CHOWTapeModel.vst3 $out/lib/vst3
+    cp Standalone/CHOWTapeModel  $out/bin
+    cp ../../../../Manual/ChowTapeManual.pdf $out/share/doc/CHOWTapeModel/
+  '';
+
+  meta = with lib; {
+    homepage = "https://github.com/jatinchowdhury18/AnalogTapeModel";
+    description =
+      "Physical modelling signal processing for analog tape recording. LV2, VST3 and standalone";
+    license = with licenses; [ gpl3Only ];
+    maintainers = with maintainers; [ magnetophon ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/pkgs/applications/audio/ChowCentaur/default.nix b/pkgs/applications/audio/ChowCentaur/default.nix
new file mode 100644
index 00000000000..80f5768dc15
--- /dev/null
+++ b/pkgs/applications/audio/ChowCentaur/default.nix
@@ -0,0 +1,53 @@
+{ stdenv, lib, fetchFromGitHub, cmake, pkg-config, cairo, libxkbcommon
+, xcbutilcursor, xcbutilkeysyms, xcbutil, libXrandr, libXinerama, libXcursor
+, alsa-lib, libjack2, lv2, gcc-unwrapped }:
+
+stdenv.mkDerivation rec {
+  pname = "ChowCentaur";
+  version = "1.4.0";
+
+  src = fetchFromGitHub {
+    owner = "jatinchowdhury18";
+    repo = "KlonCentaur";
+    rev = "v${version}";
+    sha256 = "0mrzlf4a6f25xd7z9xanpyq7ybb4al01dzpjsgi0jkmlmadyhc4h";
+    fetchSubmodules = true;
+  };
+
+  nativeBuildInputs = [ cmake pkg-config ];
+  buildInputs = [
+    cairo
+    libxkbcommon
+    xcbutilcursor
+    xcbutilkeysyms
+    xcbutil
+    libXrandr
+    libXinerama
+    libXcursor
+    alsa-lib
+    libjack2
+    lv2
+  ];
+
+  cmakeFlags = [
+    "-DCMAKE_AR=${gcc-unwrapped}/bin/gcc-ar"
+    "-DCMAKE_RANLIB=${gcc-unwrapped}/bin/gcc-ranlib"
+    "-DCMAKE_NM=${gcc-unwrapped}/bin/gcc-nm"
+  ];
+
+  installPhase = ''
+    mkdir -p $out/lib/lv2 $out/lib/vst3
+    cd ChowCentaur/ChowCentaur_artefacts/Release
+    cp -r LV2/ChowCentaur.lv2 $out/lib/lv2
+    cp -r VST3/ChowCentaur.vst3 $out/lib/vst3
+  '';
+
+  meta = with lib; {
+    description =
+      "Digital emulation of the Klon Centaur guitar pedal using RNNs, Wave Digital Filters, and more";
+    homepage = "https://github.com/jatinchowdhury18/KlonCentaur";
+    license = licenses.bsd3;
+    platforms = [ "x86_64-linux" ];
+    maintainers = with maintainers; [ magnetophon ];
+  };
+}
diff --git a/pkgs/applications/audio/ChowKick/default.nix b/pkgs/applications/audio/ChowKick/default.nix
new file mode 100644
index 00000000000..b3ad00bf63a
--- /dev/null
+++ b/pkgs/applications/audio/ChowKick/default.nix
@@ -0,0 +1,106 @@
+{ alsa-lib
+, at-spi2-core
+, brotli
+, cmake
+, curl
+, dbus
+, libepoxy
+, fetchFromGitHub
+, freeglut
+, freetype
+, gtk2-x11
+, lib
+, libGL
+, libXcursor
+, libXdmcp
+, libXext
+, libXinerama
+, libXrandr
+, libXtst
+, libdatrie
+, libjack2
+, libpsl
+, libselinux
+, libsepol
+, libsysprof-capture
+, libthai
+, libxkbcommon
+, lv2
+, pcre
+, pkg-config
+, python3
+, sqlite
+, stdenv
+, util-linuxMinimal
+, webkitgtk
+}:
+
+stdenv.mkDerivation rec {
+  pname = "ChowKick";
+  version = "1.1.1";
+
+  src = fetchFromGitHub {
+    owner = "Chowdhury-DSP";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "0amnp0p7ckbbr9dcbdnld1ryv46kvza2dj8m6hzmi7c1s4df8x5q";
+    fetchSubmodules = true;
+  };
+
+  nativeBuildInputs = [
+    pkg-config
+    cmake
+  ];
+  buildInputs = [
+    alsa-lib
+    at-spi2-core
+    brotli
+    curl
+    dbus
+    libepoxy
+    freeglut
+    freetype
+    gtk2-x11
+    libGL
+    libXcursor
+    libXdmcp
+    libXext
+    libXinerama
+    libXrandr
+    libXtst
+    libdatrie
+    libjack2
+    libpsl
+    libselinux
+    libsepol
+    libsysprof-capture
+    libthai
+    libxkbcommon
+    lv2
+    pcre
+    python3
+    sqlite
+    util-linuxMinimal
+    webkitgtk
+  ];
+
+  cmakeFlags = [
+    "-DCMAKE_AR=${stdenv.cc.cc}/bin/gcc-ar"
+    "-DCMAKE_RANLIB=${stdenv.cc.cc}/bin/gcc-ranlib"
+  ];
+
+  installPhase = ''
+    mkdir -p $out/lib/lv2 $out/lib/vst3 $out/bin
+    cp -r ChowKick_artefacts/Release/LV2//${pname}.lv2 $out/lib/lv2
+    cp -r ChowKick_artefacts/Release/VST3/${pname}.vst3 $out/lib/vst3
+    cp ChowKick_artefacts/Release/Standalone/${pname}  $out/bin
+  '';
+
+  meta = with lib; {
+    homepage = "https://github.com/Chowdhury-DSP/ChowKick";
+    description = "Kick synthesizer based on old-school drum machine circuits";
+    license = with licenses; [ bsd3 ];
+    maintainers = with maintainers; [ magnetophon ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/pkgs/applications/audio/FIL-plugins/default.nix b/pkgs/applications/audio/FIL-plugins/default.nix
new file mode 100644
index 00000000000..98fc3495d8f
--- /dev/null
+++ b/pkgs/applications/audio/FIL-plugins/default.nix
@@ -0,0 +1,37 @@
+{ lib, stdenv, fetchurl, ladspaH
+}:
+
+stdenv.mkDerivation rec {
+  pname = "FIL-plugins";
+  version = "0.3.0";
+  src = fetchurl {
+    url = "http://kokkinizita.linuxaudio.org/linuxaudio/downloads/${pname}-${version}.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 = lib.licenses.gpl2Plus;
+    maintainers = [ lib.maintainers.magnetophon ];
+    platforms = lib.platforms.linux;
+  };
+}
diff --git a/pkgs/applications/audio/MMA/default.nix b/pkgs/applications/audio/MMA/default.nix
new file mode 100644
index 00000000000..3034de750cf
--- /dev/null
+++ b/pkgs/applications/audio/MMA/default.nix
@@ -0,0 +1,70 @@
+{ lib, stdenv, fetchurl, makeWrapper, python3, alsa-utils, timidity }:
+
+  stdenv.mkDerivation rec {
+  version = "20.12";
+  pname = "mma";
+
+  src = fetchurl {
+    url = "https://www.mellowood.ca/mma/mma-bin-${version}.tar.gz";
+    sha256 = "18k0hwlqky5x4y461fxmw77gvz7z8jyrvxicrqphsgvwwinzy732";
+  };
+
+  nativeBuildInputs = [ makeWrapper ];
+  buildInputs = [ python3 alsa-utils timidity ];
+
+  patchPhase = ''
+    sed -i 's@/usr/bin/aplaymidi@/${alsa-utils}/bin/aplaymidi@g' mma-splitrec
+    sed -i 's@/usr/bin/aplaymidi@/${alsa-utils}/bin/aplaymidi@g' util/mma-splitrec.py
+    sed -i 's@/usr/bin/arecord@/${alsa-utils}/bin/arecord@g' mma-splitrec
+    sed -i 's@/usr/bin/arecord@/${alsa-utils}/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'
+    find . -type f | xargs sed -i 's@/usr/bin/python3@${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 =  "https://www.mellowood.ca/mma/index.html";
+    license = lib.licenses.gpl2;
+    maintainers = [ lib.maintainers.magnetophon ];
+    platforms = lib.platforms.linux;
+  };
+}
diff --git a/pkgs/applications/audio/a2jmidid/default.nix b/pkgs/applications/audio/a2jmidid/default.nix
new file mode 100644
index 00000000000..eafbfec9664
--- /dev/null
+++ b/pkgs/applications/audio/a2jmidid/default.nix
@@ -0,0 +1,30 @@
+{ lib, stdenv, fetchFromGitHub, fetchpatch, makeWrapper, pkg-config, alsa-lib, dbus, libjack2
+, python3Packages , meson, ninja }:
+
+stdenv.mkDerivation rec {
+  pname = "a2jmidid";
+  version = "9";
+
+  src = fetchFromGitHub {
+    owner = "linuxaudio";
+    repo = pname;
+    rev = version;
+    sha256 = "sha256-WNt74tSWV8bY4TnpLp86PsnrjkqWynJJt3Ra4gZl2fQ=";
+  };
+
+  nativeBuildInputs = [ pkg-config makeWrapper meson ninja ];
+  buildInputs = [ alsa-lib dbus libjack2 ] ++
+                (with python3Packages; [ python dbus-python ]);
+
+  postInstall = ''
+    wrapProgram $out/bin/a2j_control --set PYTHONPATH $PYTHONPATH
+    substituteInPlace $out/bin/a2j --replace "a2j_control" "$out/bin/a2j_control"
+  '';
+
+  meta = with 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" "aarch64-linux" ];
+  };
+}
diff --git a/pkgs/applications/audio/aacgain/default.nix b/pkgs/applications/audio/aacgain/default.nix
new file mode 100644
index 00000000000..517a53a5fec
--- /dev/null
+++ b/pkgs/applications/audio/aacgain/default.nix
@@ -0,0 +1,68 @@
+{ lib, stdenv, fetchFromGitLab, fetchpatch }:
+
+stdenv.mkDerivation rec {
+  pname = "aacgain";
+  version = "1.9.0";
+
+  src = fetchFromGitLab {
+    owner = "mulx";
+    repo = "aacgain";
+    rev = "7c29dccd878ade1301710959aeebe87a8f0828f5";
+    sha256 = "07hl432vsscqg01b6wr99qmsj4gbx0i02x4k565432y6zpfmaxm0";
+  };
+
+  hardeningDisable = [ "format" ];
+
+  # -Wnarrowing is enabled by default in recent GCC versions,
+  # causing compilation to fail.
+  NIX_CFLAGS_COMPILE = "-Wno-narrowing";
+
+  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 lib; {
+    description = "ReplayGain for AAC files";
+    homepage = "https://aacgain.altosdesign.com";
+    license = licenses.gpl2;
+    platforms = platforms.linux;
+    maintainers = [ maintainers.robbinch ];
+  };
+}
diff --git a/pkgs/applications/audio/abcde/default.nix b/pkgs/applications/audio/abcde/default.nix
new file mode 100644
index 00000000000..1c5fc571814
--- /dev/null
+++ b/pkgs/applications/audio/abcde/default.nix
@@ -0,0 +1,61 @@
+{ lib, stdenv, fetchurl, libcdio-paranoia, cddiscid, wget, which, vorbis-tools, id3v2, eyeD3
+, lame, flac, glyr
+, perlPackages
+, makeWrapper }:
+
+let version = "2.9.3";
+in
+  stdenv.mkDerivation {
+    pname = "abcde";
+    inherit version;
+    src = fetchurl {
+      url = "https://abcde.einval.com/download/abcde-${version}.tar.gz";
+      sha256 = "091ip2iwb6b67bhjsj05l0sxyq2whqjycbzqpkfbpm4dlyxx0v04";
+    };
+
+    # 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 ":" ${lib.makeBinPath [
+            "$out" which libcdio-paranoia cddiscid wget
+            vorbis-tools id3v2 eyeD3 lame flac glyr
+          ]}
+      done
+    '';
+
+    meta = with 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/pkgs/applications/audio/adlplug/default.nix b/pkgs/applications/audio/adlplug/default.nix
new file mode 100644
index 00000000000..a501cd0a1d8
--- /dev/null
+++ b/pkgs/applications/audio/adlplug/default.nix
@@ -0,0 +1,105 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, fetchpatch
+, cmake
+, pkg-config
+, fmt
+, liblo
+, alsa-lib
+, freetype
+, libX11
+, libXrandr
+, libXinerama
+, libXext
+, libXcursor
+, libobjc
+, Cocoa
+, CoreServices
+, WebKit
+, DiscRecording
+
+  # Enabling JACK requires a JACK server at runtime, no fallback mechanism
+, withJack ? false, jack
+
+, type ? "ADL"
+}:
+
+assert lib.assertOneOf "type" type [ "ADL" "OPN" ];
+let
+  chip = {
+    ADL = "OPL3";
+    OPN = "OPN2";
+  }.${type};
+  mainProgram = "${type}plug";
+in
+stdenv.mkDerivation rec {
+  pname = "${lib.strings.toLower type}plug";
+  version = "1.0.2";
+
+  src = fetchFromGitHub {
+    owner = "jpcima";
+    repo = "ADLplug";
+    rev = "v${version}";
+    fetchSubmodules = true;
+    sha256 = "0mqx4bzri8s880v7jwd24nb93m5i3aklqld0b3h0hjnz0lh2qz0f";
+  };
+
+  patches = [
+    (fetchpatch {
+      url = "https://raw.githubusercontent.com/jpcima/ADLplug/83636c55bec1b86cabf634b9a6d56d07f00ecc61/resources/patch/juce-gcc9.patch";
+      sha256 = "15hkdb76n9lgjsrpczj27ld9b4804bzrgw89g95cj4sc8wwkplyy";
+      extraPrefix = "thirdparty/JUCE/";
+      stripLen = 1;
+    })
+  ];
+
+  cmakeFlags = [
+    "-DADLplug_CHIP=${chip}"
+    "-DADLplug_USE_SYSTEM_FMT=ON"
+    "-DADLplug_Jack=${if withJack then "ON" else "OFF"}"
+  ];
+
+  NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isDarwin (toString [
+    "-isystem ${CoreServices}/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CarbonCore.framework/Versions/A/Headers"
+  ]);
+
+  nativeBuildInputs = [
+    cmake
+    pkg-config
+  ];
+
+  buildInputs = [
+    fmt
+    liblo
+  ] ++ lib.optionals stdenv.hostPlatform.isLinux [
+    alsa-lib
+    freetype
+    libX11
+    libXrandr
+    libXinerama
+    libXext
+    libXcursor
+  ] ++ lib.optionals stdenv.hostPlatform.isDarwin [
+    libobjc
+    Cocoa
+    CoreServices
+    WebKit
+    DiscRecording
+  ] ++ lib.optional withJack jack;
+
+  postInstall = lib.optionalString stdenv.hostPlatform.isDarwin ''
+    mkdir $out/Applications
+    mv $out/bin/${mainProgram}.app $out/Applications/
+    ln -s $out/{Applications/${mainProgram}.app/Contents/MacOS,bin}/${mainProgram}
+  '';
+
+  meta = with lib; {
+    inherit mainProgram;
+    description = "${chip} FM Chip Synthesizer";
+    homepage = src.meta.homepage;
+    license = licenses.boost;
+    platforms = platforms.all;
+    maintainers = with maintainers; [ OPNA2608 ];
+  };
+}
diff --git a/pkgs/applications/audio/aeolus/default.nix b/pkgs/applications/audio/aeolus/default.nix
new file mode 100644
index 00000000000..d8ef7d2b4fa
--- /dev/null
+++ b/pkgs/applications/audio/aeolus/default.nix
@@ -0,0 +1,32 @@
+{ lib, stdenv, fetchurl, libclthreads, zita-alsa-pcmi, alsa-lib, libjack2
+, libclxclient, libX11, libXft, readline
+}:
+
+stdenv.mkDerivation rec {
+  pname = "aeolus";
+  version = "0.9.9";
+
+  src = fetchurl {
+    url = "https://kokkinizita.linuxaudio.org/linuxaudio/downloads/${pname}-${version}.tar.bz2";
+    sha256 = "04y1j36y7vc93bv299vfiawbww4ym6q7avfx8vw6rmxr817zrch3";
+  };
+
+  buildInputs = [
+    libclthreads zita-alsa-pcmi alsa-lib 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 = lib.licenses.lgpl3;
+    platforms = lib.platforms.linux;
+    maintainers = [ lib.maintainers.nico202 ];
+  };
+}
diff --git a/pkgs/applications/audio/aether-lv2/default.nix b/pkgs/applications/audio/aether-lv2/default.nix
new file mode 100644
index 00000000000..e912c7fa49a
--- /dev/null
+++ b/pkgs/applications/audio/aether-lv2/default.nix
@@ -0,0 +1,33 @@
+{ lib, stdenv, fetchFromGitHub, lv2, libX11, libGL, libGLU, mesa, cmake }:
+
+stdenv.mkDerivation rec {
+  pname = "aether-lv2";
+  version = "1.2.1";
+
+  src = fetchFromGitHub {
+    owner = "Dougal-s";
+    repo = "aether";
+    rev = "v${version}";
+    sha256 = "0xhih4smjxn87s0f4gaab51d8594qlp0lyypzxl5lm37j1i9zigs";
+    fetchSubmodules = true;
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  buildInputs = [
+    lv2 libX11 libGL libGLU mesa
+  ];
+
+  installPhase = ''
+    mkdir -p $out/lib/lv2
+    cp -r aether.lv2 $out/lib/lv2
+  '';
+
+  meta = with lib; {
+    homepage = "https://dougal-s.github.io/Aether/";
+    description = "An algorithmic reverb LV2 based on Cloudseed";
+    maintainers = [ maintainers.magnetophon ];
+    platforms = platforms.linux;
+    license = licenses.mit;
+  };
+}
diff --git a/pkgs/applications/audio/airwave/default.nix b/pkgs/applications/audio/airwave/default.nix
new file mode 100644
index 00000000000..438159201de
--- /dev/null
+++ b/pkgs/applications/audio/airwave/default.nix
@@ -0,0 +1,92 @@
+{ lib, 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";
+    meta.license = lib.licenses.unfree;
+  };
+
+  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 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/pkgs/applications/audio/aj-snapshot/default.nix b/pkgs/applications/audio/aj-snapshot/default.nix
new file mode 100644
index 00000000000..00fde01859c
--- /dev/null
+++ b/pkgs/applications/audio/aj-snapshot/default.nix
@@ -0,0 +1,32 @@
+{ lib, stdenv, fetchurl, alsa-lib, jack2, minixml, pkg-config }:
+
+stdenv.mkDerivation rec {
+  name =  packageName + "-" + version ;
+  packageName = "aj-snapshot" ;
+  version = "0.9.9";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/${packageName}/${name}.tar.bz2";
+    sha256 = "0z8wd5yvxdmw1h1rj6km9h01xd4xmp4d86gczlix7hsc7zrf0wil";
+  };
+
+  doCheck = false;
+
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = [ alsa-lib minixml jack2 ];
+
+  meta = with 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/pkgs/applications/audio/amarok/default.nix b/pkgs/applications/audio/amarok/default.nix
new file mode 100644
index 00000000000..10d1bb9ca65
--- /dev/null
+++ b/pkgs/applications/audio/amarok/default.nix
@@ -0,0 +1,38 @@
+{ mkDerivation, fetchurl, 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, liblastfm, libmtp, loudmouth, lzo, lz4, mysql57, pcre, snappy, taglib, taglib_extras
+}:
+
+mkDerivation rec {
+  pname = "amarok";
+  version = "2.9.71";
+
+  src = fetchurl {
+    url = "mirror://kde/unstable/${pname}/${version}/${pname}-${version}.tar.xz";
+    sha256 = "0kz8wixjmy4yxq2gk11ybswryxb6alfymd3bzcar9xinscllhh3a";
+  };
+
+  outputs = [ "out" "doc" ];
+
+  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 liblastfm libmtp loudmouth lz4 lzo mysql57.server mysql57.server.static
+    pcre snappy taglib taglib_extras
+  ];
+
+  enableParallelBuilding = true;
+
+  meta = with lib; {
+    homepage = "https://amarok.kde.org";
+    description = "A powerful music player with an intuitive interface";
+    license = licenses.gpl2Plus;
+    maintainers = with maintainers; [ peterhoeg ];
+  };
+}
diff --git a/pkgs/applications/audio/ams-lv2/default.nix b/pkgs/applications/audio/ams-lv2/default.nix
new file mode 100644
index 00000000000..88956a190c4
--- /dev/null
+++ b/pkgs/applications/audio/ams-lv2/default.nix
@@ -0,0 +1,27 @@
+{ lib, stdenv, fetchFromGitHub, cairo, fftw, gtkmm2, lv2, lvtk, pkg-config
+, wafHook, python3 }:
+
+stdenv.mkDerivation  rec {
+  pname = "ams-lv2";
+  version = "1.2.2";
+
+  src = fetchFromGitHub {
+    owner = "blablack";
+    repo = "ams-lv2";
+    rev = version;
+    sha256 = "1lz2mvk4gqsyf92yxd3aaldx0d0qi28h4rnnvsaz4ls0ccqm80nk";
+  };
+
+  nativeBuildInputs = [ pkg-config wafHook python3 ];
+  buildInputs = [ cairo fftw gtkmm2 lv2 lvtk ];
+
+  meta = with lib; {
+    description = "An LV2 port of the internal modules found in Alsa Modular Synth";
+    homepage = "https://github.com/blablack/ams-lv2";
+    license = licenses.gpl3;
+    maintainers = [ maintainers.goibhniu ];
+    platforms = platforms.linux;
+    # Build uses `-msse` and `-mfpmath=sse`
+    badPlatforms = [ "aarch64-linux" ];
+  };
+}
diff --git a/pkgs/applications/audio/ams/default.nix b/pkgs/applications/audio/ams/default.nix
new file mode 100644
index 00000000000..388d8b44dcf
--- /dev/null
+++ b/pkgs/applications/audio/ams/default.nix
@@ -0,0 +1,48 @@
+{ lib, stdenv
+, fetchgit
+, automake
+, alsa-lib
+, ladspaH
+, libjack2
+, fftw
+, zita-alsa-pcmi
+, qt5
+, pkg-config
+, autoreconfHook
+}:
+
+stdenv.mkDerivation rec {
+  name = "ams";
+  version = "unstable-2019-04-27";
+
+  src = fetchgit {
+    url = "https://git.code.sf.net/p/alsamodular/ams.git";
+    sha256 = "0qdyz5llpa94f3qx1xi1mz97vl5jyrj1mqff28p5g9i5rxbbk8z9";
+    rev = "3250bbcfea331c4fcb9845305eebded80054973d";
+  };
+
+  nativeBuildInputs = [
+    autoreconfHook
+    pkg-config
+    qt5.wrapQtAppsHook
+  ];
+
+  buildInputs = [
+    alsa-lib
+    ladspaH
+    libjack2
+    fftw
+    zita-alsa-pcmi
+  ] ++ (with qt5; [
+    qtbase
+    qttools
+  ]);
+
+  meta = with lib; {
+    description = "Realtime modular synthesizer for ALSA";
+    homepage = "http://alsamodular.sourceforge.net";
+    license = licenses.gpl2;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ sjfloat ];
+  };
+}
diff --git a/pkgs/applications/audio/apple-music-electron/default.nix b/pkgs/applications/audio/apple-music-electron/default.nix
new file mode 100644
index 00000000000..850f644afc3
--- /dev/null
+++ b/pkgs/applications/audio/apple-music-electron/default.nix
@@ -0,0 +1,32 @@
+{ appimageTools, lib, fetchurl }:
+let
+  pname = "apple-music-electron";
+  version = "1.5.5";
+  name = "Apple.Music-${version}";
+
+  src = fetchurl {
+    url = "https://github.com/cryptofyre/Apple-Music-Electron/releases/download/v${version}/${name}.AppImage";
+    sha256 = "1gb6j3nvam9fcpsgiv56jccg9a4y14vzsyw11h3hckaigy90knpx";
+  };
+
+  appimageContents = appimageTools.extract { inherit name src; };
+in appimageTools.wrapType2 {
+  inherit name src;
+
+  extraInstallCommands = ''
+    mv $out/bin/${name} $out/bin/${pname}
+
+    install -m 444 -D ${appimageContents}/${pname}.desktop -t $out/share/applications
+    substituteInPlace $out/share/applications/${pname}.desktop \
+      --replace 'Exec=AppRun' 'Exec=${pname}'
+    cp -r ${appimageContents}/usr/share/icons $out/share
+  '';
+
+  meta = with lib; {
+    description = "Unofficial Apple Music application without having to bother with a Web Browser or iTunes";
+    homepage = "https://github.com/iiFir3z/Apple-Music-Electron";
+    license = licenses.mit;
+    maintainers = [ maintainers.ivar ];
+    platforms = [ "x86_64-linux" ];
+  };
+}
diff --git a/pkgs/applications/audio/ardour/as-flags.patch b/pkgs/applications/audio/ardour/as-flags.patch
new file mode 100644
index 00000000000..b8aab70ddca
--- /dev/null
+++ b/pkgs/applications/audio/ardour/as-flags.patch
@@ -0,0 +1,12 @@
+--- a/libs/ardour/wscript
++++ b/libs/ardour/wscript
+@@ -379,8 +379,7 @@ def build(bld):
+
+     # remove '${DEFINES_ST:DEFINES}' from run_str.
+     # x86_64-w64-mingw32-as (mingw) -D flag is for debug messages
+-    if bld.env['build_target'] == 'mingw':
+-        class asm(Task.classes['asm']): run_str = '${AS} ${ASFLAGS} ${ASMPATH_ST:INCPATHS} ${AS_SRC_F}${SRC} ${AS_TGT_F}${TGT}'
++    class asm(Task.classes['asm']): run_str = '${AS} ${ASFLAGS} ${ASMPATH_ST:INCPATHS} ${AS_SRC_F}${SRC} ${AS_TGT_F}${TGT}'
+
+     # operate on copy to avoid adding sources twice
+     sources = list(libardour_sources)
diff --git a/pkgs/applications/audio/ardour/default.nix b/pkgs/applications/audio/ardour/default.nix
new file mode 100644
index 00000000000..d5afcac86cd
--- /dev/null
+++ b/pkgs/applications/audio/ardour/default.nix
@@ -0,0 +1,190 @@
+{ lib, stdenv
+, fetchgit
+, alsa-lib
+, aubio
+, boost
+, cairomm
+, cppunit
+, curl
+, dbus
+, doxygen
+, ffmpeg
+, fftw
+, fftwSinglePrec
+, flac
+, glibc
+, glibmm
+, graphviz
+, gtkmm2
+, harvid
+, itstool
+, libarchive
+, libjack2
+, liblo
+, libogg
+, libpulseaudio
+, librdf_raptor
+, librdf_rasqal
+, libsamplerate
+, libsigcxx
+, libsndfile
+, libusb1
+, libuv
+, libwebsockets
+, libxml2
+, libxslt
+, lilv
+, lrdf
+, lv2
+, makeWrapper
+, pango
+, perl
+, pkg-config
+, python3
+, readline
+, rubberband
+, serd
+, sord
+, soundtouch
+, sratom
+, suil
+, taglib
+, vamp-plugin-sdk
+, wafHook
+, xjadeo
+, videoSupport ? true
+}:
+stdenv.mkDerivation rec {
+  pname = "ardour";
+  version = "6.9";
+
+  # don't fetch releases from the GitHub mirror, they are broken
+  src = fetchgit {
+    url = "git://git.ardour.org/ardour/ardour.git";
+    rev = version;
+    sha256 = "0vlcbd70y0an881zv87kc3akmaiz4w7whsy3yaiiqqjww35jg1mm";
+  };
+
+  patches = [
+    # AS=as in the environment causes build failure https://tracker.ardour.org/view.php?id=8096
+    ./as-flags.patch
+  ];
+
+  nativeBuildInputs = [
+    doxygen
+    graphviz # for dot
+    itstool
+    makeWrapper
+    perl
+    pkg-config
+    python3
+    wafHook
+  ];
+
+  buildInputs = [
+    alsa-lib
+    aubio
+    boost
+    cairomm
+    cppunit
+    curl
+    dbus
+    ffmpeg
+    fftw
+    fftwSinglePrec
+    flac
+    glibmm
+    gtkmm2
+    itstool
+    libarchive
+    libjack2
+    liblo
+    libogg
+    libpulseaudio
+    librdf_raptor
+    librdf_rasqal
+    libsamplerate
+    libsigcxx
+    libsndfile
+    libusb1
+    libuv
+    libwebsockets
+    libxml2
+    libxslt
+    lilv
+    lrdf
+    lv2
+    pango
+    perl
+    python3
+    readline
+    rubberband
+    serd
+    sord
+    soundtouch
+    sratom
+    suil
+    taglib
+    vamp-plugin-sdk
+  ] ++ lib.optionals videoSupport [ harvid xjadeo ];
+
+  wafConfigureFlags = [
+    "--cxx11"
+    "--docs"
+    "--freedesktop"
+    "--no-phone-home"
+    "--optimize"
+    "--ptformat"
+    "--run-tests"
+    "--test"
+  ];
+  # removed because it fixes https://tracker.ardour.org/view.php?id=8161 and https://tracker.ardour.org/view.php?id=8437
+  # "--use-external-libs"
+
+  # Ardour's wscript requires git revision and date to be available.
+  # Since they are not, let's generate the file manually.
+  postPatch = ''
+    printf '#include "libs/ardour/ardour/revision.h"\nnamespace ARDOUR { const char* revision = "${version}"; const char* date = ""; }\n' > libs/ardour/revision.cc
+    sed 's|/usr/include/libintl.h|${glibc.dev}/include/libintl.h|' -i wscript
+    patchShebangs ./tools/
+    substituteInPlace libs/ardour/video_tools_paths.cc \
+      --replace 'ffmpeg_exe = X_("");' 'ffmpeg_exe = X_("${ffmpeg}/bin/ffmpeg");' \
+      --replace 'ffprobe_exe = X_("");' 'ffprobe_exe = X_("${ffmpeg}/bin/ffprobe");'
+  '';
+
+  postInstall = ''
+    # wscript does not install these for some reason
+    install -vDm 644 "build/gtk2_ardour/ardour.xml" \
+      -t "$out/share/mime/packages"
+    install -vDm 644 "build/gtk2_ardour/ardour6.desktop" \
+      -t "$out/share/applications"
+    for size in 16 22 32 48 256 512; do
+      install -vDm 644 "gtk2_ardour/resources/Ardour-icon_''${size}px.png" \
+        "$out/share/icons/hicolor/''${size}x''${size}/apps/ardour6.png"
+    done
+    install -vDm 644 "ardour.1"* -t "$out/share/man/man1"
+  '' + lib.optionalString videoSupport ''
+    # `harvid` and `xjadeo` must be accessible in `PATH` for video to work.
+    wrapProgram "$out/bin/ardour6" \
+      --prefix PATH : "${lib.makeBinPath [ harvid xjadeo ]}"
+  '';
+
+  LINKFLAGS = "-lpthread";
+
+  meta = with 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/donate
+    '';
+    homepage = "https://ardour.org/";
+    license = licenses.gpl2Plus;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ goibhniu magnetophon mitchmindtree ];
+  };
+}
diff --git a/pkgs/applications/audio/ario/default.nix b/pkgs/applications/audio/ario/default.nix
new file mode 100644
index 00000000000..68b74821ec3
--- /dev/null
+++ b/pkgs/applications/audio/ario/default.nix
@@ -0,0 +1,46 @@
+{ lib
+, stdenv
+, fetchurl
+, pkg-config
+, intltool
+, avahi
+, curl
+, dbus-glib
+, gettext
+, gtk3
+, libmpdclient
+, libsoup
+, libxml2
+, taglib
+, wrapGAppsHook
+}:
+
+stdenv.mkDerivation rec {
+  pname = "ario";
+  version = "1.6";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/ario-player/${pname}-${version}.tar.gz";
+    sha256 = "16nhfb3h5pc7flagfdz7xy0iq6kvgy6h4bfpi523i57rxvlfshhl";
+  };
+
+  nativeBuildInputs = [ pkg-config gettext intltool wrapGAppsHook ];
+  buildInputs = [
+    avahi
+    curl
+    dbus-glib
+    gtk3
+    libmpdclient
+    libsoup
+    libxml2
+    taglib
+  ];
+
+  meta = with lib; {
+    description = "GTK client for MPD (Music player daemon)";
+    homepage = "http://ario-player.sourceforge.net/";
+    license = licenses.gpl2Plus;
+    maintainers = [ maintainers.garrison ];
+    platforms = platforms.all;
+  };
+}
diff --git a/pkgs/applications/audio/artyFX/default.nix b/pkgs/applications/audio/artyFX/default.nix
new file mode 100644
index 00000000000..2bf6b2a8046
--- /dev/null
+++ b/pkgs/applications/audio/artyFX/default.nix
@@ -0,0 +1,27 @@
+{ lib, stdenv, fetchFromGitHub , cairomm, cmake, libjack2, libpthreadstubs, libXdmcp, libxshmfence, libsndfile, lv2, ntk, pkg-config }:
+
+stdenv.mkDerivation rec {
+  pname = "artyFX";
+  # Fix build with lv2 1.18: https://github.com/openAVproductions/openAV-ArtyFX/pull/41/commits/492587461b50d140455aa3c98d915eb8673bebf0
+  version = "unstable-2020-04-28";
+
+  src = fetchFromGitHub {
+    owner = "openAVproductions";
+    repo = "openAV-ArtyFX";
+    rev = "8c542627d936a01b1d97825e7f26a8e95633f7aa";
+    sha256 = "0wwg8ivnpyy0235bapjy4g0ij85zq355jwi6c1nkrac79p4z9ail";
+  };
+
+  nativeBuildInputs = [ cmake pkg-config ];
+  buildInputs = [ cairomm libjack2 libpthreadstubs libXdmcp libxshmfence libsndfile lv2 ntk ];
+
+  meta = with 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/pkgs/applications/audio/ashuffle/default.nix b/pkgs/applications/audio/ashuffle/default.nix
new file mode 100644
index 00000000000..90a2abe8adf
--- /dev/null
+++ b/pkgs/applications/audio/ashuffle/default.nix
@@ -0,0 +1,34 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+, pkg-config
+, meson
+, ninja
+, libmpdclient
+}:
+
+stdenv.mkDerivation rec {
+  pname = "ashuffle";
+  version = "3.12.5";
+
+  src = fetchFromGitHub {
+    owner = "joshkunz";
+    repo = "ashuffle";
+    rev = "v${version}";
+    sha256 = "sha256-dPgv6EzRxRdHkGvys601Bkg9Srd8oEjoE9jbAin74Vk=";
+    fetchSubmodules = true;
+  };
+
+  dontUseCmakeConfigure = true;
+  nativeBuildInputs = [ cmake pkg-config meson ninja ];
+  buildInputs = [ libmpdclient ];
+
+  meta = with lib; {
+    homepage = "https://github.com/joshkunz/ashuffle";
+    description = "Automatic library-wide shuffle for mpd";
+    maintainers = [ maintainers.tcbravo ];
+    platforms = platforms.unix;
+    license = licenses.mit;
+  };
+}
diff --git a/pkgs/applications/audio/asunder/default.nix b/pkgs/applications/audio/asunder/default.nix
new file mode 100644
index 00000000000..c3cba87e300
--- /dev/null
+++ b/pkgs/applications/audio/asunder/default.nix
@@ -0,0 +1,52 @@
+{ lib, stdenv, fetchurl, makeWrapper, gtk2, libcddb, intltool, pkg-config, 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 lib;
+
+stdenv.mkDerivation rec {
+  version = "2.9.7";
+  pname = "asunder";
+  src = fetchurl {
+    url = "http://littlesvr.ca/asunder/releases/${pname}-${version}.tar.bz2";
+    sha256 = "1x3l308ss0iqhz90qyjb94gyd8b4piyrm2nzjmg5kf049k9prjf1";
+  };
+
+  nativeBuildInputs = [ intltool makeWrapper pkg-config ];
+  buildInputs = [ gtk2 libcddb ];
+
+  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/pkgs/applications/audio/aucatctl/default.nix b/pkgs/applications/audio/aucatctl/default.nix
new file mode 100644
index 00000000000..6670e06a21d
--- /dev/null
+++ b/pkgs/applications/audio/aucatctl/default.nix
@@ -0,0 +1,37 @@
+{ lib, stdenv, fetchurl, sndio, libbsd }:
+
+stdenv.mkDerivation rec {
+  pname = "aucatctl";
+  version = "0.1";
+
+  src = fetchurl {
+    url = "http://www.sndio.org/${pname}-${version}.tar.gz";
+    sha256 = "524f2fae47db785234f166551520d9605b9a27551ca438bd807e3509ce246cf0";
+  };
+
+  buildInputs = [ sndio ]
+    ++ lib.optional (!stdenv.isDarwin && !stdenv.targetPlatform.isBSD)
+    libbsd;
+
+  outputs = [ "out" "man" ];
+
+  preBuild = ''
+    makeFlagsArray+=("PREFIX=$out")
+  '' + lib.optionalString
+    (!stdenv.isDarwin && !stdenv.targetPlatform.isBSD) ''
+      makeFlagsArray+=(LDADD="-lsndio -lbsd")
+
+      # Fix warning about implicit declaration of function 'strlcpy'
+      substituteInPlace aucatctl.c \
+        --replace '#include <string.h>' '#include <bsd/string.h>'
+    '';
+
+  meta = with lib; {
+    description =
+      "The aucatctl utility sends MIDI messages to control sndiod and/or aucat volumes";
+    homepage = "http://www.sndio.org";
+    license = licenses.isc;
+    maintainers = with maintainers; [ sna ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/pkgs/applications/audio/audacious/default.nix b/pkgs/applications/audio/audacious/default.nix
new file mode 100644
index 00000000000..7cd22d25831
--- /dev/null
+++ b/pkgs/applications/audio/audacious/default.nix
@@ -0,0 +1,70 @@
+{
+  mkDerivation, lib, fetchurl, fetchpatch,
+  gettext, pkg-config,
+  qtbase,
+  alsa-lib, curl, faad2, ffmpeg, flac, fluidsynth, gdk-pixbuf, lame, libbs2b,
+  libcddb, libcdio, libcdio-paranoia, libcue, libjack2, libmad, libmms, libmodplug,
+  libmowgli, libnotify, libogg, libpulseaudio, libsamplerate, libsidplayfp,
+  libsndfile, libvorbis, libxml2, lirc, mpg123, neon, qtmultimedia, soxr,
+  wavpack, libopenmpt
+}:
+
+mkDerivation rec {
+  pname = "audacious";
+  version = "4.1";
+
+  src = fetchurl {
+    url = "http://distfiles.audacious-media-player.org/audacious-${version}.tar.bz2";
+    sha256 = "0p734psjjvjcmla2hg5h6a9v1prvy63jj9xm2g2ngs49jy7qan0z";
+  };
+  pluginsSrc = fetchurl {
+    url = "http://distfiles.audacious-media-player.org/audacious-plugins-${version}.tar.bz2";
+    sha256 = "0k0xnqmxi5lna034i2cnzvfzrykxmv4fbs1nkrc9sd2ma1igrmns";
+  };
+
+  nativeBuildInputs = [ gettext pkg-config ];
+
+  buildInputs = [
+    # Core dependencies
+    qtbase
+
+    # Plugin dependencies
+    alsa-lib curl faad2 ffmpeg flac fluidsynth gdk-pixbuf lame libbs2b libcddb
+    libcdio libcdio-paranoia libcue libjack2 libmad libmms libmodplug libmowgli
+    libnotify libogg libpulseaudio libsamplerate libsidplayfp libsndfile
+    libvorbis libxml2 lirc mpg123 neon qtmultimedia soxr wavpack
+    libopenmpt
+  ];
+
+  configureFlags = [ "--disable-gtk" ];
+
+  # Here we build both audacious and audacious-plugins in one
+  # derivation, 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.
+    (
+      nativeBuildInputs="$out $nativeBuildInputs" # to find audacious
+      source $stdenv/setup
+      rm -rfv audacious-*
+      src=$pluginsSrc
+      genericBuild
+    )
+  '';
+
+  meta = with lib; {
+    description = "Audio player";
+    homepage = "https://audacious-media-player.org/";
+    maintainers = with maintainers; [ eelco ramkromberg 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/pkgs/applications/audio/audacity/0001-Use-a-different-approach-to-estimate-the-disk-space-.patch b/pkgs/applications/audio/audacity/0001-Use-a-different-approach-to-estimate-the-disk-space-.patch
new file mode 100644
index 00000000000..33b7554db44
--- /dev/null
+++ b/pkgs/applications/audio/audacity/0001-Use-a-different-approach-to-estimate-the-disk-space-.patch
@@ -0,0 +1,355 @@
+From deeb435829d73524df851f6f4c2d4be552c99230 Mon Sep 17 00:00:00 2001
+From: Dmitry Vedenko <dmitry@crsib.me>
+Date: Fri, 1 Oct 2021 16:21:22 +0300
+Subject: [PATCH] Use a different approach to estimate the disk space usage
+
+New a approach is a bit less precise, but removes the requirement for the "private" SQLite3 table and allows Audacity to be built against system SQLite3.
+---
+ cmake-proxies/sqlite/CMakeLists.txt |   5 -
+ src/DBConnection.h                  |   4 +-
+ src/ProjectFileIO.cpp               | 269 +++++-----------------------
+ 3 files changed, 44 insertions(+), 234 deletions(-)
+
+diff --git a/cmake-proxies/sqlite/CMakeLists.txt b/cmake-proxies/sqlite/CMakeLists.txt
+index 63d70637c..d7b9b95ef 100644
+--- a/cmake-proxies/sqlite/CMakeLists.txt
++++ b/cmake-proxies/sqlite/CMakeLists.txt
+@@ -19,11 +19,6 @@ list( APPEND INCLUDES
+ 
+ list( APPEND DEFINES
+    PRIVATE
+-      #
+-      # We need the dbpage table for space calculations.
+-      #
+-      SQLITE_ENABLE_DBPAGE_VTAB=1
+-
+       # Can't be set after a WAL mode database is initialized, so change
+       # the default here to ensure all project files get the same page 
+       # size.
+diff --git a/src/DBConnection.h b/src/DBConnection.h
+index 16a7fc9d4..07d3af95e 100644
+--- a/src/DBConnection.h
++++ b/src/DBConnection.h
+@@ -75,8 +75,8 @@ public:
+       LoadSampleBlock,
+       InsertSampleBlock,
+       DeleteSampleBlock,
+-      GetRootPage,
+-      GetDBPage
++      GetSampleBlockSize,
++      GetAllSampleBlocksSize
+    };
+    sqlite3_stmt *Prepare(enum StatementID id, const char *sql);
+ 
+diff --git a/src/ProjectFileIO.cpp b/src/ProjectFileIO.cpp
+index 3b3e2e1fd..c9bc45af4 100644
+--- a/src/ProjectFileIO.cpp
++++ b/src/ProjectFileIO.cpp
+@@ -35,6 +35,7 @@ Paul Licameli split from AudacityProject.cpp
+ #include "widgets/ProgressDialog.h"
+ #include "wxFileNameWrapper.h"
+ #include "xml/XMLFileReader.h"
++#include "MemoryX.h"`
+ 
+ #undef NO_SHM
+ #if !defined(__WXMSW__)
+@@ -2357,255 +2358,69 @@ int64_t ProjectFileIO::GetTotalUsage()
+ }
+ 
+ //
+-// Returns the amount of disk space used by the specified sample blockid or all
+-// of the sample blocks if the blockid is 0.  It does this by using the raw SQLite
+-// pages available from the "sqlite_dbpage" virtual table to traverse the SQLite
+-// table b-tree described here:  https://www.sqlite.org/fileformat.html
++// Returns the estimation of disk space used by the specified sample blockid or all
++// of the sample blocks if the blockid is 0. This does not include small overhead
++// of the internal SQLite structures, only the size used by the data
+ //
+ int64_t ProjectFileIO::GetDiskUsage(DBConnection &conn, SampleBlockID blockid /* = 0 */)
+ {
+-   // Information we need to track our travels through the b-tree
+-   typedef struct
+-   {
+-      int64_t pgno;
+-      int currentCell;
+-      int numCells;
+-      unsigned char data[65536];
+-   } page;
+-   std::vector<page> stack;
+-
+-   int64_t total = 0;
+-   int64_t found = 0;
+-   int64_t right = 0;
+-   int rc;
++   sqlite3_stmt* stmt = nullptr;
+ 
+-   // Get the rootpage for the sampleblocks table.
+-   sqlite3_stmt *stmt =
+-      conn.Prepare(DBConnection::GetRootPage,
+-                    "SELECT rootpage FROM sqlite_master WHERE tbl_name = 'sampleblocks';");
+-   if (stmt == nullptr || sqlite3_step(stmt) != SQLITE_ROW)
++   if (blockid == 0)
+    {
+-      return 0;
+-   }
+-
+-   // And store it in our first stack frame
+-   stack.push_back({sqlite3_column_int64(stmt, 0)});
++      static const char* statement =
++R"(SELECT 
++	sum(length(blockid) + length(sampleformat) + 
++	length(summin) + length(summax) + length(sumrms) + 
++	length(summary256) + length(summary64k) +
++	length(samples))
++FROM sampleblocks;)";
+ 
+-   // All done with the statement
+-   sqlite3_clear_bindings(stmt);
+-   sqlite3_reset(stmt);
+-
+-   // Prepare/retrieve statement to read raw database page
+-   stmt = conn.Prepare(DBConnection::GetDBPage,
+-      "SELECT data FROM sqlite_dbpage WHERE pgno = ?1;");
+-   if (stmt == nullptr)
+-   {
+-      return 0;
++      stmt = conn.Prepare(DBConnection::GetAllSampleBlocksSize, statement);
+    }
+-
+-   // Traverse the b-tree until we've visited all of the leaf pages or until
+-   // we find the one corresponding to the passed in sample blockid. Because we
+-   // use an integer primary key for the sampleblocks table, the traversal will
+-   // be in ascending blockid sequence.
+-   do
++   else
+    {
+-      // Acces the top stack frame
+-      page &pg = stack.back();
++      static const char* statement =
++R"(SELECT 
++	length(blockid) + length(sampleformat) + 
++	length(summin) + length(summax) + length(sumrms) + 
++	length(summary256) + length(summary64k) +
++	length(samples)
++FROM sampleblocks WHERE blockid = ?1;)";
+ 
+-      // Read the page from the sqlite_dbpage table if it hasn't yet been loaded
+-      if (pg.numCells == 0)
+-      {
+-         // Bind the page number
+-         sqlite3_bind_int64(stmt, 1, pg.pgno);
++      stmt = conn.Prepare(DBConnection::GetSampleBlockSize, statement);
++   }
+ 
+-         // And retrieve the page
+-         if (sqlite3_step(stmt) != SQLITE_ROW)
++   auto cleanup = finally(
++      [stmt]() {
++         // Clear statement bindings and rewind statement
++         if (stmt != nullptr)
+          {
+-            // REVIEW: Likely harmless failure - says size is zero on
+-            // this error.
+-            // LLL: Yea, but not much else we can do.
+-            return 0;
++            sqlite3_clear_bindings(stmt);
++            sqlite3_reset(stmt);
+          }
++      });
+ 
+-         // Copy the page content to the stack frame
+-         memcpy(&pg.data,
+-                sqlite3_column_blob(stmt, 0),
+-                sqlite3_column_bytes(stmt, 0));
+-
+-         // And retrieve the total number of cells within it
+-         pg.numCells = get2(&pg.data[3]);
+-
+-         // Reset statement for next usage
+-         sqlite3_clear_bindings(stmt);
+-         sqlite3_reset(stmt);
+-      }
+-
+-      //wxLogDebug("%*.*spgno %lld currentCell %d numCells %d", (stack.size() - 1) * 2, (stack.size() - 1) * 2, "", pg.pgno, pg.currentCell, pg.numCells);
+-
+-      // Process an interior table b-tree page
+-      if (pg.data[0] == 0x05)
+-      {
+-         // Process the next cell if we haven't examined all of them yet
+-         if (pg.currentCell < pg.numCells)
+-         {
+-            // Remember the right-most leaf page number.
+-            right = get4(&pg.data[8]);
+-
+-            // Iterate over the cells.
+-            //
+-            // If we're not looking for a specific blockid, then we always push the
+-            // target page onto the stack and leave the loop after a single iteration.
+-            //
+-            // Otherwise, we match the blockid against the highest integer key contained
+-            // within the cell and if the blockid falls within the cell, we stack the
+-            // page and stop the iteration.
+-            //
+-            // In theory, we could do a binary search for a specific blockid here, but
+-            // because our sample blocks are always large, we will get very few cells
+-            // per page...usually 6 or less.
+-            //
+-            // In both cases, the stacked page can be either an internal or leaf page.
+-            bool stacked = false;
+-            while (pg.currentCell < pg.numCells)
+-            {
+-               // Get the offset to this cell using the offset in the cell pointer
+-               // array.
+-               //
+-               // The cell pointer array starts immediately after the page header
+-               // at offset 12 and the retrieved offset is from the beginning of
+-               // the page.
+-               int celloff = get2(&pg.data[12 + (pg.currentCell * 2)]);
+-
+-               // Bump to the next cell for the next iteration.
+-               pg.currentCell++;
+-
+-               // Get the page number this cell describes
+-               int pagenum = get4(&pg.data[celloff]);
+-
+-               // And the highest integer key, which starts at offset 4 within the cell.
+-               int64_t intkey = 0;
+-               get_varint(&pg.data[celloff + 4], &intkey);
+-
+-               //wxLogDebug("%*.*sinternal - right %lld celloff %d pagenum %d intkey %lld", (stack.size() - 1) * 2, (stack.size() - 1) * 2, " ", right, celloff, pagenum, intkey);
+-
+-               // Stack the described page if we're not looking for a specific blockid
+-               // or if this page contains the given blockid.
+-               if (!blockid || blockid <= intkey)
+-               {
+-                  stack.push_back({pagenum, 0, 0});
+-                  stacked = true;
+-                  break;
+-               }
+-            }
+-
+-            // If we pushed a new page onto the stack, we need to jump back up
+-            // to read the page
+-            if (stacked)
+-            {
+-               continue;
+-            }
+-         }
++   if (blockid != 0)
++   {
++      int rc = sqlite3_bind_int64(stmt, 1, blockid);
+ 
+-         // We've exhausted all the cells with this page, so we stack the right-most
+-         // leaf page.  Ensure we only process it once.
+-         if (right)
+-         {
+-            stack.push_back({right, 0, 0});
+-            right = 0;
+-            continue;
+-         }
+-      }
+-      // Process a leaf table b-tree page
+-      else if (pg.data[0] == 0x0d)
++      if (rc != SQLITE_OK)
+       {
+-         // Iterate over the cells
+-         //
+-         // If we're not looking for a specific blockid, then just accumulate the
+-         // payload sizes. We will be reading every leaf page in the sampleblocks
+-         // table.
+-         //
+-         // Otherwise we break out when we find the matching blockid. In this case,
+-         // we only ever look at 1 leaf page.
+-         bool stop = false;
+-         for (int i = 0; i < pg.numCells; i++)
+-         {
+-            // Get the offset to this cell using the offset in the cell pointer
+-            // array.
+-            //
+-            // The cell pointer array starts immediately after the page header
+-            // at offset 8 and the retrieved offset is from the beginning of
+-            // the page.
+-            int celloff = get2(&pg.data[8 + (i * 2)]);
+-
+-            // Get the total payload size in bytes of the described row.
+-            int64_t payload = 0;
+-            int digits = get_varint(&pg.data[celloff], &payload);
+-
+-            // Get the integer key for this row.
+-            int64_t intkey = 0;
+-            get_varint(&pg.data[celloff + digits], &intkey);
+-
+-            //wxLogDebug("%*.*sleaf - celloff %4d intkey %lld payload %lld", (stack.size() - 1) * 2, (stack.size() - 1) * 2, " ", celloff, intkey, payload);
+-
+-            // Add this payload size to the total if we're not looking for a specific
+-            // blockid
+-            if (!blockid)
+-            {
+-               total += payload;
+-            }
+-            // Otherwise, return the payload size for a matching row
+-            else if (blockid == intkey)
+-            {
+-               return payload;
+-            }
+-         }
++         conn.ThrowException(false);
+       }
++   }
+ 
+-      // Done with the current branch, so pop back up to the previous one (if any)
+-      stack.pop_back();
+-   } while (!stack.empty());
+-
+-   // Return the total used for all sample blocks
+-   return total;
+-}
+-
+-// Retrieves a 2-byte big-endian integer from the page data
+-unsigned int ProjectFileIO::get2(const unsigned char *ptr)
+-{
+-   return (ptr[0] << 8) | ptr[1];
+-}
+-
+-// Retrieves a 4-byte big-endian integer from the page data
+-unsigned int ProjectFileIO::get4(const unsigned char *ptr)
+-{
+-   return ((unsigned int) ptr[0] << 24) |
+-          ((unsigned int) ptr[1] << 16) |
+-          ((unsigned int) ptr[2] << 8)  |
+-          ((unsigned int) ptr[3]);
+-}
+-
+-// Retrieves a variable length integer from the page data. Returns the
+-// number of digits used to encode the integer and the stores the
+-// value at the given location.
+-int ProjectFileIO::get_varint(const unsigned char *ptr, int64_t *out)
+-{
+-   int64_t val = 0;
+-   int i;
++   int rc = sqlite3_step(stmt);
+ 
+-   for (i = 0; i < 8; ++i)
++   if (rc != SQLITE_ROW)
+    {
+-      val = (val << 7) + (ptr[i] & 0x7f);
+-      if ((ptr[i] & 0x80) == 0)
+-      {
+-         *out = val;
+-         return i + 1;
+-      }
++      conn.ThrowException(false);
+    }
+ 
+-   val = (val << 8) + (ptr[i] & 0xff);
+-   *out = val;
++   const int64_t size = sqlite3_column_int64(stmt, 0);
+ 
+-   return 9;
++   return size;
+ }
+ 
+ InvisibleTemporaryProject::InvisibleTemporaryProject()
+-- 
+2.33.1
+
diff --git a/pkgs/applications/audio/audacity/default.nix b/pkgs/applications/audio/audacity/default.nix
new file mode 100644
index 00000000000..9d4c522edc1
--- /dev/null
+++ b/pkgs/applications/audio/audacity/default.nix
@@ -0,0 +1,182 @@
+{ stdenv
+, lib
+, fetchFromGitHub
+, fetchpatch
+, cmake
+, pkg-config
+, python3
+, gettext
+, file
+, libvorbis
+, libmad
+, libjack2
+, lv2
+, lilv
+, serd
+, sord
+, sqlite
+, sratom
+, suil
+, libsndfile
+, soxr
+, flac
+, twolame
+, expat
+, libid3tag
+, libopus
+, ffmpeg_4
+, soundtouch
+, pcre
+/*, portaudio - given up fighting their portaudio.patch */
+, linuxHeaders
+, alsa-lib
+, at-spi2-core
+, dbus
+, libepoxy
+, libXdmcp
+, libXtst
+, libpthreadstubs
+, libselinux
+, libsepol
+, libxkbcommon
+, util-linux
+, wxGTK
+, AppKit ? null
+, AudioToolbox ? null
+, AudioUnit ? null
+, Carbon ? null
+, Cocoa ? null
+, CoreAudio ? null
+, CoreAudioKit ? null
+, CoreServices ? null
+, wxmac
+}:
+
+# TODO
+# 1. as of 3.0.2, GTK2 is still the recommended version ref https://www.audacityteam.org/download/source/ check if that changes in future versions
+# 2. detach sbsms
+
+let
+  inherit (lib) optionals;
+
+  wxWidgets_src = fetchFromGitHub {
+    owner = "audacity";
+    repo = "wxWidgets";
+    rev = "07e7d832c7a337aedba3537b90b2c98c4d8e2985";
+    sha256 = "1mawnkcrmqj98jp0jxlnh9xkc950ca033ccb51c7035pzmi9if9a";
+    fetchSubmodules = true;
+  };
+
+  wxGTK' = wxGTK.overrideAttrs (oldAttrs: rec {
+    src = wxWidgets_src;
+  });
+
+  wxmac' = wxmac.overrideAttrs (oldAttrs: rec {
+    src = wxWidgets_src;
+  });
+
+in
+stdenv.mkDerivation rec {
+  pname = "audacity";
+  # nixpkgs-update: no auto update
+  # Humans too! Let's wait to see how the situation with
+  # https://github.com/audacity/audacity/issues/1213 develops before
+  # pulling any updates that are subject to this privacy policy. We
+  # may wish to switch to a fork, but at the time of writing
+  # (2021-07-05) it's too early to tell how well any of the forks will
+  # be maintained.
+  version = "3.0.2";
+
+  src = fetchFromGitHub {
+    owner = "audacity";
+    repo = "audacity";
+    rev = "Audacity-${version}";
+    sha256 = "035qq2ff16cdl2cb9iply2bfjmhfl1dpscg79x6c9l0i9m8k41zj";
+  };
+
+  patches = [
+    (fetchpatch {
+      url = "https://github.com/audacity/audacity/commit/7f8135e112a0e1e8e906abab9339680d1e491441.patch";
+      sha256 = "0zp2iydd46analda9cfnbmzdkjphz5m7dynrdj5qdnmq6j3px9fw";
+      name = "audacity_xdg_paths.patch";
+    })
+    # This is required to make audacity work with nixpkgs’ sqlite
+    # https://github.com/audacity/audacity/pull/1802 rebased onto 3.0.2
+    ./0001-Use-a-different-approach-to-estimate-the-disk-space-.patch
+  ];
+
+  postPatch = ''
+    touch src/RevisionIdent.h
+  '' + lib.optionalString stdenv.isLinux ''
+    substituteInPlace src/FileNames.cpp \
+      --replace /usr/include/linux/magic.h ${linuxHeaders}/include/linux/magic.h
+  '';
+
+  nativeBuildInputs = [
+    cmake
+    gettext
+    pkg-config
+    python3
+  ] ++ optionals stdenv.isLinux [
+    linuxHeaders
+  ];
+
+  buildInputs = [
+    expat
+    ffmpeg_4
+    file
+    flac
+    libid3tag
+    libjack2
+    libmad
+    libopus
+    libsndfile
+    libvorbis
+    lilv
+    lv2
+    pcre
+    serd
+    sord
+    soundtouch
+    soxr
+    sqlite
+    sratom
+    suil
+    twolame
+  ] ++ optionals stdenv.isLinux [
+    alsa-lib # for portaudio
+    at-spi2-core
+    dbus
+    libepoxy
+    libXdmcp
+    libXtst
+    libpthreadstubs
+    libxkbcommon
+    libselinux
+    libsepol
+    util-linux
+    wxGTK'
+    wxGTK'.gtk
+  ] ++ optionals stdenv.isDarwin [
+    wxmac'
+    AppKit
+    Cocoa
+    CoreAudioKit
+    AudioUnit AudioToolbox CoreAudio CoreServices Carbon # for portaudio
+  ];
+
+  cmakeFlags = [
+    "-Daudacity_use_ffmpeg=linked"
+    "-DDISABLE_DYNAMIC_LOADING_FFMPEG=ON"
+  ];
+
+  doCheck = false; # Test fails
+
+  meta = with lib; {
+    description = "Sound editor with graphical UI";
+    homepage = "https://www.audacityteam.org/";
+    license = licenses.gpl2Plus;
+    maintainers = with maintainers; [ lheckemann veprbl ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/pkgs/applications/audio/audio-recorder/default.nix b/pkgs/applications/audio/audio-recorder/default.nix
new file mode 100644
index 00000000000..6a4abbbdf53
--- /dev/null
+++ b/pkgs/applications/audio/audio-recorder/default.nix
@@ -0,0 +1,44 @@
+{ lib, stdenv, fetchurl
+, pkg-config, intltool
+, glib, dbus, gtk3, libappindicator-gtk3, gst_all_1
+, librsvg, wrapGAppsHook
+, pulseaudioSupport ? true, libpulseaudio ? null }:
+
+stdenv.mkDerivation rec {
+  pname = "audio-recorder";
+  version = "2.1.3";
+
+  src = fetchurl {
+    name = "${pname}-${version}.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${glib.dev}/include/gio-unix-2.0";
+
+  nativeBuildInputs = [ pkg-config 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
+  ]) ++ lib.optional pulseaudioSupport libpulseaudio;
+
+  meta = with 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/pkgs/applications/audio/aumix/default.nix b/pkgs/applications/audio/aumix/default.nix
new file mode 100644
index 00000000000..2603e88fcbd
--- /dev/null
+++ b/pkgs/applications/audio/aumix/default.nix
@@ -0,0 +1,45 @@
+{ lib
+, stdenv
+, fetchurl
+, fetchpatch
+, gettext
+, ncurses
+, gtkGUI ? false
+, pkg-config
+, gtk2
+}:
+
+stdenv.mkDerivation rec {
+  pname = "aumix";
+  version = "2.9.1";
+
+  src = fetchurl {
+    url = "http://www.jpj.net/~trevor/aumix/releases/aumix-${version}.tar.bz2";
+    sha256 = "0a8fwyxnc5qdxff8sl2sfsbnvgh6pkij4yafiln0fxgg6bal7knj";
+  };
+
+  patches = [
+    # Pull Gentoo fix for -fno-common toolchains. Upstream does not
+    # seem to have the contacts
+    (fetchpatch {
+      name = "fno-common.patch";
+      url = "https://gitweb.gentoo.org/repo/gentoo.git/plain/media-sound/aumix/files/aumix-2.9.1-fno-common.patch?id=496c9ec7355f06f6d1d19be780a6981503e6df1f";
+      sha256 = "0qwylhx1hawsmx1pc7ykrjq9phksc73dq9rss6ggq15n3ggnc95y";
+    })
+  ];
+
+  buildInputs = [ gettext ncurses ]
+    ++ lib.optionals gtkGUI [ pkg-config gtk2 ];
+
+  meta = with lib; {
+    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 = licenses.gpl2Plus;
+    maintainers = with maintainers; [ ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/pkgs/applications/audio/autotalent/default.nix b/pkgs/applications/audio/autotalent/default.nix
new file mode 100644
index 00000000000..ba96aa51d60
--- /dev/null
+++ b/pkgs/applications/audio/autotalent/default.nix
@@ -0,0 +1,30 @@
+{ lib, stdenv, fetchzip }:
+
+stdenv.mkDerivation rec {
+  pname = "autotalent";
+  version = "0.2";
+
+  src = fetchzip {
+    url = "http://tombaran.info/${pname}-${version}.tar.gz";
+    sha256 = "19srnkghsdrxxlv2c7qimvyslxz63r97mkxfq78vbg654l3qz1a6";
+  };
+
+  makeFlags = [
+    "INSTALL_PLUGINS_DIR=$(out)/lib/ladspa"
+  ];
+
+  # To avoid name clashes, plugins should be compiled with symbols hidden, except for `ladspa_descriptor`:
+  preConfigure = ''
+    sed -r 's/^CFLAGS.*$/\0 -fvisibility=hidden/' -i Makefile
+
+    sed -r 's/^const LADSPA_Descriptor \*/__attribute__ ((visibility ("default"))) \0/' -i autotalent.c
+  '';
+
+  meta = with lib; {
+    homepage = "http://tombaran.info/autotalent.html";
+    description = "A real-time pitch correction LADSPA plugin (no MIDI control)";
+    license = licenses.gpl2;
+    maintainers = [ maintainers.michalrus ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/pkgs/applications/audio/axoloti/default.nix b/pkgs/applications/audio/axoloti/default.nix
new file mode 100644
index 00000000000..df885c90371
--- /dev/null
+++ b/pkgs/applications/audio/axoloti/default.nix
@@ -0,0 +1,101 @@
+{ lib, 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";
+  pname = "axoloti";
+
+  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 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/pkgs/applications/audio/axoloti/dfu-util.nix b/pkgs/applications/audio/axoloti/dfu-util.nix
new file mode 100644
index 00000000000..a8a2f8813af
--- /dev/null
+++ b/pkgs/applications/audio/axoloti/dfu-util.nix
@@ -0,0 +1,31 @@
+{ lib, stdenv, fetchurl, pkg-config, libusb1-axoloti }:
+
+stdenv.mkDerivation rec {
+  pname = "dfu-util";
+  version = "0.8";
+
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = [ libusb1-axoloti ];
+
+  src = fetchurl {
+    url = "http://dfu-util.sourceforge.net/releases/${pname}-${version}.tar.gz";
+    sha256 = "0n7h08avlzin04j93m6hkq9id6hxjiiix7ff9gc2n89aw6dxxjsm";
+  };
+
+  meta = with 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/pkgs/applications/audio/axoloti/libusb1.nix b/pkgs/applications/audio/axoloti/libusb1.nix
new file mode 100644
index 00000000000..820a8998f0b
--- /dev/null
+++ b/pkgs/applications/audio/axoloti/libusb1.nix
@@ -0,0 +1,39 @@
+{ stdenv, lib, fetchurl, pkg-config, systemd, libobjc, IOKit, fetchpatch }:
+
+stdenv.mkDerivation rec {
+  pname = "libusb";
+  version = "1.0.19";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/libusb/libusb-${version}.tar.bz2";
+    sha256 = "0h38p9rxfpg9vkrbyb120i1diq57qcln82h5fr7hvy82c20jql3c";
+  };
+
+  outputs = [ "out" "dev" ]; # get rid of propagating systemd closure
+
+  buildInputs = [ pkg-config ];
+  propagatedBuildInputs = lib.optional stdenv.isLinux systemd
+    ++ 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 = lib.optionalString stdenv.isLinux "-lgcc_s";
+
+  preFixup = lib.optionalString stdenv.isLinux ''
+    sed 's,-ludev,-L${lib.getLib systemd}/lib -ludev,' -i $out/lib/libusb-1.0.la
+  '';
+
+  meta = with lib; {
+    homepage = "http://www.libusb.info";
+    description = "User-space USB library";
+    maintainers = with maintainers; [ ];
+    platforms = platforms.unix;
+    license = licenses.lgpl21;
+  };
+}
diff --git a/pkgs/applications/audio/bambootracker/default.nix b/pkgs/applications/audio/bambootracker/default.nix
new file mode 100644
index 00000000000..b2cce97bbc4
--- /dev/null
+++ b/pkgs/applications/audio/bambootracker/default.nix
@@ -0,0 +1,46 @@
+{ mkDerivation
+, stdenv
+, lib
+, fetchFromGitHub
+, qmake
+, pkg-config
+, qttools
+, qtbase
+, rtaudio
+, rtmidi
+}:
+
+mkDerivation rec {
+  pname = "bambootracker";
+  version = "0.5.0";
+
+  src = fetchFromGitHub {
+    owner = "BambooTracker";
+    repo = "BambooTracker";
+    rev = "v${version}";
+    fetchSubmodules = true;
+    sha256 = "1mpbvhsmrn0wdmxfp3n5dwv4474qlhy47r3vwc2jwdslq6vgl1fa";
+  };
+
+  nativeBuildInputs = [ qmake qttools pkg-config ];
+
+  buildInputs = [ qtbase rtaudio rtmidi ];
+
+  qmakeFlags = [ "CONFIG+=system_rtaudio" "CONFIG+=system_rtmidi" ];
+
+  postConfigure = "make qmake_all";
+
+  postInstall = lib.optionalString stdenv.hostPlatform.isDarwin ''
+    mkdir -p $out/Applications
+    mv $out/{bin,Applications}/BambooTracker.app
+    ln -s $out/{Applications/BambooTracker.app/Contents/MacOS,bin}/BambooTracker
+  '';
+
+  meta = with lib; {
+    description = "A tracker for YM2608 (OPNA) which was used in NEC PC-8801/9801 series computers";
+    homepage = "https://bambootracker.github.io/BambooTracker/";
+    license = licenses.gpl2Plus;
+    platforms = platforms.all;
+    maintainers = with maintainers; [ OPNA2608 ];
+  };
+}
diff --git a/pkgs/applications/audio/baudline/default.nix b/pkgs/applications/audio/baudline/default.nix
new file mode 100644
index 00000000000..7d6d51011cc
--- /dev/null
+++ b/pkgs/applications/audio/baudline/default.nix
@@ -0,0 +1,70 @@
+{ lib, stdenv, fetchurl, libXmu, libXt, libX11, libXext, libXxf86vm, libjack2
+, makeWrapper
+}:
+
+let
+  rpath = lib.makeLibraryPath
+    [ libXmu libXt libX11 libXext libXxf86vm libjack2 ];
+in
+stdenv.mkDerivation rec {
+  pname = "baudline";
+  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}";
+
+  nativeBuildInputs = [ 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 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/pkgs/applications/audio/bchoppr/default.nix b/pkgs/applications/audio/bchoppr/default.nix
new file mode 100644
index 00000000000..623aa158452
--- /dev/null
+++ b/pkgs/applications/audio/bchoppr/default.nix
@@ -0,0 +1,28 @@
+{ lib, stdenv, fetchFromGitHub, pkg-config, cairo, libX11, lv2 }:
+
+stdenv.mkDerivation rec {
+  pname = "bchoppr";
+  version = "1.10.10";
+
+  src = fetchFromGitHub {
+    owner = "sjaehn";
+    repo = pname;
+    rev = version;
+    sha256 = "sha256-LNPG/ETRmgPv8LsYVHol4p5oRCvg+dSYVEe61i8Dvz8=";
+  };
+
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = [ cairo libX11 lv2 ];
+
+  installFlags = [ "PREFIX=$(out)" ];
+
+  enableParallelBuilding = true;
+
+  meta = with lib; {
+    homepage = "https://github.com/sjaehn/BChoppr";
+    description = "An audio stream chopping LV2 plugin";
+    maintainers = [ maintainers.magnetophon ];
+    platforms = platforms.linux;
+    license = licenses.gpl3Plus;
+  };
+}
diff --git a/pkgs/applications/audio/beast/patch.patch b/pkgs/applications/audio/beast/patch.patch
new file mode 100644
index 00000000000..9d9f82cf4b4
--- /dev/null
+++ b/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/pkgs/applications/audio/bespokesynth/default.nix b/pkgs/applications/audio/bespokesynth/default.nix
new file mode 100644
index 00000000000..a5ef585969e
--- /dev/null
+++ b/pkgs/applications/audio/bespokesynth/default.nix
@@ -0,0 +1,147 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, fetchzip
+, cmake
+, pkg-config
+, ninja
+, makeWrapper
+, libjack2
+, alsa-lib
+, alsa-tools
+, freetype
+, libusb1
+, libX11
+, libXrandr
+, libXinerama
+, libXext
+, libXcursor
+, libXScrnSaver
+, libGL
+, libxcb
+, xcbutil
+, libxkbcommon
+, xcbutilkeysyms
+, xcb-util-cursor
+, gtk3
+, webkitgtk
+, python3
+, curl
+, pcre
+, mount
+, gnome
+, Cocoa
+, WebKit
+, CoreServices
+, CoreAudioKit
+  # It is not allowed to distribute binaries with the VST2 SDK plugin without a license
+  # (the author of Bespoke has such a licence but not Nix). VST3 should work out of the box.
+  # Read more in https://github.com/NixOS/nixpkgs/issues/145607
+, enableVST2 ? false
+}:
+
+let
+  # equal to vst-sdk in ../oxefmsynth/default.nix
+  vst-sdk = stdenv.mkDerivation rec {
+    name = "vstsdk3610_11_06_2018_build_37";
+    src = fetchzip {
+      url = "https://web.archive.org/web/20181016150224if_/https://download.steinberg.net/sdk_downloads/${name}.zip";
+      sha256 = "0da16iwac590wphz2sm5afrfj42jrsnkr1bxcy93lj7a369ildkj";
+    };
+    installPhase = ''
+      cp -r . $out
+    '';
+  };
+
+in
+stdenv.mkDerivation rec {
+  pname = "bespokesynth";
+  version = "1.1.0";
+
+  src = fetchFromGitHub {
+    owner = "BespokeSynth";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "sha256-PN0Q6/gI1PeMaF/8EZFGJdLR8JVHQZfWunAhOIQxkHw=";
+    fetchSubmodules = true;
+  };
+
+  cmakeBuildType = "Release";
+
+  cmakeFlags = lib.optionals enableVST2 [ "-DBESPOKE_VST2_SDK_LOCATION=${vst-sdk}/VST2_SDK" ];
+
+  nativeBuildInputs = [ python3 makeWrapper cmake pkg-config ninja ];
+
+  buildInputs = lib.optionals stdenv.hostPlatform.isLinux [
+    # List obtained in https://github.com/BespokeSynth/BespokeSynth/blob/main/azure-pipelines.yml
+    libX11
+    libXrandr
+    libXinerama
+    libXext
+    libXcursor
+    libXScrnSaver
+    curl
+    gtk3
+    webkitgtk
+    freetype
+    libGL
+    libusb1
+    alsa-lib
+    libjack2
+    gnome.zenity
+    alsa-tools
+    libxcb
+    xcbutil
+    libxkbcommon
+    xcbutilkeysyms
+    xcb-util-cursor
+    pcre
+    mount
+  ] ++ lib.optionals stdenv.hostPlatform.isDarwin [
+    Cocoa
+    WebKit
+    CoreServices
+    CoreAudioKit
+  ];
+
+  NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isDarwin (toString [
+    # Fails to find fp.h on its own
+    "-isystem ${CoreServices}/Library/Frameworks/CoreServices.framework/Versions/Current/Frameworks/CarbonCore.framework/Versions/Current/Headers/"
+  ]);
+
+  postInstall =
+    if stdenv.hostPlatform.isDarwin then ''
+      mkdir -p $out/{Applications,bin}
+      mv Source/BespokeSynth_artefacts/${cmakeBuildType}/BespokeSynth.app $out/Applications/
+      # Symlinking confuses the resource finding about the actual location of the binary
+      # Resources are looked up relative to the executed file's location
+      makeWrapper $out/{Applications/BespokeSynth.app/Contents/MacOS,bin}/BespokeSynth
+    '' else ''
+      # Ensure zenity is available, or it won't be able to open new files.
+      # Ensure the python used for compilation is the same as the python used at run-time.
+      # jedi is also required for auto-completion.
+      # These X11 libs get dlopen'd, they cause visual bugs when unavailable.
+      wrapProgram $out/bin/BespokeSynth \
+        --prefix PATH : '${lib.makeBinPath [
+          gnome.zenity
+          (python3.withPackages (ps: with ps; [ jedi ]))
+        ]}' \
+        --prefix LD_LIBRARY_PATH : '${lib.makeLibraryPath [
+          libXrandr
+          libXinerama
+          libXcursor
+          libXScrnSaver
+        ]}'
+    '';
+
+  meta = with lib; {
+    description =
+      "Software modular synth with controllers support, scripting and VST";
+    homepage = "https://github.com/awwbees/BespokeSynth";
+    license = with licenses; [
+      gpl3Plus
+    ] ++ lib.optional enableVST2 unfree;
+    maintainers = with maintainers; [ astro tobiasBora OPNA2608 ];
+    platforms = platforms.all;
+  };
+}
diff --git a/pkgs/applications/audio/bitmeter/default.nix b/pkgs/applications/audio/bitmeter/default.nix
new file mode 100644
index 00000000000..6108d84c3d9
--- /dev/null
+++ b/pkgs/applications/audio/bitmeter/default.nix
@@ -0,0 +1,29 @@
+{ lib, stdenv, autoreconfHook, fetchurl, libjack2, gtk2, pkg-config }:
+
+stdenv.mkDerivation rec {
+  pname = "bitmeter";
+  version = "1.2";
+
+  src = fetchurl {
+    url = "https://devel.tlrmx.org/audio/source/${pname}-${version}.tar.gz";
+    sha256 = "09ck2gxqky701dc1p0ip61rrn16v0pdc7ih2hc2sd63zcw53g2a7";
+  };
+
+  nativeBuildInputs = [ autoreconfHook pkg-config ];
+  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 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/pkgs/applications/audio/bitwig-studio/bitwig-studio1.nix b/pkgs/applications/audio/bitwig-studio/bitwig-studio1.nix
new file mode 100644
index 00000000000..a66a5e6c9dc
--- /dev/null
+++ b/pkgs/applications/audio/bitwig-studio/bitwig-studio1.nix
@@ -0,0 +1,98 @@
+{ stdenv, fetchurl, alsa-lib, 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 {
+  pname = "bitwig-studio";
+  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; [
+    alsa-lib 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 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 = "https://www.bitwig.com/";
+    license = licenses.unfree;
+    platforms = [ "x86_64-linux" ];
+    maintainers = with maintainers; [ michalrus mrVanDalo ];
+  };
+}
diff --git a/pkgs/applications/audio/bitwig-studio/bitwig-studio2.nix b/pkgs/applications/audio/bitwig-studio/bitwig-studio2.nix
new file mode 100644
index 00000000000..345750e9e2a
--- /dev/null
+++ b/pkgs/applications/audio/bitwig-studio/bitwig-studio2.nix
@@ -0,0 +1,16 @@
+{ fetchurl, bitwig-studio1,
+  pulseaudio }:
+
+bitwig-studio1.overrideAttrs (oldAttrs: rec {
+  name = "bitwig-studio-${version}";
+  version = "2.5";
+
+  src = fetchurl {
+    url    = "https://downloads.bitwig.com/stable/${version}/bitwig-studio-${version}.deb";
+    sha256 = "1zkiz36lhck3qvl0cp0dq6pwbv4lx4sh9wh0ga92kx5zhvbjm098";
+  };
+
+  runtimeDependencies = [
+    pulseaudio
+  ];
+})
diff --git a/pkgs/applications/audio/bitwig-studio/bitwig-studio3.nix b/pkgs/applications/audio/bitwig-studio/bitwig-studio3.nix
new file mode 100644
index 00000000000..6b272a408ab
--- /dev/null
+++ b/pkgs/applications/audio/bitwig-studio/bitwig-studio3.nix
@@ -0,0 +1,81 @@
+{ stdenv, fetchurl, alsa-lib, cairo, dpkg, freetype
+, gdk-pixbuf, glib, gtk3, lib, xorg
+, libglvnd, libjack2, ffmpeg
+, libxkbcommon, xdg-utils, zlib, pulseaudio
+, wrapGAppsHook, makeWrapper }:
+
+stdenv.mkDerivation rec {
+  pname = "bitwig-studio";
+  version = "3.3.7";
+
+  src = fetchurl {
+    url = "https://downloads.bitwig.com/stable/${version}/${pname}-${version}.deb";
+    sha256 = "13jr45kzv0xjhhqk30qpq793349qyx8jpas4kl6i6bk3xfrd3fbz";
+  };
+
+  nativeBuildInputs = [ dpkg makeWrapper wrapGAppsHook ];
+
+  unpackCmd = ''
+    mkdir -p root
+    dpkg-deb -x $curSrc root
+  '';
+
+  dontBuild = true;
+  dontWrapGApps = true; # we only want $gappsWrapperArgs here
+
+  buildInputs = with xorg; [
+    alsa-lib cairo freetype gdk-pixbuf glib gtk3 libxcb xcbutil xcbutilwm zlib libXtst libxkbcommon pulseaudio libjack2 libX11 libglvnd libXcursor stdenv.cc.cc.lib
+  ];
+
+  binPath = lib.makeBinPath [
+    xdg-utils ffmpeg
+  ];
+
+  ldLibraryPath = lib.strings.makeLibraryPath buildInputs;
+
+  installPhase = ''
+    runHook preInstall
+
+    mkdir -p $out/bin
+    cp -r opt/bitwig-studio $out/libexec
+    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
+
+      runHook postInstall
+  '';
+
+  postFixup = ''
+    # patchelf fails to set rpath on BitwigStudioEngine, so we use
+    # the LD_LIBRARY_PATH way
+
+    find $out -type f -executable \
+      -not -name '*.so.*' \
+      -not -name '*.so' \
+      -not -name '*.jar' \
+      -not -path '*/resources/*' | \
+    while IFS= read -r f ; do
+      patchelf --set-interpreter "${stdenv.cc.bintools.dynamicLinker}" $f
+      wrapProgram $f \
+        "''${gappsWrapperArgs[@]}" \
+        --prefix PATH : "${binPath}" \
+        --suffix LD_LIBRARY_PATH : "${ldLibraryPath}"
+    done
+
+  '';
+
+  meta = with 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 = "https://www.bitwig.com/";
+    license = licenses.unfree;
+    platforms = [ "x86_64-linux" ];
+    maintainers = with maintainers; [ bfortz michalrus mrVanDalo ];
+  };
+}
diff --git a/pkgs/applications/audio/bitwig-studio/bitwig-studio4.nix b/pkgs/applications/audio/bitwig-studio/bitwig-studio4.nix
new file mode 100644
index 00000000000..7b527139e91
--- /dev/null
+++ b/pkgs/applications/audio/bitwig-studio/bitwig-studio4.nix
@@ -0,0 +1,80 @@
+{ stdenv, fetchurl, alsa-lib, cairo, dpkg, freetype
+, gdk-pixbuf, glib, gtk3, lib, xorg
+, libglvnd, libjack2, ffmpeg
+, libxkbcommon, xdg-utils, zlib, pulseaudio
+, wrapGAppsHook, makeWrapper }:
+
+stdenv.mkDerivation rec {
+  pname = "bitwig-studio";
+  version = "4.2";
+
+  src = fetchurl {
+    url = "https://downloads.bitwig.com/stable/${version}/${pname}-${version}.deb";
+    sha256 = "sha256-hIIEVj5sM/NdhBiwerFvyIXqj0R8EvcxwM6UZ0CE428=";
+  };
+
+  nativeBuildInputs = [ dpkg makeWrapper wrapGAppsHook ];
+
+  unpackCmd = ''
+    mkdir -p root
+    dpkg-deb -x $curSrc root
+  '';
+
+  dontBuild = true;
+  dontWrapGApps = true; # we only want $gappsWrapperArgs here
+
+  buildInputs = with xorg; [
+    alsa-lib cairo freetype gdk-pixbuf glib gtk3 libxcb xcbutil xcbutilwm zlib libXtst libxkbcommon pulseaudio libjack2 libX11 libglvnd libXcursor stdenv.cc.cc.lib
+  ];
+
+  installPhase = ''
+    runHook preInstall
+
+    mkdir -p $out/bin
+    cp -r opt/bitwig-studio $out/libexec
+    ln -s $out/libexec/bitwig-studio $out/bin/bitwig-studio
+    cp -r usr/share $out/share
+    substitute usr/share/applications/com.bitwig.BitwigStudio.desktop \
+      $out/share/applications/com.bitwig.BitwigStudio.desktop \
+      --replace /usr/bin/bitwig-studio $out/bin/bitwig-studio
+
+      runHook postInstall
+  '';
+
+  postFixup = ''
+    # patchelf fails to set rpath on BitwigStudioEngine, so we use
+    # the LD_LIBRARY_PATH way
+
+    find $out -type f -executable \
+      -not -name '*.so.*' \
+      -not -name '*.so' \
+      -not -name '*.jar' \
+      -not -name 'jspawnhelper' \
+      -not -path '*/resources/*' | \
+    while IFS= read -r f ; do
+      patchelf --set-interpreter "${stdenv.cc.bintools.dynamicLinker}" $f
+      wrapProgram $f \
+        "''${gappsWrapperArgs[@]}" \
+        --prefix PATH : "${lib.makeBinPath [ xdg-utils ffmpeg ]}" \
+        --suffix LD_LIBRARY_PATH : "${lib.strings.makeLibraryPath buildInputs}"
+    done
+
+    find $out -type f -executable -name 'jspawnhelper' | \
+    while IFS= read -r f ; do
+      patchelf --set-interpreter "${stdenv.cc.bintools.dynamicLinker}" $f
+    done
+  '';
+
+  meta = with 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 = "https://www.bitwig.com/";
+    license = licenses.unfree;
+    platforms = [ "x86_64-linux" ];
+    maintainers = with maintainers; [ bfortz michalrus mrVanDalo ];
+  };
+}
diff --git a/pkgs/applications/audio/bjumblr/default.nix b/pkgs/applications/audio/bjumblr/default.nix
new file mode 100644
index 00000000000..5e3919e04d3
--- /dev/null
+++ b/pkgs/applications/audio/bjumblr/default.nix
@@ -0,0 +1,28 @@
+{ lib, stdenv, fetchFromGitHub, libX11, cairo, lv2, pkg-config, libsndfile }:
+
+stdenv.mkDerivation rec {
+  pname = "bjumblr";
+  version = "1.6.8";
+
+  src = fetchFromGitHub {
+    owner = "sjaehn";
+    repo = "BJumblr";
+    rev = version;
+    sha256 = "sha256-qSoGmWUGaMjx/bkiCJ/qb4LBbuFPXXlJ0e9hrFBXzwE=";
+  };
+
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = [
+    libX11 cairo lv2 libsndfile
+  ];
+
+  installFlags = [ "PREFIX=$(out)" ];
+
+  meta = with lib; {
+    homepage = "https://github.com/sjaehn/BJumblr";
+    description = "Pattern-controlled audio stream / sample re-sequencer LV2 plugin";
+    maintainers = [ maintainers.magnetophon ];
+    platforms = platforms.linux;
+    license = licenses.gpl3;
+  };
+}
diff --git a/pkgs/applications/audio/blanket/default.nix b/pkgs/applications/audio/blanket/default.nix
new file mode 100644
index 00000000000..b343953f3f8
--- /dev/null
+++ b/pkgs/applications/audio/blanket/default.nix
@@ -0,0 +1,69 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, meson
+, ninja
+, pkg-config
+, wrapGAppsHook
+, desktop-file-utils
+, appstream-glib
+, python3Packages
+, glib
+, gtk3
+, libhandy
+, gobject-introspection
+, gst_all_1
+}:
+
+python3Packages.buildPythonApplication rec {
+  pname = "blanket";
+  version = "0.5.0";
+
+  src = fetchFromGitHub {
+    owner = "rafaelmardojai";
+    repo = "blanket";
+    rev = version;
+    sha256 = "00i821zqfbigxmc709322r16z75qsw4rg23yhv35gza9sl65bzkg";
+  };
+
+  nativeBuildInputs = [
+    meson
+    ninja
+    pkg-config
+    wrapGAppsHook
+    desktop-file-utils
+    appstream-glib
+  ];
+
+  buildInputs = [
+    glib
+    gtk3
+    libhandy
+    gobject-introspection
+    gst_all_1.gstreamer
+    gst_all_1.gst-plugins-base
+    gst_all_1.gst-plugins-good
+    gst_all_1.gst-plugins-bad
+  ];
+
+  propagatedBuildInputs = with python3Packages; [
+    pygobject3
+  ];
+
+  # Broken with gobject-introspection setup hook
+  # https://github.com/NixOS/nixpkgs/issues/56943
+  strictDeps = false;
+  format = "other";
+
+  postPatch = ''
+    patchShebangs build-aux/meson/postinstall.py
+  '';
+
+  meta = with lib; {
+    homepage = "https://github.com/rafaelmardojai/blanket";
+    description = "Listen to different sounds";
+    maintainers = with maintainers; [ onny ];
+    license = licenses.gpl3Plus;
+    platforms = platforms.linux;
+  };
+}
diff --git a/pkgs/applications/audio/boops/default.nix b/pkgs/applications/audio/boops/default.nix
new file mode 100644
index 00000000000..2f415667539
--- /dev/null
+++ b/pkgs/applications/audio/boops/default.nix
@@ -0,0 +1,28 @@
+{ stdenv, lib, fetchFromGitHub, xorg, cairo, lv2, libsndfile, pkg-config }:
+
+stdenv.mkDerivation rec {
+  pname = "boops";
+  version = "1.8.2";
+
+  src = fetchFromGitHub {
+    owner = "sjaehn";
+    repo = "BOops";
+    rev = version;
+    sha256 = "0nvpawk58g189z96xnjs4pyri5az3ckdi9mhi0i9s0a7k4gdkarr";
+  };
+
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = [
+    xorg.libX11 cairo lv2 libsndfile
+  ];
+
+  installFlags = [ "PREFIX=$(out)" ];
+
+  meta = with lib; {
+    homepage = "https://github.com/sjaehn/BOops";
+    description = "Sound glitch effect sequencer LV2 plugin";
+    maintainers = [ maintainers.magnetophon ];
+    platforms = platforms.linux;
+    license = licenses.gpl3Plus;
+  };
+}
diff --git a/pkgs/applications/audio/bristol/default.nix b/pkgs/applications/audio/bristol/default.nix
new file mode 100644
index 00000000000..0c9248b5f0b
--- /dev/null
+++ b/pkgs/applications/audio/bristol/default.nix
@@ -0,0 +1,34 @@
+{ lib, stdenv, fetchurl, alsa-lib, libjack2, pkg-config, libpulseaudio, xorg }:
+
+stdenv.mkDerivation  rec {
+  pname = "bristol";
+  version = "0.60.11";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/bristol/${pname}-${version}.tar.gz";
+    sha256 = "1fi2m4gmvxdi260821y09lxsimq82yv4k5bbgk3kyc3x1nyhn7vx";
+  };
+
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = [
+    alsa-lib 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 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/pkgs/applications/audio/bschaffl/default.nix b/pkgs/applications/audio/bschaffl/default.nix
new file mode 100644
index 00000000000..eabdad3caa9
--- /dev/null
+++ b/pkgs/applications/audio/bschaffl/default.nix
@@ -0,0 +1,28 @@
+{ lib, stdenv, fetchFromGitHub, pkg-config, cairo, libX11, lv2 }:
+
+stdenv.mkDerivation rec {
+  pname = "bschaffl";
+  version = "1.4.8";
+
+  src = fetchFromGitHub {
+    owner = "sjaehn";
+    repo = pname;
+    rev = version;
+    sha256 = "sha256-zczDqJdUAN2oSyIRt9m3OnwOWXlwL4Yod8UMCXs5zM0=";
+  };
+
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = [ cairo libX11 lv2 ];
+
+  installFlags = [ "PREFIX=$(out)" ];
+
+  enableParallelBuilding = true;
+
+  meta = with lib; {
+    homepage = "https://github.com/sjaehn/BSchaffl";
+    description = "Pattern-controlled MIDI amp & time stretch LV2 plugin";
+    maintainers = [ maintainers.magnetophon ];
+    platforms = platforms.linux;
+    license = licenses.gpl3;
+  };
+}
diff --git a/pkgs/applications/audio/bsequencer/default.nix b/pkgs/applications/audio/bsequencer/default.nix
new file mode 100644
index 00000000000..00f99adf7ba
--- /dev/null
+++ b/pkgs/applications/audio/bsequencer/default.nix
@@ -0,0 +1,28 @@
+{ lib, stdenv, fetchFromGitHub, xorg, cairo, lv2, pkg-config }:
+
+stdenv.mkDerivation rec {
+  pname = "bsequencer";
+  version = "1.8.10";
+
+  src = fetchFromGitHub {
+    owner = "sjaehn";
+    repo = "BSEQuencer";
+    rev = version;
+    sha256 = "sha256-1PSICm5mw37nO3gkHA9MNUH+CFULeOZURjimYEA/dXA=";
+  };
+
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = [
+    xorg.libX11 cairo lv2
+  ];
+
+  installFlags = [ "PREFIX=$(out)" ];
+
+  meta = with lib; {
+    homepage = "https://github.com/sjaehn/BSEQuencer";
+    description = "Multi channel MIDI step sequencer LV2 plugin";
+    maintainers = [ maintainers.magnetophon ];
+    platforms = platforms.linux;
+    license = licenses.gpl3;
+  };
+}
diff --git a/pkgs/applications/audio/bshapr/default.nix b/pkgs/applications/audio/bshapr/default.nix
new file mode 100644
index 00000000000..728c60b2e86
--- /dev/null
+++ b/pkgs/applications/audio/bshapr/default.nix
@@ -0,0 +1,28 @@
+{ lib, stdenv, fetchFromGitHub, xorg, cairo, lv2, pkg-config }:
+
+stdenv.mkDerivation rec {
+  pname = "bshapr";
+  version = "0.13";
+
+  src = fetchFromGitHub {
+    owner = "sjaehn";
+    repo = "BShapr";
+    rev = "v${version}";
+    sha256 = "sha256-9I4DPRl6i/VL8Etw3qLGZkP45BGsbxFxNOvRy3B3I+M=";
+  };
+
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = [
+    xorg.libX11 cairo lv2
+  ];
+
+  installFlags = [ "PREFIX=$(out)" ];
+
+  meta = with lib; {
+    homepage = "https://github.com/sjaehn/BShapr";
+    description = "Beat / envelope shaper LV2 plugin";
+    maintainers = [ maintainers.magnetophon ];
+    platforms = platforms.linux;
+    license = licenses.gpl3;
+  };
+}
diff --git a/pkgs/applications/audio/bslizr/default.nix b/pkgs/applications/audio/bslizr/default.nix
new file mode 100644
index 00000000000..df81e0960b3
--- /dev/null
+++ b/pkgs/applications/audio/bslizr/default.nix
@@ -0,0 +1,28 @@
+{ lib, stdenv, fetchFromGitHub, xorg, cairo, lv2, pkg-config }:
+
+stdenv.mkDerivation rec {
+  pname = "bslizr";
+  version = "1.2.16";
+
+  src = fetchFromGitHub {
+    owner = "sjaehn";
+    repo = "BSlizr";
+    rev = version;
+    sha256 = "sha256-5DvVkTz79CLvZMZ3XnI0COIfxnhERDSvzbVoJAcqNRI=";
+  };
+
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = [
+    xorg.libX11 cairo lv2
+  ];
+
+  installFlags = [ "PREFIX=$(out)" ];
+
+  meta = with lib; {
+    homepage = "https://github.com/sjaehn/BSlizr";
+    description = "Sequenced audio slicing effect LV2 plugin (step sequencer effect)";
+    maintainers = [ maintainers.magnetophon ];
+    platforms = platforms.linux;
+    license = licenses.gpl3;
+  };
+}
diff --git a/pkgs/applications/audio/bucklespring/default.nix b/pkgs/applications/audio/bucklespring/default.nix
new file mode 100644
index 00000000000..dbdef66c5bc
--- /dev/null
+++ b/pkgs/applications/audio/bucklespring/default.nix
@@ -0,0 +1,63 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+
+, legacy ? false
+, libinput
+
+, pkg-config
+, makeWrapper
+
+, openal
+, alure
+, libXtst
+, libX11
+}:
+
+let
+  inherit (lib) optionals;
+in
+stdenv.mkDerivation rec {
+  pname = "bucklespring";
+  version = "1.5.1";
+
+  src = fetchFromGitHub {
+    owner = "zevv";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "0prhqibivxzmz90k79zpwx3c97h8wa61rk5ihi9a5651mnc46mna";
+  };
+
+  nativeBuildInputs = [ pkg-config makeWrapper ];
+
+  buildInputs = [ openal alure ]
+    ++ optionals (legacy) [ libXtst libX11 ]
+    ++ optionals (!legacy) [ libinput ];
+
+  makeFlags = optionals (!legacy) [ "libinput=1" ];
+
+  installPhase = ''
+    runHook preInstall
+
+    mkdir -p $out/share/wav
+    cp -r $src/wav $out/share/.
+    install -D ./buckle.desktop $out/share/applications/buckle.desktop
+    install -D ./buckle $out/bin/buckle
+    wrapProgram $out/bin/buckle --add-flags "-p $out/share/wav"
+
+    runHook postInstall
+  '';
+
+  meta = with lib; {
+    description = "Nostalgia bucklespring keyboard sound";
+    longDescription = ''
+      When built with libinput (wayland or bare console),
+      users need to be in the input group to use this:
+      <code>users.users.alice.extraGroups = [ "input" ];</code>
+    '';
+    homepage = "https://github.com/zevv/bucklespring";
+    license = licenses.gpl2Only;
+    platforms  = platforms.unix;
+    maintainers = [ maintainers.evils ];
+  };
+}
diff --git a/pkgs/applications/audio/cadence/default.nix b/pkgs/applications/audio/cadence/default.nix
new file mode 100644
index 00000000000..72f13bdb09b
--- /dev/null
+++ b/pkgs/applications/audio/cadence/default.nix
@@ -0,0 +1,114 @@
+{ lib
+, a2jmidid
+, coreutils
+, libjack2
+, fetchpatch
+, fetchFromGitHub
+, jack_capture
+, pkg-config
+, pulseaudioFull
+, qtbase
+, makeWrapper
+, mkDerivation
+, python3
+}:
+#ladish missing, claudia can't work.
+#pulseaudio needs fixes (patchShebangs .pa ...)
+#desktop needs icons and exec fixing.
+
+mkDerivation rec {
+  version = "0.9.1";
+  pname = "cadence";
+
+  src = fetchFromGitHub {
+    owner = "falkTX";
+    repo = "Cadence";
+    rev = "v${version}";
+    sha256 = "sha256-QFC4wiVF8wphhrammxtc+VMZJpXY5OGHs6DNa21+6B8=";
+  };
+
+  patches = [
+    # Fix installation without DESTDIR
+    (fetchpatch {
+      url = "https://github.com/falkTX/Cadence/commit/1fd3275e7daf4b75f59ef1f85a9e2e93bd5c0731.patch";
+      sha256 = "0q791jsh8vmjg678dzhbp1ykq8xrrlxl1mbgs3g8if1ccj210vd8";
+    })
+    # Fix build with Qt 5.15
+    (fetchpatch {
+      url = "https://github.com/falkTX/Cadence/commit/c167f35fbb76c4246c730b29262a59da73010412.patch";
+      sha256 = "1gm9q6gx03sla5vcnisznc95pjdi2703f8b3mj2kby9rfx2pylyh";
+    })
+  ];
+
+  postPatch = ''
+    libjackso=$(realpath ${lib.makeLibraryPath [libjack2]}/libjack.so.0);
+    substituteInPlace ./src/jacklib.py --replace libjack.so.0 $libjackso
+    substituteInPlace ./src/cadence.py --replace "/usr/bin/pulseaudio" \
+      "${lib.makeBinPath[pulseaudioFull]}/pulseaudio"
+    substituteInPlace ./c++/jackbridge/JackBridge.cpp --replace libjack.so.0 $libjackso
+  '';
+
+  nativeBuildInputs = [
+    pkg-config
+  ];
+
+  buildInputs = [
+    qtbase
+    jack_capture
+    pulseaudioFull
+    (
+      (python3.withPackages (ps: with ps; [
+        pyqt5
+        dbus-python
+      ]))
+    )
+  ];
+
+  makeFlags = [
+    "PREFIX=${placeholder "out"}"
+    "SYSCONFDIR=${placeholder "out"}/etc"
+  ];
+
+  dontWrapQtApps = true;
+
+  # Replace with our own wrappers. They need to be changed manually since it wouldn't work otherwise.
+  preFixup =
+    let
+      outRef = placeholder "out";
+      prefix = "${outRef}/share/cadence/src";
+      scriptAndSource = lib.mapAttrs'
+        (script: source:
+          lib.nameValuePair ("${outRef}/bin/" + script) ("${prefix}/" + source)
+        )
+        {
+          "cadence" = "cadence.py";
+          "claudia" = "claudia.py";
+          "catarina" = "catarina.py";
+          "catia" = "catia.py";
+          "cadence-jacksettings" = "jacksettings.py";
+          "cadence-aloop-daemon" = "cadence_aloop_daemon.py";
+          "cadence-logs" = "logs.py";
+          "cadence-render" = "render.py";
+          "claudia-launcher" = "claudia_launcher.py";
+          "cadence-session-start" = "cadence_session_start.py";
+        };
+    in
+    lib.mapAttrsToList
+      (script: source: ''
+        rm -f ${script}
+        makeQtWrapper ${source} ${script} \
+          --prefix PATH : "${lib.makeBinPath [
+            jack_capture # cadence-render
+            pulseaudioFull # cadence, cadence-session-start
+            ]}"
+      '')
+      scriptAndSource;
+
+  meta = {
+    homepage = "https://github.com/falkTX/Cadence/";
+    description = "Collection of tools useful for audio production";
+    license = lib.licenses.gpl2Plus;
+    maintainers = with lib.maintainers; [ ];
+    platforms = [ "x86_64-linux" ];
+  };
+}
diff --git a/pkgs/applications/audio/calf/default.nix b/pkgs/applications/audio/calf/default.nix
new file mode 100644
index 00000000000..bdcbf024e60
--- /dev/null
+++ b/pkgs/applications/audio/calf/default.nix
@@ -0,0 +1,27 @@
+{ lib, stdenv, fetchurl, cairo, expat, fftwSinglePrec, fluidsynth, glib
+, gtk2, libjack2, ladspaH , libglade, lv2, pkg-config }:
+
+stdenv.mkDerivation rec {
+  pname = "calf";
+  version = "0.90.3";
+
+  src = fetchurl {
+    url = "https://calf-studio-gear.org/files/${pname}-${version}.tar.gz";
+    sha256 = "17x4hylgq4dn9qycsdacfxy64f5cv57n2qgkvsdp524gnqzw4az3";
+  };
+
+  enableParallelBuilding = true;
+
+  buildInputs = [
+    cairo expat fftwSinglePrec fluidsynth glib gtk2 libjack2 ladspaH
+    libglade lv2 pkg-config
+  ];
+
+  meta = with 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/pkgs/applications/audio/callaudiod/default.nix b/pkgs/applications/audio/callaudiod/default.nix
new file mode 100644
index 00000000000..74f4b2de49e
--- /dev/null
+++ b/pkgs/applications/audio/callaudiod/default.nix
@@ -0,0 +1,45 @@
+{ lib
+, stdenv
+, fetchFromGitLab
+, meson
+, ninja
+, pkg-config
+, glib
+, alsa-lib
+, libpulseaudio
+}:
+
+stdenv.mkDerivation rec {
+  pname = "callaudiod";
+  version = "0.1.3";
+
+  src = fetchFromGitLab {
+    domain = "gitlab.com";
+    owner = "mobian1";
+    repo = pname;
+    rev = version;
+    sha256 = "sha256-WZ23jacCsZiNeMJfnYMaGdHXY9OCIBbeU9dWGDroaHE=";
+  };
+
+  strictDeps = true;
+  nativeBuildInputs = [
+    meson
+    ninja
+    pkg-config
+    glib
+  ];
+
+  buildInputs = [
+    alsa-lib
+    libpulseaudio
+    glib
+  ];
+
+  meta = with lib; {
+    description = "Daemon for dealing with audio routing during phone calls";
+    homepage = "https://gitlab.com/mobian1/callaudiod";
+    license = licenses.gpl3Plus;
+    maintainers = with maintainers; [ pacman99 tomfitzhenry ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/pkgs/applications/audio/cantata/default.nix b/pkgs/applications/audio/cantata/default.nix
new file mode 100644
index 00000000000..c5f3cfe5b68
--- /dev/null
+++ b/pkgs/applications/audio/cantata/default.nix
@@ -0,0 +1,121 @@
+{ mkDerivation
+, lib
+, fetchFromGitHub
+, cmake
+, pkg-config
+, qtbase
+, qtsvg
+, qttools
+, perl
+
+  # 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
+, withHttpStream ? true
+, qtmultimedia
+, withReplaygain ? true
+, ffmpeg
+, speex
+, mpg123
+, withMtp ? true
+, libmtp
+, withOnlineServices ? true
+, withDevices ? true
+, udisks2
+, withDynamic ? true
+, withHttpServer ? true
+, withLibVlc ? false
+, libvlc
+, 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;
+assert withLibVlc -> withHttpStream;
+
+let
+  fstat = x: fn:
+    "-DENABLE_${fn}=${if x then "ON" else "OFF"}";
+
+  withUdisks = (withTaglib && withDevices);
+
+  options = [
+    { names = [ "CDDB" ]; enable = withCddb; pkgs = [ libcddb ]; }
+    { names = [ "CDPARANOIA" ]; enable = withCdda; pkgs = [ cdparanoia ]; }
+    { names = [ "DEVICES_SUPPORT" ]; enable = withDevices; pkgs = [ ]; }
+    { names = [ "DYNAMIC" ]; enable = withDynamic; pkgs = [ ]; }
+    { names = [ "FFMPEG" "MPG123" "SPEEXDSP" ]; enable = withReplaygain; pkgs = [ ffmpeg speex mpg123 ]; }
+    { names = [ "HTTPS_SUPPORT" ]; enable = true; pkgs = [ ]; }
+    { names = [ "HTTP_SERVER" ]; enable = withHttpServer; pkgs = [ ]; }
+    { names = [ "HTTP_STREAM_PLAYBACK" ]; enable = withHttpStream; pkgs = [ qtmultimedia ]; }
+    { names = [ "LAME" ]; enable = withLame; pkgs = [ lame ]; }
+    { names = [ "LIBVLC" ]; enable = withLibVlc; pkgs = [ libvlc ]; }
+    { names = [ "MTP" ]; enable = withMtp; pkgs = [ libmtp ]; }
+    { names = [ "MUSICBRAINZ" ]; enable = withMusicbrainz; pkgs = [ libmusicbrainz5 ]; }
+    { names = [ "ONLINE_SERVICES" ]; enable = withOnlineServices; pkgs = [ ]; }
+    { names = [ "STREAMS" ]; enable = withStreams; pkgs = [ ]; }
+    { names = [ "TAGLIB" "TAGLIB_EXTRAS" ]; enable = withTaglib; pkgs = [ taglib taglib_extras ]; }
+    { names = [ "UDISKS2" ]; enable = withUdisks; pkgs = [ udisks2 ]; }
+  ];
+
+in
+mkDerivation rec {
+  pname = "cantata";
+  version = "2.5.0";
+
+  src = fetchFromGitHub {
+    owner = "CDrummond";
+    repo = "cantata";
+    rev = "v${version}";
+    sha256 = "sha256-UaZEKZvCA50WsdQSSJQQ11KTK6rM4ouCHDX7pn3NlQw=";
+  };
+
+  patches = [
+    # Cantata wants to check if perl is in the PATH at runtime, but we
+    # patchShebangs the playlists scripts, making that unnecessary (perl will
+    # always be available because it's a dependency)
+    ./dont-check-for-perl-in-PATH.diff
+  ];
+
+  postPatch = ''
+    patchShebangs playlists
+  '';
+
+  buildInputs = [
+    qtbase
+    qtsvg
+    (perl.withPackages (ppkgs: with ppkgs; [ URI ]))
+  ]
+  ++ lib.flatten (builtins.catAttrs "pkgs" (builtins.filter (e: e.enable) options));
+
+  nativeBuildInputs = [ cmake pkg-config qttools ];
+
+  cmakeFlags = lib.flatten (map (e: map (f: fstat e.enable f) e.names) options);
+
+  meta = with lib; {
+    description = "A graphical client for MPD";
+    homepage = "https://github.com/cdrummond/cantata";
+    license = licenses.gpl3Only;
+    maintainers = with maintainers; [ peterhoeg ];
+    # Technically, Cantata should run on Darwin/Windows so if someone wants to
+    # bother figuring that one out, be my guest.
+    platforms = platforms.linux;
+  };
+}
diff --git a/pkgs/applications/audio/cantata/dont-check-for-perl-in-PATH.diff b/pkgs/applications/audio/cantata/dont-check-for-perl-in-PATH.diff
new file mode 100644
index 00000000000..effb0f3b502
--- /dev/null
+++ b/pkgs/applications/audio/cantata/dont-check-for-perl-in-PATH.diff
@@ -0,0 +1,17 @@
+diff --git a/playlists/dynamicplaylists.cpp b/playlists/dynamicplaylists.cpp
+index 07b6dce3..6a3f97c9 100644
+--- a/playlists/dynamicplaylists.cpp
++++ b/playlists/dynamicplaylists.cpp
+@@ -211,11 +211,6 @@ void DynamicPlaylists::start(const QString &name)
+         return;
+     }
+ 
+-    if (Utils::findExe("perl").isEmpty()) {
+-        emit error(tr("You need to install \"perl\" on your system in order for Cantata's dynamic mode to function."));
+-        return;
+-    }
+-
+     QString fName(Utils::dataDir(rulesDir, false)+name+constExtension);
+ 
+     if (!QFile::exists(fName)) {
+
diff --git a/pkgs/applications/audio/caps/default.nix b/pkgs/applications/audio/caps/default.nix
new file mode 100644
index 00000000000..e0f71fa2646
--- /dev/null
+++ b/pkgs/applications/audio/caps/default.nix
@@ -0,0 +1,30 @@
+{ lib, stdenv, fetchurl }:
+stdenv.mkDerivation rec {
+  pname = "caps";
+  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 = lib.licenses.gpl3;
+    maintainers = [ lib.maintainers.astsmtl ];
+    platforms = lib.platforms.linux;
+  };
+}
diff --git a/pkgs/applications/audio/cardinal/default.nix b/pkgs/applications/audio/cardinal/default.nix
new file mode 100644
index 00000000000..9200a36f9f3
--- /dev/null
+++ b/pkgs/applications/audio/cardinal/default.nix
@@ -0,0 +1,76 @@
+{
+  stdenv
+, fetchFromGitHub
+, fetchpatch
+, fetchurl
+, fetchzip
+, freetype
+, jansson
+, lib
+, libGL
+, libX11
+, libXcursor
+, libXext
+, libXrandr
+, libarchive
+, liblo
+, libsamplerate
+, mesa
+, pkg-config
+, python3
+, speexdsp
+}:
+
+stdenv.mkDerivation rec {
+  name = "cardinal-${version}";
+  version = "22.02";
+
+  src = fetchurl {
+    url =
+      "https://github.com/DISTRHO/Cardinal/releases/download/${version}/cardinal-${version}.tar.xz";
+    sha256 = "sha256-IVlAROFGFffTEU00NCmv74w1DRb7dNMp20FeBVoDrdM=";
+  };
+
+  patches = [
+    # see https://github.com/DISTRHO/Cardinal/issues/151#issuecomment-1041886260
+    (fetchpatch {
+      url =
+        "https://github.com/DISTRHO/Cardinal/commit/13e9ef37c5dd35d77a54b1cb006767be7a72ac69.patch";
+      sha256 = "sha256-NYUYLbLeBX1WEzjPi0s/T1N+EXQKyi0ifbPxgBYDjRs=";
+    })
+  ];
+
+  prePatch = ''
+    patchShebangs ./dpf/utils/generate-ttl.sh
+  '';
+
+  enableParallelBuilding = true;
+
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = [
+    freetype
+    jansson
+    libGL
+    libX11
+    libXcursor
+    libXext
+    libXrandr
+    libXrandr
+    libarchive
+    liblo
+    libsamplerate
+    mesa
+    python3
+    speexdsp
+  ];
+
+  makeFlags = [ "SYSDEPS=true" "PREFIX=$(out)" ];
+
+  meta = {
+    description = "Plugin wrapper around VCV Rack";
+    homepage = "https://github.com/DISTRHO/cardinal";
+    license = lib.licenses.gpl3;
+    maintainers = [ lib.maintainers.magnetophon ];
+    platforms = lib.platforms.all;
+  };
+}
diff --git a/pkgs/applications/audio/carla/default.nix b/pkgs/applications/audio/carla/default.nix
new file mode 100644
index 00000000000..bebc0320bb0
--- /dev/null
+++ b/pkgs/applications/audio/carla/default.nix
@@ -0,0 +1,93 @@
+{ lib, stdenv, fetchFromGitHub, alsa-lib, file, fluidsynth, jack2,
+  liblo, libpulseaudio, libsndfile, pkg-config, python3Packages,
+  which, withFrontend ? true,
+  withQt ? true, qtbase ? null, wrapQtAppsHook ? null,
+  withGtk2 ? true, gtk2 ? null,
+  withGtk3 ? true, gtk3 ? null }:
+
+with lib;
+
+assert withFrontend -> python3Packages ? pyqt5;
+assert withQt -> qtbase != null;
+assert withQt -> wrapQtAppsHook != null;
+assert withGtk2 -> gtk2 != null;
+assert withGtk3 -> gtk3 != null;
+
+stdenv.mkDerivation rec {
+  pname = "carla";
+  version = "2.4.2";
+
+  src = fetchFromGitHub {
+    owner = "falkTX";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "sha256-A0QmyphjsNU06kh2f9rXrR+GkDEI5HqXRA9J82E6qJU=";
+  };
+
+  nativeBuildInputs = [
+    python3Packages.wrapPython pkg-config which wrapQtAppsHook
+  ];
+
+  pythonPath = with python3Packages; [
+    rdflib pyliblo
+  ] ++ optional withFrontend pyqt5;
+
+  buildInputs = [
+    file liblo alsa-lib fluidsynth jack2 libpulseaudio libsndfile
+  ] ++ optional withQt qtbase
+    ++ optional withGtk2 gtk2
+    ++ optional withGtk3 gtk3;
+
+  propagatedBuildInputs = pythonPath;
+
+  enableParallelBuilding = true;
+
+  installFlags = [ "PREFIX=$(out)" ];
+
+  postPatch = ''
+    # --with-appname="$0" is evaluated with $0=.carla-wrapped instead of carla. Fix that.
+    for file in $(grep -rl -- '--with-appname="$0"'); do
+        filename="$(basename -- "$file")"
+        substituteInPlace "$file" --replace '--with-appname="$0"' "--with-appname=\"$filename\""
+    done
+  '';
+
+  dontWrapQtApps = true;
+  postFixup = ''
+    # Also sets program_PYTHONPATH and program_PATH variables
+    wrapPythonPrograms
+    wrapPythonProgramsIn "$out/share/carla/resources" "$out $pythonPath"
+
+    find "$out/share/carla" -maxdepth 1 -type f -not -name "*.py" -print0 | while read -d "" f; do
+      patchPythonScript "$f"
+    done
+    patchPythonScript "$out/share/carla/carla_settings.py"
+    patchPythonScript "$out/share/carla/carla_database.py"
+
+    for program in $out/bin/*; do
+      wrapQtApp "$program" \
+        --prefix PATH : "$program_PATH:${which}/bin" \
+        --set PYTHONNOUSERSITE true
+    done
+
+    find "$out/share/carla/resources" -maxdepth 1 -type f -not -name "*.py" -print0 | while read -d "" f; do
+      wrapQtApp "$f" \
+        --prefix PATH : "$program_PATH:${which}/bin" \
+        --set PYTHONNOUSERSITE true
+    done
+  '';
+
+  meta = with lib; {
+    homepage = "https://kx.studio/Applications:Carla";
+    description = "An audio plugin host";
+    longDescription = ''
+      It currently supports LADSPA (including LRDF), DSSI, LV2, VST2/3
+      and AU plugin formats, plus GIG, SF2 and SFZ file support.
+      It uses JACK as the default and preferred audio driver but also
+      supports native drivers like ALSA, DirectSound or CoreAudio.
+    '';
+    license = licenses.gpl2Plus;
+    maintainers = [ maintainers.minijackson ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/pkgs/applications/audio/caudec/default.nix b/pkgs/applications/audio/caudec/default.nix
new file mode 100644
index 00000000000..a595f285c68
--- /dev/null
+++ b/pkgs/applications/audio/caudec/default.nix
@@ -0,0 +1,35 @@
+{ lib, stdenv, fetchurl, makeWrapper, bash, bc, findutils, flac, lame, opusTools, procps, sox }:
+
+stdenv.mkDerivation rec {
+  pname = "caudec";
+  version = "1.7.5";
+
+  src = fetchurl {
+    url = "http://caudec.cocatre.net/downloads/caudec-${version}.tar.gz";
+    sha256 = "5d1f5ab3286bb748bd29cbf45df2ad2faf5ed86070f90deccf71c60be832f3d5";
+  };
+
+  preBuild = ''
+    patchShebangs ./install.sh
+  '';
+
+  nativeBuildInputs = [ bash makeWrapper ];
+
+  installPhase = ''
+    ./install.sh --prefix=$out/bin
+  '';
+
+  postFixup = ''
+    for executable in $(cd $out/bin && ls); do
+  wrapProgram $out/bin/$executable \
+    --prefix PATH : "${lib.makeBinPath [ bc findutils sox procps opusTools lame flac ]}"
+    done
+  '';
+
+   meta = with lib; {
+    homepage = "https://caudec.cocatre.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/pkgs/applications/audio/cava/default.nix b/pkgs/applications/audio/cava/default.nix
new file mode 100644
index 00000000000..cc431ff46b9
--- /dev/null
+++ b/pkgs/applications/audio/cava/default.nix
@@ -0,0 +1,38 @@
+{ lib, stdenv, fetchFromGitHub, autoreconfHook, alsa-lib, fftw,
+  libpulseaudio, ncurses }:
+
+stdenv.mkDerivation rec {
+  pname = "cava";
+  version = "0.7.4";
+
+  buildInputs = [
+    alsa-lib
+    fftw
+    libpulseaudio
+    ncurses
+  ];
+
+  src = fetchFromGitHub {
+    owner = "karlstav";
+    repo = "cava";
+    rev = version;
+    sha256 = "sha256-BlHGst34aUgQcXcuQG43VnKUTclCxfQmWRa6iCud8dc=";
+  };
+
+  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 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/pkgs/applications/audio/cd-discid/default.nix b/pkgs/applications/audio/cd-discid/default.nix
new file mode 100644
index 00000000000..16c574e8d03
--- /dev/null
+++ b/pkgs/applications/audio/cd-discid/default.nix
@@ -0,0 +1,30 @@
+{ fetchurl, lib, stdenv
+, IOKit ? null }:
+
+stdenv.mkDerivation rec {
+  pname = "cd-discid";
+  version = "1.4";
+
+  src = fetchurl {
+    url = "http://linukz.org/download/${pname}-${version}.tar.gz";
+    sha256 = "0qrcvn7227qaayjcd5rm7z0k5q89qfy5qkdgwr5pd7ih0va8rmpz";
+  };
+
+  installFlags = [ "PREFIX=$(out)" "INSTALL=install" ];
+
+  buildInputs = []
+    ++ lib.optional stdenv.isDarwin IOKit;
+
+  meta = with lib; {
+    homepage = "http://linukz.org/cd-discid.shtml";
+    license = licenses.gpl2Plus;
+    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/pkgs/applications/audio/cdparanoia/default.nix b/pkgs/applications/audio/cdparanoia/default.nix
new file mode 100644
index 00000000000..10ff66de77e
--- /dev/null
+++ b/pkgs/applications/audio/cdparanoia/default.nix
@@ -0,0 +1,53 @@
+{ lib, stdenv, fetchurl, gnu-config, IOKit, Carbon }:
+
+stdenv.mkDerivation rec {
+  pname = "cdparanoia-III";
+  version = "10.2";
+
+  src = fetchurl {
+    url = "https://downloads.xiph.org/releases/cdparanoia/cdparanoia-III-${version}.src.tgz";
+    sha256 = "1pv4zrajm46za0f6lv162iqffih57a8ly4pc69f7y0gfyigb8p80";
+  };
+
+  patches = 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";
+    })
+    ] ++ lib.optional stdenv.hostPlatform.isMusl ./utils.patch
+    ++ [./fix_private_keyword.patch];
+
+  propagatedBuildInputs = lib.optionals stdenv.isDarwin [
+    Carbon
+    IOKit
+  ];
+
+  hardeningDisable = [ "format" ];
+
+  preConfigure = ''
+    unset CC
+  '' + lib.optionalString (!stdenv.hostPlatform.isx86) ''
+    cp ${gnu-config}/config.sub configure.sub
+    cp ${gnu-config}/config.guess configure.guess
+  '';
+
+  # Build system reuses the same object file names for shared and static
+  # library. Occasionally fails in the middle:
+  #    gcc -O2 -fsigned-char -g -O2 -c scan_devices.c
+  #    rm  -f *.o core *~ *.out
+  #    gcc -O2 -fsigned-char -g -O2 -fpic -c scan_devices.c
+  #    gcc -fpic -shared -o libcdda_interface.so.0.10.2 ... scan_devices.o ...
+  #    scan_devices.o: file not recognized: file format not recognized
+  enableParallelBuilding = false;
+
+  meta = with 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/pkgs/applications/audio/cdparanoia/fix_private_keyword.patch b/pkgs/applications/audio/cdparanoia/fix_private_keyword.patch
new file mode 100644
index 00000000000..3e9cbe2bd8c
--- /dev/null
+++ b/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/pkgs/applications/audio/cdparanoia/utils.patch b/pkgs/applications/audio/cdparanoia/utils.patch
new file mode 100644
index 00000000000..338e5303dcd
--- /dev/null
+++ b/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/pkgs/applications/audio/cheesecutter/0001-Drop-baked-in-build-date-for-r13y.patch b/pkgs/applications/audio/cheesecutter/0001-Drop-baked-in-build-date-for-r13y.patch
new file mode 100644
index 00000000000..9bc0e7b933e
--- /dev/null
+++ b/pkgs/applications/audio/cheesecutter/0001-Drop-baked-in-build-date-for-r13y.patch
@@ -0,0 +1,39 @@
+From eb21fd64a19a0e10c4c3826fc71610fd5850fa2f Mon Sep 17 00:00:00 2001
+From: Christoph Neidahl <christoph.neidahl@gmail.com>
+Date: Sun, 13 Sep 2020 23:18:51 +0200
+Subject: [PATCH 1/2] Drop baked-in build date for r13y
+
+---
+ src/ct2util.d | 2 +-
+ src/ui/ui.d   | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/ct2util.d b/src/ct2util.d
+index 523cadc..e462b09 100644
+--- a/src/ct2util.d
++++ b/src/ct2util.d
+@@ -105,7 +105,7 @@ int main(string[] args) {
+ 	speeds.length = 32;
+ 	masks.length = 32;
+ 	void printheader() {
+-		enum hdr = "CheeseCutter 2 utilities" ~ com.util.versionInfo;
++		enum hdr = "CheeseCutter 2 utilities";
+ 		writefln(hdr);
+ 		writefln("\nUsage: \t%s <command> <options> <infile> <-o outfile>",args[0]);
+ 		writefln("\t%s import <infile> <infile2> <-o outfile>",args[0]);
+diff --git a/src/ui/ui.d b/src/ui/ui.d
+index e418dda..21af408 100644
+--- a/src/ui/ui.d
++++ b/src/ui/ui.d
+@@ -231,7 +231,7 @@ class Infobar : Window {
+ 	  
+ 		screen.clrtoeol(0, headerColor);
+ 
+-		enum hdr = "CheeseCutter 2.9" ~ com.util.versionInfo;
++		enum hdr = "CheeseCutter 2.9";
+ 		screen.cprint(4, 0, 1, headerColor, hdr);
+ 		screen.cprint(screen.width - 14, 0, 1, headerColor, "F12 = Help");
+ 		int c1 = audio.player.isPlaying ? 13 : 12;
+-- 
+2.25.4
+
diff --git a/pkgs/applications/audio/cheesecutter/0002-Prepend-libSDL.dylib-to-macOS-SDL-loader.patch b/pkgs/applications/audio/cheesecutter/0002-Prepend-libSDL.dylib-to-macOS-SDL-loader.patch
new file mode 100644
index 00000000000..6e33307f9f5
--- /dev/null
+++ b/pkgs/applications/audio/cheesecutter/0002-Prepend-libSDL.dylib-to-macOS-SDL-loader.patch
@@ -0,0 +1,25 @@
+From abc5e8786d41803300b56ef40c08db0d867eb01a Mon Sep 17 00:00:00 2001
+From: Christoph Neidahl <christoph.neidahl@gmail.com>
+Date: Sun, 13 Sep 2020 23:22:33 +0200
+Subject: [PATCH 2/2] Prepend libSDL.dylib to macOS SDL loader
+
+---
+ src/derelict/sdl/sdl.d | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/derelict/sdl/sdl.d b/src/derelict/sdl/sdl.d
+index e31a52f..f7915b1 100644
+--- a/src/derelict/sdl/sdl.d
++++ b/src/derelict/sdl/sdl.d
+@@ -54,7 +54,7 @@ public:
+         super(
+             "sdl.dll",
+             "libSDL.so, libSDL.so.0, libSDL-1.2.so, libSDL-1.2.so.0",
+-            "@executable_path/../Frameworks/SDL.framework/SDL, /Library/Frameworks/SDL.framework/SDL, /System/Library/Frameworks/SDL.framework/SDL"
++            "@rpath/libSDL.dylib, @executable_path/../Frameworks/SDL.framework/SDL, /Library/Frameworks/SDL.framework/SDL, /System/Library/Frameworks/SDL.framework/SDL"
+         );
+     }
+ 
+-- 
+2.25.4
+
diff --git a/pkgs/applications/audio/cheesecutter/default.nix b/pkgs/applications/audio/cheesecutter/default.nix
new file mode 100644
index 00000000000..6c14cc67f81
--- /dev/null
+++ b/pkgs/applications/audio/cheesecutter/default.nix
@@ -0,0 +1,59 @@
+{ stdenv
+, lib
+, fetchFromGitHub
+, acme
+, ldc
+, patchelf
+, SDL
+}:
+stdenv.mkDerivation rec {
+  pname = "cheesecutter";
+  version = "unstable-2021-02-27";
+
+  src = fetchFromGitHub {
+    owner = "theyamo";
+    repo = "CheeseCutter";
+    rev = "84450d3614b8fb2cabda87033baab7bedd5a5c98";
+    sha256 = "sha256:0q4a791nayya6n01l0f4kk497rdq6kiq0n72fqdpwqy138pfwydn";
+  };
+
+  patches = [
+    ./0001-Drop-baked-in-build-date-for-r13y.patch
+  ]
+  ++ lib.optional stdenv.hostPlatform.isDarwin ./0002-Prepend-libSDL.dylib-to-macOS-SDL-loader.patch;
+
+  nativeBuildInputs = [ acme ldc ]
+    ++ lib.optional (!stdenv.hostPlatform.isDarwin) patchelf;
+
+  buildInputs = [ SDL ];
+
+  makefile = "Makefile.ldc";
+
+  installPhase = ''
+    for exe in {ccutter,ct2util}; do
+      install -D $exe $out/bin/$exe
+    done
+
+    mkdir -p $out/share/cheesecutter/example_tunes
+    cp -r tunes/* $out/share/cheesecutter/example_tunes
+  '';
+
+  postFixup =
+    let
+      rpathSDL = lib.makeLibraryPath [ SDL ];
+    in
+    if stdenv.hostPlatform.isDarwin then ''
+      install_name_tool -add_rpath ${rpathSDL} $out/bin/ccutter
+    '' else ''
+      rpath=$(patchelf --print-rpath $out/bin/ccutter)
+      patchelf --set-rpath "$rpath:${rpathSDL}" $out/bin/ccutter
+    '';
+
+  meta = with lib; {
+    description = "A tracker program for composing music for the SID chip";
+    homepage = "https://github.com/theyamo/CheeseCutter/";
+    license = licenses.gpl2Plus;
+    platforms = [ "x86_64-linux" "i686-linux" "x86_64-darwin" ];
+    maintainers = with maintainers; [ OPNA2608 ];
+  };
+}
diff --git a/pkgs/applications/audio/chuck/darwin-limits.patch b/pkgs/applications/audio/chuck/darwin-limits.patch
new file mode 100644
index 00000000000..dc98a172691
--- /dev/null
+++ b/pkgs/applications/audio/chuck/darwin-limits.patch
@@ -0,0 +1,13 @@
+--- a/src/core/util_string.cpp	2014-10-27 22:52:11.875981552 +0100
++++ b/src/core/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/pkgs/applications/audio/chuck/default.nix b/pkgs/applications/audio/chuck/default.nix
new file mode 100644
index 00000000000..a6509256881
--- /dev/null
+++ b/pkgs/applications/audio/chuck/default.nix
@@ -0,0 +1,41 @@
+{ stdenv, lib, fetchurl, alsa-lib, bison, flex, libsndfile, which
+, AppKit, Carbon, CoreAudio, CoreMIDI, CoreServices, Kernel
+}:
+
+stdenv.mkDerivation rec {
+  version = "1.4.1.0";
+  pname = "chuck";
+
+  src = fetchurl {
+    url = "http://chuck.cs.princeton.edu/release/files/chuck-${version}.tgz";
+    sha256 = "sha256-dL+ZrVFeMRPFW4MxUpNvrQKjzwBqVBBf8Rd3xHMZSSg=";
+  };
+
+  nativeBuildInputs = [ flex bison which ];
+
+  buildInputs = [ libsndfile ]
+    ++ lib.optional (!stdenv.isDarwin) alsa-lib
+    ++ lib.optional stdenv.isDarwin [ AppKit Carbon CoreAudio CoreMIDI CoreServices Kernel ];
+
+  patches = [ ./darwin-limits.patch ];
+
+  NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-Wno-missing-sysroot";
+  NIX_LDFLAGS = lib.optionalString stdenv.isDarwin "-framework MultitouchSupport";
+
+  postPatch = ''
+    substituteInPlace src/core/makefile.x/makefile.osx \
+      --replace "weak_framework" "framework" \
+      --replace "MACOSX_DEPLOYMENT_TARGET=10.9" "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 = platforms.unix;
+    maintainers = with maintainers; [ ftrvxmtrx ];
+  };
+}
diff --git a/pkgs/applications/audio/cider/default.nix b/pkgs/applications/audio/cider/default.nix
new file mode 100644
index 00000000000..edab6d109ef
--- /dev/null
+++ b/pkgs/applications/audio/cider/default.nix
@@ -0,0 +1,30 @@
+{ appimageTools, lib, fetchurl }:
+
+appimageTools.wrapType2 rec {
+  pname = "cider";
+  version = "1.3.1308";
+
+  src = fetchurl {
+    url = "https://1308-429851205-gh.circle-artifacts.com/0/%7E/Cider/dist/artifacts/Cider-${version}.AppImage";
+    sha256 = "1lbyvn1c8155p039qfzx7jwad7km073phkmrzjm0w3ahdpwz3wgi";
+  };
+
+  extraInstallCommands =
+    let contents = appimageTools.extract { inherit pname version src; };
+    in ''
+      mv $out/bin/${pname}-${version} $out/bin/${pname}
+
+      install -m 444 -D ${contents}/${pname}.desktop -t $out/share/applications
+      substituteInPlace $out/share/applications/${pname}.desktop \
+        --replace 'Exec=AppRun' 'Exec=${pname}'
+      cp -r ${contents}/usr/share/icons $out/share
+    '';
+
+  meta = with lib; {
+    description = "A new look into listening and enjoying Apple Music in style and performance.";
+    homepage = "https://github.com/ciderapp/Cider";
+    license = licenses.agpl3;
+    maintainers = [ maintainers.cigrainger ];
+    platforms = [ "x86_64-linux" ];
+  };
+}
diff --git a/pkgs/applications/audio/clementine/clementine-spotify-blob.patch b/pkgs/applications/audio/clementine/clementine-spotify-blob.patch
new file mode 100644
index 00000000000..344fc31d70d
--- /dev/null
+++ b/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/pkgs/applications/audio/clementine/default.nix b/pkgs/applications/audio/clementine/default.nix
new file mode 100644
index 00000000000..550100574db
--- /dev/null
+++ b/pkgs/applications/audio/clementine/default.nix
@@ -0,0 +1,196 @@
+{ lib
+, mkDerivation
+, fetchFromGitHub
+, fetchpatch
+, boost
+, cmake
+, chromaprint
+, gettext
+, gst_all_1
+, liblastfm
+, qtbase
+, qtx11extras
+, qttools
+, taglib
+, fftw
+, glew
+, qjson
+, sqlite
+, libgpod
+, libplist
+, usbmuxd
+, libmtp
+, libpulseaudio
+, gvfs
+, libcdio
+, libechonest
+, libspotify
+, pcre
+, projectm
+, protobuf
+, qca2
+, pkg-config
+, sparsehash
+, config
+, makeWrapper
+, gst_plugins
+
+, util-linux
+, libunwind
+, libselinux
+, elfutils
+, libsepol
+, orc
+
+, alsa-lib
+}:
+
+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;
+
+  # On the update after all 1.4rc, qt5.15 and protobuf 3.15 will be supported.
+  version = "1.4.0rc1";
+
+  src = fetchFromGitHub {
+    owner = "clementine-player";
+    repo = "Clementine";
+    rev = version;
+    sha256 = "1rqk0hrsn8f8bjk0j0vq1af0ygy6xx7qi9fw0jjw2cmj6kzckyi2";
+  };
+
+  patches = [
+    ./clementine-spotify-blob.patch
+    (fetchpatch {
+      # "short-term" fix for execution on wayland (1.4.0rc1-131-g2179027a6)
+      # for https://github.com/clementine-player/Clementine/issues/6587
+      url = "https://github.com/clementine-player/Clementine/commit/2179027a6d97530c857e43be873baacd696ff332.patch";
+      sha256 = "0344bfcyvjim5ph8w4km6zkg96rj5g9ybp9x14qgyw2gkdksimn6";
+    })
+  ];
+
+  nativeBuildInputs = [
+    cmake
+    pkg-config
+    makeWrapper
+
+    util-linux
+    libunwind
+    libselinux
+    elfutils
+    libsepol
+    orc
+  ];
+
+  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
+    qtbase
+    qtx11extras
+    qttools
+    sqlite
+    taglib
+
+    alsa-lib
+  ]
+  ++ lib.optionals (withIpod) [ libgpod libplist usbmuxd ]
+  ++ lib.optionals (withMTP) [ libmtp ]
+  ++ lib.optionals (withCD) [ libcdio ]
+  ++ 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 = mkDerivation {
+    pname = "clementine-free";
+    inherit version;
+    inherit src patches nativeBuildInputs postPatch;
+
+    # gst_plugins needed for setup-hooks
+    buildInputs = buildInputs ++ gst_plugins;
+
+    preConfigure = ''
+      rm -rf ext/{,lib}clementine-spotifyblob
+    '';
+
+    cmakeFlags = [
+      "-DUSE_SYSTEM_PROJECTM=ON"
+      "-DSPOTIFY_BLOB=OFF"
+    ];
+
+    passthru.unfree = unfree;
+
+    postInstall = ''
+      wrapProgram $out/bin/clementine \
+        --prefix GST_PLUGIN_SYSTEM_PATH_1_0 : "$GST_PLUGIN_SYSTEM_PATH_1_0"
+    '';
+
+    meta = with lib; {
+      homepage = "https://www.clementine-player.org";
+      description = "A multiplatform music player";
+      license = licenses.gpl3Plus;
+      platforms = platforms.linux;
+      maintainers = [ maintainers.ttuegel ];
+    };
+  };
+
+  # Unfree Spotify blob for Clementine
+  unfree = mkDerivation {
+    pname = "clementine-blob";
+    inherit version;
+    # Use the same patches and sources as Clementine
+    inherit src nativeBuildInputs patches postPatch;
+
+    buildInputs = buildInputs ++ [ libspotify ];
+    # 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
+    '';
+
+    meta = with lib; {
+      homepage = "https://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/pkgs/applications/audio/clerk/default.nix b/pkgs/applications/audio/clerk/default.nix
new file mode 100644
index 00000000000..fa64cd74e71
--- /dev/null
+++ b/pkgs/applications/audio/clerk/default.nix
@@ -0,0 +1,56 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, makeWrapper
+, rofi
+, mpc-cli
+, perl
+, util-linux
+, python3Packages
+, libnotify
+}:
+
+stdenv.mkDerivation {
+  pname = "clerk";
+  version = "unstable-2016-10-14";
+
+  src = fetchFromGitHub {
+    owner = "carnager";
+    repo = "clerk";
+    rev = "875963bcae095ac1db174627183c76ebe165f787";
+    sha256 = "0y045my65hr3hjyx13jrnyg6g3wb41phqb1m7azc4l6vx6r4124b";
+  };
+
+  nativeBuildInputs = [ makeWrapper ];
+  buildInputs = [ python3Packages.mpd2 ];
+
+  dontBuild = true;
+
+  strictDeps = true;
+
+  installPhase =
+    let
+      binPath = lib.makeBinPath [
+        libnotify
+        mpc-cli
+        perl
+        rofi
+        util-linux
+      ];
+    in
+      ''
+        runHook preInstall
+
+        DESTDIR=$out PREFIX=/ make install
+        wrapProgram $out/bin/clerk --prefix PATH : "${binPath}"
+
+        runHook postInstall
+      '';
+
+  meta = with 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/pkgs/applications/audio/cmt/default.nix b/pkgs/applications/audio/cmt/default.nix
new file mode 100644
index 00000000000..bb23f9b62bb
--- /dev/null
+++ b/pkgs/applications/audio/cmt/default.nix
@@ -0,0 +1,33 @@
+{ lib, stdenv
+, fetchurl
+, ladspaH
+}:
+
+stdenv.mkDerivation rec {
+  name = "cmt";
+  version = "1.17";
+
+  src = fetchurl {
+    url = "http://www.ladspa.org/download/${name}_${version}.tgz";
+    sha256 = "07xd0xmwpa0j12813jpf87fr9hwzihii5l35mp8ady7xxfmxfmpb";
+  };
+
+  buildInputs = [ ladspaH ];
+
+  preBuild = ''
+    cd src
+  '';
+
+  installFlags = [ "INSTALL_PLUGINS_DIR=${placeholder "out"}/lib/ladspa" ];
+  preInstall = ''
+    mkdir -p $out/lib/ladspa
+  '';
+
+  meta = with lib; {
+    description = "Computer Music Toolkit";
+    homepage = "https://www.ladspa.org/cmt";
+    license = licenses.gpl2;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ sjfloat ];
+  };
+}
diff --git a/pkgs/applications/audio/cmus/default.nix b/pkgs/applications/audio/cmus/default.nix
new file mode 100644
index 00000000000..ea7ad1015be
--- /dev/null
+++ b/pkgs/applications/audio/cmus/default.nix
@@ -0,0 +1,136 @@
+{ config, lib, stdenv, fetchFromGitHub, runCommand, ncurses, pkg-config
+, libiconv, CoreAudio, AudioUnit
+
+, alsaSupport ? stdenv.isLinux, alsa-lib ? null
+# simple fallback for everyone else
+, aoSupport ? !stdenv.isLinux, libao ? null
+, jackSupport ? false, libjack ? null
+, samplerateSupport ? jackSupport, libsamplerate ? null
+, ossSupport ? false, alsa-oss ? null
+, pulseaudioSupport ? config.pulseaudio or false, libpulseaudio ? null
+, mprisSupport ? stdenv.isLinux, systemd ? 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 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"       alsa-lib)
+    (mkFlag aoSupport         "CONFIG_AO=y"         libao)
+    (mkFlag jackSupport       "CONFIG_JACK=y"       libjack)
+    (mkFlag samplerateSupport "CONFIG_SAMPLERATE=y" libsamplerate)
+    (mkFlag ossSupport        "CONFIG_OSS=y"        alsa-oss)
+    (mkFlag pulseaudioSupport "CONFIG_PULSE=y"      libpulseaudio)
+    (mkFlag mprisSupport      "CONFIG_MPRIS=y"      systemd)
+
+    #(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 {
+  pname = "cmus";
+  version = "2.9.1";
+
+  src = fetchFromGitHub {
+    owner  = "cmus";
+    repo   = "cmus";
+    rev    = "v${version}";
+    sha256 = "sha256-HEiEnEWf/MzhPO19VKTLYzhylpEvyzy1Jxs6EW2NU34=";
+  };
+
+  patches = [ ./option-debugging.patch ];
+
+  configurePhase = "./configure " + concatStringsSep " " ([
+    "prefix=$out"
+    "CONFIG_WAV=y"
+  ] ++ concatMap (a: a.flags) opts);
+
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = [ ncurses ]
+    ++ lib.optional stdenv.cc.isClang clangGCC
+    ++ lib.optionals stdenv.isDarwin [ libiconv CoreAudio AudioUnit ]
+    ++ flatten (concatMap (a: a.deps) opts);
+
+  makeFlags = [ "LD=$(CC)" ];
+
+  meta = with 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/pkgs/applications/audio/cmus/option-debugging.patch b/pkgs/applications/audio/cmus/option-debugging.patch
new file mode 100644
index 00000000000..84115e1480e
--- /dev/null
+++ b/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/pkgs/applications/audio/cmusfm/default.nix b/pkgs/applications/audio/cmusfm/default.nix
new file mode 100644
index 00000000000..4cf91c698be
--- /dev/null
+++ b/pkgs/applications/audio/cmusfm/default.nix
@@ -0,0 +1,36 @@
+{ lib, stdenv, fetchFromGitHub, autoreconfHook, pkg-config, curl, libnotify, gdk-pixbuf }:
+
+stdenv.mkDerivation {
+  version = "2021-05-19";
+  pname = "cmusfm-unstable";
+  src = fetchFromGitHub {
+    owner = "Arkq";
+    repo = "cmusfm";
+    rev = "a1f9f37c5819ca8a5b48e6185c2ec7ad478b9f1a";
+    sha256 = "19akgvh9gl99xvpmzgqv88w2mnnln7k6290dr5rn3h6a1ihvllaw";
+  };
+  # building
+  configureFlags = [ "--enable-libnotify" ];
+  nativeBuildInputs = [ autoreconfHook pkg-config ];
+  buildInputs = [ curl libnotify gdk-pixbuf ];
+
+  meta = with 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 lib.maintainers; [ CharlesHD mudri ];
+    license = licenses.gpl3Plus;
+    platforms = platforms.linux ++ platforms.darwin;
+  };
+}
diff --git a/pkgs/applications/audio/cozy/default.nix b/pkgs/applications/audio/cozy/default.nix
new file mode 100644
index 00000000000..9fe86550f0d
--- /dev/null
+++ b/pkgs/applications/audio/cozy/default.nix
@@ -0,0 +1,92 @@
+{ lib, fetchFromGitHub
+, ninja
+, meson
+, pkg-config
+, wrapGAppsHook
+, appstream-glib
+, desktop-file-utils
+, gtk3
+, gst_all_1
+, gobject-introspection
+, libhandy
+, libdazzle
+, python3Packages
+, cairo
+, gettext
+, gnome
+, pantheon
+}:
+
+python3Packages.buildPythonApplication rec {
+
+  format = "other"; # no setup.py
+
+  pname = "cozy";
+  version = "1.2.0";
+
+  # Temporary fix
+  # See https://github.com/NixOS/nixpkgs/issues/57029
+  # and https://github.com/NixOS/nixpkgs/issues/56943
+  strictDeps = false;
+
+  src = fetchFromGitHub {
+    owner = "geigi";
+    repo = pname;
+    rev = version;
+    sha256 = "0igqf9b77i13sxlk4ziw549h379hmz1slrb3vvf8irk94gxabsaw";
+  };
+
+  nativeBuildInputs = [
+    meson ninja pkg-config
+    wrapGAppsHook
+    appstream-glib
+    desktop-file-utils
+    gobject-introspection
+  ];
+
+  buildInputs = [
+    gtk3
+    cairo
+    gettext
+    gnome.adwaita-icon-theme
+    libdazzle
+    libhandy
+    pantheon.granite
+  ] ++ (with gst_all_1; [
+    gstreamer
+    gst-plugins-good
+    gst-plugins-ugly
+    gst-plugins-base
+    gst-plugins-bad
+  ]);
+
+  propagatedBuildInputs = with python3Packages; [
+    apsw
+    cairo
+    dbus-python
+    distro
+    gst-python
+    magic
+    mutagen
+    packaging
+    peewee
+    pygobject3
+    pytz
+    requests
+  ];
+
+  postPatch = ''
+    patchShebangs meson/*.py
+  '';
+
+  postInstall = ''
+    ln -s $out/bin/com.github.geigi.cozy $out/bin/cozy
+  '';
+
+  meta = with 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/pkgs/applications/audio/crip/default.nix b/pkgs/applications/audio/crip/default.nix
new file mode 100644
index 00000000000..d635dce83f4
--- /dev/null
+++ b/pkgs/applications/audio/crip/default.nix
@@ -0,0 +1,68 @@
+{ lib, stdenv
+, fetchurl
+, makeWrapper
+
+, perlPackages
+
+, cdparanoia
+, coreutils
+, eject
+, flac
+, gnugrep
+, nano
+, sox
+, vorbis-tools
+, vorbisgain
+, which
+}:
+
+with lib;
+
+stdenv.mkDerivation rec {
+  pname = "crip";
+  version = "3.9";
+  src = fetchurl {
+    url = "http://bach.dynet.com/${pname}/src/${pname}-${version}.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 = lib.licenses.gpl1;
+    platforms = lib.platforms.linux;
+    maintainers = [ maintainers.endgame ];
+  };
+}
diff --git a/pkgs/applications/audio/csa/default.nix b/pkgs/applications/audio/csa/default.nix
new file mode 100644
index 00000000000..0f7ad460a8c
--- /dev/null
+++ b/pkgs/applications/audio/csa/default.nix
@@ -0,0 +1,28 @@
+{ lib, stdenv, fetchurl }:
+
+stdenv.mkDerivation rec {
+  pname = "csa";
+  version = "0.5.100810";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/csa/${pname}-${version}.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 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.unix;
+  };
+}
diff --git a/pkgs/applications/audio/csound/csound-manual/default.nix b/pkgs/applications/audio/csound/csound-manual/default.nix
new file mode 100644
index 00000000000..ecd6685e217
--- /dev/null
+++ b/pkgs/applications/audio/csound/csound-manual/default.nix
@@ -0,0 +1,44 @@
+{
+  lib, stdenv, fetchFromGitHub, docbook_xsl,
+  docbook_xml_dtd_45, python, pygments,
+  libxslt
+}:
+
+stdenv.mkDerivation {
+  pname = "csound-manual";
+  version = "unstable-2019-02-22";
+
+  src = fetchFromGitHub {
+    owner = "csound";
+    repo = "manual";
+    rev = "3b0bdc83f9245261b4b85a57c3ed636d5d924a4f";
+    sha256 = "074byjhaxraapyg54dxgg7hi1d4978aa9c1rmyi50p970nsxnacn";
+  };
+
+  prePatch = ''
+    substituteInPlace manual.xml \
+      --replace "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" \
+                "${docbook_xml_dtd_45}/xml/dtd/docbook/docbookx.dtd"
+  '';
+
+  nativeBuildInputs = [ libxslt.bin ];
+
+  buildInputs = [ docbook_xsl python pygments ];
+
+  buildPhase = ''
+    make XSL_BASE_PATH=${docbook_xsl}/share/xml/docbook-xsl html-dist
+  '';
+
+  installPhase = ''
+    mkdir -p $out/share/doc/csound
+    cp -r ./html $out/share/doc/csound
+  '';
+
+  meta = {
+    description = "The Csound Canonical Reference Manual";
+    homepage = "https://github.com/csound/manual";
+    license = lib.licenses.fdl12Plus;
+    maintainers = [ lib.maintainers.hlolli ];
+    platforms = lib.platforms.all;
+  };
+}
diff --git a/pkgs/applications/audio/csound/csound-qt/default.nix b/pkgs/applications/audio/csound/csound-qt/default.nix
new file mode 100644
index 00000000000..953a919d0c7
--- /dev/null
+++ b/pkgs/applications/audio/csound/csound-qt/default.nix
@@ -0,0 +1,52 @@
+{ lib, stdenv, csound, desktop-file-utils,
+  fetchFromGitHub, python, python-qt, qmake,
+  qtwebengine, qtxmlpatterns, rtmidi, fetchpatch }:
+
+stdenv.mkDerivation rec {
+  pname = "csound-qt";
+  version = "0.9.6-beta3";
+
+  src = fetchFromGitHub {
+    owner = "CsoundQt";
+    repo = "CsoundQt";
+    rev = version;
+    sha256 = "007jhkh0k6qk52r77i067999dwdiimazix6ggp2hvyc4pj6n5dip";
+  };
+
+  patches = [
+    (fetchpatch {
+      name = "examplepath.patch";
+      url = "https://github.com/CsoundQt/CsoundQt/commit/09f2d515bff638cbcacb450979d66e273a59fdec.diff";
+      sha256 = "0y23kf8m1mh9mklsvf908b2b8m2w2rji8qvws44paf1kpwnwdmgm";
+    })
+    ./rtmidipath.patch
+  ];
+
+  nativeBuildInputs = [ qmake qtwebengine qtxmlpatterns ];
+
+  buildInputs = [ csound desktop-file-utils rtmidi ];
+
+  qmakeFlags = [ "qcs.pro" "CONFIG+=rtmidi" "CONFIG+=pythonqt"
+                 "CONFIG+=record_support" "CONFIG+=html_webengine"
+                 "CSOUND_INCLUDE_DIR=${csound}/include/csound"
+                 "CSOUND_LIBRARY_DIR=${csound}/lib"
+                 "RTMIDI_DIR=${rtmidi.src}"
+                 "PYTHONQT_SRC_DIR=${python-qt}/include/PythonQt"
+                 "PYTHONQT_LIB_DIR=${python-qt}/lib"
+                 "LIBS+=-L${python-qt}/lib"
+                 "INCLUDEPATH+=${python-qt}/include/PythonQt"
+                 "INCLUDEPATH+=${python}/include/python2.7"
+                 "INSTALL_DIR=${placeholder "out"}"
+                 "SHARE_DIR=${placeholder "out"}/share"
+                 ];
+
+  dontWrapQtApps = true;
+
+  meta = with 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/pkgs/applications/audio/csound/csound-qt/rtmidipath.patch b/pkgs/applications/audio/csound/csound-qt/rtmidipath.patch
new file mode 100644
index 00000000000..4cbab8a128f
--- /dev/null
+++ b/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/pkgs/applications/audio/csound/default.nix b/pkgs/applications/audio/csound/default.nix
new file mode 100644
index 00000000000..ebcdb8f4290
--- /dev/null
+++ b/pkgs/applications/audio/csound/default.nix
@@ -0,0 +1,46 @@
+{ lib, stdenv, fetchFromGitHub, cmake, libsndfile, libsamplerate, flex, bison, boost, gettext
+, alsa-lib ? 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 {
+  pname = "csound";
+  version = "6.17.0";
+
+  hardeningDisable = [ "format" ];
+
+  src = fetchFromGitHub {
+    owner = "csound";
+    repo = "csound";
+    rev = version;
+    sha256 = "sha256-O19jm3JxHg4TcQzWQZu1uFjfYN2FR41fCRq5YGnTGD0=";
+  };
+
+  cmakeFlags = [ "-DBUILD_CSOUND_AC=0" ] # fails to find Score.hpp
+    ++ 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) [
+      alsa-lib libpulseaudio libjack2
+      liblo ladspa-sdk fluidsynth eigen
+      curl tcltk fltk ];
+
+  meta = with 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 = "https://csound.com/";
+    license = licenses.lgpl21Plus;
+    maintainers = [maintainers.marcweber];
+    platforms = platforms.linux;
+  };
+}
+
diff --git a/pkgs/applications/audio/curseradio/default.nix b/pkgs/applications/audio/curseradio/default.nix
new file mode 100644
index 00000000000..94059e06e54
--- /dev/null
+++ b/pkgs/applications/audio/curseradio/default.nix
@@ -0,0 +1,36 @@
+{ lib, fetchFromGitHub, substituteAll, python3Packages, mpv }:
+
+python3Packages.buildPythonApplication rec {
+  version = "0.2";
+  pname = "curseradio";
+
+  src = fetchFromGitHub {
+    owner = "chronitis";
+    repo = pname;
+    rev = "1bd4bd0faeec675e0647bac9a100b526cba19f8d";
+    sha256 = "11bf0jnj8h2fxhpdp498189r4s6b47vy4wripv0z4nx7lxajl88i";
+  };
+
+  propagatedBuildInputs = with python3Packages; [
+    requests
+    lxml
+    pyxdg
+  ];
+
+  patches = [
+    (substituteAll {
+      src = ./mpv.patch;
+      inherit mpv;
+    })
+  ];
+
+  # No tests
+  doCheck = false;
+
+  meta = with lib; {
+    description = "Command line radio player";
+    homepage = "https://github.com/chronitis/curseradio";
+    license = licenses.mit;
+    maintainers = [ maintainers.eyjhb ];
+  };
+}
diff --git a/pkgs/applications/audio/curseradio/mpv.patch b/pkgs/applications/audio/curseradio/mpv.patch
new file mode 100644
index 00000000000..d085dc79109
--- /dev/null
+++ b/pkgs/applications/audio/curseradio/mpv.patch
@@ -0,0 +1,11 @@
+--- a/curseradio/curseradio.py
++++ b/curseradio/curseradio.py
+@@ -30,7 +30,7 @@ import re
+ 
+ CONFIG_DEFAULT = {
+     'opml': {'root': "http://opml.radiotime.com/"},
+-    'playback': {'command': '/usr/bin/mpv'},
++    'playback': {'command': '@mpv@/bin/mpv'},
+     'interface': {'keymap': 'default'},
+     'keymap.default': {
+         'up': 'KEY_UP',
diff --git a/pkgs/applications/audio/cyanrip/default.nix b/pkgs/applications/audio/cyanrip/default.nix
new file mode 100644
index 00000000000..4f3a5a08af2
--- /dev/null
+++ b/pkgs/applications/audio/cyanrip/default.nix
@@ -0,0 +1,34 @@
+{ stdenv
+, lib
+, fetchFromGitHub
+, meson
+, ninja
+, pkg-config
+, ffmpeg
+, libcdio
+, libcdio-paranoia
+, libmusicbrainz5
+, curl
+}:
+stdenv.mkDerivation rec {
+  pname = "cyanrip";
+  version = "0.8.1";
+
+  src = fetchFromGitHub {
+    owner = "cyanreg";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "17bi2xhjv3f3i870whkyqckvjlg32wqkspash87zi0jw7m7jm229";
+  };
+
+  nativeBuildInputs = [ meson ninja pkg-config ];
+  buildInputs = [ ffmpeg libcdio libcdio-paranoia libmusicbrainz5 curl ];
+
+  meta = with lib; {
+    homepage = "https://github.com/cyanreg/cyanrip";
+    description = "Bule-ish CD ripper";
+    license = licenses.lgpl21Plus;
+    platforms = platforms.all;
+    maintainers = [ maintainers.zane ];
+  };
+}
diff --git a/pkgs/applications/audio/deadbeef/default.nix b/pkgs/applications/audio/deadbeef/default.nix
new file mode 100644
index 00000000000..c1cecc13ec5
--- /dev/null
+++ b/pkgs/applications/audio/deadbeef/default.nix
@@ -0,0 +1,117 @@
+{ config, lib, stdenv, fetchFromGitHub
+, autoconf
+, automake
+, libtool
+, intltool
+, pkg-config
+, 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
+, opusSupport ? true, opusfile ? 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, alsa-lib ? null
+, pulseSupport ? config.pulseaudio or stdenv.isLinux, 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 opusSupport -> opusfile != 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 -> alsa-lib != null;
+assert pulseSupport -> libpulseaudio != null;
+assert resamplerSupport -> libsamplerate != null;
+assert overloadSupport -> zlib != null;
+assert wavpackSupport -> wavpack != null;
+assert remoteSupport -> curl != null;
+
+stdenv.mkDerivation rec {
+  pname = "deadbeef";
+  version = "1.8.4";
+
+  src = fetchFromGitHub {
+    owner = "DeaDBeeF-Player";
+    repo = "deadbeef";
+    rev = version;
+    sha256 = "161b0ll8v4cjgwwmk137hzvh0jidlkx56vjkpnr70f0x4jzv2nll";
+  };
+
+  buildInputs = with 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 opusSupport opusfile
+    ++ optional zipSupport libzip
+    ++ optional ffmpegSupport ffmpeg
+    ++ optional apeSupport yasm
+    ++ optional artworkSupport imlib2
+    ++ optional hotkeysSupport libX11
+    ++ optional osdSupport dbus
+    ++ optional alsaSupport alsa-lib
+    ++ optional pulseSupport libpulseaudio
+    ++ optional resamplerSupport libsamplerate
+    ++ optional overloadSupport zlib
+    ++ optional wavpackSupport wavpack
+    ++ optional remoteSupport curl
+    ;
+
+  nativeBuildInputs = [
+    autoconf
+    automake
+    intltool
+    libtool
+    pkg-config
+  ] ++ lib.optional gtk3Support wrapGAppsHook;
+
+  enableParallelBuilding = true;
+
+  preConfigure = ''
+    ./autogen.sh
+  '';
+
+  meta = with 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/pkgs/applications/audio/deadbeef/plugins/headerbar-gtk3.nix b/pkgs/applications/audio/deadbeef/plugins/headerbar-gtk3.nix
new file mode 100644
index 00000000000..16cefc5ff85
--- /dev/null
+++ b/pkgs/applications/audio/deadbeef/plugins/headerbar-gtk3.nix
@@ -0,0 +1,30 @@
+{ lib, stdenv, fetchFromGitHub, autoconf, automake, libtool, pkg-config, libxml2, deadbeef, glib, gtk3 }:
+
+stdenv.mkDerivation rec {
+  pname = "deadbeef-headerbar-gtk3-plugin";
+  version = "1.2";
+
+  src = fetchFromGitHub {
+    owner = "saivert";
+    repo = "ddb_misc_headerbar_GTK3";
+    rev = "v${version}";
+    sha256 = "1v1schvnps7ypjqgcbqi74a45w8r2gbhrawz7filym22h1qr9wn0";
+  };
+
+  nativeBuildInputs = [ autoconf automake libtool pkg-config 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 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/pkgs/applications/audio/deadbeef/plugins/infobar.nix b/pkgs/applications/audio/deadbeef/plugins/infobar.nix
new file mode 100644
index 00000000000..3f62e73e7e4
--- /dev/null
+++ b/pkgs/applications/audio/deadbeef/plugins/infobar.nix
@@ -0,0 +1,34 @@
+{ lib, stdenv, fetchurl, pkg-config, deadbeef, gtk3, libxml2 }:
+
+stdenv.mkDerivation rec {
+  pname = "deadbeef-infobar-plugin";
+  version = "1.4";
+
+  src = fetchurl {
+    url = "https://bitbucket.org/dsimbiriatin/deadbeef-infobar/downloads/deadbeef-infobar-${version}.tar.gz";
+    sha256 = "0c9wh3wh1hdww7v96i8cy797la06mylhfi0880k8vwh88079aapf";
+  };
+
+  nativeBuildInputs = [ pkg-config ];
+  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 lib; {
+    broken = true; # crashes DeaDBeeF and is abandoned (https://bitbucket.org/dsimbiriatin/deadbeef-infobar/issues/38/infobar-causes-deadbeef-180-to-crash)
+    description = "DeaDBeeF Infobar Plugin";
+    homepage = "https://bitbucket.org/dsimbiriatin/deadbeef-infobar";
+    license = licenses.gpl2Plus;
+    maintainers = [ maintainers.jtojnar ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/pkgs/applications/audio/deadbeef/plugins/lyricbar.nix b/pkgs/applications/audio/deadbeef/plugins/lyricbar.nix
new file mode 100644
index 00000000000..bc6d206956f
--- /dev/null
+++ b/pkgs/applications/audio/deadbeef/plugins/lyricbar.nix
@@ -0,0 +1,26 @@
+{ lib, stdenv, fetchFromGitHub, pkg-config, deadbeef, gtkmm3, libxmlxx3 }:
+
+stdenv.mkDerivation {
+  pname = "deadbeef-lyricbar-plugin";
+  version = "unstable-2019-01-29";
+
+  src = fetchFromGitHub {
+    owner = "C0rn3j";
+    repo = "deadbeef-lyricbar";
+    rev = "8f99b92ef827c451c43fc7dff38ae4f15c355e8e";
+    sha256 = "108hx5530f4xm8p9m2bk79nq7jkhcj39ad3vmxb2y6h6l2zv5kwl";
+  };
+
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = [ deadbeef gtkmm3 libxmlxx3 ];
+
+  buildFlags = [ "gtk3" ];
+
+  meta = with lib; {
+    description = "Plugin for DeaDBeeF audio player that fetches and shows the song’s lyrics";
+    homepage = "https://github.com/C0rn3j/deadbeef-lyricbar";
+    license = licenses.mit;
+    maintainers = [ maintainers.jtojnar ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/pkgs/applications/audio/deadbeef/plugins/mpris2.nix b/pkgs/applications/audio/deadbeef/plugins/mpris2.nix
new file mode 100644
index 00000000000..d0c1b4f9e50
--- /dev/null
+++ b/pkgs/applications/audio/deadbeef/plugins/mpris2.nix
@@ -0,0 +1,23 @@
+{ lib, stdenv, fetchurl, pkg-config, deadbeef, glib }:
+
+stdenv.mkDerivation rec {
+  pname = "deadbeef-mpris2-plugin";
+  version = "1.12";
+
+  src = fetchurl {
+    url = "https://github.com/Serranya/deadbeef-mpris2-plugin/releases/download/v${version}/${pname}-${version}.tar.xz";
+    sha256 = "0s3y4ka4qf38cypc0xspy79q0g5y1kqx6ldad7yr6a45nw6j95jh";
+  };
+
+  nativeBuildInputs = [ pkg-config ];
+
+  buildInputs = [ deadbeef glib ];
+
+  meta = with 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/pkgs/applications/audio/deadbeef/plugins/statusnotifier.nix b/pkgs/applications/audio/deadbeef/plugins/statusnotifier.nix
new file mode 100644
index 00000000000..a1ca052f9c6
--- /dev/null
+++ b/pkgs/applications/audio/deadbeef/plugins/statusnotifier.nix
@@ -0,0 +1,39 @@
+{ lib, stdenv, fetchFromGitHub, pkg-config, deadbeef, gtk3, perl
+, libdbusmenu-glib }:
+
+stdenv.mkDerivation rec {
+  pname = "deadbeef-statusnotifier-plugin";
+  version = "1.6";
+
+  src = fetchFromGitHub {
+    owner = "vovochka404";
+    repo = "deadbeef-statusnotifier-plugin";
+    rev = "v${version}";
+    sha256 = "sha256-6WEbY59vPNrL3W5GUwFQJimmSS+td8Ob+G46fPAxfV4=";
+  };
+
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = [ deadbeef gtk3 libdbusmenu-glib ];
+
+  buildFlags = [ "gtk3" ];
+
+  postPatch = ''
+    substituteInPlace tools/glib-mkenums \
+      --replace /usr/bin/perl "${perl}/bin/perl"
+  '';
+
+  installPhase = ''
+    runHook preInstall
+    mkdir -p $out/lib/deadbeef
+    cp build/sni_gtk3.so $out/lib/deadbeef
+    runHook postInstall
+  '';
+
+  meta = with lib; {
+    description = "DeaDBeeF StatusNotifier Plugin";
+    homepage = "https://github.com/vovochka404/deadbeef-statusnotifier-plugin";
+    license = licenses.gpl3Plus;
+    maintainers = [ maintainers.kurnevsky ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/pkgs/applications/audio/deadbeef/wrapper.nix b/pkgs/applications/audio/deadbeef/wrapper.nix
new file mode 100644
index 00000000000..66108deab1e
--- /dev/null
+++ b/pkgs/applications/audio/deadbeef/wrapper.nix
@@ -0,0 +1,14 @@
+{ symlinkJoin, deadbeef, makeWrapper, plugins }:
+
+symlinkJoin {
+  name = "deadbeef-with-plugins-${deadbeef.version}";
+
+  paths = [ deadbeef ] ++ plugins;
+
+  nativeBuildInputs = [ makeWrapper ];
+
+  postBuild = ''
+    wrapProgram $out/bin/deadbeef \
+      --set DEADBEEF_PLUGIN_DIR "$out/lib/deadbeef"
+  '';
+}
diff --git a/pkgs/applications/audio/denemo/default.nix b/pkgs/applications/audio/denemo/default.nix
new file mode 100644
index 00000000000..3a2dbd139d7
--- /dev/null
+++ b/pkgs/applications/audio/denemo/default.nix
@@ -0,0 +1,41 @@
+{ lib, stdenv, fetchurl, pkg-config
+, libjack2, gettext, intltool, guile_2_0, lilypond
+, glib, libxml2, librsvg, libsndfile, aubio
+, gtk3, gtksourceview, evince, fluidsynth, rubberband
+, portaudio, portmidi, fftw, wrapGAppsHook }:
+
+stdenv.mkDerivation rec {
+  pname = "denemo";
+  version = "2.5.0";
+
+  src = fetchurl {
+    url = "https://ftp.gnu.org/gnu/denemo/denemo-${version}.tar.gz";
+    sha256 = "sha256-B6GbBL/o/z0emT+Iw6XvWmAsJCmIwSGCyV1DkhDyfBY=";
+  };
+
+  buildInputs = [
+    libjack2 guile_2_0 lilypond glib libxml2 librsvg libsndfile
+    aubio gtk3 gtksourceview evince fluidsynth rubberband portaudio fftw portmidi
+  ];
+
+  preFixup = ''
+    gappsWrapperArgs+=(
+      --prefix PATH : "${lilypond}/bin"
+    )
+  '';
+
+  nativeBuildInputs = [
+    wrapGAppsHook
+    intltool
+    gettext
+    pkg-config
+  ];
+
+  meta = with 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/pkgs/applications/audio/dfasma/default.nix b/pkgs/applications/audio/dfasma/default.nix
new file mode 100644
index 00000000000..cb2ac2b9e0b
--- /dev/null
+++ b/pkgs/applications/audio/dfasma/default.nix
@@ -0,0 +1,64 @@
+{ mkDerivation, lib, fetchFromGitHub, fftw, libsndfile, qtbase, qtmultimedia, qmake }:
+
+let
+
+  reaperFork = {
+    src = fetchFromGitHub {
+      sha256 = "07m2wf2gqyya95b65gawrnr4pvc9jyzmg6h8sinzgxlpskz93wwc";
+      rev = "39053e8896eedd7b3e8a9e9a9ffd80f1fc6ceb16";
+      repo = "REAPER";
+      owner = "gillesdegottex";
+    };
+    meta = with lib; {
+     license = licenses.asl20;
+    };
+  };
+
+  libqaudioextra = {
+    src = fetchFromGitHub {
+      sha256 = "0m6x1qm7lbjplqasr2jhnd2ndi0y6z9ybbiiixnlwfm23sp15wci";
+      rev = "9ae051989a8fed0b2f8194b1501151909a821a89";
+      repo = "libqaudioextra";
+      owner = "gillesdegottex";
+    };
+    meta = with lib; {
+     license = licenses.gpl3Plus;
+    };
+  };
+
+in mkDerivation rec {
+  pname = "dfasma";
+  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" "";
+  '';
+
+  meta = with 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 = "https://gillesdegottex.gitlab.io/dfasma-website/";
+    license = [ licenses.gpl3Plus reaperFork.meta.license ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/pkgs/applications/audio/diopser/default.nix b/pkgs/applications/audio/diopser/default.nix
new file mode 100644
index 00000000000..339eae1a7ca
--- /dev/null
+++ b/pkgs/applications/audio/diopser/default.nix
@@ -0,0 +1,76 @@
+{ lib, stdenv, fetchFromGitHub, cmake, pkg-config
+, libjack2, alsa-lib, freetype, libX11, libXrandr, libXinerama, libXext, libXcursor
+}:
+
+let
+
+  # Derived from subprojects/function2.wrap
+  function2 = rec {
+    version = "4.1.0";
+    src = fetchFromGitHub {
+      owner = "Naios";
+      repo = "function2";
+      rev = version;
+      hash = "sha256-JceZU8ZvtYhFheh8BjMvjjZty4hcYxHEK+IIo5X4eSk=";
+    };
+  };
+
+  juce = rec {
+    version = "unstable-2021-04-07";
+    src = fetchFromGitHub {
+      owner = "juce-framework";
+      repo = "JUCE";
+      rev = "1a5fb5992a1a4e28e998708ed8dce2cc864a30d7";
+      sha256= "1ri7w4sz3sy5xilibg53ls9526fx7jwbv8rc54ccrqfhxqyin308";
+    };
+  };
+
+
+in  stdenv.mkDerivation rec {
+  pname = "diopser";
+  version = "unstable-2021-5-13";
+
+  src = fetchFromGitHub {
+    owner = "robbert-vdh";
+    repo = pname;
+    fetchSubmodules = true;
+    rev = "d5fdc92f1caf5a828e071dac99e106e58f06d84d";
+    sha256 = "06y1h895yxh44gp4vxzrna59lf7nlfw7aacd3kk4l1g56jhy9pdx";
+  };
+
+  postUnpack = ''
+    (
+      cd "$sourceRoot"
+      cp -R --no-preserve=mode,ownership ${function2.src} function2
+      cp -R --no-preserve=mode,ownership ${juce.src} JUCE
+      sed -i 's@CPMAddPackage("gh:juce-framework/JUCE.*@add_subdirectory(JUCE)@g' CMakeLists.txt
+      sed -i 's@CPMAddPackage("gh:Naios/function2.*@add_subdirectory(function2)@g' CMakeLists.txt
+      patchShebangs .
+    )
+  '';
+
+  installPhase = ''
+    mkdir -p $out/lib/vst3
+    cp -r Diopser_artefacts/Release/VST3/Diopser.vst3 $out/lib/vst3
+  '';
+
+  nativeBuildInputs = [ cmake pkg-config ];
+
+  buildInputs = [
+    libjack2 alsa-lib freetype libX11 libXrandr libXinerama libXext
+    libXcursor
+  ];
+
+  cmakeFlags = [
+    "-DCMAKE_AR=${stdenv.cc.cc}/bin/gcc-ar"
+    "-DCMAKE_RANLIB=${stdenv.cc.cc}/bin/gcc-ranlib"
+  ];
+
+  meta = with lib; {
+    description = "A totally original phase rotation plugin";
+    homepage = "https://github.com/robbert-vdh/diopser";
+    license = licenses.gpl3Plus;
+    maintainers = with maintainers; [ magnetophon ];
+    platforms = platforms.all;
+  };
+}
diff --git a/pkgs/applications/audio/dirt/default.nix b/pkgs/applications/audio/dirt/default.nix
new file mode 100644
index 00000000000..a456d62e6f6
--- /dev/null
+++ b/pkgs/applications/audio/dirt/default.nix
@@ -0,0 +1,30 @@
+{ lib, stdenv, fetchFromGitHub, libsndfile, libsamplerate, liblo, libjack2 }:
+
+stdenv.mkDerivation {
+  pname = "dirt";
+  version = "unstable-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 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/pkgs/applications/audio/distrho/default.nix b/pkgs/applications/audio/distrho/default.nix
new file mode 100644
index 00000000000..258eec83724
--- /dev/null
+++ b/pkgs/applications/audio/distrho/default.nix
@@ -0,0 +1,98 @@
+{ lib
+, stdenv
+, alsa-lib
+, fetchFromGitHub
+, fftwFloat
+, freetype
+, libGL
+, libX11
+, libXcursor
+, libXext
+, libXrender
+, meson
+, ninja
+, pkg-config
+}:
+
+let rpathLibs = [
+  fftwFloat
+];
+in
+stdenv.mkDerivation rec {
+  pname = "distrho-ports";
+  version = "2021-03-15";
+
+  src = fetchFromGitHub {
+    owner = "DISTRHO";
+    repo = "DISTRHO-Ports";
+    rev = version;
+    sha256 = "00fgqwayd20akww3n2imyqscmyrjyc9jj0ar13k9dhpaxqk2jxbf";
+  };
+
+  nativeBuildInputs = [ pkg-config meson ninja ];
+
+  buildInputs = rpathLibs ++ [
+    alsa-lib
+    freetype
+    libGL
+    libX11
+    libXcursor
+    libXext
+    libXrender
+  ];
+
+  postFixup = ''
+    for file in \
+      $out/lib/lv2/vitalium.lv2/vitalium.so \
+      $out/lib/vst/vitalium.so \
+      $out/lib/vst3/vitalium.vst3/Contents/x86_64-linux/vitalium.so
+    do
+      patchelf --set-rpath "${lib.makeLibraryPath rpathLibs}:$(patchelf --print-rpath $file)" $file
+    done
+  '';
+
+  meta = with lib; {
+    homepage = "http://distrho.sourceforge.net/ports";
+    description = "Linux audio plugins and LV2 ports";
+    longDescription = ''
+      Includes:
+        arctican-function
+        arctican-pilgrim
+        dexed
+        drowaudio-distortion
+        drowaudio-distortionshaper
+        drowaudio-flanger
+        drowaudio-reverb
+        drowaudio-tremolo
+        drumsynth
+        easySSP
+        eqinox
+        HiReSam
+        juce-opl
+        klangfalter
+        LUFSMeter
+        LUFSMeter-Multi
+        luftikus
+        obxd
+        pitchedDelay
+        refine
+        stereosourceseparation
+        swankyamp
+        tal-dub-3
+        tal-filter
+        tal-filter-2
+        tal-noisemaker
+        tal-reverb
+        tal-reverb-2
+        tal-reverb-3
+        tal-vocoder-2
+        temper
+        vex
+        vitalium
+        wolpertinger
+    '';
+    license = with licenses; [ gpl2Only gpl3Only gpl2Plus lgpl2Plus lgpl3Only mit ];
+    maintainers = [ maintainers.goibhniu ];
+    platforms = [ "x86_64-linux" ];
+  };
+}
diff --git a/pkgs/applications/audio/dr14_tmeter/default.nix b/pkgs/applications/audio/dr14_tmeter/default.nix
new file mode 100644
index 00000000000..649c0f39097
--- /dev/null
+++ b/pkgs/applications/audio/dr14_tmeter/default.nix
@@ -0,0 +1,29 @@
+{ lib, 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 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/pkgs/applications/audio/dragonfly-reverb/default.nix b/pkgs/applications/audio/dragonfly-reverb/default.nix
new file mode 100644
index 00000000000..a07dca699d7
--- /dev/null
+++ b/pkgs/applications/audio/dragonfly-reverb/default.nix
@@ -0,0 +1,45 @@
+{ lib, stdenv, fetchFromGitHub, libjack2, libGL, pkg-config, xorg }:
+
+stdenv.mkDerivation rec {
+  pname = "dragonfly-reverb";
+  version = "3.2.5";
+
+  src = fetchFromGitHub {
+    owner = "michaelwillis";
+    repo = "dragonfly-reverb";
+    rev = version;
+    sha256 = "14kia9wjs0nqfx4psnr3vf4x6hihkf80gb0mjzmdnnnk4cnrdydm";
+    fetchSubmodules = true;
+  };
+
+  postPatch = ''
+    patchShebangs dpf/utils/generate-ttl.sh
+  '';
+
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = [
+    libjack2 xorg.libX11 libGL
+  ];
+
+  installPhase = ''
+    runHook preInstall
+    mkdir -p $out/bin
+    mkdir -p $out/lib/lv2/
+    mkdir -p $out/lib/vst/
+    cd bin
+    for bin in DragonflyEarlyReflections DragonflyPlateReverb DragonflyHallReverb DragonflyRoomReverb; do
+      cp -a $bin        $out/bin/
+      cp -a $bin-vst.so $out/lib/vst/
+      cp -a $bin.lv2/   $out/lib/lv2/ ;
+    done
+    runHook postInstall
+  '';
+
+  meta = with lib; {
+    homepage = "https://github.com/michaelwillis/dragonfly-reverb";
+    description = "A hall-style reverb based on freeverb3 algorithms";
+    maintainers = [ maintainers.magnetophon ];
+    license = licenses.gpl3Plus;
+    platforms = ["x86_64-linux"];
+  };
+}
diff --git a/pkgs/applications/audio/drumgizmo/default.nix b/pkgs/applications/audio/drumgizmo/default.nix
new file mode 100644
index 00000000000..7dd78e51318
--- /dev/null
+++ b/pkgs/applications/audio/drumgizmo/default.nix
@@ -0,0 +1,30 @@
+{ lib, stdenv, fetchurl, alsa-lib, expat, glib, libjack2, libXext, libX11, libpng
+, libpthreadstubs, libsmf, libsndfile, lv2, pkg-config, zita-resampler
+}:
+
+stdenv.mkDerivation rec {
+  version = "0.9.19";
+  pname = "drumgizmo";
+
+  src = fetchurl {
+    url = "https://www.drumgizmo.org/releases/${pname}-${version}/${pname}-${version}.tar.gz";
+    sha256 = "18x28vhif0c97xz02k22xwqxxig6fi6j0356mlz2vf7vb25z69kl";
+  };
+
+  configureFlags = [ "--enable-lv2" ];
+
+  nativeBuildInputs = [ pkg-config ];
+
+  buildInputs = [
+    alsa-lib expat glib libjack2 libXext libX11 libpng libpthreadstubs
+    libsmf libsndfile lv2 zita-resampler
+  ];
+
+  meta = with lib; {
+    description = "An LV2 sample based drum plugin";
+    homepage = "https://www.drumgizmo.org";
+    license = licenses.lgpl3Plus;
+    platforms = platforms.linux;
+    maintainers = [ maintainers.goibhniu maintainers.nico202 ];
+  };
+}
diff --git a/pkgs/applications/audio/drumkv1/default.nix b/pkgs/applications/audio/drumkv1/default.nix
new file mode 100644
index 00000000000..30d6328b575
--- /dev/null
+++ b/pkgs/applications/audio/drumkv1/default.nix
@@ -0,0 +1,23 @@
+{ mkDerivation, lib, fetchurl, pkg-config, libjack2, alsa-lib, libsndfile, liblo, lv2, qt5 }:
+
+mkDerivation rec {
+  pname = "drumkv1";
+  version = "0.9.23";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/drumkv1/${pname}-${version}.tar.gz";
+    sha256 = "sha256-gNscsqGpEfU1CNJDlBAzum9M0vzJSm6Wx5b/zhOt+sk=";
+  };
+
+  buildInputs = [ libjack2 alsa-lib libsndfile liblo lv2 qt5.qtbase qt5.qttools ];
+
+  nativeBuildInputs = [ pkg-config ];
+
+  meta = with 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/pkgs/applications/audio/dsf2flac/default.nix b/pkgs/applications/audio/dsf2flac/default.nix
new file mode 100644
index 00000000000..db07acf7c36
--- /dev/null
+++ b/pkgs/applications/audio/dsf2flac/default.nix
@@ -0,0 +1,34 @@
+{ lib, stdenv, fetchFromGitHub, autoreconfHook, boost, flac, id3lib, pkg-config
+, taglib, zlib }:
+
+stdenv.mkDerivation rec {
+  pname = "dsf2flac";
+  version = "unstable-2018-01-02";
+
+  src = fetchFromGitHub {
+    owner = "hank";
+    repo = pname;
+    rev = "b0cf5aa6ddc60df9bbfeed25548e443c99f5cb16";
+    sha256 = "15j5f82v7lgs0fkgyyynl82cb1rsxyr9vw3bpzra63nacbi9g8lc";
+  };
+
+  buildInputs = [ boost flac id3lib taglib zlib ];
+
+  nativeBuildInputs = [ autoreconfHook pkg-config ];
+
+  enableParallelBuilding = true;
+
+  preConfigure = ''
+    export LIBS="$LIBS -lz"
+  '';
+
+  configureFlags = [ "--with-boost-libdir=${boost.out}/lib" ];
+
+  meta = with lib; {
+    description = "A DSD to FLAC transcoding tool";
+    homepage = "https://github.com/hank/dsf2flac";
+    license = licenses.gpl2;
+    maintainers = with maintainers; [ dmrauh ];
+    platforms = with platforms; linux;
+  };
+}
diff --git a/pkgs/applications/audio/easyeffects/default.nix b/pkgs/applications/audio/easyeffects/default.nix
new file mode 100644
index 00000000000..de4b7a3176f
--- /dev/null
+++ b/pkgs/applications/audio/easyeffects/default.nix
@@ -0,0 +1,113 @@
+{ lib
+, stdenv
+, desktop-file-utils
+, fetchFromGitHub
+, calf
+, fftwFloat
+, fmt
+, glib
+, gtk4
+, itstool
+, libadwaita
+, libbs2b
+, libebur128
+, libsamplerate
+, libsigcxx30
+, libsndfile
+, lilv
+, lsp-plugins
+, lv2
+, mda_lv2
+, meson
+, ninja
+, nlohmann_json
+, pipewire
+, pkg-config
+, python3
+, rnnoise
+, rubberband
+, speexdsp
+, tbb
+, wrapGAppsHook4
+, zam-plugins
+, zita-convolver
+}:
+
+stdenv.mkDerivation rec {
+  pname = "easyeffects";
+  version = "6.2.4";
+
+  src = fetchFromGitHub {
+    owner = "wwmm";
+    repo = "easyeffects";
+    rev = "v${version}";
+    sha256 = "sha256-g/qN1Tafh71HdPLHW43Zva9MK6G+qxSnb1aRisuwdBw=";
+  };
+
+  nativeBuildInputs = [
+    desktop-file-utils
+    itstool
+    meson
+    ninja
+    pkg-config
+    python3
+    wrapGAppsHook4
+  ];
+
+  buildInputs = [
+    fftwFloat
+    fmt
+    glib
+    gtk4
+    libadwaita
+    libbs2b
+    libebur128
+    libsamplerate
+    libsigcxx30
+    libsndfile
+    lilv
+    lv2
+    nlohmann_json
+    pipewire
+    rnnoise
+    rubberband
+    speexdsp
+    tbb
+    zita-convolver
+  ];
+
+  postPatch = ''
+    chmod +x meson_post_install.py
+    patchShebangs meson_post_install.py
+  '';
+
+  preFixup =
+    let
+      lv2Plugins = [
+        calf # compressor exciter, bass enhancer and others
+        lsp-plugins # delay, limiter, multiband compressor
+        mda_lv2 # loudness
+        zam-plugins # maximizer
+      ];
+      ladspaPlugins = [
+        rubberband # pitch shifting
+      ];
+    in
+    ''
+      gappsWrapperArgs+=(
+        --set LV2_PATH "${lib.makeSearchPath "lib/lv2" lv2Plugins}"
+        --set LADSPA_PATH "${lib.makeSearchPath "lib/ladspa" ladspaPlugins}"
+      )
+    '';
+
+  separateDebugInfo = true;
+
+  meta = with lib; {
+    description = "Audio effects for PipeWire applications.";
+    homepage = "https://github.com/wwmm/easyeffects";
+    license = licenses.gpl3Plus;
+    maintainers = with maintainers; [ jtojnar ];
+    platforms = platforms.linux;
+    badPlatforms = [ "aarch64-linux" ];
+  };
+}
diff --git a/pkgs/applications/audio/easytag/default.nix b/pkgs/applications/audio/easytag/default.nix
new file mode 100644
index 00000000000..d55fd7ff0cb
--- /dev/null
+++ b/pkgs/applications/audio/easytag/default.nix
@@ -0,0 +1,41 @@
+{ lib, stdenv, fetchurl, pkg-config, intltool, gtk3, glib, libid3tag, id3lib, taglib
+, libvorbis, libogg, opusfile, flac, itstool, libxml2, gsettings-desktop-schemas
+, gnome, wrapGAppsHook
+}:
+
+let
+  pname = "easytag";
+  version = "2.4.3";
+in stdenv.mkDerivation rec {
+  name = "${pname}-${version}";
+
+  src = fetchurl {
+    url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${name}.tar.xz";
+    sha256 = "1mbxnqrw1fwcgraa1bgik25vdzvf97vma5pzknbwbqq5ly9fwlgw";
+  };
+
+  NIX_LDFLAGS = "-lid3tag -lz";
+
+  nativeBuildInputs = [ pkg-config intltool itstool libxml2 wrapGAppsHook ];
+  buildInputs = [
+    gtk3 glib libid3tag id3lib taglib libvorbis libogg opusfile flac
+    gsettings-desktop-schemas gnome.adwaita-icon-theme
+  ];
+
+  doCheck = false; # fails 1 out of 9 tests
+
+  passthru = {
+    updateScript = gnome.updateScript {
+      packageName = pname;
+      versionPolicy = "none";
+    };
+  };
+
+  meta = with lib; {
+    description = "View and edit tags for various audio files";
+    homepage = "https://wiki.gnome.org/Apps/EasyTAG";
+    license = licenses.gpl2Plus;
+    maintainers = with maintainers; [ ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/pkgs/applications/audio/ebumeter/default.nix b/pkgs/applications/audio/ebumeter/default.nix
new file mode 100644
index 00000000000..9ebcbec001d
--- /dev/null
+++ b/pkgs/applications/audio/ebumeter/default.nix
@@ -0,0 +1,33 @@
+{ lib, stdenv, fetchurl
+, libX11, libXft, libclthreads, libclxclient, libjack2, libpng, libsndfile, zita-resampler
+}:
+
+stdenv.mkDerivation rec {
+  pname = "ebumeter";
+  version = "0.4.2";
+
+  src = fetchurl {
+    url = "https://kokkinizita.linuxaudio.org/linuxaudio/downloads/${pname}-${version}.tar.bz2";
+    sha256 = "1wm9j1phmpicrp7jdsvdbc3mghdd92l61yl9qbps0brq2ljjyd5s";
+  };
+
+  buildInputs = [
+    libX11 libXft libclthreads libclxclient libjack2 libpng libsndfile zita-resampler
+  ];
+
+  preConfigure = ''
+    cd source
+  '';
+
+  makeFlags = [ "PREFIX=$(out)" ];
+
+  enableParallelBuilding = true;
+
+  meta = with lib; {
+    description = "Level metering according to the EBU R-128 recommendation";
+    homepage = "http://kokkinizita.linuxaudio.org/linuxaudio/index.html";
+    license = licenses.gpl2Plus;
+    maintainers = with maintainers; [ orivej ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/pkgs/applications/audio/ecasound/default.nix b/pkgs/applications/audio/ecasound/default.nix
new file mode 100644
index 00000000000..108be8726c5
--- /dev/null
+++ b/pkgs/applications/audio/ecasound/default.nix
@@ -0,0 +1,77 @@
+{ lib, stdenv
+, fetchurl
+, fetchpatch
+, pkg-config
+, alsa-lib
+, audiofile
+, libjack2
+, liblo
+, liboil
+, libsamplerate
+, libsndfile
+, lilv
+, lv2
+, ncurses
+, readline
+}:
+
+# TODO: fix python. See configure log.
+# fix -Dnullptr=0 cludge below.
+# The error is
+# /nix/store/*-lilv-0.24.10/include/lilv-0/lilv/lilvmm.hpp:272:53: error: 'nullptr' was not declared in this scope
+
+stdenv.mkDerivation rec {
+  pname = "ecasound";
+  version = "2.9.3";
+
+  src = fetchurl {
+    url = "https://ecasound.seul.org/download/ecasound-${version}.tar.gz";
+    sha256 = "1m7njfjdb7sqf0lhgc4swihgdr4snkg8v02wcly08wb5ar2fr2s6";
+  };
+
+  patches = [
+    # Pull patch pending upstream inclusion for ncurses-6.3:
+    #  https://sourceforge.net/p/ecasound/bugs/54/
+    (fetchpatch {
+      name = "ncursdes-6.3.patch";
+      url = "https://sourceforge.net/p/ecasound/bugs/54/attachment/0001-ecasignalview.cpp-always-use-s-style-format-for-prin.patch";
+      sha256 = "1x1gsjzd43lh19mhpmwrbq269h56s8bxgyv0yfi5yf0sqjf9vaq0";
+    })
+  ];
+
+  nativeBuildInputs = [
+    pkg-config
+  ];
+
+  buildInputs = [
+    alsa-lib
+    audiofile
+    libjack2
+    liblo
+    liboil
+    libsamplerate
+    libsndfile
+    lilv
+    lv2
+    ncurses
+    readline
+  ];
+
+  strictDeps = true;
+
+  CXXFLAGS = "-std=c++11";
+  configureFlags = "--enable-liblilv --with-extra-cppflags=-Dnullptr=0";
+
+  postPatch = ''
+    sed -i -e '
+      s@^#include <readline.h>@#include <readline/readline.h>@
+      s@^#include <history.h>@#include <readline/history.h>@
+      ' ecasound/eca-curses.cpp
+  '';
+
+  meta = {
+    description = "Software package designed for multitrack audio processing";
+    license = with lib.licenses;  [ gpl2 lgpl21 ];
+    homepage = "http://nosignal.fi/ecasound/";
+  };
+}
diff --git a/pkgs/applications/audio/eflite/default.nix b/pkgs/applications/audio/eflite/default.nix
new file mode 100644
index 00000000000..0c48c582c4f
--- /dev/null
+++ b/pkgs/applications/audio/eflite/default.nix
@@ -0,0 +1,51 @@
+{ lib, stdenv, fetchurl, fetchpatch, flite, alsa-lib, debug ? false }:
+
+stdenv.mkDerivation rec {
+  pname = "eflite";
+  version = "0.4.1";
+
+  src = fetchurl {
+    url = "https://sourceforge.net/projects/eflite/files/eflite/${version}/${pname}-${version}.tar.gz";
+    sha256 = "088p9w816s02s64grfs28gai3lnibzdjb9d1jwxzr8smbs2qbbci";
+  };
+
+  buildInputs = [ flite alsa-lib ];
+
+  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 = lib.optionalString debug " -DDEBUG=2";
+
+  meta = {
+    homepage = "http://eflite.sourceforge.net";
+    description = "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 = lib.licenses.gpl2;
+    platforms = lib.platforms.linux;
+    maintainers = with lib.maintainers; [ jhhuh ];
+  };
+}
diff --git a/pkgs/applications/audio/eflite/format.patch b/pkgs/applications/audio/eflite/format.patch
new file mode 100644
index 00000000000..d1a81aac480
--- /dev/null
+++ b/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/pkgs/applications/audio/ekho/default.nix b/pkgs/applications/audio/ekho/default.nix
new file mode 100644
index 00000000000..25ed8a71aa1
--- /dev/null
+++ b/pkgs/applications/audio/ekho/default.nix
@@ -0,0 +1,39 @@
+{ lib, stdenv, fetchurl, pkg-config
+, libsndfile, libpulseaudio
+}:
+
+let
+  version = "5.8.2";
+in stdenv.mkDerivation rec {
+  pname = "ekho";
+  inherit version;
+
+  meta = with 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}/${pname}-${version}.tar.xz";
+    sha256 = "0ym6lpcpsvwvsiwlzkl1509a2hljwcw7synngrmqjq1n49ww00nj";
+  };
+
+  preConfigure = with 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 = [ pkg-config ];
+
+  buildInputs = [ libsndfile libpulseaudio ];
+}
diff --git a/pkgs/applications/audio/ensemble-chorus/default.nix b/pkgs/applications/audio/ensemble-chorus/default.nix
new file mode 100644
index 00000000000..b3255126205
--- /dev/null
+++ b/pkgs/applications/audio/ensemble-chorus/default.nix
@@ -0,0 +1,28 @@
+{ lib, stdenv, fetchFromGitHub, fltk, alsa-lib, freetype, libXrandr, libXinerama, libXcursor, lv2, libjack2, cmake, pkg-config }:
+
+stdenv.mkDerivation rec {
+  pname = "ensemble-chorus";
+  version = "unstable-15-02-2019";
+
+  src = fetchFromGitHub {
+    owner = "jpcima";
+    repo = pname;
+    rev = "59baeb86b8851f521bc8162e22e3f15061662cc3";
+    sha256 = "0c1y10vyhrihcjvxqpqf6b52yk5yhwh813cfp6nla5ax2w88dbhr";
+    fetchSubmodules = true;
+  };
+
+  nativeBuildInputs = [ cmake pkg-config ];
+
+  buildInputs = [
+    fltk alsa-lib freetype libXrandr libXinerama libXcursor lv2 libjack2
+  ];
+
+  meta = with lib; {
+    homepage = "https://github.com/jpcima/ensemble-chorus";
+    description = "Digital model of electronic string ensemble chorus";
+    maintainers = [ maintainers.magnetophon ];
+    platforms = platforms.linux;
+    license = licenses.boost;
+  };
+}
diff --git a/pkgs/applications/audio/eq10q/default.nix b/pkgs/applications/audio/eq10q/default.nix
new file mode 100644
index 00000000000..3531132f2fd
--- /dev/null
+++ b/pkgs/applications/audio/eq10q/default.nix
@@ -0,0 +1,51 @@
+{ lib, stdenv, fetchurl, fetchpatch, cmake, fftw, gtkmm2, libxcb, lv2, pkg-config
+, xorg }:
+stdenv.mkDerivation rec {
+  pname = "eq10q";
+  version = "2.2";
+  src = fetchurl {
+    url = "mirror://sourceforge/project/eq10q/${pname}-${version}.tar.gz";
+    sha256 = "16mhcav8gwkp29k9ki4dlkajlcgh1i2wvldabxb046d37dq4qzrk";
+  };
+
+  nativeBuildInputs = [ cmake pkg-config ];
+  buildInputs = [ 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";
+    })
+  ];
+
+  postPatch = ''
+     # Fix build with lv2 1.18: https://sourceforge.net/p/eq10q/bugs/23/
+     find . -type f -exec fgrep -q LV2UI_Descriptor {} \; \
+       -exec sed -i {} -e 's/const _\?LV2UI_Descriptor/const LV2UI_Descriptor/' \;
+   '';
+
+  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 = lib.licenses.gpl3;
+    maintainers = [ lib.maintainers.magnetophon ];
+    platforms = lib.platforms.linux;
+  };
+}
diff --git a/pkgs/applications/audio/espeak-ng/default.nix b/pkgs/applications/audio/espeak-ng/default.nix
new file mode 100644
index 00000000000..6458d7188ae
--- /dev/null
+++ b/pkgs/applications/audio/espeak-ng/default.nix
@@ -0,0 +1,60 @@
+{ stdenv, lib, fetchFromGitHub, autoconf, automake, which, libtool, pkg-config
+, ronn, substituteAll
+, mbrolaSupport ? true, mbrola
+, pcaudiolibSupport ? true, pcaudiolib
+, sonicSupport ? true, sonic }:
+
+stdenv.mkDerivation rec {
+  pname = "espeak-ng";
+  version = "1.50";
+
+  src = fetchFromGitHub {
+    owner = "espeak-ng";
+    repo = "espeak-ng";
+    rev = version;
+    sha256 = "0jkqhf2h94vbqq7mg7mmm23bq372fa7mdk941my18c3vkldcir1b";
+  };
+
+  patches = lib.optionals mbrolaSupport [
+    # Hardcode correct mbrola paths.
+    (substituteAll {
+      src = ./mbrola.patch;
+      inherit mbrola;
+    })
+  ];
+
+  nativeBuildInputs = [ autoconf automake which libtool pkg-config ronn ];
+
+  buildInputs = lib.optional mbrolaSupport mbrola
+             ++ lib.optional pcaudiolibSupport pcaudiolib
+             ++ lib.optional sonicSupport sonic;
+
+  preConfigure = "./autogen.sh";
+
+  configureFlags = [
+    "--with-mbrola=${if mbrolaSupport then "yes" else "no"}"
+  ];
+
+  # Current release lacks dependencies on local espeak-ng:
+  #  cd dictsource && ESPEAK_DATA_PATH=/build/espeak-ng LD_LIBRARY_PATH=../src: ../src/espeak-ng --compile=yue && cd ..
+  #  bash: line 1: ../src/espeak-ng: No such file or directory
+  # Should be fixed in next release: https://github.com/espeak-ng/espeak-ng/pull/1029
+  enableParallelBuilding = false;
+
+  postInstall = lib.optionalString stdenv.isLinux ''
+    patchelf --set-rpath "$(patchelf --print-rpath $out/bin/espeak-ng)" $out/bin/speak-ng
+  '';
+
+  passthru = {
+    inherit mbrolaSupport;
+  };
+
+  meta = with lib; {
+    description = "Open source speech synthesizer that supports over 70 languages, based on eSpeak";
+    homepage = "https://github.com/espeak-ng/espeak-ng";
+    changelog = "https://github.com/espeak-ng/espeak-ng/blob/${version}/CHANGELOG.md";
+    license = licenses.gpl3Plus;
+    maintainers = with maintainers; [ aske ];
+    platforms = platforms.all;
+  };
+}
diff --git a/pkgs/applications/audio/espeak-ng/mbrola.patch b/pkgs/applications/audio/espeak-ng/mbrola.patch
new file mode 100644
index 00000000000..2f6c61cca4e
--- /dev/null
+++ b/pkgs/applications/audio/espeak-ng/mbrola.patch
@@ -0,0 +1,22 @@
+--- a/src/libespeak-ng/mbrowrap.c
++++ b/src/libespeak-ng/mbrowrap.c
+@@ -205,7 +205,7 @@
+ 		signal(SIGTERM, SIG_IGN);
+ 
+ 		snprintf(charbuf, sizeof(charbuf), "%g", mbr_volume);
+-		execlp("mbrola", "mbrola", "-e", "-v", charbuf,
++		execlp("@mbrola@/bin/mbrola", "mbrola", "-e", "-v", charbuf,
+ 		       voice_path, "-", "-.wav", (char *)NULL);
+ 		/* if execution reaches this point then the exec() failed */
+ 		snprintf(mbr_errorbuf, sizeof(mbr_errorbuf),
+--- a/src/libespeak-ng/synth_mbrola.c
++++ b/src/libespeak-ng/synth_mbrola.c
+@@ -85,7 +85,7 @@
+ 	if (!load_MBR())
+ 		return ENS_MBROLA_NOT_FOUND;
+ 
+-	sprintf(path, "%s/mbrola/%s", path_home, mbrola_voice);
++	sprintf(path, "@mbrola@/share/mbrola/voices/%s/%s", mbrola_voice, mbrola_voice);
+ #ifdef PLATFORM_POSIX
+ 	// if not found, then also look in
+ 	//   usr/share/mbrola/xx, /usr/share/mbrola/xx/xx, /usr/share/mbrola/voices/xx
diff --git a/pkgs/applications/audio/espeak/default.nix b/pkgs/applications/audio/espeak/default.nix
new file mode 100644
index 00000000000..e5579175bbb
--- /dev/null
+++ b/pkgs/applications/audio/espeak/default.nix
@@ -0,0 +1,37 @@
+{ lib, stdenv, fetchurl, unzip, portaudio }:
+
+stdenv.mkDerivation rec {
+  pname = "espeak";
+  version = "1.48.04";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/espeak/espeak-${version}-source.zip";
+    sha256 = "0n86gwh9pw0jqqpdz7mxggllfr8k0r7pc67ayy7w5z6z79kig6mz";
+  };
+
+  nativeBuildInputs = [ unzip ];
+  buildInputs = [ 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 lib; {
+    description = "Compact open source software speech synthesizer";
+    homepage = "http://espeak.sourceforge.net/";
+    license = licenses.gpl3Plus;
+    platforms = platforms.linux;
+  };
+}
diff --git a/pkgs/applications/audio/espeak/edit.nix b/pkgs/applications/audio/espeak/edit.nix
new file mode 100644
index 00000000000..2240a856116
--- /dev/null
+++ b/pkgs/applications/audio/espeak/edit.nix
@@ -0,0 +1,61 @@
+{ lib, stdenv, fetchurl, pkg-config, unzip, portaudio, wxGTK, sox }:
+
+stdenv.mkDerivation rec {
+  pname = "espeakedit";
+  version = "1.48.03";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/espeak/espeakedit-${version}.zip";
+    sha256 = "0x8s7vpb7rw5x37yjzy1f98m4f2csdg89libb74fm36gn8ly0hli";
+  };
+
+  nativeBuildInputs = [ pkg-config unzip ];
+  buildInputs = [ 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
+  '' + 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 lib; {
+    description = "Phoneme editor for espeak";
+    homepage = "http://espeak.sourceforge.net/";
+    license = licenses.gpl3Plus;
+    platforms = platforms.linux;
+  };
+}
diff --git a/pkgs/applications/audio/espeak/espeakedit-configurable-path-espeak-data.patch b/pkgs/applications/audio/espeak/espeakedit-configurable-path-espeak-data.patch
new file mode 100644
index 00000000000..e5c761a11b3
--- /dev/null
+++ b/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/pkgs/applications/audio/espeak/espeakedit-configurable-sox-path.patch b/pkgs/applications/audio/espeak/espeakedit-configurable-sox-path.patch
new file mode 100644
index 00000000000..1c5dfc21941
--- /dev/null
+++ b/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/pkgs/applications/audio/espeak/espeakedit-fix-makefile.patch b/pkgs/applications/audio/espeak/espeakedit-fix-makefile.patch
new file mode 100644
index 00000000000..9f8a65d2b0c
--- /dev/null
+++ b/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/pkgs/applications/audio/espeak/espeakedit-gcc6.patch b/pkgs/applications/audio/espeak/espeakedit-gcc6.patch
new file mode 100644
index 00000000000..1e0cb20bbf7
--- /dev/null
+++ b/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/pkgs/applications/audio/espeak/gcc6.patch b/pkgs/applications/audio/espeak/gcc6.patch
new file mode 100644
index 00000000000..58036ecbe50
--- /dev/null
+++ b/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/pkgs/applications/audio/exaile/default.nix b/pkgs/applications/audio/exaile/default.nix
new file mode 100644
index 00000000000..220a7c4eb3e
--- /dev/null
+++ b/pkgs/applications/audio/exaile/default.nix
@@ -0,0 +1,107 @@
+{ stdenv, lib, fetchFromGitHub
+, gobject-introspection, makeWrapper, wrapGAppsHook
+, gtk3, gst_all_1, python3
+, gettext, gnome, help2man, keybinder3, libnotify, librsvg, streamripper, udisks, webkitgtk
+, iconTheme ? gnome.adwaita-icon-theme
+, deviceDetectionSupport ? true
+, documentationSupport ? true
+, notificationSupport ? true
+, scalableIconSupport ? true
+, translationSupport ? true
+, bpmCounterSupport ? false
+, ipythonSupport ? false
+, lastfmSupport ? false
+, lyricsManiaSupport ? false
+, lyricsWikiSupport ? false
+, multimediaKeySupport ? false
+, musicBrainzSupport ? false
+, podcastSupport ? false
+, streamripperSupport ? false
+, wikipediaSupport ? false
+, fetchpatch
+}:
+
+stdenv.mkDerivation rec {
+  pname = "exaile";
+  version = "4.1.1";
+
+  src = fetchFromGitHub {
+    owner = "exaile";
+    repo = pname;
+    rev = version;
+    sha256 = "0s29lm0i4slgaw5l5s9a2zx0b83xac43rnil5cvyi210dxm5s048";
+  };
+  patches = [
+    (fetchpatch {
+      url = "https://github.com/exaile/exaile/pull/751.patch";
+      sha256 = "sha256-jCJh85Z3HQcyS4ntQP5HwYJgM7WNHcWzjf0BdNJitsM=";
+    })
+  ];
+
+  nativeBuildInputs = [
+    gobject-introspection
+    makeWrapper
+    wrapGAppsHook
+  ] ++ lib.optionals documentationSupport [
+    help2man
+    python3.pkgs.sphinx
+    python3.pkgs.sphinx_rtd_theme
+  ] ++ lib.optional translationSupport gettext;
+
+  buildInputs = [
+    iconTheme
+    gtk3
+  ] ++ (with gst_all_1; [
+    gstreamer
+    gst-plugins-base
+    gst-plugins-good
+  ]) ++ (with python3.pkgs; [
+    bsddb3
+    dbus-python
+    mutagen
+    pygobject3
+    pycairo
+    gst-python
+  ]) ++ lib.optional deviceDetectionSupport udisks
+  ++ lib.optional notificationSupport libnotify
+  ++ lib.optional scalableIconSupport librsvg
+  ++ lib.optional bpmCounterSupport gst_all_1.gst-plugins-bad
+  ++ lib.optional ipythonSupport python3.pkgs.ipython
+  ++ lib.optional lastfmSupport python3.pkgs.pylast
+  ++ lib.optional (lyricsManiaSupport || lyricsWikiSupport) python3.pkgs.lxml
+  ++ lib.optional lyricsWikiSupport python3.pkgs.beautifulsoup4
+  ++ lib.optional multimediaKeySupport keybinder3
+  ++ lib.optional musicBrainzSupport python3.pkgs.musicbrainzngs
+  ++ lib.optional podcastSupport python3.pkgs.feedparser
+  ++ lib.optional wikipediaSupport webkitgtk;
+
+  checkInputs = with python3.pkgs; [
+    mox3
+    pytest
+  ];
+
+  makeFlags = [
+    "PREFIX=${placeholder "out"}"
+  ];
+
+  doCheck = true;
+  preCheck = ''
+    substituteInPlace Makefile --replace "PYTHONPATH=$(shell pwd)" "PYTHONPATH=$PYTHONPATH:$(shell pwd)"
+    export PYTEST="py.test"
+    export XDG_CACHE_HOME=$(mktemp -d)
+  '';
+
+  postInstall = ''
+    wrapProgram $out/bin/exaile \
+      --set PYTHONPATH $PYTHONPATH \
+      ${lib.optionalString streamripperSupport "--prefix PATH : ${lib.makeBinPath [ streamripper ]}"}
+  '';
+
+  meta = with lib; {
+    homepage = "https://www.exaile.org/";
+    description = "A music player with a simple interface and powerful music management capabilities";
+    license = licenses.gpl2Only;
+    maintainers = with maintainers; [ ryneeverett ];
+    platforms = platforms.all;
+  };
+}
diff --git a/pkgs/applications/audio/faust/faust1.nix b/pkgs/applications/audio/faust/faust1.nix
new file mode 100644
index 00000000000..81ce11b9ea1
--- /dev/null
+++ b/pkgs/applications/audio/faust/faust1.nix
@@ -0,0 +1,207 @@
+{ lib, stdenv
+, coreutils
+, fetchurl
+, makeWrapper
+, pkg-config
+}:
+
+with lib.strings;
+
+let
+
+  version = "0.9.90";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/project/faudiostream/faust-${version}.tgz";
+    sha256 = "0d1fqwymyfb73zkmpwv4zk4gsg4ji7qs20mfsr20skmnqx30xvna";
+  };
+
+  meta = with lib; {
+    homepage = "https://faust.grame.fr/";
+    downloadPage = "https://sourceforge.net/projects/faudiostream/files/";
+    license = licenses.gpl2;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ magnetophon pmahoney ];
+  };
+
+  faust = stdenv.mkDerivation {
+    pname = "faust";
+    inherit version;
+
+    inherit src;
+
+    nativeBuildInputs = [ 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 = [ pkg-config 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) // {
+
+      nativeBuildInputs = [ makeWrapper ];
+
+      postFixup = ''
+        for script in "$out"/bin/*; do
+          wrapProgram "$script" --prefix PATH : "${runtimePath}"
+        done
+      '';
+
+    });
+
+in faust
diff --git a/pkgs/applications/audio/faust/faust2.nix b/pkgs/applications/audio/faust/faust2.nix
new file mode 100644
index 00000000000..0309031cf78
--- /dev/null
+++ b/pkgs/applications/audio/faust/faust2.nix
@@ -0,0 +1,229 @@
+{ lib, stdenv
+, coreutils
+, fetchFromGitHub
+, makeWrapper
+, pkg-config
+, cmake
+, llvm
+, emscripten
+, openssl
+, libsndfile
+, libmicrohttpd
+, gnutls
+, libtasn1
+, p11-kit
+, vim
+, which
+}:
+
+with lib.strings;
+
+let
+
+  version = "2.37.3";
+
+  src = fetchFromGitHub {
+    owner = "grame-cncm";
+    repo = "faust";
+    rev = version;
+    sha256 = "sha256-Jzauw8+vBjtbK73Bh4huhX1ql1cWmh80EzEET3x03rc=";
+    fetchSubmodules = true;
+  };
+
+  meta = with lib; {
+    homepage = "https://faust.grame.fr/";
+    downloadPage = "https://github.com/grame-cncm/faust/";
+    license = licenses.gpl2;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ magnetophon pmahoney ];
+  };
+
+  faust = stdenv.mkDerivation {
+
+    pname = "faust";
+    inherit version;
+
+    inherit src;
+
+    nativeBuildInputs = [ makeWrapper pkg-config cmake vim which ];
+    buildInputs = [ llvm emscripten openssl libsndfile libmicrohttpd gnutls libtasn1 p11-kit ];
+
+
+    passthru = {
+      inherit wrap wrapWithBuildEnv;
+    };
+
+
+    preConfigure = ''
+      cd build
+    '';
+
+    cmakeFlags = ''
+      -C ../backends/all.cmake -C  ../targets/all.cmake ..
+    '';
+
+    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 = ''
+      # 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 " 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 = [ pkg-config makeWrapper ];
+
+      propagatedBuildInputs = [ faust ] ++ propagatedBuildInputs;
+
+      libPath = lib.makeLibraryPath propagatedBuildInputs;
+
+      postFixup = ''
+
+        # export parts of the build environment
+        for script in "$out"/bin/*; do
+          # e.g. NIX_CC_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu
+          nix_cc_wrapper_target_host="$(printenv | grep ^NIX_CC_WRAPPER_TARGET_HOST | sed 's/=.*//')"
+
+          # e.g. NIX_BINTOOLS_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu
+          nix_bintools_wrapper_target_host="$(printenv | grep ^NIX_BINTOOLS_WRAPPER_TARGET_HOST | sed 's/=.*//')"
+
+          wrapProgram "$script" \
+            --set FAUSTLDDIR "${faust}/lib" \
+            --set FAUSTLIB "${faust}/share/faust" \
+            --set FAUSTINC "${faust}/include/faust" \
+            --set FAUSTARCH "${faust}/share/faust" \
+            --prefix PATH : "$PATH" \
+            --prefix PKG_CONFIG_PATH : "$PKG_CONFIG_PATH" \
+            --set NIX_CFLAGS_COMPILE "$NIX_CFLAGS_COMPILE" \
+            --set NIX_LDFLAGS "$NIX_LDFLAGS -lpthread" \
+            --set "$nix_cc_wrapper_target_host" "''${!nix_cc_wrapper_target_host}" \
+            --set "$nix_bintools_wrapper_target_host" "''${!nix_bintools_wrapper_target_host}" \
+            --prefix LIBRARY_PATH "$libPath"
+        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) // {
+
+      nativeBuildInputs = [ makeWrapper ];
+
+      postFixup = ''
+        for script in "$out"/bin/*; do
+          wrapProgram "$script" --prefix PATH : "${runtimePath}"
+        done
+      '';
+
+    });
+
+in faust
diff --git a/pkgs/applications/audio/faust/faust2alqt.nix b/pkgs/applications/audio/faust/faust2alqt.nix
new file mode 100644
index 00000000000..111d1c9e557
--- /dev/null
+++ b/pkgs/applications/audio/faust/faust2alqt.nix
@@ -0,0 +1,15 @@
+{ faust
+, alsa-lib
+, qt4
+}:
+
+faust.wrapWithBuildEnv {
+
+  baseName = "faust2alqt";
+
+  propagatedBuildInputs = [
+    alsa-lib
+    qt4
+  ];
+
+}
diff --git a/pkgs/applications/audio/faust/faust2alsa.nix b/pkgs/applications/audio/faust/faust2alsa.nix
new file mode 100644
index 00000000000..bb6121a5d70
--- /dev/null
+++ b/pkgs/applications/audio/faust/faust2alsa.nix
@@ -0,0 +1,29 @@
+{ faust
+, alsa-lib
+, atk
+, cairo
+, fontconfig
+, freetype
+, gdk-pixbuf
+, glib
+, gtk2
+, pango
+}:
+
+faust.wrapWithBuildEnv {
+
+  baseName = "faust2alsa";
+
+  propagatedBuildInputs = [
+    alsa-lib
+    atk
+    cairo
+    fontconfig
+    freetype
+    gdk-pixbuf
+    glib
+    gtk2
+    pango
+  ];
+
+}
diff --git a/pkgs/applications/audio/faust/faust2csound.nix b/pkgs/applications/audio/faust/faust2csound.nix
new file mode 100644
index 00000000000..eb5e5831cdd
--- /dev/null
+++ b/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/pkgs/applications/audio/faust/faust2firefox.nix b/pkgs/applications/audio/faust/faust2firefox.nix
new file mode 100644
index 00000000000..c718aa06806
--- /dev/null
+++ b/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/pkgs/applications/audio/faust/faust2jack.nix b/pkgs/applications/audio/faust/faust2jack.nix
new file mode 100644
index 00000000000..bd213bfcadb
--- /dev/null
+++ b/pkgs/applications/audio/faust/faust2jack.nix
@@ -0,0 +1,28 @@
+{ faust
+, gtk2
+, jack2
+, alsa-lib
+, opencv
+, libsndfile
+, which
+}:
+
+faust.wrapWithBuildEnv {
+
+  baseName = "faust2jack";
+
+  scripts = [
+    "faust2jack"
+    "faust2jackconsole"
+  ];
+
+  propagatedBuildInputs = [
+    gtk2
+    jack2
+    alsa-lib
+    opencv
+    libsndfile
+    which
+  ];
+
+}
diff --git a/pkgs/applications/audio/faust/faust2jackrust.nix b/pkgs/applications/audio/faust/faust2jackrust.nix
new file mode 100644
index 00000000000..a93251c8d2d
--- /dev/null
+++ b/pkgs/applications/audio/faust/faust2jackrust.nix
@@ -0,0 +1,17 @@
+{ faust
+, libjack2
+, cargo
+, binutils
+, gcc
+, gnumake
+, openssl
+, pkg-config
+
+}:
+
+faust.wrapWithBuildEnv {
+
+  baseName = "faust2jackrust";
+
+  propagatedBuildInputs = [ libjack2 cargo binutils gcc gnumake openssl pkg-config ];
+}
diff --git a/pkgs/applications/audio/faust/faust2jaqt.nix b/pkgs/applications/audio/faust/faust2jaqt.nix
new file mode 100644
index 00000000000..6bebd97ddd2
--- /dev/null
+++ b/pkgs/applications/audio/faust/faust2jaqt.nix
@@ -0,0 +1,26 @@
+{ faust
+, jack2
+, qt4
+, libsndfile
+, alsa-lib
+, which
+}:
+
+faust.wrapWithBuildEnv {
+
+  baseName = "faust2jaqt";
+
+  scripts = [
+    "faust2jaqt"
+    "faust2jackserver"
+  ];
+
+  propagatedBuildInputs = [
+    jack2
+    qt4
+    libsndfile
+    alsa-lib
+    which
+  ];
+
+}
diff --git a/pkgs/applications/audio/faust/faust2ladspa.nix b/pkgs/applications/audio/faust/faust2ladspa.nix
new file mode 100644
index 00000000000..67de98cab9a
--- /dev/null
+++ b/pkgs/applications/audio/faust/faust2ladspa.nix
@@ -0,0 +1,12 @@
+{ boost
+, faust
+, ladspaH
+}:
+
+faust.wrapWithBuildEnv {
+
+  baseName = "faust2ladspa";
+
+  propagatedBuildInputs = [ boost ladspaH ];
+
+}
diff --git a/pkgs/applications/audio/faust/faust2lv2.nix b/pkgs/applications/audio/faust/faust2lv2.nix
new file mode 100644
index 00000000000..51d956b1403
--- /dev/null
+++ b/pkgs/applications/audio/faust/faust2lv2.nix
@@ -0,0 +1,15 @@
+{ boost
+, faust
+, lv2
+, qt4
+, which
+
+}:
+
+faust.wrapWithBuildEnv {
+
+  baseName = "faust2lv2";
+
+  propagatedBuildInputs = [ boost lv2 qt4 which ];
+
+}
diff --git a/pkgs/applications/audio/faust/faustlive.nix b/pkgs/applications/audio/faust/faustlive.nix
new file mode 100644
index 00000000000..46d63c84314
--- /dev/null
+++ b/pkgs/applications/audio/faust/faustlive.nix
@@ -0,0 +1,46 @@
+{ lib, stdenv, fetchFromGitHub
+, llvm_10, qt5, qrencode, libmicrohttpd, libjack2, alsa-lib, faust, curl
+, bc, coreutils, which, libsndfile, pkg-config, libxcb
+}:
+
+stdenv.mkDerivation rec {
+  pname = "faustlive";
+  version = "2.5.5";
+  src = fetchFromGitHub {
+    owner = "grame-cncm";
+    repo = "faustlive";
+    rev = version;
+    sha256 = "0qbn05nq170ckycwalkk5fppklc4g457mapr7p7ryrhc1hwzffm9";
+    fetchSubmodules = true;
+  };
+
+  nativeBuildInputs = [ pkg-config qt5.wrapQtAppsHook ];
+
+  buildInputs = [
+    llvm_10 qt5.qtbase qrencode libmicrohttpd libjack2 alsa-lib faust curl
+    bc coreutils which libsndfile libxcb
+  ];
+
+  makeFlags = [ "PREFIX=$(out)" ];
+
+  postPatch = "cd Build";
+
+  installPhase = ''
+    install -d "$out/bin"
+    install -d "$out/share/applications"
+    install FaustLive/FaustLive "$out/bin"
+    install rsrc/FaustLive.desktop "$out/share/applications"
+  '';
+
+  meta = with 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 = "https://faust.grame.fr/";
+    license = licenses.gpl3;
+    maintainers = with maintainers; [ magnetophon ];
+  };
+}
diff --git a/pkgs/applications/audio/faustPhysicalModeling/default.nix b/pkgs/applications/audio/faustPhysicalModeling/default.nix
new file mode 100644
index 00000000000..f9dbd3f80f0
--- /dev/null
+++ b/pkgs/applications/audio/faustPhysicalModeling/default.nix
@@ -0,0 +1,39 @@
+{ stdenv, lib, fetchFromGitHub, faust2jaqt, faust2lv2 }:
+stdenv.mkDerivation rec {
+  pname = "faustPhysicalModeling";
+  version = "2.37.3";
+
+  src = fetchFromGitHub {
+    owner = "grame-cncm";
+    repo = "faust";
+    rev = version;
+    sha256 = "sha256-h6L+qRkN2chnI4821WrjD3uRFw3J0sUYVLL8w57vR1U=";
+  };
+
+  buildInputs = [ faust2jaqt faust2lv2 ];
+
+  buildPhase = ''
+    cd examples/physicalModeling
+
+    for f in *MIDI.dsp; do
+      faust2jaqt -time -vec -double -midi -nvoices 16 -t 99999 $f
+      faust2lv2  -time -vec -double -gui -nvoices 16 -t 99999 $f
+    done
+  '';
+
+  installPhase = ''
+    mkdir -p $out/lib/lv2 $out/bin
+    mv *.lv2/ $out/lib/lv2
+    for f in $(find . -executable -type f); do
+      cp $f $out/bin/
+    done
+  '';
+
+  meta = with lib; {
+    description = "The physical models included with faust compiled as jack standalone and lv2 instruments";
+    homepage = "https://github.com/grame-cncm/faust/tree/master-dev/examples/physicalModeling";
+    license = licenses.mit;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ magnetophon ];
+  };
+}
diff --git a/pkgs/applications/audio/faustStk/default.nix b/pkgs/applications/audio/faustStk/default.nix
new file mode 100644
index 00000000000..85ebb1d9a02
--- /dev/null
+++ b/pkgs/applications/audio/faustStk/default.nix
@@ -0,0 +1,39 @@
+{ stdenv, lib, fetchFromGitHub, faust2jaqt, faust2lv2 }:
+
+stdenv.mkDerivation rec {
+  pname = "faustPhhysicalModeling";
+  version = "2.20.2";
+
+  src = fetchFromGitHub {
+    owner = "grame-cncm";
+    repo = "faust";
+    rev = version;
+    sha256 = "1mm93ba26b7q69hvabzalg30dh8pl858nj4m2bb57pznnp09lq9a";
+  };
+
+  buildInputs = [ faust2jaqt faust2lv2 ];
+
+  buildPhase = ''
+    cd examples/physicalModeling/faust-stk
+
+    for f in *.dsp; do
+      faust2jaqt -time -vec  -midi -nvoices 8 -t 99999 $f
+      faust2lv2  -time -vec -double -gui -nvoices 32 -t 99999 $f
+    done
+  '';
+
+  installPhase = ''
+    mkdir -p $out/lib/lv2 $out/bin
+    mv *.lv2/ $out/lib/lv2
+    for f in $(find . -executable -type f); do
+      cp $f $out/bin/
+    done
+  '';
+  meta = with lib; {
+    description = "The physical modeling instruments included with faust, compiled as jack standalone and lv2 instruments";
+    homepage = "https://ccrma.stanford.edu/~rmichon/faustSTK/";
+    license = licenses.stk;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ magnetophon ];
+  };
+}
diff --git a/pkgs/applications/audio/fdkaac/default.nix b/pkgs/applications/audio/fdkaac/default.nix
new file mode 100644
index 00000000000..fd6726e9ac2
--- /dev/null
+++ b/pkgs/applications/audio/fdkaac/default.nix
@@ -0,0 +1,31 @@
+{ lib, stdenv, autoreconfHook, fetchFromGitHub, fdk_aac }:
+
+stdenv.mkDerivation rec {
+  pname = "fdkaac";
+  version = "1.0.2";
+
+  src = fetchFromGitHub {
+    owner = "nu774";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "tHhICq/FzbkvWkDdNzGqGoo7nIDb+DJXmkFwtPIA89c=";
+  };
+
+  nativeBuildInputs = [ autoreconfHook ];
+
+  buildInputs = [ fdk_aac ];
+
+  doCheck = true;
+
+  meta = with lib; {
+    description = "Command line encoder frontend for libfdk-aac encoder";
+    longDescription = ''
+      fdkaac reads linear PCM audio in either WAV, raw PCM, or CAF format,
+      and encodes it into either M4A / AAC file.
+    '';
+    homepage = "https://github.com/nu774/fdkaac";
+    license = licenses.zlib;
+    platforms = platforms.all;
+    maintainers = [ maintainers.lunik1 ];
+  };
+}
diff --git a/pkgs/applications/audio/flac/default.nix b/pkgs/applications/audio/flac/default.nix
new file mode 100644
index 00000000000..0b1a2edc3ba
--- /dev/null
+++ b/pkgs/applications/audio/flac/default.nix
@@ -0,0 +1,32 @@
+{ lib, stdenv, fetchurl, fetchpatch, libogg }:
+
+stdenv.mkDerivation rec {
+  pname = "flac";
+  version = "1.3.3";
+
+  src = fetchurl {
+    url = "http://downloads.xiph.org/releases/flac/${pname}-${version}.tar.xz";
+    sha256 = "0j0p9sf56a2fm2hkjnf7x3py5ir49jyavg4q5zdyd7bcf6yq4gi1";
+  };
+
+  patches = [
+    (fetchpatch {
+      name = "CVE-2020-0499.patch";
+      url = "https://github.com/xiph/flac/commit/2e7931c27eb15e387da440a37f12437e35b22dd4.patch";
+      sha256 = "160qzq9ms5addz7sx06pnyjjkqrffr54r4wd8735vy4x008z71ah";
+    })
+  ];
+
+  buildInputs = [ libogg ];
+
+  #doCheck = true; # takes lots of time
+
+  outputs = [ "bin" "dev" "out" "man" "doc" ];
+
+  meta = with 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/pkgs/applications/audio/flac123/default.nix b/pkgs/applications/audio/flac123/default.nix
new file mode 100644
index 00000000000..09c7b44d92d
--- /dev/null
+++ b/pkgs/applications/audio/flac123/default.nix
@@ -0,0 +1,21 @@
+{ lib, stdenv, fetchurl, autoreconfHook, flac, libao, libogg, popt }:
+
+stdenv.mkDerivation rec {
+  pname = "flac123";
+  version = "0.0.12";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/flac-tools/${pname}-${version}-release.tar.gz";
+    sha256 = "0zg4ahkg7v81za518x32wldf42g0rrvlrcqhrg9sv3li9bayyxhr";
+  };
+
+  nativeBuildInputs = [ autoreconfHook ];
+  buildInputs = [ flac libao libogg popt ];
+
+  meta = with 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/pkgs/applications/audio/flacon/default.nix b/pkgs/applications/audio/flacon/default.nix
new file mode 100644
index 00000000000..83d9c5da838
--- /dev/null
+++ b/pkgs/applications/audio/flacon/default.nix
@@ -0,0 +1,44 @@
+{ stdenv, lib, fetchFromGitHub, cmake, libuchardet, pkg-config, shntool, flac
+, opusTools, vorbis-tools, mp3gain, lame, wavpack, vorbisgain, gtk3, qtbase
+, qttools, wrapQtAppsHook }:
+
+stdenv.mkDerivation rec {
+  pname = "flacon";
+  version = "7.0.1";
+
+  src = fetchFromGitHub {
+    owner = "flacon";
+    repo = "flacon";
+    rev = "v${version}";
+    sha256 = "sha256-35tARJkyhC8EisIyDCwuT/UUruzLjJRUuZysuqeNssM=";
+  };
+
+  nativeBuildInputs = [ cmake pkg-config wrapQtAppsHook ];
+  buildInputs = [ qtbase qttools libuchardet ];
+
+  bin_path = lib.makeBinPath [
+    shntool
+    flac
+    opusTools
+    vorbis-tools
+    mp3gain
+    lame
+    wavpack
+    vorbisgain
+  ];
+
+  postInstall = ''
+    wrapProgram $out/bin/flacon \
+      --suffix XDG_DATA_DIRS : "${gtk3}/share/gsettings-schemas/${gtk3.name}" \
+      --prefix PATH : "$bin_path";
+  '';
+
+  meta = with 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; [ snglth ];
+  };
+}
diff --git a/pkgs/applications/audio/fluidsynth/default.nix b/pkgs/applications/audio/fluidsynth/default.nix
new file mode 100644
index 00000000000..ad57b6a690f
--- /dev/null
+++ b/pkgs/applications/audio/fluidsynth/default.nix
@@ -0,0 +1,32 @@
+{ stdenv, lib, fetchFromGitHub, buildPackages, pkg-config, cmake
+, alsa-lib, glib, libjack2, libsndfile, libpulseaudio
+, AudioUnit, CoreAudio, CoreMIDI, CoreServices
+}:
+
+stdenv.mkDerivation rec {
+  pname = "fluidsynth";
+  version = "2.2.3";
+
+  src = fetchFromGitHub {
+    owner = "FluidSynth";
+    repo = "fluidsynth";
+    rev = "v${version}";
+    sha256 = "0x5808d03ym23np17nl8gfbkx3c4y3d7jyyr2222wn2prswbb6x3";
+  };
+
+  nativeBuildInputs = [ buildPackages.stdenv.cc pkg-config cmake ];
+
+  buildInputs = [ glib libsndfile libpulseaudio libjack2 ]
+    ++ lib.optionals stdenv.isLinux [ alsa-lib ]
+    ++ lib.optionals stdenv.isDarwin [ AudioUnit CoreAudio CoreMIDI CoreServices ];
+
+  cmakeFlags = [ "-Denable-framework=off" ];
+
+  meta = with lib; {
+    description = "Real-time software synthesizer based on the SoundFont 2 specifications";
+    homepage    = "https://www.fluidsynth.org";
+    license     = licenses.lgpl21Plus;
+    maintainers = with maintainers; [ goibhniu lovek323 ];
+    platforms   = platforms.unix;
+  };
+}
diff --git a/pkgs/applications/audio/fmit/default.nix b/pkgs/applications/audio/fmit/default.nix
new file mode 100644
index 00000000000..7e376c89d36
--- /dev/null
+++ b/pkgs/applications/audio/fmit/default.nix
@@ -0,0 +1,51 @@
+{ lib, mkDerivation, fetchFromGitHub, fftw, qtbase, qtmultimedia, qmake, itstool, wrapQtAppsHook
+, alsaSupport ? true, alsa-lib ? null
+, jackSupport ? false, libjack2 ? null
+, portaudioSupport ? false, portaudio ? null }:
+
+assert alsaSupport -> alsa-lib != null;
+assert jackSupport -> libjack2 != null;
+assert portaudioSupport -> portaudio != null;
+
+with lib;
+
+mkDerivation rec {
+  pname = "fmit";
+  version = "1.2.14";
+
+  src = fetchFromGitHub {
+    owner = "gillesdegottex";
+    repo = "fmit";
+    rev = "v${version}";
+    sha256 = "1q062pfwz2vr9hbfn29fv54ip3jqfd9r99nhpr8w7mn1csy38azx";
+  };
+
+  nativeBuildInputs = [ qmake itstool wrapQtAppsHook ];
+  buildInputs = [ fftw qtbase qtmultimedia ]
+    ++ optionals alsaSupport [ alsa-lib ]
+    ++ 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"
+  '';
+
+  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/pkgs/applications/audio/fmsynth/default.nix b/pkgs/applications/audio/fmsynth/default.nix
new file mode 100644
index 00000000000..57b4bec50ad
--- /dev/null
+++ b/pkgs/applications/audio/fmsynth/default.nix
@@ -0,0 +1,49 @@
+{ lib, stdenv, fetchFromGitHub, gtkmm2, lv2, lvtk, pkg-config }:
+stdenv.mkDerivation {
+  pname = "fmsynth-unstable";
+  version = "2015-02-07";
+  src = fetchFromGitHub {
+    owner = "Themaister";
+    repo = "libfmsynth";
+    rev = "9ffa1d2fea287f1209b210d2dbde2f0f60f37176";
+    sha256 = "1bk0bpr069hzx2508rgfbwpxiqgr7dmdkhqdywmd2i4rmibgrm1q";
+  };
+
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = [ gtkmm2 lv2 lvtk ];
+
+  buildPhase = ''
+    cd lv2
+    substituteInPlace GNUmakefile --replace "/usr/lib/lv2" "$out/lib/lv2"
+    make  SIMD=0
+  '';
+
+  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 = lib.licenses.mit;
+    maintainers = [ lib.maintainers.magnetophon ];
+    platforms = lib.platforms.linux;
+  };
+}
diff --git a/pkgs/applications/audio/fomp/default.nix b/pkgs/applications/audio/fomp/default.nix
new file mode 100644
index 00000000000..8dc86cb8ccf
--- /dev/null
+++ b/pkgs/applications/audio/fomp/default.nix
@@ -0,0 +1,22 @@
+{ lib, stdenv, fetchurl, lv2, pkg-config, python3, wafHook }:
+
+stdenv.mkDerivation rec {
+  pname = "fomp";
+  version = "1.2.2";
+
+  src = fetchurl {
+    url = "https://download.drobilla.net/${pname}-${version}.tar.bz2";
+    sha256 = "sha256-xnGijydiO3B7BjSlryFuH1j/OPio9hCYbniq2IXp2W8=";
+  };
+
+  nativeBuildInputs = [ pkg-config wafHook ];
+  buildInputs = [ lv2 python3 ];
+
+  meta = with lib; {
+    homepage = "https://drobilla.net/software/fomp.html";
+    description = "An LV2 port of the MCP, VCO, FIL, and WAH plugins by Fons Adriaensen";
+    license = licenses.gpl2Plus;
+    maintainers = [ maintainers.magnetophon ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/pkgs/applications/audio/foo-yc20/default.nix b/pkgs/applications/audio/foo-yc20/default.nix
new file mode 100644
index 00000000000..abb13b021c0
--- /dev/null
+++ b/pkgs/applications/audio/foo-yc20/default.nix
@@ -0,0 +1,29 @@
+{ lib, stdenv, fetchFromGitHub, libjack2, gtk2, lv2, faust, pkg-config }:
+
+stdenv.mkDerivation {
+  version = "unstable-2015-05-21";
+  pname = "foo-yc20";
+  src = fetchFromGitHub {
+    owner = "sampov2";
+    repo = "foo-yc20";
+    rev = "edd9d14c91229429b14270a181743e1046160ca8";
+    sha256 = "0i8261n95n4xic766h70xkrpbvw3sag96n1883ahmg6h7yb94avq";
+  };
+
+  nativeBuildInputs = [ pkg-config ];
+  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 = with lib; {
+    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 = with licenses; [ bsd3 lgpl21 mpl11 ];
+    maintainers = [ maintainers.magnetophon ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/pkgs/applications/audio/freac/default.nix b/pkgs/applications/audio/freac/default.nix
new file mode 100644
index 00000000000..ef4a6bc21af
--- /dev/null
+++ b/pkgs/applications/audio/freac/default.nix
@@ -0,0 +1,38 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+
+, boca
+, smooth
+, systemd
+}:
+
+stdenv.mkDerivation rec {
+  pname = "freac";
+  version = "1.1.6";
+
+  src = fetchFromGitHub {
+    owner = "enzo1982";
+    repo = "freac";
+    rev = "v${version}";
+    sha256 = "sha256-PDFc/RhxIe6M3lfVHE1QmJnu5Sy+q/yrXrXPV/8X51o=";
+  };
+
+  buildInputs = [
+    boca
+    smooth
+    systemd
+  ];
+
+  makeFlags = [
+    "prefix=$(out)"
+  ];
+
+  meta = with lib; {
+    description = "The fre:ac audio converter project";
+    license = licenses.gpl2Plus;
+    homepage = "https://www.freac.org/";
+    maintainers = with maintainers; [ shamilton ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/pkgs/applications/audio/freewheeling/default.nix b/pkgs/applications/audio/freewheeling/default.nix
new file mode 100644
index 00000000000..b7afb0d57a0
--- /dev/null
+++ b/pkgs/applications/audio/freewheeling/default.nix
@@ -0,0 +1,52 @@
+{ lib, stdenv, fetchFromGitHub, pkg-config, autoreconfHook, gnutls, freetype, fluidsynth
+, SDL, SDL_gfx, SDL_ttf, liblo, libxml2, alsa-lib, libjack2, libvorbis
+, libSM, libsndfile, libogg, libtool
+}:
+let
+  makeSDLFlags = map (p: "-I${lib.getDev p}/include/SDL");
+in
+
+stdenv.mkDerivation rec {
+  pname = "freewheeling";
+  version = "0.6.6";
+
+  src = fetchFromGitHub {
+    owner = "free-wheeling";
+    repo = "freewheeling";
+    rev = "v${version}";
+    sha256 = "1xff5whr02cixihgd257dc70hnyf22j3zamvhsvg4lp7zq9l2in4";
+  };
+
+  nativeBuildInputs = [ pkg-config autoreconfHook libtool ];
+  buildInputs = [
+    freetype fluidsynth SDL SDL_gfx SDL_ttf
+    liblo libxml2 libjack2 alsa-lib libvorbis libsndfile libogg libSM
+    (gnutls.overrideAttrs (oldAttrs: {
+      configureFlags = oldAttrs.configureFlags ++ [ "--enable-openssl-compatibility" ];
+    }))
+  ];
+  NIX_CFLAGS_COMPILE = toString
+    (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 = lib.licenses.gpl2;
+    maintainers = [ lib.maintainers.sepi ];
+    platforms = lib.platforms.linux;
+  };
+}
diff --git a/pkgs/applications/audio/freqtweak/default.nix b/pkgs/applications/audio/freqtweak/default.nix
new file mode 100644
index 00000000000..71bb0f6f05c
--- /dev/null
+++ b/pkgs/applications/audio/freqtweak/default.nix
@@ -0,0 +1,30 @@
+{ lib, stdenv, fetchFromGitHub, autoconf, automake, pkg-config, fftwFloat, libjack2, libsigcxx, libxml2, wxGTK }:
+
+stdenv.mkDerivation rec {
+  pname = "freqtweak";
+  version = "unstable-2019-08-03";
+
+  src = fetchFromGitHub {
+    owner = "essej";
+    repo = pname;
+    rev = "d4205337558d36657a4ee6b3afb29358aa18c0fd";
+    sha256 = "10cq27mdgrrc54a40al9ahi0wqd0p2c1wxbdg518q8pzfxaxs5fi";
+  };
+
+  nativeBuildInputs = [ autoconf automake pkg-config ];
+  buildInputs = [ fftwFloat libjack2 libsigcxx libxml2 wxGTK ];
+
+  preConfigure = ''
+    sh autogen.sh
+  '';
+
+  enableParallelBuilding = true;
+
+  meta = with lib; {
+    homepage = "http://essej.net/freqtweak/";
+    description = "Realtime audio frequency spectral manipulation";
+    maintainers = [ maintainers.magnetophon ];
+    platforms = platforms.linux;
+    license = licenses.gpl2Plus;
+  };
+}
diff --git a/pkgs/applications/audio/friture/default.nix b/pkgs/applications/audio/friture/default.nix
new file mode 100644
index 00000000000..7918ea17891
--- /dev/null
+++ b/pkgs/applications/audio/friture/default.nix
@@ -0,0 +1,68 @@
+{ lib, fetchFromGitHub, fetchpatch, python3Packages, wrapQtAppsHook }:
+
+let
+  py = python3Packages;
+in py.buildPythonApplication rec {
+  pname = "friture";
+  version = "0.48";
+
+  src = fetchFromGitHub {
+    owner = "tlecomte";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "sha256-oOH58jD49xAeSuP+l6tYUpwkYsnfeSGTt8x4DFzTY6g=";
+  };
+
+  nativeBuildInputs = (with py; [ numpy cython scipy ]) ++
+    [ wrapQtAppsHook ];
+
+  propagatedBuildInputs = with py; [
+    sounddevice
+    pyopengl
+    pyopengl-accelerate
+    docutils
+    numpy
+    pyqt5
+    appdirs
+    pyrr
+    rtmixer
+  ];
+
+  patches = [
+    # Backported fix that resolves an issue with setuptools packaging
+    (fetchpatch {
+      name = "fix-setuptools-packaging.patch";
+      url = "https://github.com/tlecomte/friture/commit/ea7210dae883edf17de8fec82f9428b18ee138b6.diff";
+      sha256 = "sha256-Kv/vmC8kcqfOgfIPQyZN46sbV6bezhq6pyj8bvke6s8=";
+    })
+  ];
+
+  postPatch = ''
+    # Remove version constraints from Python dependencies in setup.py
+    sed -i -E "s/\"([A-Za-z0-9]+)(=|>|<)=[0-9\.]+\"/\"\1\"/g" setup.py
+  '';
+
+  preFixup = ''
+    makeWrapperArgs+=("''${qtWrapperArgs[@]}")
+  '';
+
+  postInstall = ''
+    substituteInPlace $out/share/applications/friture.desktop --replace usr/bin/friture friture
+
+    for size in 16 32 128 256 512
+    do
+      mkdir -p $out/share/icons/hicolor/$size\x$size
+      cp $src/resources/images/friture.iconset/icon_$size\x$size.png $out/share/icons/hicolor/$size\x$size/friture.png
+    done
+    mkdir -p $out/share/icons/hicolor/scalable/apps/
+    cp $src/resources/images-src/window-icon.svg $out/share/icons/hicolor/scalable/apps/friture.svg
+  '';
+
+  meta = with lib; {
+    description = "A real-time audio analyzer";
+    homepage = "https://friture.org/";
+    license = licenses.gpl3;
+    platforms = platforms.linux; # fails on Darwin
+    maintainers = with maintainers; [ laikq alyaeanyx ];
+  };
+}
diff --git a/pkgs/applications/audio/ft2-clone/default.nix b/pkgs/applications/audio/ft2-clone/default.nix
new file mode 100644
index 00000000000..7e0fcf2717e
--- /dev/null
+++ b/pkgs/applications/audio/ft2-clone/default.nix
@@ -0,0 +1,62 @@
+{ lib, stdenv
+, fetchFromGitHub
+, cmake
+, nixosTests
+, alsa-lib
+, SDL2
+, libiconv
+, CoreAudio
+, CoreMIDI
+, CoreServices
+, Cocoa
+}:
+
+stdenv.mkDerivation rec {
+  pname = "ft2-clone";
+  version = "1.52";
+
+  src = fetchFromGitHub {
+    owner = "8bitbubsy";
+    repo = "ft2-clone";
+    rev = "v${version}";
+    sha256 = "sha256-RyZ3PV7jaTN3DEYMT0BqKDHbb+7/IgiRaCra1xA0h1A=";
+  };
+
+  # Adapt the linux-only CMakeLists to darwin (more reliable than make-macos.sh)
+  postPatch = lib.optionalString stdenv.isDarwin ''
+    sed -i -e 's@__LINUX_ALSA__@__MACOSX_CORE__@' -e 's@asound@@' CMakeLists.txt
+  '';
+
+  nativeBuildInputs = [ cmake ];
+  buildInputs = [ SDL2 ]
+    ++ lib.optional stdenv.isLinux alsa-lib
+    ++ lib.optionals stdenv.isDarwin [
+         libiconv
+         CoreAudio
+         CoreMIDI
+         CoreServices
+         Cocoa
+       ];
+
+  NIX_LDFLAGS = lib.optionalString stdenv.isDarwin [
+    "-framework CoreAudio"
+    "-framework CoreMIDI"
+    "-framework CoreServices"
+    "-framework Cocoa"
+  ];
+
+  passthru.tests = {
+    ft2-clone-starts = nixosTests.ft2-clone;
+  };
+
+  meta = with lib; {
+    description = "A highly accurate clone of the classic Fasttracker II software for MS-DOS";
+    homepage = "https://16-bits.org/ft2.php";
+    license = licenses.bsd3;
+    maintainers = with maintainers; [ fgaz ];
+    # From HOW-TO-COMPILE.txt:
+    # > This code is NOT big-endian compatible
+    platforms = platforms.littleEndian;
+  };
+}
+
diff --git a/pkgs/applications/audio/furnace/default.nix b/pkgs/applications/audio/furnace/default.nix
new file mode 100644
index 00000000000..841a65e541f
--- /dev/null
+++ b/pkgs/applications/audio/furnace/default.nix
@@ -0,0 +1,100 @@
+{ stdenv
+, lib
+, gitUpdater
+, testVersion
+, furnace
+, fetchFromGitHub
+, cmake
+, pkg-config
+, makeWrapper
+, fmt_8
+, libsndfile
+, SDL2
+, zlib
+, withJACK ? stdenv.hostPlatform.isUnix
+, libjack2
+, withGUI ? true
+, Cocoa
+}:
+
+stdenv.mkDerivation rec {
+  pname = "furnace";
+  version = "0.5.8";
+
+  src = fetchFromGitHub {
+    owner = "tildearrow";
+    repo = "furnace";
+    rev = "v${version}";
+    fetchSubmodules = true;
+    sha256 = "103ymd3wa1sfsr6qg15vpcs53j350i7zidv3azlf7cynk6k28xim";
+  };
+
+  postPatch = ''
+    # rtmidi is not used yet
+    sed -i -e '/add_subdirectory(extern\/rtmidi/d' -e '/DEPENDENCIES_LIBRARIES rtmidi/d' CMakeLists.txt
+  '';
+
+  nativeBuildInputs = [
+    cmake
+    pkg-config
+  ] ++ lib.optionals stdenv.hostPlatform.isDarwin [
+    makeWrapper
+  ];
+
+  buildInputs = [
+    fmt_8
+    libsndfile
+    SDL2
+    zlib
+  ] ++ lib.optionals withJACK [
+    libjack2
+  ] ++ lib.optionals stdenv.hostPlatform.isDarwin [
+    Cocoa
+  ];
+
+  cmakeFlags = [
+    "-DBUILD_GUI=${if withGUI then "ON" else "OFF"}"
+    "-DSYSTEM_FMT=ON"
+    "-DSYSTEM_LIBSNDFILE=ON"
+    "-DSYSTEM_ZLIB=ON"
+    "-DSYSTEM_SDL2=ON"
+    "-DWITH_JACK=${if withJACK then "ON" else "OFF"}"
+    "-DWARNINGS_ARE_ERRORS=ON"
+  ];
+
+  postInstall = lib.optionalString stdenv.hostPlatform.isDarwin ''
+    # Normal CMake install phase on Darwin only installs the binary, the user is expected to use CPack to build a
+    # bundle. That adds alot of overhead for not much benefit (CPack is currently abit broken, and needs impure access
+    # to /usr/bin/hdiutil). So we'll manually assemble & install everything instead.
+
+    mkdir -p $out/{Applications/Furnace.app/Contents/{MacOS,Resources},share/{,doc,licenses}/furnace}
+    mv $out/{bin,Applications/Furnace.app/Contents/MacOS}/furnace
+    makeWrapper $out/{Applications/Furnace.app/Contents/MacOS,bin}/furnace
+
+    install -m644 {../res,$out/Applications/Furnace.app/Contents}/Info.plist
+    install -m644 ../res/icon.icns $out/Applications/Furnace.app/Contents/Resources/Furnace.icns
+    install -m644 {..,$out/share/licenses/furnace}/LICENSE
+    cp -r ../papers $out/share/doc/furnace/
+    cp -r ../demos $out/share/furnace/
+  '';
+
+  passthru = {
+    updateScript = gitUpdater {
+      inherit pname version;
+      rev-prefix = "v";
+    };
+    tests.version = testVersion {
+      package = furnace;
+      # The command always exits with code 1
+      command = "(furnace --version || [ $? -eq 1 ])";
+    };
+  };
+
+  meta = with lib; {
+    description = "Multi-system chiptune tracker compatible with DefleMask modules";
+    homepage = "https://github.com/tildearrow/furnace";
+    license = with licenses; [ gpl2Plus ];
+    maintainers = with maintainers; [ OPNA2608 ];
+    platforms = platforms.all;
+  };
+}
diff --git a/pkgs/applications/audio/fverb/default.nix b/pkgs/applications/audio/fverb/default.nix
new file mode 100644
index 00000000000..2cd723b73bc
--- /dev/null
+++ b/pkgs/applications/audio/fverb/default.nix
@@ -0,0 +1,34 @@
+{ lib, stdenv
+, fetchFromGitHub
+, pkg-config
+}:
+
+stdenv.mkDerivation rec {
+  pname = "fverb";
+  # no release yet: https://github.com/jpcima/fverb/issues/2
+  version = "unstable-2020-06-09";
+
+  src = fetchFromGitHub {
+    owner = "jpcima";
+    repo = pname;
+    rev = "462020e33e24c0204a375dc95e2c28654cc917b8";
+    sha256 = "12nl7qn7mnykk7v8q0j2n8kfq0xc46n0i45z6qcywspadwnncmd4";
+    fetchSubmodules = true;
+  };
+
+  nativeBuildInputs = [ pkg-config ];
+
+  makeFlags = [ "PREFIX=${placeholder "out"}" ];
+
+  postPatch = ''
+    patchShebangs ./dpf/utils/generate-ttl.sh
+  '';
+
+  meta = with lib; {
+    description = "A stereo variant of the reverberator by Jon Dattorro, for lv2";
+    homepage = "https://github.com/jpcima/fverb";
+    license = licenses.bsd2;
+    maintainers = [ maintainers.magnetophon ];
+    platforms   = platforms.unix;
+  };
+}
diff --git a/pkgs/applications/audio/game-music-emu/default.nix b/pkgs/applications/audio/game-music-emu/default.nix
new file mode 100644
index 00000000000..55f12fd3c64
--- /dev/null
+++ b/pkgs/applications/audio/game-music-emu/default.nix
@@ -0,0 +1,21 @@
+{ lib, stdenv, fetchurl, cmake }:
+
+stdenv.mkDerivation rec {
+  version = "0.6.3";
+  pname = "game-music-emu";
+
+  src = fetchurl {
+    url = "https://bitbucket.org/mpyne/game-music-emu/downloads/${pname}-${version}.tar.xz";
+    sha256 = "07857vdkak306d9s5g6fhmjyxk7vijzjhkmqb15s7ihfxx9lx8xb";
+  };
+  cmakeFlags = lib.optionals stdenv.isDarwin [ "-DENABLE_UBSAN=OFF" ];
+  nativeBuildInputs = [ cmake ];
+
+  meta = with 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 = with maintainers; [ luc65r ];
+  };
+}
diff --git a/pkgs/applications/audio/gbsplay/default.nix b/pkgs/applications/audio/gbsplay/default.nix
new file mode 100644
index 00000000000..3d280ca72ab
--- /dev/null
+++ b/pkgs/applications/audio/gbsplay/default.nix
@@ -0,0 +1,32 @@
+{ lib, stdenv, fetchFromGitHub, installShellFiles, libpulseaudio, nas }:
+
+stdenv.mkDerivation rec {
+  pname = "gbsplay";
+  version = "0.0.94";
+
+  src = fetchFromGitHub {
+    owner = "mmitch";
+    repo = "gbsplay";
+    rev = version;
+    sha256 = "VpaXbjotmc/Ref1geiKkBX9UhbPxfAGkFAdKVxP8Uxo=";
+  };
+
+  configureFlags = [
+    "--without-test" # See mmitch/gbsplay#62
+    "--without-contrib"
+  ];
+
+  nativeBuildInputs = [ installShellFiles ];
+  buildInputs = [ libpulseaudio nas ];
+
+  postInstall = ''
+    installShellCompletion --bash --name gbsplay contrib/gbsplay.bashcompletion
+  '';
+
+  meta = with lib; {
+    description = "Gameboy sound player";
+    license = licenses.gpl1;
+    platforms = [ "i686-linux" "x86_64-linux" ];
+    maintainers = with maintainers; [ dasuxullebt ];
+  };
+}
diff --git a/pkgs/applications/audio/geonkick/default.nix b/pkgs/applications/audio/geonkick/default.nix
new file mode 100644
index 00000000000..9739a88586a
--- /dev/null
+++ b/pkgs/applications/audio/geonkick/default.nix
@@ -0,0 +1,31 @@
+{ lib, stdenv, fetchFromGitLab, cmake, pkg-config, libsndfile, rapidjson
+, libjack2, lv2, libX11, cairo }:
+
+stdenv.mkDerivation rec {
+  pname = "geonkick";
+  version = "2.9.0";
+
+  src = fetchFromGitLab {
+    owner = "iurie-sw";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "sha256-/BDK1PyRw4xOt+rzC9yX29aRQb1aDnDBIenSz+859OY=";
+  };
+
+  nativeBuildInputs = [ cmake pkg-config ];
+
+  buildInputs = [ libsndfile rapidjson libjack2 lv2 libX11 cairo ];
+
+  # https://github.com/iurie-sw/geonkick/issues/120
+  cmakeFlags = [
+    "-DCMAKE_INSTALL_LIBDIR=lib"
+  ];
+
+  meta = with lib; {
+    homepage = "https://gitlab.com/iurie-sw/geonkick";
+    description = "A free software percussion synthesizer";
+    license = licenses.gpl3Plus;
+    platforms = platforms.linux;
+    maintainers = [ maintainers.magnetophon ];
+  };
+}
diff --git a/pkgs/applications/audio/giada/default.nix b/pkgs/applications/audio/giada/default.nix
new file mode 100644
index 00000000000..4b7b760db35
--- /dev/null
+++ b/pkgs/applications/audio/giada/default.nix
@@ -0,0 +1,82 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+, pkg-config
+, fltk
+, rtmidi
+, libsamplerate
+, libsndfile
+, jack2
+, alsa-lib
+, libpulseaudio
+, libXpm
+, flac
+, libogg
+, libvorbis
+, libopus
+}:
+
+stdenv.mkDerivation rec {
+  pname = "giada";
+  version = "unstable-2021-09-24";
+
+  src = fetchFromGitHub {
+    owner = "monocasual";
+    repo = pname;
+    # Using master with https://github.com/monocasual/giada/pull/509 till a new release is done.
+    rev = "f117a8b8eef08d904ef1ab22c45f0e1fad6b8a56";
+    sha256 = "01hb981lrsyk870zs8xph5fm0z7bbffpkxgw04hq487r804mkx9j";
+    fetchSubmodules = true;
+  };
+
+  NIX_CFLAGS_COMPILE = [
+    "-w"
+    "-Wno-error"
+  ];
+
+  cmakeFlags = [
+    "-DCMAKE_INSTALL_BINDIR=bin"
+    "-DCMAKE_BUILD_TYPE=Release"
+  ];
+
+  nativeBuildInputs = [
+    cmake
+    pkg-config
+  ];
+
+  buildInputs = [
+    rtmidi
+    fltk
+    libsndfile
+    libsamplerate
+    alsa-lib
+    libXpm
+    libpulseaudio
+    jack2
+    flac
+    libogg
+    libvorbis
+    libopus
+  ];
+
+  postPatch = ''
+    local fixup_list=(
+      src/core/kernelMidi.cpp
+      src/gui/elems/config/tabMidi.cpp
+      src/utils/ver.cpp
+    )
+    for f in "''${fixup_list[@]}"; do
+      substituteInPlace "$f" \
+        --replace "<RtMidi.h>" "<${rtmidi.src}/RtMidi.h>"
+    done
+  '';
+
+  meta = with lib; {
+    description = "A free, minimal, hardcore audio tool for DJs, live performers and electronic musicians";
+    homepage = "https://giadamusic.com/";
+    license = licenses.gpl3;
+    maintainers = with maintainers; [ petabyteboy ];
+    platforms = platforms.all;
+  };
+}
diff --git a/pkgs/applications/audio/gigedit/default.nix b/pkgs/applications/audio/gigedit/default.nix
new file mode 100644
index 00000000000..8c37e8901a3
--- /dev/null
+++ b/pkgs/applications/audio/gigedit/default.nix
@@ -0,0 +1,46 @@
+{ lib
+, stdenv
+, fetchurl
+, autoconf
+, automake
+, intltool
+, libtool
+, pkg-config
+, which
+, docbook_xml_dtd_45
+, docbook_xsl
+, gtkmm2
+, pangomm_2_42
+, libgig
+, libsndfile
+, libxslt
+}:
+
+let
+  gtkmm2_with_pango242 = gtkmm2.override { pangomm = pangomm_2_42; };
+in
+stdenv.mkDerivation rec {
+  pname = "gigedit";
+  version = "1.1.1";
+
+  src = fetchurl {
+    url = "https://download.linuxsampler.org/packages/${pname}-${version}.tar.bz2";
+    sha256 = "08db12crwf0dy1dbyrmivqqpg5zicjikqkmf2kb1ywpq0a9hcxrb";
+  };
+
+  preConfigure = "make -f Makefile.svn";
+
+  nativeBuildInputs = [ autoconf automake intltool libtool pkg-config which ];
+
+  buildInputs = [ docbook_xml_dtd_45 docbook_xsl gtkmm2_with_pango242 libgig libsndfile libxslt ];
+
+  enableParallelBuilding = true;
+
+  meta = with lib; {
+    homepage = "http://www.linuxsampler.org";
+    description = "Gigasampler file access library";
+    license = licenses.gpl2;
+    maintainers = [ maintainers.goibhniu ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/pkgs/applications/audio/gjay/default.nix b/pkgs/applications/audio/gjay/default.nix
new file mode 100644
index 00000000000..4bd9c6dcd8f
--- /dev/null
+++ b/pkgs/applications/audio/gjay/default.nix
@@ -0,0 +1,42 @@
+{ lib
+, stdenv
+, fetchurl
+, pkg-config
+, dbus-glib
+, audacious
+, gtk2
+, gsl
+, libaudclient
+, libmpdclient
+}:
+
+stdenv.mkDerivation rec {
+  pname = "gjay";
+  version = "0.3.2";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/project/gjay/${pname}-${version}.tar.gz";
+    sha256 = "1a1vv4r0vnxjdyl0jyv7gga3zfd5azxlwjm1l6hjrf71lb228zn8";
+  };
+
+  nativeBuildInputs = [ pkg-config ];
+
+  buildInputs = [
+    libmpdclient
+    dbus-glib
+    audacious
+    gtk2
+    gsl
+    libaudclient
+  ];
+
+  hardeningDisable = [ "format" ];
+
+  meta = with lib; {
+    description = "Generates playlists such that each song sounds good following the previous song";
+    homepage = "http://gjay.sourceforge.net/";
+    license = licenses.gpl2Plus;
+    maintainers = with maintainers; [ pSub ];
+    platforms = with platforms; linux;
+  };
+}
diff --git a/pkgs/applications/audio/gmpc/default.nix b/pkgs/applications/audio/gmpc/default.nix
new file mode 100644
index 00000000000..4c93fad511a
--- /dev/null
+++ b/pkgs/applications/audio/gmpc/default.nix
@@ -0,0 +1,66 @@
+{ lib
+, stdenv
+, fetchurl
+, libtool
+, intltool
+, pkg-config
+, glib
+, gtk2
+, curl
+, libmpdclient
+, libsoup
+, gob2
+, vala
+, libunique
+, libSM
+, libICE
+, sqlite
+, hicolor-icon-theme
+, wrapGAppsHook
+}:
+
+stdenv.mkDerivation rec {
+  pname = "gmpc";
+  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 = [ pkg-config ];
+    buildInputs = [ glib ];
+  };
+
+  src = fetchurl {
+    url = "http://download.sarine.nl/Programs/gmpc/11.8/gmpc-11.8.16.tar.gz";
+    sha256 = "0b3bnxf98i5lhjyljvgxgx9xmb6p46cn3a9cccrng14nagri9556";
+  };
+
+  nativeBuildInputs = [ pkg-config libtool intltool gob2 vala wrapGAppsHook ];
+  buildInputs = [
+    glib
+    gtk2
+    curl
+    libmpdclient
+    libsoup
+    libunique
+    libmpd
+    libSM
+    libICE
+    sqlite
+    hicolor-icon-theme
+  ];
+
+  meta = with lib; {
+    homepage = "https://gmpclient.org";
+    description = "A GTK2 frontend for Music Player Daemon";
+    license = licenses.gpl2;
+    maintainers = [];
+    platforms = platforms.linux;
+  };
+}
+# TODO: what is this libmpd derivation embedded above?
diff --git a/pkgs/applications/audio/gmpc/libmpd-11.8.17-remove-strndup.patch b/pkgs/applications/audio/gmpc/libmpd-11.8.17-remove-strndup.patch
new file mode 100644
index 00000000000..ad4fdc02ef3
--- /dev/null
+++ b/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/pkgs/applications/audio/gmu/default.nix b/pkgs/applications/audio/gmu/default.nix
new file mode 100644
index 00000000000..cc2b46cd6ac
--- /dev/null
+++ b/pkgs/applications/audio/gmu/default.nix
@@ -0,0 +1,50 @@
+{lib, stdenv, fetchurl, fetchpatch, SDL, SDL_gfx, SDL_image, tremor, flac, mpg123, libmikmod
+, speex, ncurses
+, keymap ? "default"
+, conf ? "unknown"
+}:
+
+stdenv.mkDerivation rec {
+  pname = "gmu";
+  version = "0.10.1";
+
+  src = fetchurl {
+    url = "https://wej.k.vu/files/${pname}-${version}.tar.gz";
+    sha256 = "03x0mc0xw2if0bpf0a15yprcyx1xccki039zvl2099dagwk6xskv";
+  };
+
+  patches = [
+     # pull pending upstream inclusion fix for ncurses-6.3:
+     #  https://github.com/jhe2/gmu/pull/7
+     (fetchpatch {
+       name = "ncurses-6.3.patch";
+       url = "https://github.com/jhe2/gmu/commit/c8b3a10afee136feb333754ef6ec26383b11072f.patch";
+       sha256 = "0xp2j3jp8pkmv6yvnzi378m2dylbfsaqrsrkw7hbxw6kglzj399r";
+     })
+
+     # pull upstream fix for -fno-common toolchains like
+     # upstream gcc-10 of clang-13.
+     (fetchpatch {
+       name = "fno-common.patch";
+       url = "https://github.com/jhe2/gmu/commit/b705209f08ddfda141ad358ccd0c3d2d099be5e6.patch";
+       sha256 = "1ci2b8kz3r58rzmivlfhqjmcgqwlkwlzzhnyxlk36vmk240a3gqq";
+     })
+  ];
+
+  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 = lib.licenses.gpl2;
+  };
+}
diff --git a/pkgs/applications/audio/gnaural/default.nix b/pkgs/applications/audio/gnaural/default.nix
new file mode 100644
index 00000000000..10c199d94b6
--- /dev/null
+++ b/pkgs/applications/audio/gnaural/default.nix
@@ -0,0 +1,33 @@
+{ lib, stdenv, fetchurl, pkg-config, libsndfile, portaudio, gtk2 }:
+
+stdenv.mkDerivation rec {
+  pname = "gnaural";
+  version = "20110606";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/${pname}/${pname}_${version}.tar.xz";
+    hash = "sha256-0a09DUMfHEIGYuIYSBGJalBiIHIgejr/KVDXCFgKBb8=";
+  };
+
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = [ gtk2 libsndfile portaudio ];
+
+  postInstall = ''
+    mkdir -p $out/share/applications
+    substitute \
+      $out/share/gnome/apps/Multimedia/gnaural.desktop \
+      $out/share/applications/gnaural.desktop \
+      --replace \
+        "/usr/share/gnaural/pixmaps/gnaural-icon.png" \
+        "$out/share/gnaural/pixmaps/gnaural-icon.png" \
+
+    rm -rf $out/share/gnome
+  '';
+
+  meta = with lib; {
+    description = "Programmable auditory binaural-beat synthesizer";
+    homepage = "http://gnaural.sourceforge.net/";
+    maintainers = with maintainers; [ ehmry ];
+    license = with licenses; [ gpl2Only ];
+  };
+}
diff --git a/pkgs/applications/audio/gnome-podcasts/default.nix b/pkgs/applications/audio/gnome-podcasts/default.nix
new file mode 100644
index 00000000000..5a4876a98dd
--- /dev/null
+++ b/pkgs/applications/audio/gnome-podcasts/default.nix
@@ -0,0 +1,84 @@
+{ stdenv
+, lib
+, rustPlatform
+, fetchFromGitLab
+, meson
+, ninja
+, gettext
+, python3
+, pkg-config
+, glib
+, libhandy
+, gtk3
+, appstream-glib
+, desktop-file-utils
+, dbus
+, openssl
+, sqlite
+, gst_all_1
+, wrapGAppsHook
+}:
+
+stdenv.mkDerivation rec {
+  pname = "gnome-podcasts";
+  version = "0.5.1";
+
+  src = fetchFromGitLab {
+    domain = "gitlab.gnome.org";
+    owner = "World";
+    repo = "podcasts";
+    rev = version;
+    sha256 = "00vy1qkkpn76jdpybsq9qp8s6fh1ih10j73p2x43sl97m5g8944h";
+  };
+
+  cargoDeps = rustPlatform.fetchCargoTarball {
+    inherit src;
+    name = "${pname}-${version}";
+    sha256 = "0y34b5rnr75h7dxbx93mafrmwsh187wq5js7fmkb1m1yyybj1v1x";
+  };
+
+  nativeBuildInputs = [
+    meson
+    ninja
+    pkg-config
+    gettext
+    python3
+    rustPlatform.rust.cargo
+    rustPlatform.cargoSetupHook
+    rustPlatform.rust.rustc
+    wrapGAppsHook
+    glib
+  ];
+
+  buildInputs = [
+    appstream-glib
+    desktop-file-utils
+    glib
+    gtk3
+    libhandy
+    dbus
+    openssl
+    sqlite
+    gst_all_1.gstreamer
+    gst_all_1.gst-plugins-base
+    gst_all_1.gst-plugins-bad
+    gst_all_1.gst-plugins-good
+  ];
+
+  # tests require network
+  doCheck = false;
+
+  postPatch = ''
+    chmod +x scripts/compile-gschema.py # patchShebangs requires executable file
+    patchShebangs scripts/compile-gschema.py scripts/cargo.sh scripts/test.sh
+  '';
+
+  meta = with lib; {
+    description = "Listen to your favorite podcasts";
+    homepage = "https://wiki.gnome.org/Apps/Podcasts";
+    license = licenses.gpl3Plus;
+    maintainers = teams.gnome.members;
+    platforms = platforms.unix;
+    broken = stdenv.isDarwin; # never built on Hydra https://hydra.nixos.org/job/nixpkgs/trunk/gnome-podcasts.x86_64-darwin
+  };
+}
diff --git a/pkgs/applications/audio/goattracker/default.nix b/pkgs/applications/audio/goattracker/default.nix
new file mode 100644
index 00000000000..1fb848ae1ed
--- /dev/null
+++ b/pkgs/applications/audio/goattracker/default.nix
@@ -0,0 +1,73 @@
+{ lib, stdenv
+, fetchurl
+, unzip
+, copyDesktopItems
+, makeDesktopItem
+, imagemagick
+, SDL
+, isStereo ? false
+}:
+
+with lib;
+let
+  pname = "goattracker" + optionalString isStereo "-stereo";
+  desktopItem = makeDesktopItem {
+    name = pname;
+    desktopName = "GoatTracker 2" + optionalString isStereo " Stereo";
+    genericName = "Music Tracker";
+    exec = if isStereo
+      then "gt2stereo"
+      else "goattrk2";
+    icon = "goattracker";
+    categories = [ "AudioVideo" "AudioVideoEditing" ];
+    keywords = [ "tracker" "music" ];
+  };
+
+in stdenv.mkDerivation rec {
+  inherit pname;
+  version = if isStereo
+    then "2.77"  # stereo
+    else "2.76"; # normal
+
+  src = fetchurl {
+    url = "mirror://sourceforge/goattracker2/GoatTracker_${version}${optionalString isStereo "_Stereo"}.zip";
+    sha256 = if isStereo
+      then "1hiig2d152sv9kazwz33i56x1c54h5sh21ipkqnp6qlnwj8x1ksy"  # stereo
+      else "0d7a3han4jw4bwiba3j87racswaajgl3pj4sb5lawdqdxicv3dn1"; # normal
+  };
+  sourceRoot = "src";
+
+  nativeBuildInputs = [ copyDesktopItems unzip imagemagick ];
+  buildInputs = [ SDL ];
+
+  # PREFIX gets treated as BINDIR.
+  makeFlags = [ "PREFIX=$(out)/bin/" ];
+
+  # The zip contains some build artifacts.
+  prePatch = "make clean";
+
+  # The destination does not get created automatically.
+  preBuild = "mkdir -p $out/bin";
+
+  # Other files get installed during the build phase.
+  installPhase = ''
+    runHook preInstall
+
+    convert goattrk2.bmp goattracker.png
+    install -Dm644 goattracker.png $out/share/icons/hicolor/32x32/apps/goattracker.png
+
+    runHook postInstall
+  '';
+
+  desktopItems = [ desktopItem ];
+
+  meta = {
+    description = "A crossplatform music editor for creating Commodore 64 music. Uses reSID library by Dag Lem and supports alternatively HardSID & CatWeasel devices"
+      + optionalString isStereo " - Stereo version";
+    homepage = "https://cadaver.github.io/tools.html";
+    downloadPage = "https://sourceforge.net/projects/goattracker2/";
+    license = licenses.gpl2Plus;
+    maintainers = with maintainers; [ fgaz ];
+    platforms = platforms.all;
+  };
+}
diff --git a/pkgs/applications/audio/google-play-music-desktop-player/default.nix b/pkgs/applications/audio/google-play-music-desktop-player/default.nix
new file mode 100644
index 00000000000..74286073b90
--- /dev/null
+++ b/pkgs/applications/audio/google-play-music-desktop-player/default.nix
@@ -0,0 +1,82 @@
+{ lib, stdenv, alsa-lib, atk, at-spi2-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.7.1";
+
+  deps = [
+    alsa-lib
+    atk
+    at-spi2-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 {
+  pname = "google-play-music-desktop-player";
+  inherit 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 = "1ljm9c5sv6wa7pa483yq03wq9j1h1jdh8363z5m2imz407yzgm5r";
+  };
+
+  dontBuild = true;
+  nativeBuildInputs = [ 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 : "${lib.makeLibraryPath deps}"
+  '';
+
+  meta = {
+    homepage = "https://www.googleplaymusicdesktopplayer.com/";
+    description = "A beautiful cross platform Desktop Player for Google Play Music and YouTube Music";
+    license = lib.licenses.mit;
+    platforms = [ "x86_64-linux" ];
+    maintainers = with lib.maintainers; [ anna328p SuprDewd ];
+  };
+}
diff --git a/pkgs/applications/audio/gpodder/default.nix b/pkgs/applications/audio/gpodder/default.nix
new file mode 100644
index 00000000000..6db530a2c23
--- /dev/null
+++ b/pkgs/applications/audio/gpodder/default.nix
@@ -0,0 +1,91 @@
+{ lib, fetchFromGitHub, python3, python3Packages, intltool
+, glibcLocales, gnome, gtk3, wrapGAppsHook
+, gobject-introspection
+}:
+
+python3Packages.buildPythonApplication rec {
+  pname = "gpodder";
+  version = "3.10.21";
+  format = "other";
+
+  src = fetchFromGitHub {
+    owner = pname;
+    repo = pname;
+    rev = version;
+    sha256 = "0n73jm5ypsj962gpr0dk10lqh83giqsczm63wchyhmrkyf1wgga1";
+  };
+
+  patches = [
+    ./disable-autoupdate.patch
+  ];
+
+  postPatch = with lib; ''
+    sed -i -re 's,^( *gpodder_dir *= *).*,\1"'"$out"'",' bin/gpodder
+  '';
+
+  nativeBuildInputs = [
+    intltool
+    wrapGAppsHook
+    glibcLocales
+  ];
+
+  # as of 2021-07, the gobject-introspection setup hook does not
+  # work with `strictDeps` enabled, thus for proper `wrapGAppsHook`
+  # it needs to be disabled explicitly. https://github.com/NixOS/nixpkgs/issues/56943
+  strictDeps = false;
+
+  buildInputs = [
+    python3
+    gtk3
+    gobject-introspection
+    gnome.adwaita-icon-theme
+  ];
+
+  checkInputs = with python3Packages; [
+    minimock
+    pytest
+    pytest-httpserver
+    pytest-cov
+  ];
+
+  doCheck = true;
+
+  propagatedBuildInputs = with python3Packages; [
+    feedparser
+    dbus-python
+    mygpoclient
+    requests
+    pygobject3
+    eyeD3
+    podcastparser
+    html5lib
+  ];
+
+  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 pytest --ignore=tests --ignore=src/gpodder/utilwin32ctypes.py --doctest-modules src/gpodder/util.py src/gpodder/jsonconfig.py
+    LC_ALL=C PYTHONPATH=src/:$PYTHONPATH pytest tests --ignore=src/gpodder/utilwin32ctypes.py --ignore=src/mygpoclient --cov=gpodder
+  '';
+
+  meta = with 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/pkgs/applications/audio/gpodder/disable-autoupdate.patch b/pkgs/applications/audio/gpodder/disable-autoupdate.patch
new file mode 100644
index 00000000000..c7c81761328
--- /dev/null
+++ b/pkgs/applications/audio/gpodder/disable-autoupdate.patch
@@ -0,0 +1,34 @@
+--- a/share/gpodder/ui/gtk/menus.ui
++++ b/share/gpodder/ui/gtk/menus.ui
+@@ -13,10 +13,6 @@
+         <attribute name="action">app.gotoMygpo</attribute>
+         <attribute name="label" translatable="yes">Go to gpodder.net</attribute>
+       </item>
+-      <item>
+-        <attribute name="action">app.checkForUpdates</attribute>
+-        <attribute name="label" translatable="yes">Software updates</attribute>
+-      </item>
+     </section>
+     <section>
+       <item>
+--- a/src/gpodder/config.py
++++ b/src/gpodder/config.py
+@@ -94,7 +94,7 @@
+ 
+     # Software updates from gpodder.org
+     'software_update': {
+-        'check_on_startup': True,  # check for updates on start
++       'check_on_startup': False,  # check for updates on start
+         'last_check': 0,  # unix timestamp of last update check
+         'interval': 5,  # interval (in days) to check for updates
+     },
+--- a/src/gpodder/gtkui/main.py
++++ b/src/gpodder/gtkui/main.py
+@@ -3445,6 +3445,7 @@
+         If silent=False, a message will be shown even if no updates are
+         available (set silent=False when the check is manually triggered).
+         """
++        return
+         try:
+             up_to_date, version, released, days = util.get_update_info()
+         except Exception as e:
diff --git a/pkgs/applications/audio/gradio/0001-Remove-post-install-script-that-hardcodes-paths.patch b/pkgs/applications/audio/gradio/0001-Remove-post-install-script-that-hardcodes-paths.patch
new file mode 100644
index 00000000000..3a6296baaa6
--- /dev/null
+++ b/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/pkgs/applications/audio/gradio/default.nix b/pkgs/applications/audio/gradio/default.nix
new file mode 100644
index 00000000000..9e2187f4a8f
--- /dev/null
+++ b/pkgs/applications/audio/gradio/default.nix
@@ -0,0 +1,71 @@
+{ lib, stdenv, fetchFromGitHub, pkg-config
+, 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.3";
+
+in stdenv.mkDerivation {
+  pname = "gradio";
+  inherit version;
+
+  src = fetchFromGitHub {
+    owner = "haecker-felix";
+    repo = "gradio";
+    rev = "v${version}";
+    sha256 = "00982dynl36lpsrx3mkd2a479zsrc8jvwfb8i7pi6w7fzzd8n8bl";
+  };
+
+  nativeBuildInputs = [
+    pkg-config
+
+    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;
+
+  postInstall = ''
+    glib-compile-schemas "$out"/share/glib-2.0/schemas
+  '';
+
+  patches = [ ./0001-Remove-post-install-script-that-hardcodes-paths.patch ];
+
+  meta = with 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/pkgs/applications/audio/grandorgue/default.nix b/pkgs/applications/audio/grandorgue/default.nix
new file mode 100644
index 00000000000..30c6e57188a
--- /dev/null
+++ b/pkgs/applications/audio/grandorgue/default.nix
@@ -0,0 +1,32 @@
+{ lib, stdenv, fetchsvn, cmake, gcc, pkg-config, fftwFloat, alsa-lib
+, zlib, wavpack, wxGTK31, udev, jackaudioSupport ? false, libjack2
+, includeDemo ? true }:
+
+stdenv.mkDerivation rec {
+  pname = "grandorgue";
+  rev = "2333";
+  version = "0.3.1-r${rev}";
+  src = fetchsvn {
+    url = "https://svn.code.sf.net/p/ourorgan/svn/trunk";
+    inherit rev;
+    sha256 = "0xzjdc2g4gja2lpmn21xhdskv43qpbpzkbb05jfqv6ma2zwffzz1";
+  };
+
+  nativeBuildInputs = [ cmake pkg-config ];
+
+  buildInputs = [ pkg-config fftwFloat alsa-lib zlib wavpack wxGTK31 udev ]
+    ++ lib.optional jackaudioSupport libjack2;
+
+  cmakeFlags = lib.optional (!jackaudioSupport) [
+    "-DRTAUDIO_USE_JACK=OFF"
+    "-DRTMIDI_USE_JACK=OFF"
+  ] ++ lib.optional (!includeDemo) "-DINSTALL_DEMO=OFF";
+
+  meta = {
+    description = "Virtual Pipe Organ Software";
+    homepage = "https://sourceforge.net/projects/ourorgan";
+    license = lib.licenses.gpl2;
+    platforms = lib.platforms.linux;
+    maintainers = [ lib.maintainers.puzzlewolf ];
+  };
+}
diff --git a/pkgs/applications/audio/greg/default.nix b/pkgs/applications/audio/greg/default.nix
new file mode 100644
index 00000000000..95f3bf9988c
--- /dev/null
+++ b/pkgs/applications/audio/greg/default.nix
@@ -0,0 +1,24 @@
+{ lib, fetchFromGitHub, pythonPackages }:
+
+with pythonPackages; buildPythonApplication rec {
+  pname = "greg";
+  version = "0.4.7";
+
+  disabled = !isPy3k;
+
+  src = fetchFromGitHub {
+    owner = "manolomartinez";
+    repo = pname;
+    rev = "v" + version;
+    sha256 = "0bdzgh2k1ppgcvqiasxwp3w89q44s4jgwjidlips3ixx1bzm822v";
+  };
+
+  propagatedBuildInputs = [ setuptools feedparser ];
+
+  meta = with lib; {
+    homepage = "https://github.com/manolomartinez/greg";
+    description = "A command-line podcast aggregator";
+    license = licenses.gpl3;
+    maintainers = with maintainers; [ edwtjo ];
+  };
+}
diff --git a/pkgs/applications/audio/gspeech/default.nix b/pkgs/applications/audio/gspeech/default.nix
new file mode 100644
index 00000000000..21a4d6748be
--- /dev/null
+++ b/pkgs/applications/audio/gspeech/default.nix
@@ -0,0 +1,73 @@
+{ lib
+, fetchFromGitHub
+, python3
+, gtk3
+, wrapGAppsHook
+, glibcLocales
+, gobject-introspection
+, gettext
+, pango
+, gdk-pixbuf
+, librsvg
+, atk
+, libnotify
+, libappindicator-gtk3
+, gst_all_1
+, makeWrapper
+, picotts
+, sox
+}:
+
+python3.pkgs.buildPythonApplication rec {
+  pname = "gSpeech";
+  version = "0.10.1";
+
+  src = fetchFromGitHub {
+    owner = "mothsart";
+    repo = pname;
+    rev = version;
+    sha256 = "1i0jwgxcn94nsi7c0ad0w77y04g04ka2szijzfqzqfnacdmdyrfc";
+  };
+
+  nativeBuildInputs = [
+    wrapGAppsHook
+    gobject-introspection
+    pango
+    gdk-pixbuf
+    atk
+    gettext
+    libnotify
+    libappindicator-gtk3
+    gst_all_1.gstreamer
+    gst_all_1.gst-plugins-base
+    gst_all_1.gst-plugins-good
+    makeWrapper
+  ];
+
+  buildInputs = [
+    glibcLocales
+    gtk3
+    python3
+  ];
+
+  propagatedBuildInputs = with python3.pkgs; [
+    pygobject3
+    librsvg
+  ];
+
+  postFixup = ''
+    wrapProgram $out/bin/gspeech --prefix PATH : ${lib.makeBinPath [ picotts sox ]}
+    wrapProgram $out/bin/gspeech-cli --prefix PATH : ${lib.makeBinPath [ picotts sox ]}
+  '';
+
+  strictDeps = false;
+
+  meta = with lib; {
+    description = "A minimal GUI for the Text To Speech 'Svox Pico'. Read clipboard or selected text in different languages and manage it : pause, stop, replay";
+    homepage = "https://github.com/mothsART/gSpeech";
+    maintainers = with maintainers; [ mothsart ];
+    license = licenses.gpl3;
+    platforms = platforms.unix;
+  };
+}
+
diff --git a/pkgs/applications/audio/gtkpod/default.nix b/pkgs/applications/audio/gtkpod/default.nix
new file mode 100644
index 00000000000..61484bc2fbb
--- /dev/null
+++ b/pkgs/applications/audio/gtkpod/default.nix
@@ -0,0 +1,34 @@
+{ lib, stdenv, fetchurl, pkg-config, wrapGAppsHook, intltool, libgpod, curl, flac,
+  gnome, gtk3, gettext, perlPackages, flex, libid3tag, gdl,
+  libvorbis, gdk-pixbuf }:
+
+stdenv.mkDerivation rec {
+  version = "2.1.5";
+  pname = "gtkpod";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/gtkpod/${pname}-${version}.tar.gz";
+    sha256 = "0xisrpx069f7bjkyc8vqxb4k0480jmx1wscqxr6cpq1qj6pchzd5";
+  };
+
+  nativeBuildInputs = [ pkg-config wrapGAppsHook intltool ];
+  buildInputs = [
+    curl gettext
+    flex libgpod libid3tag flac libvorbis gtk3 gdk-pixbuf
+    gdl gnome.adwaita-icon-theme gnome.anjuta
+  ] ++ (with perlPackages; [ perl XMLParser ]);
+
+  patchPhase = ''
+    sed -i 's/which/type -P/' scripts/*.sh
+  '';
+
+  enableParallelBuilding = true;
+
+  meta = with 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/pkgs/applications/audio/guitarix/default.nix b/pkgs/applications/audio/guitarix/default.nix
new file mode 100644
index 00000000000..b6ce0daef0d
--- /dev/null
+++ b/pkgs/applications/audio/guitarix/default.nix
@@ -0,0 +1,140 @@
+{ lib, stdenv
+, fetchurl
+, fetchpatch
+, avahi
+, bluez
+, boost
+, curl
+, eigen
+, fftw
+, gettext
+, glib
+, glib-networking
+, glibmm
+, gnome
+, gsettings-desktop-schemas
+, gtk3
+, gtkmm3
+, hicolor-icon-theme
+, intltool
+, ladspaH
+, libjack2
+, libsndfile
+, lilv
+, lrdf
+, lv2
+, pkg-config
+, python3
+, sassc
+, serd
+, sord
+, sratom
+, wafHook
+, wrapGAppsHook
+, zita-convolver
+, zita-resampler
+, optimizationSupport ? false # Enable support for native CPU extensions
+}:
+
+let
+  inherit (lib) optional;
+in
+
+stdenv.mkDerivation rec {
+  pname = "guitarix";
+  version = "0.42.1";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/guitarix/guitarix2-${version}.tar.xz";
+    sha256 = "101c2hdpipj3s6rmva5wf3q9hfjv7bkyzi7s8sgaiys8f7h4czkr";
+  };
+
+  patches = [
+    (fetchpatch {
+      name = "guitarix-gcc11.patch";
+      url = "https://github.com/brummer10/guitarix/commit/d8f003484c57d808682025dfb07a7a1fb848afdc.patch";
+      stripLen = 1;
+      sha256 = "1qhlbf18cn6m9jdz3741nrdfqvznjna3daqmn9l10k5nd3asy4il";
+    })
+  ];
+
+  nativeBuildInputs = [
+    gettext
+    hicolor-icon-theme
+    intltool
+    pkg-config
+    python3
+    wafHook
+    wrapGAppsHook
+  ];
+
+  buildInputs = [
+    avahi
+    bluez
+    boost
+    curl
+    eigen
+    fftw
+    glib
+    glib-networking.out
+    glibmm
+    gnome.adwaita-icon-theme
+    gsettings-desktop-schemas
+    gtk3
+    gtkmm3
+    ladspaH
+    libjack2
+    libsndfile
+    lilv
+    lrdf
+    lv2
+    sassc
+    serd
+    sord
+    sratom
+    zita-convolver
+    zita-resampler
+  ];
+
+  # this doesnt build, probably because we have the wrong faust version:
+  #       "--faust"
+  # aproved versions are 2.20.2 and 2.15.11
+  wafConfigureFlags = [
+    "--no-faust"
+    "--no-font-cache-update"
+    "--shared-lib"
+    "--no-desktop-update"
+    "--enable-nls"
+    "--install-roboto-font"
+  ] ++ optional optimizationSupport "--optimization";
+
+  meta = with 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/pkgs/applications/audio/gwc/default.nix b/pkgs/applications/audio/gwc/default.nix
new file mode 100644
index 00000000000..aeb64b92c88
--- /dev/null
+++ b/pkgs/applications/audio/gwc/default.nix
@@ -0,0 +1,47 @@
+{ lib, stdenv
+, fetchFromGitHub
+, autoreconfHook
+, pkg-config
+, alsa-lib
+, libpulseaudio
+, gtk2
+, hicolor-icon-theme
+, libsndfile
+, fftw
+}:
+
+stdenv.mkDerivation rec {
+  pname = "gwc";
+  version = "0.22-05";
+
+  src = fetchFromGitHub {
+    owner = "AlisterH";
+    repo = pname;
+    rev = version;
+    sha256 = "sha256-FHKu5qAyRyMxXdWYTCeAc6Q4J+NOaU1SGgoTbe0PiFE=";
+  };
+
+  nativeBuildInputs = [
+    autoreconfHook
+    pkg-config
+  ];
+
+  buildInputs = [
+    alsa-lib
+    libpulseaudio
+    gtk2
+    hicolor-icon-theme
+    libsndfile
+    fftw
+  ];
+
+  enableParallelBuilding = false; # Fails to generate machine.h in time.
+
+  meta = with lib; {
+    description = "GUI application for removing noise (hiss, pops and clicks) from audio files";
+    homepage = "https://github.com/AlisterH/gwc/";
+    license = licenses.gpl2Plus;
+    maintainers = with maintainers; [ magnetophon ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/pkgs/applications/audio/gxmatcheq-lv2/default.nix b/pkgs/applications/audio/gxmatcheq-lv2/default.nix
new file mode 100644
index 00000000000..246b034400d
--- /dev/null
+++ b/pkgs/applications/audio/gxmatcheq-lv2/default.nix
@@ -0,0 +1,30 @@
+{ lib, stdenv, fetchFromGitHub, xorg, xorgproto, cairo, lv2, pkg-config }:
+
+stdenv.mkDerivation rec {
+  pname = "GxMatchEQ.lv2";
+  version = "0.1";
+
+  src = fetchFromGitHub {
+    owner = "brummer10";
+    repo = pname;
+    rev = "V${version}";
+    sha256 = "0azdmgzqwjn26nx38iw13666a1i4y2bv39wk89pf6ihdi46klf72";
+  };
+
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = [
+    xorg.libX11 xorgproto cairo lv2
+  ];
+
+  # error: format not a string literal and no format arguments [-Werror=format-security]
+  hardeningDisable = [ "format" ];
+
+  installFlags = [ "INSTALL_DIR=$(out)/lib/lv2" ];
+
+  meta = with lib; {
+    homepage = "https://github.com/brummer10/GxMatchEQ.lv2";
+    description = "Matching Equalizer to apply EQ curve from one source to another source";
+    maintainers = [ maintainers.magnetophon ];
+    license = licenses.gpl3;
+  };
+}
diff --git a/pkgs/applications/audio/gxplugins-lv2/default.nix b/pkgs/applications/audio/gxplugins-lv2/default.nix
new file mode 100644
index 00000000000..5e8747f7656
--- /dev/null
+++ b/pkgs/applications/audio/gxplugins-lv2/default.nix
@@ -0,0 +1,34 @@
+{ lib, stdenv, fetchFromGitHub, xorg, xorgproto, cairo, lv2, pkg-config }:
+
+stdenv.mkDerivation rec {
+  pname = "GxPlugins.lv2";
+  version = "0.9";
+
+  src = fetchFromGitHub {
+    owner = "brummer10";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "02fksl8wr443ygwgcd1c2zab8kp67a6ps12k71ysqx7szv4zq877";
+    fetchSubmodules = true;
+  };
+
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = [
+    xorg.libX11 xorgproto cairo lv2
+  ];
+
+  installFlags = [ "INSTALL_DIR=$(out)/lib/lv2" ];
+
+  configurePhase = ''
+    for i in GxBoobTube GxValveCaster; do
+      substituteInPlace $i.lv2/Makefile --replace "\$(shell which echo) -e" "echo -e"
+    done
+  '';
+
+  meta = with lib; {
+    homepage = "https://github.com/brummer10/GxPlugins.lv2";
+    description = "A set of extra lv2 plugins from the guitarix project";
+    maintainers = [ maintainers.magnetophon ];
+    license = licenses.gpl3Plus;
+  };
+}
diff --git a/pkgs/applications/audio/helio-workstation/default.nix b/pkgs/applications/audio/helio-workstation/default.nix
new file mode 100644
index 00000000000..b36d977b2bd
--- /dev/null
+++ b/pkgs/applications/audio/helio-workstation/default.nix
@@ -0,0 +1,49 @@
+{ lib, stdenv, fetchFromGitHub
+, alsa-lib, freetype, xorg, curl, libGL, libjack2, gnome
+, pkg-config, makeWrapper
+}:
+
+stdenv.mkDerivation rec {
+  pname = "helio-workstation";
+  version = "3.8";
+
+  src = fetchFromGitHub {
+    owner = "helio-fm";
+    repo = pname;
+    rev = version;
+    fetchSubmodules = true;
+    sha256 = "sha256-uwRSOJ5WvDH4mfL9pCTCGzuSRT8SIBrI+Wsbumzejv0=";
+  };
+
+  buildInputs = [
+    alsa-lib freetype xorg.libX11 xorg.libXext xorg.libXinerama xorg.libXrandr
+    xorg.libXcursor xorg.libXcomposite curl libGL libjack2 gnome.zenity
+  ];
+
+  nativeBuildInputs = [ pkg-config makeWrapper ];
+
+  preBuild = ''
+    cd Projects/LinuxMakefile
+    substituteInPlace Makefile --replace alsa "alsa jack"
+  '';
+  buildFlags = [ "CONFIG=Release64" ];
+
+  installPhase = ''
+    mkdir -p $out/bin
+    install -Dm755 build/helio $out/bin
+    wrapProgram $out/bin/helio --prefix PATH ":" ${gnome.zenity}/bin
+
+    mkdir -p $out/share
+    cp -r ../Deployment/Linux/Debian/x64/usr/share/* $out/share
+    substituteInPlace $out/share/applications/Helio.desktop \
+      --replace "/usr/bin/helio" "$out/bin/helio"
+  '';
+
+  meta = with lib; {
+    description = "One music sequencer for all major platforms, both desktop and mobile";
+    homepage = "https://helio.fm/";
+    license = licenses.gpl3Only;
+    maintainers = [ maintainers.suhr ];
+    platforms = [ "x86_64-linux" ];
+  };
+}
diff --git a/pkgs/applications/audio/helm/default.nix b/pkgs/applications/audio/helm/default.nix
new file mode 100644
index 00000000000..720fd2b11a1
--- /dev/null
+++ b/pkgs/applications/audio/helm/default.nix
@@ -0,0 +1,74 @@
+{ lib, stdenv
+, fetchFromGitHub
+, fetchpatch
+, xorg
+, freetype
+, alsa-lib
+, curl
+, libjack2
+, lv2
+, pkg-config
+, libGLU
+, libGL
+}:
+
+  stdenv.mkDerivation {
+  version = "0.9.0";
+  pname = "helm";
+
+  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 alsa-lib curl libjack2 libGLU libGL lv2
+  ];
+  nativeBuildInputs = [ pkg-config ];
+
+  CXXFLAGS = "-DHAVE_LROUND";
+  enableParallelBuilding = true;
+  makeFlags = [ "DESTDIR=$(out)" ];
+
+  patches = [
+    # gcc9 compatibility https://github.com/mtytel/helm/pull/233
+    (fetchpatch {
+      url = "https://github.com/mtytel/helm/commit/cb611a80bd5a36d31bfc31212ebbf79aa86c6f08.patch";
+      sha256 = "1i2289srcfz17c3zzab6f51aznzdj62kk53l4afr32bkjh9s4ixk";
+    })
+  ];
+
+  prePatch = ''
+    sed -i 's|usr/||g' Makefile
+    sed -i "s|/usr/share/|$out/share/|" src/common/load_save.cpp
+  '';
+
+  meta = with 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 = lib.licenses.gpl3Plus;
+    maintainers = [ maintainers.magnetophon ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/pkgs/applications/audio/helvum/default.nix b/pkgs/applications/audio/helvum/default.nix
new file mode 100644
index 00000000000..798af97ab32
--- /dev/null
+++ b/pkgs/applications/audio/helvum/default.nix
@@ -0,0 +1,60 @@
+{ lib
+, clang
+, desktop-file-utils
+, fetchFromGitLab
+, fetchpatch
+, glib
+, gtk4
+, libclang
+, meson
+, ninja
+, pipewire
+, pkg-config
+, rustPlatform
+, stdenv
+}:
+
+stdenv.mkDerivation rec {
+  pname = "helvum";
+  version = "0.3.4";
+
+  src = fetchFromGitLab {
+    domain = "gitlab.freedesktop.org";
+    owner = "pipewire";
+    repo = pname;
+    rev = version;
+    sha256 = "0nhv6zw2zzxz2bg2zj32w1brywnm5lv6j3cvmmvwshc389z2k5x1";
+  };
+
+  cargoDeps = rustPlatform.fetchCargoTarball {
+    inherit src;
+    name = "${pname}-${version}";
+    hash = "sha256-EIHO9qVPIXgezfFOaarlTU0an762nFmX1ELbQuAZ7rY";
+  };
+
+  nativeBuildInputs = [
+    clang
+    meson
+    ninja
+    pkg-config
+    rustPlatform.cargoSetupHook
+    rustPlatform.rust.cargo
+    rustPlatform.rust.rustc
+    rustPlatform.bindgenHook
+  ];
+
+  buildInputs = [
+    desktop-file-utils
+    glib
+    gtk4
+    pipewire
+  ];
+
+  meta = with lib; {
+    description = "A GTK patchbay for pipewire";
+    homepage = "https://gitlab.freedesktop.org/pipewire/helvum";
+    license = licenses.gpl3Only;
+    maintainers = with maintainers; [ fufexan ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/pkgs/applications/audio/hivelytracker/default.nix b/pkgs/applications/audio/hivelytracker/default.nix
new file mode 100644
index 00000000000..4cf20e3c898
--- /dev/null
+++ b/pkgs/applications/audio/hivelytracker/default.nix
@@ -0,0 +1,89 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, pkg-config
+, makeWrapper
+, SDL
+, SDL_image
+, SDL_ttf
+, gtk2
+, glib
+}:
+
+stdenv.mkDerivation rec {
+  pname = "hivelytracker";
+  version = "unstable-2020-08-19";
+
+  src = fetchFromGitHub {
+    owner = "pete-gordon";
+    repo = "hivelytracker";
+    rev = "c8e3c7a5ee9f4a07cb4a941caecf7e4c4f4d40e0";
+    sha256 = "1nqianlf1msir6wqwapi7ys1vbmf6aik58wa54b6cn5v6kwxh75a";
+  };
+
+  nativeBuildInputs = [
+    pkg-config
+    makeWrapper
+  ];
+
+  buildInputs = [
+    SDL
+    SDL_image
+    SDL_ttf
+    gtk2
+    glib
+  ];
+
+  makeFlags = [
+    "-C sdl"
+    "-f Makefile.linux"
+    "PREFIX=$(out)"
+  ];
+
+  # TODO: try to exclude gtk and glib from darwin builds
+  NIX_CFLAGS_COMPILE = [
+    "-I${SDL}/include/SDL"
+    "-I${SDL_image}/include/SDL"
+    "-I${SDL_ttf}/include/SDL"
+    "-I${gtk2.dev}/include/gtk-2.0"
+    "-I${glib.dev}/include/glib-2.0"
+  ];
+
+  # Also build the hvl2wav tool
+  postBuild = ''
+    make -C hvl2wav
+  '';
+
+  postInstall = ''
+    # https://github.com/pete-gordon/hivelytracker/issues/43
+    # Ideally we should patch the sources, but the program can't open
+    # files passed as arguments anyway, so this works well enough until the
+    # issue is fixed.
+    wrapProgram $out/bin/hivelytracker \
+      --run "cd $out/share/hivelytracker"
+
+    # Also install the hvl2wav tool
+    install -Dm755 hvl2wav/hvl2wav $out/bin/hvl2wav
+  '';
+
+  meta = with lib; {
+    homepage = "http://www.hivelytracker.co.uk/";
+    downloadPage = "http://www.hivelytracker.co.uk/downl.php";
+    description = "Chip music tracker based upon the AHX format";
+    longDescription = ''
+      Hively Tracker is a tracker program based upon the AHX format created in
+      the mid '90s by Dexter and Pink of Abyss. The format was relatively
+      popular, and many songs were created and used in scene productions and
+      games. AHX was designed to create a very SID-like sound on the Amiga.
+
+      HivelyTracker can import and export modules and instruments in the AHX
+      format, but it also improves on AHX in several ways and therefore has
+      its own instrument and module formats.
+    '';
+    license = licenses.bsd3;
+    platforms = platforms.all;
+    maintainers = with maintainers; [ fgaz ];
+    broken = stdenv.isDarwin; # TODO: try to use xcbuild
+  };
+}
+
diff --git a/pkgs/applications/audio/hqplayer-desktop/default.nix b/pkgs/applications/audio/hqplayer-desktop/default.nix
new file mode 100644
index 00000000000..38b7e040603
--- /dev/null
+++ b/pkgs/applications/audio/hqplayer-desktop/default.nix
@@ -0,0 +1,91 @@
+{ mkDerivation
+, alsa-lib
+, autoPatchelfHook
+, fetchurl
+, flac
+, gcc11
+, lib
+, libmicrohttpd
+, llvmPackages_10
+, qtcharts
+, qtdeclarative
+, qtquickcontrols2
+, qtwebengine
+, qtwebview
+, rpmextract
+, wavpack
+}:
+
+mkDerivation rec {
+  pname = "hqplayer-desktop";
+  version = "4.13.1-38";
+
+  src = fetchurl {
+    url = "https://www.signalyst.eu/bins/hqplayer/fc34/hqplayer4desktop-${version}.fc34.x86_64.rpm";
+    sha256 = "sha256-DEZWEGk5SfhcNQddehCBVbfeTH8KfVCdaxQ+F3MrRe8=";
+  };
+
+  unpackPhase = ''
+    ${rpmextract}/bin/rpmextract $src
+  '';
+
+  nativeBuildInputs = [ autoPatchelfHook rpmextract ];
+
+  buildInputs = [
+    alsa-lib
+    flac
+    gcc11.cc.lib
+    libmicrohttpd
+    llvmPackages_10.openmp
+    qtcharts
+    qtdeclarative
+    qtquickcontrols2
+    qtwebengine
+    qtwebview
+    wavpack
+  ];
+
+  dontConfigure = true;
+  dontBuild = true;
+
+  installPhase = ''
+    runHook preInstall
+
+    # main executable
+    mkdir -p $out/bin
+    cp ./usr/bin/* $out/bin
+
+    # desktop files
+    mkdir -p $out/share/applications
+    cp ./usr/share/applications/* $out/share/applications
+
+    # documentation
+    mkdir -p $out/share/doc/${pname}
+    cp ./usr/share/doc/hqplayer4desktop/* $out/share/doc/${pname}
+
+    # pixmaps
+    mkdir -p $out/share/pixmaps
+    cp ./usr/share/pixmaps/* $out/share/pixmaps
+
+    runHook postInstall
+  '';
+
+  postInstall = ''
+    for desktopFile in $out/share/applications/*; do
+      substituteInPlace "$desktopFile" \
+        --replace /usr/bin/ $out/bin/ \
+        --replace /usr/share/doc/ $out/share/doc/
+    done
+  '';
+
+  postFixup = ''
+    patchelf --replace-needed libomp.so.5 libomp.so $out/bin/.hqplayer4desktop-wrapped
+  '';
+
+  meta = with lib; {
+    homepage = "https://www.signalyst.com/custom.html";
+    description = "High-end upsampling multichannel software HD-audio player";
+    license = licenses.unfree;
+    maintainers = with maintainers; [ lovesegfault ];
+  };
+}
diff --git a/pkgs/applications/audio/hushboard/default.nix b/pkgs/applications/audio/hushboard/default.nix
new file mode 100644
index 00000000000..e9d88d1f236
--- /dev/null
+++ b/pkgs/applications/audio/hushboard/default.nix
@@ -0,0 +1,73 @@
+{ lib
+, buildPythonApplication
+, fetchFromGitHub
+, gobject-introspection
+, gtk3
+, libappindicator
+, libpulseaudio
+, librsvg
+, pycairo
+, pygobject3
+, six
+, wrapGAppsHook
+, xlib
+}:
+
+buildPythonApplication {
+  pname = "hushboard";
+  version = "unstable-2021-03-17";
+
+  src = fetchFromGitHub {
+    owner = "stuartlangridge";
+    repo = "hushboard";
+    rev = "c16611c539be111891116a737b02c5fb359ad1fc";
+    sha256 = "06jav6j0bsxhawrq31cnls8zpf80fpwk0cak5s82js6wl4vw2582";
+  };
+
+  nativeBuildInputs = [
+    wrapGAppsHook
+  ];
+
+  buildInputs = [
+    gobject-introspection
+    gtk3
+    libappindicator
+    libpulseaudio
+  ];
+
+  propagatedBuildInputs = [
+    pycairo
+    pygobject3
+    six
+    xlib
+  ];
+
+  postPatch = ''
+    substituteInPlace hushboard/_pulsectl.py \
+      --replace "ctypes.util.find_library('libpulse') or 'libpulse.so.0'" "'${libpulseaudio}/lib/libpulse.so.0'"
+    substituteInPlace snap/gui/hushboard.desktop \
+      --replace "\''${SNAP}/hushboard/icons/hushboard.svg" "hushboard"
+  '';
+
+  postInstall = ''
+    # Fix tray icon, see e.g. https://github.com/NixOS/nixpkgs/pull/43421
+    wrapProgram $out/bin/hushboard \
+      --set GDK_PIXBUF_MODULE_FILE "${librsvg.out}/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache"
+
+    mkdir -p $out/share/applications $out/share/icons/hicolor/{scalable,512x512}/apps
+    cp snap/gui/hushboard.desktop $out/share/applications
+    cp hushboard/icons/hushboard.svg $out/share/icons/hicolor/scalable/apps
+    cp hushboard-512.png $out/share/icons/hicolor/512x512/apps/hushboard.png
+  '';
+
+  # There are no tests
+  doCheck = false;
+
+  meta = with lib; {
+    homepage = "https://kryogenix.org/code/hushboard/";
+    license = licenses.mit;
+    description = "Mute your microphone while typing";
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ sersorrel ];
+  };
+}
diff --git a/pkgs/applications/audio/hybridreverb2/default.nix b/pkgs/applications/audio/hybridreverb2/default.nix
new file mode 100644
index 00000000000..707deeb1a01
--- /dev/null
+++ b/pkgs/applications/audio/hybridreverb2/default.nix
@@ -0,0 +1,84 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+, pkg-config
+, lv2
+, alsa-lib
+, libjack2
+, freetype
+, libX11
+, gtk3
+, pcre
+, libpthreadstubs
+, libXdmcp
+, libxkbcommon
+, libepoxy
+, at-spi2-core
+, dbus
+, curl
+, fftwFloat
+}:
+
+let
+  pname = "HybridReverb2";
+  version = "2.1.2";
+  owner = "jpcima";
+  DBversion = "1.0.0";
+in
+
+stdenv.mkDerivation rec {
+  inherit pname version;
+
+  impulseDB = fetchFromGitHub {
+    inherit owner;
+    repo = "HybridReverb2-impulse-response-database";
+    rev = "v${DBversion}";
+    sha256 = "sha256-PyGrMNhrL2cRjb2UPPwEaJ6vZBV2sDG1mKFCNdfqjsI=";
+  };
+
+  src = fetchFromGitHub {
+    inherit owner;
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "16r20plz1w068bgbkrydv01a991ygjybdya3ah7bhp3m5xafjwqb";
+    fetchSubmodules = true;
+  };
+
+  nativeBuildInputs = [ pkg-config cmake ];
+  buildInputs = [
+    lv2
+    alsa-lib
+    libjack2
+    freetype
+    libX11
+    gtk3
+    pcre
+    libpthreadstubs
+    libXdmcp
+    libxkbcommon
+    libepoxy
+    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 lib; {
+    homepage = "https://github.com/jpcima/HybridReverb2";
+    description = "Reverb effect using hybrid impulse convolution";
+    license = licenses.gpl2Plus;
+    maintainers = [ maintainers.magnetophon ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/pkgs/applications/audio/hydrogen/0.nix b/pkgs/applications/audio/hydrogen/0.nix
new file mode 100644
index 00000000000..aa182165786
--- /dev/null
+++ b/pkgs/applications/audio/hydrogen/0.nix
@@ -0,0 +1,48 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, pkg-config
+, cmake
+, alsa-lib
+, boost
+, glib
+, lash
+, libjack2
+, libarchive
+, libsndfile
+, lrdf
+, qt4
+}:
+
+stdenv.mkDerivation rec {
+  version = "0.9.7";
+  pname = "hydrogen";
+
+  src = fetchFromGitHub {
+    owner = "hydrogen-music";
+    repo = "hydrogen";
+    rev = version;
+    sha256 = "sha256-6ycNUcumtAEl/6XbIpW6JglGv4nNOdMrOJ1nvJg3z/c=";
+  };
+
+  nativeBuildInputs = [ pkg-config cmake ];
+  buildInputs = [
+    alsa-lib
+    boost
+    glib
+    lash
+    libjack2
+    libarchive
+    libsndfile
+    lrdf
+    qt4
+  ];
+
+  meta = with lib; {
+    description = "Advanced drum machine";
+    homepage = "http://www.hydrogen-music.org";
+    license = licenses.gpl2;
+    platforms = platforms.linux;
+    maintainers = [ maintainers.goibhniu ];
+  };
+}
diff --git a/pkgs/applications/audio/hydrogen/default.nix b/pkgs/applications/audio/hydrogen/default.nix
new file mode 100644
index 00000000000..694734e36f4
--- /dev/null
+++ b/pkgs/applications/audio/hydrogen/default.nix
@@ -0,0 +1,34 @@
+{ lib, stdenv, fetchFromGitHub, cmake, pkg-config, wrapQtAppsHook
+, alsa-lib, ladspa-sdk, lash, libarchive, libjack2, liblo, libpulseaudio, libsndfile, lrdf
+, qtbase, qttools, qtxmlpatterns
+}:
+
+stdenv.mkDerivation rec {
+  pname = "hydrogen";
+  version = "1.1.1";
+
+  src = fetchFromGitHub {
+    owner = "hydrogen-music";
+    repo = pname;
+    rev = version;
+    sha256 = "sha256-to24PB9cs4vun93uXEWNVsmSLFRuLGfC4hCh7+mbvIo=";
+  };
+
+  nativeBuildInputs = [ cmake pkg-config wrapQtAppsHook ];
+  buildInputs = [
+    alsa-lib ladspa-sdk lash libarchive libjack2 liblo libpulseaudio libsndfile lrdf
+    qtbase qttools qtxmlpatterns
+  ];
+
+  cmakeFlags = [
+    "-DWANT_DEBUG=OFF"
+  ];
+
+  meta = with lib; {
+    description = "Advanced drum machine";
+    homepage = "http://www.hydrogen-music.org";
+    license = licenses.gpl2Plus;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ goibhniu orivej ];
+  };
+}
diff --git a/pkgs/applications/audio/iannix/default.nix b/pkgs/applications/audio/iannix/default.nix
new file mode 100644
index 00000000000..31f0bbbb4c7
--- /dev/null
+++ b/pkgs/applications/audio/iannix/default.nix
@@ -0,0 +1,29 @@
+{ mkDerivation, lib, fetchFromGitHub, alsa-lib, pkg-config, qtbase, qtscript, qmake
+}:
+
+mkDerivation rec {
+  pname = "iannix";
+  version = "unstable-2020-12-09";
+
+  src = fetchFromGitHub {
+    owner = "iannix";
+    repo = "IanniX";
+    rev = "287b51d9b90b3e16ae206c0c4292599619f7b159";
+    sha256 = "AhoP+Ok78Vk8Aee/RP572hJeM8O7v2ZTvFalOZZqRy8=";
+  };
+
+  nativeBuildInputs = [ pkg-config qmake ];
+  buildInputs = [ alsa-lib qtbase qtscript ];
+
+  qmakeFlags = [ "PREFIX=/" ];
+
+  installFlags = [ "INSTALL_ROOT=$(out)" ];
+
+  meta = with lib; {
+    description = "Graphical open-source sequencer";
+    homepage = "https://www.iannix.org/";
+    license = licenses.lgpl3;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ freezeboy ];
+  };
+}
diff --git a/pkgs/applications/audio/id3v2/default.nix b/pkgs/applications/audio/id3v2/default.nix
new file mode 100644
index 00000000000..f6c88bc456e
--- /dev/null
+++ b/pkgs/applications/audio/id3v2/default.nix
@@ -0,0 +1,28 @@
+{lib, stdenv, fetchurl, id3lib, groff, zlib}:
+
+stdenv.mkDerivation rec {
+  pname = "id3v2";
+  version = "0.1.12";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/id3v2/${pname}-${version}.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 lib; {
+    description = "A command line editor for id3v2 tags";
+    homepage = "http://id3v2.sourceforge.net/";
+    license = licenses.gpl2Plus;
+    platforms = with platforms; unix;
+  };
+}
diff --git a/pkgs/applications/audio/in-formant/default.nix b/pkgs/applications/audio/in-formant/default.nix
new file mode 100644
index 00000000000..7cf0fb8c145
--- /dev/null
+++ b/pkgs/applications/audio/in-formant/default.nix
@@ -0,0 +1,45 @@
+{ stdenv, cmake, lib, fetchFromGitHub, qt5, fftw, libtorch-bin, portaudio, eigen
+, xorg, pkg-config, autoPatchelfHook, soxr
+}:
+
+stdenv.mkDerivation rec {
+  pname = "in-formant";
+  version = "2021-06-30";
+
+  # no Qt6 yet, so we're stuck in the last Qt5-supporting commit: https://github.com/NixOS/nixpkgs/issues/108008
+  src = fetchFromGitHub {
+    owner = "in-formant";
+    repo = "in-formant";
+    rev = "e28e628cf5ff0949a7b046d220cc884f6035f31a";
+    sha256 = "sha256-YvtV0wGUNmI/+GGxrIfTk/l8tqUsWgc/LAI17X+AWGI=";
+    fetchSubmodules = true;
+  };
+
+  nativeBuildInputs = [ cmake pkg-config qt5.wrapQtAppsHook autoPatchelfHook ];
+
+  buildInputs = [
+    qt5.qtbase
+    qt5.qtquickcontrols
+    qt5.qtquickcontrols2
+    qt5.qtcharts
+    fftw
+    libtorch-bin
+    portaudio
+    eigen
+    xorg.libxcb
+    soxr
+  ];
+
+  installPhase = ''
+    mkdir -p $out/bin
+    cp in-formant $out/bin
+  '';
+
+  meta = with lib; {
+    description = "A real-time pitch and formant tracking software";
+    homepage = "https://github.com/in-formant/in-formant";
+    license = licenses.asl20;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ ckie ];
+  };
+}
diff --git a/pkgs/applications/audio/indicator-sound-switcher/default.nix b/pkgs/applications/audio/indicator-sound-switcher/default.nix
new file mode 100644
index 00000000000..6326d7cc563
--- /dev/null
+++ b/pkgs/applications/audio/indicator-sound-switcher/default.nix
@@ -0,0 +1,62 @@
+{ python3Packages
+, lib
+, fetchFromGitHub
+, perlPackages
+, gettext
+, gtk3
+, gobject-introspection
+, intltool, wrapGAppsHook, glib
+, librsvg
+, libayatana-appindicator-gtk3
+, libpulseaudio
+, keybinder3
+, gdk-pixbuf
+}:
+
+python3Packages.buildPythonApplication rec {
+  pname = "indicator-sound-switcher";
+  version = "2.3.7";
+
+  src = fetchFromGitHub {
+    owner = "yktoo";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "sha256-agzU3Z3E6NvCnlsz9L719LqMTm8EmYg3TY/2lWTYgKs=";
+  };
+
+  postPatch = ''
+    substituteInPlace lib/indicator_sound_switcher/lib_pulseaudio.py \
+      --replace "CDLL('libpulse.so.0')" "CDLL('${libpulseaudio}/lib/libpulse.so')"
+  '';
+
+  nativeBuildInputs = [
+    gettext
+    intltool
+    wrapGAppsHook
+    glib
+    gdk-pixbuf
+  ];
+
+  buildInputs = [
+    librsvg
+  ];
+
+  propagatedBuildInputs = [
+    python3Packages.setuptools
+    python3Packages.pygobject3
+    gtk3
+    gobject-introspection
+    librsvg
+    libayatana-appindicator-gtk3
+    libpulseaudio
+    keybinder3
+  ];
+
+  meta = with lib; {
+    description = "Sound input/output selector indicator for Linux";
+    homepage = "https://yktoo.com/en/software/sound-switcher-indicator/";
+    license = licenses.gpl3Plus;
+    maintainers = with maintainers; [ alexnortung ];
+    platforms = [ "x86_64-linux" ];
+  };
+}
diff --git a/pkgs/applications/audio/industrializer/default.nix b/pkgs/applications/audio/industrializer/default.nix
new file mode 100644
index 00000000000..91f7175e391
--- /dev/null
+++ b/pkgs/applications/audio/industrializer/default.nix
@@ -0,0 +1,50 @@
+{ lib, stdenv
+, fetchurl
+, alsa-lib
+, audiofile
+, autoconf
+, automake
+, gnome2
+, gtk2
+, libjack2
+, libtool
+, libxml2
+, pkg-config
+}:
+
+stdenv.mkDerivation rec {
+  pname = "industrializer";
+  version = "0.2.6";
+  src = fetchurl {
+    url = "mirror://sourceforge/project/${pname}/ps${pname}-${version}.tar.bz2";
+    sha256 = "0vls94hqpkk8h17da6fddgqbl5dgm6250av3raimhhzwvm5r1gfi";
+  };
+
+  nativeBuildInputs = [ pkg-config ];
+
+  buildInputs = [
+    alsa-lib
+    audiofile
+    autoconf
+    automake
+    gnome2.gtkglext
+    gtk2
+    libjack2
+    libtool
+    libxml2
+  ];
+
+  preConfigure = "./autogen.sh";
+
+  meta = {
+    description = "This program generates synthesized percussion sounds using physical modelling";
+    longDescription = ''
+      The range of sounds possible include but is not limited to cymbal sounds, metallic noises, bubbly sounds, and chimes.
+      After a sound is rendered, it can be played and then saved to a .WAV file.
+    '';
+    homepage = "https://sourceforge.net/projects/industrializer/";
+    license = lib.licenses.gpl2Plus;
+    maintainers = [ lib.maintainers.magnetophon ];
+    platforms = lib.platforms.linux;
+  };
+}
diff --git a/pkgs/applications/audio/infamousPlugins/default.nix b/pkgs/applications/audio/infamousPlugins/default.nix
new file mode 100644
index 00000000000..dd96f720e93
--- /dev/null
+++ b/pkgs/applications/audio/infamousPlugins/default.nix
@@ -0,0 +1,43 @@
+{ lib, stdenv, fetchFromGitHub, fetchpatch, pkg-config, cairomm, cmake, lv2, libpthreadstubs, libXdmcp, libXft, ntk, pcre, fftwFloat, zita-resampler }:
+
+stdenv.mkDerivation rec {
+  pname = "infamousPlugins";
+  version = "0.3.0";
+
+  src = fetchFromGitHub {
+    owner = "ssj71";
+    repo = "infamousPlugins";
+    rev = "v${version}";
+    sha256 = "1r72agk5nxf5k0mghcc2j90z43j5d9i7rqjmf49jfyqnd443isip";
+  };
+
+  patches = [
+    (fetchpatch {
+      url = "https://github.com/ssj71/infamousPlugins/commit/06dd967b4736ea886dc1dc07f882cb1563961582.patch";
+      sha256 = "08xwh6px13y1gykaw103nhvjms7vgbgkcm0avh9f5d2d7aadq0l2";
+    })
+  ];
+  nativeBuildInputs = [ pkg-config cmake ];
+  buildInputs = [ cairomm lv2 libpthreadstubs libXdmcp libXft ntk pcre fftwFloat zita-resampler ];
+
+  meta = with 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/pkgs/applications/audio/ingen/default.nix b/pkgs/applications/audio/ingen/default.nix
new file mode 100644
index 00000000000..a0defad0da0
--- /dev/null
+++ b/pkgs/applications/audio/ingen/default.nix
@@ -0,0 +1,43 @@
+{ lib, stdenv, fetchgit, boost, ganv, glibmm, gtkmm2, libjack2, lilv
+, lv2, makeWrapper, pkg-config, python3, raul, serd, sord, sratom
+, wafHook
+, suil
+}:
+
+stdenv.mkDerivation  rec {
+  pname = "ingen";
+  version = "unstable-2019-12-09";
+  name = "${pname}-${version}";
+
+  src = fetchgit {
+    url = "https://gitlab.com/drobilla/ingen.git";
+    rev = "e32f32a360f2bf8f017ea347b6d1e568c0beaf68";
+    sha256 = "0wjn2i3j7jb0bmxymg079xpk4iplb91q0xqqnvnpvyldrr7gawlb";
+    deepClone = true;
+  };
+
+  nativeBuildInputs = [ pkg-config wafHook python3 python3.pkgs.wrapPython ];
+  buildInputs = [
+    boost ganv glibmm gtkmm2 libjack2 lilv lv2
+    python3 raul serd sord sratom suil
+  ];
+
+  strictDeps = true;
+
+  pythonPath = [
+    python3
+    python3.pkgs.rdflib
+  ];
+
+  postInstall = ''
+    wrapPythonProgramsIn "$out/bin" "$out $pythonPath"
+  '';
+
+  meta = with lib; {
+    description = "A modular audio processing system using JACK and LV2 or LADSPA plugins";
+    homepage = "http://drobilla.net/software/ingen";
+    license = licenses.agpl3Plus;
+    maintainers = [ maintainers.goibhniu ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/pkgs/applications/audio/ir.lv2/default.nix b/pkgs/applications/audio/ir.lv2/default.nix
new file mode 100644
index 00000000000..6c2b9c5be9c
--- /dev/null
+++ b/pkgs/applications/audio/ir.lv2/default.nix
@@ -0,0 +1,43 @@
+{ lib, stdenv, fetchFromGitHub, fftw, gtk2, lv2, libsamplerate, libsndfile, pkg-config, zita-convolver }:
+
+stdenv.mkDerivation rec {
+  pname = "ir.lv2";
+  version = "1.2.4";
+
+  src = fetchFromGitHub {
+    owner = "tomszilagyi";
+    repo = "ir.lv2";
+    rev = version;
+    sha256 = "1p6makmgr898fakdxzl4agh48qqwgv1k1kwm8cgq187n0mhiknp6";
+  };
+
+  buildInputs = [ fftw gtk2 lv2 libsamplerate libsndfile zita-convolver ];
+
+  nativeBuildInputs = [  pkg-config ];
+
+  postPatch = ''
+     # Fix build with lv2 1.18: https://github.com/tomszilagyi/ir.lv2/pull/20
+     find . -type f -exec fgrep -q LV2UI_Descriptor {} \; \
+       -exec sed -i {} -e 's/const struct _\?LV2UI_Descriptor/const LV2UI_Descriptor/' \;
+   '';
+
+
+  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 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/pkgs/applications/audio/jaaa/default.nix b/pkgs/applications/audio/jaaa/default.nix
new file mode 100644
index 00000000000..48ffd5df515
--- /dev/null
+++ b/pkgs/applications/audio/jaaa/default.nix
@@ -0,0 +1,32 @@
+{ lib, stdenv, fetchurl, alsa-lib, libclthreads, libclxclient, libX11, libXft, libXrender, fftwFloat, libjack2, zita-alsa-pcmi }:
+
+stdenv.mkDerivation rec {
+  pname = "jaaa";
+  version = "0.9.2";
+
+  src = fetchurl {
+    url = "https://kokkinizita.linuxaudio.org/linuxaudio/downloads/${pname}-${version}.tar.bz2";
+    sha256 = "1czksxx2g8na07k7g57qlz0vvkkgi5bzajcx7vc7jhb94hwmmxbc";
+  };
+
+  buildInputs = [
+    alsa-lib libclthreads libclxclient libX11 libXft libXrender fftwFloat libjack2 zita-alsa-pcmi
+  ];
+
+  makeFlags = [
+    "PREFIX=$(out)"
+    "SUFFIX=''"
+  ];
+
+  preConfigure = ''
+    cd ./source/
+  '';
+
+  meta = with 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/pkgs/applications/audio/jack-capture/default.nix b/pkgs/applications/audio/jack-capture/default.nix
new file mode 100644
index 00000000000..44e6dd1cd8a
--- /dev/null
+++ b/pkgs/applications/audio/jack-capture/default.nix
@@ -0,0 +1,31 @@
+{ lib, stdenv, fetchurl, libjack2, libsndfile, pkg-config }:
+
+stdenv.mkDerivation rec {
+  pname = "jack_capture";
+  version = "0.9.73";
+
+  src = fetchurl {
+    url = "https://archive.notam02.no/arkiv/src/${pname}-${version}.tar.gz";
+    sha256 = "1pji0zdwm3kxjrkbzj7fnxhr8ncrc8pyqnwyrh47fhypgqjv1br1";
+  };
+
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = [ libjack2 libsndfile ];
+
+  buildPhase = "PREFIX=$out make jack_capture";
+
+  installPhase = ''
+    mkdir -p $out/bin
+    cp jack_capture $out/bin/
+  '';
+
+  hardeningDisable = [ "format" ];
+
+  meta = with lib; {
+    description = "A program for recording soundfiles with jack";
+    homepage = "http://archive.notam02.no/arkiv/src";
+    license = licenses.gpl2;
+    maintainers = [ maintainers.goibhniu ];
+    platforms = lib.platforms.linux;
+  };
+}
diff --git a/pkgs/applications/audio/jack-oscrolloscope/default.nix b/pkgs/applications/audio/jack-oscrolloscope/default.nix
new file mode 100644
index 00000000000..9905d072361
--- /dev/null
+++ b/pkgs/applications/audio/jack-oscrolloscope/default.nix
@@ -0,0 +1,27 @@
+{ lib, stdenv, fetchurl, SDL, libjack2, libGLU, libGL, pkg-config }:
+
+stdenv.mkDerivation rec {
+  pname = "jack_oscrolloscope";
+  version = "0.7";
+
+  src = fetchurl {
+    url = "http://das.nasophon.de/download/${pname}-${version}.tar.gz";
+    sha256 = "1pl55in0sj7h5r06n1v91im7d18pplvhbjhjm1fdl39zwnyxiash";
+  };
+
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = [ SDL libjack2 libGLU libGL ];
+
+  installPhase = ''
+    mkdir -p $out/bin
+    mv jack_oscrolloscope $out/bin/
+  '';
+
+  meta = with lib; {
+    description = "A simple waveform viewer for JACK";
+    homepage = "http://das.nasophon.de/jack_oscrolloscope";
+    license = licenses.gpl2;
+    maintainers = [ maintainers.goibhniu ];
+    platforms = lib.platforms.linux;
+  };
+}
diff --git a/pkgs/applications/audio/jack-rack/default.nix b/pkgs/applications/audio/jack-rack/default.nix
new file mode 100644
index 00000000000..25ee53d3f43
--- /dev/null
+++ b/pkgs/applications/audio/jack-rack/default.nix
@@ -0,0 +1,26 @@
+{ lib, stdenv, fetchurl, pkg-config, libjack2, ladspaH, gtk2, alsa-lib, libxml2, lrdf }:
+stdenv.mkDerivation rec {
+  pname = "jack-rack";
+  version = "1.4.7";
+  src = fetchurl {
+    url = "mirror://sourceforge/${pname}/${pname}-${version}.tar.bz2";
+    sha256 = "1lmibx9gicagcpcisacj6qhq6i08lkl5x8szysjqvbgpxl9qg045";
+  };
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = [ libjack2 ladspaH gtk2 alsa-lib libxml2 lrdf ];
+  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 = lib.licenses.gpl2Plus;
+    maintainers = [ lib.maintainers.astsmtl ];
+    platforms = lib.platforms.linux;
+  };
+}
diff --git a/pkgs/applications/audio/jackmeter/default.nix b/pkgs/applications/audio/jackmeter/default.nix
new file mode 100644
index 00000000000..95fc88a8696
--- /dev/null
+++ b/pkgs/applications/audio/jackmeter/default.nix
@@ -0,0 +1,22 @@
+{ lib, stdenv, fetchurl, libjack2, pkg-config }:
+
+stdenv.mkDerivation rec {
+  pname = "jackmeter";
+  version = "0.4";
+
+  src = fetchurl {
+    url = "https://www.aelius.com/njh/${pname}/${pname}-${version}.tar.gz";
+    sha256 = "1cnvgx3jv0yvxlqy0l9k285zgvazmh5k8m4l7lxckjfm5bn6hm1r";
+  };
+
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = [ libjack2 ];
+
+  meta = {
+    description = "Console jack loudness meter";
+    homepage = "https://www.aelius.com/njh/jackmeter/";
+    license = lib.licenses.gpl2;
+    maintainers = [ lib.maintainers.marcweber ];
+    platforms = lib.platforms.linux;
+  };
+}
diff --git a/pkgs/applications/audio/jackmix/default.nix b/pkgs/applications/audio/jackmix/default.nix
new file mode 100644
index 00000000000..e9d2abee91c
--- /dev/null
+++ b/pkgs/applications/audio/jackmix/default.nix
@@ -0,0 +1,35 @@
+{ mkDerivation, lib, fetchFromGitHub, pkg-config, sconsPackages, qtbase, lash, libjack2, jack ? libjack2, alsa-lib }:
+
+mkDerivation rec {
+  pname = "jackmix";
+  version = "0.6.0";
+
+  src = fetchFromGitHub {
+    owner = "kampfschlaefer";
+    repo = "jackmix";
+    rev = version;
+    sha256 = "0p59411vk38lccn24r7nih10jpgg9i46yc26zpc3x13amxwwpd4h";
+  };
+
+  patches = [ ./no_error.patch ];
+
+  nativeBuildInputs = [ sconsPackages.scons_3_1_2 pkg-config ];
+  buildInputs = [
+    qtbase
+    lash
+    jack
+    alsa-lib
+  ];
+
+  installPhase = ''
+    install -D jackmix/jackmix $out/bin/jackmix
+  '';
+
+  meta = with lib; {
+    description = "Matrix-Mixer for the Jack-Audio-connection-Kit";
+    homepage = "https://github.com/kampfschlaefer/jackmix";
+    license = licenses.gpl2Only;
+    maintainers = with maintainers; [ kampfschlaefer ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/pkgs/applications/audio/jackmix/no_error.patch b/pkgs/applications/audio/jackmix/no_error.patch
new file mode 100644
index 00000000000..593800134e1
--- /dev/null
+++ b/pkgs/applications/audio/jackmix/no_error.patch
@@ -0,0 +1,13 @@
+diff --git a/SConstruct b/SConstruct
+index 8bf6517..a432aa9 100644
+--- a/SConstruct
++++ b/SConstruct
+@@ -16,7 +16,7 @@ env = Environment(
+ env.Replace(LIBS="")
+ env.Replace(LIBPATH="")
+ 
+-env.MergeFlags(['-Wall', '-Werror', '-g', '-fpic', '-std=c++11'])
++env.MergeFlags(['-g', '-fpic', '-std=c++11'])
+ 
+ tests = {}
+ tests.update(env['PKGCONFIG_TESTS'])
diff --git a/pkgs/applications/audio/jalv/default.nix b/pkgs/applications/audio/jalv/default.nix
new file mode 100644
index 00000000000..b640b55c547
--- /dev/null
+++ b/pkgs/applications/audio/jalv/default.nix
@@ -0,0 +1,25 @@
+{ lib, stdenv, fetchurl, gtk2, libjack2, lilv, lv2, pkg-config, python3
+, serd, sord , sratom, suil, wafHook }:
+
+stdenv.mkDerivation  rec {
+  pname = "jalv";
+  version = "1.6.6";
+
+  src = fetchurl {
+    url = "https://download.drobilla.net/${pname}-${version}.tar.bz2";
+    sha256 = "sha256-ktFBeBtmQ3MgfDQ868XpuM7UYfryb9zLld8AB7BjnhY=";
+  };
+
+  nativeBuildInputs = [ pkg-config wafHook ];
+  buildInputs = [
+    gtk2 libjack2 lilv lv2 python3 serd sord sratom suil
+  ];
+
+  meta = with 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/pkgs/applications/audio/jamesdsp/default.nix b/pkgs/applications/audio/jamesdsp/default.nix
new file mode 100644
index 00000000000..16683564b2c
--- /dev/null
+++ b/pkgs/applications/audio/jamesdsp/default.nix
@@ -0,0 +1,60 @@
+{ lib
+, mkDerivation
+, fetchFromGitHub
+, pipewire
+, glibmm
+, qmake
+, makeDesktopItem
+, pkg-config
+, libarchive
+, fetchpatch
+}:
+
+mkDerivation rec{
+  pname = "jamesdsp";
+  version = "2.3";
+  src = fetchFromGitHub rec{
+    owner = "Audio4Linux";
+    repo = "JDSP4Linux";
+    fetchSubmodules = true;
+    rev = version;
+    hash = "sha256-Hkzurr+s+vvSyOMCYH9kHI+nIm6mL9yORGNzY2FXslc=";
+  };
+
+  patches = [
+    # fixing /usr install assumption, remove on version bump
+    (fetchpatch {
+      url = "https://github.com/Audio4Linux/JDSP4Linux/commit/003c9e9fc426f83e269aed6e05be3ed55273931a.patch";
+      hash = "sha256-crll/a7C9pUq9eL5diq8/YgC5bNC6SrdijZEBxZpJ8E=";
+    })
+  ];
+
+  nativeBuildInputs = [ qmake pkg-config ];
+  buildInputs = [
+    glibmm
+    libarchive
+    pipewire
+  ];
+
+  desktopItems = [
+    (makeDesktopItem {
+      name = "jamesdsp";
+      desktopName = "JamesDSP";
+      genericName = "Audio effects processor";
+      exec = "jamesdsp";
+      icon = "jamesdsp";
+      comment = "JamesDSP for Linux";
+      categories = [ "AudioVideo" "Audio" ];
+      startupNotify = false;
+      keywords = [ "equalizer" "audio" "effect" ];
+    })
+  ];
+
+  meta = with lib;{
+    description = "An audio effect processor for PipeWire clients";
+    homepage = "https://github.com/Audio4Linux/JDSP4Linux";
+    license = licenses.gpl3Only;
+    maintainers = with maintainers;[ pasqui23 ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/pkgs/applications/audio/jamin/default.nix b/pkgs/applications/audio/jamin/default.nix
new file mode 100644
index 00000000000..325d115b581
--- /dev/null
+++ b/pkgs/applications/audio/jamin/default.nix
@@ -0,0 +1,31 @@
+{ lib, stdenv, fetchurl, fftwFloat, gtk2, ladspaPlugins, libjack2, liblo, libxml2
+, makeWrapper, pkg-config, perlPackages
+}:
+
+stdenv.mkDerivation rec {
+  version = "0.95.0";
+  name = "jamin-${version}";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/jamin/jamin-${version}.tar.gz";
+    sha256 = "0g5v74cm0q3p3pzl6xmnp4rqayaymfli7c6z8s78h9rgd24fwbvn";
+  };
+
+  nativeBuildInputs = [ pkg-config makeWrapper ];
+  buildInputs = [ fftwFloat gtk2 ladspaPlugins libjack2 liblo libxml2 ]
+    ++ (with perlPackages; [ perl XMLParser ]);
+
+  NIX_LDFLAGS = "-ldl";
+
+  postInstall = ''
+    wrapProgram $out/bin/jamin --set LADSPA_PATH ${ladspaPlugins}/lib/ladspa
+  '';
+
+  meta = with lib; {
+    homepage = "http://jamin.sourceforge.net";
+    description = "JACK Audio Mastering interface";
+    license = licenses.gpl2;
+    maintainers = [ maintainers.nico202 ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/pkgs/applications/audio/jamulus/default.nix b/pkgs/applications/audio/jamulus/default.nix
new file mode 100644
index 00000000000..8c67c0fd7c1
--- /dev/null
+++ b/pkgs/applications/audio/jamulus/default.nix
@@ -0,0 +1,27 @@
+{ mkDerivation, lib, fetchFromGitHub, pkg-config, qtscript, qmake, libjack2
+}:
+
+mkDerivation rec {
+  pname = "jamulus";
+  version = "3.8.2";
+  src = fetchFromGitHub {
+    owner = "jamulussoftware";
+    repo = "jamulus";
+    rev = "r${lib.replaceStrings [ "." ] [ "_" ] version}";
+    sha256 = "sha256-K2HznkntDhp+I8DHJk5Cuh5cR8yjwfzX+pGGzS8yVLQ=";
+  };
+
+  nativeBuildInputs = [ pkg-config qmake ];
+  buildInputs = [ qtscript libjack2 ];
+
+  qmakeFlags = [ "CONFIG+=noupcasename" ];
+
+  meta = {
+    description = "Enables musicians to perform real-time jam sessions over the internet";
+    longDescription = "You also need to enable JACK and should enable several real-time optimizations. See project website for details";
+    homepage = "https://github.com/corrados/jamulus/wiki";
+    license = lib.licenses.gpl2Plus;
+    platforms = lib.platforms.linux;
+    maintainers = [ lib.maintainers.seb314 ];
+  };
+}
diff --git a/pkgs/applications/audio/japa/default.nix b/pkgs/applications/audio/japa/default.nix
new file mode 100644
index 00000000000..c13b38f7acd
--- /dev/null
+++ b/pkgs/applications/audio/japa/default.nix
@@ -0,0 +1,30 @@
+{ lib, stdenv, fetchurl,   alsa-lib, libjack2, fftwFloat, libclthreads, libclxclient, libX11,  libXft, zita-alsa-pcmi, }:
+
+stdenv.mkDerivation rec {
+  version = "0.9.4";
+  pname = "japa";
+
+  src = fetchurl {
+    url = "https://kokkinizita.linuxaudio.org/linuxaudio/downloads/${pname}-${version}.tar.bz2";
+    sha256 = "sha256-t9wlZr+pE5u6yTpATWDQseC/rf4TFbtG0X9tnTdkB8I=";
+  };
+
+  buildInputs = [ alsa-lib 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 = lib.licenses.gpl2;
+    maintainers = [ lib.maintainers.magnetophon ];
+    platforms = lib.platforms.linux;
+  };
+}
diff --git a/pkgs/applications/audio/jconvolver/default.nix b/pkgs/applications/audio/jconvolver/default.nix
new file mode 100644
index 00000000000..5294ae5f13a
--- /dev/null
+++ b/pkgs/applications/audio/jconvolver/default.nix
@@ -0,0 +1,114 @@
+{ lib, stdenv, fetchurl, flac, unzip, fftwFloat, hybridreverb2, libclthreads, libjack2, libsndfile, zita-convolver }:
+
+stdenv.mkDerivation rec {
+  pname = "jconvolver";
+  version = "1.1.0";
+
+  src = fetchurl {
+    url = "https://kokkinizita.linuxaudio.org/linuxaudio/downloads/${pname}-${version}.tar.bz2";
+    sha256 = "03fq1rk5wyn32w0aaa9vqijnw9x9i0i7sv4nhsf949bk5lvi2nmc";
+  };
+
+  reverbs = fetchurl {
+    url = "http://kokkinizita.linuxaudio.org/linuxaudio/downloads/jconvolver-reverbs.tar.bz2";
+    sha256 = "127aj211xfqp37c94d9cn0mmwzbjkj3f6br5gr67ckqirvsdkndi";
+  };
+  weird = fetchurl {
+    url = "http://kokkinizita.linuxaudio.org/linuxaudio/downloads/weird.wav";
+    sha256 = "14xchdikx5k8zlgwglrqi168vki3n3rwhn73dkbj5qwh2ndrlyrc";
+  };
+
+  porihall-sf = fetchurl {
+    url = "http://legacy.spa.aalto.fi/projects/poririrs/wavs/sndfld.zip";
+    sha256 = "0z1kmdin3vcy6wmnym9jlfh8hwvci9404hff02cb98iw2slxid42";
+  };
+  porihall-bd = fetchurl {
+    url = "http://legacy.spa.aalto.fi/projects/poririrs/wavs/bin_dfeq.zip";
+    sha256 = "03m2brfxs851sag4z7kd71h6anv6hj34zcambwib0v1byg8vyplp";
+  };
+  porihall-c = fetchurl {
+    url = "http://legacy.spa.aalto.fi/projects/poririrs/wavs/cardioid.zip";
+    sha256 = "0ilbfvb2kvg5z6zi0mf2k4n0vgpir3iz5fa53xw92c07fs0cx36w";
+  };
+
+  spacenet-hm2 = fetchurl {
+    url = "https://webfiles.york.ac.uk/OPENAIR/IRs/hamilton-mausoleum/b-format/hm2_000_bformat_48k.wav";
+    sha256 = "1icnzfzq3mccbmnvmvh22mw8g8dci4i9h7lgrpmycj58v3gnb1p5";
+  };
+  spacenet-lyd3 = fetchurl {
+    url = "https://webfiles.york.ac.uk/OPENAIR/IRs/st-andrews-church/b-format/lyd3_000_bformat_48k.wav";
+    sha256 = "144cc0i91q5i72lwbxydx3nvxrd12j7clxjhwa2b8sf69ypz58wd";
+  };
+  spacenet-mh3 = fetchurl {
+    url = "https://webfiles.york.ac.uk/OPENAIR/IRs/maes-howe/b-format/mh3_000_bformat_48k.wav";
+    sha256 = "1c6v9jlm88l1sx2383yivycdrs9jqfsfx8cpbkjg19v2x1dfns0b";
+  };
+  spacenet-minster1 = fetchurl {
+    url = "https://webfiles.york.ac.uk/OPENAIR/IRs/york-minster/b-format/minster1_bformat_48k.wav";
+    sha256 = "1cs26pawjkv6qvwhfirfvzh21xvnmx8yh7f4xcr79cxv5c6hhnrw";
+  };
+
+  nativeBuildInputs = [ flac unzip ];
+
+  buildInputs = [
+    fftwFloat
+    hybridreverb2
+    libclthreads
+    libjack2
+    libsndfile
+    zita-convolver
+  ];
+
+  outputs = [ "bin" "out" "doc" ];
+
+  preConfigure = ''
+    cd source
+  '';
+
+  makeFlags = [
+    "PREFIX=$(bin)"
+  ];
+
+  postInstall = ''
+    mkdir -p $doc/share/doc/jconvolver
+    cp -r ../[A-Z]* $doc/share/doc/jconvolver/
+
+    mkdir -p $out/share/jconvolver
+    cp -r ../config-files $out/share/jconvolver/
+    cd $out/share/jconvolver
+    for conf in */*.conf */*/*.conf; do
+      if grep -q /audio/ $conf; then
+        substituteInPlace $conf --replace /audio/ $out/share/jconvolver/
+      fi
+    done
+    substituteInPlace config-files/xtalk-cancel/EYCv2-44.conf --replace /cd "#/cd"
+    ln -s ${weird} config-files/weird.wav
+
+    tar xf ${reverbs}
+    cd reverbs
+    unzip -d porihall ${porihall-sf} s1_r4_sf.wav
+    unzip -d porihall ${porihall-bd} s1_r3_bd.wav
+    unzip -d porihall ${porihall-c} s1_r3_c.wav
+
+    mkdir spacenet
+    ln -s ${spacenet-hm2} spacenet/HM2_000_WXYZ_48k.amb
+    ln -s ${spacenet-lyd3} spacenet/Lyd3_000_WXYZ_48k.amb
+    ln -s ${spacenet-mh3} spacenet/MH3_000_WXYZ_48k.amb
+    ln -s ${spacenet-minster1} spacenet/Minster1_000_WXYZ_48k.amb
+
+    mkdir -p hybridreverb-database/large_concert_hall/music/8m
+    for flac in ${hybridreverb2}/share/HybridReverb2/RIR_Database/large_concert_hall/music/8m/*.flac; do
+      flac --output-prefix=hybridreverb-database/large_concert_hall/music/8m/ -d $flac
+    done
+  '';
+
+  enableParallelBuilding = true;
+
+  meta = with lib; {
+    description = "A JACK client and audio file convolver with reverb samples";
+    homepage = "https://kokkinizita.linuxaudio.org/linuxaudio/";
+    license = licenses.gpl2Plus;
+    maintainers = with maintainers; [ orivej ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/pkgs/applications/audio/jellycli/default.nix b/pkgs/applications/audio/jellycli/default.nix
new file mode 100644
index 00000000000..cfb9deb5872
--- /dev/null
+++ b/pkgs/applications/audio/jellycli/default.nix
@@ -0,0 +1,33 @@
+{ lib, fetchFromGitHub, buildGoModule, alsa-lib }:
+
+buildGoModule rec {
+  pname = "jellycli";
+  version = "0.9.1";
+
+  src = fetchFromGitHub {
+    owner = "tryffel";
+    repo = "jellycli";
+    rev = "v${version}";
+    sha256 = "1awzcxnf175a794rhzbmqxxjss77mfa1yrr0wgdxaivrlkibxjys";
+  };
+
+  vendorSha256 = "02fwsnrhj09m0aa199plpqlsjrwpmrk4c80fszzm07s5vmjqvnfy";
+
+  patches = [
+    # Fixes log file path for tests.
+    ./fix-test-dir.patch
+  ];
+
+  buildInputs = [ alsa-lib ];
+
+  meta = with lib; {
+    description = "Jellyfin terminal client";
+    longDescription = ''
+      Terminal music player, works with Jellyfin (>= 10.6) , Emby (>= 4.4), and
+      Subsonic comptabile servers (API >= 1.16), e.g., Navidrome.
+    '';
+    homepage = "https://github.com/tryffel/jellycli";
+    license = licenses.gpl3Plus;
+    maintainers = with maintainers; [ oxzi ];
+  };
+}
diff --git a/pkgs/applications/audio/jellycli/fix-test-dir.patch b/pkgs/applications/audio/jellycli/fix-test-dir.patch
new file mode 100644
index 00000000000..83cacfe9af0
--- /dev/null
+++ b/pkgs/applications/audio/jellycli/fix-test-dir.patch
@@ -0,0 +1,13 @@
+diff --git a/config/config_test.go b/config/config_test.go
+index 9f63a7e..7e790b8 100644
+--- a/config/config_test.go
++++ b/config/config_test.go
+@@ -110,7 +110,7 @@ func TestInitEmptyConfig(t *testing.T) {
+ 		Subsonic: Subsonic{},
+ 		Player: Player{
+ 			Server:                "jellyfin",
+-			LogFile:               "/tmp/jellycli.log",
++			LogFile:               "/build/jellycli.log",
+ 			LogLevel:              "info",
+ 			AudioBufferingMs:      150,
+ 			HttpBufferingS:        5,
diff --git a/pkgs/applications/audio/jmusicbot/default.nix b/pkgs/applications/audio/jmusicbot/default.nix
new file mode 100644
index 00000000000..60df749a142
--- /dev/null
+++ b/pkgs/applications/audio/jmusicbot/default.nix
@@ -0,0 +1,31 @@
+{ stdenv, lib, fetchurl, makeWrapper, jre }:
+
+stdenv.mkDerivation rec {
+  pname = "JMusicBot";
+  version = "0.3.6";
+
+  src = fetchurl {
+    url = "https://github.com/jagrosh/MusicBot/releases/download/${version}/JMusicBot-${version}.jar";
+    sha256 = "sha256-Hc3dsOADC+jVZScY19OYDkHimntMjdw/BoB3EUS/d0k=";
+  };
+
+  dontUnpack = true;
+
+  nativeBuildInputs = [ makeWrapper ];
+
+  installPhase = ''
+    mkdir -p $out/lib
+    cp $src $out/lib/JMusicBot
+
+    makeWrapper ${jre}/bin/java $out/bin/JMusicBot \
+      --add-flags "-Xmx1G -Dnogui=true -Djava.util.concurrent.ForkJoinPool.common.parallelism=1 -jar $out/lib/JMusicBot"
+  '';
+
+  meta = with lib; {
+    description = "Discord music bot that's easy to set up and run yourself";
+    homepage = "https://github.com/jagrosh/MusicBot";
+    license = licenses.asl20;
+    maintainers = with maintainers; [ SuperSandro2000 ];
+    platforms = platforms.all;
+  };
+}
diff --git a/pkgs/applications/audio/kapitonov-plugins-pack/default.nix b/pkgs/applications/audio/kapitonov-plugins-pack/default.nix
new file mode 100644
index 00000000000..655fc6a9608
--- /dev/null
+++ b/pkgs/applications/audio/kapitonov-plugins-pack/default.nix
@@ -0,0 +1,43 @@
+{ lib, stdenv, fetchFromGitHub, faust, meson, ninja, pkg-config
+, boost, cairo, fftw, gnome, ladspa-sdk, libxcb, lv2, xcbutilwm
+, zita-convolver, zita-resampler
+ }:
+
+stdenv.mkDerivation rec {
+  pname = "kapitonov-plugins-pack";
+  version = "1.2.1";
+
+  src = fetchFromGitHub {
+    owner = "olegkapitonov";
+    repo = pname;
+    rev = version;
+    sha256 = "1mxi7b1vrzg25x85lqk8c77iziqrqyz18mqkfjlz09sxp5wfs9w4";
+  };
+
+  nativeBuildInputs = [
+    faust
+    meson
+    ninja
+    pkg-config
+  ];
+
+  buildInputs = [
+    boost
+    cairo
+    fftw
+    ladspa-sdk
+    libxcb
+    lv2
+    xcbutilwm
+    zita-convolver
+    zita-resampler
+  ];
+
+  meta = with lib; {
+    description = "Set of LADSPA and LV2 plugins for guitar sound processing";
+    homepage = "https://github.com/olegkapitonov/Kapitonov-Plugins-Pack";
+    license = licenses.gpl3;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ magnetophon ];
+  };
+}
diff --git a/pkgs/applications/audio/keyfinder-cli/default.nix b/pkgs/applications/audio/keyfinder-cli/default.nix
new file mode 100644
index 00000000000..62db3d79690
--- /dev/null
+++ b/pkgs/applications/audio/keyfinder-cli/default.nix
@@ -0,0 +1,31 @@
+{ lib, stdenv, fetchFromGitHub, ffmpeg, libkeyfinder }:
+
+stdenv.mkDerivation rec {
+  pname = "keyfinder-cli";
+  version = "1.1.1";
+
+  src = fetchFromGitHub {
+    repo = "keyfinder-cli";
+    owner = "EvanPurkhiser";
+    rev = "v${version}";
+    sha256 = "1mlcygbj3gqii3cz8jd6ks1lz612i4jp0343qjg293xm39fg47ns";
+  };
+
+  buildInputs = [ ffmpeg libkeyfinder ];
+
+  makeFlags = [ "PREFIX=$(out)" ];
+
+  enableParallelBuilding = true;
+
+  meta = with 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/pkgs/applications/audio/keyfinder/default.nix b/pkgs/applications/audio/keyfinder/default.nix
new file mode 100644
index 00000000000..c3667ee57a5
--- /dev/null
+++ b/pkgs/applications/audio/keyfinder/default.nix
@@ -0,0 +1,40 @@
+{ lib, mkDerivation, fetchFromGitHub, libav_0_8, libkeyfinder, qtbase, qtxmlpatterns, qmake, taglib }:
+
+mkDerivation rec {
+  pname = "keyfinder";
+  version = "2.4";
+
+  src = fetchFromGitHub {
+    sha256 = "11yhdwan7bz8nn8vxr54drckyrnlxynhx5s981i475bbccg8g7ls";
+    rev = "530034d6fe86d185f6a68b817f8db5f552f065d7"; # tag is missing
+    repo = "is_KeyFinder";
+    owner = "ibsh";
+  };
+
+  nativeBuildInputs = [ qmake ];
+  buildInputs = [ libav_0_8 libkeyfinder qtbase qtxmlpatterns taglib ];
+
+  postPatch = ''
+    substituteInPlace is_KeyFinder.pro \
+       --replace "-stdlib=libc++" "" \
+       --replace "\$\$[QT_INSTALL_PREFIX]" "$out"
+  '';
+
+  dontWrapQtApps = true;
+
+  meta = with 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/pkgs/applications/audio/kid3/default.nix b/pkgs/applications/audio/kid3/default.nix
new file mode 100644
index 00000000000..a29ddbb8150
--- /dev/null
+++ b/pkgs/applications/audio/kid3/default.nix
@@ -0,0 +1,109 @@
+{ lib
+, stdenv
+, fetchurl
+, automoc4
+, chromaprint
+, cmake
+, docbook_xml_dtd_45
+, docbook_xsl
+, ffmpeg
+, flac
+, id3lib
+, libogg
+, libvorbis
+, libxslt
+, mp4v2
+, phonon
+, pkg-config
+, python3
+, qtbase
+, qtmultimedia
+, qtquickcontrols
+, qttools
+, readline
+, taglib
+, wrapQtAppsHook
+, zlib
+}:
+
+stdenv.mkDerivation rec {
+  pname = "kid3";
+  version = "3.9.1";
+
+  src = fetchurl {
+    url = "https://download.kde.org/stable/${pname}/${version}/${pname}-${version}.tar.xz";
+    sha256 = "sha256-N/HDwfJn7Py4y/GZcIDbeoMEqG+SuRGO23ITZMot8cc=";
+  };
+
+  nativeBuildInputs = [
+    cmake
+    docbook_xml_dtd_45
+    docbook_xsl
+    pkg-config
+    python3
+    wrapQtAppsHook
+  ];
+  buildInputs = [
+    automoc4
+    chromaprint
+    ffmpeg
+    flac
+    id3lib
+    libogg
+    libvorbis
+    libxslt
+    mp4v2
+    phonon
+    qtbase
+    qtmultimedia
+    qtquickcontrols
+    qttools
+    readline
+    taglib
+    zlib
+  ];
+
+  cmakeFlags = [ "-DWITH_APPS=Qt;CLI" ];
+  NIX_LDFLAGS = "-lm -lpthread";
+
+  preConfigure = ''
+    export DOCBOOKDIR="${docbook_xsl}/xml/xsl/docbook/"
+  '';
+
+  meta = with lib; {
+    homepage = "https://kid3.kde.org/";
+    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.
+    '';
+    license = licenses.lgpl2Plus;
+    maintainers = [ maintainers.AndersonTorres ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/pkgs/applications/audio/klick/default.nix b/pkgs/applications/audio/klick/default.nix
new file mode 100644
index 00000000000..281a7148dfe
--- /dev/null
+++ b/pkgs/applications/audio/klick/default.nix
@@ -0,0 +1,24 @@
+{ lib, stdenv, fetchurl, sconsPackages, pkg-config
+, libsamplerate, libsndfile, liblo, libjack2, boost }:
+
+stdenv.mkDerivation rec {
+  pname = "klick";
+  version = "0.12.2";
+
+  src = fetchurl {
+    url = "http://das.nasophon.de/download/${pname}-${version}.tar.gz";
+    sha256 = "1289533c0849b1b66463bf27f7ce5f71736b655cfb7672ef884c7e6eb957ac42";
+  };
+
+  nativeBuildInputs = [ sconsPackages.scons_3_0_1 pkg-config ];
+  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 = lib.licenses.gpl2Plus;
+    platforms = lib.platforms.linux;
+  };
+}
diff --git a/pkgs/applications/audio/klystrack/default.nix b/pkgs/applications/audio/klystrack/default.nix
new file mode 100644
index 00000000000..5d26397efdb
--- /dev/null
+++ b/pkgs/applications/audio/klystrack/default.nix
@@ -0,0 +1,52 @@
+{ lib, stdenv, fetchFromGitHub, fetchpatch
+, SDL2, SDL2_image
+, pkg-config
+}:
+
+stdenv.mkDerivation rec {
+  pname = "klystrack";
+  version = "1.7.6";
+
+  src = fetchFromGitHub {
+    owner = "kometbomb";
+    repo = pname;
+    rev = version;
+    fetchSubmodules = true;
+    sha256 = "1h99sm2ddaq483hhk2s3z4bjbgn0d2h7qna7l7qq98wvhqix8iyz";
+  };
+
+  buildInputs = [
+    SDL2 SDL2_image
+  ];
+  nativeBuildInputs = [ pkg-config ];
+
+  patches = [
+    (fetchpatch {
+      url = "https://github.com/kometbomb/klystrack/commit/bb537595d02140176831c4a1b8e9121978b32d22.patch";
+      sha256 = "06gl9q0jwg039kpxb13lg9x0k59s11968qn4lybgkadvzmhxkgmi";
+    })
+  ];
+
+  buildFlags = [ "PREFIX=${placeholder "out"}" "CFG=release" ];
+
+  installPhase = ''
+    install -Dm755 bin.release/klystrack $out/bin/klystrack
+
+    mkdir -p $out/lib/klystrack
+    cp -R res $out/lib/klystrack
+    cp -R key $out/lib/klystrack
+
+    install -DT icon/256x256.png $out/share/icons/hicolor/256x256/apps/klystrack.png
+    mkdir -p $out/share/applications
+    substitute linux/klystrack.desktop $out/share/applications/klystrack.desktop \
+      --replace "klystrack %f" "$out/bin/klystrack %f"
+  '';
+
+  meta = with lib; {
+    description = "A chiptune tracker";
+    homepage = "https://kometbomb.github.io/klystrack";
+    license = licenses.mit;
+    maintainers = with maintainers; [ suhr ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/pkgs/applications/audio/kmetronome/default.nix b/pkgs/applications/audio/kmetronome/default.nix
new file mode 100644
index 00000000000..70b06e72fba
--- /dev/null
+++ b/pkgs/applications/audio/kmetronome/default.nix
@@ -0,0 +1,25 @@
+{ lib, stdenv, fetchurl, cmake, pkg-config, qttools, alsa-lib, drumstick, qtbase, qtsvg }:
+
+stdenv.mkDerivation rec {
+  pname = "kmetronome";
+  version = "1.2.0";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/${pname}/${version}/${pname}-${version}.tar.bz2";
+    sha256 = "1ln0nm24w6bj7wc8cay08j5azzznigd39cbbw3h4skg6fxd8p0s7";
+  };
+
+  nativeBuildInputs = [ cmake pkg-config qttools ];
+
+  buildInputs = [ alsa-lib drumstick qtbase qtsvg ];
+
+  dontWrapQtApps = true;
+
+  meta = with lib; {
+    homepage = "https://kmetronome.sourceforge.io/";
+    description = "ALSA MIDI metronome with Qt interface";
+    license = licenses.gpl2Plus;
+    maintainers = with maintainers; [ orivej ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/pkgs/applications/audio/ladspa-plugins/default.nix b/pkgs/applications/audio/ladspa-plugins/default.nix
new file mode 100644
index 00000000000..491a18bba3e
--- /dev/null
+++ b/pkgs/applications/audio/ladspa-plugins/default.nix
@@ -0,0 +1,40 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, autoreconfHook
+, automake
+, fftw
+, ladspaH
+, libxml2
+, pkg-config
+, perlPackages
+}:
+
+stdenv.mkDerivation rec {
+  pname = "swh-plugins";
+  version = "0.4.17";
+
+  src = fetchFromGitHub {
+    owner = "swh";
+    repo = "ladspa";
+    rev = "v${version}";
+    sha256 = "sha256-eOtIhNcuItREUShI8JRlBVKfMfovpdfIYu+m37v4KLE=";
+  };
+
+  nativeBuildInputs = [ autoreconfHook pkg-config ];
+  buildInputs = [ fftw ladspaH libxml2 perlPackages.perl perlPackages.XMLParser ];
+
+  patchPhase = ''
+    patchShebangs .
+    patchShebangs ./metadata/
+    cp ${automake}/share/automake-*/mkinstalldirs .
+  '';
+
+  meta = with lib; {
+    homepage = "http://plugin.org.uk/";
+    description = "LADSPA format audio plugins";
+    license = licenses.gpl2;
+    maintainers = [ maintainers.magnetophon ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/pkgs/applications/audio/ladspa-sdk/default.nix b/pkgs/applications/audio/ladspa-sdk/default.nix
new file mode 100644
index 00000000000..47a36ed1b5d
--- /dev/null
+++ b/pkgs/applications/audio/ladspa-sdk/default.nix
@@ -0,0 +1,28 @@
+{ lib, stdenv, fetchurl }:
+stdenv.mkDerivation rec {
+  pname = "ladspa-sdk";
+  version = "1.15";
+  src = fetchurl {
+    url = "https://www.ladspa.org/download/ladspa_sdk_${version}.tgz";
+    sha256 = "1vgx54cgsnc3ncl9qbgjbmq12c444xjafjkgr348h36j16draaa2";
+  };
+
+  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 = lib.licenses.lgpl2;
+    maintainers = [ lib.maintainers.magnetophon ];
+    platforms = lib.platforms.linux;
+  };
+}
diff --git a/pkgs/applications/audio/ladspa-sdk/ladspah.nix b/pkgs/applications/audio/ladspa-sdk/ladspah.nix
new file mode 100644
index 00000000000..b497e91927b
--- /dev/null
+++ b/pkgs/applications/audio/ladspa-sdk/ladspah.nix
@@ -0,0 +1,26 @@
+{ lib, stdenv, fetchurl }:
+stdenv.mkDerivation rec {
+  pname = "ladspa.h";
+  version = "1.15";
+  src = fetchurl {
+    url = "https://www.ladspa.org/download/ladspa_sdk_${version}.tgz";
+    sha256 = "1vgx54cgsnc3ncl9qbgjbmq12c444xjafjkgr348h36j16draaa2";
+  };
+
+  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 = lib.licenses.lgpl2;
+    maintainers = [ lib.maintainers.magnetophon ];
+    platforms = lib.platforms.all;
+  };
+}
diff --git a/pkgs/applications/audio/lash/default.nix b/pkgs/applications/audio/lash/default.nix
new file mode 100644
index 00000000000..6c8ea6528f9
--- /dev/null
+++ b/pkgs/applications/audio/lash/default.nix
@@ -0,0 +1,39 @@
+{ lib, stdenv, fetchurl, alsa-lib, gtk2, libjack2, libuuid, libxml2
+, makeWrapper, pkg-config, readline }:
+
+assert libuuid != null;
+
+stdenv.mkDerivation  rec {
+  pname = "lash";
+  version = "0.5.4";
+
+  src = fetchurl {
+    url = "mirror://savannah/lash/${pname}-${version}.tar.gz";
+    sha256 = "05kc4brcx8mncai0rj2gz4s4bsrsy9q8xlnaddf75i0m8jl7snhh";
+  };
+
+  # http://permalink.gmane.org/gmane.linux.redhat.fedora.extras.cvs/822346
+  patches = [ ./socket.patch ./gcc-47.patch ];
+
+  nativeBuildInputs = [ pkg-config makeWrapper ];
+  buildInputs = [ alsa-lib gtk2 libjack2 libxml2 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 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/pkgs/applications/audio/lash/gcc-47.patch b/pkgs/applications/audio/lash/gcc-47.patch
new file mode 100644
index 00000000000..774add431fa
--- /dev/null
+++ b/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/pkgs/applications/audio/lash/socket.patch b/pkgs/applications/audio/lash/socket.patch
new file mode 100644
index 00000000000..c2825921444
--- /dev/null
+++ b/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/pkgs/applications/audio/libopenmpt/default.nix b/pkgs/applications/audio/libopenmpt/default.nix
new file mode 100644
index 00000000000..b2b5ebecd7e
--- /dev/null
+++ b/pkgs/applications/audio/libopenmpt/default.nix
@@ -0,0 +1,42 @@
+{ config, lib, stdenv, fetchurl, fetchpatch, zlib, pkg-config, mpg123, libogg, libvorbis, portaudio, libsndfile, flac
+, usePulseAudio ? config.pulseaudio or stdenv.isLinux, libpulseaudio }:
+
+stdenv.mkDerivation rec {
+  pname = "libopenmpt";
+  version = "0.5.11";
+
+  outputs = [ "out" "lib" "dev" ];
+
+  src = fetchurl {
+    url = "https://lib.openmpt.org/files/libopenmpt/src/libopenmpt-${version}+release.autotools.tar.gz";
+    sha256 = "1c54lldr2imjzhlhq5lvwhj7d5794xm97cby9pznr5wdjjay0sa4";
+  };
+
+  patches = [
+    # Fix pending upstream inclusion for gcc-12 include headers:
+    #  https://github.com/OpenMPT/openmpt/pull/8
+    (fetchpatch {
+      name = "gcc-12.patch";
+      url = "https://github.com/OpenMPT/openmpt/commit/6e7a43190ef2f9ba0b3efc19b9527261b69ec8f7.patch";
+      sha256 = "081m1rf09bbrlg52aihaajmld5dcnwbp6y7zpyik92mm332r330h";
+    })
+  ];
+
+  enableParallelBuilding = true;
+
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = [ zlib mpg123 libogg libvorbis portaudio libsndfile flac ]
+  ++ lib.optional usePulseAudio libpulseaudio;
+
+  configureFlags = lib.optional (!usePulseAudio) "--without-pulseaudio";
+
+  doCheck = true;
+
+  meta = with lib; {
+    description = "A cross-platform command-line based module file player";
+    homepage = "https://lib.openmpt.org/libopenmpt/";
+    license = licenses.bsd3;
+    maintainers = with maintainers; [ OPNA2608 ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/pkgs/applications/audio/librespot/default.nix b/pkgs/applications/audio/librespot/default.nix
new file mode 100644
index 00000000000..8772171c8ce
--- /dev/null
+++ b/pkgs/applications/audio/librespot/default.nix
@@ -0,0 +1,40 @@
+{ lib, stdenv, fetchFromGitHub, rustPlatform, pkg-config, openssl, withRodio ? true
+, withALSA ? true, alsa-lib ? null, withPulseAudio ? false, libpulseaudio ? null
+, withPortAudio ? false, portaudio ? null }:
+
+rustPlatform.buildRustPackage rec {
+  pname = "librespot";
+  version = "0.3.1";
+
+  src = fetchFromGitHub {
+    owner = "librespot-org";
+    repo = "librespot";
+    rev = "v${version}";
+    sha256 = "1fv2sk89rf1vraq823bxddlxj6b4gqhfpc36xr7ibz2405zickfv";
+  };
+
+  cargoSha256 = "1sal85gsbnrabxi39298w9njdc08csnwl40akd6k9fsc0fmpn1b0";
+
+  nativeBuildInputs = [ pkg-config ];
+
+  buildInputs = [ openssl ] ++ lib.optional withALSA alsa-lib
+    ++ lib.optional withPulseAudio libpulseaudio
+    ++ lib.optional withPortAudio portaudio;
+
+  buildNoDefaultFeatures = true;
+  buildFeatures = lib.optional withRodio "rodio-backend"
+    ++ lib.optional withALSA "alsa-backend"
+    ++ lib.optional withPulseAudio "pulseaudio-backend"
+    ++ lib.optional withPortAudio "portaudio-backend";
+
+  doCheck = false;
+
+  meta = with lib; {
+    description = "Open Source Spotify client library and playback daemon";
+    homepage = "https://github.com/librespot-org/librespot";
+    license = with licenses; [ mit ];
+    maintainers = with maintainers; [ bennofs ];
+    platforms = platforms.unix;
+    broken = stdenv.isDarwin; # never built on Hydra https://hydra.nixos.org/job/nixpkgs/trunk/librespot.x86_64-darwin
+  };
+}
diff --git a/pkgs/applications/audio/lingot/default.nix b/pkgs/applications/audio/lingot/default.nix
new file mode 100644
index 00000000000..22cab165ccf
--- /dev/null
+++ b/pkgs/applications/audio/lingot/default.nix
@@ -0,0 +1,45 @@
+{ lib, stdenv
+, fetchurl
+, pkg-config
+, intltool
+, gtk3
+, wrapGAppsHook
+, alsa-lib
+, libjack2
+, libpulseaudio
+, fftw
+, jackSupport ? true
+}:
+
+stdenv.mkDerivation rec {
+  pname = "lingot";
+  version = "1.0.1";
+
+  src = fetchurl {
+    url = "mirror://savannah/${pname}/${pname}-${version}.tar.gz";
+    sha256 = "03x0qqb9iarjapvii3ja522vkxrqv1hwix6b1r53is48p5xwgf3i";
+  };
+
+  nativeBuildInputs = [
+    pkg-config
+    intltool
+    wrapGAppsHook
+  ];
+
+  buildInputs = [
+    gtk3
+    alsa-lib
+    libpulseaudio
+    fftw
+  ] ++ lib.optional jackSupport libjack2;
+
+  configureFlags = lib.optional (!jackSupport) "--disable-jack";
+
+  meta = {
+    description = "Not a Guitar-Only tuner";
+    homepage = "https://www.nongnu.org/lingot/";
+    license = lib.licenses.gpl2Plus;
+    platforms = with lib.platforms; linux;
+    maintainers = with lib.maintainers; [ viric ];
+  };
+}
diff --git a/pkgs/applications/audio/linuxsampler/default.nix b/pkgs/applications/audio/linuxsampler/default.nix
new file mode 100644
index 00000000000..1c33bff5b76
--- /dev/null
+++ b/pkgs/applications/audio/linuxsampler/default.nix
@@ -0,0 +1,41 @@
+{ lib, stdenv, fetchurl, autoconf, automake, bison, libtool, pkg-config, which
+, alsa-lib, asio, libjack2, libgig, libsndfile, lv2 }:
+
+stdenv.mkDerivation rec {
+  pname = "linuxsampler";
+  version = "2.2.0";
+
+  src = fetchurl {
+    url = "https://download.linuxsampler.org/packages/${pname}-${version}.tar.bz2";
+    sha256 = "sha256-xNFjxrrC0B8Oj10HIQ1AmI7pO34HuYRyyUaoB2MDmYw=";
+  };
+
+  preConfigure = ''
+    make -f Makefile.svn
+  '';
+
+  nativeBuildInputs = [ autoconf automake bison libtool pkg-config which ];
+
+  buildInputs = [ alsa-lib asio libjack2 libgig libsndfile lv2 ];
+
+  enableParallelBuilding = true;
+
+  meta = with 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/pkgs/applications/audio/littlegptracker/0001-Remove-coherency-checks.patch b/pkgs/applications/audio/littlegptracker/0001-Remove-coherency-checks.patch
new file mode 100644
index 00000000000..3cabd2a2c56
--- /dev/null
+++ b/pkgs/applications/audio/littlegptracker/0001-Remove-coherency-checks.patch
@@ -0,0 +1,52 @@
+From 2e1e9b3ffce9d1069fca0b27b8011f85c7547c3b Mon Sep 17 00:00:00 2001
+From: Francesco Gazzetta <fgaz@fgaz.me>
+Date: Wed, 19 Aug 2020 15:06:19 +0200
+Subject: [PATCH 1/2] Remove coherency checks >:)
+
+As far as I can see, they are just to make sure that the types can fit
+in the word length, but this check was written when 64 bits weren't a
+possibility and didn't take that into account,
+so although the types do fit, the checks fail.
+Indeed, the program seems to work well on 64 bits.
+More info here:
+https://github.com/Mdashdotdashn/LittleGPTracker/issues/4
+---
+ sources/Externals/Soundfont/DATATYPE.H | 22 ----------------------
+ 1 file changed, 22 deletions(-)
+
+diff --git a/sources/Externals/Soundfont/DATATYPE.H b/sources/Externals/Soundfont/DATATYPE.H
+index 762a724..f6b031f 100644
+--- a/sources/Externals/Soundfont/DATATYPE.H
++++ b/sources/Externals/Soundfont/DATATYPE.H
+@@ -123,28 +123,6 @@ typedef short               SHORT;     /* 16 bit signed value was: INT */
+ ********************************************************************/
+ typedef unsigned short        EMUSTAT;
+ 
+-/********************************************************************
+-* Compare <limits.h> values with SoundFont Enabler limits.  Fail compile
+-* if discrepency. If compile fails due to one of these errors, then
+-* the SoundFont enabler will not work with your system or the state of your
+-* development environment.
+-********************************************************************/
+-#if (SCHAR_MAX != CHAR_MAXVAL) || (UCHAR_MAX != BYTE_MAXVAL)
+-  #error <datatype.h>: char is out of range!
+-#endif
+-
+-#if (SHRT_MAX != SHRT_MAXVAL)
+-  #error <datatype.h>: short is out of range!
+-#endif
+-
+-#if (LONG_MAX != LONG_MAXVAL)
+-  #error <datatype.h>: long is out of range!
+-#endif
+-
+-#if (ULONG_MAX != DWORD_MAXVAL)
+-  #error <datatype.h>: unsigned long is out of range!
+-#endif
+-
+ #ifdef __BYTE_COHERENT
+ 
+ /********************************************************************
+-- 
+2.25.4
+
diff --git a/pkgs/applications/audio/littlegptracker/default.nix b/pkgs/applications/audio/littlegptracker/default.nix
new file mode 100644
index 00000000000..4d7d70aebd6
--- /dev/null
+++ b/pkgs/applications/audio/littlegptracker/default.nix
@@ -0,0 +1,74 @@
+{ lib, stdenv
+, fetchFromGitHub
+, unstableGitUpdater
+, SDL
+, jack2
+, Foundation
+}:
+
+stdenv.mkDerivation rec {
+  pname = "littlegptracker";
+  version = "unstable-2020-11-26";
+
+  src = fetchFromGitHub {
+    owner = "Mdashdotdashn";
+    repo = "littlegptracker";
+    rev = "4aca8cd765e1ad586da62decd019e66cb64b45b8";
+    sha256 = "0f2ip8z5wxk8fvlw47mczsbcrzh4nh1hgw1fwf5gjrqnzm8v111x";
+  };
+
+  buildInputs = [
+    SDL
+  ]
+  ++ lib.optional stdenv.isDarwin Foundation
+  ++ lib.optional stdenv.isLinux jack2;
+
+  patches = [
+    # Remove outdated (pre-64bit) checks that would fail on modern platforms
+    # (see description in patch file)
+    ./0001-Remove-coherency-checks.patch
+  ];
+
+  preBuild = "cd projects";
+
+  makeFlags = [ "CXX=${stdenv.cc.targetPrefix}c++" ]
+    ++ lib.optionals stdenv.isLinux  [ "PLATFORM=DEB" ]
+    ++ lib.optionals stdenv.isDarwin [ "PLATFORM=OSX" ];
+
+  NIX_CFLAGS_COMPILE = [ "-fpermissive" ] ++
+    lib.optional stdenv.hostPlatform.isAarch64 "-Wno-error=narrowing";
+
+  NIX_LDFLAGS = lib.optional stdenv.isDarwin "-framework Foundation";
+
+  installPhase = let extension = if stdenv.isDarwin then "app" else "deb-exe";
+    in "install -Dm555 lgpt.${extension} $out/bin/lgpt";
+
+  passthru.updateScript = unstableGitUpdater {
+    url = "https://github.com/Mdashdotdashn/littlegptracker.git";
+  };
+
+  meta = with lib; {
+    description = "A music tracker similar to lsdj optimised to run on portable game consoles";
+    longDescription = ''
+      LittleGPTracker (a.k.a 'The piggy', 'lgpt') is a music tracker optimised
+      to run on portable game consoles. It is currently running on Game Park's
+      GP2x & Caanoo, PSP, Dingoo, Windows, Mac OSX (intel/ppc) & Linux (Debian).
+
+      It implements the user interface of littlesounddj, a very famous tracker
+      for the Gameboy platform that has been tried and tested by many users over
+      the years, leading to a little complex but yet extremely efficent way of
+      working.
+
+      Piggy currently supports 8 monophonic 16Bit/44.1Khz stereo sample playback
+      channels. Additionally, the program can drive MIDI instruments (with the
+      gp32 and gp2x a custom MIDI interface is required).
+    '';
+    homepage = "http://www.littlegptracker.com/";
+    downloadPage = "http://www.littlegptracker.com/download.php";
+    license = licenses.bsd3;
+    maintainers = with maintainers; [ fgaz ];
+    platforms = platforms.all;
+    # https://github.com/NixOS/nixpkgs/pull/91766#issuecomment-688751821
+    broken = stdenv.isDarwin;
+  };
+}
diff --git a/pkgs/applications/audio/lmms/default.nix b/pkgs/applications/audio/lmms/default.nix
new file mode 100644
index 00000000000..22d9b3fed97
--- /dev/null
+++ b/pkgs/applications/audio/lmms/default.nix
@@ -0,0 +1,48 @@
+{ lib, fetchFromGitHub, cmake, pkg-config, alsa-lib ? null, fftwFloat, fltk13
+, fluidsynth ? null, lame ? null, libgig ? null, libjack2 ? null, libpulseaudio ? null
+, libsamplerate, libsoundio ? null, libsndfile, libvorbis ? null, portaudio ? null
+, qtbase, qtx11extras, qttools, SDL ? null, mkDerivation }:
+
+mkDerivation rec {
+  pname = "lmms";
+  version = "1.2.2";
+
+  src = fetchFromGitHub {
+    owner = "LMMS";
+    repo = "lmms";
+    rev = "v${version}";
+    sha256 = "006hwv1pbh3y5whsxkjk20hsbgwkzr4dawz43afq1gil69y7xpda";
+    fetchSubmodules = true;
+  };
+
+  nativeBuildInputs = [ cmake qttools pkg-config ];
+
+  buildInputs = [
+    alsa-lib
+    fftwFloat
+    fltk13
+    fluidsynth
+    lame
+    libgig
+    libjack2
+    libpulseaudio
+    libsamplerate
+    libsndfile
+    libsoundio
+    libvorbis
+    portaudio
+    qtbase
+    qtx11extras
+    SDL # TODO: switch to SDL2 in the next version
+  ];
+
+  cmakeFlags = [ "-DWANT_QT5=ON" ];
+
+  meta = with lib; {
+    description = "DAW similar to FL Studio (music production software)";
+    homepage = "https://lmms.io";
+    license = licenses.gpl2Plus;
+    platforms = [ "x86_64-linux" "i686-linux" ];
+    maintainers = with maintainers; [ goibhniu yana ];
+  };
+}
diff --git a/pkgs/applications/audio/lollypop/default.nix b/pkgs/applications/audio/lollypop/default.nix
new file mode 100644
index 00000000000..7c93760d2ca
--- /dev/null
+++ b/pkgs/applications/audio/lollypop/default.nix
@@ -0,0 +1,112 @@
+{ lib
+, fetchgit
+, nix-update-script
+, meson
+, ninja
+, pkg-config
+, python3
+, gtk3
+, gst_all_1
+, libhandy
+, libsecret
+, libsoup
+, appstream-glib
+, desktop-file-utils
+, totem-pl-parser
+, gobject-introspection
+, glib-networking
+, gdk-pixbuf
+, glib
+, pango
+, wrapGAppsHook
+, lastFMSupport ? true
+, youtubeSupport ? true
+}:
+
+python3.pkgs.buildPythonApplication rec  {
+  pname = "lollypop";
+  version = "1.4.26";
+
+  format = "other";
+  doCheck = false;
+
+  src = fetchgit {
+    url = "https://gitlab.gnome.org/World/lollypop";
+    rev = "refs/tags/${version}";
+    fetchSubmodules = true;
+    sha256 = "sha256-Q/z9oET06DimMRZl03TgjEeheoVHtIkH+Z69qWZetcI=";
+  };
+
+  nativeBuildInputs = [
+    appstream-glib
+    desktop-file-utils
+    gobject-introspection
+    meson
+    ninja
+    pkg-config
+    wrapGAppsHook
+  ];
+
+  buildInputs = with gst_all_1; [
+    gdk-pixbuf
+    glib
+    glib-networking
+    gst-libav
+    gst-plugins-bad
+    gst-plugins-base
+    gst-plugins-good
+    gst-plugins-ugly
+    gstreamer
+    gtk3
+    libhandy
+    libsoup
+    pango
+    totem-pl-parser
+  ] ++ lib.optional lastFMSupport libsecret;
+
+  propagatedBuildInputs = with python3.pkgs; [
+    beautifulsoup4
+    pillow
+    pycairo
+    pygobject3
+  ]
+  ++ lib.optional lastFMSupport pylast
+  ++ lib.optional youtubeSupport youtube-dl
+  ;
+
+  postPatch = ''
+    chmod +x meson_post_install.py
+    patchShebangs meson_post_install.py
+  '';
+
+  postFixup = ''
+    wrapPythonProgramsIn $out/libexec "$out $propagatedBuildInputs"
+  '';
+
+  strictDeps = false;
+
+  # Produce only one wrapper using wrap-python passing
+  # gappsWrapperArgs to wrap-python additional wrapper
+  # argument
+  dontWrapGApps = true;
+
+  preFixup = ''
+    makeWrapperArgs+=("''${gappsWrapperArgs[@]}")
+  '';
+
+  passthru = {
+    updateScript = nix-update-script {
+      attrPath = pname;
+    };
+  };
+
+
+  meta = with lib; {
+    changelog = "https://gitlab.gnome.org/World/lollypop/tags/${version}";
+    description = "A modern music player for GNOME";
+    homepage = "https://wiki.gnome.org/Apps/Lollypop";
+    license = licenses.gpl3Plus;
+    maintainers = with maintainers; [ lovesegfault ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/pkgs/applications/audio/losslessaudiochecker/default.nix b/pkgs/applications/audio/losslessaudiochecker/default.nix
new file mode 100644
index 00000000000..551f56a3ce1
--- /dev/null
+++ b/pkgs/applications/audio/losslessaudiochecker/default.nix
@@ -0,0 +1,29 @@
+{ lib, stdenv, fetchurl, autoPatchelfHook }:
+
+stdenv.mkDerivation {
+  pname = "losslessaudiochecker";
+  version = "2.0.5";
+
+  src = fetchurl {
+    url = "https://web.archive.org/web/20211119122205/https://losslessaudiochecker.com/dl/LAC-Linux-64bit.tar.gz";
+    sha256 = "1i1zbl7sqwxwmhw89lgz922l5k85in3y76zb06h8j3zd0lb20wkq";
+  };
+
+  nativeBuildInputs = [ autoPatchelfHook ];
+
+  setSourceRoot = "sourceRoot=$PWD";
+
+  dontBuild = true;
+
+  installPhase = ''
+    install LAC -D -t $out/bin
+  '';
+
+  meta = {
+    description = "Utility to check whether audio is truly lossless or not";
+    homepage = "https://losslessaudiochecker.com";
+    license = lib.licenses.unfree;
+    platforms = lib.platforms.x86_64;
+    maintainers = with lib.maintainers; [ p-h ];
+  };
+}
diff --git a/pkgs/applications/audio/lsp-plugins/default.nix b/pkgs/applications/audio/lsp-plugins/default.nix
new file mode 100644
index 00000000000..f6f3237d6f0
--- /dev/null
+++ b/pkgs/applications/audio/lsp-plugins/default.nix
@@ -0,0 +1,182 @@
+{ lib, stdenv, fetchFromGitHub, pkg-config, makeWrapper
+, libsndfile, jack2
+, libGLU, libGL, lv2, cairo
+, ladspaH, php }:
+
+stdenv.mkDerivation rec {
+  pname = "lsp-plugins";
+  version = "1.1.31";
+
+  src = fetchFromGitHub {
+    owner = "sadko4u";
+    repo = pname;
+    rev = version;
+    sha256 = "sha256-P1woSkenSlVUwWr3q0sNv8K2fVtTa6zWwKfSHQgg9Xw=";
+  };
+
+  nativeBuildInputs = [ pkg-config php makeWrapper ];
+  buildInputs = [ jack2 libsndfile libGLU libGL lv2 cairo ladspaH ];
+
+  makeFlags = [
+    "PREFIX=${placeholder "out"}"
+    "ETC_PATH=$(out)/etc"
+  ];
+
+  NIX_CFLAGS_COMPILE = "-DLSP_NO_EXPERIMENTAL";
+
+  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" ];
+
+  enableParallelBuilding = true;
+
+  meta = with 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
+        - Crossover LeftRight x8 - Frequenzweiche LeftRight x8
+        - Crossover MidSide x8 - Frequenzweiche MidSide x8
+        - Crossover Mono x8 - Frequenzweiche Mono x8
+        - Crossover Stereo x8 - Frequenzweiche Stereo x8
+        - 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
+        - Artistic Delay Mono - Künstlerische Verzögerung
+        - Artistic Delay Stereo - Künstlerische Verzögerung
+        - Latency Meter - Latenzmessgerät
+        - Loudness Compensator Mono - Lautstärke Kompensator Mono
+        - Loudness Compensator Stereo - Lautstärke Kompensator Stereo
+        - Multiband Expander LeftRight x8 - Multi-band Expander LeftRight x8
+        - Multiband Expander MidSide x8 - Multi-band Expander MidSide x8
+        - Multiband Expander Mono x8 - Multi-band Expander Mono x8
+        - Multiband Expander Stereo x8 - Multi-band Expander Stereo x8
+        - Multiband Gate LeftRight x8 - Multi-band Gate LeftRight x8
+        - Multiband Gate MidSide x8 - Multi-band Gate MidSide x8
+        - Multiband Gate Mono x8 - Multi-band Gate Mono x8
+        - Multiband Gate Stereo x8 - Multi-band Gate Stereo x8
+        - 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
+        - Oscilloscope x1 - Oscilloscope x1
+        - Oscilloscope x2 - Oscilloscope x2
+        - Oscilloscope x4 - Oscilloscope x4
+        - 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
+        - Profiler Stereo - Profiler Stereo
+        - Room Builder Mono - Raumbaumeister Mono
+        - Room Builder Stereo - Raumbaumeister Stereo
+        - 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 Expander LeftRight x8 - Sidechain Multi-band Expander LeftRight x8
+        - Sidechain Multiband Expander MidSide x8 - Sidechain Multi-band Expander MidSide x8
+        - Sidechain Multiband Expander Mono x8 - Sidechain Multi-band Expander Mono x8
+        - Sidechain Multiband Expander Stereo x8 - Sidechain Multi-band Expander Stereo x8
+        - Sidechain Multiband Gate LeftRight x8 - Sidechain Multi-band Gate LeftRight x8
+        - Sidechain Multiband Gate MidSide x8 - Sidechain Multi-band Gate MidSide x8
+        - Sidechain Multiband Gate Mono x8 - Sidechain Multi-band Gate Mono x8
+        - Sidechain Multiband Gate Stereo x8 - Sidechain Multi-band Gate Stereo x8
+        - 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
+        - Surge Filter Mono - Sprungfilter Mono
+        - Surge Filter Stereo - Sprungfilter Stereo
+        - 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 = "https://lsp-plug.in";
+      maintainers = with maintainers; [ magnetophon ];
+      license = licenses.gpl2;
+      platforms = platforms.linux;
+    };
+}
diff --git a/pkgs/applications/audio/ltc-tools/default.nix b/pkgs/applications/audio/ltc-tools/default.nix
new file mode 100644
index 00000000000..c8c87959727
--- /dev/null
+++ b/pkgs/applications/audio/ltc-tools/default.nix
@@ -0,0 +1,25 @@
+{lib, stdenv, fetchFromGitHub, pkg-config, libltc, libsndfile, jack2}:
+
+stdenv.mkDerivation rec {
+  pname = "ltc-tools";
+  version = "0.7.0";
+
+  src = fetchFromGitHub {
+    owner = "x42";
+    repo = "ltc-tools";
+    rev = "v${version}";
+    sha256 = "0vp25b970r1hv5ndzs4di63rgwnl31jfaj3jz5dka276kx34q4al";
+  };
+
+  buildInputs = [ pkg-config libltc libsndfile jack2 ];
+
+  makeFlags = [ "PREFIX=$(out)" ];
+
+  meta = with 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/pkgs/applications/audio/luppp/default.nix b/pkgs/applications/audio/luppp/default.nix
new file mode 100644
index 00000000000..36d329bcafd
--- /dev/null
+++ b/pkgs/applications/audio/luppp/default.nix
@@ -0,0 +1,47 @@
+{ lib, stdenv
+, fetchFromGitHub
+, meson
+, ninja
+, pkg-config
+, jack2
+, cairo
+, liblo
+, libsndfile
+, libsamplerate
+, ntk
+}:
+
+stdenv.mkDerivation rec {
+  pname = "luppp";
+  version = "1.2.1";
+
+  src = fetchFromGitHub {
+    owner = "openAVproductions";
+    repo = "openAV-Luppp";
+    rev = "release-${version}";
+    sha256 = "1ncbn099fyfnr7jw2bp3wf2g9k738lw53m6ssw6wji2wxwmghv78";
+  };
+
+  nativeBuildInputs = [
+    meson
+    ninja
+    pkg-config
+  ];
+
+  buildInputs = [
+    jack2
+    cairo
+    liblo
+    libsndfile
+    libsamplerate
+    ntk
+  ];
+
+  meta = with lib; {
+    homepage = "http://openavproductions.com/luppp/";  # https does not work
+    description = "A music creation tool, intended for live use";
+    license = licenses.gpl3Plus;
+    maintainers = with maintainers; [ prusnak ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/pkgs/applications/audio/lv2-cpp-tools/default.nix b/pkgs/applications/audio/lv2-cpp-tools/default.nix
new file mode 100644
index 00000000000..f1709d00558
--- /dev/null
+++ b/pkgs/applications/audio/lv2-cpp-tools/default.nix
@@ -0,0 +1,28 @@
+{ lib, stdenv, fetchzip, pkg-config, lv2, gtkmm2, boost }:
+
+stdenv.mkDerivation rec {
+  pname = "lv2-cpp-tools";
+  version = "1.0.5";
+
+  src = fetchzip {
+    url = "http://deb.debian.org/debian/pool/main/l/lv2-c++-tools/lv2-c++-tools_${version}.orig.tar.bz2";
+    sha256 = "039bq7d7s2bhfcnlsfq0mqxr9a9iqwg5bwcpxfi24c6yl6krydsi";
+  };
+
+  preConfigure = ''
+    sed -r 's,/bin/bash,${stdenv.shell},g' -i ./configure
+    sed -r 's,/sbin/ldconfig,ldconfig,g' -i ./Makefile.template
+  '';
+
+  nativeBuildInputs = [ pkg-config ];
+
+  buildInputs = [ lv2 gtkmm2 boost ];
+
+  meta = with lib; {
+    homepage = "http://ll-plugins.nongnu.org/hacking.html";
+    description = "Tools and libraries that may come in handy when writing LV2 plugins in C++";
+    license = licenses.gpl3;
+    maintainers = [ maintainers.michalrus ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/pkgs/applications/audio/lv2bm/default.nix b/pkgs/applications/audio/lv2bm/default.nix
new file mode 100644
index 00000000000..553e0e67f83
--- /dev/null
+++ b/pkgs/applications/audio/lv2bm/default.nix
@@ -0,0 +1,28 @@
+{ lib, stdenv, fetchFromGitHub, glib, libsndfile, lilv, lv2, pkg-config, serd, sord, sratom }:
+
+stdenv.mkDerivation rec {
+  pname = "lv2bm";
+  version = "1.1";
+
+  src = fetchFromGitHub {
+    owner = "moddevices";
+    repo = "lv2bm";
+    rev = "v${version}";
+    sha256 = "0vlppxfb9zbmffazs1kiyb79py66s8x9hihj36m2vz86zsq7ybl0";
+  };
+
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = [ glib libsndfile lilv lv2 serd sord sratom ];
+
+  installPhase = ''
+    make install PREFIX=$out
+  '';
+
+  meta = with 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/pkgs/applications/audio/lv2lint/default.nix b/pkgs/applications/audio/lv2lint/default.nix
new file mode 100644
index 00000000000..ada996866c8
--- /dev/null
+++ b/pkgs/applications/audio/lv2lint/default.nix
@@ -0,0 +1,22 @@
+{ stdenv, lib, fetchurl, pkg-config, meson, ninja, lv2, lilv, curl, libelf }:
+
+stdenv.mkDerivation rec {
+  pname = "lv2lint";
+  version = "0.14.0";
+
+  src = fetchurl {
+    url = "https://git.open-music-kontrollers.ch/lv2/${pname}/snapshot/${pname}-${version}.tar.xz";
+    sha256 = "sha256-yPKM7RToLNBT+AXSjfxxpncESmv89/wcGCt//pnEGqI=";
+  };
+
+  nativeBuildInputs = [ pkg-config meson ninja ];
+  buildInputs = [ lv2 lilv curl libelf ];
+
+  meta = with lib; {
+    description = "Check whether a given LV2 plugin is up to the specification";
+    homepage = "https://open-music-kontrollers.ch/lv2/${pname}:";
+    license = licenses.artistic2;
+    maintainers = [ maintainers.magnetophon ];
+    platforms = platforms.all;
+  };
+}
diff --git a/pkgs/applications/audio/lyrebird/default.nix b/pkgs/applications/audio/lyrebird/default.nix
new file mode 100644
index 00000000000..81c792d95e2
--- /dev/null
+++ b/pkgs/applications/audio/lyrebird/default.nix
@@ -0,0 +1,63 @@
+{ python3Packages
+, lib
+, fetchFromGitHub
+, makeDesktopItem
+, wrapGAppsHook
+, gtk3
+, gobject-introspection
+, sox
+, pulseaudio
+}:
+let
+  desktopItem = makeDesktopItem {
+    name = "lyrebird";
+    exec = "lyrebird";
+    icon = "${placeholder "out"}/share/lyrebird/icon.png";
+    desktopName = "Lyrebird";
+    genericName = "Voice Changer";
+    categories = [ "AudioVideo" "Audio" ];
+  };
+in
+python3Packages.buildPythonApplication rec {
+  pname = "lyrebird";
+  version = "1.1.0";
+
+  format = "other";
+  doCheck = false;
+
+  src = fetchFromGitHub {
+    owner = "chxrlt";
+    repo = "lyrebird";
+    rev = "v${version}";
+    sha256 = "0wmnww2wi8bb9m8jgc18n04gjia8pf9klmvij0w98xz11l6kxb13";
+  };
+
+  propagatedBuildInputs = with python3Packages; [ toml pygobject3 ];
+
+  nativeBuildInputs = [ wrapGAppsHook ];
+
+  buildInputs = [ gtk3 gobject-introspection sox ];
+
+  dontWrapGApps = true;
+  makeWrapperArgs = [
+    "--prefix 'PATH' ':' '${lib.makeBinPath [ sox pulseaudio ]}'"
+    "--prefix 'PYTHONPATH' ':' '${placeholder "out"}/share/lyrebird'"
+    "--run 'cd ${placeholder "out"}/share/lyrebird'"
+    ''"''${gappsWrapperArgs[@]}"''
+  ];
+
+  installPhase = ''
+    mkdir -p $out/{bin,share/{applications,lyrebird}}
+    cp -at $out/share/lyrebird/ app icon.png
+    cp -at $out/share/applications/ ${desktopItem}
+    install -Dm755 app.py $out/bin/lyrebird
+  '';
+
+  meta = with lib; {
+    description = "Simple and powerful voice changer for Linux, written in GTK 3";
+    homepage = "https://github.com/chxrlt/lyrebird";
+    license = licenses.mit;
+    maintainers = with maintainers; [ OPNA2608 ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/pkgs/applications/audio/m4acut/default.nix b/pkgs/applications/audio/m4acut/default.nix
new file mode 100644
index 00000000000..f3ceee9227c
--- /dev/null
+++ b/pkgs/applications/audio/m4acut/default.nix
@@ -0,0 +1,24 @@
+{ lib, stdenv, autoreconfHook, fetchFromGitHub, l-smash }:
+
+stdenv.mkDerivation rec {
+  pname = "m4acut";
+  version = "0.1.2";
+
+  src = fetchFromGitHub {
+    owner = "nu774";
+    repo = "m4acut";
+    rev = "v${version}";
+    sha256 = "1hzf9f1fzmlpnxjaxhs2w22wzb28vd87ycaddnix1mmhvh3nvzkd";
+  };
+
+  nativeBuildInputs = [ autoreconfHook ];
+  buildInputs = [ l-smash ];
+
+  meta = with lib; {
+    description = "Losslessly & gaplessly cut m4a (AAC in MP4) files.";
+    homepage = "https://github.com/nu774/m4acut";
+    license = with licenses; [ bsdOriginal zlib ];
+    maintainers = [ maintainers.chkno ];
+    platforms = platforms.all;
+  };
+}
diff --git a/pkgs/applications/audio/magnetophonDSP/CharacterCompressor/default.nix b/pkgs/applications/audio/magnetophonDSP/CharacterCompressor/default.nix
new file mode 100644
index 00000000000..400f268d439
--- /dev/null
+++ b/pkgs/applications/audio/magnetophonDSP/CharacterCompressor/default.nix
@@ -0,0 +1,37 @@
+{ lib, stdenv, fetchFromGitHub, faust2jaqt, faust2lv2 }:
+stdenv.mkDerivation rec {
+  pname = "CharacterCompressor";
+  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 = lib.licenses.gpl3;
+    maintainers = [ lib.maintainers.magnetophon ];
+  };
+}
diff --git a/pkgs/applications/audio/magnetophonDSP/CompBus/default.nix b/pkgs/applications/audio/magnetophonDSP/CompBus/default.nix
new file mode 100644
index 00000000000..0b80aef170a
--- /dev/null
+++ b/pkgs/applications/audio/magnetophonDSP/CompBus/default.nix
@@ -0,0 +1,43 @@
+{ lib, stdenv, fetchFromGitHub, faust2jaqt, faust2lv2 }:
+stdenv.mkDerivation rec {
+  pname = "CompBus";
+  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 = lib.licenses.gpl3;
+    maintainers = [ lib.maintainers.magnetophon ];
+  };
+}
diff --git a/pkgs/applications/audio/magnetophonDSP/ConstantDetuneChorus/default.nix b/pkgs/applications/audio/magnetophonDSP/ConstantDetuneChorus/default.nix
new file mode 100644
index 00000000000..56534309733
--- /dev/null
+++ b/pkgs/applications/audio/magnetophonDSP/ConstantDetuneChorus/default.nix
@@ -0,0 +1,33 @@
+{ lib, stdenv, fetchFromGitHub, faust2jaqt, faust2lv2 }:
+stdenv.mkDerivation rec {
+  pname = "constant-detune-chorus";
+  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 = lib.licenses.gpl3;
+    maintainers = [ lib.maintainers.magnetophon ];
+  };
+}
diff --git a/pkgs/applications/audio/magnetophonDSP/LazyLimiter/default.nix b/pkgs/applications/audio/magnetophonDSP/LazyLimiter/default.nix
new file mode 100644
index 00000000000..4b1157de0b0
--- /dev/null
+++ b/pkgs/applications/audio/magnetophonDSP/LazyLimiter/default.nix
@@ -0,0 +1,33 @@
+{ lib, stdenv, fetchFromGitHub, faust2jaqt, faust2lv2 }:
+stdenv.mkDerivation rec {
+  pname = "LazyLimiter";
+  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 = lib.licenses.gpl2;
+    maintainers = [ lib.maintainers.magnetophon ];
+  };
+}
diff --git a/pkgs/applications/audio/magnetophonDSP/MBdistortion/default.nix b/pkgs/applications/audio/magnetophonDSP/MBdistortion/default.nix
new file mode 100644
index 00000000000..32f43eaed9c
--- /dev/null
+++ b/pkgs/applications/audio/magnetophonDSP/MBdistortion/default.nix
@@ -0,0 +1,40 @@
+{ lib, stdenv, fetchFromGitHub, fetchpatch, faust2jaqt, faust2lv2 }:
+stdenv.mkDerivation rec {
+  pname = "MBdistortion";
+  version = "1.1.1";
+
+  src = fetchFromGitHub {
+    owner = "magnetophon";
+    repo = "MBdistortion";
+    rev = "V${version}";
+    sha256 = "0mdzaqmxzgspfgx9w1hdip18y17hwpdcgjyq1rrfm843vkascwip";
+  };
+
+  patches = [
+    (fetchpatch {
+      url = "https://github.com/magnetophon/MBdistortion/commit/10e35084b88c559f1b63760cf40fd5ef5a6745a5.patch";
+      sha256 = "0hwjl3rzvn3id0sr0qs8f37jdmr915mdan8miaf78ra0ir3wnk76";
+    })
+  ];
+
+  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 = lib.licenses.gpl2;
+    maintainers = [ lib.maintainers.magnetophon ];
+  };
+}
diff --git a/pkgs/applications/audio/magnetophonDSP/RhythmDelay/default.nix b/pkgs/applications/audio/magnetophonDSP/RhythmDelay/default.nix
new file mode 100644
index 00000000000..fff4292cd76
--- /dev/null
+++ b/pkgs/applications/audio/magnetophonDSP/RhythmDelay/default.nix
@@ -0,0 +1,33 @@
+{ lib, stdenv, fetchFromGitHub, faust2jaqt, faust2lv2 }:
+stdenv.mkDerivation rec {
+  pname = "RhythmDelay";
+  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 = lib.licenses.gpl3;
+    maintainers = [ lib.maintainers.magnetophon ];
+  };
+}
diff --git a/pkgs/applications/audio/magnetophonDSP/VoiceOfFaust/default.nix b/pkgs/applications/audio/magnetophonDSP/VoiceOfFaust/default.nix
new file mode 100644
index 00000000000..6bc8cff2261
--- /dev/null
+++ b/pkgs/applications/audio/magnetophonDSP/VoiceOfFaust/default.nix
@@ -0,0 +1,56 @@
+{ lib, stdenv, fetchFromGitHub, faust2jack, faust2lv2, helmholtz, mrpeach, puredata-with-plugins }:
+stdenv.mkDerivation rec {
+  pname = "VoiceOfFaust";
+  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 = lib.licenses.gpl3;
+    maintainers = [ lib.maintainers.magnetophon ];
+  };
+}
diff --git a/pkgs/applications/audio/magnetophonDSP/faustCompressors/default.nix b/pkgs/applications/audio/magnetophonDSP/faustCompressors/default.nix
new file mode 100644
index 00000000000..7ea5fa753c8
--- /dev/null
+++ b/pkgs/applications/audio/magnetophonDSP/faustCompressors/default.nix
@@ -0,0 +1,48 @@
+{ lib, 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 = ''
+    echo "hack out autoComp.dsp due to https://github.com/grame-cncm/faust/407/issues "
+    rm autoComp.dsp
+    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 = lib.licenses.gpl3;
+    maintainers = [ lib.maintainers.magnetophon ];
+  };
+}
diff --git a/pkgs/applications/audio/magnetophonDSP/pluginUtils/default.nix b/pkgs/applications/audio/magnetophonDSP/pluginUtils/default.nix
new file mode 100644
index 00000000000..fd807dd4245
--- /dev/null
+++ b/pkgs/applications/audio/magnetophonDSP/pluginUtils/default.nix
@@ -0,0 +1,40 @@
+{ lib, stdenv, fetchFromGitHub, faust2jaqt, faust2lv2 }:
+stdenv.mkDerivation rec {
+  pname = "pluginUtils";
+  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 = lib.licenses.gpl3;
+    maintainers = [ lib.maintainers.magnetophon ];
+  };
+}
diff --git a/pkgs/applications/audio/magnetophonDSP/shelfMultiBand/default.nix b/pkgs/applications/audio/magnetophonDSP/shelfMultiBand/default.nix
new file mode 100644
index 00000000000..07d4402578c
--- /dev/null
+++ b/pkgs/applications/audio/magnetophonDSP/shelfMultiBand/default.nix
@@ -0,0 +1,37 @@
+{ lib, stdenv, fetchFromGitHub, faust2jaqt, faust2lv2 }:
+stdenv.mkDerivation rec {
+  pname = "shelfMultiBand";
+  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 = lib.licenses.gpl3;
+    maintainers = [ lib.maintainers.magnetophon ];
+  };
+}
diff --git a/pkgs/applications/audio/mamba/default.nix b/pkgs/applications/audio/mamba/default.nix
new file mode 100644
index 00000000000..6f518dac9ca
--- /dev/null
+++ b/pkgs/applications/audio/mamba/default.nix
@@ -0,0 +1,41 @@
+{ lib, stdenv
+, fetchFromGitHub
+, pkg-config
+, xxd
+, cairo
+, fluidsynth
+, libX11
+, libjack2
+, alsa-lib
+, liblo
+, libsigcxx
+, libsmf
+}:
+
+stdenv.mkDerivation rec {
+  pname = "mamba";
+  version = "2.2";
+
+  src = fetchFromGitHub {
+    owner = "brummer10";
+    repo = "Mamba";
+    rev = "v${version}";
+    sha256 = "1885qxyfkpslzk0aaaaws0x73b10h9nbr04jkk7xhkya25gf280m";
+    fetchSubmodules = true;
+  };
+
+  nativeBuildInputs = [ pkg-config xxd ];
+  buildInputs = [ cairo fluidsynth libX11 libjack2 alsa-lib liblo libsigcxx libsmf ];
+
+  makeFlags = [ "PREFIX=$(out)" ];
+
+  enableParallelBuilding = true;
+
+  meta = with lib; {
+    homepage = "https://github.com/brummer10/Mamba";
+    description = "Virtual MIDI keyboard for Jack Audio Connection Kit";
+    license = licenses.bsd0;
+    maintainers = with maintainers; [ magnetophon orivej ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/pkgs/applications/audio/mbrola/default.nix b/pkgs/applications/audio/mbrola/default.nix
new file mode 100644
index 00000000000..befa0ac206c
--- /dev/null
+++ b/pkgs/applications/audio/mbrola/default.nix
@@ -0,0 +1,42 @@
+{ stdenv, lib, fetchFromGitHub }:
+
+let
+  voices = fetchFromGitHub {
+    owner = "numediart";
+    repo = "MBROLA-voices";
+    rev = "fe05a0ccef6a941207fd6aaad0b31294a1f93a51";  # using latest commit
+    sha256 = "1w0y2xjp9rndwdjagp2wxh656mdm3d6w9cs411g27rjyfy1205a0";
+  };
+in
+stdenv.mkDerivation rec {
+  pname = "mbrola";
+  version = "3.3";
+
+  src = fetchFromGitHub {
+    owner = "numediart";
+    repo = "MBROLA";
+    rev = version;
+    sha256 = "1w86gv6zs2cbr0731n49z8v6xxw0g8b0hzyv2iqb9mqcfh38l8zy";
+  };
+
+  # required for cross compilation
+  makeFlags = [ "CC=${stdenv.cc.targetPrefix}cc" ];
+
+  installPhase = ''
+    runHook preInstall
+    install -D Bin/mbrola $out/bin/mbrola
+
+    # TODO: package separately because it's very big
+    install -d $out/share/mbrola/voices
+    cp -R ${voices}/data/* $out/share/mbrola/voices/
+    runHook postInstall
+  '';
+
+  meta = with lib; {
+    description = "Speech synthesizer based on the concatenation of diphones";
+    homepage = "https://github.com/numediart/MBROLA";
+    license = licenses.agpl3Plus;
+    maintainers = with maintainers; [ davidak ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/pkgs/applications/audio/mda-lv2/default.nix b/pkgs/applications/audio/mda-lv2/default.nix
new file mode 100644
index 00000000000..92f8506483f
--- /dev/null
+++ b/pkgs/applications/audio/mda-lv2/default.nix
@@ -0,0 +1,22 @@
+{ lib, stdenv, fetchurl, fftwSinglePrec, lv2, pkg-config, wafHook, python3 }:
+
+stdenv.mkDerivation rec {
+  pname = "mda-lv2";
+  version = "1.2.6";
+
+  src = fetchurl {
+    url = "https://download.drobilla.net/${pname}-${version}.tar.bz2";
+    sha256 = "sha256-zWYRcCSuBJzzrKg/npBKcCdyJOI6lp9yqcXQEKSYV9s=";
+  };
+
+  nativeBuildInputs = [ pkg-config wafHook python3 ];
+  buildInputs = [ fftwSinglePrec lv2 ];
+
+  meta = with 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/pkgs/applications/audio/mellowplayer/default.nix b/pkgs/applications/audio/mellowplayer/default.nix
new file mode 100644
index 00000000000..5bdcb81fb63
--- /dev/null
+++ b/pkgs/applications/audio/mellowplayer/default.nix
@@ -0,0 +1,70 @@
+{ cmake
+, fetchFromGitLab
+, lib
+, libnotify
+, mkDerivation
+, pkg-config
+, qtbase
+, qtdeclarative
+, qtgraphicaleffects
+, qtquickcontrols2
+, qttools
+, qtwebengine
+}:
+
+mkDerivation rec {
+  pname = "MellowPlayer";
+  version = "3.6.8";
+
+  src = fetchFromGitLab {
+    owner = "ColinDuquesnoy";
+    repo = "MellowPlayer";
+    rev = version;
+    sha256 = "sha256-rsF2xQet7U8d4oGU/HgghvE3vvmkxjlGXPBlLD9mWTk=";
+  };
+
+  nativeBuildInputs = [ cmake pkg-config ];
+
+  buildInputs = [
+    libnotify
+    qtbase
+    qtdeclarative
+    qtgraphicaleffects
+    qtquickcontrols2
+    qttools
+    qtwebengine
+  ];
+
+  doCheck = true;
+
+  cmakeFlags = [ "-DBUILD_TESTS=ON" ];
+
+  preCheck = ''
+    # Running the tests requires a location at the home directory for logging.
+    export HOME="$NIX_BUILD_TOP/home"
+    mkdir -p "$HOME/.local/share/MellowPlayer.Tests/MellowPlayer.Tests/Logs"
+
+    # Without this, the tests fail because they cannot create the QT Window
+    export QT_QPA_PLATFORM=offscreen
+  ''
+  # TODO: The tests are failing because it can't locate QT plugins. Is there a better way to do this?
+  + (builtins.concatStringsSep "\n" (lib.lists.flatten (builtins.map
+      (pkg: [
+        (lib.optionalString (pkg ? qtPluginPrefix) ''
+          export QT_PLUGIN_PATH="${pkg}/${pkg.qtPluginPrefix}"''${QT_PLUGIN_PATH:+':'}$QT_PLUGIN_PATH
+        '')
+
+        (lib.optionalString (pkg ? qtQmlPrefix) ''
+          export QML2_IMPORT_PATH="${pkg}/${pkg.qtQmlPrefix}"''${QML2_IMPORT_PATH:+':'}$QML2_IMPORT_PATH
+        '')
+      ]) buildInputs)));
+
+  meta = with lib; {
+    inherit (qtbase.meta) platforms;
+
+    description = "Cloud music integration for your desktop";
+    homepage = "https://gitlab.com/ColinDuquesnoy/MellowPlayer";
+    license = licenses.gpl2;
+    maintainers = with maintainers; [ kalbasit ];
+  };
+}
diff --git a/pkgs/applications/audio/melmatcheq.lv2/default.nix b/pkgs/applications/audio/melmatcheq.lv2/default.nix
new file mode 100644
index 00000000000..55c6e4c185a
--- /dev/null
+++ b/pkgs/applications/audio/melmatcheq.lv2/default.nix
@@ -0,0 +1,28 @@
+{ lib, stdenv, fetchFromGitHub, xorg, xorgproto, cairo, lv2, pkg-config }:
+
+stdenv.mkDerivation rec {
+  pname = "MelMatchEQ.lv2";
+  version = "0.1";
+
+  src = fetchFromGitHub {
+    owner = "brummer10";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "1s805jgb9msxfq9047s7pxrngizb00w8sm4z94iii80ba65rd20x";
+  };
+
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = [
+    xorg.libX11 xorgproto cairo lv2
+  ];
+
+  installFlags = [ "INSTALL_DIR=$(out)/lib/lv2" ];
+
+  meta = with lib; {
+    homepage = "https://github.com/brummer10/MelMatchEQ.lv2";
+    description = "a profiling EQ using a 26 step Mel Frequency Band";
+    maintainers = with maintainers; [ magnetophon ];
+    license = licenses.gpl2Plus;
+    platforms = platforms.linux;
+  };
+}
diff --git a/pkgs/applications/audio/meterbridge/buf_rect.patch b/pkgs/applications/audio/meterbridge/buf_rect.patch
new file mode 100644
index 00000000000..f108b80c101
--- /dev/null
+++ b/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/pkgs/applications/audio/meterbridge/default.nix b/pkgs/applications/audio/meterbridge/default.nix
new file mode 100644
index 00000000000..a825eaa4e38
--- /dev/null
+++ b/pkgs/applications/audio/meterbridge/default.nix
@@ -0,0 +1,26 @@
+{ lib, stdenv, fetchurl, pkg-config, SDL, SDL_image, libjack2
+}:
+
+stdenv.mkDerivation rec {
+  version = "0.9.3";
+  pname = "meterbridge";
+
+  src = fetchurl {
+    url = "http://plugin.org.uk/meterbridge/${pname}-${version}.tar.gz";
+    sha256 = "0s7n3czfpil94vsd7iblv4xrck9c7zvsz4r3yfbkqcv85pjz1viz";
+  };
+
+  patches = [ ./buf_rect.patch ./fix_build_with_gcc-5.patch];
+
+  buildInputs =
+    [ pkg-config SDL SDL_image libjack2
+    ];
+
+  meta = with 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/pkgs/applications/audio/meterbridge/fix_build_with_gcc-5.patch b/pkgs/applications/audio/meterbridge/fix_build_with_gcc-5.patch
new file mode 100644
index 00000000000..a738cd0b82a
--- /dev/null
+++ b/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/pkgs/applications/audio/meters_lv2/default.nix b/pkgs/applications/audio/meters_lv2/default.nix
new file mode 100644
index 00000000000..86c7e64a6e6
--- /dev/null
+++ b/pkgs/applications/audio/meters_lv2/default.nix
@@ -0,0 +1,53 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, pkg-config
+, lv2
+, libGLU
+, libGL
+, gtk2
+, cairo
+, pango
+, fftwFloat
+, libjack2
+}:
+
+stdenv.mkDerivation rec {
+  pname = "meters.lv2";
+  version = "0.9.10";
+  robtkVersion = "0.6.2";
+
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = [ lv2 libGLU libGL gtk2 cairo pango fftwFloat libjack2 ];
+
+  src = fetchFromGitHub {
+    owner = "x42";
+    repo = "meters.lv2";
+    rev = "v${version}";
+    sha256 = "sha256-u2KIsaia0rAteQoEh6BLNCiRHFufHYF95z6J/EMgeSE=";
+  };
+
+  robtkSrc = fetchFromGitHub {
+    owner = "x42";
+    repo = "robtk";
+    rev = "v${robtkVersion}";
+    sha256 = "sha256-zeRMobfKW0+wJwYVem74tglitkI6DSoK75Auywcu4Tw=";
+  };
+
+  postUnpack = ''
+    rm -rf $sourceRoot/robtk/
+    ln -s ${robtkSrc} $sourceRoot/robtk
+  '';
+
+  meter_VERSION = version;
+  enableParallelBuilding = true;
+  makeFlags = [ "PREFIX=${placeholder "out"}" ];
+
+  meta = with lib; {
+    description = "Collection of audio level meters with GUI in LV2 plugin format";
+    homepage = "https://x42.github.io/meters.lv2/";
+    maintainers = with maintainers; [ ehmry ];
+    license = licenses.gpl2;
+    platforms = platforms.linux;
+  };
+}
diff --git a/pkgs/applications/audio/mhwaveedit/default.nix b/pkgs/applications/audio/mhwaveedit/default.nix
new file mode 100644
index 00000000000..e6b21dff2dc
--- /dev/null
+++ b/pkgs/applications/audio/mhwaveedit/default.nix
@@ -0,0 +1,39 @@
+{ lib, stdenv, fetchFromGitHub, makeWrapper, SDL, alsa-lib, autoreconfHook, gtk2, libjack2, ladspaH
+, ladspaPlugins, libsamplerate, libsndfile, pkg-config, libpulseaudio, lame
+, vorbis-tools }:
+
+stdenv.mkDerivation rec {
+  pname = "mhwaveedit";
+  version = "1.4.24";
+
+  src = fetchFromGitHub {
+    owner = "magnush";
+    repo = "mhwaveedit";
+    rev = "v${version}";
+    sha256 = "037pbq23kh8hsih994x2sv483imglwcrqrx6m8visq9c46fi0j1y";
+  };
+
+  nativeBuildInputs = [ autoreconfHook makeWrapper pkg-config ];
+
+  preAutoreconf = "(cd docgen && sh gendocs.sh)";
+
+  buildInputs = [
+    SDL alsa-lib 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 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/pkgs/applications/audio/mi2ly/default.nix b/pkgs/applications/audio/mi2ly/default.nix
new file mode 100644
index 00000000000..9a046a2e11a
--- /dev/null
+++ b/pkgs/applications/audio/mi2ly/default.nix
@@ -0,0 +1,32 @@
+{ lib, stdenv, fetchurl }:
+
+stdenv.mkDerivation rec {
+  pname = "mi2ly";
+  version = "0.12";
+
+  src = fetchurl {
+    url = "https://download.savannah.gnu.org/releases/mi2ly/mi2ly.${version}.tar.bz2";
+    sha256 = "sha256-lFbqH+syFaQDMbXfb+OUcWnyKnjfVz9yl7DbTTn7JKw=";
+  };
+
+  sourceRoot = ".";
+
+  hardeningDisable = [ "format" ];
+
+  NIX_CFLAGS_COMPILE = [ "-fgnu89-inline" ];
+
+  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 = with lib; {
+    description = "MIDI to Lilypond converter";
+    license = licenses.gpl2Plus;
+    maintainers = with maintainers; [ raskin ];
+    platforms = platforms.linux;
+    homepage = "https://www.nongnu.org/mi2ly/";
+  };
+}
diff --git a/pkgs/applications/audio/mid2key/default.nix b/pkgs/applications/audio/mid2key/default.nix
new file mode 100644
index 00000000000..5db17b99d1c
--- /dev/null
+++ b/pkgs/applications/audio/mid2key/default.nix
@@ -0,0 +1,26 @@
+{ lib, stdenv, fetchurl, alsa-lib, 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 = [ alsa-lib libX11 libXi libXtst xorgproto ];
+
+  buildPhase = "make";
+
+  installPhase = "mkdir -p $out/bin && mv mid2key $out/bin";
+
+  meta = with 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/pkgs/applications/audio/midas/generic.nix b/pkgs/applications/audio/midas/generic.nix
new file mode 100644
index 00000000000..93a215e46b1
--- /dev/null
+++ b/pkgs/applications/audio/midas/generic.nix
@@ -0,0 +1,43 @@
+{ stdenv, fetchurl, lib, libX11, libXext, alsa-lib, freetype, brand, type, version, homepage, url, sha256, ... }:
+stdenv.mkDerivation rec {
+  inherit type;
+  baseName = "${type}-Edit";
+  name = "${lib.toLower baseName}-${version}";
+
+  src = fetchurl {
+    inherit url;
+    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
+      alsa-lib          # 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 lib; {
+    inherit homepage;
+    description = "Editor for the ${brand} ${type} digital mixer";
+    license = licenses.unfree;
+    platforms = platforms.linux;
+    maintainers = [ maintainers.magnetophon ];
+  };
+}
diff --git a/pkgs/applications/audio/midas/m32edit.nix b/pkgs/applications/audio/midas/m32edit.nix
new file mode 100644
index 00000000000..082da1621be
--- /dev/null
+++ b/pkgs/applications/audio/midas/m32edit.nix
@@ -0,0 +1,10 @@
+{ callPackage, ... } @ args:
+
+callPackage ./generic.nix (args // rec {
+  brand = "Midas";
+  type = "M32";
+  version = "4.1";
+  url = "https://mediadl.musictribe.com/download/software/midas_${type}/${type}-Edit_LINUX_64-Bit_${version}.tar.gz";
+  sha256 = "0aqhdrxqa49liyvbbw5x32kwk0h1spzvmizmdxklrfs64vvr9bvh";
+  homepage = "https://midasconsoles.com/midas/product?modelCode=P0B3I";
+})
diff --git a/pkgs/applications/audio/midas/x32edit.nix b/pkgs/applications/audio/midas/x32edit.nix
new file mode 100644
index 00000000000..a07c83a9dfe
--- /dev/null
+++ b/pkgs/applications/audio/midas/x32edit.nix
@@ -0,0 +1,10 @@
+{ callPackage, ... } @ args:
+
+callPackage ./generic.nix (args // rec {
+  brand = "Behringer";
+  type = "X32";
+  version = "4.1";
+  url = "https://mediadl.musictribe.com/download/software/behringer/${type}/${type}-Edit_LINUX_64-Bit_${version}.tar.gz";
+  sha256 = "0zsw7qfmcci87skkpq8vx5zxk35phn8y4byispvki9ascifnnb33";
+  homepage = "https://www.behringer.com/behringer/product?modelCode=P0ASF";
+})
diff --git a/pkgs/applications/audio/midi-visualizer/default.nix b/pkgs/applications/audio/midi-visualizer/default.nix
new file mode 100644
index 00000000000..a50e5dcd669
--- /dev/null
+++ b/pkgs/applications/audio/midi-visualizer/default.nix
@@ -0,0 +1,42 @@
+{ lib, stdenv, fetchFromGitHub, cmake, pkg-config, libX11, glfw, makeWrapper,
+  libXrandr, libXinerama, libXcursor, gtk3, ffmpeg-full, ...}:
+
+stdenv.mkDerivation rec {
+  pname = "MIDIVisualizer";
+  version = "6.5";
+
+  src = fetchFromGitHub {
+    owner = "kosua20";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "sha256-thRcRJ88bz3jwu6rKaQxt2MkBSf5Ri1jygkKDguP2eE=";
+  };
+
+  nativeBuildInputs = [ cmake pkg-config makeWrapper];
+
+  buildInputs = [
+    libX11
+    glfw
+    libXrandr
+    libXinerama
+    libXcursor
+    gtk3
+    ffmpeg-full
+  ];
+
+  installPhase = ''
+    mkdir -p $out/bin
+    cp MIDIVisualizer $out/bin
+
+    wrapProgram $out/bin/MIDIVisualizer \
+      --prefix XDG_DATA_DIRS : "${gtk3}/share/gsettings-schemas/${gtk3.name}:$XDG_DATA_DIRS"
+  '';
+
+  meta = with lib; {
+    description = "A small MIDI visualizer tool, using OpenGL";
+    homepage = "https://github.com/kosua20/MIDIVisualizer";
+    license = licenses.mit;
+    platforms = platforms.linux;
+    maintainers = [ maintainers.ericdallo ];
+  };
+}
diff --git a/pkgs/applications/audio/midisheetmusic/default.nix b/pkgs/applications/audio/midisheetmusic/default.nix
new file mode 100644
index 00000000000..6a5626d98a6
--- /dev/null
+++ b/pkgs/applications/audio/midisheetmusic/default.nix
@@ -0,0 +1,62 @@
+{ lib, stdenv, fetchurl
+, mono, dotnetPackages, makeWrapper
+, gtk2, cups, timidity }:
+
+let
+  version = "2.6";
+in stdenv.mkDerivation {
+  pname = "midisheetmusic";
+  inherit 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 : ${lib.makeLibraryPath [ gtk2 cups ]} \
+      --prefix PATH : ${lib.makeBinPath [ timidity ]} \
+      --add-flags $out/bin/.MidiSheetMusic.exe
+  '';
+
+  meta = with lib; {
+    description = "Convert MIDI Files to Piano Sheet Music for two hands";
+    homepage = "http://midisheetmusic.com";
+    license = licenses.gpl2;
+    maintainers = [ ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/pkgs/applications/audio/mikmod/default.nix b/pkgs/applications/audio/mikmod/default.nix
new file mode 100644
index 00000000000..4cc0fec2e2f
--- /dev/null
+++ b/pkgs/applications/audio/mikmod/default.nix
@@ -0,0 +1,21 @@
+{ lib, stdenv, fetchurl, libmikmod, ncurses }:
+
+stdenv.mkDerivation rec {
+  pname = "mikmod";
+  version = "3.2.8";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/${pname}/${pname}-${version}.tar.gz";
+    sha256 = "1k54p8pn3jinha0f2i23ad15pf1pamibzcxjrbzjbklpcz1ipc6v";
+  };
+
+  buildInputs = [ libmikmod ncurses ];
+
+  meta = {
+    description = "Tracker music player for the terminal";
+    homepage = "http://mikmod.shlomifish.org/";
+    license = lib.licenses.gpl2Plus;
+    maintainers = with lib.maintainers; [ ];
+    platforms = with lib.platforms; linux;
+  };
+}
diff --git a/pkgs/applications/audio/milkytracker/default.nix b/pkgs/applications/audio/milkytracker/default.nix
new file mode 100644
index 00000000000..ea54a4a55d4
--- /dev/null
+++ b/pkgs/applications/audio/milkytracker/default.nix
@@ -0,0 +1,41 @@
+{ lib, stdenv, fetchFromGitHub, cmake, pkg-config, makeWrapper
+, SDL2, alsa-lib, libjack2, lhasa, perl, rtmidi, zlib, zziplib }:
+
+stdenv.mkDerivation rec {
+  version = "1.03.00";
+  pname = "milkytracker";
+
+  src = fetchFromGitHub {
+    owner  = "milkytracker";
+    repo   = "MilkyTracker";
+    rev    = "v${version}";
+    sha256 = "025fj34gq2kmkpwcswcyx7wdxb89vm944dh685zi4bxx0hz16vvk";
+  };
+
+  postPatch = ''
+    # https://github.com/milkytracker/MilkyTracker/issues/262
+    substituteInPlace CMakeLists.txt \
+      --replace 'CMAKE_CXX_STANDARD 98' 'CMAKE_CXX_STANDARD 11'
+  '';
+
+  nativeBuildInputs = [ cmake pkg-config makeWrapper ];
+
+  buildInputs = [ SDL2 alsa-lib libjack2 lhasa perl rtmidi zlib zziplib ];
+
+  # Somehow this does not get set automatically
+  cmakeFlags = [ "-DSDL2MAIN_LIBRARY=${SDL2}/lib/libSDL2.so" ];
+
+  postInstall = ''
+    install -Dm644 $src/resources/milkytracker.desktop $out/share/applications/milkytracker.desktop
+    install -Dm644 $src/resources/pictures/carton.png $out/share/pixmaps/milkytracker.png
+    install -Dm644 $src/resources/milkytracker.appdata $out/share/appdata/milkytracker.appdata.xml
+  '';
+
+  meta = with lib; {
+    description = "Music tracker application, similar to Fasttracker II";
+    homepage = "https://milkytracker.org/";
+    license = licenses.gpl3Plus;
+    platforms = [ "x86_64-linux" "i686-linux" ];
+    maintainers = with maintainers; [];
+  };
+}
diff --git a/pkgs/applications/audio/mimic/default.nix b/pkgs/applications/audio/mimic/default.nix
new file mode 100644
index 00000000000..870584d357e
--- /dev/null
+++ b/pkgs/applications/audio/mimic/default.nix
@@ -0,0 +1,42 @@
+{ config, lib, stdenv, autoreconfHook, fetchFromGitHub, pkg-config, makeWrapper
+, alsa-lib, alsa-plugins, libtool, icu, pcre2
+, pulseaudioSupport ? config.pulseaudio or false, libpulseaudio }:
+
+stdenv.mkDerivation rec {
+  pname = "mimic";
+  version = "1.3.0.1";
+
+  src = fetchFromGitHub {
+    owner = "MycroftAI";
+    repo = "mimic1";
+    rev = version;
+    sha256 = "1agwgby9ql8r3x5rd1rgx3xp9y4cdg4pi3kqlz3vanv9na8nf3id";
+  };
+
+  nativeBuildInputs = [
+    autoreconfHook
+    pkg-config
+    makeWrapper
+  ];
+
+  buildInputs = [
+    alsa-lib
+    alsa-plugins
+    libtool
+    icu
+    pcre2
+  ] ++ lib.optional pulseaudioSupport libpulseaudio;
+
+  postInstall = ''
+    wrapProgram $out/bin/mimic \
+      --run "export ALSA_PLUGIN_DIR=${alsa-plugins}/lib/alsa-lib"
+  '';
+
+  meta = {
+    description = "Mycroft's TTS engine, based on CMU's Flite (Festival Lite)";
+    homepage = "https://mimic.mycroft.ai/";
+    license = lib.licenses.free;
+    platforms = lib.platforms.linux;
+    maintainers = [ lib.maintainers.noneucat ];
+  };
+}
diff --git a/pkgs/applications/audio/miniaudicle/default.nix b/pkgs/applications/audio/miniaudicle/default.nix
new file mode 100644
index 00000000000..e469a96ab72
--- /dev/null
+++ b/pkgs/applications/audio/miniaudicle/default.nix
@@ -0,0 +1,59 @@
+{ lib
+, stdenv
+, fetchurl
+, bison
+, flex
+, which
+, alsa-lib
+, libsndfile
+, qt4
+, qscintilla-qt4
+, libpulseaudio
+, libjack2
+, audioBackend ? "pulse" # "pulse", "alsa", or "jack"
+}:
+
+stdenv.mkDerivation rec {
+  pname = "miniaudicle";
+  version = "1.3.5.2";
+
+  src = fetchurl {
+    url = "https://audicle.cs.princeton.edu/mini/release/files/miniAudicle-${version}.tgz";
+    hash = "sha256-dakDz69uHbKZFj8z67CubmRXEQ5X6GuYqlCXXvLzqSI=";
+  };
+
+  sourceRoot = "miniAudicle-${version}/src";
+
+  postPatch = ''
+    substituteInPlace miniAudicle.pro \
+      --replace "/usr/local" $out
+  '';
+
+  nativeBuildInputs = [
+    bison
+    flex
+    which
+  ];
+
+  buildInputs = [
+    alsa-lib
+    libsndfile
+    qt4
+    qscintilla-qt4
+  ] ++ lib.optional (audioBackend == "pulse") libpulseaudio
+    ++ lib.optional (audioBackend == "jack")  libjack2;
+
+  buildFlags = [ "linux-${audioBackend}" ];
+
+  makeFlags = [ "PREFIX=$(out)" ];
+
+  meta = with lib; {
+    description = "A light-weight integrated development environment for the ChucK digital audio programming language";
+    homepage = "https://audicle.cs.princeton.edu/mini/";
+    downloadPage = "https://audicle.cs.princeton.edu/mini/linux/";
+    license = licenses.gpl2Plus;
+    maintainers = with maintainers; [ fgaz ];
+    platforms = platforms.all;
+    broken = stdenv.isDarwin; # not attempted
+  };
+}
diff --git a/pkgs/applications/audio/mixxx/default.nix b/pkgs/applications/audio/mixxx/default.nix
new file mode 100644
index 00000000000..8b1acc9d0bc
--- /dev/null
+++ b/pkgs/applications/audio/mixxx/default.nix
@@ -0,0 +1,142 @@
+{ lib
+, stdenv
+, mkDerivation
+, fetchurl
+, fetchFromGitHub
+, chromaprint
+, cmake
+, faad2
+, ffmpeg
+, fftw
+, flac
+, glibcLocales
+, hidapi
+, lame
+, libebur128
+, libGLU
+, libid3tag
+, libkeyfinder
+, libmad
+, libmodplug
+, libopus
+, libsecret
+, libshout
+, libsndfile
+, libusb1
+, libvorbis
+, libxcb
+, lilv
+, lv2
+, mp4v2
+, opusfile
+, pcre
+, pkg-config
+, portaudio
+, portmidi
+, protobuf
+, qtbase
+, qtkeychain
+, qtscript
+, qtsvg
+, qtx11extras
+, rubberband
+, serd
+, sord
+, soundtouch
+, sratom
+, sqlite
+, taglib
+, upower
+, vamp-plugin-sdk
+, wavpack
+}:
+
+mkDerivation rec {
+  pname = "mixxx";
+  version = "2.3.2";
+
+  src = fetchFromGitHub {
+    owner = "mixxxdj";
+    repo = "mixxx";
+    rev = version;
+    sha256 = "sha256-EnOO5OGcaIITqfF9gpGktarzYOx128C1M2VmYNzdRsA=";
+  };
+
+  nativeBuildInputs = [ cmake pkg-config ];
+
+  buildInputs = [
+    chromaprint
+    faad2
+    ffmpeg
+    fftw
+    flac
+    glibcLocales
+    hidapi
+    lame
+    libebur128
+    libGLU
+    libid3tag
+    libkeyfinder
+    libmad
+    libmodplug
+    libopus
+    libsecret
+    libshout
+    libsndfile
+    libusb1
+    libvorbis
+    libxcb
+    lilv
+    lv2
+    mp4v2
+    opusfile
+    pcre
+    portaudio
+    portmidi
+    protobuf
+    qtbase
+    qtkeychain
+    qtscript
+    qtsvg
+    qtx11extras
+    rubberband
+    serd
+    sord
+    soundtouch
+    sratom
+    sqlite
+    taglib
+    upower
+    vamp-plugin-sdk
+    wavpack
+  ];
+
+  qtWrapperArgs = [
+    "--set LOCALE_ARCHIVE ${glibcLocales}/lib/locale/locale-archive"
+  ];
+
+  # mixxx installs udev rules to DATADIR instead of SYSCONFDIR
+  # let's disable this and install udev rules manually via postInstall
+  # see https://github.com/mixxxdj/mixxx/blob/2.3.2/CMakeLists.txt#L1381-L1392
+  cmakeFlags = [
+    "-DINSTALL_USER_UDEV_RULES=OFF"
+  ];
+
+  postInstall = lib.optionalString stdenv.isLinux ''
+    rules="$src/res/linux/mixxx-usb-uaccess.rules"
+    if [ ! -f "$rules" ]; then
+        echo "$rules is missing, must update the Nix file."
+        exit 1
+    fi
+    mkdir -p "$out/lib/udev/rules.d"
+    cp "$rules" "$out/lib/udev/rules.d/69-mixxx-usb-uaccess.rules"
+  '';
+
+  meta = with lib; {
+    homepage = "https://mixxx.org";
+    description = "Digital DJ mixing software";
+    license = licenses.gpl2Plus;
+    maintainers = with maintainers; [ goibhniu bfortz ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/pkgs/applications/audio/mmtc/default.nix b/pkgs/applications/audio/mmtc/default.nix
new file mode 100644
index 00000000000..578cecf09b0
--- /dev/null
+++ b/pkgs/applications/audio/mmtc/default.nix
@@ -0,0 +1,32 @@
+{ lib, rustPlatform, fetchFromGitHub, installShellFiles }:
+
+rustPlatform.buildRustPackage rec {
+  pname = "mmtc";
+  version = "0.2.14";
+
+  src = fetchFromGitHub {
+    owner = "figsoda";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "sha256-g2JHY95vkG/Ep2eqz8guteF8fHUso/JuuVijNGkgykA=";
+  };
+
+  cargoSha256 = "sha256-tVjy/O5hfnQFC6to8VMGc39mEXhA5lwUIne6pVvDec0=";
+
+  nativeBuildInputs = [ installShellFiles ];
+
+  preFixup = ''
+    completions=($releaseDir/build/mmtc-*/out/completions)
+    installShellCompletion $completions/mmtc.{bash,fish} --zsh $completions/_mmtc
+  '';
+
+  GEN_COMPLETIONS = 1;
+
+  meta = with lib; {
+    description = "Minimal mpd terminal client that aims to be simple yet highly configurable";
+    homepage = "https://github.com/figsoda/mmtc";
+    changelog = "https://github.com/figsoda/mmtc/blob/v${version}/CHANGELOG.md";
+    license = licenses.mpl20;
+    maintainers = with maintainers; [ figsoda ];
+  };
+}
diff --git a/pkgs/applications/audio/moc/default.nix b/pkgs/applications/audio/moc/default.nix
new file mode 100644
index 00000000000..1d26782b6ae
--- /dev/null
+++ b/pkgs/applications/audio/moc/default.nix
@@ -0,0 +1,102 @@
+{ lib, stdenv, fetchurl, pkg-config
+, ncurses, db , popt, libtool
+# Sound sub-systems
+, alsaSupport ? true, alsa-lib
+, pulseSupport ? true, libpulseaudio, autoreconfHook
+, jackSupport ? true, libjack2
+, ossSupport ? true
+# Audio formats
+, aacSupport ? true, faad2, libid3tag
+, flacSupport ? true, flac
+, midiSupport ? true, timidity
+, modplugSupport ? true, libmodplug
+, mp3Support ? true, libmad
+, musepackSupport ? true, libmpc, libmpcdec, taglib
+, vorbisSupport ? true, libvorbis
+, speexSupport ? true, speex
+, ffmpegSupport ? true, ffmpeg
+, sndfileSupport ? true, libsndfile
+, wavpackSupport ? true, wavpack
+# Misc
+, curlSupport ? true, curl
+, samplerateSupport ? true, libsamplerate
+, withDebug ? false
+}:
+
+let
+  opt = lib.optional;
+  mkFlag = c: f: if c then "--with-${f}" else "--without-${f}";
+
+in stdenv.mkDerivation rec {
+
+  pname = "moc";
+  version = "2.5.2";
+
+  src = fetchurl {
+    url = "http://ftp.daper.net/pub/soft/moc/stable/moc-${version}.tar.bz2";
+    sha256 = "026v977kwb0wbmlmf6mnik328plxg8wykfx9ryvqhirac0aq39pk";
+  };
+
+  patches = []
+    ++ opt ffmpegSupport ./moc-ffmpeg4.patch
+    ++ opt pulseSupport ./pulseaudio.patch;
+
+  nativeBuildInputs = [ pkg-config ]
+    ++ opt pulseSupport autoreconfHook;
+
+  buildInputs = [ ncurses db popt libtool ]
+    # Sound sub-systems
+    ++ opt alsaSupport alsa-lib
+    ++ opt pulseSupport libpulseaudio
+    ++ opt jackSupport libjack2
+    # Audio formats
+    ++ opt (aacSupport || mp3Support) libid3tag
+    ++ opt aacSupport faad2
+    ++ opt flacSupport flac
+    ++ opt midiSupport timidity
+    ++ opt modplugSupport libmodplug
+    ++ opt mp3Support libmad
+    ++ lib.optionals musepackSupport [ libmpc libmpcdec taglib ]
+    ++ opt vorbisSupport libvorbis
+    ++ opt speexSupport speex
+    ++ opt ffmpegSupport ffmpeg
+    ++ opt sndfileSupport libsndfile
+    ++ opt wavpackSupport wavpack
+    # Misc
+    ++ opt curlSupport curl
+    ++ opt samplerateSupport libsamplerate;
+
+  configureFlags = [
+    # Sound sub-systems
+    (mkFlag alsaSupport "alsa")
+    (mkFlag pulseSupport "pulse")
+    (mkFlag jackSupport "jack")
+    (mkFlag ossSupport "oss")
+    # Audio formats
+    (mkFlag aacSupport "aac")
+    (mkFlag flacSupport "flac")
+    (mkFlag midiSupport "timidity")
+    (mkFlag modplugSupport "modplug")
+    (mkFlag mp3Support "mp3")
+    (mkFlag musepackSupport "musepack")
+    (mkFlag vorbisSupport "vorbis")
+    (mkFlag speexSupport "speex")
+    (mkFlag ffmpegSupport "ffmpeg")
+    (mkFlag sndfileSupport "sndfile")
+    (mkFlag wavpackSupport "wavpack")
+    # Misc
+    (mkFlag curlSupport "curl")
+    (mkFlag samplerateSupport "samplerate")
+    ("--enable-debug=" + (if withDebug then "yes" else "no"))
+    "--disable-cache"
+    "--without-rcc"
+  ];
+
+  meta = with 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; [ aethelz pSub jagajaga ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/pkgs/applications/audio/moc/moc-ffmpeg4.patch b/pkgs/applications/audio/moc/moc-ffmpeg4.patch
new file mode 100644
index 00000000000..7499f9c539b
--- /dev/null
+++ b/pkgs/applications/audio/moc/moc-ffmpeg4.patch
@@ -0,0 +1,33 @@
+Index: decoder_plugins/ffmpeg/ffmpeg.c
+===================================================================
+--- /decoder_plugins/ffmpeg/ffmpeg.c	(revisión: 2963)
++++ /decoder_plugins/ffmpeg/ffmpeg.c	(copia de trabajo)
+@@ -697,7 +697,7 @@
+ 	 * FFmpeg/LibAV in use.  For some versions this will be caught in
+ 	 * *_find_stream_info() above and misreported as an unfound codec
+ 	 * parameters error. */
+-	if (data->codec->capabilities & CODEC_CAP_EXPERIMENTAL) {
++	if (data->codec->capabilities & AV_CODEC_CAP_EXPERIMENTAL) {
+ 		decoder_error (&data->error, ERROR_FATAL, 0,
+ 				"The codec is experimental and may damage MOC: %s",
+ 				data->codec->name);
+@@ -705,8 +705,8 @@
+ 	}
+ 
+ 	set_downmixing (data);
+-	if (data->codec->capabilities & CODEC_CAP_TRUNCATED)
+-		data->enc->flags |= CODEC_FLAG_TRUNCATED;
++	if (data->codec->capabilities & AV_CODEC_CAP_TRUNCATED)
++		data->enc->flags |= AV_CODEC_FLAG_TRUNCATED;
+ 
+ 	if (avcodec_open2 (data->enc, data->codec, NULL) < 0)
+ 	{
+@@ -725,7 +725,7 @@
+ 
+ 	data->sample_width = sfmt_Bps (data->fmt);
+ 
+-	if (data->codec->capabilities & CODEC_CAP_DELAY)
++	if (data->codec->capabilities & AV_CODEC_CAP_DELAY)
+ 		data->delay = true;
+ 	data->seek_broken = is_seek_broken (data);
+ 	data->timing_broken = is_timing_broken (data->ic);
diff --git a/pkgs/applications/audio/moc/pulseaudio.patch b/pkgs/applications/audio/moc/pulseaudio.patch
new file mode 100644
index 00000000000..37d81dddf2b
--- /dev/null
+++ b/pkgs/applications/audio/moc/pulseaudio.patch
@@ -0,0 +1,800 @@
+diff --git a/audio.c b/audio.c
+--- a/audio.c
++++ b/audio.c
+@@ -32,6 +32,9 @@
+ #include "log.h"
+ #include "lists.h"
+ 
++#ifdef HAVE_PULSE
++# include "pulse.h"
++#endif
+ #ifdef HAVE_OSS
+ # include "oss.h"
+ #endif
+@@ -893,6 +896,15 @@
+ 		}
+ #endif
+ 
++#ifdef HAVE_PULSE
++		if (!strcasecmp(name, "pulseaudio")) {
++			pulse_funcs (funcs);
++			printf ("Trying PulseAudio...\n");
++			if (funcs->init(&hw_caps))
++				return;
++		}
++#endif
++
+ #ifdef HAVE_OSS
+ 		if (!strcasecmp(name, "oss")) {
+ 			oss_funcs (funcs);
+diff --git a/configure.in b/configure.in
+--- a/configure.in
++++ b/configure.in
+@@ -162,6 +162,21 @@
+ 		       AC_MSG_ERROR([BerkeleyDB (libdb) not found.]))
+ fi
+ 
++AC_ARG_WITH(pulse, AS_HELP_STRING(--without-pulse,
++				  Compile without PulseAudio support.))
++
++if test "x$with_pulse" != "xno"
++then
++	PKG_CHECK_MODULES(PULSE, [libpulse],
++		 [SOUND_DRIVERS="$SOUND_DRIVERS PULSE"
++		  EXTRA_OBJS="$EXTRA_OBJS pulse.o"
++		  AC_DEFINE([HAVE_PULSE], 1, [Define if you have PulseAudio.])
++		  EXTRA_LIBS="$EXTRA_LIBS $PULSE_LIBS"
++		  CFLAGS="$CFLAGS $PULSE_CFLAGS"],
++		  [true])
++fi
++
++
+ AC_ARG_WITH(oss, AS_HELP_STRING([--without-oss],
+                                 [Compile without OSS support]))
+ 
+diff --git a/options.c b/options.c
+--- a/options.c
++++ b/options.c
+@@ -572,10 +572,11 @@
+ 
+ #ifdef OPENBSD
+ 	add_list ("SoundDriver", "SNDIO:JACK:OSS",
+-	          CHECK_DISCRETE(5), "SNDIO", "Jack", "ALSA", "OSS", "null");
++		  CHECK_DISCRETE(5), "SNDIO", "PulseAudio", "Jack", "ALSA", "OSS", "null");
++
+ #else
+ 	add_list ("SoundDriver", "Jack:ALSA:OSS",
+-	          CHECK_DISCRETE(5), "SNDIO", "Jack", "ALSA", "OSS", "null");
++	          CHECK_DISCRETE(5), "SNDIO", "PulseAudio", "Jack", "ALSA", "OSS", "null");
+ #endif
+ 
+ 	add_str  ("JackClientName", "moc", CHECK_NONE);
+diff --git a/pulse.c b/pulse.c
+new file mode 100644
+--- /dev/null
++++ b/pulse.c
+@@ -0,0 +1,705 @@
++/*
++ * MOC - music on console
++ * Copyright (C) 2011 Marien Zwart <marienz@marienz.net>
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License as published by
++ * the Free Software Foundation; either version 2 of the License, or
++ * (at your option) any later version.
++ *
++ */
++
++/* PulseAudio backend.
++ *
++ * FEATURES:
++ *
++ * Does not autostart a PulseAudio server, but uses an already-started
++ * one, which should be better than alsa-through-pulse.
++ *
++ * Supports control of either our stream's or our entire sink's volume
++ * while we are actually playing. Volume control while paused is
++ * intentionally unsupported: the PulseAudio documentation strongly
++ * suggests not passing in an initial volume when creating a stream
++ * (allowing the server to track this instead), and we do not know
++ * which sink to control if we do not have a stream open.
++ *
++ * IMPLEMENTATION:
++ *
++ * Most client-side (resource allocation) errors are fatal. Failure to
++ * create a server context or stream is not fatal (and MOC should cope
++ * with these failures too), but server communication failures later
++ * on are currently not handled (MOC has no great way for us to tell
++ * it we no longer work, and I am not sure if attempting to reconnect
++ * is worth it or even a good idea).
++ *
++ * The pulse "simple" API is too simple: it combines connecting to the
++ * server and opening a stream into one operation, while I want to
++ * connect to the server when MOC starts (and fall back to a different
++ * backend if there is no server), and I cannot open a stream at that
++ * time since I do not know the audio format yet.
++ *
++ * PulseAudio strongly recommends we use a high-latency connection,
++ * which the MOC frontend code might not expect from its audio
++ * backend. We'll see.
++ *
++ * We map MOC's percentage volumes linearly to pulse's PA_VOLUME_MUTED
++ * (0) .. PA_VOLUME_NORM range. This is what the PulseAudio docs recommend
++ * ( http://pulseaudio.org/wiki/WritingVolumeControlUIs ). It does mean
++ * PulseAudio volumes above PA_VOLUME_NORM do not work well with MOC.
++ *
++ * Comments in audio.h claim "All functions are executed only by one
++ * thread" (referring to the function in the hw_funcs struct). This is
++ * a blatant lie. Most of them are invoked off the "output buffer"
++ * thread (out_buf.c) but at least the "playing" thread (audio.c)
++ * calls audio_close which calls our close function. We can mostly
++ * ignore this problem because we serialize on the pulseaudio threaded
++ * mainloop lock. But it does mean that functions that are normally
++ * only called between open and close (like reset) are sometimes
++ * called without us having a stream. Bulletproof, therefore:
++ * serialize setting/unsetting our global stream using the threaded
++ * mainloop lock, and check for that stream being non-null before
++ * using it.
++ *
++ * I am not convinced there are no further dragons lurking here: can
++ * the "playing" thread(s) close and reopen our output stream while
++ * the "output buffer" thread is sending output there? We can bail if
++ * our stream is simply closed, but we do not currently detect it
++ * being reopened and no longer using the same sample format, which
++ * might have interesting results...
++ *
++ * Also, read_mixer is called from the main server thread (handling
++ * commands). This crashed me once when it got at a stream that was in
++ * the "creating" state and therefore did not have a valid stream
++ * index yet. Fixed by only assigning to the stream global when the
++ * stream is valid.
++ */
++
++#ifdef HAVE_CONFIG_H
++# include "config.h"
++#endif
++
++#define DEBUG
++
++#include <pulse/pulseaudio.h>
++#include "common.h"
++#include "log.h"
++#include "audio.h"
++
++
++/* The pulse mainloop and context are initialized in pulse_init and
++ * destroyed in pulse_shutdown.
++ */
++static pa_threaded_mainloop *mainloop = NULL;
++static pa_context *context = NULL;
++
++/* The stream is initialized in pulse_open and destroyed in pulse_close. */
++static pa_stream *stream = NULL;
++
++static int showing_sink_volume = 0;
++
++/* Callbacks that do nothing but wake up the mainloop. */
++
++static void context_state_callback (pa_context *context ATTR_UNUSED,
++				    void *userdata)
++{
++	pa_threaded_mainloop *m = userdata;
++
++	pa_threaded_mainloop_signal (m, 0);
++}
++
++static void stream_state_callback (pa_stream *stream ATTR_UNUSED,
++				   void *userdata)
++{
++	pa_threaded_mainloop *m = userdata;
++
++	pa_threaded_mainloop_signal (m, 0);
++}
++
++static void stream_write_callback (pa_stream *stream ATTR_UNUSED,
++				   size_t nbytes ATTR_UNUSED, void *userdata)
++{
++	pa_threaded_mainloop *m = userdata;
++
++	pa_threaded_mainloop_signal (m, 0);
++}
++
++/* Initialize pulse mainloop and context. Failure to connect to the
++ * pulse daemon is nonfatal, everything else is fatal (as it
++ * presumably means we ran out of resources).
++ */
++static int pulse_init (struct output_driver_caps *caps)
++{
++	pa_context *c;
++	pa_proplist *proplist;
++
++	assert (!mainloop);
++	assert (!context);
++
++	mainloop = pa_threaded_mainloop_new ();
++	if (!mainloop)
++		fatal ("Cannot create PulseAudio mainloop");
++
++	if (pa_threaded_mainloop_start (mainloop) < 0)
++		fatal ("Cannot start PulseAudio mainloop");
++
++	/* TODO: possibly add more props.
++	 *
++	 * There are a few we could set in proplist.h but nothing I
++	 * expect to be very useful.
++	 *
++	 * http://pulseaudio.org/wiki/ApplicationProperties recommends
++	 * setting at least application.name, icon.name and media.role.
++	 *
++	 * No need to set application.name here, the name passed to
++	 * pa_context_new_with_proplist overrides it.
++	 */
++	proplist = pa_proplist_new ();
++	if (!proplist)
++		fatal ("Cannot allocate PulseAudio proplist");
++
++	pa_proplist_sets (proplist,
++			  PA_PROP_APPLICATION_VERSION, PACKAGE_VERSION);
++	pa_proplist_sets (proplist, PA_PROP_MEDIA_ROLE, "music");
++	pa_proplist_sets (proplist, PA_PROP_APPLICATION_ID, "net.daper.moc");
++
++	pa_threaded_mainloop_lock (mainloop);
++
++	c = pa_context_new_with_proplist (
++		pa_threaded_mainloop_get_api (mainloop),
++		PACKAGE_NAME, proplist);
++	pa_proplist_free (proplist);
++
++	if (!c)
++		fatal ("Cannot allocate PulseAudio context");
++
++	pa_context_set_state_callback (c, context_state_callback, mainloop);
++
++	/* Ignore return value, rely on state being set properly */
++	pa_context_connect (c, NULL, PA_CONTEXT_NOAUTOSPAWN, NULL);
++
++	while (1) {
++		pa_context_state_t state = pa_context_get_state (c);
++
++		if (state == PA_CONTEXT_READY)
++			break;
++
++		if (!PA_CONTEXT_IS_GOOD (state)) {
++			error ("PulseAudio connection failed: %s",
++			       pa_strerror (pa_context_errno (c)));
++
++			goto unlock_and_fail;
++		}
++
++		debug ("waiting for context to become ready...");
++		pa_threaded_mainloop_wait (mainloop);
++	}
++
++	/* Only set the global now that the context is actually ready */
++	context = c;
++
++	pa_threaded_mainloop_unlock (mainloop);
++
++	/* We just make up the hardware capabilities, since pulse is
++	 * supposed to be abstracting these out. Assume pulse will
++	 * deal with anything we want to throw at it, and that we will
++	 * only want mono or stereo audio.
++	 */
++	caps->min_channels = 1;
++	caps->max_channels = 2;
++	caps->formats = (SFMT_S8 | SFMT_S16 | SFMT_S32 |
++			 SFMT_FLOAT | SFMT_BE | SFMT_LE);
++
++	return 1;
++
++unlock_and_fail:
++
++	pa_context_unref (c);
++
++	pa_threaded_mainloop_unlock (mainloop);
++
++	pa_threaded_mainloop_stop (mainloop);
++	pa_threaded_mainloop_free (mainloop);
++	mainloop = NULL;
++
++	return 0;
++}
++
++static void pulse_shutdown (void)
++{
++	pa_threaded_mainloop_lock (mainloop);
++
++	pa_context_disconnect (context);
++	pa_context_unref (context);
++	context = NULL;
++
++	pa_threaded_mainloop_unlock (mainloop);
++
++	pa_threaded_mainloop_stop (mainloop);
++	pa_threaded_mainloop_free (mainloop);
++	mainloop = NULL;
++}
++
++static int pulse_open (struct sound_params *sound_params)
++{
++	pa_sample_spec ss;
++	pa_buffer_attr ba;
++	pa_stream *s;
++
++	assert (!stream);
++	/* Initialize everything to -1, which in practice gets us
++	 * about 2 seconds of latency (which is fine). This is not the
++	 * same as passing NULL for this struct, which gets us an
++	 * unnecessarily short alsa-like latency.
++	 */
++	ba.fragsize = (uint32_t) -1;
++	ba.tlength = (uint32_t) -1;
++	ba.prebuf = (uint32_t) -1;
++	ba.minreq = (uint32_t) -1;
++	ba.maxlength = (uint32_t) -1;
++
++	ss.channels = sound_params->channels;
++	ss.rate = sound_params->rate;
++	switch (sound_params->fmt) {
++	case SFMT_U8:
++		ss.format = PA_SAMPLE_U8;
++		break;
++	case SFMT_S16 | SFMT_LE:
++		ss.format = PA_SAMPLE_S16LE;
++		break;
++	case SFMT_S16 | SFMT_BE:
++		ss.format = PA_SAMPLE_S16BE;
++		break;
++	case SFMT_FLOAT | SFMT_LE:
++		ss.format = PA_SAMPLE_FLOAT32LE;
++		break;
++	case SFMT_FLOAT | SFMT_BE:
++		ss.format = PA_SAMPLE_FLOAT32BE;
++		break;
++	case SFMT_S32 | SFMT_LE:
++		ss.format = PA_SAMPLE_S32LE;
++		break;
++	case SFMT_S32 | SFMT_BE:
++		ss.format = PA_SAMPLE_S32BE;
++		break;
++
++	default:
++		fatal ("pulse: got unrequested format");
++	}
++
++	debug ("opening stream");
++
++	pa_threaded_mainloop_lock (mainloop);
++
++	/* TODO: figure out if there are useful stream properties to set.
++	 *
++	 * I do not really see any in proplist.h that we can set from
++	 * here (there are media title/artist/etc props but we do not
++	 * have that data available here).
++	 */
++	s = pa_stream_new (context, "music", &ss, NULL);
++	if (!s)
++		fatal ("pulse: stream allocation failed");
++
++	pa_stream_set_state_callback (s, stream_state_callback, mainloop);
++	pa_stream_set_write_callback (s, stream_write_callback, mainloop);
++
++	/* Ignore return value, rely on failed stream state instead. */
++	pa_stream_connect_playback (
++		s, NULL, &ba,
++		PA_STREAM_INTERPOLATE_TIMING |
++		PA_STREAM_AUTO_TIMING_UPDATE |
++		PA_STREAM_ADJUST_LATENCY,
++		NULL, NULL);
++
++	while (1) {
++		pa_stream_state_t state = pa_stream_get_state (s);
++
++		if (state == PA_STREAM_READY)
++			break;
++
++		if (!PA_STREAM_IS_GOOD (state)) {
++			error ("PulseAudio stream connection failed");
++
++			goto fail;
++		}
++
++		debug ("waiting for stream to become ready...");
++		pa_threaded_mainloop_wait (mainloop);
++	}
++
++	/* Only set the global stream now that it is actually ready */
++	stream = s;
++
++	pa_threaded_mainloop_unlock (mainloop);
++
++	return 1;
++
++fail:
++	pa_stream_unref (s);
++
++	pa_threaded_mainloop_unlock (mainloop);
++	return 0;
++}
++
++static void pulse_close (void)
++{
++	debug ("closing stream");
++
++	pa_threaded_mainloop_lock (mainloop);
++
++	pa_stream_disconnect (stream);
++	pa_stream_unref (stream);
++	stream = NULL;
++
++	pa_threaded_mainloop_unlock (mainloop);
++}
++
++static int pulse_play (const char *buff, const size_t size)
++{
++	size_t offset = 0;
++
++	debug ("Got %d bytes to play", (int)size);
++
++	pa_threaded_mainloop_lock (mainloop);
++
++	/* The buffer is usually writable when we get here, and there
++	 * are usually few (if any) writes after the first one. So
++	 * there is no point in doing further writes directly from the
++	 * callback: we can just do all writes from this thread.
++	 */
++
++	/* Break out of the loop if some other thread manages to close
++	 * our stream underneath us.
++	 */
++	while (stream) {
++		size_t towrite = MIN(pa_stream_writable_size (stream),
++				     size - offset);
++		debug ("writing %d bytes", (int)towrite);
++
++		/* We have no working way of dealing with errors
++		 * (see below). */
++		if (pa_stream_write(stream, buff + offset, towrite,
++				    NULL, 0, PA_SEEK_RELATIVE))
++			error ("pa_stream_write failed");
++
++		offset += towrite;
++
++		if (offset >= size)
++			break;
++
++		pa_threaded_mainloop_wait (mainloop);
++	}
++
++	pa_threaded_mainloop_unlock (mainloop);
++
++	debug ("Done playing!");
++
++	/* We should always return size, calling code does not deal
++	 * well with anything else. Only read the rest if you want to
++	 * know why.
++	 *
++	 * The output buffer reader thread (out_buf.c:read_thread)
++	 * repeatedly loads some 64k/0.1s of audio into a buffer on
++	 * the stack, then calls audio_send_pcm repeatedly until this
++	 * entire buffer has been processed (similar to the loop in
++	 * this function). audio_send_pcm applies the softmixer and
++	 * equalizer, then feeds the result to this function, passing
++	 * through our return value.
++	 *
++	 * So if we return less than size the equalizer/softmixer is
++	 * re-applied to the remaining data, which is silly. Also,
++	 * audio_send_pcm checks for our return value being zero and
++	 * calls fatal() if it is, so try to always process *some*
++	 * data. Also, out_buf.c uses the return value of this
++	 * function from the last run through its inner loop to update
++	 * its time attribute, which means it will be interestingly
++	 * off if that loop ran more than once.
++	 *
++	 * Oh, and alsa.c seems to think it can return -1 to indicate
++	 * failure, which will cause out_buf.c to rewind its buffer
++	 * (to before its start, usually).
++	 */
++	return size;
++}
++
++static void volume_cb (const pa_cvolume *v, void *userdata)
++{
++	int *result = userdata;
++
++	if (v)
++		*result = 100 * pa_cvolume_avg (v) / PA_VOLUME_NORM;
++
++	pa_threaded_mainloop_signal (mainloop, 0);
++}
++
++static void sink_volume_cb (pa_context *c ATTR_UNUSED,
++			    const pa_sink_info *i, int eol ATTR_UNUSED,
++			    void *userdata)
++{
++	volume_cb (i ? &i->volume : NULL, userdata);
++}
++
++static void sink_input_volume_cb (pa_context *c ATTR_UNUSED,
++				  const pa_sink_input_info *i,
++				  int eol ATTR_UNUSED,
++				  void *userdata ATTR_UNUSED)
++{
++	volume_cb (i ? &i->volume : NULL, userdata);
++}
++
++static int pulse_read_mixer (void)
++{
++	pa_operation *op;
++	int result = 0;
++
++	debug ("read mixer");
++
++	pa_threaded_mainloop_lock (mainloop);
++
++	if (stream) {
++		if (showing_sink_volume)
++			op = pa_context_get_sink_info_by_index (
++				context, pa_stream_get_device_index (stream),
++				sink_volume_cb, &result);
++		else
++			op = pa_context_get_sink_input_info (
++				context, pa_stream_get_index (stream),
++				sink_input_volume_cb, &result);
++
++		while (pa_operation_get_state (op) == PA_OPERATION_RUNNING)
++			pa_threaded_mainloop_wait (mainloop);
++
++		pa_operation_unref (op);
++	}
++
++	pa_threaded_mainloop_unlock (mainloop);
++
++	return result;
++}
++
++static void pulse_set_mixer (int vol)
++{
++	pa_cvolume v;
++	pa_operation *op;
++
++	/* Setting volume for one channel does the right thing. */
++	pa_cvolume_set(&v, 1, vol * PA_VOLUME_NORM / 100);
++
++	pa_threaded_mainloop_lock (mainloop);
++
++	if (stream) {
++		if (showing_sink_volume)
++			op = pa_context_set_sink_volume_by_index (
++				context, pa_stream_get_device_index (stream),
++				&v, NULL, NULL);
++		else
++			op = pa_context_set_sink_input_volume (
++				context, pa_stream_get_index (stream),
++				&v, NULL, NULL);
++
++		pa_operation_unref (op);
++	}
++
++	pa_threaded_mainloop_unlock (mainloop);
++}
++
++static int pulse_get_buff_fill (void)
++{
++	/* This function is problematic. MOC uses it to for the "time
++	 * remaining" in the UI, but calls it more than once per
++	 * second (after each chunk of audio played, not for each
++	 * playback time update). We have to be fairly accurate here
++	 * for that time remaining to not jump weirdly. But PulseAudio
++	 * cannot give us a 100% accurate value here, as it involves a
++	 * server roundtrip. And if we call this a lot it suggests
++	 * switching to a mode where the value is interpolated, making
++	 * it presumably more inaccurate (see the flags we pass to
++	 * pa_stream_connect_playback).
++	 *
++	 * MOC also contains what I believe to be a race: it calls
++	 * audio_get_buff_fill "soon" (after playing the first chunk)
++	 * after starting playback of the next song, at which point we
++	 * still have part of the previous song buffered. This means
++	 * our position into the new song is negative, which fails an
++	 * assert (in out_buf.c:out_buf_time_get). There is no sane
++	 * way for us to detect this condition. I believe no other
++	 * backend triggers this because the assert sits after an
++	 * implicit float -> int seconds conversion, which means we
++	 * have to be off by at least an entire second to get a
++	 * negative value, and none of the other backends have buffers
++	 * that large (alsa buffers are supposedly a few 100 ms).
++	 */
++	pa_usec_t buffered_usecs = 0;
++	int buffered_bytes = 0;
++
++	pa_threaded_mainloop_lock (mainloop);
++
++	/* Using pa_stream_get_timing_info and returning the distance
++	 * between write_index and read_index would be more obvious,
++	 * but because of how the result is actually used I believe
++	 * using the latency value is slightly more correct, and it
++	 * makes the following crash-avoidance hack more obvious.
++	 */
++
++	/* This function will frequently fail the first time we call
++	 * it (pulse does not have the requested data yet). We ignore
++	 * that and just return 0.
++	 *
++	 * Deal with stream being NULL too, just in case this is
++	 * called in a racy fashion similar to how reset() is.
++	 */
++	if (stream &&
++	    pa_stream_get_latency (stream, &buffered_usecs, NULL) >= 0) {
++		/* Crash-avoidance HACK: floor our latency to at most
++		 * 1 second. It is usually more, but reporting that at
++		 * the start of playback crashes MOC, and we cannot
++		 * sanely detect when reporting it is safe.
++		 */
++		if (buffered_usecs > 1000000)
++			buffered_usecs = 1000000;
++
++		buffered_bytes = pa_usec_to_bytes (
++			buffered_usecs,
++			pa_stream_get_sample_spec (stream));
++	}
++
++	pa_threaded_mainloop_unlock (mainloop);
++
++	debug ("buffer fill: %d usec / %d bytes",
++	       (int) buffered_usecs, (int) buffered_bytes);
++
++	return buffered_bytes;
++}
++
++static void flush_callback (pa_stream *s ATTR_UNUSED, int success,
++			    void *userdata)
++{
++	int *result = userdata;
++
++	*result = success;
++
++	pa_threaded_mainloop_signal (mainloop, 0);
++}
++
++static int pulse_reset (void)
++{
++	pa_operation *op;
++	int result = 0;
++
++	debug ("reset requested");
++
++	pa_threaded_mainloop_lock (mainloop);
++
++	/* We *should* have a stream here, but MOC is racy, so bulletproof */
++	if (stream) {
++		op = pa_stream_flush (stream, flush_callback, &result);
++
++		while (pa_operation_get_state (op) == PA_OPERATION_RUNNING)
++			pa_threaded_mainloop_wait (mainloop);
++
++		pa_operation_unref (op);
++	} else
++		logit ("pulse_reset() called without a stream");
++
++	pa_threaded_mainloop_unlock (mainloop);
++
++	return result;
++}
++
++static int pulse_get_rate (void)
++{
++	/* This is called once right after open. Do not bother making
++	 * this fast. */
++
++	int result;
++
++	pa_threaded_mainloop_lock (mainloop);
++
++	if (stream)
++		result = pa_stream_get_sample_spec (stream)->rate;
++	else {
++		error ("get_rate called without a stream");
++		result = 0;
++	}
++
++	pa_threaded_mainloop_unlock (mainloop);
++
++	return result;
++}
++
++static void pulse_toggle_mixer_channel (void)
++{
++	showing_sink_volume = !showing_sink_volume;
++}
++
++static void sink_name_cb (pa_context *c ATTR_UNUSED,
++			  const pa_sink_info *i, int eol ATTR_UNUSED,
++			  void *userdata)
++{
++	char **result = userdata;
++
++	if (i && !*result)
++		*result = xstrdup (i->name);
++
++	pa_threaded_mainloop_signal (mainloop, 0);
++}
++
++static void sink_input_name_cb (pa_context *c ATTR_UNUSED,
++				const pa_sink_input_info *i,
++				int eol ATTR_UNUSED,
++				void *userdata)
++{
++	char **result = userdata;
++
++	if (i && !*result)
++		*result = xstrdup (i->name);
++
++	pa_threaded_mainloop_signal (mainloop, 0);
++}
++
++static char *pulse_get_mixer_channel_name (void)
++{
++	char *result = NULL;
++	pa_operation *op;
++
++	pa_threaded_mainloop_lock (mainloop);
++
++	if (stream) {
++		if (showing_sink_volume)
++			op = pa_context_get_sink_info_by_index (
++				context, pa_stream_get_device_index (stream),
++				sink_name_cb, &result);
++		else
++			op = pa_context_get_sink_input_info (
++				context, pa_stream_get_index (stream),
++				sink_input_name_cb, &result);
++
++		while (pa_operation_get_state (op) == PA_OPERATION_RUNNING)
++			pa_threaded_mainloop_wait (mainloop);
++
++		pa_operation_unref (op);
++	}
++
++	pa_threaded_mainloop_unlock (mainloop);
++
++	if (!result)
++		result = xstrdup ("disconnected");
++
++	return result;
++}
++
++void pulse_funcs (struct hw_funcs *funcs)
++{
++	funcs->init = pulse_init;
++	funcs->shutdown = pulse_shutdown;
++	funcs->open = pulse_open;
++	funcs->close = pulse_close;
++	funcs->play = pulse_play;
++	funcs->read_mixer = pulse_read_mixer;
++	funcs->set_mixer = pulse_set_mixer;
++	funcs->get_buff_fill = pulse_get_buff_fill;
++	funcs->reset = pulse_reset;
++	funcs->get_rate = pulse_get_rate;
++	funcs->toggle_mixer_channel = pulse_toggle_mixer_channel;
++	funcs->get_mixer_channel_name = pulse_get_mixer_channel_name;
++}
+diff --git a/pulse.h b/pulse.h
+new file mode 100644
+--- /dev/null
++++ b/pulse.h
+@@ -0,0 +1,14 @@
++#ifndef PULSE_H
++#define PULSE_H
++
++#ifdef __cplusplus
++extern "C" {
++#endif
++
++void pulse_funcs (struct hw_funcs *funcs);
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
diff --git a/pkgs/applications/audio/mod-arpeggiator-lv2/default.nix b/pkgs/applications/audio/mod-arpeggiator-lv2/default.nix
new file mode 100644
index 00000000000..3896545dc41
--- /dev/null
+++ b/pkgs/applications/audio/mod-arpeggiator-lv2/default.nix
@@ -0,0 +1,26 @@
+{ lib, stdenv, fetchFromGitHub, lv2, pkg-config }:
+
+stdenv.mkDerivation rec {
+
+  pname = "mod-arpeggiator-lv2";
+  version = "unstable-2021-11-09";
+
+  src = fetchFromGitHub {
+    owner = "moddevices";
+    repo = pname;
+    rev = "82f3d9f159ce216454656a8782362c3d5ed48bed";
+    sha256 = "sha256-1KiWMTVTTf1/iR4AzJ1Oe0mOrWN5edsZN0tQMidgnRA=";
+  };
+
+  buildInputs = [ lv2 pkg-config ];
+
+  makeFlags = [ "PREFIX=$(out)" ];
+
+  meta = with lib; {
+    description = "a LV2 arpeggiator";
+    homepage = "https://github.com/moddevices/mod-arpeggiator-lv2";
+    license = licenses.gpl2Plus;
+    maintainers = [ maintainers.magnetophon ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/pkgs/applications/audio/mod-distortion/default.nix b/pkgs/applications/audio/mod-distortion/default.nix
new file mode 100644
index 00000000000..7e2b2bf6cfb
--- /dev/null
+++ b/pkgs/applications/audio/mod-distortion/default.nix
@@ -0,0 +1,25 @@
+{ lib, stdenv, fetchFromGitHub, lv2 }:
+
+stdenv.mkDerivation {
+  pname = "mod-distortion";
+  version = "unstable-2016-08-19";
+
+  src = fetchFromGitHub {
+    owner = "portalmod";
+    repo = "mod-distortion";
+    rev = "e672d5feb9d631798e3d56eb96e8958c3d2c6821";
+    sha256 = "005wdkbhn9dgjqv019cwnziqg86yryc5vh7j5qayrzh9v446dw34";
+  };
+
+  buildInputs = [ lv2 ];
+
+  installFlags = [ "INSTALL_PATH=$(out)/lib/lv2" ];
+
+  meta = with 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/pkgs/applications/audio/molot-lite/default.nix b/pkgs/applications/audio/molot-lite/default.nix
new file mode 100644
index 00000000000..da1e3702bac
--- /dev/null
+++ b/pkgs/applications/audio/molot-lite/default.nix
@@ -0,0 +1,34 @@
+{ lib, stdenv, fetchFromGitHub, lv2, cairo, pkg-config }:
+
+stdenv.mkDerivation rec {
+
+  pname = "molot-lite";
+  version = "1.1.0";
+
+  src = fetchFromGitHub {
+    owner = "magnetophon";
+    repo = pname;
+    rev = version;
+    sha256 = "sha256-0tmobsdCNon6udbkbQw7+EYQKBg2oaXlHIgNEf9U3XE=";
+  };
+
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = [ lv2 cairo ];
+
+  makeFlags = [ "INSTALL_DIR=$out/lib/lv2" ];
+
+  installPhase = ''
+    runHook preInstall
+    make install INSTALL_DIR=$out/lib/lv2 -C Molot_Mono_Lite
+    make install INSTALL_DIR=$out/lib/lv2 -C Molot_Stereo_Lite
+    runHook postInstall
+  '';
+
+  meta = with lib; {
+    description = "Stereo and mono audio signal dynamic range compressor in LV2 format";
+    homepage = "https://github.com/magnetophon/molot-lite";
+    license = licenses.gpl3Plus;
+    maintainers = [ maintainers.magnetophon ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/pkgs/applications/audio/monkeys-audio/buildfix.diff b/pkgs/applications/audio/monkeys-audio/buildfix.diff
new file mode 100644
index 00000000000..9684e5bf8e4
--- /dev/null
+++ b/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/pkgs/applications/audio/monkeys-audio/default.nix b/pkgs/applications/audio/monkeys-audio/default.nix
new file mode 100644
index 00000000000..62b63f7e1ca
--- /dev/null
+++ b/pkgs/applications/audio/monkeys-audio/default.nix
@@ -0,0 +1,20 @@
+{lib, stdenv, fetchurl}:
+
+stdenv.mkDerivation rec {
+  version = "3.99-u4-b5";
+  pname = "monkeys-audio";
+
+  patches = [ ./buildfix.diff ];
+
+  src = fetchurl {
+    url = "https://deb-multimedia.org/pool/main/m/${pname}/${pname}_${version}.orig.tar.gz";
+    sha256 = "0kjfwzfxfx7f958b2b1kf8yj655lp0ppmn0sh57gbkjvj8lml7nz";
+  };
+
+  meta = with lib; {
+    description = "Lossless audio codec";
+    platforms = platforms.linux;
+    license = licenses.lgpl2;
+    maintainers = [ ];
+  };
+}
diff --git a/pkgs/applications/audio/mooSpace/default.nix b/pkgs/applications/audio/mooSpace/default.nix
new file mode 100644
index 00000000000..b7d7502d25a
--- /dev/null
+++ b/pkgs/applications/audio/mooSpace/default.nix
@@ -0,0 +1,35 @@
+{ lib, stdenv, fetchFromGitHub, faust2jaqt, faust2lv2 }:
+stdenv.mkDerivation rec {
+  pname = "mooSpace";
+  version = "unstable-2020-06-10";
+
+  src = fetchFromGitHub {
+    owner = "modularev";
+    repo = pname;
+    rev = "e5440407ea6ef9f7fcca838383b2b9a388c22874";
+    sha256 = "10vsbddf6d7i06040850v8xkmqh3bqawczs29kfgakair809wqxl";
+  };
+
+  buildInputs = [ faust2jaqt faust2lv2 ];
+
+  patchPhase = "mv ${pname}_faust.dsp ${pname}.dsp";
+
+  buildPhase = ''
+    faust2jaqt -time -vec -t 0 ${pname}.dsp
+    faust2lv2  -time -vec -t 0 -gui ${pname}.dsp
+  '';
+
+  installPhase = ''
+    mkdir -p $out/bin
+    cp ${pname} $out/bin/
+      mkdir -p $out/lib/lv2
+      cp -r ${pname}.lv2 $out/lib/lv2
+  '';
+
+  meta = {
+    description = "Variable reverb audio effect, jack and lv2";
+    homepage = "https://github.com/modularev/mooSpace";
+    license = lib.licenses.gpl3;
+    maintainers = [ lib.maintainers.magnetophon ];
+  };
+}
diff --git a/pkgs/applications/audio/mopidy/default.nix b/pkgs/applications/audio/mopidy/default.nix
new file mode 100644
index 00000000000..8bf50e72092
--- /dev/null
+++ b/pkgs/applications/audio/mopidy/default.nix
@@ -0,0 +1,47 @@
+{ lib, newScope, python }:
+
+# Create a custom scope so we are consistent in which python version is used
+lib.makeScope newScope (self: with self; {
+  inherit python;
+  pythonPackages = python.pkgs;
+
+  mopidy = callPackage ./mopidy.nix { };
+
+  mopidy-iris = callPackage ./iris.nix { };
+
+  mopidy-jellyfin = callPackage ./jellyfin.nix { };
+
+  mopidy-local = callPackage ./local.nix { };
+
+  mopidy-moped = callPackage ./moped.nix { };
+
+  mopidy-mopify = callPackage ./mopify.nix { };
+
+  mopidy-mpd = callPackage ./mpd.nix { };
+
+  mopidy-mpris = callPackage ./mpris.nix { };
+
+  mopidy-muse = callPackage ./muse.nix { };
+
+  mopidy-musicbox-webclient = callPackage ./musicbox-webclient.nix { };
+
+  mopidy-podcast = callPackage ./podcast.nix { };
+
+  mopidy-scrobbler = callPackage ./scrobbler.nix { };
+
+  mopidy-somafm = callPackage ./somafm.nix { };
+
+  mopidy-soundcloud = callPackage ./soundcloud.nix { };
+
+  mopidy-spotify = callPackage ./spotify.nix { };
+
+  mopidy-spotify-tunigo = callPackage ./spotify-tunigo.nix { };
+
+  mopidy-tunein = callPackage ./tunein.nix { };
+
+  mopidy-youtube = callPackage ./youtube.nix { };
+
+  mopidy-ytmusic = callPackage ./ytmusic.nix { };
+
+  mopidy-subidy = callPackage ./subidy.nix { };
+})
diff --git a/pkgs/applications/audio/mopidy/iris.nix b/pkgs/applications/audio/mopidy/iris.nix
new file mode 100644
index 00000000000..5b2cbe031c6
--- /dev/null
+++ b/pkgs/applications/audio/mopidy/iris.nix
@@ -0,0 +1,29 @@
+{ lib, python3Packages, mopidy }:
+
+python3Packages.buildPythonApplication rec {
+  pname = "Mopidy-Iris";
+  version = "3.60.0";
+
+  src = python3Packages.fetchPypi {
+    inherit pname version;
+    sha256 = "18w6qqmxzn8psiacybryxailm826f3j1wgiv0c03fbdsy6kr5f7l";
+  };
+
+  propagatedBuildInputs = [
+    mopidy
+  ] ++ (with python3Packages; [
+    configobj
+    requests
+    tornado
+  ]);
+
+  # no tests implemented
+  doCheck = false;
+
+  meta = with 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/pkgs/applications/audio/mopidy/jellyfin.nix b/pkgs/applications/audio/mopidy/jellyfin.nix
new file mode 100644
index 00000000000..7790380f9b7
--- /dev/null
+++ b/pkgs/applications/audio/mopidy/jellyfin.nix
@@ -0,0 +1,25 @@
+{ lib, python3Packages, mopidy }:
+
+python3Packages.buildPythonApplication rec {
+  pname = "mopidy-jellyfin";
+  version = "1.0.2";
+
+  src = python3Packages.fetchPypi {
+    inherit version;
+    pname = "Mopidy-Jellyfin";
+    sha256 = "0j7v5xx3c401r5dw1sqm1n2263chjga1d3ml85rg79hjhhhacy75";
+  };
+
+  propagatedBuildInputs = [ mopidy python3Packages.unidecode python3Packages.websocket-client ];
+
+  # no tests implemented
+  doCheck = false;
+  pythonImportsCheck = [ "mopidy_jellyfin" ];
+
+  meta = with lib; {
+    homepage = "https://github.com/jellyfin/mopidy-jellyfin";
+    description = "Mopidy extension for playing audio files from Jellyfin";
+    license = licenses.asl20;
+    maintainers = [ maintainers.pstn ];
+  };
+}
diff --git a/pkgs/applications/audio/mopidy/local.nix b/pkgs/applications/audio/mopidy/local.nix
new file mode 100644
index 00000000000..ebe9885e495
--- /dev/null
+++ b/pkgs/applications/audio/mopidy/local.nix
@@ -0,0 +1,30 @@
+{ lib
+, mopidy
+, python3Packages
+}:
+
+python3Packages.buildPythonApplication rec {
+  pname = "Mopidy-Local";
+  version = "3.2.1";
+
+  src = python3Packages.fetchPypi {
+    inherit pname version;
+    sha256 = "18w39mxpv8p17whd6zfw5653d21q138f8xd6ili6ks2g2dbm25i9";
+  };
+
+  propagatedBuildInputs = [
+    mopidy
+    python3Packages.uritools
+  ];
+
+  checkInputs = [
+    python3Packages.pytestCheckHook
+  ];
+
+  meta = with lib; {
+    homepage = "https://github.com/mopidy/mopidy-local";
+    description = "Mopidy extension for playing music from your local music archive";
+    license = licenses.asl20;
+    maintainers = with maintainers; [ ruuda ];
+  };
+}
diff --git a/pkgs/applications/audio/mopidy/moped.nix b/pkgs/applications/audio/mopidy/moped.nix
new file mode 100644
index 00000000000..c191eba4c4d
--- /dev/null
+++ b/pkgs/applications/audio/mopidy/moped.nix
@@ -0,0 +1,26 @@
+{ lib, 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 lib; {
+    homepage = "https://github.com/martijnboland/moped";
+    description = "A web client for Mopidy";
+    license = licenses.mit;
+    maintainers = [];
+    hydraPlatforms = [];
+  };
+}
diff --git a/pkgs/applications/audio/mopidy/mopidy.nix b/pkgs/applications/audio/mopidy/mopidy.nix
new file mode 100644
index 00000000000..5dc6af60c23
--- /dev/null
+++ b/pkgs/applications/audio/mopidy/mopidy.nix
@@ -0,0 +1,51 @@
+{ lib, stdenv, fetchFromGitHub, pythonPackages, wrapGAppsHook
+, gst_all_1, glib-networking, gobject-introspection
+}:
+
+pythonPackages.buildPythonApplication rec {
+  pname = "mopidy";
+  version = "3.2.0";
+
+  src = fetchFromGitHub {
+    owner = "mopidy";
+    repo = "mopidy";
+    rev = "v${version}";
+    sha256 = "1l1rya48ykiq156spm8pfsm6li8apz66ppz7gs4s91fv7g7l5x2f";
+  };
+
+  nativeBuildInputs = [ wrapGAppsHook ];
+
+  buildInputs = with gst_all_1; [
+    glib-networking
+    gst-plugins-bad
+    gst-plugins-base
+    gst-plugins-good
+    gst-plugins-ugly
+  ];
+
+  propagatedBuildInputs = [
+    gobject-introspection
+  ] ++ (with pythonPackages; [
+      gst-python
+      pygobject3
+      pykka
+      requests
+      setuptools
+      tornado
+    ] ++ lib.optional (!stdenv.isDarwin) dbus-python
+  );
+
+  # There are no tests
+  doCheck = false;
+
+  meta = with lib; {
+    homepage = "https://www.mopidy.com/";
+    description = ''
+      An extensible music server that plays music from local disk, Spotify,
+      SoundCloud, and more
+    '';
+    license = licenses.asl20;
+    maintainers = [ maintainers.fpletz ];
+    hydraPlatforms = [];
+  };
+}
diff --git a/pkgs/applications/audio/mopidy/mopify.nix b/pkgs/applications/audio/mopidy/mopify.nix
new file mode 100644
index 00000000000..670b1a9c509
--- /dev/null
+++ b/pkgs/applications/audio/mopidy/mopify.nix
@@ -0,0 +1,23 @@
+{ lib, 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 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/pkgs/applications/audio/mopidy/mpd.nix b/pkgs/applications/audio/mopidy/mpd.nix
new file mode 100644
index 00000000000..ab7e33ea3e3
--- /dev/null
+++ b/pkgs/applications/audio/mopidy/mpd.nix
@@ -0,0 +1,24 @@
+{ lib, python3Packages, mopidy }:
+
+python3Packages.buildPythonApplication rec {
+  pname = "Mopidy-MPD";
+  version = "3.2.0";
+
+  src = python3Packages.fetchPypi {
+    inherit pname version;
+    sha256 = "sha256-oZvKr61lyu7CmXP2A/xtYng1FIUPyveVJMqUuv6UnaM=";
+  };
+
+  propagatedBuildInputs = [mopidy];
+
+  # no tests implemented
+  doCheck = false;
+  pythonImportsCheck = [ "mopidy_mpd" ];
+
+  meta = with lib; {
+    homepage = "https://github.com/mopidy/mopidy-mpd";
+    description = "Mopidy extension for controlling playback from MPD clients";
+    license = licenses.asl20;
+    maintainers = [ maintainers.tomahna ];
+  };
+}
diff --git a/pkgs/applications/audio/mopidy/mpris.nix b/pkgs/applications/audio/mopidy/mpris.nix
new file mode 100644
index 00000000000..6bacfee627c
--- /dev/null
+++ b/pkgs/applications/audio/mopidy/mpris.nix
@@ -0,0 +1,27 @@
+{ lib, python3Packages, mopidy }:
+
+python3Packages.buildPythonApplication rec {
+  pname = "mopidy-mpris";
+  version = "3.0.3";
+
+  src = python3Packages.fetchPypi {
+    inherit version;
+    pname = "Mopidy-MPRIS";
+    sha256 = "sha256-rHQgNIyludTEL7RDC8dIpyGTMOt1Tazn6i/orKlSP4U=";
+  };
+
+  propagatedBuildInputs = [
+    mopidy
+    python3Packages.pydbus
+  ];
+
+  doCheck = false;
+
+  meta = with lib; {
+    homepage = "https://www.mopidy.com/";
+    description = "Mopidy extension for controlling Mopidy through D-Bus using the MPRIS specification";
+    license = licenses.asl20;
+    maintainers = [ maintainers.nickhu ];
+  };
+}
+
diff --git a/pkgs/applications/audio/mopidy/muse.nix b/pkgs/applications/audio/mopidy/muse.nix
new file mode 100644
index 00000000000..22a6fcd6842
--- /dev/null
+++ b/pkgs/applications/audio/mopidy/muse.nix
@@ -0,0 +1,29 @@
+{ lib, pythonPackages, mopidy }:
+
+pythonPackages.buildPythonApplication rec {
+  pname = "mopidy-muse";
+  version = "0.0.27";
+
+  src = pythonPackages.fetchPypi {
+    inherit version;
+    pname = "Mopidy-Muse";
+    sha256 = "0jx9dkgxr07avzz9zskzhqy98zsxkdrf7iid2ax5vygwf8qsx8ks";
+  };
+
+  propagatedBuildInputs = [
+    mopidy
+    pythonPackages.pykka
+  ];
+
+  pythonImportsCheck = [ "mopidy_muse" ];
+
+  # has no tests
+  doCheck = false;
+
+  meta = with lib; {
+    description = "Mopidy web client with Snapcast support";
+    homepage = "https://github.com/cristianpb/muse";
+    license = licenses.asl20;
+    maintainers = with maintainers; [ hexa ];
+  };
+}
diff --git a/pkgs/applications/audio/mopidy/musicbox-webclient.nix b/pkgs/applications/audio/mopidy/musicbox-webclient.nix
new file mode 100644
index 00000000000..1e2cb8d0609
--- /dev/null
+++ b/pkgs/applications/audio/mopidy/musicbox-webclient.nix
@@ -0,0 +1,24 @@
+{ lib, stdenv, fetchFromGitHub, pythonPackages, mopidy }:
+
+pythonPackages.buildPythonApplication rec {
+  pname = "mopidy-musicbox-webclient";
+  version = "3.1.0";
+
+  src = fetchFromGitHub {
+    owner = "pimusicbox";
+    repo = "mopidy-musicbox-webclient";
+    rev = "v${version}";
+    sha256 = "1lzarazq67gciyn6r8cdms0f7j0ayyfwhpf28z93ydb280mfrrb9";
+  };
+
+  propagatedBuildInputs = [ mopidy ];
+
+  doCheck = false;
+
+  meta = with lib; {
+    description = "Mopidy extension for playing music from SoundCloud";
+    license = licenses.mit;
+    broken = stdenv.isDarwin;
+    maintainers = [ maintainers.spwhitt ];
+  };
+}
diff --git a/pkgs/applications/audio/mopidy/podcast.nix b/pkgs/applications/audio/mopidy/podcast.nix
new file mode 100644
index 00000000000..8a5c4ec2b3d
--- /dev/null
+++ b/pkgs/applications/audio/mopidy/podcast.nix
@@ -0,0 +1,31 @@
+{ lib, python3Packages, mopidy }:
+
+python3Packages.buildPythonApplication rec {
+  pname = "mopidy-podcast";
+  version = "3.0.0";
+
+  src = python3Packages.fetchPypi {
+    inherit version;
+    pname = "Mopidy-Podcast";
+    sha256 = "1z2b523yvdpcf8p7m7kczrvaw045lmxzhq4qj00dflxa2yw61qxr";
+  };
+
+  propagatedBuildInputs = [
+    mopidy
+    python3Packages.cachetools
+    python3Packages.uritools
+  ];
+
+  checkInputs = with python3Packages; [
+    pytestCheckHook
+  ];
+
+  meta = with lib; {
+    homepage = "https://github.com/tkem/mopidy-podcast";
+    description = "Mopidy extension for browsing and playing podcasts";
+    license = licenses.asl20;
+    maintainers = [
+      maintainers.daneads
+    ];
+  };
+}
diff --git a/pkgs/applications/audio/mopidy/scrobbler.nix b/pkgs/applications/audio/mopidy/scrobbler.nix
new file mode 100644
index 00000000000..621ced53646
--- /dev/null
+++ b/pkgs/applications/audio/mopidy/scrobbler.nix
@@ -0,0 +1,24 @@
+{ lib, python3Packages, mopidy }:
+
+python3Packages.buildPythonApplication rec {
+  pname = "Mopidy-Scrobbler";
+  version = "2.0.1";
+
+  src = python3Packages.fetchPypi {
+    inherit pname version;
+    sha256 = "11vxgax4xgkggnq4fr1rh2rcvzspkkimck5p3h4phdj3qpnj0680";
+  };
+
+  propagatedBuildInputs = with python3Packages; [ mopidy pylast ];
+
+  # no tests implemented
+  doCheck = false;
+  pythonImportsCheck = [ "mopidy_scrobbler" ];
+
+  meta = with lib; {
+    homepage = "https://github.com/mopidy/mopidy-scrobbler";
+    description = "Mopidy extension for scrobbling played tracks to Last.fm.";
+    license = licenses.asl20;
+    maintainers = with maintainers; [ jakeisnt ];
+  };
+}
diff --git a/pkgs/applications/audio/mopidy/somafm.nix b/pkgs/applications/audio/mopidy/somafm.nix
new file mode 100644
index 00000000000..81c689a343d
--- /dev/null
+++ b/pkgs/applications/audio/mopidy/somafm.nix
@@ -0,0 +1,26 @@
+{ lib, python3Packages, mopidy }:
+
+python3Packages.buildPythonApplication rec {
+  pname = "mopidy-somafm";
+  version = "2.0.0";
+
+  src = python3Packages.fetchPypi {
+    inherit version;
+    pname = "Mopidy-SomaFM";
+    sha256 = "1j88rrliys8hqvnb35k1xqw88bvrllcb4rb53lgh82byhscsxlf3";
+  };
+
+  propagatedBuildInputs = [
+    mopidy
+  ];
+
+  doCheck = false;
+
+  meta = with lib; {
+    homepage = "https://www.mopidy.com/";
+    description = "Mopidy extension for playing music from SomaFM";
+    license = licenses.mit;
+    maintainers = [ maintainers.nickhu ];
+  };
+}
+
diff --git a/pkgs/applications/audio/mopidy/soundcloud.nix b/pkgs/applications/audio/mopidy/soundcloud.nix
new file mode 100644
index 00000000000..d8a244b5146
--- /dev/null
+++ b/pkgs/applications/audio/mopidy/soundcloud.nix
@@ -0,0 +1,23 @@
+{ lib, fetchFromGitHub, pythonPackages, mopidy }:
+
+pythonPackages.buildPythonApplication rec {
+  pname = "mopidy-soundcloud";
+  version = "3.0.1";
+
+  src = fetchFromGitHub {
+    owner = "mopidy";
+    repo = "mopidy-soundcloud";
+    rev = "v${version}";
+    sha256 = "18wiiv4rca9vibvnc27f3q4apf8n61kbp7mdbm2pmz86qwmd47pa";
+  };
+
+  propagatedBuildInputs = [ mopidy ];
+
+  doCheck = false;
+
+  meta = with lib; {
+    description = "Mopidy extension for playing music from SoundCloud";
+    license = licenses.mit;
+    maintainers = [ maintainers.spwhitt ];
+  };
+}
diff --git a/pkgs/applications/audio/mopidy/spotify-tunigo.nix b/pkgs/applications/audio/mopidy/spotify-tunigo.nix
new file mode 100644
index 00000000000..70d076190cd
--- /dev/null
+++ b/pkgs/applications/audio/mopidy/spotify-tunigo.nix
@@ -0,0 +1,23 @@
+{ lib, 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 lib; {
+    description = "Mopidy extension for providing the browse feature of Spotify";
+    license = licenses.asl20;
+    maintainers = [ maintainers.spwhitt ];
+  };
+}
diff --git a/pkgs/applications/audio/mopidy/spotify.nix b/pkgs/applications/audio/mopidy/spotify.nix
new file mode 100644
index 00000000000..ed68769f665
--- /dev/null
+++ b/pkgs/applications/audio/mopidy/spotify.nix
@@ -0,0 +1,25 @@
+{ lib, fetchFromGitHub, pythonPackages, mopidy }:
+
+pythonPackages.buildPythonApplication rec {
+  pname = "mopidy-spotify";
+  version = "4.1.1";
+
+  src = fetchFromGitHub {
+    owner = "mopidy";
+    repo = "mopidy-spotify";
+    rev = "v${version}";
+    sha256 = "1qsac2yy26cdlsmxd523v8ayacs0s6jj9x79sngwap781i63zqrm";
+  };
+
+  propagatedBuildInputs = [ mopidy pythonPackages.pyspotify ];
+
+  doCheck = false;
+
+  meta = with lib; {
+    homepage = "https://www.mopidy.com/";
+    description = "Mopidy extension for playing music from Spotify";
+    license = licenses.asl20;
+    maintainers = with maintainers; [ rski ];
+    hydraPlatforms = [ ];
+  };
+}
diff --git a/pkgs/applications/audio/mopidy/subidy.nix b/pkgs/applications/audio/mopidy/subidy.nix
new file mode 100644
index 00000000000..98d69816b73
--- /dev/null
+++ b/pkgs/applications/audio/mopidy/subidy.nix
@@ -0,0 +1,24 @@
+{ lib, fetchFromGitHub, pythonPackages, mopidy }:
+
+pythonPackages.buildPythonApplication rec {
+  pname = "mopidy-subidy";
+  version = "1.0.0";
+
+  src = fetchFromGitHub {
+    owner = "Prior99";
+    repo = pname;
+    rev = version;
+    sha256 = "0c5ghhhrj5v3yp4zmll9ari6r5c6ha8c1izwqshvadn40b02q7xz";
+  };
+
+  propagatedBuildInputs = [ mopidy pythonPackages.py-sonic ];
+
+  checkInputs = with pythonPackages; [ pytestCheckHook ];
+
+  meta = with lib; {
+    homepage = "https://www.mopidy.com/";
+    description = "Mopidy extension for playing music from a Subsonic-compatible Music Server";
+    license = licenses.bsd3;
+    maintainers = with maintainers; [ wenngle ];
+  };
+}
diff --git a/pkgs/applications/audio/mopidy/tunein.nix b/pkgs/applications/audio/mopidy/tunein.nix
new file mode 100644
index 00000000000..4a3edd2a434
--- /dev/null
+++ b/pkgs/applications/audio/mopidy/tunein.nix
@@ -0,0 +1,25 @@
+{ lib, python3Packages, mopidy }:
+
+python3Packages.buildPythonApplication rec {
+  pname = "mopidy-tunein";
+  version = "1.1.0";
+
+  src = python3Packages.fetchPypi {
+    inherit version;
+    pname = "Mopidy-TuneIn";
+    sha256 = "01y1asylscr73yqx071imhrzfzlg07wmqqzkdvpgm6r35marc2li";
+  };
+
+  propagatedBuildInputs = [
+    mopidy
+  ];
+
+  pythonImportsCheck = [ "mopidy_tunein.tunein" ];
+
+  meta = with lib; {
+    description = "Mopidy extension for playing music from tunein";
+    homepage = "https://github.com/kingosticks/mopidy-tunein";
+    license = licenses.asl20;
+    maintainers = with maintainers; [ hexa ];
+  };
+}
diff --git a/pkgs/applications/audio/mopidy/youtube.nix b/pkgs/applications/audio/mopidy/youtube.nix
new file mode 100644
index 00000000000..ecb8128032e
--- /dev/null
+++ b/pkgs/applications/audio/mopidy/youtube.nix
@@ -0,0 +1,56 @@
+{ lib
+, fetchFromGitHub
+, python3
+, mopidy
+}:
+
+python3.pkgs.buildPythonApplication rec {
+  pname = "mopidy-youtube";
+  version = "3.4";
+
+  disabled = python3.pythonOlder "3.7";
+
+  src = fetchFromGitHub {
+    owner = "natumbri";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "0lm6nn926qkrwzvj64yracdixfrnv5zk243msjskrnlzkhgk01rk";
+  };
+
+  propagatedBuildInputs = with python3.pkgs; [
+    beautifulsoup4
+    cachetools
+    pykka
+    requests
+    youtube-dl
+    ytmusicapi
+  ] ++ [
+    mopidy
+  ];
+
+  checkInputs = with python3.pkgs; [
+    vcrpy
+    pytestCheckHook
+  ];
+
+  disabledTests = [
+    # Test requires a YouTube API key
+    "test_get_default_config"
+  ];
+
+  disabledTestPaths = [
+    # Fails with an import error
+    "tests/test_backend.py"
+  ];
+
+  pythonImportsCheck = [
+    "mopidy_youtube"
+  ];
+
+  meta = with lib; {
+    description = "Mopidy extension for playing music from YouTube";
+    homepage = "https://github.com/natumbri/mopidy-youtube";
+    license = licenses.asl20;
+    maintainers = with maintainers; [ spwhitt ];
+  };
+}
diff --git a/pkgs/applications/audio/mopidy/ytmusic.nix b/pkgs/applications/audio/mopidy/ytmusic.nix
new file mode 100644
index 00000000000..9f393a0e752
--- /dev/null
+++ b/pkgs/applications/audio/mopidy/ytmusic.nix
@@ -0,0 +1,35 @@
+{ lib, python3Packages, mopidy }:
+
+python3Packages.buildPythonApplication rec {
+  pname = "mopidy-ytmusic";
+  version = "0.3.5";
+
+  src = python3Packages.fetchPypi {
+    inherit version;
+    pname = "Mopidy-YTMusic";
+    sha256 = "0pncyxfqxvznb9y4ksndbny1yf5mxh4089ak0yz86dp2qi5j99iv";
+  };
+
+  postPatch = ''
+    substituteInPlace setup.py \
+      --replace 'ytmusicapi>=0.20.0,<0.21.0' 'ytmusicapi>=0.20.0'
+  '';
+
+  propagatedBuildInputs = [
+    mopidy
+    python3Packages.ytmusicapi
+    python3Packages.pytube
+  ];
+
+  pythonImportsCheck = [ "mopidy_ytmusic" ];
+
+  # has no tests
+  doCheck = false;
+
+  meta = with lib; {
+    description = "Mopidy extension for playing music from YouTube Music";
+    homepage = "https://github.com/OzymandiasTheGreat/mopidy-ytmusic";
+    license = licenses.asl20;
+    maintainers = [ maintainers.nickhu ];
+  };
+}
diff --git a/pkgs/applications/audio/mousai/default.nix b/pkgs/applications/audio/mousai/default.nix
new file mode 100644
index 00000000000..f61b7c5b7b9
--- /dev/null
+++ b/pkgs/applications/audio/mousai/default.nix
@@ -0,0 +1,79 @@
+{ lib
+, python3
+, fetchFromGitHub
+, substituteAll
+, appstream-glib
+, desktop-file-utils
+, gettext
+, glib
+, gobject-introspection
+, gst_all_1
+, gtk4
+, libadwaita
+, librsvg
+, meson
+, ninja
+, pkg-config
+, pulseaudio
+, wrapGAppsHook
+}:
+
+python3.pkgs.buildPythonApplication rec {
+  pname = "mousai";
+  version = "0.6.6";
+
+  format = "other";
+
+  src = fetchFromGitHub {
+    owner = "SeaDve";
+    repo = "Mousai";
+    rev = "v${version}";
+    sha256 = "sha256-nCbFVFg+nVF8BOBfdzQVgdTRXR5UF18PJFC266yTFwg=";
+  };
+
+  patches = [
+    (substituteAll {
+      src = ./paths.patch;
+      pactl = "${lib.getBin pulseaudio}/bin/pactl";
+    })
+  ];
+
+  postPatch = ''
+    patchShebangs build-aux/meson
+  '';
+
+  nativeBuildInputs = [
+    appstream-glib
+    desktop-file-utils
+    gettext
+    glib
+    gtk4
+    meson
+    ninja
+    pkg-config
+    wrapGAppsHook
+  ];
+
+  buildInputs = [
+    gobject-introspection
+    gst_all_1.gstreamer
+    gst_all_1.gst-plugins-base
+    gst_all_1.gst-plugins-good
+    gtk4
+    libadwaita
+    librsvg
+    pulseaudio
+  ];
+
+  propagatedBuildInputs = with python3.pkgs; [
+    pygobject3
+    requests
+  ];
+
+  meta = with lib; {
+    description = "Identify any songs in seconds";
+    homepage = "https://github.com/SeaDve/Mousai";
+    license = licenses.gpl3Plus;
+    maintainers = with maintainers; [ dotlambda ];
+  };
+}
diff --git a/pkgs/applications/audio/mousai/paths.patch b/pkgs/applications/audio/mousai/paths.patch
new file mode 100644
index 00000000000..35b328ad0ea
--- /dev/null
+++ b/pkgs/applications/audio/mousai/paths.patch
@@ -0,0 +1,13 @@
+diff --git a/src/backend/utils.py b/src/backend/utils.py
+index cebc009..0087c09 100644
+--- a/src/backend/utils.py
++++ b/src/backend/utils.py
+@@ -79,7 +79,7 @@ class Utils:
+     @staticmethod
+     def get_default_audio_sources():
+         pactl_output = subprocess.run(
+-            ['/usr/bin/pactl', 'info'],
++            ['@pactl@', 'info'],
+             stdout=subprocess.PIPE,
+             text=True
+         ).stdout.splitlines()
diff --git a/pkgs/applications/audio/mp3blaster/default.nix b/pkgs/applications/audio/mp3blaster/default.nix
new file mode 100644
index 00000000000..0d65fe813ec
--- /dev/null
+++ b/pkgs/applications/audio/mp3blaster/default.nix
@@ -0,0 +1,42 @@
+{ lib, stdenv, fetchFromGitHub, fetchpatch, ncurses, libvorbis, SDL }:
+
+stdenv.mkDerivation rec {
+  pname = "mp3blaster";
+  version = "3.2.6";
+
+  src = fetchFromGitHub {
+    owner = "stragulus";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "0pzwml3yhysn8vyffw9q9p9rs8gixqkmg4n715vm23ib6wxbliqs";
+  };
+
+  patches = [
+    # Fix pending upstream inclusion for ncurses-6.3 support:
+    #  https://github.com/stragulus/mp3blaster/pull/8
+    (fetchpatch {
+      name = "ncurses-6.3.patch";
+      url = "https://github.com/stragulus/mp3blaster/commit/62168cba5eaba6ffe56943552837cf033cfa96ed.patch";
+      sha256 = "088l27kl1l58lwxfnw5x2n64sdjy925ycphni3icwag7zvpj0xz1";
+    })
+  ];
+
+  buildInputs = [
+    ncurses
+    libvorbis
+  ] ++ lib.optional stdenv.isDarwin SDL;
+
+  NIX_CFLAGS_COMPILE = toString ([
+    "-Wno-narrowing"
+  ] ++ lib.optionals stdenv.cc.isClang [
+    "-Wno-reserved-user-defined-literal"
+  ]);
+
+  meta = with lib; {
+    description = "An audio player for the text console";
+    homepage = "http://www.mp3blaster.org/";
+    license = licenses.gpl2;
+    maintainers = with maintainers; [ earldouglas ];
+    platforms = with platforms; linux ++ darwin;
+  };
+}
diff --git a/pkgs/applications/audio/mp3gain/default.nix b/pkgs/applications/audio/mp3gain/default.nix
new file mode 100644
index 00000000000..ba2a757e090
--- /dev/null
+++ b/pkgs/applications/audio/mp3gain/default.nix
@@ -0,0 +1,37 @@
+{ lib, stdenv, fetchurl, fetchpatch, unzip, mpg123 }:
+
+stdenv.mkDerivation rec {
+  pname = "mp3gain";
+  version = "1.6.2";
+  src = fetchurl {
+    url = "mirror://sourceforge/${pname}/${pname}-${lib.replaceStrings ["."] ["_"] version}-src.zip";
+    sha256 = "0varr6y7k8zarr56b42r0ad9g3brhn5vv3xjg1c0v19jxwr4gh2w";
+  };
+
+  nativeBuildInputs = [ unzip ];
+  buildInputs = [ mpg123 ];
+
+  sourceRoot = ".";
+
+  patches = [
+    (fetchpatch {
+      name = "0001-fix-security-bugs.patch";
+      url = "https://gitweb.gentoo.org/repo/gentoo.git/plain/media-sound/mp3gain/files/mp3gain-1.6.2-CVE-2019-18359-plus.patch?id=36f8689f7903548f5d89827a6e7bdf70a9882cee";
+      sha256 = "10n53wm0xynlcxqlnaqfgamjzcpfz41q1jlg0bhw4kq1kzhs4yyw";
+    })
+  ];
+
+  buildFlags = [ "OSTYPE=linux" ];
+
+  installPhase = ''
+    install -vD mp3gain "$out/bin/mp3gain"
+  '';
+
+  meta = with lib; {
+    description = "Lossless mp3 normalizer with statistical analysis";
+    homepage = "http://mp3gain.sourceforge.net/";
+    license = licenses.lgpl21;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ devhell ];
+  };
+}
diff --git a/pkgs/applications/audio/mp3info/default.nix b/pkgs/applications/audio/mp3info/default.nix
new file mode 100644
index 00000000000..86c1f87f522
--- /dev/null
+++ b/pkgs/applications/audio/mp3info/default.nix
@@ -0,0 +1,46 @@
+{ fetchurl, lib, stdenv, ncurses, pkg-config, gtk2 }:
+
+stdenv.mkDerivation rec {
+  pname = "mp3info";
+  version = "0.8.5a";
+
+  src = fetchurl {
+    url = "ftp://ftp.ibiblio.org/pub/linux/apps/sound/mp3-utils/${pname}/${pname}-${version}.tgz";
+    sha256 = "042f1czcs9n2sbqvg4rsvfwlqib2gk976mfa2kxlfjghx5laqf04";
+  };
+
+  nativeBuildInputs = [ pkg-config ];
+  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 = lib.licenses.gpl2Plus;
+
+    maintainers = [ ];
+    platforms = lib.platforms.linux;
+  };
+}
diff --git a/pkgs/applications/audio/mp3splt/default.nix b/pkgs/applications/audio/mp3splt/default.nix
new file mode 100644
index 00000000000..1407c153aed
--- /dev/null
+++ b/pkgs/applications/audio/mp3splt/default.nix
@@ -0,0 +1,26 @@
+{ lib, stdenv, fetchurl, pkg-config, libmp3splt }:
+
+stdenv.mkDerivation rec {
+  pname = "mp3splt";
+  version = "2.6.2";
+
+
+  src = fetchurl {
+    url = "mirror://sourceforge/${pname}/${pname}-${version}.tar.gz";
+    sha256 = "1aiv20gypb6r84qabz8gblk8vi42cg3x333vk2pi3fyqvl82phry";
+  };
+
+  configureFlags = [ "--enable-oggsplt-symlink" "--enable-flacsplt-symlink" ];
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = [ libmp3splt ];
+
+  outputs = [ "out" "man" ];
+
+  meta = with 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/pkgs/applications/audio/mp3val/default.nix b/pkgs/applications/audio/mp3val/default.nix
new file mode 100644
index 00000000000..dc1a3085831
--- /dev/null
+++ b/pkgs/applications/audio/mp3val/default.nix
@@ -0,0 +1,37 @@
+{ lib, stdenv, fetchurl }:
+
+stdenv.mkDerivation rec {
+  pname = "mp3val";
+  version = "0.1.8";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/mp3val/${pname}-${version}-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 = lib.licenses.gpl2;
+    platforms = lib.platforms.unix;
+    maintainers = [ lib.maintainers.devhell ];
+  };
+}
diff --git a/pkgs/applications/audio/mpc/default.nix b/pkgs/applications/audio/mpc/default.nix
new file mode 100644
index 00000000000..cebf08f1908
--- /dev/null
+++ b/pkgs/applications/audio/mpc/default.nix
@@ -0,0 +1,62 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, fetchpatch
+, installShellFiles
+, libiconv
+, libmpdclient
+, meson
+, ninja
+, pkg-config
+, sphinx
+}:
+
+stdenv.mkDerivation rec {
+  pname = "mpc";
+  version = "0.34";
+
+  src = fetchFromGitHub {
+    owner = "MusicPlayerDaemon";
+    repo = pname;
+    rev = "v${version}";
+    hash = "sha256-2FjYBfak0IjibuU+CNQ0y9Ei8hTZhynS/BK2DNerhVw=";
+  };
+
+  patches = [
+    # fix the build with meson 0.60 (https://github.com/MusicPlayerDaemon/mpc/pull/76)
+    (fetchpatch {
+      url = "https://github.com/MusicPlayerDaemon/mpc/commit/b656ca4b6c2a0d5b6cebd7f7daa679352f664e0e.patch";
+      sha256 = "sha256-fjjSlCKxgkz7Em08CaK7+JAzl8YTzLcpGGMz2HJlsVw=";
+    })
+  ];
+
+  buildInputs = [
+    libmpdclient
+  ]
+  ++ lib.optionals stdenv.isDarwin [ libiconv ];
+
+  nativeBuildInputs = [
+    installShellFiles
+    meson
+    ninja
+    pkg-config
+    sphinx
+  ];
+
+  postInstall = ''
+    installShellCompletion --cmd mpc --bash $out/share/doc/mpc/contrib/mpc-completion.bash
+  '';
+
+  postFixup = ''
+    rm $out/share/doc/mpc/contrib/mpc-completion.bash
+  '';
+
+  meta = with lib; {
+    homepage = "https://www.musicpd.org/clients/mpc/";
+    description = "A minimalist command line interface to MPD";
+    changelog = "https://raw.githubusercontent.com/MusicPlayerDaemon/mpc/v${version}/NEWS";
+    license = licenses.gpl2Plus;
+    maintainers = with maintainers; [ AndersonTorres ];
+    platforms = with platforms; unix;
+  };
+}
diff --git a/pkgs/applications/audio/mpc123/default.nix b/pkgs/applications/audio/mpc123/default.nix
new file mode 100644
index 00000000000..7ce8af1de23
--- /dev/null
+++ b/pkgs/applications/audio/mpc123/default.nix
@@ -0,0 +1,33 @@
+{ fetchurl, lib, stdenv, gettext, libmpcdec, libao }:
+
+let version = "0.2.4"; in
+stdenv.mkDerivation rec {
+  pname = "mpc123";
+  inherit version;
+
+  src = fetchurl {
+    url = "mirror://sourceforge/mpc123/version%20${version}/${pname}-${version}.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 = lib.licenses.gpl2Plus;
+
+    maintainers = [ ];
+    platforms = lib.platforms.gnu ++ lib.platforms.linux; # arbitrary choice
+  };
+}
diff --git a/pkgs/applications/audio/mpc123/use-gcc.patch b/pkgs/applications/audio/mpc123/use-gcc.patch
new file mode 100644
index 00000000000..ca4cf84591c
--- /dev/null
+++ b/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/pkgs/applications/audio/mpdevil/default.nix b/pkgs/applications/audio/mpdevil/default.nix
new file mode 100644
index 00000000000..3676697f16e
--- /dev/null
+++ b/pkgs/applications/audio/mpdevil/default.nix
@@ -0,0 +1,53 @@
+{ lib, fetchFromGitHub
+, python3Packages
+, gdk-pixbuf, glib, gobject-introspection, gtk3
+, libnotify
+, intltool
+, wrapGAppsHook }:
+
+python3Packages.buildPythonApplication rec {
+  pname = "mpdevil";
+  version = "1.4.1";
+
+  src = fetchFromGitHub {
+    owner = "SoongNoonien";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "1a5nhlbgi3ahnkcq16c2vgiaghgswy5lxg64pcrlbqssg1pj5gma";
+  };
+
+  nativeBuildInputs = [
+    glib.dev gobject-introspection gtk3 intltool wrapGAppsHook
+  ];
+
+  buildInputs = [
+    gdk-pixbuf glib libnotify
+  ];
+
+  propagatedBuildInputs = with python3Packages; [
+    beautifulsoup4 distutils_extra mpd2 notify-py pygobject3 requests
+  ];
+
+  postInstall = ''
+    glib-compile-schemas $out/share/glib-2.0/schemas
+  '';
+
+  preFixup = ''
+    makeWrapperArgs+=("''${gappsWrapperArgs[@]}")
+  '';
+
+  # Prevent double wrapping.
+  dontWrapGApps = true;
+  # Otherwise wrapGAppsHook do not pick up the dependencies correctly.
+  strictDeps = false;
+  # There aren't any checks.
+  doCheck = false;
+
+  meta = with lib; {
+    description = "A simple music browser for MPD";
+    homepage = "https://github.com/SoongNoonien/mpdevil";
+    license = licenses.gpl3Plus;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ bloomvdomino ];
+  };
+}
diff --git a/pkgs/applications/audio/mpg123/default.nix b/pkgs/applications/audio/mpg123/default.nix
new file mode 100644
index 00000000000..29f28203e13
--- /dev/null
+++ b/pkgs/applications/audio/mpg123/default.nix
@@ -0,0 +1,72 @@
+{ lib
+, stdenv
+, fetchurl
+, makeWrapper
+, pkg-config
+, perl
+, withAlsa ? stdenv.hostPlatform.isLinux
+, alsa-lib
+, withPulse ? stdenv.hostPlatform.isLinux
+, libpulseaudio
+, withCoreAudio ? stdenv.hostPlatform.isDarwin
+, AudioUnit
+, AudioToolbox
+, withJack ? stdenv.hostPlatform.isUnix
+, jack
+, withConplay ? !stdenv.hostPlatform.isWindows
+}:
+
+stdenv.mkDerivation rec {
+  pname = "mpg123";
+  version = "1.29.3";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/${pname}/${pname}-${version}.tar.bz2";
+    sha256 = "sha256-ljiF2Mx3Ji8ot3GHx9GJ4yGV5kJE3iUwt5jd8yGD6Ec=";
+  };
+
+  outputs = [ "out" ] ++ lib.optionals withConplay [ "conplay" ];
+
+  nativeBuildInputs = lib.optionals withConplay [ makeWrapper ]
+    ++ lib.optionals (withPulse || withJack) [ pkg-config ];
+
+  buildInputs = lib.optionals withConplay [ perl ]
+    ++ lib.optionals withAlsa [ alsa-lib ]
+    ++ lib.optionals withPulse [ libpulseaudio ]
+    ++ lib.optionals withCoreAudio [ AudioUnit AudioToolbox ]
+    ++ lib.optionals withJack [ jack ];
+
+  configureFlags = [
+    "--with-audio=${lib.strings.concatStringsSep "," (
+      lib.optional withJack "jack"
+      ++ lib.optional withPulse "pulse"
+      ++ lib.optional withAlsa "alsa"
+      ++ lib.optional withCoreAudio "coreaudio"
+      ++ [ "dummy" ]
+    )}"
+  ] ++ lib.optional (stdenv.hostPlatform ? mpg123) "--with-cpu=${stdenv.hostPlatform.mpg123.cpu}";
+
+  enableParallelBuilding = true;
+
+  postInstall = lib.optionalString withConplay ''
+    mkdir -p $conplay/bin
+    mv scripts/conplay $conplay/bin/
+  '';
+
+  preFixup = lib.optionalString withConplay ''
+    patchShebangs $conplay/bin/conplay
+  '';
+
+  postFixup = lib.optionalString withConplay ''
+    wrapProgram $conplay/bin/conplay \
+      --prefix PATH : $out/bin
+  '';
+
+  meta = with lib; {
+    description = "Fast console MPEG Audio Player and decoder library";
+    homepage = "https://mpg123.org";
+    license = licenses.lgpl21Only;
+    maintainers = with maintainers; [ ftrvxmtrx ];
+    platforms = platforms.all;
+  };
+}
diff --git a/pkgs/applications/audio/mpg321/default.nix b/pkgs/applications/audio/mpg321/default.nix
new file mode 100644
index 00000000000..03aee52f2a9
--- /dev/null
+++ b/pkgs/applications/audio/mpg321/default.nix
@@ -0,0 +1,42 @@
+{lib, stdenv, fetchurl, fetchpatch, libao, libmad, libid3tag, zlib, alsa-lib
+# 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 {
+  pname = "mpg321";
+  version = "0.3.2";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/mpg321/${version}/mpg321_${version}.orig.tar.gz";
+    sha256 = "0ki8mh76bbmdh77qsiw682dvi8y468yhbdabqwg05igmwc1wqvq5";
+  };
+
+  patches = [
+    (fetchpatch {
+      name = "CVE-2018-7263.patch";
+      url = "https://sources.debian.org/data/main/m/mpg321/0.3.2-3/debian/patches/handle_illegal_bitrate_value.patch";
+      sha256 = "15simp5fjvm9b024ryfh441rkh2d5bcrizqkzlrh07n9sm7fkw6x";
+    })
+  ];
+
+  hardeningDisable = [ "format" ];
+
+  configureFlags =
+    [ ("--enable-alsa=" + (if stdenv.isLinux then "yes" else "no")) ]
+    ++ (lib.optional (defaultAudio != null)
+         "--with-default-audio=${defaultAudio}");
+
+  buildInputs = [libao libid3tag libmad zlib]
+    ++ lib.optional stdenv.isLinux alsa-lib;
+
+  installTargets = [ "install" "install-man" ];
+
+  meta = with lib; {
+    description = "Command-line MP3 player";
+    homepage = "http://mpg321.sourceforge.net/";
+    license = licenses.gpl2;
+    platforms = platforms.gnu ++ platforms.linux;
+  };
+}
diff --git a/pkgs/applications/audio/munt/libmt32emu.nix b/pkgs/applications/audio/munt/libmt32emu.nix
new file mode 100644
index 00000000000..f79a2667542
--- /dev/null
+++ b/pkgs/applications/audio/munt/libmt32emu.nix
@@ -0,0 +1,38 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libmt32emu";
+  version = "2.5.3";
+
+  src = fetchFromGitHub {
+    owner = "munt";
+    repo = "munt";
+    rev = "${pname}_${lib.replaceChars [ "." ] [ "_" ] version}";
+    hash = "sha256-n5VV5Swh1tOVQGT3urEKl64A/w7cY95/0y5wC5ZuLm4=";
+  };
+
+  outputs = [ "out" "dev" ];
+
+  nativeBuildInputs = [
+    cmake
+  ];
+
+  dontFixCmake = true;
+
+  cmakeFlags = [
+    "-Dmunt_WITH_MT32EMU_SMF2WAV=OFF"
+    "-Dmunt_WITH_MT32EMU_QT=OFF"
+  ];
+
+  meta = with lib; {
+    homepage = "http://munt.sourceforge.net/";
+    description = "A library to emulate Roland MT-32, CM-32L, CM-64 and LAPC-I devices";
+    license = with licenses; [ lgpl21Plus ];
+    maintainers = with maintainers; [ OPNA2608 ];
+    platforms = platforms.unix; # Not tested on ReactOS yet :)
+  };
+}
diff --git a/pkgs/applications/audio/munt/mt32emu-qt.nix b/pkgs/applications/audio/munt/mt32emu-qt.nix
new file mode 100644
index 00000000000..0c541885689
--- /dev/null
+++ b/pkgs/applications/audio/munt/mt32emu-qt.nix
@@ -0,0 +1,75 @@
+{ lib
+, stdenv
+, mkDerivation
+, fetchFromGitHub
+, alsa-lib
+, cmake
+, libpulseaudio
+, libmt32emu
+, pkg-config
+, portaudio
+, qtbase
+, qtmultimedia
+, withJack ? stdenv.hostPlatform.isUnix, libjack2
+}:
+
+mkDerivation rec {
+  pname = "mt32emu-qt";
+  version = "1.9.0";
+
+  src = fetchFromGitHub {
+    owner = "munt";
+    repo = "munt";
+    rev = "mt32emu_qt_${lib.replaceChars [ "." ] [ "_" ] version}";
+    hash = "sha256-9vapBKpl1NC3mIDetuCb452IHV6c7c7NCzSyiBry5oo=";
+  };
+
+  postPatch = ''
+    sed -i -e '/add_subdirectory(mt32emu)/d' CMakeLists.txt
+  '';
+
+  nativeBuildInputs = [
+    cmake
+    pkg-config
+  ];
+
+  buildInputs = [
+    libmt32emu
+    portaudio
+    qtbase
+    qtmultimedia
+  ]
+  ++ lib.optionals stdenv.hostPlatform.isLinux [
+    alsa-lib
+    libpulseaudio
+  ]
+  ++ lib.optional withJack libjack2;
+
+  dontFixCmake = true;
+
+  cmakeFlags = [
+    "-Dmt32emu-qt_USE_PULSEAUDIO_DYNAMIC_LOADING=OFF"
+    "-Dmunt_WITH_MT32EMU_QT=ON"
+    "-Dmunt_WITH_MT32EMU_SMF2WAV=OFF"
+  ];
+
+  postInstall = lib.optionalString stdenv.hostPlatform.isDarwin ''
+    mkdir $out/Applications
+    mv $out/bin/${meta.mainProgram}.app $out/Applications/
+    ln -s $out/{Applications/${meta.mainProgram}.app/Contents/MacOS,bin}/${meta.mainProgram}
+  '';
+
+  meta = with lib; {
+    homepage = "http://munt.sourceforge.net/";
+    description = "A synthesizer application built on Qt and libmt32emu";
+    longDescription = ''
+      mt32emu-qt is a synthesiser application that facilitates both realtime
+      synthesis and conversion of pre-recorded SMF files to WAVE making use of
+      the mt32emu library and the Qt framework.
+    '';
+    license = with licenses; [ gpl3Plus ];
+    maintainers = with maintainers; [ OPNA2608 ];
+    platforms = platforms.all;
+    mainProgram = "mt32emu-qt";
+  };
+}
diff --git a/pkgs/applications/audio/munt/mt32emu-smf2wav.nix b/pkgs/applications/audio/munt/mt32emu-smf2wav.nix
new file mode 100644
index 00000000000..378b5dd8fb8
--- /dev/null
+++ b/pkgs/applications/audio/munt/mt32emu-smf2wav.nix
@@ -0,0 +1,50 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+, glib
+, libmt32emu
+, pkg-config
+}:
+
+stdenv.mkDerivation rec {
+  pname = "mt32emu-smf2wav";
+  version = "1.7.0";
+
+  src = fetchFromGitHub {
+    owner = "munt";
+    repo = "munt";
+    rev = "mt32emu_smf2wav_${lib.replaceChars [ "." ] [ "_" ] version}";
+    hash = "sha256-FnKlKJxe7P4Yqpv0oVGgV4253dMgSmgtb7EAa2FI+aI=";
+  };
+
+  postPatch = ''
+    sed -i -e '/add_subdirectory(mt32emu)/d' CMakeLists.txt
+  '';
+
+  dontFixCmake = true;
+
+  nativeBuildInputs = [
+    cmake
+    pkg-config
+  ];
+
+  buildInputs = [
+    libmt32emu
+    glib
+  ];
+
+  cmakeFlags = [
+    "-Dmunt_WITH_MT32EMU_QT=OFF"
+    "-Dmunt_WITH_MT32EMU_SMF2WAV=ON"
+  ];
+
+  meta = with lib; {
+    homepage = "http://munt.sourceforge.net/";
+    description = "Produces a WAVE file from a Standard MIDI file (SMF)";
+    license = with licenses; [ gpl3Plus ];
+    maintainers = with maintainers; [ OPNA2608 ];
+    platforms = platforms.all;
+    mainProgram = "mt32emu-smf2wav";
+  };
+}
diff --git a/pkgs/applications/audio/mup/default.nix b/pkgs/applications/audio/mup/default.nix
new file mode 100644
index 00000000000..8f1d5c38b34
--- /dev/null
+++ b/pkgs/applications/audio/mup/default.nix
@@ -0,0 +1,41 @@
+{ lib, stdenv, fetchurl, autoreconfHook, bison, flex, ghostscript, groff, netpbm
+, fltk, libXinerama, libXpm, libjpeg
+}:
+
+stdenv.mkDerivation rec {
+  pname = "mup";
+  version = "6.8";
+
+  src = fetchurl {
+    url = "http://www.arkkra.com/ftp/pub/unix/mup${builtins.replaceStrings ["."] [""] version}src.tar.gz";
+    sha256 = "06bv5nyl8rcibyb83zzrfdq6x6f93g3rgnv47i5gsjcaw5w6l31y";
+  };
+
+  nativeBuildInputs = [ autoreconfHook bison flex ghostscript groff netpbm ];
+
+  buildInputs = [ fltk libXinerama libXpm libjpeg ];
+
+  patches = [ ./ghostscript-permit-file-write.patch ];
+
+  postPatch = ''
+    for f in Makefile.am doc/Makefile.am doc/htmldocs/Makefile.am src/mupmate/Preferences.C; do
+      substituteInPlace $f --replace doc/packages doc
+    done
+    substituteInPlace src/mupprnt/mupprnt --replace 'mup ' $out/bin/mup' '
+    substituteInPlace src/mupdisp/genfile.c --replace '"mup"' '"'$out/bin/mup'"'
+    substituteInPlace src/mupmate/Preferences.C \
+      --replace '"mup"' '"'$out/bin/mup'"' \
+      --replace '"gv"' '"xdg-open"' \
+      --replace /usr/share/doc $out/share/doc
+  '';
+
+  enableParallelBuilding = false; # Undeclared dependencies + https://stackoverflow.com/a/19822767/1687334 for prolog.ps.
+
+  meta = with lib; {
+    homepage = "http://www.arkkra.com/";
+    description = "Music typesetting program (ASCII to PostScript and MIDI)";
+    license = licenses.bsd3;
+    maintainers = with maintainers; [ orivej ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/pkgs/applications/audio/mup/ghostscript-permit-file-write.patch b/pkgs/applications/audio/mup/ghostscript-permit-file-write.patch
new file mode 100644
index 00000000000..5059e71001f
--- /dev/null
+++ b/pkgs/applications/audio/mup/ghostscript-permit-file-write.patch
@@ -0,0 +1,5 @@
+--- a/src/mup/Makefile.am
++++ b/src/mup/Makefile.am
+@@ -39 +39 @@ fontdata.c:	prolog.ps ../../tools/mup/getfontinfo.ps ../../LICENSE
+-	$(GS) -sDEVICE=nullpage -sOutputFile=/dev/null -dQUIET - < ../../tools/mup/getfontinfo.ps | $(SED) -e "/Warning:/d" >> fontdata.c
++	$(GS) -sDEVICE=nullpage -sOutputFile=/dev/null -dQUIET --permit-file-write=charnames:fontinit - < ../../tools/mup/getfontinfo.ps | $(SED) -e "/Warning:/d" >> fontdata.c
diff --git a/pkgs/applications/audio/muse/default.nix b/pkgs/applications/audio/muse/default.nix
new file mode 100644
index 00000000000..f5a6bafe792
--- /dev/null
+++ b/pkgs/applications/audio/muse/default.nix
@@ -0,0 +1,46 @@
+{ lib, stdenv, fetchFromGitHub, cmake, pkg-config, qttools, wrapQtAppsHook
+, alsa-lib, dssi, fluidsynth, ladspaH, lash, libinstpatch, libjack2, liblo
+, libsamplerate, libsndfile, lilv, lrdf, lv2, qtsvg, rtaudio, rubberband, sord
+}:
+
+stdenv.mkDerivation rec {
+  pname = "muse-sequencer";
+  version = "3.1.1";
+
+  src = fetchFromGitHub {
+    owner = "muse-sequencer";
+    repo = "muse";
+    rev = "muse_${builtins.replaceStrings ["."] ["_"] version}";
+    sha256 = "1rasp2v1ds2aw296lbf27rzw0l9fjl0cvbvw85d5ycvh6wkm301p";
+  };
+
+  sourceRoot = "source/muse3";
+
+  prePatch = ''
+    chmod u+w $NIX_BUILD_TOP
+  '';
+
+  patches = [ ./fix-parallel-building.patch ];
+
+  nativeBuildInputs = [ cmake pkg-config qttools wrapQtAppsHook ];
+
+  buildInputs = [
+    alsa-lib dssi fluidsynth ladspaH lash libinstpatch libjack2 liblo
+    libsamplerate libsndfile lilv lrdf lv2 qtsvg rtaudio rubberband sord
+  ];
+
+  meta = with lib; {
+    homepage = "https://muse-sequencer.github.io/";
+    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 = licenses.gpl2Plus;
+    maintainers = with maintainers; [ orivej ];
+  };
+}
diff --git a/pkgs/applications/audio/muse/fix-parallel-building.patch b/pkgs/applications/audio/muse/fix-parallel-building.patch
new file mode 100644
index 00000000000..a11970b7111
--- /dev/null
+++ b/pkgs/applications/audio/muse/fix-parallel-building.patch
@@ -0,0 +1,93 @@
+To confirm these dependencies, run in a fresh build tree:
+
+
+ninja muse/components/CMakeFiles/components.dir/confmport.o
+
+In file included from ../muse/components/confmport.cpp:48:
+../muse/mplugins/midifilterimpl.h:28:10: fatal error:
+ui_midifilter.h: No such file or directory
+
+
+ninja muse/waveedit/CMakeFiles/waveedit.dir/wavecanvas.o
+
+In file included from ../muse/waveedit/wavecanvas.cpp:72:
+../muse/components/copy_on_write.h:26:10: fatal error:
+ui_copy_on_write_base.h: No such file or directory
+
+
+ninja muse/instruments/CMakeFiles/instruments.dir/editinstrument.o
+
+In file included from ../muse/instruments/editinstrument.cpp:58:
+../muse/components/editevent.h:26:10: fatal error:
+ui_editnotedialogbase.h: No such file or directory
+
+
+ninja muse/liste/CMakeFiles/liste.dir/listedit.o
+
+In file included from ../muse/liste/listedit.cpp:37:
+../muse/components/editevent.h:26:10: fatal error:
+ui_editnotedialogbase.h: No such file or directory
+
+
+ninja muse/mixer/CMakeFiles/mixer.dir/rack.o
+
+In file included from ../muse/mixer/rack.cpp:49:
+../muse/components/plugindialog.h:4:10: fatal error:
+ui_plugindialogbase.h: No such file or directory
+
+
+ninja muse/midiedit/CMakeFiles/midiedit.dir/drumedit.o
+
+In file included from /build/source/muse3/muse/midiedit/drumedit.cpp:64:
+/build/source/muse3/muse/components/filedialog.h:29:10: fatal error:
+ui_fdialogbuttons.h: No such file or directory
+
+
+--- a/muse/components/CMakeLists.txt
++++ b/muse/components/CMakeLists.txt
+@@ -343,4 +343,5 @@ set_target_properties( components
+ target_link_libraries ( components
+       ${QT_LIBRARIES}
++      mplugins
+       widgets
+       xml_module
+--- a/muse/waveedit/CMakeLists.txt
++++ b/muse/waveedit/CMakeLists.txt
+@@ -79,4 +79,5 @@ set_target_properties( waveedit
+ target_link_libraries( waveedit
+       ${QT_LIBRARIES}
++      components
+       widgets
+       )
+--- a/muse/instruments/CMakeLists.txt
++++ b/muse/instruments/CMakeLists.txt
+@@ -78,4 +78,5 @@ set_target_properties( instruments
+ target_link_libraries ( instruments
+       ${QT_LIBRARIES}
++      components
+       icons
+       widgets
+--- a/muse/liste/CMakeLists.txt
++++ b/muse/liste/CMakeLists.txt
+@@ -65,4 +65,5 @@ set_target_properties( liste
+ target_link_libraries ( liste
+       ${QT_LIBRARIES}
++      components
+       awl
+       widgets
+--- a/muse/mixer/CMakeLists.txt
++++ b/muse/mixer/CMakeLists.txt
+@@ -87,4 +87,5 @@ set_target_properties ( mixer
+ target_link_libraries ( mixer
+       ${QT_LIBRARIES}
++      components
+       widgets
+       )
+--- a/muse/midiedit/CMakeLists.txt
++++ b/muse/midiedit/CMakeLists.txt
+@@ -93,4 +93,5 @@ set_target_properties( midiedit
+ target_link_libraries ( midiedit
+       ${QT_LIBRARIES}
++      components
+       al
+       ctrl
diff --git a/pkgs/applications/audio/musescore/darwin.nix b/pkgs/applications/audio/musescore/darwin.nix
new file mode 100644
index 00000000000..13141729320
--- /dev/null
+++ b/pkgs/applications/audio/musescore/darwin.nix
@@ -0,0 +1,37 @@
+{ stdenv, lib, fetchurl, undmg }:
+
+let
+  versionComponents = [ "2" "1" ];
+  appName = "MuseScore ${builtins.head versionComponents}";
+in
+
+with lib;
+
+stdenv.mkDerivation rec {
+  pname = "musescore-darwin";
+  version = concatStringsSep "." versionComponents;
+
+  # The disk image contains the .app and a symlink to /Applications.
+  sourceRoot = "${appName}.app";
+
+  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 lib; {
+    description = "Music notation and composition software";
+    homepage = "https://musescore.org/";
+    license = licenses.gpl2;
+    platforms = platforms.darwin;
+    maintainers = [];
+    repositories.git = "https://github.com/musescore/MuseScore";
+  };
+}
diff --git a/pkgs/applications/audio/musescore/default.nix b/pkgs/applications/audio/musescore/default.nix
new file mode 100644
index 00000000000..7662eadc498
--- /dev/null
+++ b/pkgs/applications/audio/musescore/default.nix
@@ -0,0 +1,56 @@
+{ mkDerivation, lib, fetchFromGitHub, cmake, pkg-config
+, alsa-lib, freetype, libjack2, lame, libogg, libpulseaudio, libsndfile, libvorbis
+, portaudio, portmidi, qtbase, qtdeclarative, qtgraphicaleffects
+, qtquickcontrols2, qtscript, qtsvg, qttools
+, qtwebengine, qtxmlpatterns
+, nixosTests
+}:
+
+mkDerivation rec {
+  pname = "musescore";
+  version = "3.6.2";
+
+  src = fetchFromGitHub {
+    owner = "musescore";
+    repo = "MuseScore";
+    rev = "v${version}";
+    sha256 = "sha256-GBGAD/qdOhoNfDzI+O0EiKgeb86GFJxpci35T6tZ+2s=";
+  };
+
+  patches = [
+    ./remove_qtwebengine_install_hack.patch
+  ];
+
+  cmakeFlags = [
+    "-DMUSESCORE_BUILD_CONFIG=release"
+    "-DUSE_SYSTEM_FREETYPE=ON"
+  ];
+
+  qtWrapperArgs = [
+    # MuseScore JACK backend loads libjack at runtime.
+    "--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ libjack2 ]}"
+    # There are some issues with using the wayland backend, see:
+    # https://musescore.org/en/node/321936
+    "--set QT_QPA_PLATFORM xcb"
+  ];
+
+  nativeBuildInputs = [ cmake pkg-config ];
+
+  buildInputs = [
+    alsa-lib libjack2 freetype lame libogg libpulseaudio libsndfile libvorbis
+    portaudio portmidi # tesseract
+    qtbase qtdeclarative qtgraphicaleffects qtquickcontrols2
+    qtscript qtsvg qttools qtwebengine qtxmlpatterns
+  ];
+
+  passthru.tests = nixosTests.musescore;
+
+  meta = with lib; {
+    description = "Music notation and composition software";
+    homepage = "https://musescore.org/";
+    license = licenses.gpl2;
+    maintainers = with maintainers; [ vandenoever turion doronbehar ];
+    platforms = platforms.linux;
+    repositories.git = "https://github.com/musescore/MuseScore";
+  };
+}
diff --git a/pkgs/applications/audio/musescore/remove_qtwebengine_install_hack.patch b/pkgs/applications/audio/musescore/remove_qtwebengine_install_hack.patch
new file mode 100644
index 00000000000..57a6092d585
--- /dev/null
+++ b/pkgs/applications/audio/musescore/remove_qtwebengine_install_hack.patch
@@ -0,0 +1,19 @@
+--- a/main/CMakeLists.txt
++++ b/main/CMakeLists.txt
+@@ -220,16 +219,0 @@ else (MINGW)
+-      ## install qwebengine core
+-      if (NOT APPLE AND USE_WEBENGINE)
+-         install(PROGRAMS
+-            ${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)
+-
diff --git a/pkgs/applications/audio/musikcube/default.nix b/pkgs/applications/audio/musikcube/default.nix
new file mode 100644
index 00000000000..bf34e8cbe5b
--- /dev/null
+++ b/pkgs/applications/audio/musikcube/default.nix
@@ -0,0 +1,70 @@
+{ cmake
+, pkg-config
+, alsa-lib
+, boost
+, curl
+, fetchFromGitHub
+, fetchpatch
+, ffmpeg
+, lame
+, libev
+, libmicrohttpd
+, ncurses
+, pulseaudio
+, lib
+, stdenv
+, taglib
+, systemdSupport ? stdenv.isLinux
+, systemd
+}:
+
+stdenv.mkDerivation rec {
+  pname = "musikcube";
+  version = "0.96.10";
+
+  src = fetchFromGitHub {
+    owner = "clangen";
+    repo = pname;
+    rev = version;
+    sha256 = "sha256-Aa52pRGq99Pt++aEVZdmVNhhQuBajgfZp39L1AfKvho=";
+  };
+
+  patches = [
+    # Fix pending upstream inclusion for ncuurses-6.3 support:
+    #  https://github.com/clangen/musikcube/pull/474
+    (fetchpatch {
+      name = "ncurses-6.3.patch";
+      url = "https://github.com/clangen/musikcube/commit/1240720e27232fdb199a4da93ca6705864442026.patch";
+      sha256 = "0bhjgwnj6d24wb1m9xz1vi1k9xk27arba1absjbcimggn54pinid";
+    })
+  ];
+
+  nativeBuildInputs = [
+    cmake
+    pkg-config
+  ];
+  buildInputs = [
+    alsa-lib
+    boost
+    curl
+    ffmpeg
+    lame
+    libev
+    libmicrohttpd
+    ncurses
+    pulseaudio
+    taglib
+  ] ++ lib.optional systemdSupport systemd;
+
+  cmakeFlags = [
+    "-DDISABLE_STRIP=true"
+  ];
+
+  meta = with lib; {
+    description = "A fully functional terminal-based music player, library, and streaming audio server";
+    homepage = "https://musikcube.com/";
+    maintainers = [ maintainers.aanderse ];
+    license = licenses.bsd3;
+    platforms = platforms.all;
+  };
+}
diff --git a/pkgs/applications/audio/musly/default.nix b/pkgs/applications/audio/musly/default.nix
new file mode 100644
index 00000000000..0d10b55d329
--- /dev/null
+++ b/pkgs/applications/audio/musly/default.nix
@@ -0,0 +1,33 @@
+{ lib, stdenv, fetchFromGitHub, cmake, eigen, ffmpeg }:
+stdenv.mkDerivation {
+  pname = "musly";
+  version = "unstable-2017-04-26";
+  src = fetchFromGitHub {
+    owner = "dominikschnitzer";
+    repo = "musly";
+    rev = "f911eacbbe0b39ebe87cb37d0caef09632fa40d6";
+    sha256 = "1q42wvdwy2pac7bhfraqqj2czw7w2m33ms3ifjl8phm7d87i8825";
+  };
+  nativeBuildInputs = [ cmake ];
+  buildInputs = [ eigen ffmpeg ];
+  fixupPhase = if stdenv.isDarwin then ''
+    install_name_tool -change libmusly.dylib $out/lib/libmusly.dylib $out/bin/musly
+    install_name_tool -change libmusly_resample.dylib $out/lib/libmusly_resample.dylib $out/bin/musly
+    install_name_tool -change libmusly_resample.dylib $out/lib/libmusly_resample.dylib $out/lib/libmusly.dylib
+  '' else "";
+
+  meta = with lib; {
+    homepage = "https://www.musly.org";
+    description = "A fast and high-quality audio music similarity library written in C/C++";
+    longDescription = ''
+      Musly analyzes the the audio signal of music pieces to estimate their similarity.
+      No meta-data about the music piece is included in the similarity estimation.
+      To use Musly in your application, have a look at the library documentation
+      or try the command line application included in the package and start generating
+      some automatic music playlists right away.
+    '';
+    license = licenses.mpl20;
+    maintainers = with maintainers; [ ggpeti ];
+    platforms = with platforms; darwin ++ linux;
+  };
+}
diff --git a/pkgs/applications/audio/muso/default.nix b/pkgs/applications/audio/muso/default.nix
new file mode 100644
index 00000000000..15c61196d43
--- /dev/null
+++ b/pkgs/applications/audio/muso/default.nix
@@ -0,0 +1,37 @@
+{ lib, stdenv, fetchFromGitHub, rustPlatform
+, pkg-config, wrapGAppsHook, CoreServices
+}:
+
+rustPlatform.buildRustPackage rec {
+  pname = "muso";
+  version = "2.0.0";
+
+  src = fetchFromGitHub {
+    owner = "quebin31";
+    repo = pname;
+    rev = "68cc90869bcc0f202830a318fbfd6bb9bdb75a39";
+    sha256 = "1dnfslliss173igympl7h1zc0qz0g10kf96dwrcj6aglmvvw426p";
+  };
+
+  nativeBuildInputs = [ pkg-config wrapGAppsHook ];
+  buildInputs = lib.optional stdenv.isDarwin CoreServices;
+
+  preConfigure = ''
+    substituteInPlace lib/utils.rs \
+      --replace "/usr/share/muso" "$out/share/muso"
+  '';
+
+  postInstall = ''
+    mkdir -p $out/share/muso
+    cp share/* $out/share/muso/
+  '';
+
+  cargoSha256 = "1hgdzyz005244f2mh97js9ga0a6s2hcd6iydz07f1hmhsh1j2bwy";
+
+  meta = with lib; {
+    description = "An automatic music sorter (based on ID3 tags)";
+    homepage = "https://github.com/quebin31/muso";
+    license = with licenses; [ gpl3Plus ];
+    maintainers = with maintainers; [ bloomvdomino ];
+  };
+}
diff --git a/pkgs/applications/audio/mympd/default.nix b/pkgs/applications/audio/mympd/default.nix
new file mode 100644
index 00000000000..e6027eef06a
--- /dev/null
+++ b/pkgs/applications/audio/mympd/default.nix
@@ -0,0 +1,52 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+, pkg-config
+, libmpdclient
+, openssl
+, lua5_3
+, libid3tag
+, flac
+, pcre
+}:
+
+stdenv.mkDerivation rec {
+  pname = "mympd";
+  version = "8.0.4";
+
+  src = fetchFromGitHub {
+    owner = "jcorporation";
+    repo = "myMPD";
+    rev = "v${version}";
+    sha256 = "sha256-hpUoXqblhHreDZg8fDD5S4UG+ltptIbzP9LKyQ/WbX0=";
+  };
+
+  nativeBuildInputs = [ pkg-config cmake ];
+  buildInputs = [
+    libmpdclient
+    openssl
+    lua5_3
+    libid3tag
+    flac
+    pcre
+  ];
+
+  cmakeFlags = [
+    "-DENABLE_LUA=ON"
+    # Otherwise, it tries to parse $out/etc/mympd.conf on startup.
+    "-DCMAKE_INSTALL_SYSCONFDIR=/etc"
+    # similarly here
+    "-DCMAKE_INSTALL_LOCALSTATEDIR=/var/lib/mympd"
+  ];
+  # See https://github.com/jcorporation/myMPD/issues/315
+  hardeningDisable = [ "strictoverflow" ];
+
+  meta = {
+    homepage = "https://jcorporation.github.io/mympd";
+    description = "A standalone and mobile friendly web mpd client with a tiny footprint and advanced features";
+    maintainers = [ lib.maintainers.doronbehar ];
+    platforms = lib.platforms.linux;
+    license = lib.licenses.gpl2Plus;
+  };
+}
diff --git a/pkgs/applications/audio/myxer/default.nix b/pkgs/applications/audio/myxer/default.nix
new file mode 100644
index 00000000000..0aa3727f797
--- /dev/null
+++ b/pkgs/applications/audio/myxer/default.nix
@@ -0,0 +1,38 @@
+{ lib
+, rustPlatform
+, fetchFromGitHub
+, pkg-config
+, libpulseaudio
+, glib
+, pango
+, gtk3
+}:
+
+rustPlatform.buildRustPackage rec {
+  pname = "myxer";
+  version = "1.2.1";
+
+  src = fetchFromGitHub {
+    owner = "Aurailus";
+    repo = pname;
+    rev = version;
+    sha256 = "0bnhpzmx4yyasv0j7bp31q6jm20p0qwcia5bzmpkz1jhnc27ngix";
+  };
+
+  cargoSha256 = "1cyh0nk627sgyr78rcnhj7af5jcahvjkiv5sz7xwqfdhvx5kqsk5";
+
+  nativeBuildInputs = [ pkg-config ];
+
+  buildInputs = [ libpulseaudio glib pango gtk3 ];
+
+  # Currently no tests are implemented, so we avoid building the package twice
+  doCheck = false;
+
+  meta = with lib; {
+    description = "A modern Volume Mixer for PulseAudio";
+    homepage = "https://github.com/Aurailus/Myxer";
+    license = licenses.gpl3Only;
+    maintainers = with maintainers; [ erin ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/pkgs/applications/audio/ncmpc/default.nix b/pkgs/applications/audio/ncmpc/default.nix
new file mode 100644
index 00000000000..67c4efc04be
--- /dev/null
+++ b/pkgs/applications/audio/ncmpc/default.nix
@@ -0,0 +1,46 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, meson
+, ninja
+, pkg-config
+, glib
+, ncurses
+, libmpdclient
+, gettext
+, boost
+, pcreSupport ? false, pcre ? null
+}:
+
+with lib;
+
+assert pcreSupport -> pcre != null;
+
+stdenv.mkDerivation rec {
+  pname = "ncmpc";
+  version = "0.46";
+
+  src = fetchFromGitHub {
+    owner  = "MusicPlayerDaemon";
+    repo   = "ncmpc";
+    rev    = "v${version}";
+    sha256 = "sha256-FyuN0jkHaJLXqcVbW+OggHkNBjmqH7bS7W/QXUoDjJk=";
+  };
+
+  buildInputs = [ glib ncurses libmpdclient boost ]
+    ++ optional pcreSupport pcre;
+  nativeBuildInputs = [ meson ninja pkg-config gettext ];
+
+  mesonFlags = [
+    "-Dlirc=disabled"
+    "-Ddocumentation=disabled"
+  ] ++ optional (!pcreSupport) "-Dregex=disabled";
+
+  meta = with 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/pkgs/applications/audio/ncmpcpp/default.nix b/pkgs/applications/audio/ncmpcpp/default.nix
new file mode 100644
index 00000000000..fee5dc88403
--- /dev/null
+++ b/pkgs/applications/audio/ncmpcpp/default.nix
@@ -0,0 +1,52 @@
+{ lib
+, stdenv
+, fetchurl
+, boost
+, libmpdclient
+, ncurses
+, pkg-config
+, readline
+, libiconv
+, icu
+, curl
+, outputsSupport ? true # outputs screen
+, visualizerSupport ? false, fftw ? null # visualizer screen
+, clockSupport ? true # clock screen
+, taglibSupport ? true, taglib ? null # tag editor
+}:
+
+assert visualizerSupport -> (fftw != null);
+assert taglibSupport -> (taglib != null);
+
+with lib;
+stdenv.mkDerivation rec {
+  pname = "ncmpcpp";
+  version = "0.9.2";
+
+  src = fetchurl {
+    url = "https://rybczak.net/ncmpcpp/stable/${pname}-${version}.tar.bz2";
+    sha256 = "sha256-+qv2FXyMsbJKBZryduFi+p+aO5zTgQxDuRKIYMk4Ohs=";
+  };
+
+  enableParallelBuilding = true;
+  configureFlags = [ "BOOST_LIB_SUFFIX=" ]
+    ++ optional outputsSupport "--enable-outputs"
+    ++ optional visualizerSupport "--enable-visualizer --with-fftw"
+    ++ optional clockSupport "--enable-clock"
+    ++ optional taglibSupport "--with-taglib";
+
+  nativeBuildInputs = [ pkg-config ];
+
+  buildInputs = [ boost libmpdclient ncurses readline libiconv icu curl ]
+    ++ optional visualizerSupport fftw
+    ++ optional taglibSupport taglib;
+
+  meta = {
+    description = "A featureful ncurses based MPD client inspired by ncmpc";
+    homepage    = "https://rybczak.net/ncmpcpp/";
+    changelog   = "https://github.com/ncmpcpp/ncmpcpp/blob/${version}/CHANGELOG.md";
+    license     = licenses.gpl2Plus;
+    maintainers = with maintainers; [ jfrankenau koral lovek323 ];
+    platforms   = platforms.all;
+  };
+}
diff --git a/pkgs/applications/audio/ncpamixer/default.nix b/pkgs/applications/audio/ncpamixer/default.nix
new file mode 100644
index 00000000000..aca96ef5da3
--- /dev/null
+++ b/pkgs/applications/audio/ncpamixer/default.nix
@@ -0,0 +1,29 @@
+{ lib, stdenv, fetchFromGitHub, cmake, ncurses, libpulseaudio, pkg-config }:
+
+stdenv.mkDerivation rec {
+  pname = "ncpamixer";
+  version = "1.3.3.1";
+
+  src = fetchFromGitHub {
+    owner = "fulhax";
+    repo = "ncpamixer";
+    rev = version;
+    sha256 = "1v3bz0vpgh18257hdnz3yvbnl51779g1h5b265zgc21ks7m1jw5z";
+  };
+
+  nativeBuildInputs = [ cmake pkg-config ];
+
+  buildInputs = [ ncurses libpulseaudio ];
+
+  configurePhase = ''
+    make PREFIX=$out USE_WIDE=1 RELEASE=1 build/Makefile
+  '';
+
+  meta = with 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 SuperSandro2000 ];
+  };
+}
diff --git a/pkgs/applications/audio/ncspot/default.nix b/pkgs/applications/audio/ncspot/default.nix
new file mode 100644
index 00000000000..fc7ab505ac2
--- /dev/null
+++ b/pkgs/applications/audio/ncspot/default.nix
@@ -0,0 +1,49 @@
+{ stdenv, lib, fetchFromGitHub, rustPlatform, pkg-config, ncurses, openssl, libiconv
+, withALSA ? true, alsa-lib
+, withPulseAudio ? false, libpulseaudio
+, withPortAudio ? false, portaudio
+, withMPRIS ? false, dbus
+}:
+
+rustPlatform.buildRustPackage rec {
+  pname = "ncspot";
+  version = "0.9.5";
+
+  src = fetchFromGitHub {
+    owner = "hrkfdn";
+    repo = "ncspot";
+    rev = "v${version}";
+    sha256 = "sha256-HnP0dXKkMssDAhrsA99bTCVGdov9t5+1y8fJ+BWTM80=";
+  };
+
+  # Upstream now only supports rust 1.58+, but this version is not yet available in nixpkgs.
+  # See https://github.com/hrkfdn/ncspot/issues/714
+  patches = [ ./rust_1_57_support.patch ];
+
+  cargoSha256 = "sha256-g6UMwirsSV+/NtFIfEZrz5h/OitPQcDeSawh7wq4TLI=";
+
+  nativeBuildInputs = [ pkg-config ];
+
+  buildInputs = [ ncurses openssl ]
+    ++ lib.optional stdenv.isDarwin libiconv
+    ++ lib.optional withALSA alsa-lib
+    ++ lib.optional withPulseAudio libpulseaudio
+    ++ lib.optional withPortAudio portaudio
+    ++ lib.optional withMPRIS dbus;
+
+  buildNoDefaultFeatures = true;
+  buildFeatures = [ "cursive/pancurses-backend" ]
+    ++ lib.optional withALSA "alsa_backend"
+    ++ lib.optional withPulseAudio "pulseaudio_backend"
+    ++ lib.optional withPortAudio "portaudio_backend"
+    ++ lib.optional withMPRIS "mpris";
+
+  doCheck = false;
+
+  meta = with lib; {
+    description = "Cross-platform ncurses Spotify client written in Rust, inspired by ncmpc and the likes";
+    homepage = "https://github.com/hrkfdn/ncspot";
+    license = licenses.bsd2;
+    maintainers = [ maintainers.marsam ];
+  };
+}
diff --git a/pkgs/applications/audio/ncspot/rust_1_57_support.patch b/pkgs/applications/audio/ncspot/rust_1_57_support.patch
new file mode 100644
index 00000000000..ce4d473989c
--- /dev/null
+++ b/pkgs/applications/audio/ncspot/rust_1_57_support.patch
@@ -0,0 +1,21 @@
+diff --git a/src/ui/listview.rs b/src/ui/listview.rs
+index 17fead7..e6c72b6 100644
+--- a/src/ui/listview.rs
++++ b/src/ui/listview.rs
+@@ -85,7 +85,7 @@ impl<I: ListItem> ListView<I> {
+ 
+     pub fn content_height_with_paginator(&self) -> usize {
+         let content_len = self.content.read().unwrap().len();
+-        log::info!("content len: {content_len}");
++        log::info!("content len: {}", content_len);
+ 
+         // add 1 more row for paginator if we can paginate
+         if self.can_paginate() {
+@@ -97,7 +97,7 @@ impl<I: ListItem> ListView<I> {
+ 
+     fn can_paginate(&self) -> bool {
+         let loaded = self.get_pagination().loaded_content();
+-        log::info!("can paginate: {loaded}");
++        log::info!("can paginate: {}", loaded);
+         self.get_pagination().max_content().unwrap_or(0) > self.get_pagination().loaded_content()
+     }
diff --git a/pkgs/applications/audio/netease-cloud-music-gtk/cargo-lock.patch b/pkgs/applications/audio/netease-cloud-music-gtk/cargo-lock.patch
new file mode 100644
index 00000000000..7fc21c11ff7
--- /dev/null
+++ b/pkgs/applications/audio/netease-cloud-music-gtk/cargo-lock.patch
@@ -0,0 +1,2007 @@
+diff --git a/Cargo.lock b/Cargo.lock
+new file mode 100644
+index 0000000..41d41a5
+--- /dev/null
++++ b/Cargo.lock
+@@ -0,0 +1,2001 @@
++# This file is automatically @generated by Cargo.
++# It is not intended for manual editing.
++version = 3
++
++[[package]]
++name = "aho-corasick"
++version = "0.7.18"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "1e37cfd5e7657ada45f742d6e99ca5788580b5c529dc78faf11ece6dc702656f"
++dependencies = [
++ "memchr",
++]
++
++[[package]]
++name = "ansi_term"
++version = "0.12.1"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2"
++dependencies = [
++ "winapi",
++]
++
++[[package]]
++name = "anyhow"
++version = "1.0.45"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "ee10e43ae4a853c0a3591d4e2ada1719e553be18199d9da9d4a83f5927c2f5c7"
++
++[[package]]
++name = "async-channel"
++version = "1.6.1"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "2114d64672151c0c5eaa5e131ec84a74f06e1e559830dabba01ca30605d66319"
++dependencies = [
++ "concurrent-queue",
++ "event-listener",
++ "futures-core",
++]
++
++[[package]]
++name = "async-executor"
++version = "1.4.1"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "871f9bb5e0a22eeb7e8cf16641feb87c9dc67032ccf8ff49e772eb9941d3a965"
++dependencies = [
++ "async-task",
++ "concurrent-queue",
++ "fastrand",
++ "futures-lite",
++ "once_cell",
++ "slab",
++]
++
++[[package]]
++name = "async-global-executor"
++version = "2.0.2"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "9586ec52317f36de58453159d48351bc244bc24ced3effc1fce22f3d48664af6"
++dependencies = [
++ "async-channel",
++ "async-executor",
++ "async-io",
++ "async-mutex",
++ "blocking",
++ "futures-lite",
++ "num_cpus",
++ "once_cell",
++]
++
++[[package]]
++name = "async-io"
++version = "1.6.0"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "a811e6a479f2439f0c04038796b5cfb3d2ad56c230e0f2d3f7b04d68cfee607b"
++dependencies = [
++ "concurrent-queue",
++ "futures-lite",
++ "libc",
++ "log",
++ "once_cell",
++ "parking",
++ "polling",
++ "slab",
++ "socket2",
++ "waker-fn",
++ "winapi",
++]
++
++[[package]]
++name = "async-lock"
++version = "2.4.0"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "e6a8ea61bf9947a1007c5cada31e647dbc77b103c679858150003ba697ea798b"
++dependencies = [
++ "event-listener",
++]
++
++[[package]]
++name = "async-mutex"
++version = "1.4.0"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "479db852db25d9dbf6204e6cb6253698f175c15726470f78af0d918e99d6156e"
++dependencies = [
++ "event-listener",
++]
++
++[[package]]
++name = "async-std"
++version = "1.10.0"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "f8056f1455169ab86dd47b47391e4ab0cbd25410a70e9fe675544f49bafaf952"
++dependencies = [
++ "async-channel",
++ "async-global-executor",
++ "async-io",
++ "async-lock",
++ "crossbeam-utils",
++ "futures-channel",
++ "futures-core",
++ "futures-io",
++ "futures-lite",
++ "gloo-timers",
++ "kv-log-macro",
++ "log",
++ "memchr",
++ "num_cpus",
++ "once_cell",
++ "pin-project-lite",
++ "pin-utils",
++ "slab",
++ "wasm-bindgen-futures",
++]
++
++[[package]]
++name = "async-task"
++version = "4.0.3"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "e91831deabf0d6d7ec49552e489aed63b7456a7a3c46cff62adad428110b0af0"
++
++[[package]]
++name = "atk"
++version = "0.9.0"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "812b4911e210bd51b24596244523c856ca749e6223c50a7fbbba3f89ee37c426"
++dependencies = [
++ "atk-sys",
++ "bitflags",
++ "glib",
++ "glib-sys",
++ "gobject-sys",
++ "libc",
++]
++
++[[package]]
++name = "atk-sys"
++version = "0.10.0"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "f530e4af131d94cc4fa15c5c9d0348f0ef28bac64ba660b6b2a1cf2605dedfce"
++dependencies = [
++ "glib-sys",
++ "gobject-sys",
++ "libc",
++ "system-deps",
++]
++
++[[package]]
++name = "atomic-waker"
++version = "1.0.0"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "065374052e7df7ee4047b1160cca5e1467a12351a40b3da123c870ba0b8eda2a"
++
++[[package]]
++name = "atty"
++version = "0.2.14"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8"
++dependencies = [
++ "hermit-abi",
++ "libc",
++ "winapi",
++]
++
++[[package]]
++name = "autocfg"
++version = "1.0.1"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a"
++
++[[package]]
++name = "base64"
++version = "0.13.0"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd"
++
++[[package]]
++name = "bincode"
++version = "1.3.3"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad"
++dependencies = [
++ "serde",
++]
++
++[[package]]
++name = "bitflags"
++version = "1.3.2"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
++
++[[package]]
++name = "blocking"
++version = "1.0.2"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "c5e170dbede1f740736619b776d7251cb1b9095c435c34d8ca9f57fcd2f335e9"
++dependencies = [
++ "async-channel",
++ "async-task",
++ "atomic-waker",
++ "fastrand",
++ "futures-lite",
++ "once_cell",
++]
++
++[[package]]
++name = "bumpalo"
++version = "3.8.0"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "8f1e260c3a9040a7c19a12468758f4c16f31a81a1fe087482be9570ec864bb6c"
++
++[[package]]
++name = "bytes"
++version = "1.1.0"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "c4872d67bab6358e59559027aa3b9157c53d9358c51423c17554809a8858e0f8"
++
++[[package]]
++name = "cache-padded"
++version = "1.1.1"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "631ae5198c9be5e753e5cc215e1bd73c2b466a3565173db433f52bb9d3e66dba"
++
++[[package]]
++name = "cairo-rs"
++version = "0.9.1"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "c5c0f2e047e8ca53d0ff249c54ae047931d7a6ebe05d00af73e0ffeb6e34bdb8"
++dependencies = [
++ "bitflags",
++ "cairo-sys-rs",
++ "glib",
++ "glib-sys",
++ "gobject-sys",
++ "libc",
++ "thiserror",
++]
++
++[[package]]
++name = "cairo-sys-rs"
++version = "0.10.0"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "2ed2639b9ad5f1d6efa76de95558e11339e7318426d84ac4890b86c03e828ca7"
++dependencies = [
++ "glib-sys",
++ "libc",
++ "system-deps",
++]
++
++[[package]]
++name = "castaway"
++version = "0.1.1"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "ed247d1586918e46f2bbe0f13b06498db8dab5a8c1093f156652e9f2e0a73fc3"
++
++[[package]]
++name = "cc"
++version = "1.0.71"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "79c2681d6594606957bbb8631c4b90a7fcaaa72cdb714743a437b156d6a7eedd"
++
++[[package]]
++name = "cfg-if"
++version = "1.0.0"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
++
++[[package]]
++name = "chrono"
++version = "0.4.19"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "670ad68c9088c2a963aaa298cb369688cf3f9465ce5e2d4ca10e6e0098a1ce73"
++dependencies = [
++ "libc",
++ "num-integer",
++ "num-traits",
++ "time",
++ "winapi",
++]
++
++[[package]]
++name = "concurrent-queue"
++version = "1.2.2"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "30ed07550be01594c6026cff2a1d7fe9c8f683caa798e12b68694ac9e88286a3"
++dependencies = [
++ "cache-padded",
++]
++
++[[package]]
++name = "crossbeam-utils"
++version = "0.8.5"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "d82cfc11ce7f2c3faef78d8a684447b40d503d9681acebed6cb728d45940c4db"
++dependencies = [
++ "cfg-if",
++ "lazy_static",
++]
++
++[[package]]
++name = "ctor"
++version = "0.1.21"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "ccc0a48a9b826acdf4028595adc9db92caea352f7af011a3034acd172a52a0aa"
++dependencies = [
++ "quote",
++ "syn",
++]
++
++[[package]]
++name = "curl"
++version = "0.4.40"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "877cc2f9b8367e32b6dabb9d581557e651cb3aa693a37f8679091bbf42687d5d"
++dependencies = [
++ "curl-sys",
++ "libc",
++ "openssl-probe",
++ "openssl-sys",
++ "schannel",
++ "socket2",
++ "winapi",
++]
++
++[[package]]
++name = "curl-sys"
++version = "0.4.50+curl-7.79.1"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "4856b76919dd599f31236bb18db5f5bd36e2ce131e64f857ca5c259665b76171"
++dependencies = [
++ "cc",
++ "libc",
++ "libnghttp2-sys",
++ "libz-sys",
++ "openssl-sys",
++ "pkg-config",
++ "vcpkg",
++ "winapi",
++]
++
++[[package]]
++name = "custom_error"
++version = "1.9.2"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "4f8a51dd197fa6ba5b4dc98a990a43cc13693c23eb0089ebb0fcc1f04152bca6"
++
++[[package]]
++name = "dbus"
++version = "0.6.5"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "48b5f0f36f1eebe901b0e6bee369a77ed3396334bf3f09abd46454a576f71819"
++dependencies = [
++ "libc",
++ "libdbus-sys",
++]
++
++[[package]]
++name = "dirs"
++version = "3.0.2"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "30baa043103c9d0c2a57cf537cc2f35623889dc0d405e6c3cccfadbc81c71309"
++dependencies = [
++ "dirs-sys",
++]
++
++[[package]]
++name = "dirs"
++version = "4.0.0"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "ca3aa72a6f96ea37bbc5aa912f6788242832f75369bdfdadcb0e38423f100059"
++dependencies = [
++ "dirs-sys",
++]
++
++[[package]]
++name = "dirs-sys"
++version = "0.3.6"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "03d86534ed367a67548dc68113a0f5db55432fdfbb6e6f9d77704397d95d5780"
++dependencies = [
++ "libc",
++ "redox_users",
++ "winapi",
++]
++
++[[package]]
++name = "either"
++version = "1.6.1"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457"
++
++[[package]]
++name = "encoding_rs"
++version = "0.8.29"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "a74ea89a0a1b98f6332de42c95baff457ada66d1cb4030f9ff151b2041a1c746"
++dependencies = [
++ "cfg-if",
++]
++
++[[package]]
++name = "event-listener"
++version = "2.5.1"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "f7531096570974c3a9dcf9e4b8e1cede1ec26cf5046219fb3b9d897503b9be59"
++
++[[package]]
++name = "fastrand"
++version = "1.5.0"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "b394ed3d285a429378d3b384b9eb1285267e7df4b166df24b7a6939a04dc392e"
++dependencies = [
++ "instant",
++]
++
++[[package]]
++name = "fnv"
++version = "1.0.7"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1"
++
++[[package]]
++name = "foreign-types"
++version = "0.3.2"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1"
++dependencies = [
++ "foreign-types-shared",
++]
++
++[[package]]
++name = "foreign-types-shared"
++version = "0.1.1"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b"
++
++[[package]]
++name = "form_urlencoded"
++version = "1.0.1"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "5fc25a87fa4fd2094bffb06925852034d90a17f0d1e05197d4956d3555752191"
++dependencies = [
++ "matches",
++ "percent-encoding",
++]
++
++[[package]]
++name = "fragile"
++version = "1.0.0"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "69a039c3498dc930fe810151a34ba0c1c70b02b8625035592e74432f678591f2"
++
++[[package]]
++name = "futures"
++version = "0.3.17"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "a12aa0eb539080d55c3f2d45a67c3b58b6b0773c1a3ca2dfec66d58c97fd66ca"
++dependencies = [
++ "futures-channel",
++ "futures-core",
++ "futures-executor",
++ "futures-io",
++ "futures-sink",
++ "futures-task",
++ "futures-util",
++]
++
++[[package]]
++name = "futures-channel"
++version = "0.3.17"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "5da6ba8c3bb3c165d3c7319fc1cc8304facf1fb8db99c5de877183c08a273888"
++dependencies = [
++ "futures-core",
++ "futures-sink",
++]
++
++[[package]]
++name = "futures-core"
++version = "0.3.17"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "88d1c26957f23603395cd326b0ffe64124b818f4449552f960d815cfba83a53d"
++
++[[package]]
++name = "futures-executor"
++version = "0.3.17"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "45025be030969d763025784f7f355043dc6bc74093e4ecc5000ca4dc50d8745c"
++dependencies = [
++ "futures-core",
++ "futures-task",
++ "futures-util",
++]
++
++[[package]]
++name = "futures-io"
++version = "0.3.17"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "522de2a0fe3e380f1bc577ba0474108faf3f6b18321dbf60b3b9c39a75073377"
++
++[[package]]
++name = "futures-lite"
++version = "1.12.0"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "7694489acd39452c77daa48516b894c153f192c3578d5a839b62c58099fcbf48"
++dependencies = [
++ "fastrand",
++ "futures-core",
++ "futures-io",
++ "memchr",
++ "parking",
++ "pin-project-lite",
++ "waker-fn",
++]
++
++[[package]]
++name = "futures-macro"
++version = "0.3.17"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "18e4a4b95cea4b4ccbcf1c5675ca7c4ee4e9e75eb79944d07defde18068f79bb"
++dependencies = [
++ "autocfg",
++ "proc-macro-hack",
++ "proc-macro2",
++ "quote",
++ "syn",
++]
++
++[[package]]
++name = "futures-sink"
++version = "0.3.17"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "36ea153c13024fe480590b3e3d4cad89a0cfacecc24577b68f86c6ced9c2bc11"
++
++[[package]]
++name = "futures-task"
++version = "0.3.17"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "1d3d00f4eddb73e498a54394f228cd55853bdf059259e8e7bc6e69d408892e99"
++
++[[package]]
++name = "futures-util"
++version = "0.3.17"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "36568465210a3a6ee45e1f165136d68671471a501e632e9a98d96872222b5481"
++dependencies = [
++ "autocfg",
++ "futures-channel",
++ "futures-core",
++ "futures-io",
++ "futures-macro",
++ "futures-sink",
++ "futures-task",
++ "memchr",
++ "pin-project-lite",
++ "pin-utils",
++ "proc-macro-hack",
++ "proc-macro-nested",
++ "slab",
++]
++
++[[package]]
++name = "gdk"
++version = "0.13.2"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "db00839b2a68a7a10af3fa28dfb3febaba3a20c3a9ac2425a33b7df1f84a6b7d"
++dependencies = [
++ "bitflags",
++ "cairo-rs",
++ "cairo-sys-rs",
++ "gdk-pixbuf",
++ "gdk-sys",
++ "gio",
++ "gio-sys",
++ "glib",
++ "glib-sys",
++ "gobject-sys",
++ "libc",
++ "pango",
++]
++
++[[package]]
++name = "gdk-pixbuf"
++version = "0.9.0"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "8f6dae3cb99dd49b758b88f0132f8d401108e63ae8edd45f432d42cdff99998a"
++dependencies = [
++ "gdk-pixbuf-sys",
++ "gio",
++ "gio-sys",
++ "glib",
++ "glib-sys",
++ "gobject-sys",
++ "libc",
++]
++
++[[package]]
++name = "gdk-pixbuf-sys"
++version = "0.10.0"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "3bfe468a7f43e97b8d193a762b6c5cf67a7d36cacbc0b9291dbcae24bfea1e8f"
++dependencies = [
++ "gio-sys",
++ "glib-sys",
++ "gobject-sys",
++ "libc",
++ "system-deps",
++]
++
++[[package]]
++name = "gdk-sys"
++version = "0.10.0"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "0a9653cfc500fd268015b1ac055ddbc3df7a5c9ea3f4ccef147b3957bd140d69"
++dependencies = [
++ "cairo-sys-rs",
++ "gdk-pixbuf-sys",
++ "gio-sys",
++ "glib-sys",
++ "gobject-sys",
++ "libc",
++ "pango-sys",
++ "pkg-config",
++ "system-deps",
++]
++
++[[package]]
++name = "getrandom"
++version = "0.2.3"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "7fcd999463524c52659517fe2cea98493cfe485d10565e7b0fb07dbba7ad2753"
++dependencies = [
++ "cfg-if",
++ "libc",
++ "wasi",
++]
++
++[[package]]
++name = "gio"
++version = "0.9.1"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "1fb60242bfff700772dae5d9e3a1f7aa2e4ebccf18b89662a16acb2822568561"
++dependencies = [
++ "bitflags",
++ "futures",
++ "futures-channel",
++ "futures-core",
++ "futures-io",
++ "futures-util",
++ "gio-sys",
++ "glib",
++ "glib-sys",
++ "gobject-sys",
++ "libc",
++ "once_cell",
++ "thiserror",
++]
++
++[[package]]
++name = "gio-sys"
++version = "0.10.1"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "5e24fb752f8f5d2cf6bbc2c606fd2bc989c81c5e2fe321ab974d54f8b6344eac"
++dependencies = [
++ "glib-sys",
++ "gobject-sys",
++ "libc",
++ "system-deps",
++ "winapi",
++]
++
++[[package]]
++name = "glib"
++version = "0.10.3"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "0c685013b7515e668f1b57a165b009d4d28cb139a8a989bbd699c10dad29d0c5"
++dependencies = [
++ "bitflags",
++ "futures-channel",
++ "futures-core",
++ "futures-executor",
++ "futures-task",
++ "futures-util",
++ "glib-macros",
++ "glib-sys",
++ "gobject-sys",
++ "libc",
++ "once_cell",
++]
++
++[[package]]
++name = "glib-macros"
++version = "0.10.1"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "41486a26d1366a8032b160b59065a59fb528530a46a49f627e7048fb8c064039"
++dependencies = [
++ "anyhow",
++ "heck",
++ "itertools",
++ "proc-macro-crate",
++ "proc-macro-error",
++ "proc-macro2",
++ "quote",
++ "syn",
++]
++
++[[package]]
++name = "glib-sys"
++version = "0.10.1"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "c7e9b997a66e9a23d073f2b1abb4dbfc3925e0b8952f67efd8d9b6e168e4cdc1"
++dependencies = [
++ "libc",
++ "system-deps",
++]
++
++[[package]]
++name = "gloo-timers"
++version = "0.2.1"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "47204a46aaff920a1ea58b11d03dec6f704287d27561724a4631e450654a891f"
++dependencies = [
++ "futures-channel",
++ "futures-core",
++ "js-sys",
++ "wasm-bindgen",
++ "web-sys",
++]
++
++[[package]]
++name = "gobject-sys"
++version = "0.10.0"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "952133b60c318a62bf82ee75b93acc7e84028a093e06b9e27981c2b6fe68218c"
++dependencies = [
++ "glib-sys",
++ "libc",
++ "system-deps",
++]
++
++[[package]]
++name = "gstreamer"
++version = "0.16.7"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "9ff5d0f7ff308ae37e6eb47b6ded17785bdea06e438a708cd09e0288c1862f33"
++dependencies = [
++ "bitflags",
++ "cfg-if",
++ "futures-channel",
++ "futures-core",
++ "futures-util",
++ "glib",
++ "glib-sys",
++ "gobject-sys",
++ "gstreamer-sys",
++ "libc",
++ "muldiv",
++ "num-rational 0.3.2",
++ "once_cell",
++ "paste",
++ "pretty-hex",
++ "thiserror",
++]
++
++[[package]]
++name = "gstreamer-base"
++version = "0.16.5"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "bafd01c56f59cb10f4b5a10f97bb4bdf8c2b2784ae5b04da7e2d400cf6e6afcf"
++dependencies = [
++ "bitflags",
++ "glib",
++ "glib-sys",
++ "gobject-sys",
++ "gstreamer",
++ "gstreamer-base-sys",
++ "gstreamer-sys",
++ "libc",
++]
++
++[[package]]
++name = "gstreamer-base-sys"
++version = "0.9.1"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "a4b7b6dc2d6e160a1ae28612f602bd500b3fa474ce90bf6bb2f08072682beef5"
++dependencies = [
++ "glib-sys",
++ "gobject-sys",
++ "gstreamer-sys",
++ "libc",
++ "system-deps",
++]
++
++[[package]]
++name = "gstreamer-player"
++version = "0.16.5"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "34edf65e48e0d29c18101d77a2e004488a61f81a852a75e19d9c73e03d35cb77"
++dependencies = [
++ "bitflags",
++ "glib",
++ "glib-sys",
++ "gobject-sys",
++ "gstreamer",
++ "gstreamer-player-sys",
++ "gstreamer-sys",
++ "gstreamer-video",
++ "libc",
++]
++
++[[package]]
++name = "gstreamer-player-sys"
++version = "0.9.1"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "53aaf79503e691a32266670bc631edb6c52bdb854984da76a0ce2756f49584a2"
++dependencies = [
++ "glib-sys",
++ "gobject-sys",
++ "gstreamer-sys",
++ "gstreamer-video-sys",
++ "libc",
++ "system-deps",
++]
++
++[[package]]
++name = "gstreamer-sys"
++version = "0.9.1"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "fc1f154082d01af5718c5f8a8eb4f565a4ea5586ad8833a8fc2c2aa6844b601d"
++dependencies = [
++ "glib-sys",
++ "gobject-sys",
++ "libc",
++ "system-deps",
++]
++
++[[package]]
++name = "gstreamer-video"
++version = "0.16.7"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "f7bbb1485d87469849ec45c08e03c2f280d3ea20ff3c439d03185be54e3ce98e"
++dependencies = [
++ "bitflags",
++ "futures-channel",
++ "futures-util",
++ "glib",
++ "glib-sys",
++ "gobject-sys",
++ "gstreamer",
++ "gstreamer-base",
++ "gstreamer-base-sys",
++ "gstreamer-sys",
++ "gstreamer-video-sys",
++ "libc",
++ "once_cell",
++]
++
++[[package]]
++name = "gstreamer-video-sys"
++version = "0.9.1"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "92347e46438007d6a2386302125f62cb9df6769cdacb931af5c0f12c1ee21de4"
++dependencies = [
++ "glib-sys",
++ "gobject-sys",
++ "gstreamer-base-sys",
++ "gstreamer-sys",
++ "libc",
++ "system-deps",
++]
++
++[[package]]
++name = "gtk"
++version = "0.9.2"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "2f022f2054072b3af07666341984562c8e626a79daa8be27b955d12d06a5ad6a"
++dependencies = [
++ "atk",
++ "bitflags",
++ "cairo-rs",
++ "cairo-sys-rs",
++ "cc",
++ "gdk",
++ "gdk-pixbuf",
++ "gdk-pixbuf-sys",
++ "gdk-sys",
++ "gio",
++ "gio-sys",
++ "glib",
++ "glib-sys",
++ "gobject-sys",
++ "gtk-sys",
++ "libc",
++ "once_cell",
++ "pango",
++ "pango-sys",
++ "pkg-config",
++]
++
++[[package]]
++name = "gtk-sys"
++version = "0.10.0"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "89acda6f084863307d948ba64a4b1ef674e8527dddab147ee4cdcc194c880457"
++dependencies = [
++ "atk-sys",
++ "cairo-sys-rs",
++ "gdk-pixbuf-sys",
++ "gdk-sys",
++ "gio-sys",
++ "glib-sys",
++ "gobject-sys",
++ "libc",
++ "pango-sys",
++ "system-deps",
++]
++
++[[package]]
++name = "heck"
++version = "0.3.3"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "6d621efb26863f0e9924c6ac577e8275e5e6b77455db64ffa6c65c904e9e132c"
++dependencies = [
++ "unicode-segmentation",
++]
++
++[[package]]
++name = "hermit-abi"
++version = "0.1.19"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33"
++dependencies = [
++ "libc",
++]
++
++[[package]]
++name = "hex"
++version = "0.4.3"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70"
++
++[[package]]
++name = "http"
++version = "0.2.5"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "1323096b05d41827dadeaee54c9981958c0f94e670bc94ed80037d1a7b8b186b"
++dependencies = [
++ "bytes",
++ "fnv",
++ "itoa",
++]
++
++[[package]]
++name = "idna"
++version = "0.2.3"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "418a0a6fab821475f634efe3ccc45c013f742efe03d853e8d3355d5cb850ecf8"
++dependencies = [
++ "matches",
++ "unicode-bidi",
++ "unicode-normalization",
++]
++
++[[package]]
++name = "instant"
++version = "0.1.12"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c"
++dependencies = [
++ "cfg-if",
++]
++
++[[package]]
++name = "isahc"
++version = "1.5.1"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "40ef5402b1791c9fc479ef9871601a2f10e4cc0f14414a5c9c6e043fb51e5a56"
++dependencies = [
++ "async-channel",
++ "castaway",
++ "chrono",
++ "crossbeam-utils",
++ "curl",
++ "curl-sys",
++ "encoding_rs",
++ "event-listener",
++ "futures-lite",
++ "http",
++ "log",
++ "mime",
++ "once_cell",
++ "polling",
++ "slab",
++ "sluice",
++ "tracing",
++ "tracing-futures",
++ "url",
++ "waker-fn",
++]
++
++[[package]]
++name = "itertools"
++version = "0.9.0"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "284f18f85651fe11e8a991b2adb42cb078325c996ed026d994719efcfca1d54b"
++dependencies = [
++ "either",
++]
++
++[[package]]
++name = "itoa"
++version = "0.4.8"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "b71991ff56294aa922b450139ee08b3bfc70982c6b2c7562771375cf73542dd4"
++
++[[package]]
++name = "js-sys"
++version = "0.3.55"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "7cc9ffccd38c451a86bf13657df244e9c3f37493cce8e5e21e940963777acc84"
++dependencies = [
++ "wasm-bindgen",
++]
++
++[[package]]
++name = "kv-log-macro"
++version = "1.0.7"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "0de8b303297635ad57c9f5059fd9cee7a47f8e8daa09df0fcd07dd39fb22977f"
++dependencies = [
++ "log",
++]
++
++[[package]]
++name = "lazy_static"
++version = "1.4.0"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
++
++[[package]]
++name = "libc"
++version = "0.2.107"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "fbe5e23404da5b4f555ef85ebed98fb4083e55a00c317800bc2a50ede9f3d219"
++
++[[package]]
++name = "libdbus-sys"
++version = "0.2.2"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "c185b5b7ad900923ef3a8ff594083d4d9b5aea80bb4f32b8342363138c0d456b"
++dependencies = [
++ "pkg-config",
++]
++
++[[package]]
++name = "libnghttp2-sys"
++version = "0.1.7+1.45.0"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "57ed28aba195b38d5ff02b9170cbff627e336a20925e43b4945390401c5dc93f"
++dependencies = [
++ "cc",
++ "libc",
++]
++
++[[package]]
++name = "libz-sys"
++version = "1.1.3"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "de5435b8549c16d423ed0c03dbaafe57cf6c3344744f1242520d59c9d8ecec66"
++dependencies = [
++ "cc",
++ "libc",
++ "pkg-config",
++ "vcpkg",
++]
++
++[[package]]
++name = "log"
++version = "0.4.14"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "51b9bbe6c47d51fc3e1a9b945965946b4c44142ab8792c50835a980d362c2710"
++dependencies = [
++ "cfg-if",
++ "value-bag",
++]
++
++[[package]]
++name = "loggerv"
++version = "0.7.2"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "60d8de15ae71e760bce7f05447f85f73624fe0d3b1e4c5a63ba5d4cb0748d374"
++dependencies = [
++ "ansi_term",
++ "atty",
++ "log",
++]
++
++[[package]]
++name = "matches"
++version = "0.1.9"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "a3e378b66a060d48947b590737b30a1be76706c8dd7b8ba0f2fe3989c68a853f"
++
++[[package]]
++name = "memchr"
++version = "2.4.1"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "308cc39be01b73d0d18f82a0e7b2a3df85245f84af96fdddc5d202d27e47b86a"
++
++[[package]]
++name = "mime"
++version = "0.3.16"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "2a60c7ce501c71e03a9c9c0d35b861413ae925bd979cc7a4e30d060069aaac8d"
++
++[[package]]
++name = "mp4ameta"
++version = "0.9.1"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "619f6fe86b8690efad1c53d2cc8b9c1af2a5f8b93247e0ba05ece1b7639b4e66"
++dependencies = [
++ "lazy_static",
++ "mp4ameta_proc",
++]
++
++[[package]]
++name = "mp4ameta_proc"
++version = "0.4.0"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "4975ce203cd69e96a89f803d87b7b53d1950a6e93668a666d177c28aebd15c8a"
++
++[[package]]
++name = "mpris-player"
++version = "0.6.1"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "4f6badd6ebe31be46eb2e2975cf3b34b183bace5f8a8db1d609fefc4d46fbb07"
++dependencies = [
++ "dbus",
++ "glib",
++]
++
++[[package]]
++name = "muldiv"
++version = "0.2.1"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "0419348c027fa7be448d2ae7ea0e4e04c2334c31dc4e74ab29f00a2a7ca69204"
++
++[[package]]
++name = "netease-cloud-music-gtk"
++version = "1.2.2"
++dependencies = [
++ "async-std",
++ "base64",
++ "bincode",
++ "cairo-rs",
++ "chrono",
++ "custom_error",
++ "dirs 4.0.0",
++ "fragile",
++ "futures",
++ "gdk",
++ "gdk-pixbuf",
++ "gio",
++ "glib",
++ "gstreamer",
++ "gstreamer-player",
++ "gtk",
++ "hex",
++ "isahc",
++ "lazy_static",
++ "log",
++ "loggerv",
++ "mp4ameta",
++ "mpris-player",
++ "num",
++ "openssl",
++ "pango",
++ "rand",
++ "regex",
++ "serde",
++ "serde_json",
++ "urlqstring",
++ "xdg",
++]
++
++[[package]]
++name = "num"
++version = "0.4.0"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "43db66d1170d347f9a065114077f7dccb00c1b9478c89384490a3425279a4606"
++dependencies = [
++ "num-bigint",
++ "num-complex",
++ "num-integer",
++ "num-iter",
++ "num-rational 0.4.0",
++ "num-traits",
++]
++
++[[package]]
++name = "num-bigint"
++version = "0.4.3"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "f93ab6289c7b344a8a9f60f88d80aa20032336fe78da341afc91c8a2341fc75f"
++dependencies = [
++ "autocfg",
++ "num-integer",
++ "num-traits",
++]
++
++[[package]]
++name = "num-complex"
++version = "0.4.0"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "26873667bbbb7c5182d4a37c1add32cdf09f841af72da53318fdb81543c15085"
++dependencies = [
++ "num-traits",
++]
++
++[[package]]
++name = "num-integer"
++version = "0.1.44"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "d2cc698a63b549a70bc047073d2949cce27cd1c7b0a4a862d08a8031bc2801db"
++dependencies = [
++ "autocfg",
++ "num-traits",
++]
++
++[[package]]
++name = "num-iter"
++version = "0.1.42"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "b2021c8337a54d21aca0d59a92577a029af9431cb59b909b03252b9c164fad59"
++dependencies = [
++ "autocfg",
++ "num-integer",
++ "num-traits",
++]
++
++[[package]]
++name = "num-rational"
++version = "0.3.2"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "12ac428b1cb17fce6f731001d307d351ec70a6d202fc2e60f7d4c5e42d8f4f07"
++dependencies = [
++ "autocfg",
++ "num-integer",
++ "num-traits",
++]
++
++[[package]]
++name = "num-rational"
++version = "0.4.0"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "d41702bd167c2df5520b384281bc111a4b5efcf7fbc4c9c222c815b07e0a6a6a"
++dependencies = [
++ "autocfg",
++ "num-bigint",
++ "num-integer",
++ "num-traits",
++]
++
++[[package]]
++name = "num-traits"
++version = "0.2.14"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "9a64b1ec5cda2586e284722486d802acf1f7dbdc623e2bfc57e65ca1cd099290"
++dependencies = [
++ "autocfg",
++]
++
++[[package]]
++name = "num_cpus"
++version = "1.13.0"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "05499f3756671c15885fee9034446956fff3f243d6077b91e5767df161f766b3"
++dependencies = [
++ "hermit-abi",
++ "libc",
++]
++
++[[package]]
++name = "once_cell"
++version = "1.8.0"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "692fcb63b64b1758029e0a96ee63e049ce8c5948587f2f7208df04625e5f6b56"
++
++[[package]]
++name = "openssl"
++version = "0.10.38"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "0c7ae222234c30df141154f159066c5093ff73b63204dcda7121eb082fc56a95"
++dependencies = [
++ "bitflags",
++ "cfg-if",
++ "foreign-types",
++ "libc",
++ "once_cell",
++ "openssl-sys",
++]
++
++[[package]]
++name = "openssl-probe"
++version = "0.1.4"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "28988d872ab76095a6e6ac88d99b54fd267702734fd7ffe610ca27f533ddb95a"
++
++[[package]]
++name = "openssl-sys"
++version = "0.9.70"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "c6517987b3f8226b5da3661dad65ff7f300cc59fb5ea8333ca191fc65fde3edf"
++dependencies = [
++ "autocfg",
++ "cc",
++ "libc",
++ "pkg-config",
++ "vcpkg",
++]
++
++[[package]]
++name = "pango"
++version = "0.9.1"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "9937068580bebd8ced19975938573803273ccbcbd598c58d4906efd4ac87c438"
++dependencies = [
++ "bitflags",
++ "glib",
++ "glib-sys",
++ "gobject-sys",
++ "libc",
++ "once_cell",
++ "pango-sys",
++]
++
++[[package]]
++name = "pango-sys"
++version = "0.10.0"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "24d2650c8b62d116c020abd0cea26a4ed96526afda89b1c4ea567131fdefc890"
++dependencies = [
++ "glib-sys",
++ "gobject-sys",
++ "libc",
++ "system-deps",
++]
++
++[[package]]
++name = "parking"
++version = "2.0.0"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "427c3892f9e783d91cc128285287e70a59e206ca452770ece88a76f7a3eddd72"
++
++[[package]]
++name = "paste"
++version = "1.0.6"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "0744126afe1a6dd7f394cb50a716dbe086cb06e255e53d8d0185d82828358fb5"
++
++[[package]]
++name = "percent-encoding"
++version = "2.1.0"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e"
++
++[[package]]
++name = "pin-project"
++version = "1.0.8"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "576bc800220cc65dac09e99e97b08b358cfab6e17078de8dc5fee223bd2d0c08"
++dependencies = [
++ "pin-project-internal",
++]
++
++[[package]]
++name = "pin-project-internal"
++version = "1.0.8"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "6e8fe8163d14ce7f0cdac2e040116f22eac817edabff0be91e8aff7e9accf389"
++dependencies = [
++ "proc-macro2",
++ "quote",
++ "syn",
++]
++
++[[package]]
++name = "pin-project-lite"
++version = "0.2.7"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "8d31d11c69a6b52a174b42bdc0c30e5e11670f90788b2c471c31c1d17d449443"
++
++[[package]]
++name = "pin-utils"
++version = "0.1.0"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184"
++
++[[package]]
++name = "pkg-config"
++version = "0.3.22"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "12295df4f294471248581bc09bef3c38a5e46f1e36d6a37353621a0c6c357e1f"
++
++[[package]]
++name = "polling"
++version = "2.1.0"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "92341d779fa34ea8437ef4d82d440d5e1ce3f3ff7f824aa64424cd481f9a1f25"
++dependencies = [
++ "cfg-if",
++ "libc",
++ "log",
++ "wepoll-ffi",
++ "winapi",
++]
++
++[[package]]
++name = "ppv-lite86"
++version = "0.2.15"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "ed0cfbc8191465bed66e1718596ee0b0b35d5ee1f41c5df2189d0fe8bde535ba"
++
++[[package]]
++name = "pretty-hex"
++version = "0.2.1"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "bc5c99d529f0d30937f6f4b8a86d988047327bb88d04d2c4afc356de74722131"
++
++[[package]]
++name = "proc-macro-crate"
++version = "0.1.5"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "1d6ea3c4595b96363c13943497db34af4460fb474a95c43f4446ad341b8c9785"
++dependencies = [
++ "toml",
++]
++
++[[package]]
++name = "proc-macro-error"
++version = "1.0.4"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c"
++dependencies = [
++ "proc-macro-error-attr",
++ "proc-macro2",
++ "quote",
++ "syn",
++ "version_check",
++]
++
++[[package]]
++name = "proc-macro-error-attr"
++version = "1.0.4"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869"
++dependencies = [
++ "proc-macro2",
++ "quote",
++ "version_check",
++]
++
++[[package]]
++name = "proc-macro-hack"
++version = "0.5.19"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "dbf0c48bc1d91375ae5c3cd81e3722dff1abcf81a30960240640d223f59fe0e5"
++
++[[package]]
++name = "proc-macro-nested"
++version = "0.1.7"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "bc881b2c22681370c6a780e47af9840ef841837bc98118431d4e1868bd0c1086"
++
++[[package]]
++name = "proc-macro2"
++version = "1.0.32"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "ba508cc11742c0dc5c1659771673afbab7a0efab23aa17e854cbab0837ed0b43"
++dependencies = [
++ "unicode-xid",
++]
++
++[[package]]
++name = "quote"
++version = "1.0.10"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "38bc8cc6a5f2e3655e0899c1b848643b2562f853f114bfec7be120678e3ace05"
++dependencies = [
++ "proc-macro2",
++]
++
++[[package]]
++name = "rand"
++version = "0.8.4"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "2e7573632e6454cf6b99d7aac4ccca54be06da05aca2ef7423d22d27d4d4bcd8"
++dependencies = [
++ "libc",
++ "rand_chacha",
++ "rand_core",
++ "rand_hc",
++]
++
++[[package]]
++name = "rand_chacha"
++version = "0.3.1"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88"
++dependencies = [
++ "ppv-lite86",
++ "rand_core",
++]
++
++[[package]]
++name = "rand_core"
++version = "0.6.3"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "d34f1408f55294453790c48b2f1ebbb1c5b4b7563eb1f418bcfcfdbb06ebb4e7"
++dependencies = [
++ "getrandom",
++]
++
++[[package]]
++name = "rand_hc"
++version = "0.3.1"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "d51e9f596de227fda2ea6c84607f5558e196eeaf43c986b724ba4fb8fdf497e7"
++dependencies = [
++ "rand_core",
++]
++
++[[package]]
++name = "redox_syscall"
++version = "0.2.10"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "8383f39639269cde97d255a32bdb68c047337295414940c68bdd30c2e13203ff"
++dependencies = [
++ "bitflags",
++]
++
++[[package]]
++name = "redox_users"
++version = "0.4.0"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "528532f3d801c87aec9def2add9ca802fe569e44a544afe633765267840abe64"
++dependencies = [
++ "getrandom",
++ "redox_syscall",
++]
++
++[[package]]
++name = "regex"
++version = "1.5.4"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "d07a8629359eb56f1e2fb1652bb04212c072a87ba68546a04065d525673ac461"
++dependencies = [
++ "aho-corasick",
++ "memchr",
++ "regex-syntax",
++]
++
++[[package]]
++name = "regex-syntax"
++version = "0.6.25"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "f497285884f3fcff424ffc933e56d7cbca511def0c9831a7f9b5f6153e3cc89b"
++
++[[package]]
++name = "ryu"
++version = "1.0.5"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "71d301d4193d031abdd79ff7e3dd721168a9572ef3fe51a1517aba235bd8f86e"
++
++[[package]]
++name = "schannel"
++version = "0.1.19"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "8f05ba609c234e60bee0d547fe94a4c7e9da733d1c962cf6e59efa4cd9c8bc75"
++dependencies = [
++ "lazy_static",
++ "winapi",
++]
++
++[[package]]
++name = "serde"
++version = "1.0.130"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "f12d06de37cf59146fbdecab66aa99f9fe4f78722e3607577a5375d66bd0c913"
++dependencies = [
++ "serde_derive",
++]
++
++[[package]]
++name = "serde_derive"
++version = "1.0.130"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "d7bc1a1ab1961464eae040d96713baa5a724a8152c1222492465b54322ec508b"
++dependencies = [
++ "proc-macro2",
++ "quote",
++ "syn",
++]
++
++[[package]]
++name = "serde_json"
++version = "1.0.69"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "e466864e431129c7e0d3476b92f20458e5879919a0596c6472738d9fa2d342f8"
++dependencies = [
++ "itoa",
++ "ryu",
++ "serde",
++]
++
++[[package]]
++name = "slab"
++version = "0.4.5"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "9def91fd1e018fe007022791f865d0ccc9b3a0d5001e01aabb8b40e46000afb5"
++
++[[package]]
++name = "sluice"
++version = "0.5.5"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "6d7400c0eff44aa2fcb5e31a5f24ba9716ed90138769e4977a2ba6014ae63eb5"
++dependencies = [
++ "async-channel",
++ "futures-core",
++ "futures-io",
++]
++
++[[package]]
++name = "socket2"
++version = "0.4.2"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "5dc90fe6c7be1a323296982db1836d1ea9e47b6839496dde9a541bc496df3516"
++dependencies = [
++ "libc",
++ "winapi",
++]
++
++[[package]]
++name = "strum"
++version = "0.18.0"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "57bd81eb48f4c437cadc685403cad539345bf703d78e63707418431cecd4522b"
++
++[[package]]
++name = "strum_macros"
++version = "0.18.0"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "87c85aa3f8ea653bfd3ddf25f7ee357ee4d204731f6aa9ad04002306f6e2774c"
++dependencies = [
++ "heck",
++ "proc-macro2",
++ "quote",
++ "syn",
++]
++
++[[package]]
++name = "syn"
++version = "1.0.81"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "f2afee18b8beb5a596ecb4a2dce128c719b4ba399d34126b9e4396e3f9860966"
++dependencies = [
++ "proc-macro2",
++ "quote",
++ "unicode-xid",
++]
++
++[[package]]
++name = "system-deps"
++version = "1.3.2"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "0f3ecc17269a19353b3558b313bba738b25d82993e30d62a18406a24aba4649b"
++dependencies = [
++ "heck",
++ "pkg-config",
++ "strum",
++ "strum_macros",
++ "thiserror",
++ "toml",
++ "version-compare",
++]
++
++[[package]]
++name = "thiserror"
++version = "1.0.30"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "854babe52e4df1653706b98fcfc05843010039b406875930a70e4d9644e5c417"
++dependencies = [
++ "thiserror-impl",
++]
++
++[[package]]
++name = "thiserror-impl"
++version = "1.0.30"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "aa32fd3f627f367fe16f893e2597ae3c05020f8bba2666a4e6ea73d377e5714b"
++dependencies = [
++ "proc-macro2",
++ "quote",
++ "syn",
++]
++
++[[package]]
++name = "time"
++version = "0.1.43"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "ca8a50ef2360fbd1eeb0ecd46795a87a19024eb4b53c5dc916ca1fd95fe62438"
++dependencies = [
++ "libc",
++ "winapi",
++]
++
++[[package]]
++name = "tinyvec"
++version = "1.5.1"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "2c1c1d5a42b6245520c249549ec267180beaffcc0615401ac8e31853d4b6d8d2"
++dependencies = [
++ "tinyvec_macros",
++]
++
++[[package]]
++name = "tinyvec_macros"
++version = "0.1.0"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c"
++
++[[package]]
++name = "toml"
++version = "0.5.8"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "a31142970826733df8241ef35dc040ef98c679ab14d7c3e54d827099b3acecaa"
++dependencies = [
++ "serde",
++]
++
++[[package]]
++name = "tracing"
++version = "0.1.29"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "375a639232caf30edfc78e8d89b2d4c375515393e7af7e16f01cd96917fb2105"
++dependencies = [
++ "cfg-if",
++ "log",
++ "pin-project-lite",
++ "tracing-attributes",
++ "tracing-core",
++]
++
++[[package]]
++name = "tracing-attributes"
++version = "0.1.18"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "f4f480b8f81512e825f337ad51e94c1eb5d3bbdf2b363dcd01e2b19a9ffe3f8e"
++dependencies = [
++ "proc-macro2",
++ "quote",
++ "syn",
++]
++
++[[package]]
++name = "tracing-core"
++version = "0.1.21"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "1f4ed65637b8390770814083d20756f87bfa2c21bf2f110babdc5438351746e4"
++dependencies = [
++ "lazy_static",
++]
++
++[[package]]
++name = "tracing-futures"
++version = "0.2.5"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "97d095ae15e245a057c8e8451bab9b3ee1e1f68e9ba2b4fbc18d0ac5237835f2"
++dependencies = [
++ "pin-project",
++ "tracing",
++]
++
++[[package]]
++name = "unicode-bidi"
++version = "0.3.7"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "1a01404663e3db436ed2746d9fefef640d868edae3cceb81c3b8d5732fda678f"
++
++[[package]]
++name = "unicode-normalization"
++version = "0.1.19"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "d54590932941a9e9266f0832deed84ebe1bf2e4c9e4a3554d393d18f5e854bf9"
++dependencies = [
++ "tinyvec",
++]
++
++[[package]]
++name = "unicode-segmentation"
++version = "1.8.0"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "8895849a949e7845e06bd6dc1aa51731a103c42707010a5b591c0038fb73385b"
++
++[[package]]
++name = "unicode-xid"
++version = "0.2.2"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "8ccb82d61f80a663efe1f787a51b16b5a51e3314d6ac365b08639f52387b33f3"
++
++[[package]]
++name = "url"
++version = "2.2.2"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "a507c383b2d33b5fc35d1861e77e6b383d158b2da5e14fe51b83dfedf6fd578c"
++dependencies = [
++ "form_urlencoded",
++ "idna",
++ "matches",
++ "percent-encoding",
++]
++
++[[package]]
++name = "urlqstring"
++version = "0.3.5"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "25ef3473a06a065718d8ec7cd7acc6a35fc20f836dee7661ad3b64ea3cc2e0cc"
++
++[[package]]
++name = "value-bag"
++version = "1.0.0-alpha.8"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "79923f7731dc61ebfba3633098bf3ac533bbd35ccd8c57e7088d9a5eebe0263f"
++dependencies = [
++ "ctor",
++ "version_check",
++]
++
++[[package]]
++name = "vcpkg"
++version = "0.2.15"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426"
++
++[[package]]
++name = "version-compare"
++version = "0.0.10"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "d63556a25bae6ea31b52e640d7c41d1ab27faba4ccb600013837a3d0b3994ca1"
++
++[[package]]
++name = "version_check"
++version = "0.9.3"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "5fecdca9a5291cc2b8dcf7dc02453fee791a280f3743cb0905f8822ae463b3fe"
++
++[[package]]
++name = "waker-fn"
++version = "1.1.0"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "9d5b2c62b4012a3e1eca5a7e077d13b3bf498c4073e33ccd58626607748ceeca"
++
++[[package]]
++name = "wasi"
++version = "0.10.2+wasi-snapshot-preview1"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "fd6fbd9a79829dd1ad0cc20627bf1ed606756a7f77edff7b66b7064f9cb327c6"
++
++[[package]]
++name = "wasm-bindgen"
++version = "0.2.78"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "632f73e236b219150ea279196e54e610f5dbafa5d61786303d4da54f84e47fce"
++dependencies = [
++ "cfg-if",
++ "wasm-bindgen-macro",
++]
++
++[[package]]
++name = "wasm-bindgen-backend"
++version = "0.2.78"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "a317bf8f9fba2476b4b2c85ef4c4af8ff39c3c7f0cdfeed4f82c34a880aa837b"
++dependencies = [
++ "bumpalo",
++ "lazy_static",
++ "log",
++ "proc-macro2",
++ "quote",
++ "syn",
++ "wasm-bindgen-shared",
++]
++
++[[package]]
++name = "wasm-bindgen-futures"
++version = "0.4.28"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "8e8d7523cb1f2a4c96c1317ca690031b714a51cc14e05f712446691f413f5d39"
++dependencies = [
++ "cfg-if",
++ "js-sys",
++ "wasm-bindgen",
++ "web-sys",
++]
++
++[[package]]
++name = "wasm-bindgen-macro"
++version = "0.2.78"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "d56146e7c495528bf6587663bea13a8eb588d39b36b679d83972e1a2dbbdacf9"
++dependencies = [
++ "quote",
++ "wasm-bindgen-macro-support",
++]
++
++[[package]]
++name = "wasm-bindgen-macro-support"
++version = "0.2.78"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "7803e0eea25835f8abdc585cd3021b3deb11543c6fe226dcd30b228857c5c5ab"
++dependencies = [
++ "proc-macro2",
++ "quote",
++ "syn",
++ "wasm-bindgen-backend",
++ "wasm-bindgen-shared",
++]
++
++[[package]]
++name = "wasm-bindgen-shared"
++version = "0.2.78"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "0237232789cf037d5480773fe568aac745bfe2afbc11a863e97901780a6b47cc"
++
++[[package]]
++name = "web-sys"
++version = "0.3.55"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "38eb105f1c59d9eaa6b5cdc92b859d85b926e82cb2e0945cd0c9259faa6fe9fb"
++dependencies = [
++ "js-sys",
++ "wasm-bindgen",
++]
++
++[[package]]
++name = "wepoll-ffi"
++version = "0.1.2"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "d743fdedc5c64377b5fc2bc036b01c7fd642205a0d96356034ae3404d49eb7fb"
++dependencies = [
++ "cc",
++]
++
++[[package]]
++name = "winapi"
++version = "0.3.9"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419"
++dependencies = [
++ "winapi-i686-pc-windows-gnu",
++ "winapi-x86_64-pc-windows-gnu",
++]
++
++[[package]]
++name = "winapi-i686-pc-windows-gnu"
++version = "0.4.0"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
++
++[[package]]
++name = "winapi-x86_64-pc-windows-gnu"
++version = "0.4.0"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
++
++[[package]]
++name = "xdg"
++version = "2.4.0"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "3a23fe958c70412687039c86f578938b4a0bb50ec788e96bce4d6ab00ddd5803"
++dependencies = [
++ "dirs 3.0.2",
++]
diff --git a/pkgs/applications/audio/netease-cloud-music-gtk/default.nix b/pkgs/applications/audio/netease-cloud-music-gtk/default.nix
new file mode 100644
index 00000000000..72027fe922b
--- /dev/null
+++ b/pkgs/applications/audio/netease-cloud-music-gtk/default.nix
@@ -0,0 +1,60 @@
+{ lib
+, stdenv
+, glib
+, gtk3
+, curl
+, dbus
+, openssl
+, gst_all_1
+, pkg-config
+, rustPlatform
+, wrapGAppsHook
+, fetchurl
+, fetchFromGitHub
+}:
+rustPlatform.buildRustPackage rec {
+  pname = "netease-cloud-music-gtk";
+  version = "1.2.2";
+  src = fetchFromGitHub {
+    owner = "gmg137";
+    repo = "netease-cloud-music-gtk";
+    rev = version;
+    sha256 = "sha256-42MaylfG5LY+TiYHWQMoh9CiVLShKXSBpMrxdWhujow=";
+  };
+  cargoSha256 = "sha256-A9wIcESdaJwLY4g/QlOxMU5PBB9wjvIzaXBSqeiRJBM=";
+  cargoPatches = [ ./cargo-lock.patch ];
+
+  nativeBuildInputs = [
+    glib
+    gtk3
+    dbus
+    pkg-config
+    wrapGAppsHook
+  ];
+
+  buildInputs = [
+    glib
+    gtk3
+    curl
+    dbus
+    openssl
+  ] ++ (with gst_all_1; [
+    gstreamer
+    gst-plugins-base
+    gst-plugins-good
+    gst-plugins-bad
+    gst-plugins-ugly
+  ]);
+
+  postPatch = ''
+    install -D netease-cloud-music-gtk.desktop $out/share/applications/netease-cloud-music-gtk.desktop
+    install -D icons/netease-cloud-music-gtk.svg $out/share/icons/hicolor/scalable/apps/netease-cloud-music-gtk.svg
+  '';
+
+  meta = with lib; {
+    description = "netease-cloud-music-gtk is a Rust + GTK based netease cloud music player";
+    homepage = "https://github.com/gmg137/netease-cloud-music-gtk";
+    license = licenses.gpl3Plus;
+    maintainers = with maintainers; [ diffumist ];
+  };
+}
diff --git a/pkgs/applications/audio/netease-cloud-music-gtk/update-cargo-lock.sh b/pkgs/applications/audio/netease-cloud-music-gtk/update-cargo-lock.sh
new file mode 100755
index 00000000000..75b04d1e77c
--- /dev/null
+++ b/pkgs/applications/audio/netease-cloud-music-gtk/update-cargo-lock.sh
@@ -0,0 +1,20 @@
+#!/usr/bin/env nix-shell
+#!nix-shell -i bash -p coreutils ripgrep git cargo
+
+# Ref: https://github.com/NixOS/nixpkgs/blob/nixos-21.05/pkgs/applications/audio/netease-music-tui/update-cargo-lock.sh
+
+set -eu -vx
+
+here=$PWD
+version=$(cat default.nix | rg '^  version = "' | cut -d '"' -f 2)
+checkout=$(mktemp -d)
+
+git clone -b "$version" --depth=1 https://github.com/gmg137/netease-cloud-music-gtk "$checkout"
+cd "$checkout"
+
+cargo generate-lockfile
+git add -f Cargo.lock
+git diff HEAD -- Cargo.lock > "$here"/cargo-lock.patch
+
+cd "$here"
+rm -rf "$checkout"
diff --git a/pkgs/applications/audio/netease-music-tui/cargo-lock.patch b/pkgs/applications/audio/netease-music-tui/cargo-lock.patch
new file mode 100644
index 00000000000..f47c233d6ae
--- /dev/null
+++ b/pkgs/applications/audio/netease-music-tui/cargo-lock.patch
@@ -0,0 +1,2655 @@
+diff --git a/Cargo.lock b/Cargo.lock
+new file mode 100644
+index 0000000..f191345
+--- /dev/null
++++ b/Cargo.lock
+@@ -0,0 +1,2649 @@
++# This file is automatically @generated by Cargo.
++# It is not intended for manual editing.
++[[package]]
++name = "addr2line"
++version = "0.14.1"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "a55f82cfe485775d02112886f4169bde0c5894d75e79ead7eafe7e40a25e45f7"
++dependencies = [
++ "gimli",
++]
++
++[[package]]
++name = "adler"
++version = "1.0.2"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe"
++
++[[package]]
++name = "aho-corasick"
++version = "0.7.15"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "7404febffaa47dac81aa44dba71523c9d069b1bdc50a77db41195149e17f68e5"
++dependencies = [
++ "memchr",
++]
++
++[[package]]
++name = "alsa"
++version = "0.5.0"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "75c4da790adcb2ce5e758c064b4f3ec17a30349f9961d3e5e6c9688b052a9e18"
++dependencies = [
++ "alsa-sys",
++ "bitflags",
++ "libc",
++ "nix",
++]
++
++[[package]]
++name = "alsa-sys"
++version = "0.3.1"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "db8fee663d06c4e303404ef5f40488a53e062f89ba8bfed81f42325aafad1527"
++dependencies = [
++ "libc",
++ "pkg-config",
++]
++
++[[package]]
++name = "arrayref"
++version = "0.3.6"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "a4c527152e37cf757a3f78aae5a06fbeefdb07ccc535c980a3208ee3060dd544"
++
++[[package]]
++name = "arrayvec"
++version = "0.5.2"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b"
++
++[[package]]
++name = "async-compression"
++version = "0.3.7"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "b72c1f1154e234325b50864a349b9c8e56939e266a4c307c0f159812df2f9537"
++dependencies = [
++ "bytes 0.5.6",
++ "flate2",
++ "futures-core",
++ "memchr",
++ "pin-project-lite 0.2.6",
++]
++
++[[package]]
++name = "autocfg"
++version = "1.0.1"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a"
++
++[[package]]
++name = "backtrace"
++version = "0.3.56"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "9d117600f438b1707d4e4ae15d3595657288f8235a0eb593e80ecc98ab34e1bc"
++dependencies = [
++ "addr2line",
++ "cfg-if 1.0.0",
++ "libc",
++ "miniz_oxide",
++ "object",
++ "rustc-demangle",
++]
++
++[[package]]
++name = "base-x"
++version = "0.2.8"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "a4521f3e3d031370679b3b140beb36dfe4801b09ac77e30c61941f97df3ef28b"
++
++[[package]]
++name = "base64"
++version = "0.11.0"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "b41b7ea54a0c9d92199de89e20e58d49f02f8e699814ef3fdf266f6f748d15c7"
++
++[[package]]
++name = "base64"
++version = "0.13.0"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd"
++
++[[package]]
++name = "bindgen"
++version = "0.56.0"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "2da379dbebc0b76ef63ca68d8fc6e71c0f13e59432e0987e508c1820e6ab5239"
++dependencies = [
++ "bitflags",
++ "cexpr",
++ "clang-sys",
++ "lazy_static 1.4.0",
++ "lazycell",
++ "peeking_take_while",
++ "proc-macro2",
++ "quote",
++ "regex",
++ "rustc-hash",
++ "shlex",
++]
++
++[[package]]
++name = "bitflags"
++version = "1.2.1"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693"
++
++[[package]]
++name = "blake2b_simd"
++version = "0.5.11"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "afa748e348ad3be8263be728124b24a24f268266f6f5d58af9d75f6a40b5c587"
++dependencies = [
++ "arrayref",
++ "arrayvec",
++ "constant_time_eq",
++]
++
++[[package]]
++name = "bumpalo"
++version = "3.6.1"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "63396b8a4b9de3f4fdfb320ab6080762242f66a8ef174c49d8e19b674db4cdbe"
++
++[[package]]
++name = "byteorder"
++version = "1.4.3"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610"
++
++[[package]]
++name = "bytes"
++version = "0.4.12"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "206fdffcfa2df7cbe15601ef46c813fce0965eb3286db6b56c583b814b51c81c"
++dependencies = [
++ "byteorder",
++ "iovec",
++]
++
++[[package]]
++name = "bytes"
++version = "0.5.6"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "0e4cec68f03f32e44924783795810fa50a7035d8c8ebe78580ad7e6c703fba38"
++
++[[package]]
++name = "bytes"
++version = "1.0.1"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "b700ce4376041dcd0a327fd0097c41095743c4c8af8887265942faf1100bd040"
++
++[[package]]
++name = "cassowary"
++version = "0.3.0"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "df8670b8c7b9dae1793364eafadf7239c40d669904660c5960d74cfd80b46a53"
++
++[[package]]
++name = "cc"
++version = "1.0.67"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "e3c69b077ad434294d3ce9f1f6143a2a4b89a8a2d54ef813d85003a4fd1137fd"
++dependencies = [
++ "jobserver",
++]
++
++[[package]]
++name = "cesu8"
++version = "1.1.0"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "6d43a04d8753f35258c91f8ec639f792891f748a1edbd759cf1dcea3382ad83c"
++
++[[package]]
++name = "cexpr"
++version = "0.4.0"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "f4aedb84272dbe89af497cf81375129abda4fc0a9e7c5d317498c15cc30c0d27"
++dependencies = [
++ "nom 5.1.2",
++]
++
++[[package]]
++name = "cfg-if"
++version = "0.1.10"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822"
++
++[[package]]
++name = "cfg-if"
++version = "1.0.0"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
++
++[[package]]
++name = "chrono"
++version = "0.4.19"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "670ad68c9088c2a963aaa298cb369688cf3f9465ce5e2d4ca10e6e0098a1ce73"
++dependencies = [
++ "libc",
++ "num-integer",
++ "num-traits 0.2.14",
++ "time 0.1.43",
++ "winapi 0.3.9",
++]
++
++[[package]]
++name = "clang-sys"
++version = "1.1.1"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "f54d78e30b388d4815220c8dd03fea5656b6c6d32adb59e89061552a102f8da1"
++dependencies = [
++ "glob",
++ "libc",
++ "libloading",
++]
++
++[[package]]
++name = "claxon"
++version = "0.4.3"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "4bfbf56724aa9eca8afa4fcfadeb479e722935bb2a0900c2d37e0cc477af0688"
++
++[[package]]
++name = "combine"
++version = "4.5.2"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "cc4369b5e4c0cddf64ad8981c0111e7df4f7078f4d6ba98fb31f2e17c4c57b7e"
++dependencies = [
++ "bytes 1.0.1",
++ "memchr",
++]
++
++[[package]]
++name = "config"
++version = "0.9.3"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "f9107d78ed62b3fa5a86e7d18e647abed48cfd8f8fab6c72f4cdb982d196f7e6"
++dependencies = [
++ "lazy_static 1.4.0",
++ "nom 4.2.3",
++ "rust-ini",
++ "serde 1.0.125",
++ "serde-hjson",
++ "serde_json",
++ "toml 0.4.10",
++ "yaml-rust",
++]
++
++[[package]]
++name = "const_fn"
++version = "0.4.6"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "076a6803b0dacd6a88cfe64deba628b01533ff5ef265687e6938280c1afd0a28"
++
++[[package]]
++name = "constant_time_eq"
++version = "0.1.5"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc"
++
++[[package]]
++name = "cookie"
++version = "0.14.4"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "03a5d7b21829bc7b4bf4754a978a241ae54ea55a40f92bb20216e54096f4b951"
++dependencies = [
++ "percent-encoding",
++ "time 0.2.26",
++ "version_check 0.9.3",
++]
++
++[[package]]
++name = "cookie_store"
++version = "0.12.0"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "3818dfca4b0cb5211a659bbcbb94225b7127407b2b135e650d717bfb78ab10d3"
++dependencies = [
++ "cookie",
++ "idna",
++ "log",
++ "publicsuffix",
++ "serde 1.0.125",
++ "serde_json",
++ "time 0.2.26",
++ "url",
++]
++
++[[package]]
++name = "core-foundation"
++version = "0.9.1"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "0a89e2ae426ea83155dccf10c0fa6b1463ef6d5fcb44cee0b224a408fa640a62"
++dependencies = [
++ "core-foundation-sys 0.8.2",
++ "libc",
++]
++
++[[package]]
++name = "core-foundation-sys"
++version = "0.6.2"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "e7ca8a5221364ef15ce201e8ed2f609fc312682a8f4e0e3d4aa5879764e0fa3b"
++
++[[package]]
++name = "core-foundation-sys"
++version = "0.8.2"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "ea221b5284a47e40033bf9b66f35f984ec0ea2931eb03505246cd27a963f981b"
++
++[[package]]
++name = "coreaudio-rs"
++version = "0.10.0"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "11894b20ebfe1ff903cbdc52259693389eea03b94918a2def2c30c3bf227ad88"
++dependencies = [
++ "bitflags",
++ "coreaudio-sys",
++]
++
++[[package]]
++name = "coreaudio-sys"
++version = "0.2.8"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "2b7e3347be6a09b46aba228d6608386739fb70beff4f61e07422da87b0bb31fa"
++dependencies = [
++ "bindgen",
++]
++
++[[package]]
++name = "cpal"
++version = "0.13.3"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "8351ddf2aaa3c583fa388029f8b3d26f3c7035a20911fdd5f2e2ed7ab57dad25"
++dependencies = [
++ "alsa",
++ "core-foundation-sys 0.6.2",
++ "coreaudio-rs",
++ "jni",
++ "js-sys",
++ "lazy_static 1.4.0",
++ "libc",
++ "mach",
++ "ndk",
++ "ndk-glue",
++ "nix",
++ "oboe",
++ "parking_lot",
++ "stdweb 0.1.3",
++ "thiserror",
++ "web-sys",
++ "winapi 0.3.9",
++]
++
++[[package]]
++name = "crc32fast"
++version = "1.2.1"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "81156fece84ab6a9f2afdb109ce3ae577e42b1228441eded99bd77f627953b1a"
++dependencies = [
++ "cfg-if 1.0.0",
++]
++
++[[package]]
++name = "crossbeam-utils"
++version = "0.8.3"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "e7e9d99fa91428effe99c5c6d4634cdeba32b8cf784fc428a2a687f61a952c49"
++dependencies = [
++ "autocfg",
++ "cfg-if 1.0.0",
++ "lazy_static 1.4.0",
++]
++
++[[package]]
++name = "darling"
++version = "0.10.2"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "0d706e75d87e35569db781a9b5e2416cff1236a47ed380831f959382ccd5f858"
++dependencies = [
++ "darling_core",
++ "darling_macro",
++]
++
++[[package]]
++name = "darling_core"
++version = "0.10.2"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "f0c960ae2da4de88a91b2d920c2a7233b400bc33cb28453a2987822d8392519b"
++dependencies = [
++ "fnv",
++ "ident_case",
++ "proc-macro2",
++ "quote",
++ "strsim",
++ "syn",
++]
++
++[[package]]
++name = "darling_macro"
++version = "0.10.2"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "d9b5a2f4ac4969822c62224815d069952656cadc7084fdca9751e6d959189b72"
++dependencies = [
++ "darling_core",
++ "quote",
++ "syn",
++]
++
++[[package]]
++name = "dbus"
++version = "0.7.1"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "add8dd36d6d34a084220eb9fe216d3e230d52b37c31702e1ffda4fb2d4ef950e"
++dependencies = [
++ "libc",
++ "libdbus-sys",
++]
++
++[[package]]
++name = "derivative"
++version = "2.2.0"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b"
++dependencies = [
++ "proc-macro2",
++ "quote",
++ "syn",
++]
++
++[[package]]
++name = "dirs"
++version = "2.0.2"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "13aea89a5c93364a98e9b37b2fa237effbb694d5cfe01c5b70941f7eb087d5e3"
++dependencies = [
++ "cfg-if 0.1.10",
++ "dirs-sys",
++]
++
++[[package]]
++name = "dirs-sys"
++version = "0.3.5"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "8e93d7f5705de3e49895a2b5e0b8855a1c27f080192ae9c32a6432d50741a57a"
++dependencies = [
++ "libc",
++ "redox_users",
++ "winapi 0.3.9",
++]
++
++[[package]]
++name = "discard"
++version = "1.0.4"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "212d0f5754cb6769937f4501cc0e67f4f4483c8d2c3e1e922ee9edbe4ab4c7c0"
++
++[[package]]
++name = "dtoa"
++version = "0.4.8"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "56899898ce76aaf4a0f24d914c97ea6ed976d42fec6ad33fcbb0a1103e07b2b0"
++
++[[package]]
++name = "either"
++version = "1.6.1"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457"
++
++[[package]]
++name = "encoding_rs"
++version = "0.8.28"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "80df024fbc5ac80f87dfef0d9f5209a252f2a497f7f42944cff24d8253cac065"
++dependencies = [
++ "cfg-if 1.0.0",
++]
++
++[[package]]
++name = "failure"
++version = "0.1.8"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "d32e9bd16cc02eae7db7ef620b392808b89f6a5e16bb3497d159c6b92a0f4f86"
++dependencies = [
++ "backtrace",
++ "failure_derive",
++]
++
++[[package]]
++name = "failure_derive"
++version = "0.1.8"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "aa4da3c766cd7a0db8242e326e9e4e081edd567072893ed320008189715366a4"
++dependencies = [
++ "proc-macro2",
++ "quote",
++ "syn",
++ "synstructure",
++]
++
++[[package]]
++name = "flate2"
++version = "1.0.20"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "cd3aec53de10fe96d7d8c565eb17f2c687bb5518a2ec453b5b1252964526abe0"
++dependencies = [
++ "cfg-if 1.0.0",
++ "crc32fast",
++ "libc",
++ "miniz_oxide",
++]
++
++[[package]]
++name = "fnv"
++version = "1.0.7"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1"
++
++[[package]]
++name = "foreign-types"
++version = "0.3.2"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1"
++dependencies = [
++ "foreign-types-shared",
++]
++
++[[package]]
++name = "foreign-types-shared"
++version = "0.1.1"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b"
++
++[[package]]
++name = "form_urlencoded"
++version = "1.0.1"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "5fc25a87fa4fd2094bffb06925852034d90a17f0d1e05197d4956d3555752191"
++dependencies = [
++ "matches",
++ "percent-encoding",
++]
++
++[[package]]
++name = "fuchsia-zircon"
++version = "0.3.3"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82"
++dependencies = [
++ "bitflags",
++ "fuchsia-zircon-sys",
++]
++
++[[package]]
++name = "fuchsia-zircon-sys"
++version = "0.3.3"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7"
++
++[[package]]
++name = "futures"
++version = "0.3.13"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "7f55667319111d593ba876406af7c409c0ebb44dc4be6132a783ccf163ea14c1"
++dependencies = [
++ "futures-channel",
++ "futures-core",
++ "futures-executor",
++ "futures-io",
++ "futures-sink",
++ "futures-task",
++ "futures-util",
++]
++
++[[package]]
++name = "futures-channel"
++version = "0.3.13"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "8c2dd2df839b57db9ab69c2c9d8f3e8c81984781937fe2807dc6dcf3b2ad2939"
++dependencies = [
++ "futures-core",
++ "futures-sink",
++]
++
++[[package]]
++name = "futures-core"
++version = "0.3.13"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "15496a72fabf0e62bdc3df11a59a3787429221dd0710ba8ef163d6f7a9112c94"
++
++[[package]]
++name = "futures-executor"
++version = "0.3.13"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "891a4b7b96d84d5940084b2a37632dd65deeae662c114ceaa2c879629c9c0ad1"
++dependencies = [
++ "futures-core",
++ "futures-task",
++ "futures-util",
++]
++
++[[package]]
++name = "futures-io"
++version = "0.3.13"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "d71c2c65c57704c32f5241c1223167c2c3294fd34ac020c807ddbe6db287ba59"
++
++[[package]]
++name = "futures-macro"
++version = "0.3.13"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "ea405816a5139fb39af82c2beb921d52143f556038378d6db21183a5c37fbfb7"
++dependencies = [
++ "proc-macro-hack",
++ "proc-macro2",
++ "quote",
++ "syn",
++]
++
++[[package]]
++name = "futures-sink"
++version = "0.3.13"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "85754d98985841b7d4f5e8e6fbfa4a4ac847916893ec511a2917ccd8525b8bb3"
++
++[[package]]
++name = "futures-task"
++version = "0.3.13"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "fa189ef211c15ee602667a6fcfe1c1fd9e07d42250d2156382820fba33c9df80"
++
++[[package]]
++name = "futures-util"
++version = "0.3.13"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "1812c7ab8aedf8d6f2701a43e1243acdbcc2b36ab26e2ad421eb99ac963d96d1"
++dependencies = [
++ "futures-channel",
++ "futures-core",
++ "futures-io",
++ "futures-macro",
++ "futures-sink",
++ "futures-task",
++ "memchr",
++ "pin-project-lite 0.2.6",
++ "pin-utils",
++ "proc-macro-hack",
++ "proc-macro-nested",
++ "slab",
++]
++
++[[package]]
++name = "getrandom"
++version = "0.1.16"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce"
++dependencies = [
++ "cfg-if 1.0.0",
++ "libc",
++ "wasi 0.9.0+wasi-snapshot-preview1",
++]
++
++[[package]]
++name = "getrandom"
++version = "0.2.2"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "c9495705279e7140bf035dde1f6e750c162df8b625267cd52cc44e0b156732c8"
++dependencies = [
++ "cfg-if 1.0.0",
++ "libc",
++ "wasi 0.10.2+wasi-snapshot-preview1",
++]
++
++[[package]]
++name = "gimli"
++version = "0.23.0"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "f6503fe142514ca4799d4c26297c4248239fe8838d827db6bd6065c6ed29a6ce"
++
++[[package]]
++name = "glob"
++version = "0.3.0"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "9b919933a397b79c37e33b77bb2aa3dc8eb6e165ad809e58ff75bc7db2e34574"
++
++[[package]]
++name = "h2"
++version = "0.2.7"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "5e4728fd124914ad25e99e3d15a9361a879f6620f63cb56bbb08f95abb97a535"
++dependencies = [
++ "bytes 0.5.6",
++ "fnv",
++ "futures-core",
++ "futures-sink",
++ "futures-util",
++ "http",
++ "indexmap",
++ "slab",
++ "tokio",
++ "tokio-util",
++ "tracing",
++ "tracing-futures",
++]
++
++[[package]]
++name = "hashbrown"
++version = "0.9.1"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "d7afe4a420e3fe79967a00898cc1f4db7c8a49a9333a29f8a4bd76a253d5cd04"
++
++[[package]]
++name = "hermit-abi"
++version = "0.1.18"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "322f4de77956e22ed0e5032c359a0f1273f1f7f0d79bfa3b8ffbc730d7fbcc5c"
++dependencies = [
++ "libc",
++]
++
++[[package]]
++name = "hex"
++version = "0.4.3"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70"
++
++[[package]]
++name = "hound"
++version = "3.4.0"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "8a164bb2ceaeff4f42542bdb847c41517c78a60f5649671b2a07312b6e117549"
++
++[[package]]
++name = "http"
++version = "0.2.3"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "7245cd7449cc792608c3c8a9eaf69bd4eabbabf802713748fd739c98b82f0747"
++dependencies = [
++ "bytes 1.0.1",
++ "fnv",
++ "itoa",
++]
++
++[[package]]
++name = "http-body"
++version = "0.3.1"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "13d5ff830006f7646652e057693569bfe0d51760c0085a071769d142a205111b"
++dependencies = [
++ "bytes 0.5.6",
++ "http",
++]
++
++[[package]]
++name = "httparse"
++version = "1.3.5"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "615caabe2c3160b313d52ccc905335f4ed5f10881dd63dc5699d47e90be85691"
++
++[[package]]
++name = "httpdate"
++version = "0.3.2"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "494b4d60369511e7dea41cf646832512a94e542f68bb9c49e54518e0f468eb47"
++
++[[package]]
++name = "hyper"
++version = "0.13.10"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "8a6f157065790a3ed2f88679250419b5cdd96e714a0d65f7797fd337186e96bb"
++dependencies = [
++ "bytes 0.5.6",
++ "futures-channel",
++ "futures-core",
++ "futures-util",
++ "h2",
++ "http",
++ "http-body",
++ "httparse",
++ "httpdate",
++ "itoa",
++ "pin-project",
++ "socket2",
++ "tokio",
++ "tower-service",
++ "tracing",
++ "want",
++]
++
++[[package]]
++name = "hyper-tls"
++version = "0.4.3"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "d979acc56dcb5b8dddba3917601745e877576475aa046df3226eabdecef78eed"
++dependencies = [
++ "bytes 0.5.6",
++ "hyper",
++ "native-tls",
++ "tokio",
++ "tokio-tls",
++]
++
++[[package]]
++name = "ident_case"
++version = "1.0.1"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39"
++
++[[package]]
++name = "idna"
++version = "0.2.2"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "89829a5d69c23d348314a7ac337fe39173b61149a9864deabd260983aed48c21"
++dependencies = [
++ "matches",
++ "unicode-bidi",
++ "unicode-normalization",
++]
++
++[[package]]
++name = "indexmap"
++version = "1.6.2"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "824845a0bf897a9042383849b02c1bc219c2383772efcd5c6f9766fa4b81aef3"
++dependencies = [
++ "autocfg",
++ "hashbrown",
++]
++
++[[package]]
++name = "instant"
++version = "0.1.9"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "61124eeebbd69b8190558df225adf7e4caafce0d743919e5d6b19652314ec5ec"
++dependencies = [
++ "cfg-if 1.0.0",
++]
++
++[[package]]
++name = "iovec"
++version = "0.1.4"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "b2b3ea6ff95e175473f8ffe6a7eb7c00d054240321b84c57051175fe3c1e075e"
++dependencies = [
++ "libc",
++]
++
++[[package]]
++name = "ipnet"
++version = "2.3.0"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "47be2f14c678be2fdcab04ab1171db51b2762ce6f0a8ee87c8dd4a04ed216135"
++
++[[package]]
++name = "itertools"
++version = "0.8.2"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "f56a2d0bc861f9165be4eb3442afd3c236d8a98afd426f65d92324ae1091a484"
++dependencies = [
++ "either",
++]
++
++[[package]]
++name = "itoa"
++version = "0.4.7"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "dd25036021b0de88a0aff6b850051563c6516d0bf53f8638938edbb9de732736"
++
++[[package]]
++name = "jni"
++version = "0.18.0"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "24967112a1e4301ca5342ea339763613a37592b8a6ce6cf2e4494537c7a42faf"
++dependencies = [
++ "cesu8",
++ "combine",
++ "jni-sys",
++ "log",
++ "thiserror",
++ "walkdir",
++]
++
++[[package]]
++name = "jni-sys"
++version = "0.3.0"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "8eaf4bc02d17cbdd7ff4c7438cafcdf7fb9a4613313ad11b4f8fefe7d3fa0130"
++
++[[package]]
++name = "jobserver"
++version = "0.1.21"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "5c71313ebb9439f74b00d9d2dcec36440beaf57a6aa0623068441dd7cd81a7f2"
++dependencies = [
++ "libc",
++]
++
++[[package]]
++name = "js-sys"
++version = "0.3.50"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "2d99f9e3e84b8f67f846ef5b4cbbc3b1c29f6c759fcbce6f01aa0e73d932a24c"
++dependencies = [
++ "wasm-bindgen",
++]
++
++[[package]]
++name = "kernel32-sys"
++version = "0.2.2"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d"
++dependencies = [
++ "winapi 0.2.8",
++ "winapi-build",
++]
++
++[[package]]
++name = "lazy_static"
++version = "0.2.11"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "76f033c7ad61445c5b347c7382dd1237847eb1bce590fe50365dcb33d546be73"
++
++[[package]]
++name = "lazy_static"
++version = "1.4.0"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
++
++[[package]]
++name = "lazycell"
++version = "1.3.0"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55"
++
++[[package]]
++name = "lewton"
++version = "0.10.2"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "777b48df9aaab155475a83a7df3070395ea1ac6902f5cd062b8f2b028075c030"
++dependencies = [
++ "byteorder",
++ "ogg",
++ "tinyvec",
++]
++
++[[package]]
++name = "libc"
++version = "0.2.92"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "56d855069fafbb9b344c0f962150cd2c1187975cb1c22c1522c240d8c4986714"
++
++[[package]]
++name = "libdbus-sys"
++version = "0.2.1"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "dc12a3bc971424edbbf7edaf6e5740483444db63aa8e23d3751ff12a30f306f0"
++dependencies = [
++ "pkg-config",
++]
++
++[[package]]
++name = "libloading"
++version = "0.7.0"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "6f84d96438c15fcd6c3f244c8fce01d1e2b9c6b5623e9c711dc9286d8fc92d6a"
++dependencies = [
++ "cfg-if 1.0.0",
++ "winapi 0.3.9",
++]
++
++[[package]]
++name = "linked-hash-map"
++version = "0.3.0"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "6d262045c5b87c0861b3f004610afd0e2c851e2908d08b6c870cbb9d5f494ecd"
++dependencies = [
++ "serde 0.8.23",
++ "serde_test",
++]
++
++[[package]]
++name = "linked-hash-map"
++version = "0.5.4"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "7fb9b38af92608140b86b693604b9ffcc5824240a484d1ecd4795bacb2fe88f3"
++
++[[package]]
++name = "lock_api"
++version = "0.4.2"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "dd96ffd135b2fd7b973ac026d28085defbe8983df057ced3eb4f2130b0831312"
++dependencies = [
++ "scopeguard",
++]
++
++[[package]]
++name = "log"
++version = "0.4.14"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "51b9bbe6c47d51fc3e1a9b945965946b4c44142ab8792c50835a980d362c2710"
++dependencies = [
++ "cfg-if 1.0.0",
++]
++
++[[package]]
++name = "log-panics"
++version = "2.0.0"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "ae0136257df209261daa18d6c16394757c63e032e27aafd8b07788b051082bef"
++dependencies = [
++ "log",
++]
++
++[[package]]
++name = "mach"
++version = "0.3.2"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "b823e83b2affd8f40a9ee8c29dbc56404c1e34cd2710921f2801e2cf29527afa"
++dependencies = [
++ "libc",
++]
++
++[[package]]
++name = "matches"
++version = "0.1.8"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "7ffc5c5338469d4d3ea17d269fa8ea3512ad247247c30bd2df69e68309ed0a08"
++
++[[package]]
++name = "memchr"
++version = "2.3.4"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "0ee1c47aaa256ecabcaea351eae4a9b01ef39ed810004e298d2511ed284b1525"
++
++[[package]]
++name = "mime"
++version = "0.3.16"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "2a60c7ce501c71e03a9c9c0d35b861413ae925bd979cc7a4e30d060069aaac8d"
++
++[[package]]
++name = "mime_guess"
++version = "2.0.3"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "2684d4c2e97d99848d30b324b00c8fcc7e5c897b7cbb5819b09e7c90e8baf212"
++dependencies = [
++ "mime",
++ "unicase",
++]
++
++[[package]]
++name = "minimp3"
++version = "0.5.1"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "985438f75febf74c392071a975a29641b420dd84431135a6e6db721de4b74372"
++dependencies = [
++ "minimp3-sys",
++ "slice-deque",
++ "thiserror",
++]
++
++[[package]]
++name = "minimp3-sys"
++version = "0.3.2"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "e21c73734c69dc95696c9ed8926a2b393171d98b3f5f5935686a26a487ab9b90"
++dependencies = [
++ "cc",
++]
++
++[[package]]
++name = "miniz_oxide"
++version = "0.4.4"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "a92518e98c078586bc6c934028adcca4c92a53d6a958196de835170a01d84e4b"
++dependencies = [
++ "adler",
++ "autocfg",
++]
++
++[[package]]
++name = "mio"
++version = "0.6.23"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "4afd66f5b91bf2a3bc13fad0e21caedac168ca4c707504e75585648ae80e4cc4"
++dependencies = [
++ "cfg-if 0.1.10",
++ "fuchsia-zircon",
++ "fuchsia-zircon-sys",
++ "iovec",
++ "kernel32-sys",
++ "libc",
++ "log",
++ "miow",
++ "net2",
++ "slab",
++ "winapi 0.2.8",
++]
++
++[[package]]
++name = "miow"
++version = "0.2.2"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "ebd808424166322d4a38da87083bfddd3ac4c131334ed55856112eb06d46944d"
++dependencies = [
++ "kernel32-sys",
++ "net2",
++ "winapi 0.2.8",
++ "ws2_32-sys",
++]
++
++[[package]]
++name = "mp3-duration"
++version = "0.1.10"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "348bdc7300502f0801e5b57c448815713cd843b744ef9bda252a2698fdf90a0f"
++dependencies = [
++ "thiserror",
++]
++
++[[package]]
++name = "native-tls"
++version = "0.2.7"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "b8d96b2e1c8da3957d58100b09f102c6d9cfdfced01b7ec5a8974044bb09dbd4"
++dependencies = [
++ "lazy_static 1.4.0",
++ "libc",
++ "log",
++ "openssl",
++ "openssl-probe",
++ "openssl-sys",
++ "schannel",
++ "security-framework",
++ "security-framework-sys",
++ "tempfile",
++]
++
++[[package]]
++name = "ndk"
++version = "0.3.0"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "8794322172319b972f528bf90c6b467be0079f1fa82780ffb431088e741a73ab"
++dependencies = [
++ "jni-sys",
++ "ndk-sys",
++ "num_enum",
++ "thiserror",
++]
++
++[[package]]
++name = "ndk-glue"
++version = "0.3.0"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "c5caf0c24d51ac1c905c27d4eda4fa0635bbe0de596b8f79235e0b17a4d29385"
++dependencies = [
++ "lazy_static 1.4.0",
++ "libc",
++ "log",
++ "ndk",
++ "ndk-macro",
++ "ndk-sys",
++]
++
++[[package]]
++name = "ndk-macro"
++version = "0.2.0"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "05d1c6307dc424d0f65b9b06e94f88248e6305726b14729fd67a5e47b2dc481d"
++dependencies = [
++ "darling",
++ "proc-macro-crate",
++ "proc-macro2",
++ "quote",
++ "syn",
++]
++
++[[package]]
++name = "ndk-sys"
++version = "0.2.1"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "c44922cb3dbb1c70b5e5f443d63b64363a898564d739ba5198e3a9138442868d"
++
++[[package]]
++name = "net2"
++version = "0.2.37"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "391630d12b68002ae1e25e8f974306474966550ad82dac6886fb8910c19568ae"
++dependencies = [
++ "cfg-if 0.1.10",
++ "libc",
++ "winapi 0.3.9",
++]
++
++[[package]]
++name = "netease_music_tui"
++version = "0.1.3"
++dependencies = [
++ "base64 0.11.0",
++ "byteorder",
++ "bytes 0.4.12",
++ "chrono",
++ "config",
++ "dbus",
++ "dirs",
++ "failure",
++ "futures",
++ "hex",
++ "lazy_static 1.4.0",
++ "log",
++ "log-panics",
++ "mp3-duration",
++ "num-bigint",
++ "openssl",
++ "rand 0.7.3",
++ "regex",
++ "reqwest",
++ "rodio",
++ "serde 1.0.125",
++ "serde_derive",
++ "serde_json",
++ "serde_urlencoded 0.6.1",
++ "simple-logging",
++ "tempfile",
++ "termion",
++ "tokio",
++ "tui",
++ "unicode-width",
++]
++
++[[package]]
++name = "nix"
++version = "0.20.0"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "fa9b4819da1bc61c0ea48b63b7bc8604064dd43013e7cc325df098d49cd7c18a"
++dependencies = [
++ "bitflags",
++ "cc",
++ "cfg-if 1.0.0",
++ "libc",
++]
++
++[[package]]
++name = "nom"
++version = "4.2.3"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "2ad2a91a8e869eeb30b9cb3119ae87773a8f4ae617f41b1eb9c154b2905f7bd6"
++dependencies = [
++ "memchr",
++ "version_check 0.1.5",
++]
++
++[[package]]
++name = "nom"
++version = "5.1.2"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "ffb4262d26ed83a1c0a33a38fe2bb15797329c85770da05e6b828ddb782627af"
++dependencies = [
++ "memchr",
++ "version_check 0.9.3",
++]
++
++[[package]]
++name = "num-bigint"
++version = "0.2.6"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "090c7f9998ee0ff65aa5b723e4009f7b217707f1fb5ea551329cc4d6231fb304"
++dependencies = [
++ "autocfg",
++ "num-integer",
++ "num-traits 0.2.14",
++]
++
++[[package]]
++name = "num-derive"
++version = "0.3.3"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "876a53fff98e03a936a674b29568b0e605f06b29372c2489ff4de23f1949743d"
++dependencies = [
++ "proc-macro2",
++ "quote",
++ "syn",
++]
++
++[[package]]
++name = "num-integer"
++version = "0.1.44"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "d2cc698a63b549a70bc047073d2949cce27cd1c7b0a4a862d08a8031bc2801db"
++dependencies = [
++ "autocfg",
++ "num-traits 0.2.14",
++]
++
++[[package]]
++name = "num-traits"
++version = "0.1.43"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "92e5113e9fd4cc14ded8e499429f396a20f98c772a47cc8622a736e1ec843c31"
++dependencies = [
++ "num-traits 0.2.14",
++]
++
++[[package]]
++name = "num-traits"
++version = "0.2.14"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "9a64b1ec5cda2586e284722486d802acf1f7dbdc623e2bfc57e65ca1cd099290"
++dependencies = [
++ "autocfg",
++]
++
++[[package]]
++name = "num_cpus"
++version = "1.13.0"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "05499f3756671c15885fee9034446956fff3f243d6077b91e5767df161f766b3"
++dependencies = [
++ "hermit-abi",
++ "libc",
++]
++
++[[package]]
++name = "num_enum"
++version = "0.5.1"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "226b45a5c2ac4dd696ed30fa6b94b057ad909c7b7fc2e0d0808192bced894066"
++dependencies = [
++ "derivative",
++ "num_enum_derive",
++]
++
++[[package]]
++name = "num_enum_derive"
++version = "0.5.1"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "1c0fd9eba1d5db0994a239e09c1be402d35622277e35468ba891aa5e3188ce7e"
++dependencies = [
++ "proc-macro-crate",
++ "proc-macro2",
++ "quote",
++ "syn",
++]
++
++[[package]]
++name = "numtoa"
++version = "0.1.0"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "b8f8bdf33df195859076e54ab11ee78a1b208382d3a26ec40d142ffc1ecc49ef"
++
++[[package]]
++name = "object"
++version = "0.23.0"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "a9a7ab5d64814df0fe4a4b5ead45ed6c5f181ee3ff04ba344313a6c80446c5d4"
++
++[[package]]
++name = "oboe"
++version = "0.4.1"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "4cfb2390bddb9546c0f7448fd1d2abdd39e6075206f960991eb28c7fa7f126c4"
++dependencies = [
++ "jni",
++ "ndk",
++ "ndk-glue",
++ "num-derive",
++ "num-traits 0.2.14",
++ "oboe-sys",
++]
++
++[[package]]
++name = "oboe-sys"
++version = "0.4.0"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "fe069264d082fc820dfa172f79be3f2e088ecfece9b1c47b0c9fd838d2bef103"
++dependencies = [
++ "cc",
++]
++
++[[package]]
++name = "ogg"
++version = "0.8.0"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "6951b4e8bf21c8193da321bcce9c9dd2e13c858fe078bf9054a288b419ae5d6e"
++dependencies = [
++ "byteorder",
++]
++
++[[package]]
++name = "once_cell"
++version = "1.7.2"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "af8b08b04175473088b46763e51ee54da5f9a164bc162f615b91bc179dbf15a3"
++
++[[package]]
++name = "openssl"
++version = "0.10.33"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "a61075b62a23fef5a29815de7536d940aa35ce96d18ce0cc5076272db678a577"
++dependencies = [
++ "bitflags",
++ "cfg-if 1.0.0",
++ "foreign-types",
++ "libc",
++ "once_cell",
++ "openssl-sys",
++]
++
++[[package]]
++name = "openssl-probe"
++version = "0.1.2"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "77af24da69f9d9341038eba93a073b1fdaaa1b788221b00a69bce9e762cb32de"
++
++[[package]]
++name = "openssl-sys"
++version = "0.9.61"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "313752393519e876837e09e1fa183ddef0be7735868dced3196f4472d536277f"
++dependencies = [
++ "autocfg",
++ "cc",
++ "libc",
++ "pkg-config",
++ "vcpkg",
++]
++
++[[package]]
++name = "parking_lot"
++version = "0.11.1"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "6d7744ac029df22dca6284efe4e898991d28e3085c706c972bcd7da4a27a15eb"
++dependencies = [
++ "instant",
++ "lock_api",
++ "parking_lot_core",
++]
++
++[[package]]
++name = "parking_lot_core"
++version = "0.8.3"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "fa7a782938e745763fe6907fc6ba86946d72f49fe7e21de074e08128a99fb018"
++dependencies = [
++ "cfg-if 1.0.0",
++ "instant",
++ "libc",
++ "redox_syscall 0.2.5",
++ "smallvec",
++ "winapi 0.3.9",
++]
++
++[[package]]
++name = "peeking_take_while"
++version = "0.1.2"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099"
++
++[[package]]
++name = "percent-encoding"
++version = "2.1.0"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e"
++
++[[package]]
++name = "pin-project"
++version = "1.0.6"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "bc174859768806e91ae575187ada95c91a29e96a98dc5d2cd9a1fed039501ba6"
++dependencies = [
++ "pin-project-internal",
++]
++
++[[package]]
++name = "pin-project-internal"
++version = "1.0.6"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "a490329918e856ed1b083f244e3bfe2d8c4f336407e4ea9e1a9f479ff09049e5"
++dependencies = [
++ "proc-macro2",
++ "quote",
++ "syn",
++]
++
++[[package]]
++name = "pin-project-lite"
++version = "0.1.12"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "257b64915a082f7811703966789728173279bdebb956b143dbcd23f6f970a777"
++
++[[package]]
++name = "pin-project-lite"
++version = "0.2.6"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "dc0e1f259c92177c30a4c9d177246edd0a3568b25756a977d0632cf8fa37e905"
++
++[[package]]
++name = "pin-utils"
++version = "0.1.0"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184"
++
++[[package]]
++name = "pkg-config"
++version = "0.3.19"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "3831453b3449ceb48b6d9c7ad7c96d5ea673e9b470a1dc578c2ce6521230884c"
++
++[[package]]
++name = "ppv-lite86"
++version = "0.2.10"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "ac74c624d6b2d21f425f752262f42188365d7b8ff1aff74c82e45136510a4857"
++
++[[package]]
++name = "proc-macro-crate"
++version = "0.1.5"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "1d6ea3c4595b96363c13943497db34af4460fb474a95c43f4446ad341b8c9785"
++dependencies = [
++ "toml 0.5.8",
++]
++
++[[package]]
++name = "proc-macro-hack"
++version = "0.5.19"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "dbf0c48bc1d91375ae5c3cd81e3722dff1abcf81a30960240640d223f59fe0e5"
++
++[[package]]
++name = "proc-macro-nested"
++version = "0.1.7"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "bc881b2c22681370c6a780e47af9840ef841837bc98118431d4e1868bd0c1086"
++
++[[package]]
++name = "proc-macro2"
++version = "1.0.26"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "a152013215dca273577e18d2bf00fa862b89b24169fb78c4c95aeb07992c9cec"
++dependencies = [
++ "unicode-xid",
++]
++
++[[package]]
++name = "publicsuffix"
++version = "1.5.6"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "95b4ce31ff0a27d93c8de1849cf58162283752f065a90d508f1105fa6c9a213f"
++dependencies = [
++ "idna",
++ "url",
++]
++
++[[package]]
++name = "quote"
++version = "1.0.9"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "c3d0b9745dc2debf507c8422de05d7226cc1f0644216dfdfead988f9b1ab32a7"
++dependencies = [
++ "proc-macro2",
++]
++
++[[package]]
++name = "rand"
++version = "0.7.3"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03"
++dependencies = [
++ "getrandom 0.1.16",
++ "libc",
++ "rand_chacha 0.2.2",
++ "rand_core 0.5.1",
++ "rand_hc 0.2.0",
++]
++
++[[package]]
++name = "rand"
++version = "0.8.3"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "0ef9e7e66b4468674bfcb0c81af8b7fa0bb154fa9f28eb840da5c447baeb8d7e"
++dependencies = [
++ "libc",
++ "rand_chacha 0.3.0",
++ "rand_core 0.6.2",
++ "rand_hc 0.3.0",
++]
++
++[[package]]
++name = "rand_chacha"
++version = "0.2.2"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402"
++dependencies = [
++ "ppv-lite86",
++ "rand_core 0.5.1",
++]
++
++[[package]]
++name = "rand_chacha"
++version = "0.3.0"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "e12735cf05c9e10bf21534da50a147b924d555dc7a547c42e6bb2d5b6017ae0d"
++dependencies = [
++ "ppv-lite86",
++ "rand_core 0.6.2",
++]
++
++[[package]]
++name = "rand_core"
++version = "0.5.1"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19"
++dependencies = [
++ "getrandom 0.1.16",
++]
++
++[[package]]
++name = "rand_core"
++version = "0.6.2"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "34cf66eb183df1c5876e2dcf6b13d57340741e8dc255b48e40a26de954d06ae7"
++dependencies = [
++ "getrandom 0.2.2",
++]
++
++[[package]]
++name = "rand_hc"
++version = "0.2.0"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c"
++dependencies = [
++ "rand_core 0.5.1",
++]
++
++[[package]]
++name = "rand_hc"
++version = "0.3.0"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "3190ef7066a446f2e7f42e239d161e905420ccab01eb967c9eb27d21b2322a73"
++dependencies = [
++ "rand_core 0.6.2",
++]
++
++[[package]]
++name = "redox_syscall"
++version = "0.1.57"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "41cc0f7e4d5d4544e8861606a285bb08d3e70712ccc7d2b84d7c0ccfaf4b05ce"
++
++[[package]]
++name = "redox_syscall"
++version = "0.2.5"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "94341e4e44e24f6b591b59e47a8a027df12e008d73fd5672dbea9cc22f4507d9"
++dependencies = [
++ "bitflags",
++]
++
++[[package]]
++name = "redox_termios"
++version = "0.1.2"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "8440d8acb4fd3d277125b4bd01a6f38aee8d814b3b5fc09b3f2b825d37d3fe8f"
++dependencies = [
++ "redox_syscall 0.2.5",
++]
++
++[[package]]
++name = "redox_users"
++version = "0.3.5"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "de0737333e7a9502c789a36d7c7fa6092a49895d4faa31ca5df163857ded2e9d"
++dependencies = [
++ "getrandom 0.1.16",
++ "redox_syscall 0.1.57",
++ "rust-argon2",
++]
++
++[[package]]
++name = "regex"
++version = "1.4.5"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "957056ecddbeba1b26965114e191d2e8589ce74db242b6ea25fc4062427a5c19"
++dependencies = [
++ "aho-corasick",
++ "memchr",
++ "regex-syntax",
++]
++
++[[package]]
++name = "regex-syntax"
++version = "0.6.23"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "24d5f089152e60f62d28b835fbff2cd2e8dc0baf1ac13343bef92ab7eed84548"
++
++[[package]]
++name = "remove_dir_all"
++version = "0.5.3"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7"
++dependencies = [
++ "winapi 0.3.9",
++]
++
++[[package]]
++name = "reqwest"
++version = "0.10.10"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "0718f81a8e14c4dbb3b34cf23dc6aaf9ab8a0dfec160c534b3dbca1aaa21f47c"
++dependencies = [
++ "async-compression",
++ "base64 0.13.0",
++ "bytes 0.5.6",
++ "cookie",
++ "cookie_store",
++ "encoding_rs",
++ "futures-core",
++ "futures-util",
++ "http",
++ "http-body",
++ "hyper",
++ "hyper-tls",
++ "ipnet",
++ "js-sys",
++ "lazy_static 1.4.0",
++ "log",
++ "mime",
++ "mime_guess",
++ "native-tls",
++ "percent-encoding",
++ "pin-project-lite 0.2.6",
++ "serde 1.0.125",
++ "serde_urlencoded 0.7.0",
++ "time 0.2.26",
++ "tokio",
++ "tokio-socks",
++ "tokio-tls",
++ "url",
++ "wasm-bindgen",
++ "wasm-bindgen-futures",
++ "web-sys",
++ "winreg",
++]
++
++[[package]]
++name = "rodio"
++version = "0.13.1"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "b65c2eda643191f6d1bb12ea323a9db8d9ba95374e9be3780b5a9fb5cfb8520f"
++dependencies = [
++ "claxon",
++ "cpal",
++ "hound",
++ "lewton",
++ "minimp3",
++]
++
++[[package]]
++name = "rust-argon2"
++version = "0.8.3"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "4b18820d944b33caa75a71378964ac46f58517c92b6ae5f762636247c09e78fb"
++dependencies = [
++ "base64 0.13.0",
++ "blake2b_simd",
++ "constant_time_eq",
++ "crossbeam-utils",
++]
++
++[[package]]
++name = "rust-ini"
++version = "0.13.0"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "3e52c148ef37f8c375d49d5a73aa70713125b7f19095948a923f80afdeb22ec2"
++
++[[package]]
++name = "rustc-demangle"
++version = "0.1.18"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "6e3bad0ee36814ca07d7968269dd4b7ec89ec2da10c4bb613928d3077083c232"
++
++[[package]]
++name = "rustc-hash"
++version = "1.1.0"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2"
++
++[[package]]
++name = "rustc_version"
++version = "0.2.3"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a"
++dependencies = [
++ "semver",
++]
++
++[[package]]
++name = "ryu"
++version = "1.0.5"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "71d301d4193d031abdd79ff7e3dd721168a9572ef3fe51a1517aba235bd8f86e"
++
++[[package]]
++name = "same-file"
++version = "1.0.6"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502"
++dependencies = [
++ "winapi-util",
++]
++
++[[package]]
++name = "schannel"
++version = "0.1.19"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "8f05ba609c234e60bee0d547fe94a4c7e9da733d1c962cf6e59efa4cd9c8bc75"
++dependencies = [
++ "lazy_static 1.4.0",
++ "winapi 0.3.9",
++]
++
++[[package]]
++name = "scopeguard"
++version = "1.1.0"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd"
++
++[[package]]
++name = "security-framework"
++version = "2.2.0"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "3670b1d2fdf6084d192bc71ead7aabe6c06aa2ea3fbd9cc3ac111fa5c2b1bd84"
++dependencies = [
++ "bitflags",
++ "core-foundation",
++ "core-foundation-sys 0.8.2",
++ "libc",
++ "security-framework-sys",
++]
++
++[[package]]
++name = "security-framework-sys"
++version = "2.2.0"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "3676258fd3cfe2c9a0ec99ce3038798d847ce3e4bb17746373eb9f0f1ac16339"
++dependencies = [
++ "core-foundation-sys 0.8.2",
++ "libc",
++]
++
++[[package]]
++name = "semver"
++version = "0.9.0"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403"
++dependencies = [
++ "semver-parser",
++]
++
++[[package]]
++name = "semver-parser"
++version = "0.7.0"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3"
++
++[[package]]
++name = "serde"
++version = "0.8.23"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "9dad3f759919b92c3068c696c15c3d17238234498bbdcc80f2c469606f948ac8"
++
++[[package]]
++name = "serde"
++version = "1.0.125"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "558dc50e1a5a5fa7112ca2ce4effcb321b0300c0d4ccf0776a9f60cd89031171"
++dependencies = [
++ "serde_derive",
++]
++
++[[package]]
++name = "serde-hjson"
++version = "0.8.2"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "0b833c5ad67d52ced5f5938b2980f32a9c1c5ef047f0b4fb3127e7a423c76153"
++dependencies = [
++ "lazy_static 0.2.11",
++ "linked-hash-map 0.3.0",
++ "num-traits 0.1.43",
++ "regex",
++ "serde 0.8.23",
++]
++
++[[package]]
++name = "serde_derive"
++version = "1.0.125"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "b093b7a2bb58203b5da3056c05b4ec1fed827dcfdb37347a8841695263b3d06d"
++dependencies = [
++ "proc-macro2",
++ "quote",
++ "syn",
++]
++
++[[package]]
++name = "serde_json"
++version = "1.0.64"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "799e97dc9fdae36a5c8b8f2cae9ce2ee9fdce2058c57a93e6099d919fd982f79"
++dependencies = [
++ "itoa",
++ "ryu",
++ "serde 1.0.125",
++]
++
++[[package]]
++name = "serde_test"
++version = "0.8.23"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "110b3dbdf8607ec493c22d5d947753282f3bae73c0f56d322af1e8c78e4c23d5"
++dependencies = [
++ "serde 0.8.23",
++]
++
++[[package]]
++name = "serde_urlencoded"
++version = "0.6.1"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "9ec5d77e2d4c73717816afac02670d5c4f534ea95ed430442cad02e7a6e32c97"
++dependencies = [
++ "dtoa",
++ "itoa",
++ "serde 1.0.125",
++ "url",
++]
++
++[[package]]
++name = "serde_urlencoded"
++version = "0.7.0"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "edfa57a7f8d9c1d260a549e7224100f6c43d43f9103e06dd8b4095a9b2b43ce9"
++dependencies = [
++ "form_urlencoded",
++ "itoa",
++ "ryu",
++ "serde 1.0.125",
++]
++
++[[package]]
++name = "sha1"
++version = "0.6.0"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "2579985fda508104f7587689507983eadd6a6e84dd35d6d115361f530916fa0d"
++
++[[package]]
++name = "shlex"
++version = "0.1.1"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "7fdf1b9db47230893d76faad238fd6097fd6d6a9245cd7a4d90dbd639536bbd2"
++
++[[package]]
++name = "simple-logging"
++version = "2.0.2"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "b00d48e85675326bb182a2286ea7c1a0b264333ae10f27a937a72be08628b542"
++dependencies = [
++ "lazy_static 1.4.0",
++ "log",
++ "thread-id",
++]
++
++[[package]]
++name = "slab"
++version = "0.4.2"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8"
++
++[[package]]
++name = "slice-deque"
++version = "0.3.0"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "31ef6ee280cdefba6d2d0b4b78a84a1c1a3f3a4cec98c2d4231c8bc225de0f25"
++dependencies = [
++ "libc",
++ "mach",
++ "winapi 0.3.9",
++]
++
++[[package]]
++name = "smallvec"
++version = "1.6.1"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "fe0f37c9e8f3c5a4a66ad655a93c74daac4ad00c441533bf5c6e7990bb42604e"
++
++[[package]]
++name = "socket2"
++version = "0.3.19"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "122e570113d28d773067fab24266b66753f6ea915758651696b6e35e49f88d6e"
++dependencies = [
++ "cfg-if 1.0.0",
++ "libc",
++ "winapi 0.3.9",
++]
++
++[[package]]
++name = "standback"
++version = "0.2.17"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "e113fb6f3de07a243d434a56ec6f186dfd51cb08448239fe7bcae73f87ff28ff"
++dependencies = [
++ "version_check 0.9.3",
++]
++
++[[package]]
++name = "stdweb"
++version = "0.1.3"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "ef5430c8e36b713e13b48a9f709cc21e046723fe44ce34587b73a830203b533e"
++
++[[package]]
++name = "stdweb"
++version = "0.4.20"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "d022496b16281348b52d0e30ae99e01a73d737b2f45d38fed4edf79f9325a1d5"
++dependencies = [
++ "discard",
++ "rustc_version",
++ "stdweb-derive",
++ "stdweb-internal-macros",
++ "stdweb-internal-runtime",
++ "wasm-bindgen",
++]
++
++[[package]]
++name = "stdweb-derive"
++version = "0.5.3"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "c87a60a40fccc84bef0652345bbbbbe20a605bf5d0ce81719fc476f5c03b50ef"
++dependencies = [
++ "proc-macro2",
++ "quote",
++ "serde 1.0.125",
++ "serde_derive",
++ "syn",
++]
++
++[[package]]
++name = "stdweb-internal-macros"
++version = "0.2.9"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "58fa5ff6ad0d98d1ffa8cb115892b6e69d67799f6763e162a1c9db421dc22e11"
++dependencies = [
++ "base-x",
++ "proc-macro2",
++ "quote",
++ "serde 1.0.125",
++ "serde_derive",
++ "serde_json",
++ "sha1",
++ "syn",
++]
++
++[[package]]
++name = "stdweb-internal-runtime"
++version = "0.1.5"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "213701ba3370744dcd1a12960caa4843b3d68b4d1c0a5d575e0d65b2ee9d16c0"
++
++[[package]]
++name = "strsim"
++version = "0.9.3"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "6446ced80d6c486436db5c078dde11a9f73d42b57fb273121e160b84f63d894c"
++
++[[package]]
++name = "syn"
++version = "1.0.68"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "3ce15dd3ed8aa2f8eeac4716d6ef5ab58b6b9256db41d7e1a0224c2788e8fd87"
++dependencies = [
++ "proc-macro2",
++ "quote",
++ "unicode-xid",
++]
++
++[[package]]
++name = "synstructure"
++version = "0.12.4"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "b834f2d66f734cb897113e34aaff2f1ab4719ca946f9a7358dba8f8064148701"
++dependencies = [
++ "proc-macro2",
++ "quote",
++ "syn",
++ "unicode-xid",
++]
++
++[[package]]
++name = "tempfile"
++version = "3.2.0"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "dac1c663cfc93810f88aed9b8941d48cabf856a1b111c29a40439018d870eb22"
++dependencies = [
++ "cfg-if 1.0.0",
++ "libc",
++ "rand 0.8.3",
++ "redox_syscall 0.2.5",
++ "remove_dir_all",
++ "winapi 0.3.9",
++]
++
++[[package]]
++name = "termion"
++version = "1.5.6"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "077185e2eac69c3f8379a4298e1e07cd36beb962290d4a51199acf0fdc10607e"
++dependencies = [
++ "libc",
++ "numtoa",
++ "redox_syscall 0.2.5",
++ "redox_termios",
++]
++
++[[package]]
++name = "thiserror"
++version = "1.0.24"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "e0f4a65597094d4483ddaed134f409b2cb7c1beccf25201a9f73c719254fa98e"
++dependencies = [
++ "thiserror-impl",
++]
++
++[[package]]
++name = "thiserror-impl"
++version = "1.0.24"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "7765189610d8241a44529806d6fd1f2e0a08734313a35d5b3a556f92b381f3c0"
++dependencies = [
++ "proc-macro2",
++ "quote",
++ "syn",
++]
++
++[[package]]
++name = "thread-id"
++version = "3.3.0"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "c7fbf4c9d56b320106cd64fd024dadfa0be7cb4706725fc44a7d7ce952d820c1"
++dependencies = [
++ "libc",
++ "redox_syscall 0.1.57",
++ "winapi 0.3.9",
++]
++
++[[package]]
++name = "time"
++version = "0.1.43"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "ca8a50ef2360fbd1eeb0ecd46795a87a19024eb4b53c5dc916ca1fd95fe62438"
++dependencies = [
++ "libc",
++ "winapi 0.3.9",
++]
++
++[[package]]
++name = "time"
++version = "0.2.26"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "08a8cbfbf47955132d0202d1662f49b2423ae35862aee471f3ba4b133358f372"
++dependencies = [
++ "const_fn",
++ "libc",
++ "standback",
++ "stdweb 0.4.20",
++ "time-macros",
++ "version_check 0.9.3",
++ "winapi 0.3.9",
++]
++
++[[package]]
++name = "time-macros"
++version = "0.1.1"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "957e9c6e26f12cb6d0dd7fc776bb67a706312e7299aed74c8dd5b17ebb27e2f1"
++dependencies = [
++ "proc-macro-hack",
++ "time-macros-impl",
++]
++
++[[package]]
++name = "time-macros-impl"
++version = "0.1.1"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "e5c3be1edfad6027c69f5491cf4cb310d1a71ecd6af742788c6ff8bced86b8fa"
++dependencies = [
++ "proc-macro-hack",
++ "proc-macro2",
++ "quote",
++ "standback",
++ "syn",
++]
++
++[[package]]
++name = "tinyvec"
++version = "1.1.1"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "317cca572a0e89c3ce0ca1f1bdc9369547fe318a683418e42ac8f59d14701023"
++dependencies = [
++ "tinyvec_macros",
++]
++
++[[package]]
++name = "tinyvec_macros"
++version = "0.1.0"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c"
++
++[[package]]
++name = "tokio"
++version = "0.2.25"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "6703a273949a90131b290be1fe7b039d0fc884aa1935860dfcbe056f28cd8092"
++dependencies = [
++ "bytes 0.5.6",
++ "fnv",
++ "futures-core",
++ "iovec",
++ "lazy_static 1.4.0",
++ "memchr",
++ "mio",
++ "num_cpus",
++ "pin-project-lite 0.1.12",
++ "slab",
++ "tokio-macros",
++]
++
++[[package]]
++name = "tokio-macros"
++version = "0.2.6"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "e44da00bfc73a25f814cd8d7e57a68a5c31b74b3152a0a1d1f590c97ed06265a"
++dependencies = [
++ "proc-macro2",
++ "quote",
++ "syn",
++]
++
++[[package]]
++name = "tokio-socks"
++version = "0.3.0"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "d611fd5d241872372d52a0a3d309c52d0b95a6a67671a6c8f7ab2c4a37fb2539"
++dependencies = [
++ "bytes 0.4.12",
++ "either",
++ "futures",
++ "thiserror",
++ "tokio",
++]
++
++[[package]]
++name = "tokio-tls"
++version = "0.3.1"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "9a70f4fcd7b3b24fb194f837560168208f669ca8cb70d0c4b862944452396343"
++dependencies = [
++ "native-tls",
++ "tokio",
++]
++
++[[package]]
++name = "tokio-util"
++version = "0.3.1"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "be8242891f2b6cbef26a2d7e8605133c2c554cd35b3e4948ea892d6d68436499"
++dependencies = [
++ "bytes 0.5.6",
++ "futures-core",
++ "futures-sink",
++ "log",
++ "pin-project-lite 0.1.12",
++ "tokio",
++]
++
++[[package]]
++name = "toml"
++version = "0.4.10"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "758664fc71a3a69038656bee8b6be6477d2a6c315a6b81f7081f591bffa4111f"
++dependencies = [
++ "serde 1.0.125",
++]
++
++[[package]]
++name = "toml"
++version = "0.5.8"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "a31142970826733df8241ef35dc040ef98c679ab14d7c3e54d827099b3acecaa"
++dependencies = [
++ "serde 1.0.125",
++]
++
++[[package]]
++name = "tower-service"
++version = "0.3.1"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "360dfd1d6d30e05fda32ace2c8c70e9c0a9da713275777f5a4dbb8a1893930c6"
++
++[[package]]
++name = "tracing"
++version = "0.1.25"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "01ebdc2bb4498ab1ab5f5b73c5803825e60199229ccba0698170e3be0e7f959f"
++dependencies = [
++ "cfg-if 1.0.0",
++ "log",
++ "pin-project-lite 0.2.6",
++ "tracing-core",
++]
++
++[[package]]
++name = "tracing-core"
++version = "0.1.17"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "f50de3927f93d202783f4513cda820ab47ef17f624b03c096e86ef00c67e6b5f"
++dependencies = [
++ "lazy_static 1.4.0",
++]
++
++[[package]]
++name = "tracing-futures"
++version = "0.2.5"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "97d095ae15e245a057c8e8451bab9b3ee1e1f68e9ba2b4fbc18d0ac5237835f2"
++dependencies = [
++ "pin-project",
++ "tracing",
++]
++
++[[package]]
++name = "try-lock"
++version = "0.2.3"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642"
++
++[[package]]
++name = "tui"
++version = "0.6.2"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "73b422ff4986065d33272b587907654f918a3fe8702786a8110bf68dede0d8ee"
++dependencies = [
++ "bitflags",
++ "cassowary",
++ "either",
++ "itertools",
++ "log",
++ "termion",
++ "unicode-segmentation",
++ "unicode-width",
++]
++
++[[package]]
++name = "unicase"
++version = "2.6.0"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "50f37be617794602aabbeee0be4f259dc1778fabe05e2d67ee8f79326d5cb4f6"
++dependencies = [
++ "version_check 0.9.3",
++]
++
++[[package]]
++name = "unicode-bidi"
++version = "0.3.4"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "49f2bd0c6468a8230e1db229cff8029217cf623c767ea5d60bfbd42729ea54d5"
++dependencies = [
++ "matches",
++]
++
++[[package]]
++name = "unicode-normalization"
++version = "0.1.17"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "07fbfce1c8a97d547e8b5334978438d9d6ec8c20e38f56d4a4374d181493eaef"
++dependencies = [
++ "tinyvec",
++]
++
++[[package]]
++name = "unicode-segmentation"
++version = "1.7.1"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "bb0d2e7be6ae3a5fa87eed5fb451aff96f2573d2694942e40543ae0bbe19c796"
++
++[[package]]
++name = "unicode-width"
++version = "0.1.8"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "9337591893a19b88d8d87f2cec1e73fad5cdfd10e5a6f349f498ad6ea2ffb1e3"
++
++[[package]]
++name = "unicode-xid"
++version = "0.2.1"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "f7fe0bb3479651439c9112f72b6c505038574c9fbb575ed1bf3b797fa39dd564"
++
++[[package]]
++name = "url"
++version = "2.2.1"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "9ccd964113622c8e9322cfac19eb1004a07e636c545f325da085d5cdde6f1f8b"
++dependencies = [
++ "form_urlencoded",
++ "idna",
++ "matches",
++ "percent-encoding",
++]
++
++[[package]]
++name = "vcpkg"
++version = "0.2.11"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "b00bca6106a5e23f3eee943593759b7fcddb00554332e856d990c893966879fb"
++
++[[package]]
++name = "version_check"
++version = "0.1.5"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "914b1a6776c4c929a602fafd8bc742e06365d4bcbe48c30f9cca5824f70dc9dd"
++
++[[package]]
++name = "version_check"
++version = "0.9.3"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "5fecdca9a5291cc2b8dcf7dc02453fee791a280f3743cb0905f8822ae463b3fe"
++
++[[package]]
++name = "walkdir"
++version = "2.3.2"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "808cf2735cd4b6866113f648b791c6adc5714537bc222d9347bb203386ffda56"
++dependencies = [
++ "same-file",
++ "winapi 0.3.9",
++ "winapi-util",
++]
++
++[[package]]
++name = "want"
++version = "0.3.0"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "1ce8a968cb1cd110d136ff8b819a556d6fb6d919363c61534f6860c7eb172ba0"
++dependencies = [
++ "log",
++ "try-lock",
++]
++
++[[package]]
++name = "wasi"
++version = "0.9.0+wasi-snapshot-preview1"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519"
++
++[[package]]
++name = "wasi"
++version = "0.10.2+wasi-snapshot-preview1"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "fd6fbd9a79829dd1ad0cc20627bf1ed606756a7f77edff7b66b7064f9cb327c6"
++
++[[package]]
++name = "wasm-bindgen"
++version = "0.2.73"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "83240549659d187488f91f33c0f8547cbfef0b2088bc470c116d1d260ef623d9"
++dependencies = [
++ "cfg-if 1.0.0",
++ "serde 1.0.125",
++ "serde_json",
++ "wasm-bindgen-macro",
++]
++
++[[package]]
++name = "wasm-bindgen-backend"
++version = "0.2.73"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "ae70622411ca953215ca6d06d3ebeb1e915f0f6613e3b495122878d7ebec7dae"
++dependencies = [
++ "bumpalo",
++ "lazy_static 1.4.0",
++ "log",
++ "proc-macro2",
++ "quote",
++ "syn",
++ "wasm-bindgen-shared",
++]
++
++[[package]]
++name = "wasm-bindgen-futures"
++version = "0.4.23"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "81b8b767af23de6ac18bf2168b690bed2902743ddf0fb39252e36f9e2bfc63ea"
++dependencies = [
++ "cfg-if 1.0.0",
++ "js-sys",
++ "wasm-bindgen",
++ "web-sys",
++]
++
++[[package]]
++name = "wasm-bindgen-macro"
++version = "0.2.73"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "3e734d91443f177bfdb41969de821e15c516931c3c3db3d318fa1b68975d0f6f"
++dependencies = [
++ "quote",
++ "wasm-bindgen-macro-support",
++]
++
++[[package]]
++name = "wasm-bindgen-macro-support"
++version = "0.2.73"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "d53739ff08c8a68b0fdbcd54c372b8ab800b1449ab3c9d706503bc7dd1621b2c"
++dependencies = [
++ "proc-macro2",
++ "quote",
++ "syn",
++ "wasm-bindgen-backend",
++ "wasm-bindgen-shared",
++]
++
++[[package]]
++name = "wasm-bindgen-shared"
++version = "0.2.73"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "d9a543ae66aa233d14bb765ed9af4a33e81b8b58d1584cf1b47ff8cd0b9e4489"
++
++[[package]]
++name = "web-sys"
++version = "0.3.50"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "a905d57e488fec8861446d3393670fb50d27a262344013181c2cdf9fff5481be"
++dependencies = [
++ "js-sys",
++ "wasm-bindgen",
++]
++
++[[package]]
++name = "winapi"
++version = "0.2.8"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a"
++
++[[package]]
++name = "winapi"
++version = "0.3.9"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419"
++dependencies = [
++ "winapi-i686-pc-windows-gnu",
++ "winapi-x86_64-pc-windows-gnu",
++]
++
++[[package]]
++name = "winapi-build"
++version = "0.1.1"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc"
++
++[[package]]
++name = "winapi-i686-pc-windows-gnu"
++version = "0.4.0"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
++
++[[package]]
++name = "winapi-util"
++version = "0.1.5"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178"
++dependencies = [
++ "winapi 0.3.9",
++]
++
++[[package]]
++name = "winapi-x86_64-pc-windows-gnu"
++version = "0.4.0"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
++
++[[package]]
++name = "winreg"
++version = "0.7.0"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "0120db82e8a1e0b9fb3345a539c478767c0048d842860994d96113d5b667bd69"
++dependencies = [
++ "winapi 0.3.9",
++]
++
++[[package]]
++name = "ws2_32-sys"
++version = "0.2.1"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "d59cefebd0c892fa2dd6de581e937301d8552cb44489cdff035c6187cb63fa5e"
++dependencies = [
++ "winapi 0.2.8",
++ "winapi-build",
++]
++
++[[package]]
++name = "yaml-rust"
++version = "0.4.5"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "56c1936c4cc7a1c9ab21a1ebb602eb942ba868cbd44a99cb7cdc5892335e1c85"
++dependencies = [
++ "linked-hash-map 0.5.4",
++]
diff --git a/pkgs/applications/audio/netease-music-tui/default.nix b/pkgs/applications/audio/netease-music-tui/default.nix
new file mode 100644
index 00000000000..f6ccee3e535
--- /dev/null
+++ b/pkgs/applications/audio/netease-music-tui/default.nix
@@ -0,0 +1,27 @@
+{ fetchFromGitHub, rustPlatform, lib, alsa-lib, pkg-config, openssl }:
+
+rustPlatform.buildRustPackage rec {
+  pname = "netease-music-tui";
+  version = "0.1.4";
+
+  src = fetchFromGitHub {
+    owner = "betta-cyber";
+    repo = "netease-music-tui";
+    rev = "v${version}";
+    sha256 = "sha256-ILJkejRKG2DRXgR6O2tAFbrbd8HtnLZJmITq7hF41DQ=";
+  };
+
+  cargoPatches = [ ./cargo-lock.patch ];
+
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = [ alsa-lib openssl ];
+
+  cargoSha256 = "sha256-/JQDUtSSkuO9nrYVSkQOaZjps1BUuH8Bc1SMyDSSJS4=";
+
+  meta = with lib; {
+    homepage = "https://github.com/betta-cyber/netease-music-tui";
+    description = "netease cloud music terminal client by rust";
+    maintainers = with maintainers; [ vonfry ];
+    license = licenses.mit;
+  };
+}
diff --git a/pkgs/applications/audio/netease-music-tui/update-cargo-lock.sh b/pkgs/applications/audio/netease-music-tui/update-cargo-lock.sh
new file mode 100644
index 00000000000..b7ca4216ace
--- /dev/null
+++ b/pkgs/applications/audio/netease-music-tui/update-cargo-lock.sh
@@ -0,0 +1,20 @@
+#!nix-shell
+#!nix-shell -i bash -p coreutils gnugrep git cargo
+
+# This updates cargo-lock.patch for the netease-music-tui version listed in
+# default.nix.
+
+set -eu -o verbose
+
+here=$PWD
+version=$(cat default.nix | grep '^  version = "' | cut -d '"' -f 2)
+checkout=$(mktemp -d)
+git clone -b "$version" --depth=1 https://github.com/betta-cyber/netease-music-tui "$checkout"
+cd "$checkout"
+
+cargo generate-lockfile
+git add -f Cargo.lock
+git diff HEAD -- Cargo.lock > "$here"/cargo-lock.patch
+
+cd "$here"
+rm -rf "$checkout"
diff --git a/pkgs/applications/audio/new-session-manager/default.nix b/pkgs/applications/audio/new-session-manager/default.nix
new file mode 100644
index 00000000000..78f71ed950f
--- /dev/null
+++ b/pkgs/applications/audio/new-session-manager/default.nix
@@ -0,0 +1,27 @@
+{ lib, stdenv, fetchFromGitHub, meson, pkg-config, ninja, liblo, libjack2, fltk }:
+
+stdenv.mkDerivation rec {
+  pname = "new-session-manager";
+  version = "1.5.3";
+
+  src = fetchFromGitHub {
+    owner = "linuxaudio";
+    repo = "new-session-manager";
+    rev = "v${version}";
+    sha256 = "sha256-dQE7kUoxqDtTrk5euHqpMVeApxniecWZWOARcCl573o=";
+  };
+
+  nativeBuildInputs = [ meson pkg-config ninja ];
+
+  buildInputs = [ liblo libjack2 fltk ];
+
+  hardeningDisable = [ "format" ];
+
+  meta = with lib; {
+    homepage = "https://new-session-manager.jackaudio.org/";
+    description = "A session manager designed for audio applications.";
+    maintainers = [ maintainers._6AA4FD ];
+    license = licenses.gpl3Plus;
+    platforms = ["x86_64-linux"];
+  };
+}
diff --git a/pkgs/applications/audio/ninjas2/default.nix b/pkgs/applications/audio/ninjas2/default.nix
new file mode 100644
index 00000000000..8fa5bed3066
--- /dev/null
+++ b/pkgs/applications/audio/ninjas2/default.nix
@@ -0,0 +1,39 @@
+{ lib, stdenv, fetchFromGitHub, libjack2, libGL, pkg-config, xorg, mesa, libsndfile, libsamplerate }:
+
+stdenv.mkDerivation rec {
+  pname = "ninjas2";
+  version = "0.2.0";
+
+  src = fetchFromGitHub {
+    owner = "clearly-broken-software";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "1kwp6pmnfar2ip9693gprfbcfscklgri1k1ycimxzlqr61nkd2k9";
+    fetchSubmodules = true;
+  };
+
+  patchPhase = ''
+    patchShebangs dpf/utils/generate-ttl.sh
+  '';
+
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = [
+    libjack2 xorg.libX11 libGL mesa libsndfile libsamplerate
+  ];
+
+  installPhase = ''
+    install -dD bin/ninjas2.lv2 $out/lib/lv2/ninjas2.lv2
+    install -D bin/ninjas2-vst.so  $out/lib/vst/ninjas2-vst.so
+    install -D bin/ninjas2 $out/bin/ninjas2
+  '';
+
+  makeFlags = [ "PREFIX=$(out)" ];
+
+  meta = with lib; {
+    homepage = "https://github.com/clearly-broken-software/ninjas2";
+    description = "sample slicer plugin for LV2, VST, and jack standalone";
+    license = with licenses; [ gpl3 ];
+    maintainers = [ maintainers.magnetophon ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/pkgs/applications/audio/noise-repellent/default.nix b/pkgs/applications/audio/noise-repellent/default.nix
new file mode 100644
index 00000000000..7aaa8ddd843
--- /dev/null
+++ b/pkgs/applications/audio/noise-repellent/default.nix
@@ -0,0 +1,29 @@
+{ lib, stdenv, fetchFromGitHub, meson, ninja, pkg-config, fftwFloat, lv2 }:
+
+stdenv.mkDerivation rec {
+  pname = "noise-repellent";
+  version = "0.1.5";
+
+  src = fetchFromGitHub {
+    owner = "lucianodato";
+    repo = pname;
+    rev = version;
+    sha256 = "0hb89x9i2knzan46q4nwscf5zmnb2nwf4w13xl2c0y1mx1ls1mwl";
+    fetchSubmodules = true;
+  };
+
+  mesonFlags = ("--prefix=${placeholder "out"}/lib/lv2");
+
+  nativeBuildInputs = [ meson ninja pkg-config ];
+  buildInputs = [
+    fftwFloat lv2
+  ];
+
+  meta = with lib; {
+    description = "An lv2 plugin for broadband noise reduction";
+    homepage    = "https://github.com/lucianodato/noise-repellent";
+    license     = licenses.gpl3;
+    maintainers = [ maintainers.magnetophon ];
+    platforms = [ "x86_64-linux" "i686-linux" "x86_64-darwin" "i686-darwin"  ];
+  };
+}
diff --git a/pkgs/applications/audio/noisetorch/default.nix b/pkgs/applications/audio/noisetorch/default.nix
new file mode 100644
index 00000000000..b18f2b52f94
--- /dev/null
+++ b/pkgs/applications/audio/noisetorch/default.nix
@@ -0,0 +1,42 @@
+{ lib, buildGoModule, fetchFromGitHub, copyDesktopItems }:
+
+buildGoModule rec {
+  pname = "NoiseTorch";
+  version = "0.11.4";
+
+  src = fetchFromGitHub {
+    owner = "lawl";
+    repo = "NoiseTorch";
+    rev = version;
+    sha256 = "sha256-3+Yk7dqD7eyvd1I5CMmrg085ZtFxD2EnGqL5ttwx8eM=";
+  };
+
+  vendorSha256 = null;
+
+  doCheck = false;
+
+  ldflags = [ "-X main.version=${version}"  "-X main.distribution=nix" ];
+
+  subPackages = [ "." ];
+
+  nativeBuildInputs = [ copyDesktopItems ];
+
+  preBuild = ''
+    make -C c/ladspa/
+    go generate
+    rm  ./scripts/*
+  '';
+
+  postInstall = ''
+    install -D ./assets/icon/noisetorch.png $out/share/icons/hicolor/256x256/apps/noisetorch.png
+    copyDesktopItems assets/noisetorch.desktop $out/share/applications/
+  '';
+
+  meta = with lib; {
+    description = "Virtual microphone device with noise supression for PulseAudio";
+    homepage = "https://github.com/lawl/NoiseTorch";
+    license = licenses.gpl3Plus;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ panaeon lom ];
+  };
+}
diff --git a/pkgs/applications/audio/non/default.nix b/pkgs/applications/audio/non/default.nix
new file mode 100644
index 00000000000..39b8ecf7a6a
--- /dev/null
+++ b/pkgs/applications/audio/non/default.nix
@@ -0,0 +1,27 @@
+{ lib, stdenv, fetchFromGitHub, pkg-config, python3, cairo, libjpeg, ntk, libjack2
+, libsndfile, ladspaH, liblo, libsigcxx, lrdf, wafHook
+}:
+
+stdenv.mkDerivation {
+  pname = "non";
+  version = "unstable-2021-01-28";
+  src = fetchFromGitHub {
+    owner = "linuxaudio";
+    repo = "non";
+    rev = "cdad26211b301d2fad55a26812169ab905b85bbb";
+    sha256 = "sha256-iMJNMDytNXpEkUhL0RILSd25ixkm8HL/edtOZta0Pf4=";
+  };
+
+  nativeBuildInputs = [ pkg-config wafHook ];
+  buildInputs = [ python3 cairo libjpeg ntk libjack2 libsndfile
+                  ladspaH liblo libsigcxx lrdf
+  ];
+
+  meta = {
+    description = "Lightweight and lightning fast modular Digital Audio Workstation";
+    homepage = "http://non.tuxfamily.org";
+    license = lib.licenses.lgpl21;
+    platforms = lib.platforms.linux;
+    maintainers = [ lib.maintainers.nico202 ];
+  };
+}
diff --git a/pkgs/applications/audio/nootka/default.nix b/pkgs/applications/audio/nootka/default.nix
new file mode 100644
index 00000000000..59d58df8c8d
--- /dev/null
+++ b/pkgs/applications/audio/nootka/default.nix
@@ -0,0 +1,34 @@
+{ lib, stdenv, fetchurl, cmake
+, alsa-lib, fftwSinglePrec, libjack2, libpulseaudio, libvorbis, soundtouch, qtbase
+}:
+
+stdenv.mkDerivation rec {
+  pname = "nootka";
+  version = "1.4.7";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/nootka/${pname}-${version}-source.tar.bz2";
+    sha256 = "1y9wlwri74v2z9dwbcfjs7xri54yra24vpwq19xi2lfv1nbs518x";
+  };
+
+  nativeBuildInputs = [ cmake ];
+  buildInputs = [
+    alsa-lib fftwSinglePrec libjack2 libpulseaudio libvorbis soundtouch qtbase
+  ];
+
+  cmakeFlags = [
+    "-DCMAKE_INCLUDE_PATH=${libjack2}/include/jack;${libpulseaudio.dev}/include/pulse"
+    "-DENABLE_JACK=ON"
+    "-DENABLE_PULSEAUDIO=ON"
+  ];
+
+  dontWrapQtApps = true;
+
+  meta = with lib; {
+    description = "Application for practicing playing musical scores and ear training";
+    homepage = "https://nootka.sourceforge.io/";
+    license = licenses.gpl3Plus;
+    maintainers = with maintainers; [ orivej ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/pkgs/applications/audio/nootka/unstable.nix b/pkgs/applications/audio/nootka/unstable.nix
new file mode 100644
index 00000000000..b5e820e8345
--- /dev/null
+++ b/pkgs/applications/audio/nootka/unstable.nix
@@ -0,0 +1,53 @@
+{ lib
+, stdenv
+, fetchurl
+, cmake
+, alsa-lib
+, fftwSinglePrec
+, libjack2
+, libpulseaudio
+, libvorbis
+, soundtouch
+, qtbase
+, qtdeclarative
+, qtquickcontrols2
+}:
+
+stdenv.mkDerivation rec {
+  pname = "nootka";
+  version = "1.7.0-beta1";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/nootka/nootka-${version}-source.tar.bz2";
+    sha256 = "13b50vnpr1zx2mrgkc8fmhsyfa19rqq1rksvn31145dy6fk1f3gc";
+  };
+
+  nativeBuildInputs = [ cmake ];
+  buildInputs = [
+    alsa-lib
+    fftwSinglePrec
+    libjack2
+    libpulseaudio
+    libvorbis
+    soundtouch
+    qtbase
+    qtdeclarative
+    qtquickcontrols2
+  ];
+
+  dontWrapQtApps = true;
+
+  cmakeFlags = [
+    "-DCMAKE_INCLUDE_PATH=${libjack2}/include/jack;${libpulseaudio.dev}/include/pulse"
+    "-DENABLE_JACK=ON"
+    "-DENABLE_PULSEAUDIO=ON"
+  ];
+
+  meta = with lib; {
+    description = "Application for practicing playing musical scores and ear training";
+    homepage = "https://nootka.sourceforge.io/";
+    license = licenses.gpl3Plus;
+    maintainers = with maintainers; [ orivej ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/pkgs/applications/audio/normalize/default.nix b/pkgs/applications/audio/normalize/default.nix
new file mode 100644
index 00000000000..78951c67e8d
--- /dev/null
+++ b/pkgs/applications/audio/normalize/default.nix
@@ -0,0 +1,20 @@
+{ lib, stdenv, fetchurl, libmad }:
+
+stdenv.mkDerivation rec {
+  pname = "normalize";
+  version = "0.7.7";
+
+  src = fetchurl {
+    url = "mirror://savannah/normalize/${pname}-${version}.tar.gz";
+    sha256 = "1n5khss10vjjp6w69q9qcl4kqfkd0pr555lgqghrchn6rjms4mb0";
+  };
+
+  buildInputs = [ libmad ];
+
+  meta = with lib; {
+    homepage = "https://www.nongnu.org/normalize/";
+    description = "Audio file normalizer";
+    license = licenses.gpl2;
+    platforms = platforms.unix;
+  };
+}
diff --git a/pkgs/applications/audio/nova-filters/default.nix b/pkgs/applications/audio/nova-filters/default.nix
new file mode 100644
index 00000000000..cae9353d2de
--- /dev/null
+++ b/pkgs/applications/audio/nova-filters/default.nix
@@ -0,0 +1,31 @@
+{lib, stdenv, fetchurl, sconsPackages, boost, ladspaH, pkg-config }:
+
+stdenv.mkDerivation {
+  version = "0.2-2";
+  pname = "nova-filters";
+
+  src = fetchurl {
+    url = "https://klingt.org/~tim/nova-filters/nova-filters_0.2-2.tar.gz";
+    sha256 = "16064vvl2w5lz4xi3lyjk4xx7fphwsxc14ajykvndiz170q32s6i";
+  };
+
+  nativeBuildInputs = [ pkg-config 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 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/pkgs/applications/audio/nuclear/default.nix b/pkgs/applications/audio/nuclear/default.nix
new file mode 100644
index 00000000000..e107f44cf6f
--- /dev/null
+++ b/pkgs/applications/audio/nuclear/default.nix
@@ -0,0 +1,32 @@
+{ appimageTools, lib, fetchurl }:
+let
+  pname = "nuclear";
+  version = "0.6.6";
+  name = "${pname}-v${version}";
+
+  src = fetchurl {
+    url = "https://github.com/nukeop/nuclear/releases/download/v${version}/${name}.AppImage";
+    sha256 = "0c1335m76fv0wfbk07s8r6ln7zbmlqd66052gqfisakl8a1aafl6";
+  };
+
+  appimageContents = appimageTools.extract { inherit name src; };
+in appimageTools.wrapType2 {
+  inherit name src;
+
+  extraInstallCommands = ''
+    mv $out/bin/${name} $out/bin/${pname}
+
+    install -m 444 -D ${appimageContents}/${pname}.desktop -t $out/share/applications
+    substituteInPlace $out/share/applications/${pname}.desktop \
+      --replace 'Exec=AppRun' 'Exec=${pname}'
+    cp -r ${appimageContents}/usr/share/icons $out/share
+  '';
+
+  meta = with lib; {
+    description = "Streaming music player that finds free music for you";
+    homepage = "https://nuclear.js.org/";
+    license = licenses.agpl3Plus;
+    maintainers = [ maintainers.ivar ];
+    platforms = [ "x86_64-linux" ];
+  };
+}
diff --git a/pkgs/applications/audio/ocenaudio/default.nix b/pkgs/applications/audio/ocenaudio/default.nix
new file mode 100644
index 00000000000..8a25955e249
--- /dev/null
+++ b/pkgs/applications/audio/ocenaudio/default.nix
@@ -0,0 +1,54 @@
+{ stdenv
+, lib
+, fetchurl
+, autoPatchelfHook
+, dpkg
+, qt5
+, libjack2
+, alsa-lib
+, bzip2
+, libpulseaudio }:
+
+stdenv.mkDerivation rec {
+  pname = "ocenaudio";
+  version = "3.11.5";
+
+  src = fetchurl {
+    url = "https://www.ocenaudio.com/downloads/index.php/ocenaudio_debian9_64.deb?version=${version}";
+    sha256 = "sha256-YkSsvhBbju/NEkT7RspZQYnLkcx/5POA8VtxCAL3Wcc=";
+  };
+
+  nativeBuildInputs = [
+    autoPatchelfHook
+    qt5.qtbase
+    qt5.wrapQtAppsHook
+    libjack2
+    libpulseaudio
+    bzip2
+    alsa-lib
+  ];
+
+  buildInputs = [ dpkg ];
+
+  dontUnpack = true;
+  dontBuild = true;
+  dontStrip = true;
+
+  installPhase = ''
+    mkdir -p $out
+    dpkg -x $src $out
+    cp -av $out/opt/ocenaudio/* $out
+    rm -rf $out/opt
+
+    # Create symlink bzip2 library
+    ln -s ${bzip2.out}/lib/libbz2.so.1 $out/libbz2.so.1.0
+  '';
+
+  meta = with lib; {
+    description = "Cross-platform, easy to use, fast and functional audio editor";
+    homepage = "https://www.ocenaudio.com";
+    license = licenses.unfree;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ onny ];
+  };
+}
diff --git a/pkgs/applications/audio/open-music-kontrollers/eteroj.nix b/pkgs/applications/audio/open-music-kontrollers/eteroj.nix
new file mode 100644
index 00000000000..60de97ca3d0
--- /dev/null
+++ b/pkgs/applications/audio/open-music-kontrollers/eteroj.nix
@@ -0,0 +1,10 @@
+{ callPackage, ... } @ args:
+
+callPackage ./generic.nix (args // rec {
+  pname = "eteroj";
+  version = "0.10.0";
+
+  sha256 = "18iv1sdwm0g6b53shsylj6bf3svmvvy5xadhfsgb4xg39qr07djz";
+
+  description = "OSC injection/ejection from/to UDP/TCP/Serial for LV2";
+})
diff --git a/pkgs/applications/audio/open-music-kontrollers/generic.nix b/pkgs/applications/audio/open-music-kontrollers/generic.nix
new file mode 100644
index 00000000000..a5ed7c41eb7
--- /dev/null
+++ b/pkgs/applications/audio/open-music-kontrollers/generic.nix
@@ -0,0 +1,37 @@
+{ stdenv, lib, fetchurl, pkg-config, meson, ninja, libGLU, lv2, serd, sord, libX11, libXext, glew, lv2lint
+, pname, version, sha256, description
+, url ? "https://git.open-music-kontrollers.ch/lv2/${pname}.lv2/snapshot/${pname}.lv2-${version}.tar.xz"
+, additionalBuildInputs ? []
+, postPatch ? ""
+, ...
+}:
+
+stdenv.mkDerivation {
+  inherit pname;
+
+  inherit version;
+
+  inherit postPatch;
+
+  src = fetchurl {
+    url = url;
+    sha256 = sha256;
+  };
+  nativeBuildInputs = [ pkg-config meson ninja ];
+  buildInputs = [
+    lv2
+    sord
+    libX11
+    libXext
+    glew
+    lv2lint
+  ] ++ additionalBuildInputs;
+
+  meta = with lib; {
+    description = description;
+    homepage = "https://open-music-kontrollers.ch/lv2/${pname}:";
+    license = licenses.artistic2;
+    maintainers = [ maintainers.magnetophon ];
+    platforms = platforms.all;
+  };
+}
diff --git a/pkgs/applications/audio/open-music-kontrollers/jit.nix b/pkgs/applications/audio/open-music-kontrollers/jit.nix
new file mode 100644
index 00000000000..937a6446a8d
--- /dev/null
+++ b/pkgs/applications/audio/open-music-kontrollers/jit.nix
@@ -0,0 +1,12 @@
+{ callPackage, lv2, fontconfig, libvterm-neovim, ... } @ args:
+
+callPackage ./generic.nix (args // rec {
+  pname = "jit";
+  version = "unstable-2021-08-15";
+  url = "https://git.open-music-kontrollers.ch/lv2/${pname}.lv2/snapshot/${pname}.lv2-1f5d6935049fc0dd5a4dc257b84b36d2048f2d83.tar.xz";
+  sha256 = "sha256-XGICowVb0JgLJpn2h9GtViobYTdmo1LJ7/JFEyVsIqU=";
+
+  additionalBuildInputs = [ lv2 fontconfig libvterm-neovim ];
+
+  description = "A Just-in-Time C/Rust compiler embedded in an LV2 plugin";
+})
diff --git a/pkgs/applications/audio/open-music-kontrollers/mephisto.nix b/pkgs/applications/audio/open-music-kontrollers/mephisto.nix
new file mode 100644
index 00000000000..de707edd3d9
--- /dev/null
+++ b/pkgs/applications/audio/open-music-kontrollers/mephisto.nix
@@ -0,0 +1,17 @@
+{ callPackage, faust, fontconfig, cmake, libvterm-neovim, libevdev, libglvnd, fira-code, ... } @ args:
+
+callPackage ./generic.nix (args // rec {
+  pname = "mephisto";
+  version = "0.16.0";
+
+  sha256 = "0vgr3rsvdj4w0xpc5iqpvyqilk42wr9zs8bg26sfv3f2wi4hb6gx";
+
+  additionalBuildInputs = [ faust fontconfig cmake libvterm-neovim libevdev libglvnd fira-code ];
+
+  # see: https://github.com/OpenMusicKontrollers/mephisto.lv2/issues/6
+  postPatch = ''
+    sed -i 's/llvm-c-dsp/llvm-dsp-c/g' mephisto.c
+  '';
+
+  description = "A Just-in-time FAUST embedded in an LV2 plugin";
+})
diff --git a/pkgs/applications/audio/open-music-kontrollers/midi_matrix.nix b/pkgs/applications/audio/open-music-kontrollers/midi_matrix.nix
new file mode 100644
index 00000000000..cd431d1a1d3
--- /dev/null
+++ b/pkgs/applications/audio/open-music-kontrollers/midi_matrix.nix
@@ -0,0 +1,10 @@
+{ callPackage, ... } @ args:
+
+callPackage ./generic.nix (args // rec {
+  pname = "midi_matrix";
+  version = "0.30.0";
+
+  sha256 = "1nwmfxdzk4pvbwcgi3d7v4flqc10bmi2fxhrhrpfa7cafqs40ib6";
+
+  description = "An LV2 MIDI channel matrix patcher";
+})
diff --git a/pkgs/applications/audio/open-music-kontrollers/moony.nix b/pkgs/applications/audio/open-music-kontrollers/moony.nix
new file mode 100644
index 00000000000..6087e055376
--- /dev/null
+++ b/pkgs/applications/audio/open-music-kontrollers/moony.nix
@@ -0,0 +1,13 @@
+{ callPackage, cairo, libvterm-neovim, robodoc, cmake, ... } @ args:
+
+callPackage ./generic.nix (args // rec {
+  pname = "moony";
+  version = "0.40.0";
+
+  sha256 = "sha256-9a3gR3lV8xFFTDZD+fJPCALVztgmggzyIpsPZCOw/uY=";
+
+  additionalBuildInputs = [ cairo libvterm-neovim robodoc cmake ];
+
+  description = "Realtime Lua as programmable glue in LV2";
+
+})
diff --git a/pkgs/applications/audio/open-music-kontrollers/orbit.nix b/pkgs/applications/audio/open-music-kontrollers/orbit.nix
new file mode 100644
index 00000000000..930fc17760f
--- /dev/null
+++ b/pkgs/applications/audio/open-music-kontrollers/orbit.nix
@@ -0,0 +1,12 @@
+{ callPackage, zlib, ... } @ args:
+
+callPackage ./generic.nix (args // rec {
+  pname = "orbit";
+  version = "unstable-2021-04-13";
+  url = "https://git.open-music-kontrollers.ch/lv2/${pname}.lv2/snapshot/${pname}.lv2-f4aa620fc8d77418856581a6a955192af15b3860.tar.xz";
+  sha256 = "0z8d8h2w8fb2zx84n697jvy32dc0vf60jyiyh4gm22prgr2dvgkc";
+
+  additionalBuildInputs = [ zlib ];
+
+  description = "An LV2 time event manipulation plugin bundle";
+})
diff --git a/pkgs/applications/audio/open-music-kontrollers/patchmatrix.nix b/pkgs/applications/audio/open-music-kontrollers/patchmatrix.nix
new file mode 100644
index 00000000000..cc343e0330c
--- /dev/null
+++ b/pkgs/applications/audio/open-music-kontrollers/patchmatrix.nix
@@ -0,0 +1,13 @@
+{ callPackage, libjack2, ... } @ args:
+
+callPackage ./generic.nix (args // rec {
+  pname = "patchmatrix";
+  version = "0.26.0";
+
+  url = "https://git.open-music-kontrollers.ch/lad/${pname}/snapshot/${pname}-${version}.tar.xz";
+  sha256 = "sha256-cqPHCnrAhHB6a0xmPUYOAsZfLsqnGpXEuGR1W6i6W7I=";
+
+  additionalBuildInputs = [ libjack2 ];
+
+  description = "A JACK patchbay in flow matrix style";
+})
diff --git a/pkgs/applications/audio/open-music-kontrollers/router.nix b/pkgs/applications/audio/open-music-kontrollers/router.nix
new file mode 100644
index 00000000000..40d3a5e6fbc
--- /dev/null
+++ b/pkgs/applications/audio/open-music-kontrollers/router.nix
@@ -0,0 +1,11 @@
+{ callPackage, ... } @ args:
+
+callPackage ./generic.nix (args // rec {
+  pname = "router";
+  version = "unstable-2021-04-13";
+
+  url = "https://git.open-music-kontrollers.ch/lv2/${pname}.lv2/snapshot/${pname}.lv2-7d754dd64c540d40b828166401617715dc235ca3.tar.xz";
+  sha256 = "sha256-LjaW5Xdxfjzd6IJ2ptHzmHt7fhU1HQo7ubZ4USVqRE8=";
+
+  description = "An atom/audio/CV router LV2 plugin bundle";
+})
diff --git a/pkgs/applications/audio/open-music-kontrollers/sherlock.nix b/pkgs/applications/audio/open-music-kontrollers/sherlock.nix
new file mode 100644
index 00000000000..c8ae0afd09a
--- /dev/null
+++ b/pkgs/applications/audio/open-music-kontrollers/sherlock.nix
@@ -0,0 +1,12 @@
+{ callPackage, sratom, flex, ... } @ args:
+
+callPackage ./generic.nix (args // rec {
+  pname = "sherlock";
+  version = "0.28.0";
+
+  sha256 = "07zj88s1593fpw2s0r3ix7cj2icfd9zyirsyhr2i8l6d30b6n6fb";
+
+  additionalBuildInputs = [ sratom flex ];
+
+  description = "Plugins for visualizing LV2 atom, MIDI and OSC events";
+})
diff --git a/pkgs/applications/audio/open-music-kontrollers/synthpod.nix b/pkgs/applications/audio/open-music-kontrollers/synthpod.nix
new file mode 100644
index 00000000000..9b7964e839b
--- /dev/null
+++ b/pkgs/applications/audio/open-music-kontrollers/synthpod.nix
@@ -0,0 +1,13 @@
+{ callPackage, lilv, libjack2, alsa-lib, zita-alsa-pcmi, libxcb, xcbutilxrm, sratom, gtk2, qt5,  libvterm-neovim, robodoc, cmake,... } @ args:
+
+callPackage ./generic.nix (args // rec {
+  pname = "synthpod";
+  version = "unstable-2021-10-22";
+
+  url = "https://git.open-music-kontrollers.ch/lv2/synthpod/snapshot/synthpod-6f284bdad882037a522c120af92b96d8abf2de60.tar.xz";
+  sha256 = "sha256-59WBlOKum5Pcmq2CfFfRHCNEa8uPCoBk0kSjFlIcypw=";
+
+  additionalBuildInputs = [ lilv libjack2 alsa-lib zita-alsa-pcmi libxcb xcbutilxrm sratom gtk2 qt5.qtbase qt5.wrapQtAppsHook libvterm-neovim robodoc cmake ];
+
+  description = "Lightweight Nonlinear LV2 Plugin Container";
+})
diff --git a/pkgs/applications/audio/open-music-kontrollers/vm.nix b/pkgs/applications/audio/open-music-kontrollers/vm.nix
new file mode 100644
index 00000000000..8d432d356cf
--- /dev/null
+++ b/pkgs/applications/audio/open-music-kontrollers/vm.nix
@@ -0,0 +1,10 @@
+{ callPackage, ... } @ args:
+
+callPackage ./generic.nix (args // rec {
+  pname = "vm";
+  version = "0.14.0";
+
+  sha256 = "013gq7jn556nkk1nq6zzh9nmp3fb36jd7ndzvyq3qryw7khzkagc";
+
+  description = "A programmable virtual machine LV2 plugin";
+})
diff --git a/pkgs/applications/audio/opus-tools/default.nix b/pkgs/applications/audio/opus-tools/default.nix
new file mode 100644
index 00000000000..6c602ef1d03
--- /dev/null
+++ b/pkgs/applications/audio/opus-tools/default.nix
@@ -0,0 +1,22 @@
+{lib, stdenv, fetchurl, libogg, libao, pkg-config, flac, opusfile, libopusenc}:
+
+stdenv.mkDerivation rec {
+  pname = "opus-tools";
+  version = "0.2";
+
+  src = fetchurl {
+    url = "https://downloads.xiph.org/releases/opus/${pname}-${version}.tar.gz";
+    sha256 = "11pzl27s4vcz4m18ch72nivbhww2zmzn56wspb7rll1y1nq6rrdl";
+  };
+
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = [ libogg libao flac opusfile libopusenc ];
+
+  meta = {
+    description = "Tools to work with opus encoded audio streams";
+    homepage = "https://www.opus-codec.org/";
+    license = lib.licenses.bsd2;
+    maintainers = with lib.maintainers; [ ];
+    platforms = with lib.platforms; unix;
+  };
+}
diff --git a/pkgs/applications/audio/opusfile/default.nix b/pkgs/applications/audio/opusfile/default.nix
new file mode 100644
index 00000000000..a6683904cb1
--- /dev/null
+++ b/pkgs/applications/audio/opusfile/default.nix
@@ -0,0 +1,27 @@
+{ lib, stdenv, fetchurl, pkg-config, openssl, libogg, libopus }:
+
+stdenv.mkDerivation rec {
+  pname = "opusfile";
+  version = "0.12";
+  src = fetchurl {
+    url = "http://downloads.xiph.org/releases/opus/opusfile-${version}.tar.gz";
+    sha256 = "02smwc5ah8nb3a67mnkjzqmrzk43j356hgj2a97s9midq40qd38i";
+  };
+
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = [ openssl libogg ];
+  propagatedBuildInputs = [ libopus ];
+  patches = [ ./include-multistream.patch ]
+    # fixes problem with openssl 1.1 dependency
+    # see https://github.com/xiph/opusfile/issues/13
+    ++ lib.optionals stdenv.hostPlatform.isWindows [ ./disable-cert-store.patch ];
+  configureFlags = [ "--disable-examples" ];
+
+  meta = with lib; {
+    description = "High-level API for decoding and seeking in .opus files";
+    homepage = "https://www.opus-codec.org/";
+    license = licenses.bsd3;
+    platforms = platforms.all;
+    maintainers = with maintainers; [ taeer ];
+  };
+}
diff --git a/pkgs/applications/audio/opusfile/disable-cert-store.patch b/pkgs/applications/audio/opusfile/disable-cert-store.patch
new file mode 100644
index 00000000000..e0a7dd4fe3d
--- /dev/null
+++ b/pkgs/applications/audio/opusfile/disable-cert-store.patch
@@ -0,0 +1,35 @@
+diff --git a/src/http.c b/src/http.c
+index bd08562..3a3592c 100644
+--- a/src/http.c
++++ b/src/http.c
+@@ -327,10 +327,12 @@ static int op_poll_win32(struct pollfd *_fds,nfds_t _nfds,int _timeout){
+ typedef ptrdiff_t ssize_t;
+ #  endif
+ 
++#if OPENSSL_VERSION_NUMBER < 0x10100000L
+ /*Load certificates from the built-in certificate store.*/
+ int SSL_CTX_set_default_verify_paths_win32(SSL_CTX *_ssl_ctx);
+ #  define SSL_CTX_set_default_verify_paths \
+  SSL_CTX_set_default_verify_paths_win32
++#endif
+ 
+ # else
+ /*Normal Berkeley sockets.*/
+diff --git a/src/wincerts.c b/src/wincerts.c
+index 409a4e0..c355952 100644
+--- a/src/wincerts.c
++++ b/src/wincerts.c
+@@ -33,6 +33,8 @@
+ # include <openssl/err.h>
+ # include <openssl/x509.h>
+ 
++#if OPENSSL_VERSION_NUMBER < 0x10100000L
++
+ static int op_capi_new(X509_LOOKUP *_lu){
+   HCERTSTORE h_store;
+   h_store=CertOpenStore(CERT_STORE_PROV_SYSTEM_A,0,0,
+@@ -171,3 +173,4 @@ int SSL_CTX_set_default_verify_paths_win32(SSL_CTX *_ssl_ctx){
+ }
+ 
+ #endif
++#endif
diff --git a/pkgs/applications/audio/opusfile/include-multistream.patch b/pkgs/applications/audio/opusfile/include-multistream.patch
new file mode 100644
index 00000000000..7c6dd847596
--- /dev/null
+++ b/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/pkgs/applications/audio/opustags/default.nix b/pkgs/applications/audio/opustags/default.nix
new file mode 100644
index 00000000000..83cf44853a5
--- /dev/null
+++ b/pkgs/applications/audio/opustags/default.nix
@@ -0,0 +1,37 @@
+{ stdenv, lib, fetchFromGitHub, cmake, pkg-config, libiconv, libogg
+, ffmpeg, glibcLocales, perl, perlPackages }:
+
+stdenv.mkDerivation rec {
+  pname = "opustags";
+  version = "1.6.0";
+
+  src = fetchFromGitHub {
+    owner = "fmang";
+    repo = "opustags";
+    rev = version;
+    sha256 = "1wsfw713rhi2gg5xc04cx5i31hlw0l3wdflj3r1y8w45bdk6ag1z";
+  };
+
+  buildInputs = [ libogg ];
+
+  nativeBuildInputs = [ cmake pkg-config ] ++ lib.optionals stdenv.isDarwin [ libiconv ];
+
+  doCheck = true;
+
+  checkInputs = [ ffmpeg glibcLocales perl ] ++ (with perlPackages; [ ListMoreUtils ]);
+
+  checkPhase = ''
+    export LANG="en_US.UTF-8"
+    export LC_ALL="en_US.UTF-8"
+    make check
+  '';
+
+  meta = with lib; {
+    homepage = "https://github.com/fmang/opustags";
+    description = "Ogg Opus tags editor";
+    platforms = platforms.all;
+    broken = stdenv.isDarwin;
+    maintainers = with maintainers; [ kmein SuperSandro2000 ];
+    license = licenses.bsd3;
+  };
+}
diff --git a/pkgs/applications/audio/orca-c/default.nix b/pkgs/applications/audio/orca-c/default.nix
new file mode 100644
index 00000000000..be40def2644
--- /dev/null
+++ b/pkgs/applications/audio/orca-c/default.nix
@@ -0,0 +1,38 @@
+{ lib, stdenv, fetchgit, ncurses, portmidi }:
+stdenv.mkDerivation {
+  pname = "orca-c";
+  version = "unstable-2021-02-13";
+
+  src = fetchgit {
+    url = "https://git.sr.ht/~rabbits/orca";
+    rev = "5ba56ca67baae3db140f8b7a2b2fc46bbac5602f";
+    sha256 = "sha256-bbIH0kyHRTcMGXV3WdBQIH1br0FyIzKKL88wqpGZ0NY=";
+  };
+
+  buildInputs = [ ncurses portmidi ];
+
+  postPatch = ''
+    patchShebangs tool
+    sed -i tool \
+      -e 's@ncurses_dir=.*@ncurses_dir="${ncurses}"@' \
+      -e 's@portmidi_dir=.*@portmidi_dir="${portmidi}"@' tool
+  '';
+
+  installPhase = ''
+    runHook preInstall
+
+    mkdir -p $out/bin
+    install build/orca $out/bin/orca
+
+    runHook postInstall
+  '';
+
+  meta = with lib; {
+    description = "An esoteric programming language designed to quickly create procedural sequencers";
+    homepage = "https://git.sr.ht/~rabbits/orca";
+    license = licenses.mit;
+    platforms = platforms.all;
+    maintainers = with maintainers; [ netcrns ];
+    mainProgram = "orca";
+  };
+}
diff --git a/pkgs/applications/audio/osmid/default.nix b/pkgs/applications/audio/osmid/default.nix
new file mode 100644
index 00000000000..1a65826dca3
--- /dev/null
+++ b/pkgs/applications/audio/osmid/default.nix
@@ -0,0 +1,37 @@
+{ lib, stdenv
+, fetchFromGitHub
+, cmake
+, alsa-lib
+, libX11
+}:
+
+stdenv.mkDerivation rec {
+  pname = "osmid";
+  version = "0.8.0";
+
+  src = fetchFromGitHub {
+    owner = "llloret";
+    repo = "osmid";
+    rev = "v${version}";
+    sha256 = "1s1wsrp6g6wb0y61xzxvaj59mwycrgy52r4h456086zkz10ls6hw";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  buildInputs = [ alsa-lib libX11 ];
+
+  installPhase = ''
+    runHook preInstall
+    mkdir -p $out/bin
+    cp {m2o,o2m} $out/bin/
+    runHook postInstall
+  '';
+
+  meta = with lib; {
+    homepage = "https://github.com/llloret/osmid";
+    description = "A lightweight, portable, easy to use tool to convert MIDI to OSC and OSC to MIDI";
+    license = licenses.mit;
+    maintainers = with maintainers; [ c0deaddict ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/pkgs/applications/audio/oxefmsynth/default.nix b/pkgs/applications/audio/oxefmsynth/default.nix
new file mode 100644
index 00000000000..0e3e801d18c
--- /dev/null
+++ b/pkgs/applications/audio/oxefmsynth/default.nix
@@ -0,0 +1,43 @@
+{ stdenv, lib, fetchFromGitHub, unzip, fetchzip, libX11 }:
+
+let
+
+  vst-sdk = stdenv.mkDerivation rec {
+    name = "vstsdk3610_11_06_2018_build_37";
+    src = fetchzip {
+      url = "https://web.archive.org/web/20181016150224if_/https://download.steinberg.net/sdk_downloads/${name}.zip";
+      sha256 = "0da16iwac590wphz2sm5afrfj42jrsnkr1bxcy93lj7a369ildkj";
+    };
+    installPhase = "cp -r . $out";
+  };
+
+in stdenv.mkDerivation rec {
+  pname = "oxefmsynth";
+  version = "1.3.5";
+
+  src = fetchFromGitHub {
+    owner = "oxesoft";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "1rk71ls33a38wx8i22plsi7d89cqqxrfxknq5i4f9igsw1ipm4gn";
+  };
+
+  NIX_CFLAGS_COMPILE = [ "-Wno-narrowing" ];
+
+  buildFlags = [ "VSTSDK_PATH=${vst-sdk}/VST2_SDK" ];
+
+  buildInputs = [ libX11 ];
+
+  installPhase = ''
+    mkdir -p $out/lib/lxvst
+    install -Dm644 oxevst64.so -t $out/lib/lxvst
+  '';
+
+  meta = with lib; {
+    homepage = "https://github.com/oxesoft/oxefmsynth";
+    description = "An open source VST 2.4 instrument plugin";
+    maintainers = [ maintainers.hirenashah ];
+    platforms = [ "x86_64-linux" ];
+    license = licenses.gpl3Only;
+  };
+}
diff --git a/pkgs/applications/audio/padthv1/default.nix b/pkgs/applications/audio/padthv1/default.nix
new file mode 100644
index 00000000000..2c4581cc731
--- /dev/null
+++ b/pkgs/applications/audio/padthv1/default.nix
@@ -0,0 +1,23 @@
+{ lib, fetchurl, pkg-config, libjack2, alsa-lib, libsndfile, liblo, lv2, qt5, fftwFloat, mkDerivation }:
+
+mkDerivation rec {
+  pname = "padthv1";
+  version = "0.9.23";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/padthv1/${pname}-${version}.tar.gz";
+    sha256 = "sha256-9yFfvlskOYnGraou2S3Qffl8RoYJqE0wnDlOP8mxQgg=";
+  };
+
+  buildInputs = [ libjack2 alsa-lib libsndfile liblo lv2 qt5.qtbase qt5.qttools fftwFloat ];
+
+  nativeBuildInputs = [ pkg-config ];
+
+  meta = with lib; {
+    description = "polyphonic additive synthesizer";
+    homepage = "http://padthv1.sourceforge.net/";
+    license = licenses.gpl2Plus;
+    platforms = platforms.linux;
+    maintainers = [ maintainers.magnetophon ];
+  };
+}
diff --git a/pkgs/applications/audio/pamix/default.nix b/pkgs/applications/audio/pamix/default.nix
new file mode 100644
index 00000000000..4a2ad9ab779
--- /dev/null
+++ b/pkgs/applications/audio/pamix/default.nix
@@ -0,0 +1,44 @@
+{ lib, stdenv, fetchFromGitHub, fetchpatch
+, pkg-config, cmake
+, libpulseaudio, ncurses }:
+
+stdenv.mkDerivation rec {
+  pname = "pamix";
+  version = "1.6";
+
+  src = fetchFromGitHub {
+    owner  = "patroclos";
+    repo   = "pamix";
+    rev    = version;
+    sha256 = "1d44ggnwkf2gff62959pj45v3a2k091q8v154wc5pmzamam458wp";
+  };
+
+  patches = [
+    # ncurses-6.3 support, included in next release
+    (fetchpatch {
+      name = "ncurses-6.3-p1.patch";
+      url = "https://github.com/patroclos/PAmix/commit/3400b9c048706c572373e4617b4d5fcdb8dd2505.patch";
+      sha256 = "0rw56a844pz876ad9p8hfvn2fkd5rh29gpp47h55g08spf0vwb2z";
+    })
+    (fetchpatch {
+      name = "ncurses-6.3-p2.patch";
+      url = "https://github.com/patroclos/PAmix/commit/5ef67fc5ef6fc0dc0b48ff07ba48093881561d9c.patch";
+      sha256 = "0f8shpdv2swxdz04bkqgmkvl6c17r5mn4slzr7xd6pvw8hh51p4h";
+    })
+  ];
+
+  preConfigure = ''
+    substituteInPlace CMakeLists.txt --replace "/etc" "$out/etc/xdg"
+  '';
+
+  nativeBuildInputs = [ cmake pkg-config ];
+  buildInputs = [ libpulseaudio ncurses ];
+
+  meta = with lib; {
+    description = "Pulseaudio terminal mixer";
+    homepage    = "https://github.com/patroclos/PAmix";
+    license     = licenses.mit;
+    platforms   = platforms.linux;
+    maintainers = with maintainers; [ ericsagnes ];
+  };
+}
diff --git a/pkgs/applications/audio/pamixer/default.nix b/pkgs/applications/audio/pamixer/default.nix
new file mode 100644
index 00000000000..ac3df5c5f95
--- /dev/null
+++ b/pkgs/applications/audio/pamixer/default.nix
@@ -0,0 +1,35 @@
+{ lib, stdenv, fetchFromGitHub, boost, libpulseaudio }:
+
+stdenv.mkDerivation rec {
+  pname = "pamixer";
+  version = "1.5";
+
+  src = fetchFromGitHub {
+    owner = "cdemoulins";
+    repo = "pamixer";
+    rev = version;
+    sha256 = "sha256-7VNhHAQ1CecQPlqb8SMKK0U1SsFZxDuS+QkPqJfMqrQ=";
+  };
+
+  buildInputs = [ boost libpulseaudio ];
+
+  makeFlags = [ "PREFIX=$(out)" ];
+
+  meta = with lib; {
+    description = "Pulseaudio command line mixer";
+    longDescription = ''
+      Features:
+        - Get the current volume of the default sink, the default source or a selected one by its 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";
+    maintainers = with maintainers; [ thiagokokada ];
+    license = licenses.gpl3;
+    platforms = platforms.linux;
+    mainProgram = "pamixer";
+  };
+}
diff --git a/pkgs/applications/audio/paprefs/default.nix b/pkgs/applications/audio/paprefs/default.nix
new file mode 100644
index 00000000000..ef45cc4676a
--- /dev/null
+++ b/pkgs/applications/audio/paprefs/default.nix
@@ -0,0 +1,52 @@
+{ fetchurl
+, lib
+, stdenv
+, meson
+, ninja
+, gettext
+, pkg-config
+, pulseaudioFull
+, glibmm
+, gtkmm3
+, wrapGAppsHook
+}:
+
+stdenv.mkDerivation rec {
+  pname = "paprefs";
+  version = "1.2";
+
+  src = fetchurl {
+    url = "https://freedesktop.org/software/pulseaudio/paprefs/paprefs-${version}.tar.xz";
+    sha256 = "sha256-s/IeQNw5NtFeP/yRD7DAfBS4jowodxW0VqlIwXY49jM=";
+  };
+
+  nativeBuildInputs = [
+    meson
+    ninja
+    gettext
+    pkg-config
+    wrapGAppsHook
+  ];
+
+  buildInputs = [
+    pulseaudioFull
+    glibmm
+    gtkmm3
+  ];
+
+  meta = with 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/pkgs/applications/audio/parlatype/default.nix b/pkgs/applications/audio/parlatype/default.nix
new file mode 100644
index 00000000000..c1bb1102bf1
--- /dev/null
+++ b/pkgs/applications/audio/parlatype/default.nix
@@ -0,0 +1,66 @@
+{ lib, stdenv, fetchFromGitHub, pkg-config, meson, gtk3, at-spi2-core, dbus, gst_all_1, sphinxbase, pocketsphinx, ninja, gettext, appstream-glib, python3, glib, gobject-introspection, gsettings-desktop-schemas, itstool, wrapGAppsHook, hicolor-icon-theme }:
+
+stdenv.mkDerivation rec {
+  pname = "parlatype";
+  version = "2.1";
+
+  src = fetchFromGitHub {
+    owner  = "gkarsay";
+    repo   = pname;
+    rev    = "v${version}";
+    sha256 = "1k53q0kbwpnbgyr0lmfzf5sm4f93d8nbjrzdz9pdhzpxgihndg25";
+  };
+
+  nativeBuildInputs = [
+    pkg-config
+    meson
+    ninja
+    gettext
+    appstream-glib
+    python3
+    gobject-introspection
+    itstool
+    wrapGAppsHook
+  ];
+
+  buildInputs = [
+    gtk3
+    at-spi2-core
+    dbus
+    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-plugins-ugly
+    gst_all_1.gst-libav
+    sphinxbase
+    pocketsphinx
+    glib
+    gsettings-desktop-schemas
+    hicolor-icon-theme
+  ];
+
+  postPatch = ''
+    chmod +x data/meson_post_install.py
+    patchShebangs data/meson_post_install.py
+  '';
+
+  doCheck = false;
+
+  buildPhase = ''
+    export GST_PLUGIN_SYSTEM_PATH_1_0="$out/lib/gstreamer-1.0/:$GST_PLUGIN_SYSTEM_PATH_1_0"
+  '';
+
+  meta = with lib; {
+    description = "GNOME audio player for transcription";
+    longDescription = ''
+      Parlatype is a minimal audio player for manual speech transcription, written for the GNOME desktop environment.
+      It plays audio sources to transcribe them in your favourite text application.
+      It’s intended to be useful for journalists, students, scientists and whoever needs to transcribe audio files.
+    '';
+    homepage = "https://gkarsay.github.io/parlatype/";
+    license = licenses.gpl3Plus;
+    maintainers = [ maintainers.melchips ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/pkgs/applications/audio/patchage/default.nix b/pkgs/applications/audio/patchage/default.nix
new file mode 100644
index 00000000000..f37cf8c5b32
--- /dev/null
+++ b/pkgs/applications/audio/patchage/default.nix
@@ -0,0 +1,26 @@
+{ lib, stdenv, alsa-lib, boost, dbus-glib, fetchsvn, ganv, glibmm
+, gtkmm2, libjack2, pkg-config, python2, wafHook
+}:
+
+stdenv.mkDerivation {
+  pname = "patchage";
+  version = "1.0.1";
+  src = fetchsvn {
+    url = "http://svn.drobilla.net/lad/trunk/patchage/";
+    rev = "5821";
+    sha256 = "1ar64l0sg468qzxj7i6ppgfqjpm92awcp5lzskamrf3ln17lrgj7";
+  };
+
+  buildInputs = [
+    alsa-lib boost dbus-glib ganv glibmm gtkmm2 libjack2
+    pkg-config python2 wafHook
+  ];
+
+  meta = {
+    description = "Modular patch bay for Jack and ALSA systems";
+    homepage = "http://non.tuxfamily.org";
+    license = lib.licenses.lgpl3;
+    platforms = lib.platforms.linux;
+    maintainers = [ lib.maintainers.nico202 ];
+  };
+}
diff --git a/pkgs/applications/audio/paulstretch/default.nix b/pkgs/applications/audio/paulstretch/default.nix
new file mode 100644
index 00000000000..1d701004622
--- /dev/null
+++ b/pkgs/applications/audio/paulstretch/default.nix
@@ -0,0 +1,59 @@
+{ lib, stdenv, fetchFromGitHub, fetchpatch
+, audiofile, libvorbis, fltk, fftw, fftwFloat
+, minixml, pkg-config, libmad, libjack2, portaudio, libsamplerate
+}:
+
+stdenv.mkDerivation {
+  pname = "paulstretch";
+  version = "2.2-2";
+
+  src = fetchFromGitHub {
+    owner = "paulnasca";
+    repo = "paulstretch_cpp";
+    rev = "7f5c3993abe420661ea0b808304b0e2b4b0048c5";
+    sha256 = "06dy03dbz1yznhsn0xvsnkpc5drzwrgxbxdx0hfpsjn2xcg0jrnc";
+  };
+
+  nativeBuildInputs = [ pkg-config ];
+
+  buildInputs = [
+    audiofile
+    libvorbis
+    fltk
+    fftw
+    fftwFloat
+    minixml
+    libmad
+    libjack2
+    portaudio
+    libsamplerate
+  ];
+
+  patches = [
+    (fetchpatch {
+      url = "https://github.com/paulnasca/paulstretch_cpp/pull/12.patch";
+      sha256 = "0lx1rfrs53afkiz1drp456asqgj5yv6hx3lkc01165cv1jsbw6q4";
+    })
+  ];
+
+  buildPhase = ''
+    bash compile_linux_fftw_jack.sh
+  '';
+
+  installPhase = ''
+    install -Dm555 ./paulstretch $out/bin/paulstretch
+  '';
+
+  meta = with lib; {
+    description = "Produces high quality extreme sound stretching";
+    longDescription = ''
+      This is a program for stretching the audio. It is suitable only for
+      extreme sound stretching of the audio (like 50x) and for applying
+      special effects by "spectral smoothing" the sounds.
+      It can transform any sound/music to a texture.
+    '';
+    homepage = "http://hypermammut.sourceforge.net/paulstretch/";
+    platforms = platforms.linux;
+    license = licenses.gpl2;
+  };
+}
diff --git a/pkgs/applications/audio/pavucontrol/default.nix b/pkgs/applications/audio/pavucontrol/default.nix
new file mode 100644
index 00000000000..41e5eeb8229
--- /dev/null
+++ b/pkgs/applications/audio/pavucontrol/default.nix
@@ -0,0 +1,54 @@
+{ fetchurl
+, fetchpatch
+, lib
+, stdenv
+, pkg-config
+, intltool
+, libpulseaudio
+, gtkmm3
+, libsigcxx
+, libcanberra-gtk3
+, json-glib
+, gnome
+, wrapGAppsHook
+}:
+
+stdenv.mkDerivation rec {
+  pname = "pavucontrol";
+  version = "5.0";
+
+  src = fetchurl {
+    url = "https://freedesktop.org/software/pulseaudio/${pname}/${pname}-${version}.tar.xz";
+    sha256 = "sha256-zityw7XxpwrQ3xndgXUPlFW9IIcNHTo20gU2ry6PTno=";
+  };
+
+  buildInputs = [
+    libpulseaudio
+    gtkmm3
+    libsigcxx
+    libcanberra-gtk3
+    json-glib
+    gnome.adwaita-icon-theme
+  ];
+
+  nativeBuildInputs = [ pkg-config intltool wrapGAppsHook ];
+
+  configureFlags = [ "--disable-lynx" ];
+
+  meta = with 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 = lib.licenses.gpl2Plus;
+
+    maintainers = with maintainers; [ abbradar globin ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/pkgs/applications/audio/pd-plugins/cyclone/default.nix b/pkgs/applications/audio/pd-plugins/cyclone/default.nix
new file mode 100644
index 00000000000..03df731aef5
--- /dev/null
+++ b/pkgs/applications/audio/pd-plugins/cyclone/default.nix
@@ -0,0 +1,33 @@
+{ lib, stdenv, fetchFromGitHub, puredata }:
+
+stdenv.mkDerivation rec {
+  pname = "cyclone";
+  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 = lib.licenses.tcltk;
+    maintainers = [ lib.maintainers.magnetophon ];
+    platforms = lib.platforms.linux;
+  };
+}
diff --git a/pkgs/applications/audio/pd-plugins/gem/default.nix b/pkgs/applications/audio/pd-plugins/gem/default.nix
new file mode 100644
index 00000000000..aeb58911623
--- /dev/null
+++ b/pkgs/applications/audio/pd-plugins/gem/default.nix
@@ -0,0 +1,50 @@
+{ lib, stdenv
+, fetchFromGitHub
+, fetchpatch
+, autoreconfHook
+, pkg-config
+, puredata
+, libGL
+, libGLU
+, glew
+, freeglut
+, libv4l
+, libX11
+, file
+ }:
+
+stdenv.mkDerivation rec {
+  pname = "gem-unstable";
+  version = "2020-09-22";
+
+  src = fetchFromGitHub {
+    owner = "umlaeute";
+    repo = "Gem";
+    rev = "2edfde4f0587e72ef325e7f53681936dcc19655b";
+    sha256 = "0k5sq128wxi2qhaidspkw310pdgysxs47agv09pkjgvch2n4d5dq";
+  };
+
+  nativeBuildInputs = [
+    autoreconfHook
+    file
+    pkg-config
+  ];
+
+  buildInputs = [
+    puredata
+    libGL
+    libGLU
+    glew
+    freeglut
+    libv4l
+    libX11
+  ];
+
+  meta = {
+    description = "Graphics Environment for Multimedia";
+    homepage = "http://puredata.info/downloads/gem";
+    license = lib.licenses.gpl2Plus;
+    maintainers = [ lib.maintainers.raboof ];
+    platforms = lib.platforms.linux;
+  };
+}
diff --git a/pkgs/applications/audio/pd-plugins/helmholtz/default.nix b/pkgs/applications/audio/pd-plugins/helmholtz/default.nix
new file mode 100644
index 00000000000..feaf9ed70cf
--- /dev/null
+++ b/pkgs/applications/audio/pd-plugins/helmholtz/default.nix
@@ -0,0 +1,47 @@
+{ lib, stdenv, fetchurl, unzip, puredata }:
+
+stdenv.mkDerivation {
+  name = "helmholtz";
+
+  src = fetchurl {
+    url = "https://www.katjaas.nl/helmholtz/helmholtz~.zip";
+    name = "helmholtz.zip";
+    curlOpts = "--user-agent ''";
+    sha256 = "0h1fj7lmvq9j6rmw33rb8k0byxb898bi2xhcwkqalb84avhywgvs";
+  };
+
+  nativeBuildInputs = [ unzip ];
+  buildInputs = [ 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 = lib.licenses.bsd3;
+    maintainers = [ lib.maintainers.magnetophon ];
+    platforms = lib.platforms.linux;
+  };
+}
diff --git a/pkgs/applications/audio/pd-plugins/maxlib/default.nix b/pkgs/applications/audio/pd-plugins/maxlib/default.nix
new file mode 100644
index 00000000000..1fc3475bc6a
--- /dev/null
+++ b/pkgs/applications/audio/pd-plugins/maxlib/default.nix
@@ -0,0 +1,33 @@
+{ lib, stdenv, fetchFromGitHub, puredata }:
+
+stdenv.mkDerivation rec {
+  pname = "maxlib";
+  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 = lib.licenses.gpl2;
+    maintainers = [ lib.maintainers.magnetophon ];
+    platforms = lib.platforms.linux;
+  };
+}
diff --git a/pkgs/applications/audio/pd-plugins/mrpeach/default.nix b/pkgs/applications/audio/pd-plugins/mrpeach/default.nix
new file mode 100644
index 00000000000..71f5e9438e1
--- /dev/null
+++ b/pkgs/applications/audio/pd-plugins/mrpeach/default.nix
@@ -0,0 +1,62 @@
+{ lib, stdenv, fetchurl, puredata }:
+
+stdenv.mkDerivation {
+  pname = "mrpeach";
+  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 = lib.licenses.gpl2;
+    maintainers = [ lib.maintainers.magnetophon ];
+    platforms = lib.platforms.linux;
+  };
+}
diff --git a/pkgs/applications/audio/pd-plugins/puremapping/default.nix b/pkgs/applications/audio/pd-plugins/puremapping/default.nix
new file mode 100644
index 00000000000..811b8c2ee9a
--- /dev/null
+++ b/pkgs/applications/audio/pd-plugins/puremapping/default.nix
@@ -0,0 +1,32 @@
+{ lib, stdenv, fetchurl, unzip, puredata }:
+
+stdenv.mkDerivation rec {
+  pname = "puremapping";
+  version = "20160130";
+
+  src = fetchurl {
+    url = "https://www.chnry.net/data/puremapping-${version}-generic.zip";
+    name = "puremapping";
+    sha256 = "1h7qgqd8srrxw2y1rkdw5js4k6f5vc8x6nlm2mq9mq9vjck7n1j7";
+  };
+
+  nativeBuildInputs = [ unzip ];
+  buildInputs = [ 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 = lib.licenses.gpl1;
+    maintainers = [ lib.maintainers.magnetophon ];
+    platforms = lib.platforms.linux;
+  };
+}
diff --git a/pkgs/applications/audio/pd-plugins/timbreid/default.nix b/pkgs/applications/audio/pd-plugins/timbreid/default.nix
new file mode 100644
index 00000000000..7fd2adefce0
--- /dev/null
+++ b/pkgs/applications/audio/pd-plugins/timbreid/default.nix
@@ -0,0 +1,46 @@
+{ lib, stdenv, fetchurl, unzip, puredata, fftw }:
+
+stdenv.mkDerivation rec {
+  version = "0.7.0";
+  pname = "timbreid";
+
+  src = fetchurl {
+    url = "http://williambrent.conflations.com/pd/timbreID-${version}-src.zip";
+    sha256 = "14k2xk5zrzrw1zprdbwx45hrlc7ck8vq4drpd3l455i5r8yk4y6b";
+  };
+
+  nativeBuildInputs = [ unzip ];
+  buildInputs = [ 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 = lib.licenses.gpl3;
+    maintainers = [ lib.maintainers.magnetophon ];
+    platforms = lib.platforms.linux;
+  };
+}
diff --git a/pkgs/applications/audio/pd-plugins/zexy/default.nix b/pkgs/applications/audio/pd-plugins/zexy/default.nix
new file mode 100644
index 00000000000..67c7cd18be8
--- /dev/null
+++ b/pkgs/applications/audio/pd-plugins/zexy/default.nix
@@ -0,0 +1,36 @@
+{ lib, stdenv, fetchurl, autoconf, automake, puredata }:
+
+stdenv.mkDerivation rec {
+  pname = "zexy";
+  version = "2.2.4";
+
+  src = fetchurl {
+    url = "https://puredata.info/downloads/zexy/releases/${version}/${pname}-${version}.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 = lib.licenses.gpl2;
+    maintainers = [ lib.maintainers.magnetophon ];
+    platforms = lib.platforms.linux;
+  };
+}
diff --git a/pkgs/applications/audio/petrifoo/default.nix b/pkgs/applications/audio/petrifoo/default.nix
new file mode 100644
index 00000000000..f76720aff90
--- /dev/null
+++ b/pkgs/applications/audio/petrifoo/default.nix
@@ -0,0 +1,27 @@
+{ lib, stdenv, fetchurl, alsa-lib, cmake, gtk2, libjack2, libgnomecanvas
+, libpthreadstubs, libsamplerate, libsndfile, libtool, libxml2
+, pkg-config, openssl }:
+
+stdenv.mkDerivation  rec {
+  pname = "petri-foo";
+  version = "0.1.87";
+
+  src = fetchurl {
+    url =  "mirror://sourceforge/petri-foo/${pname}-${version}.tar.bz2";
+    sha256 = "0b25iicgn8c42487fdw32ycfrll1pm2zjgy5djvgw6mfcaa4gizh";
+  };
+
+  nativeBuildInputs = [ cmake pkg-config ];
+
+  buildInputs = [ alsa-lib gtk2 libjack2 libgnomecanvas libpthreadstubs
+                  libsamplerate libsndfile libtool libxml2 openssl ];
+
+  meta = with 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/pkgs/applications/audio/pianobar/default.nix b/pkgs/applications/audio/pianobar/default.nix
new file mode 100644
index 00000000000..c5ef0352503
--- /dev/null
+++ b/pkgs/applications/audio/pianobar/default.nix
@@ -0,0 +1,28 @@
+{ fetchurl, lib, stdenv, pkg-config, libao, json_c, libgcrypt, ffmpeg, curl }:
+
+stdenv.mkDerivation rec {
+  pname = "pianobar";
+  version = "2020.11.28";
+
+  src = fetchurl {
+    url = "https://6xq.net/projects/pianobar/${pname}-${version}.tar.bz2";
+    sha256 = "1znlwybfpxsjqr1jmr8j0ci8wzmpzmk2yxb0qcx9w9a8nnbgnfv5";
+  };
+
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = [
+    libao json_c libgcrypt ffmpeg curl
+  ];
+
+  makeFlags = [ "PREFIX=$(out)" ];
+
+  CC = "gcc";
+  CFLAGS = "-std=c99";
+
+  meta = with lib; {
+    description = "A console front-end for Pandora.com";
+    homepage = "https://6xq.net/pianobar/";
+    platforms = platforms.unix;
+    license = licenses.mit; # expat version
+  };
+}
diff --git a/pkgs/applications/audio/pianobooster/default.nix b/pkgs/applications/audio/pianobooster/default.nix
new file mode 100644
index 00000000000..2c58ecc5dcb
--- /dev/null
+++ b/pkgs/applications/audio/pianobooster/default.nix
@@ -0,0 +1,31 @@
+{ lib, stdenv, fetchFromGitHub, cmake, pkg-config, qttools
+, alsa-lib, ftgl, libGLU, libjack2, qtbase, rtmidi, wrapQtAppsHook
+}:
+
+stdenv.mkDerivation rec {
+  pname = "pianobooster";
+  version = "0.7.2b";
+
+  src = fetchFromGitHub {
+    owner = "captnfab";
+    repo = "PianoBooster";
+    rev = "v${version}";
+    sha256 = "03xcdnlpsij22ca3i6xj19yqzn3q2ch0d32r73v0c96nm04gvhjj";
+  };
+
+  nativeBuildInputs = [ cmake pkg-config qttools wrapQtAppsHook ];
+
+  buildInputs = [ alsa-lib ftgl libGLU libjack2 qtbase rtmidi ];
+
+  cmakeFlags = [
+    "-DOpenGL_GL_PREFERENCE=GLVND"
+  ];
+
+  meta = with lib; {
+    description = "A MIDI file player that teaches you how to play the piano";
+    homepage = "https://github.com/captnfab/PianoBooster";
+    license = licenses.gpl3Plus;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ goibhniu orivej ];
+  };
+}
diff --git a/pkgs/applications/audio/pianoteq/default.nix b/pkgs/applications/audio/pianoteq/default.nix
new file mode 100644
index 00000000000..9c258f69f66
--- /dev/null
+++ b/pkgs/applications/audio/pianoteq/default.nix
@@ -0,0 +1,200 @@
+{ lib, stdenv, curl, gnugrep, jq, xorg, alsa-lib, freetype, p7zip, autoPatchelfHook, writeShellScript, zlib, libjack2, makeWrapper }:
+let
+  versionForFile = v: builtins.replaceStrings ["."] [""] v;
+
+  mkPianoteq = { name, src, version, archdir, ... }:
+    stdenv.mkDerivation rec {
+      inherit src version;
+
+      pname = "pianoteq-${name}";
+
+      unpackPhase = ''
+        ${p7zip}/bin/7z x $src
+      '';
+
+      nativeBuildInputs = [
+        autoPatchelfHook
+        makeWrapper
+      ];
+
+      buildInputs = [
+        stdenv.cc.cc.lib
+        xorg.libX11      # libX11.so.6
+        xorg.libXext     # libXext.so.6
+        alsa-lib          # libasound.so.2
+        freetype         # libfreetype.so.6
+      ];
+
+      installPhase = ''
+        mkdir -p $out/bin
+        mv -t $out/bin Pianoteq*/${archdir}/*
+        for f in $out/bin/Pianoteq*; do
+          if [ -x "$f" ] && [ -f "$f" ]; then
+            wrapProgram "$f" --prefix LD_LIBRARY_PATH : ${
+              lib.makeLibraryPath (buildInputs ++ [
+                xorg.libXcursor
+                xorg.libXinerama
+                xorg.libXrandr
+                libjack2
+                zlib
+              ])
+            }
+          fi
+        done
+      '';
+
+      meta = with lib; {
+        homepage = "https://www.modartt.com/pianoteq";
+        description = "Software synthesizer that features real-time MIDI-control of digital physically modeled pianos and related instruments";
+        license = licenses.unfree;
+        platforms = [ "x86_64-linux" ]; # TODO extract binary according to each platform?
+        maintainers = [ maintainers.mausch ];
+      };
+    };
+
+  fetchWithCurlScript = { name, sha256, script, impureEnvVars ? [] }:
+    stdenv.mkDerivation {
+      inherit name;
+      builder = writeShellScript "builder.sh" ''
+        source $stdenv/setup
+
+        curlVersion=$(${curl}/bin/curl -V | head -1 | cut -d' ' -f2)
+
+        # Curl flags to handle redirects, not use EPSV, handle cookies for
+        # servers to need them during redirects, and work on SSL without a
+        # certificate (this isn't a security problem because we check the
+        # cryptographic hash of the output anyway).
+        curl=(
+            ${curl}/bin/curl
+            --location
+            --max-redirs 20
+            --retry 3
+            --disable-epsv
+            --cookie-jar cookies
+            --insecure
+            --user-agent "curl/$curlVersion Nixpkgs/${lib.trivial.release}"
+            $NIX_CURL_FLAGS
+        )
+
+        ${script}
+
+      '';
+      nativeBuildInputs = [ curl ];
+      outputHashAlgo = "sha256";
+      outputHash = sha256;
+
+      impureEnvVars = lib.fetchers.proxyImpureEnvVars ++ impureEnvVars ++ [
+        # This variable allows the user to pass additional options to curl
+        "NIX_CURL_FLAGS"
+      ];
+    };
+
+  fetchPianoteqTrial = { name, sha256 }:
+    fetchWithCurlScript {
+      inherit name sha256;
+      script = ''
+          "''${curl[@]}" --silent --request POST \
+            --cookie cookies \
+            --header "modartt-json: request" \
+            --header "origin: https://www.modartt.com" \
+            --header "content-type: application/json; charset=UTF-8" \
+            --header "accept: application/json, text/javascript, */*" \
+            --data-raw '{"file": "${name}", "get": "url"}' \
+            https://www.modartt.com/json/download -o /dev/null
+          json=$(
+            "''${curl[@]}" --silent --request POST \
+            --cookie cookies \
+            --header "modartt-json: request" \
+            --header "origin: https://www.modartt.com" \
+            --header "content-type: application/json; charset=UTF-8" \
+            --header "accept: application/json, text/javascript, */*" \
+            --data-raw '{"file": "${name}", "get": "url"}' \
+            https://www.modartt.com/json/download
+          )
+          url=$(echo $json | ${jq}/bin/jq -r .url)
+          "''${curl[@]}" --progress-bar --cookie cookies -o $out "$url"
+      '';
+    };
+
+  fetchPianoteqWithLogin = { name, sha256 }:
+    fetchWithCurlScript {
+      inherit name sha256;
+
+      impureEnvVars = [ "NIX_MODARTT_USERNAME" "NIX_MODARTT_PASSWORD" ];
+
+      script = ''
+        if [ -z "''${NIX_MODARTT_USERNAME}" -o -z "''${NIX_MODARTT_PASSWORD}" ]; then
+          echo "Error: Downloading a personal Pianoteq instance requires the nix building process (nix-daemon in multi user mode) to have the NIX_MODARTT_USERNAME and NIX_MODARTT_PASSWORD env vars set." >&2
+          exit 1
+        fi
+
+        "''${curl[@]}" -s -o /dev/null "https://www.modartt.com/user_area"
+
+        ${jq}/bin/jq -n "{connect: 1, login: \"''${NIX_MODARTT_USERNAME}\", password: \"''${NIX_MODARTT_PASSWORD}\"}" > login.json
+
+        "''${curl[@]}" --silent --request POST \
+          --cookie cookies \
+          --referer "https://www.modartt.com/user_area" \
+          --header "modartt-json: request" \
+          --header "origin: https://www.modartt.com" \
+          --header "content-type: application/json; charset=UTF-8" \
+          --header "accept: application/json, text/javascript, */*" \
+          --data @login.json \
+          https://www.modartt.com/json/session
+
+        json=$(
+          "''${curl[@]}" --silent --request POST \
+          --cookie cookies \
+          --header "modartt-json: request" \
+          --header "origin: https://www.modartt.com" \
+          --header "content-type: application/json; charset=UTF-8" \
+          --header "accept: application/json, text/javascript, */*" \
+          --data-raw '{"file": "${name}", "get": "url"}' \
+          https://www.modartt.com/json/download
+        )
+        url=$(echo $json | ${jq}/bin/jq -r .url)
+
+        "''${curl[@]}" --progress-bar --cookie cookies -o $out "$url"
+      '';
+    };
+
+in {
+  # TODO currently can't install more than one because `lame` clashes
+  stage-trial = mkPianoteq rec {
+    name = "stage-trial";
+    version = "7.4.1";
+    archdir = "x86-64bit";
+    src = fetchPianoteqTrial {
+      name = "pianoteq_stage_linux_trial_v${versionForFile version}.7z";
+      sha256 = "14mbaz6i1rxqayrjjkck9yx8iijkm4q1qz29ymkd7sz2gpk7fcpa";
+    };
+  };
+  standard-trial = mkPianoteq rec {
+    name = "standard-trial";
+    version = "7.4.1";
+    archdir = "x86-64bit";
+    src = fetchPianoteqTrial {
+      name = "pianoteq_linux_trial_v${versionForFile version}.7z";
+      sha256 = "01xh4n0h7dd3xqhm0bx0a62mqmfvxvmr5cm5r2g249c9wqg5i32a";
+    };
+  };
+  stage-6 = mkPianoteq rec {
+    name = "stage-6";
+    version = "6.7.3";
+    archdir = "amd64";
+    src = fetchPianoteqWithLogin {
+      name = "pianoteq_stage_linux_v${versionForFile version}.7z";
+      sha256 = "0jy0hkdynhwv0zhrqkby0hdphgmcc09wxmy74rhg9afm1pzl91jy";
+    };
+  };
+  stage-7 = mkPianoteq rec {
+    name = "stage-7";
+    version = "7.3.0";
+    archdir = "x86-64bit";
+    src = fetchPianoteqWithLogin {
+      name = "pianoteq_stage_linux_v${versionForFile version}.7z";
+      sha256 = "05w7sv9v38r6ljz9xai816w5z2qqwx88hcfjm241fvgbs54125hx";
+    };
+  };
+  # TODO other paid binaries, I don't own that so I don't know their hash.
+}
diff --git a/pkgs/applications/audio/picard/default.nix b/pkgs/applications/audio/picard/default.nix
new file mode 100644
index 00000000000..340ba32a53d
--- /dev/null
+++ b/pkgs/applications/audio/picard/default.nix
@@ -0,0 +1,69 @@
+{ lib
+, python3Packages
+, fetchFromGitHub
+, gettext
+, chromaprint
+, qt5
+, enablePlayback ? true
+, gst_all_1
+}:
+
+let
+  pythonPackages = python3Packages;
+  pyqt5 = if enablePlayback then
+    pythonPackages.pyqt5_with_qtmultimedia
+  else
+    pythonPackages.pyqt5
+  ;
+in
+pythonPackages.buildPythonApplication rec {
+  pname = "picard";
+  version = "2.7.3";
+
+  src = fetchFromGitHub {
+    owner = "metabrainz";
+    repo = pname;
+    rev = "release-${version}";
+    sha256 = "1f589nc2zxl9cjw0qh164z9sfq4xl052ihf2gn2dgr35g3ny16kh";
+  };
+
+  nativeBuildInputs = [ gettext qt5.wrapQtAppsHook qt5.qtbase ]
+  ++ lib.optionals (pyqt5.multimediaEnabled) [
+    qt5.qtmultimedia.bin
+    gst_all_1.gst-libav
+    gst_all_1.gst-plugins-base
+    gst_all_1.gst-plugins-good
+    gst_all_1.gst-vaapi
+    gst_all_1.gstreamer
+  ]
+  ;
+
+  propagatedBuildInputs = with pythonPackages; [
+    chromaprint
+    python-dateutil
+    discid
+    fasteners
+    mutagen
+    pyqt5
+    markdown
+    pyjwt
+    pyyaml
+  ];
+
+  # In order to spare double wrapping, we use:
+  preFixup = ''
+    makeWrapperArgs+=("''${qtWrapperArgs[@]}")
+  ''
+  + lib.optionalString (pyqt5.multimediaEnabled) ''
+    makeWrapperArgs+=(--prefix GST_PLUGIN_SYSTEM_PATH_1_0 : "$GST_PLUGIN_SYSTEM_PATH_1_0")
+  ''
+  ;
+
+  meta = with lib; {
+    homepage = "https://picard.musicbrainz.org/";
+    description = "The official MusicBrainz tagger";
+    maintainers = with maintainers; [ ehmry ];
+    license = licenses.gpl2Plus;
+    platforms = platforms.all;
+  };
+}
diff --git a/pkgs/applications/audio/picoloop/default.nix b/pkgs/applications/audio/picoloop/default.nix
new file mode 100644
index 00000000000..bd956963a46
--- /dev/null
+++ b/pkgs/applications/audio/picoloop/default.nix
@@ -0,0 +1,50 @@
+{ lib, stdenv, fetchFromGitHub, libpulseaudio, SDL2, SDL2_image, SDL2_ttf, alsa-lib, libjack2 }:
+
+stdenv.mkDerivation rec {
+  pname = "picoloop";
+  version = "0.77e";
+
+  src = fetchFromGitHub {
+    repo = pname;
+    owner = "yoyz";
+    rev = "${pname}-${version}";
+    sha256 = "0i8j8rgyha3ara6d4iis3wcimszf2csxdwrm5yq0wyhg74g7cvjd";
+  };
+
+  buildInputs = [
+    libpulseaudio
+    SDL2
+    SDL2.dev
+    SDL2_image
+    SDL2_ttf
+    alsa-lib
+    libjack2
+  ];
+
+  sourceRoot = "source/picoloop";
+
+  makeFlags = [ "-f Makefile.PatternPlayer_debian_RtAudio_sdl20" ];
+
+  NIX_CFLAGS_COMPILE = [ "-I${SDL2.dev}/include/SDL2" ];
+
+  hardeningDisable = [ "format" ];
+
+  patchPhase = ''
+    substituteInPlace SDL_GUI.cpp \
+    --replace "\"font.ttf\"" "\"$out/share/font.ttf\"" \
+    --replace "\"font.bmp\"" "\"$out/share/font.bmp\""
+  '';
+
+  installPhase = ''
+    mkdir -p $out/{bin,share}
+    cp PatternPlayer_debian_RtAudio_sdl20 $out/bin/picoloop
+    cp {font.*,LICENSE} $out/share
+  '';
+
+  meta = with lib; {
+    description = "A synth and a stepsequencer (a clone of the famous nanoloop)";
+    homepage = "https://github.com/yoyz/picoloop";
+    platforms = platforms.linux;
+    license = licenses.bsd3;
+  };
+}
diff --git a/pkgs/applications/audio/pithos/default.nix b/pkgs/applications/audio/pithos/default.nix
new file mode 100644
index 00000000000..76ef7b366ef
--- /dev/null
+++ b/pkgs/applications/audio/pithos/default.nix
@@ -0,0 +1,36 @@
+{ lib, fetchFromGitHub, meson, ninja, pkg-config, appstream-glib
+, wrapGAppsHook, pythonPackages, gtk3, gnome, gobject-introspection
+, libnotify, libsecret, gst_all_1 }:
+
+pythonPackages.buildPythonApplication rec {
+  pname = "pithos";
+  version = "1.5.1";
+
+  src = fetchFromGitHub {
+    owner = pname;
+    repo  = pname;
+    rev = version;
+    sha256 = "03j04b1mk2fq0ni2ydpw40fdd36k545z8a1pq9x5c779080cwpla";
+  };
+
+  format = "other";
+
+  postPatch = ''
+    chmod +x meson_post_install.py
+    patchShebangs meson_post_install.py
+  '';
+
+  nativeBuildInputs = [ meson ninja pkg-config appstream-glib wrapGAppsHook ];
+
+  propagatedBuildInputs =
+    [ gtk3 gobject-introspection libnotify libsecret gnome.adwaita-icon-theme ] ++
+    (with gst_all_1; [ gstreamer gst-plugins-base gst-plugins-good gst-plugins-ugly gst-plugins-bad ]) ++
+    (with pythonPackages; [ pygobject3 pylast ]);
+
+  meta = with lib; {
+    description = "Pandora Internet Radio player for GNOME";
+    homepage = "https://pithos.github.io/";
+    license = licenses.gpl3;
+    maintainers = with maintainers; [ obadz ];
+  };
+}
diff --git a/pkgs/applications/audio/playbar2/default.nix b/pkgs/applications/audio/playbar2/default.nix
new file mode 100644
index 00000000000..dfbfb43e625
--- /dev/null
+++ b/pkgs/applications/audio/playbar2/default.nix
@@ -0,0 +1,39 @@
+{ lib, stdenv
+, cmake
+, extra-cmake-modules
+, plasma-framework
+, kwindowsystem
+, fetchFromGitHub
+}:
+
+stdenv.mkDerivation rec {
+  pname = "playbar2";
+  version = "2.5";
+
+  src = fetchFromGitHub {
+    owner = "audoban";
+    repo = "PlayBar2";
+    rev = "v${version}";
+    sha256 = "0iv2m4flgaz2r0k7f6l0ca8p6cw8j8j2gin1gci2pg3l5g5khbch";
+  };
+
+  nativeBuildInputs = [
+    cmake
+    extra-cmake-modules
+  ];
+
+  buildInputs = [
+    plasma-framework
+    kwindowsystem
+  ];
+
+  dontWrapQtApps = true;
+
+  meta = with 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/pkgs/applications/audio/plexamp/default.nix b/pkgs/applications/audio/plexamp/default.nix
new file mode 100644
index 00000000000..4f0ca02b628
--- /dev/null
+++ b/pkgs/applications/audio/plexamp/default.nix
@@ -0,0 +1,41 @@
+{ lib, fetchurl, appimageTools, pkgs }:
+
+let
+  pname = "plexamp";
+  version = "4.0.3";
+
+  src = fetchurl {
+    url = "https://plexamp.plex.tv/plexamp.plex.tv/desktop/Plexamp-${version}.AppImage";
+    name="${pname}-${version}.AppImage";
+    sha512 = "Nh0+/ibZnjcGXgQUe+QvukWpaX6/0nNPR4NIK0i2Bn6kBkihv9bkfF9xGpgqeE6H3CK+4e6ywg8y9RR+pJBBSA==";
+  };
+
+  appimageContents = appimageTools.extractType2 {
+    inherit pname version src;
+  };
+in appimageTools.wrapType2 {
+  inherit pname version src;
+
+  multiPkgs = null; # no 32bit needed
+  extraPkgs = pkgs: appimageTools.defaultFhsEnvArgs.multiPkgs pkgs ++ [ pkgs.bash ];
+
+  extraInstallCommands = ''
+    ln -s $out/bin/${pname}-${version} $out/bin/${pname}
+    install -m 444 -D ${appimageContents}/plexamp.desktop $out/share/applications/plexamp.desktop
+    install -m 444 -D ${appimageContents}/plexamp.png \
+      $out/share/icons/hicolor/512x512/apps/plexamp.png
+    substituteInPlace $out/share/applications/${pname}.desktop \
+      --replace 'Exec=AppRun' 'Exec=${pname}'
+  '';
+
+  passthru.updateScript = ./update-plexamp.sh;
+
+  meta = with lib; {
+    description = "A beautiful Plex music player for audiophiles, curators, and hipsters";
+    homepage = "https://plexamp.com/";
+    changelog = "https://forums.plex.tv/t/plexamp-release-notes/221280/41";
+    license = licenses.unfree;
+    maintainers = with maintainers; [ killercup synthetica ];
+    platforms = [ "x86_64-linux" ];
+  };
+}
diff --git a/pkgs/applications/audio/plexamp/update-plexamp.sh b/pkgs/applications/audio/plexamp/update-plexamp.sh
new file mode 100755
index 00000000000..b6b8def1e31
--- /dev/null
+++ b/pkgs/applications/audio/plexamp/update-plexamp.sh
@@ -0,0 +1,54 @@
+#! /usr/bin/env nix-shell
+#! nix-shell -p yq bash curl bc ripgrep
+#! nix-shell -i bash
+
+set -Eeuxo pipefail
+
+cleanup() {
+    rm -rf "$TMPDIR"
+}
+
+trap cleanup EXIT
+
+ROOT="$(dirname "$(readlink -f "$0")")"
+if [ ! -f "$ROOT/default.nix" ]; then
+  echo "ERROR: cannot find default.nix in $ROOT"
+  exit 1
+fi
+
+if [ "$(basename "$ROOT")" != plexamp ]; then
+  echo "ERROR: folder not named plexamp"
+  exit 1
+fi
+
+TMPDIR="$(mktemp -d)"
+
+VERSION_FILE="$TMPDIR/version.yml"
+VERSION_URL="https://plexamp.plex.tv/plexamp.plex.tv/desktop/latest-linux.yml"
+curl "$VERSION_URL" -o "$VERSION_FILE"
+
+VERSION="$(yq -r .version "$VERSION_FILE")"
+SHA512="$(yq -r .sha512 "$VERSION_FILE")"
+
+DEFAULT_NIX="$ROOT/default.nix"
+WORKING_NIX="$TMPDIR/default.nix"
+cp "$DEFAULT_NIX" "$WORKING_NIX"
+
+sed -i "s@version = .*;@version = \"$VERSION\";@g" "$WORKING_NIX"
+
+if diff "$DEFAULT_NIX" "$WORKING_NIX"; then
+  echo "WARNING: no changes"
+  exit 0
+fi
+
+# update sha hash (convenietly provided)
+sed -i "s@sha.* = .*;@sha512 = \"$SHA512\";@g" "$WORKING_NIX"
+
+# update the changelog ("just" increment the number)
+CHANGELOG_URL=$(rg --only-matching 'changelog = "(.+)";' --replace '$1' $WORKING_NIX)
+CHANGELOG_NUMBER=$(rg --only-matching '.*/([0-9]+)' --replace '$1' <<< $CHANGELOG_URL)
+NEXT_CHANGELOG=$(($CHANGELOG_NUMBER + 1))
+NEXT_URL=$(rg --only-matching '(.*)/[0-9]+' --replace "\$1/$NEXT_CHANGELOG" <<< $CHANGELOG_URL)
+sed -i "s@changelog = \".*\";@changelog = \"$NEXT_URL\";@" $WORKING_NIX
+
+mv $WORKING_NIX $DEFAULT_NIX
diff --git a/pkgs/applications/audio/plugin-torture/default.nix b/pkgs/applications/audio/plugin-torture/default.nix
new file mode 100644
index 00000000000..e209d98ec71
--- /dev/null
+++ b/pkgs/applications/audio/plugin-torture/default.nix
@@ -0,0 +1,30 @@
+{ lib, stdenv, fetchFromGitHub, boost, ladspaH, lilv, lv2, pkg-config, serd, sord, sratom }:
+
+stdenv.mkDerivation {
+  pname = "plugin-torture";
+  version = "2016-07-25";
+
+  src = fetchFromGitHub {
+    owner = "cth103";
+    repo = "plugin-torture";
+    rev = "8b9c43197dca372da6b9c8212224ec86b5f16b4a";
+    sha256 = "1xyhvhm85d9z0kw716cjllrrzksn4s4bw34layg8hf4m5m31sp2p";
+  };
+
+  nativeBuildInputs = [ pkg-config ];
+  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 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/pkgs/applications/audio/plujain-ramp/default.nix b/pkgs/applications/audio/plujain-ramp/default.nix
new file mode 100644
index 00000000000..d8f5357efdb
--- /dev/null
+++ b/pkgs/applications/audio/plujain-ramp/default.nix
@@ -0,0 +1,27 @@
+{ lib, stdenv, fetchFromGitHub, lv2  }:
+
+stdenv.mkDerivation rec {
+  version = "1.1.3";
+  pname = "plujain-ramp";
+
+  src = fetchFromGitHub {
+    owner = "Houston4444";
+    repo = "plujain-ramp";
+    rev = "1bc1fed211e140c7330d6035122234afe78e5257";
+    sha256 = "1k7qpr8c15d623c4zqxwdklp98amildh03cqsnqq5ia9ba8z3016";
+  };
+
+  buildInputs = [
+    lv2
+  ];
+
+  installFlags = [ "INSTALL_PATH=$(out)/lib/lv2" ];
+
+  meta = with lib; {
+    description = "A mono rhythmic tremolo LV2 Audio Plugin";
+    homepage = "https://github.com/Houston4444/plujain-ramp";
+    license = licenses.gpl2Only;
+    platforms = platforms.linux;
+    maintainers = [ maintainers.hirenashah ];
+  };
+}
diff --git a/pkgs/applications/audio/pmidi/default.nix b/pkgs/applications/audio/pmidi/default.nix
new file mode 100644
index 00000000000..43f38ff84ed
--- /dev/null
+++ b/pkgs/applications/audio/pmidi/default.nix
@@ -0,0 +1,22 @@
+{ lib, stdenv, fetchurl, alsa-lib
+, version ? "1.7.1"
+, sourceSha256 ? "051mv6f13c8y13c1iv3279k1hhzpz4fm9sfczhgp9sim2bjdj055"
+}:
+stdenv.mkDerivation {
+  pname = "pmidi";
+  inherit version;
+
+  src = fetchurl {
+    url = "mirror://sourceforge/pmidi/${version}/pmidi-${version}.tar.gz";
+    sha256 = sourceSha256;
+  };
+
+  buildInputs = [ alsa-lib ];
+
+  meta = with lib; {
+    homepage = "https://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/pkgs/applications/audio/pocket-casts/default.nix b/pkgs/applications/audio/pocket-casts/default.nix
new file mode 100644
index 00000000000..46625253d0f
--- /dev/null
+++ b/pkgs/applications/audio/pocket-casts/default.nix
@@ -0,0 +1,55 @@
+{ lib, stdenv, fetchurl, dpkg, autoPatchelfHook, makeWrapper, electron
+, alsa-lib, gtk3, libXScrnSaver, libXtst, mesa, nss }:
+
+stdenv.mkDerivation rec {
+  pname = "pocket-casts";
+  version = "0.5.0";
+
+  src = fetchurl {
+    url = "https://github.com/felicianotech/pocket-casts-desktop-app/releases/download/v${version}/${pname}_${version}_amd64.deb";
+    sha256 = "sha256-frBtIxwRO/6k6j0itqN10t+9AyNadqXm8vC1YP960ts=";
+  };
+
+  nativeBuildInputs = [
+    dpkg
+    autoPatchelfHook
+    makeWrapper
+  ];
+
+  buildInputs = [ alsa-lib gtk3 libXScrnSaver libXtst mesa nss ];
+
+  dontBuild = true;
+  dontConfigure = true;
+
+  unpackPhase = ''
+    dpkg-deb -x ${src} ./
+  '';
+
+  installPhase = ''
+    runHook preInstall
+
+    mv usr $out
+    mv opt $out
+    mv "$out/opt/Pocket Casts" $out/opt/pocket-casts
+    mv $out/share/icons/hicolor/0x0 $out/share/icons/hicolor/256x256
+
+    runHook postInstall
+  '';
+
+  postFixup = ''
+    substituteInPlace $out/share/applications/pocket-casts.desktop \
+      --replace '"/opt/Pocket Casts/pocket-casts"' $out/bin/pocket-casts \
+      --replace '/usr/share/icons/hicolor/0x0/apps/pocket-casts.png' "pocket-casts"
+    makeWrapper ${electron}/bin/electron \
+      $out/bin/pocket-casts \
+      --add-flags $out/opt/pocket-casts/resources/app.asar
+  '';
+
+  meta = with lib; {
+    description = "Pocket Casts webapp, packaged for the Linux Desktop";
+    homepage = "https://github.com/felicianotech/pocket-casts-desktop-app";
+    license = licenses.mit;
+    maintainers = with maintainers; [ wolfangaukang ];
+    platforms = [ "x86_64-linux" ];
+  };
+}
diff --git a/pkgs/applications/audio/polyphone/default.nix b/pkgs/applications/audio/polyphone/default.nix
new file mode 100644
index 00000000000..4656db7257e
--- /dev/null
+++ b/pkgs/applications/audio/polyphone/default.nix
@@ -0,0 +1,49 @@
+{ lib, mkDerivation, fetchFromGitHub, qmake, pkg-config, alsa-lib, libjack2, portaudio, libogg, flac, libvorbis, rtmidi, qtsvg }:
+
+mkDerivation rec {
+  version = "2.2.0";
+  pname = "polyphone";
+
+  src = fetchFromGitHub {
+    owner = "davy7125";
+    repo = "polyphone";
+    rev = version;
+    sha256 = "0w5pidzhpwpggjn5la384fvjzkvprvrnidb06068whci11kgpbp7";
+  };
+
+  buildInputs = [
+    alsa-lib
+    libjack2
+    portaudio
+    libogg
+    flac
+    libvorbis
+    rtmidi
+    qtsvg
+  ];
+
+  nativeBuildInputs = [ qmake pkg-config ];
+
+  preConfigure = ''
+    cd ./sources/
+  '';
+
+  installPhase = ''
+    install -d $out/bin
+    install -m755 bin/polyphone $out/bin/
+  '';
+
+  qmakeFlags = [
+    "DEFINES+=USE_LOCAL_STK"
+    "DEFINES+=USE_LOCAL_QCUSTOMPLOT"
+    "INCLUDEPATH+=${libjack2}/include/jack"
+  ];
+
+  meta = with lib; {
+    description = "A soundfont editor for creating musical instruments";
+    homepage = "https://www.polyphone-soundfonts.com/";
+    license = licenses.gpl3;
+    maintainers = [ maintainers.maxdamantus ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/pkgs/applications/audio/ponymix/default.nix b/pkgs/applications/audio/ponymix/default.nix
new file mode 100644
index 00000000000..70e7217dff7
--- /dev/null
+++ b/pkgs/applications/audio/ponymix/default.nix
@@ -0,0 +1,26 @@
+{ lib, stdenv, fetchFromGitHub, libpulseaudio, libnotify, pkg-config }:
+
+stdenv.mkDerivation rec {
+  pname = "ponymix";
+  version = "5";
+
+  src = fetchFromGitHub {
+    owner  = "falconindy";
+    repo   = "ponymix";
+    rev    = version;
+    sha256 = "08yp7fprmzm6px5yx2rvzri0l60bra5h59l26pn0k071a37ks1rb";
+  };
+
+  buildInputs = [ libpulseaudio libnotify ];
+  nativeBuildInputs = [ pkg-config ];
+
+  postPatch = ''substituteInPlace Makefile --replace "\$(DESTDIR)/usr" "$out"'';
+
+  meta = with 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/pkgs/applications/audio/praat/default.nix b/pkgs/applications/audio/praat/default.nix
new file mode 100644
index 00000000000..b4f450b3101
--- /dev/null
+++ b/pkgs/applications/audio/praat/default.nix
@@ -0,0 +1,34 @@
+{ lib, stdenv, fetchFromGitHub, pkg-config, wrapGAppsHook, alsa-lib, gtk3, libpulseaudio }:
+
+stdenv.mkDerivation rec {
+  pname = "praat";
+  version = "6.2.09";
+
+  src = fetchFromGitHub {
+    owner = "praat";
+    repo = "praat";
+    rev = "v${version}";
+    sha256 = "sha256-BhsbTFwxgWwMwe1ow0ppVsLjfMC7QMA/fq09Utwe+KA=";
+  };
+
+  configurePhase = ''
+    cp makefiles/makefile.defs.linux.pulse makefile.defs
+  '';
+
+  installPhase = ''
+    install -Dt $out/bin praat
+  '';
+
+  nativeBuildInputs = [ pkg-config wrapGAppsHook ];
+  buildInputs = [ alsa-lib gtk3 libpulseaudio ];
+
+  enableParallelBuilding = true;
+
+  meta = with lib; {
+    description = "Doing phonetics by computer";
+    homepage = "https://www.fon.hum.uva.nl/praat/";
+    license = licenses.gpl2Plus; # Has some 3rd-party code in it though
+    maintainers = with maintainers; [ orivej ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/pkgs/applications/audio/pragha/default.nix b/pkgs/applications/audio/pragha/default.nix
new file mode 100644
index 00000000000..da5a64f708e
--- /dev/null
+++ b/pkgs/applications/audio/pragha/default.nix
@@ -0,0 +1,103 @@
+{ lib
+, intltool
+, mkDerivation
+, installShellFiles
+, pkg-config
+, fetchFromGitHub
+, dbus-glib
+, desktop-file-utils
+, hicolor-icon-theme
+, pcre
+, qtbase
+, sqlite
+, taglib
+, zlib
+, gtk3
+, libpeas
+, libcddb
+, libcdio
+, gst_all_1, withGstPlugins ? true
+, glyr, withGlyr ? true
+, liblastfmSF, withLastfm ? true
+, libcdio-paranoia, withCD ? true
+, keybinder3, withKeybinder ? false
+, libnotify, withLibnotify ? false
+, libsoup, withLibsoup ? false
+, libgudev, withGudev ? false # experimental
+, libmtp, withMtp ? false # experimental
+, xfce, withXfce4ui ? false
+, totem-pl-parser, withTotemPlParser ? false
+# , grilo, withGrilo ? false
+# , rygel, withRygel ? true
+}:
+
+assert withGlyr -> withLastfm;
+assert withLastfm -> withCD;
+
+mkDerivation rec {
+  pname = "pragha";
+  version = "1.3.99.1";
+
+  src = fetchFromGitHub {
+    owner = "pragha-music-player";
+    repo = "pragha";
+    rev = "v${version}";
+    sha256 = "sha256-C4zh2NHqP4bwKMi5s+3AfEtKqxRlzL66H8OyNonGzxE=";
+  };
+
+  nativeBuildInputs = [
+    intltool
+    pkg-config
+    xfce.xfce4-dev-tools
+    desktop-file-utils
+    installShellFiles
+  ];
+
+  buildInputs = with gst_all_1; [
+    dbus-glib
+    gstreamer
+    gst-plugins-base
+    gtk3
+    hicolor-icon-theme
+    libpeas
+    pcre
+    qtbase
+    sqlite
+    taglib
+    zlib
+  ]
+  ++ lib.optionals withGstPlugins [ gst-plugins-good gst-plugins-bad gst-plugins-ugly ]
+  ++ lib.optionals withCD [ libcddb libcdio libcdio-paranoia ]
+  ++ lib.optional withGudev libgudev
+  ++ lib.optional withKeybinder keybinder3
+  ++ lib.optional withLibnotify libnotify
+  ++ lib.optional withLastfm liblastfmSF
+  ++ lib.optional withGlyr glyr
+  ++ lib.optional withLibsoup libsoup
+  ++ lib.optional withMtp libmtp
+  ++ lib.optional withXfce4ui xfce.libxfce4ui
+  ++ lib.optional withTotemPlParser totem-pl-parser
+  # ++ lib.optional withGrilo grilo
+  # ++ lib.optional withRygel rygel
+  ;
+
+  CFLAGS = [ "-DHAVE_PARANOIA_NEW_INCLUDES" ];
+
+  NIX_CFLAGS_COMPILE = "-I${lib.getDev gst_all_1.gst-plugins-base}/include/gstreamer-1.0";
+
+  postInstall = ''
+    qtWrapperArgs+=(--prefix GST_PLUGIN_SYSTEM_PATH_1_0 : "$GST_PLUGIN_SYSTEM_PATH_1_0")
+
+    install -m 444 data/${pname}.desktop $out/share/applications
+    install -d $out/share/pixmaps
+    installManPage data/${pname}.1
+  '';
+
+  meta = with lib; {
+    description = "A lightweight GTK+ music manager - fork of Consonance Music Manager";
+    homepage = "https://pragha-music-player.github.io/";
+    license = licenses.gpl3Plus;
+    maintainers = with maintainers; [ mbaeten ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/pkgs/applications/audio/projectm/default.nix b/pkgs/applications/audio/projectm/default.nix
new file mode 100644
index 00000000000..6ca8d55bb24
--- /dev/null
+++ b/pkgs/applications/audio/projectm/default.nix
@@ -0,0 +1,65 @@
+{ stdenv
+, mkDerivation
+, lib
+, fetchFromGitHub
+, autoreconfHook
+, pkg-config
+, SDL2
+, qtdeclarative
+, libpulseaudio
+, glm
+, which
+}:
+
+mkDerivation rec {
+  pname = "projectm";
+  version = "3.1.12";
+
+  src = fetchFromGitHub {
+    owner = "projectM-visualizer";
+    repo = "projectM";
+    rev = "v${version}";
+    sha256 = "sha256-oEfOx93JyR94II5NkUCvMwqxuV7ktpOHZ8PNMLCiqDw=";
+  };
+
+  nativeBuildInputs = [
+    pkg-config
+    autoreconfHook
+    which
+  ];
+
+  buildInputs = [
+    SDL2
+    qtdeclarative
+    libpulseaudio
+    glm
+  ];
+
+  configureFlags = [
+    "--enable-qt"
+    "--enable-sdl"
+  ];
+
+  fixupPhase = lib.optionalString (!stdenv.hostPlatform.isDarwin) ''
+    # NOTE: 2019-10-05: Upstream inserts the src path buring build into ELF rpath, so must delete it out
+    # upstream report: https://github.com/projectM-visualizer/projectm/issues/245
+    for entry in $out/bin/* ; do
+      patchelf --set-rpath "$(patchelf --print-rpath $entry | tr ':' '\n' | grep -v 'src/libprojectM' | tr '\n' ':')" "$entry"
+    done
+  '' + ''
+    wrapQtApp $out/bin/projectM-pulseaudio
+    rm $out/bin/projectM-unittest
+  '';
+
+  meta = {
+    homepage = "https://github.com/projectM-visualizer/projectm";
+    description = "Cross-platform Milkdrop-compatible music visualizer";
+    license = lib.licenses.lgpl21;
+    platforms = lib.platforms.unix;
+    maintainers = with lib.maintainers; [ ];
+    longDescription = ''
+      The open-source project that reimplements the esteemed Winamp Milkdrop by Geiss in a more modern, cross-platform reusable library.
+      Read an audio input and produces mesmerizing visuals, detecting tempo, and rendering advanced equations into a limitless array of user-contributed visualizations.
+    '';
+  };
+}
diff --git a/pkgs/applications/audio/psst/default.nix b/pkgs/applications/audio/psst/default.nix
new file mode 100644
index 00000000000..d2d4927c113
--- /dev/null
+++ b/pkgs/applications/audio/psst/default.nix
@@ -0,0 +1,39 @@
+{ lib, fetchFromGitHub, rustPlatform, alsa-lib, atk, cairo, dbus, gdk-pixbuf, glib, gtk3, pango, pkg-config }:
+
+rustPlatform.buildRustPackage rec {
+  pname = "psst";
+  version = "unstable-2022-01-25";
+
+  src = fetchFromGitHub {
+    owner = "jpochyla";
+    repo = pname;
+    rev = "1627cd4a301dd51e9ee3034294cd7b0d94d02ddc";
+    sha256 = "sha256-kepvYhmieXx6Hj79aqaA7tYUnueaBsNx0U4lV7K6LuU=";
+  };
+
+  cargoSha256 = "sha256-DcdlQudGyWUUAacV7pAOLDvhd1fgAkEesdxDkHSYm4M=";
+  # specify the subdirectory of the binary crate to build from the workspace
+  buildAndTestSubdir = "psst-gui";
+
+  nativeBuildInputs = [
+    pkg-config
+  ];
+
+  buildInputs = [
+    alsa-lib
+    atk
+    cairo
+    dbus
+    gdk-pixbuf
+    glib
+    gtk3
+    pango
+  ];
+
+  meta = with lib; {
+    description = "Fast and multi-platform Spotify client with native GUI";
+    homepage = "https://github.com/jpochyla/psst";
+    license = licenses.mit;
+    maintainers = [ maintainers.vbrandl ];
+  };
+}
diff --git a/pkgs/applications/audio/pt2-clone/default.nix b/pkgs/applications/audio/pt2-clone/default.nix
new file mode 100644
index 00000000000..2577f61e8d5
--- /dev/null
+++ b/pkgs/applications/audio/pt2-clone/default.nix
@@ -0,0 +1,37 @@
+{ lib, stdenv
+, fetchFromGitHub
+, cmake
+, nixosTests
+, alsa-lib
+, SDL2
+}:
+
+stdenv.mkDerivation rec {
+  pname = "pt2-clone";
+  version = "1.43";
+
+  src = fetchFromGitHub {
+    owner = "8bitbubsy";
+    repo = "pt2-clone";
+    rev = "v${version}";
+    sha256 = "sha256-+sHGjgDqizv/9n0dDj8knsl+4MBfO3/pMkmD+MPsuNM=";
+  };
+
+  nativeBuildInputs = [ cmake ];
+  buildInputs = [ SDL2 ] ++ lib.optional stdenv.isLinux alsa-lib;
+
+  passthru.tests = {
+    pt2-clone-opens = nixosTests.pt2-clone;
+  };
+
+  meta = with lib; {
+    description = "A highly accurate clone of the classic ProTracker 2.3D software for Amiga";
+    homepage = "https://16-bits.org/pt2.php";
+    license = licenses.bsd3;
+    maintainers = with maintainers; [ fgaz ];
+    # From HOW-TO-COMPILE.txt:
+    # > This code is NOT big-endian compatible
+    platforms = platforms.littleEndian;
+  };
+}
+
diff --git a/pkgs/applications/audio/ptcollab/default.nix b/pkgs/applications/audio/ptcollab/default.nix
new file mode 100644
index 00000000000..e7e8c73c9c1
--- /dev/null
+++ b/pkgs/applications/audio/ptcollab/default.nix
@@ -0,0 +1,53 @@
+{ mkDerivation
+, lib
+, stdenv
+, fetchFromGitHub
+, nix-update-script
+, qmake
+, pkg-config
+, qtbase
+, qtmultimedia
+, libvorbis
+, rtmidi
+}:
+
+mkDerivation rec {
+  pname = "ptcollab";
+  version = "0.6.1.0";
+
+  src = fetchFromGitHub {
+    owner = "yuxshao";
+    repo = "ptcollab";
+    rev = "v${version}";
+    sha256 = "sha256-zkDMZT1kKCLqNvvxZFKVuXFqZptX/LG/R9kRUcNJphw=";
+  };
+
+  nativeBuildInputs = [ qmake pkg-config ];
+
+  buildInputs = [ qtbase qtmultimedia libvorbis rtmidi ];
+
+  postInstall = lib.optionalString stdenv.hostPlatform.isDarwin ''
+    # Move appbundles to Applications before wrapping happens
+    mkdir $out/Applications
+    mv $out/{bin,Applications}/ptcollab.app
+  '';
+
+  postFixup = lib.optionalString stdenv.hostPlatform.isDarwin ''
+    # Link to now-wrapped binary inside appbundle
+    ln -s $out/{Applications/ptcollab.app/Contents/MacOS,bin}/ptcollab
+  '';
+
+  passthru = {
+    updateScript = nix-update-script {
+      attrPath = pname;
+    };
+  };
+
+  meta = with lib; {
+    description = "Experimental pxtone editor where you can collaborate with friends";
+    homepage = "https://yuxshao.github.io/ptcollab/";
+    license = licenses.mit;
+    maintainers = with maintainers; [ OPNA2608 ];
+    platforms = platforms.all;
+  };
+}
diff --git a/pkgs/applications/audio/puddletag/default.nix b/pkgs/applications/audio/puddletag/default.nix
new file mode 100644
index 00000000000..701e6fffbbb
--- /dev/null
+++ b/pkgs/applications/audio/puddletag/default.nix
@@ -0,0 +1,76 @@
+{ lib, fetchFromGitHub, python3Packages, wrapQtAppsHook }:
+
+# As of 2.1, puddletag has started pinning versions of all dependencies that it
+# was built against which is an issue as the chances of us having the exact same
+# versions in nixpkgs are slim to none.
+#
+# There is a difference between explicit and implicit version requirements and
+# we should be able to safely ignore the latter. Therefore use requirements.in
+# which contains just the explicit version dependencies instead of
+# requirements.txt.
+#
+# Additionally, we do need to override some of the explicit requirements through
+# `overrideVersions`. While we technically run the risk of breaking something by
+# ignoring the pinned versions, it's just something we will have to accept
+# unless we want to vendor those versions.
+
+let
+  # NOTE: check if we can drop any of these overrides when bumping the version
+  overrideVersions = [
+    "pyparsing"
+    "pyqt5"
+  ];
+
+in
+python3Packages.buildPythonApplication rec {
+  pname = "puddletag";
+  version = "2.1.1";
+
+  src = fetchFromGitHub {
+    owner = "puddletag";
+    repo = "puddletag";
+    rev = version;
+    hash = "sha256-eilETaFvvPMopIbccV1uLbpD55kHX9KGTCcGVXaHPgM=";
+  };
+
+  postPatch = ''
+    substituteInPlace setup.py \
+      --replace share/pixmaps share/icons
+
+    cp requirements.in requirements.txt
+  '' + lib.concatMapStringsSep "\n"
+    (e: ''
+      sed -i requirements.txt -e 's/^${e}.*/${e}/'
+    '')
+    overrideVersions;
+
+  nativeBuildInputs = [ wrapQtAppsHook ];
+
+  propagatedBuildInputs = with python3Packages; [
+    pyacoustid
+    chromaprint
+    configobj
+    levenshtein
+    lxml
+    mutagen
+    pyparsing
+    pyqt5
+    rapidfuzz
+  ];
+
+  preFixup = ''
+    makeWrapperArgs+=("''${qtWrapperArgs[@]}")
+  '';
+
+  doCheck = false; # there are no tests
+
+  dontStrip = true; # we are not generating any binaries
+
+  meta = with lib; {
+    description = "An audio tag editor similar to the Windows program, Mp3tag";
+    homepage = "https://docs.puddletag.net";
+    license = licenses.gpl3Plus;
+    maintainers = with maintainers; [ peterhoeg dschrempf ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/pkgs/applications/audio/pulseaudio-ctl/default.nix b/pkgs/applications/audio/pulseaudio-ctl/default.nix
new file mode 100644
index 00000000000..1b21aa9d416
--- /dev/null
+++ b/pkgs/applications/audio/pulseaudio-ctl/default.nix
@@ -0,0 +1,41 @@
+{ lib, stdenv, fetchFromGitHub, makeWrapper
+, bc, dbus, gawk, gnused, libnotify, pulseaudio }:
+
+let
+  path = lib.makeBinPath [ bc dbus gawk gnused libnotify pulseaudio ];
+  pname = "pulseaudio-ctl";
+
+in stdenv.mkDerivation rec {
+  name = "${pname}-${version}";
+  version = "1.70";
+
+  src = fetchFromGitHub {
+    owner = "graysky2";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "sha256-ZB1jrr31PF7+vNB+Xo5CATJmYbuDAPwewpDxCVnAowY=";
+  };
+
+  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 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/pkgs/applications/audio/pulseaudio-dlna/0001-setup.py-remove-dbus-python-from-list.patch b/pkgs/applications/audio/pulseaudio-dlna/0001-setup.py-remove-dbus-python-from-list.patch
new file mode 100644
index 00000000000..2f38386f96c
--- /dev/null
+++ b/pkgs/applications/audio/pulseaudio-dlna/0001-setup.py-remove-dbus-python-from-list.patch
@@ -0,0 +1,25 @@
+From a4bf7df795146c843696daee8c02826ba0034298 Mon Sep 17 00:00:00 2001
+From: Florian Klink <flokli@flokli.de>
+Date: Sun, 21 Nov 2021 12:04:48 +0100
+Subject: [PATCH] setup.py: remove dbus-python from list
+
+I wasn't able to convince setuptools to find this.
+---
+ setup.py | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/setup.py b/setup.py
+index 61d6831..013fff3 100644
+--- a/setup.py
++++ b/setup.py
+@@ -42,7 +42,6 @@ setuptools.setup(
+     install_requires=[
+     'docopt',
+     'chardet',
+-    'dbus-python',
+     'docopt',
+     'requests',
+     'setproctitle',
+-- 
+2.33.1
+
diff --git a/pkgs/applications/audio/pulseaudio-dlna/default.nix b/pkgs/applications/audio/pulseaudio-dlna/default.nix
new file mode 100644
index 00000000000..384718f1db5
--- /dev/null
+++ b/pkgs/applications/audio/pulseaudio-dlna/default.nix
@@ -0,0 +1,75 @@
+{ fetchFromGitHub
+, lib
+, python3Packages
+, mp3Support ? true
+, lame
+, opusSupport ? true
+, opusTools
+, faacSupport ? false
+, faac
+, flacSupport ? true
+, flac
+, soxSupport ? true
+, sox
+, vorbisSupport ? true
+, vorbis-tools
+, pulseaudio
+}:
+
+python3Packages.buildPythonApplication {
+  pname = "pulseaudio-dlna";
+  version = "unstable-2021-11-09";
+
+  src = fetchFromGitHub {
+    owner = "Cygn";
+    repo = "pulseaudio-dlna";
+    rev = "637a2e7bba2277137c5f12fb58e63100dab7cbe6";
+    sha256 = "sha256-Oda+zQQJE2D3fiNWTzxYvI8cZVHG5JAoV2Wf5Z6IU3M=";
+  };
+
+  patches = [
+    ./0001-setup.py-remove-dbus-python-from-list.patch
+  ];
+
+  propagatedBuildInputs = with python3Packages; [
+    dbus-python
+    docopt
+    requests
+    setproctitle
+    protobuf
+    psutil
+    chardet
+    netifaces
+    notify2
+    pyroute2
+    pygobject3
+    PyChromecast
+    lxml
+    setuptools
+    zeroconf
+  ]
+  ++ lib.optional mp3Support lame
+  ++ lib.optional opusSupport opusTools
+  ++ lib.optional faacSupport faac
+  ++ lib.optional flacSupport flac
+  ++ lib.optional soxSupport sox
+  ++ lib.optional vorbisSupport vorbis-tools;
+
+  # pulseaudio-dlna shells out to pactl to configure sinks and sources.
+  # As pactl might not be in $PATH, add --suffix it (so pactl configured by the
+  # user get priority)
+  makeWrapperArgs = [ "--suffix PATH : ${lib.makeBinPath [ pulseaudio ]}" ];
+
+  # upstream has no tests
+  checkPhase = ''
+    $out/bin/pulseaudio-dlna --help > /dev/null
+  '';
+
+  meta = with lib; {
+    description = "A lightweight streaming server which brings DLNA / UPNP and Chromecast support to PulseAudio and Linux";
+    homepage = "https://github.com/Cygn/pulseaudio-dlna";
+    license = licenses.gpl3Plus;
+    maintainers = with maintainers; [ mog ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/pkgs/applications/audio/pulseaudio-dlna/zeroconf.nix b/pkgs/applications/audio/pulseaudio-dlna/zeroconf.nix
new file mode 100644
index 00000000000..d4f3306697d
--- /dev/null
+++ b/pkgs/applications/audio/pulseaudio-dlna/zeroconf.nix
@@ -0,0 +1,30 @@
+{ lib
+, buildPythonPackage
+, fetchPypi
+, ifaddr
+, typing
+, pythonOlder
+, netifaces
+, six
+, enum-compat
+}:
+
+buildPythonPackage rec {
+  pname = "zeroconf";
+  version = "0.19.1";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "0ykzg730n915qbrq9bn5pn06bv6rb5zawal4sqjyfnjjm66snkj3";
+  };
+
+  propagatedBuildInputs = [ netifaces six enum-compat ifaddr ]
+    ++ lib.optionals (pythonOlder "3.5") [ typing ];
+
+  meta = with lib; {
+    description = "A pure python implementation of multicast DNS service discovery";
+    homepage = "https://github.com/jstasiak/python-zeroconf";
+    license = licenses.lgpl21;
+    maintainers = [ ];
+  };
+}
diff --git a/pkgs/applications/audio/pulseaudio-modules-bt/default.nix b/pkgs/applications/audio/pulseaudio-modules-bt/default.nix
new file mode 100644
index 00000000000..331bce3e8be
--- /dev/null
+++ b/pkgs/applications/audio/pulseaudio-modules-bt/default.nix
@@ -0,0 +1,91 @@
+{ stdenv
+, runCommand
+, fetchFromGitHub
+, pulseaudio
+, pkg-config
+, ffmpeg
+, patchelf
+, fdk_aac
+, libtool
+, ldacbt
+, cmake
+, bluez
+, dbus
+, sbc
+, lib
+}:
+
+let
+  pulseSources = runCommand "pulseaudio-sources" {} ''
+    mkdir $out
+    if [ -d ${pulseaudio.src} ]; then
+      ln -s ${pulseaudio.src}/* $out/
+    else
+      tar -xf ${pulseaudio.src}
+      mv pulseaudio*/* $out/
+    fi
+  '';
+
+in stdenv.mkDerivation rec {
+  pname = "pulseaudio-modules-bt";
+  version = "1.4";
+
+  src = fetchFromGitHub {
+    owner = "EHfive";
+    repo = "pulseaudio-modules-bt";
+    rev = "v${version}";
+    sha256 = "0bzg6x405j39axnkvc6n6vkl1hv1frk94y1i9sl170081bk23asd";
+  };
+
+  patches = [
+    ./fix-install-path.patch
+  ];
+
+  nativeBuildInputs = [
+    pkg-config
+    patchelf
+    cmake
+  ];
+
+  buildInputs = [
+    pulseaudio
+    ffmpeg
+    fdk_aac
+    libtool
+    ldacbt
+    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 '${"\${PULSE_DIR}"}' ${pulseaudio.pulseDir}
+
+    # Fraunhofer recommends to enable afterburner but upstream has it set to false by default
+    substituteInPlace src/modules/bluetooth/a2dp/a2dp_aac.c \
+      --replace "info->aac_afterburner = false;" "info->aac_afterburner = true;"
+  '';
+
+  postFixup = ''
+    for so in $out/lib/pulse-${pulseaudio.version}/modules/*.so; do
+      orig_rpath=$(patchelf --print-rpath "$so")
+      patchelf \
+        --set-rpath "${ldacbt}/lib:${lib.getLib ffmpeg}/lib:$out/${pulseaudio.pulseDir}/modules:$orig_rpath" \
+        "$so"
+    done
+  '';
+
+  meta = with 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/pkgs/applications/audio/pulseaudio-modules-bt/fix-install-path.patch b/pkgs/applications/audio/pulseaudio-modules-bt/fix-install-path.patch
new file mode 100644
index 00000000000..7cdb7de4dd1
--- /dev/null
+++ b/pkgs/applications/audio/pulseaudio-modules-bt/fix-install-path.patch
@@ -0,0 +1,11 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 8d20dbf..63fe7ba 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -213,5 +213,4 @@ INSTALL(TARGETS
+         module-bluez5-device
+         module-bluetooth-discover
+         module-bluetooth-policy
+-        LIBRARY DESTINATION ${PulseAudio_modlibexecdir})
+-
++        LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/${PULSE_DIR}/modules/)
diff --git a/pkgs/applications/audio/pulseeffects-legacy/default.nix b/pkgs/applications/audio/pulseeffects-legacy/default.nix
new file mode 100644
index 00000000000..fad17ac71fd
--- /dev/null
+++ b/pkgs/applications/audio/pulseeffects-legacy/default.nix
@@ -0,0 +1,115 @@
+{ lib, stdenv
+, fetchFromGitHub
+, meson
+, ninja
+, pkg-config
+, itstool
+, python3
+, libxml2
+, desktop-file-utils
+, wrapGAppsHook
+, gst_all_1
+, pulseaudio
+, gtk3
+, glib
+, glibmm
+, gtkmm3
+, lilv
+, lv2
+, serd
+, sord
+, sratom
+, libbs2b
+, libsamplerate
+, libsndfile
+, libebur128
+, rnnoise
+, boost
+, dbus
+, fftwFloat
+, calf
+, zita-convolver
+, zam-plugins
+, rubberband
+, lsp-plugins
+}:
+
+let
+  lv2Plugins = [
+    calf # limiter, compressor exciter, bass enhancer and others
+    lsp-plugins # delay
+  ];
+  ladspaPlugins = [
+    rubberband # pitch shifting
+    zam-plugins # maximizer
+  ];
+in stdenv.mkDerivation rec {
+  pname = "pulseeffects";
+  version = "4.8.4";
+
+  src = fetchFromGitHub {
+    owner = "wwmm";
+    repo = "pulseeffects";
+    rev = "v${version}";
+    sha256 = "19sndxvszafbd1l2033g2irpx2jrwi5bpbx8r35047wi0z7djiag";
+  };
+
+  nativeBuildInputs = [
+    meson
+    ninja
+    pkg-config
+    libxml2
+    itstool
+    python3
+    desktop-file-utils
+    wrapGAppsHook
+  ];
+
+  buildInputs = [
+    pulseaudio
+    glib
+    glibmm
+    gtk3
+    gtkmm3
+    gst_all_1.gstreamer
+    gst_all_1.gst-plugins-base # gst-fft
+    gst_all_1.gst-plugins-good # pulsesrc
+    gst_all_1.gst-plugins-bad
+    lilv lv2 serd sord sratom
+    libbs2b
+    libebur128
+    libsamplerate
+    libsndfile
+    rnnoise
+    boost
+    dbus
+    fftwFloat
+    zita-convolver
+  ];
+
+  postPatch = ''
+    chmod +x meson_post_install.py
+    patchShebangs meson_post_install.py
+  '';
+
+  preFixup = ''
+    gappsWrapperArgs+=(
+      --set LV2_PATH "${lib.makeSearchPath "lib/lv2" lv2Plugins}"
+      --set LADSPA_PATH "${lib.makeSearchPath "lib/ladspa" ladspaPlugins}"
+    )
+  '';
+
+  # Meson is no longer able to pick up Boost automatically.
+  # https://github.com/NixOS/nixpkgs/issues/86131
+  BOOST_INCLUDEDIR = "${lib.getDev boost}/include";
+  BOOST_LIBRARYDIR = "${lib.getLib boost}/lib";
+
+  meta = with lib; {
+    description = "Limiter, compressor, reverberation, equalizer and auto volume effects for Pulseaudio applications";
+    homepage = "https://github.com/wwmm/pulseeffects";
+    license = licenses.gpl3Plus;
+    maintainers = with maintainers; [ jtojnar ];
+    platforms = platforms.linux;
+    badPlatforms = [ "aarch64-linux" ];
+  };
+}
diff --git a/pkgs/applications/audio/puredata/default.nix b/pkgs/applications/audio/puredata/default.nix
new file mode 100644
index 00000000000..ebdc0388b96
--- /dev/null
+++ b/pkgs/applications/audio/puredata/default.nix
@@ -0,0 +1,38 @@
+{ lib, stdenv, fetchurl, autoreconfHook, gettext, makeWrapper
+, alsa-lib, libjack2, tk, fftw
+}:
+
+stdenv.mkDerivation  rec {
+  pname = "puredata";
+  version = "0.50-2";
+
+  src = fetchurl {
+    url = "http://msp.ucsd.edu/Software/pd-${version}.src.tar.gz";
+    sha256 = "0dz6r6jy0zfs1xy1xspnrxxks8kddi9c7pxz4vpg2ygwv83ghpg5";
+  };
+
+  nativeBuildInputs = [ autoreconfHook gettext makeWrapper ];
+
+  buildInputs = [ alsa-lib libjack2 fftw ];
+
+  configureFlags = [
+    "--enable-alsa"
+    "--enable-jack"
+    "--enable-fftw"
+    "--disable-portaudio"
+    "--disable-oss"
+  ];
+
+  postInstall = ''
+    wrapProgram $out/bin/pd --prefix PATH : ${tk}/bin
+  '';
+
+  meta = with 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/pkgs/applications/audio/puredata/wrapper.nix b/pkgs/applications/audio/puredata/wrapper.nix
new file mode 100644
index 00000000000..3444ef9acbd
--- /dev/null
+++ b/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;
+
+  nativeBuildInputs = [ makeWrapper ];
+
+  postBuild = ''
+    wrapProgram $out/bin/pd \
+      --add-flags "${toString puredataFlags}"
+  '';
+}
diff --git a/pkgs/applications/audio/pyradio/default.nix b/pkgs/applications/audio/pyradio/default.nix
new file mode 100644
index 00000000000..ebddac8c539
--- /dev/null
+++ b/pkgs/applications/audio/pyradio/default.nix
@@ -0,0 +1,30 @@
+{ lib, python3Packages, fetchFromGitHub }:
+
+python3Packages.buildPythonApplication rec {
+  pname = "pyradio";
+  version = "0.8.9.15";
+
+  propagatedBuildInputs = with python3Packages; [
+    requests
+    psutil
+    dnspython
+  ];
+
+  src = fetchFromGitHub {
+    owner = "coderholic";
+    repo = pname;
+    rev = version;
+    sha256 = "sha256-r4T7t8Q46N59jqTkvdKBo6tffkrOYhoO/CZWvkBHOAQ=";
+  };
+
+  checkPhase = ''
+    $out/bin/pyradio --help
+  '';
+
+  meta = with lib; {
+    homepage = "http://www.coderholic.com/pyradio/";
+    description = "Curses based internet radio player";
+    license = licenses.mit;
+    maintainers = with maintainers; [ contrun ];
+  };
+}
diff --git a/pkgs/applications/audio/qjackctl/default.nix b/pkgs/applications/audio/qjackctl/default.nix
new file mode 100644
index 00000000000..6c7bfff86b1
--- /dev/null
+++ b/pkgs/applications/audio/qjackctl/default.nix
@@ -0,0 +1,46 @@
+{ lib, mkDerivation, fetchFromGitHub
+, pkg-config, cmake, alsa-lib, libjack2, dbus, qtbase, qttools, qtx11extras
+# Enable jack session support
+, jackSession ? false
+}:
+
+mkDerivation rec {
+  version = "0.9.6";
+  pname = "qjackctl";
+
+  # some dependencies such as killall have to be installed additionally
+
+  src = fetchFromGitHub {
+    owner = "rncbc";
+    repo = "qjackctl";
+    rev = "${pname}_${lib.replaceChars ["."] ["_"] version}";
+    sha256 = "sha256-8oVnUe+/y4p1WeHMEhKMIl0/ax3PT0pN4f1UJaBmZBw=";
+  };
+
+  buildInputs = [
+    qtbase
+    qtx11extras
+    qttools
+    alsa-lib
+    libjack2
+    dbus
+  ];
+
+  nativeBuildInputs = [
+    cmake
+    pkg-config
+  ];
+
+  cmakeFlags = [
+    "-DCONFIG_JACK_VERSION=1"
+    "-DCONFIG_JACK_SESSION=${toString jackSession}"
+  ];
+
+  meta = with lib; {
+    description = "A Qt application to control the JACK sound server daemon";
+    homepage = "https://github.com/rncbc/qjackctl";
+    license = licenses.gpl2Plus;
+    maintainers = [ maintainers.goibhniu ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/pkgs/applications/audio/qmidiarp/default.nix b/pkgs/applications/audio/qmidiarp/default.nix
new file mode 100644
index 00000000000..618062dc2f3
--- /dev/null
+++ b/pkgs/applications/audio/qmidiarp/default.nix
@@ -0,0 +1,49 @@
+{ lib, stdenv
+, fetchgit
+, automake
+, autoreconfHook
+, lv2
+, pkg-config
+, qt5
+, alsa-lib
+, libjack2
+}:
+
+stdenv.mkDerivation rec {
+  name = "qmidiarp";
+  version = "0.6.5";
+
+  src = fetchgit {
+    url = "https://git.code.sf.net/p/qmidiarp/code";
+    sha256 = "1g2143gzfbihqr2zi3k2v1yn1x3mwfbb2khmcd4m4cq3hcwhhlx9";
+    rev = "qmidiarp-0.6.5";
+  };
+
+  nativeBuildInputs = [
+    autoreconfHook
+    pkg-config
+    qt5.wrapQtAppsHook
+  ];
+
+  buildInputs = [
+    alsa-lib
+    lv2
+    libjack2
+  ] ++ (with qt5; [
+    qttools
+  ]);
+
+  meta = with lib; {
+    description = "An advanced MIDI arpeggiator";
+    longDescription = ''
+      An advanced MIDI arpeggiator, programmable step sequencer and LFO for Linux.
+      It can hold any number of arpeggiator, sequencer, or LFO modules running in
+      parallel.
+    '';
+
+    homepage = "http://qmidiarp.sourceforge.net";
+    license = licenses.gpl2;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ sjfloat ];
+  };
+}
diff --git a/pkgs/applications/audio/qmidinet/default.nix b/pkgs/applications/audio/qmidinet/default.nix
new file mode 100644
index 00000000000..556787ca9ea
--- /dev/null
+++ b/pkgs/applications/audio/qmidinet/default.nix
@@ -0,0 +1,25 @@
+{ mkDerivation, lib, fetchurl, pkg-config, qtbase, qttools, alsa-lib, libjack2 }:
+
+mkDerivation rec {
+  version = "0.9.4";
+  pname = "qmidinet";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/qmidinet/${pname}-${version}.tar.gz";
+    sha256 = "sha256-7Ui4kUgYgpPVAaaINrd6WGZoYon5UuHszGVaHafb/p0=";
+  };
+
+  hardeningDisable = [ "format" ];
+
+  buildInputs = [  qtbase qttools alsa-lib libjack2 ];
+
+  nativeBuildInputs = [ pkg-config ];
+
+  meta = with 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 = platforms.linux;
+  };
+}
diff --git a/pkgs/applications/audio/qmidiroute/default.nix b/pkgs/applications/audio/qmidiroute/default.nix
new file mode 100644
index 00000000000..35aea5bd086
--- /dev/null
+++ b/pkgs/applications/audio/qmidiroute/default.nix
@@ -0,0 +1,30 @@
+{ lib, stdenv, fetchurl, pkg-config, qt4, alsa-lib }:
+
+stdenv.mkDerivation rec {
+  version = "0.4.0";
+  pname = "qmidiroute";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/project/alsamodular/QMidiRoute/${version}/${pname}-${version}.tar.gz";
+    sha256 = "0vmjwarsxr5540rafhmdcc62yarf0w2l05bjjl9s28zzr5m39z3n";
+  };
+
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = [ qt4 alsa-lib ];
+
+  meta = with 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 = lib.platforms.linux;
+  };
+}
diff --git a/pkgs/applications/audio/qmmp/default.nix b/pkgs/applications/audio/qmmp/default.nix
new file mode 100644
index 00000000000..460b97479c6
--- /dev/null
+++ b/pkgs/applications/audio/qmmp/default.nix
@@ -0,0 +1,63 @@
+{ lib, mkDerivation, fetchurl, cmake, pkg-config, 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
+, alsa-lib, libpulseaudio
+# effect plugins
+, libsamplerate
+}:
+
+# Additional plugins that can be added:
+#  wavpack (https://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.
+
+mkDerivation rec {
+  pname = "qmmp";
+  version = "1.4.4";
+
+  src = fetchurl {
+    url = "https://qmmp.ylsoftware.com/files/${pname}-${version}.tar.bz2";
+    sha256 = "sha256-sZRZVhCf2ceETuV4AULA0kVkuIMn3C+aYdKThqvPnVQ=";
+  };
+
+  nativeBuildInputs = [ cmake pkg-config ];
+  buildInputs =
+    [ # basic requirements
+      qtbase qttools qtmultimedia qtx11extras xlibsWrapper
+      # transports
+      curl libmms
+      # input plugins
+      libmad taglib libvorbis libogg flac libmpcdec libmodplug libsndfile
+      libcdio cdparanoia libcddb faad2 ffmpeg wildmidi
+      # output plugins
+      alsa-lib libpulseaudio
+      # effect plugins
+      libsamplerate
+    ];
+
+  meta = with lib; {
+    description = "Qt-based audio player that looks like Winamp";
+    homepage = "https://qmmp.ylsoftware.com/";
+    license = licenses.gpl2Plus;
+    platforms = platforms.linux;
+    maintainers = [ maintainers.bjornfor ];
+    repositories.svn = "https://svn.code.sf.net/p/qmmp-dev/code";
+  };
+}
diff --git a/pkgs/applications/audio/qpwgraph/default.nix b/pkgs/applications/audio/qpwgraph/default.nix
new file mode 100644
index 00000000000..860eca652e7
--- /dev/null
+++ b/pkgs/applications/audio/qpwgraph/default.nix
@@ -0,0 +1,34 @@
+{ lib, mkDerivation, fetchFromGitLab
+, cmake, pkg-config
+, alsa-lib, pipewire
+}:
+
+mkDerivation rec {
+  pname = "qpwgraph";
+  version = "0.2.2";
+
+  src = fetchFromGitLab {
+    domain = "gitlab.freedesktop.org";
+    owner = "rncbc";
+    repo = "qpwgraph";
+    rev = "v${version}";
+    sha256 = "sha256-BBvF1L3IqkYqSghHxcbwOBizdu6GtxaWof3Q/bc+aTY=";
+  };
+
+  nativeBuildInputs = [ cmake pkg-config ];
+
+  buildInputs = [ alsa-lib pipewire ];
+
+  meta = with lib; {
+    description = "Qt graph manager for PipeWire, similar to QjackCtl.";
+    longDescription = ''
+      qpwgraph is a graph manager dedicated for PipeWire,
+      using the Qt C++ framework, based and pretty much like
+      the same of QjackCtl.
+    '';
+    homepage = "https://gitlab.freedesktop.org/rncbc/qpwgraph";
+    license = licenses.gpl2Plus;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ kanashimia ];
+  };
+}
diff --git a/pkgs/applications/audio/qsampler/default.nix b/pkgs/applications/audio/qsampler/default.nix
new file mode 100644
index 00000000000..bb40e0b3eeb
--- /dev/null
+++ b/pkgs/applications/audio/qsampler/default.nix
@@ -0,0 +1,27 @@
+{ lib, fetchurl, autoconf, automake, libtool, pkg-config, qttools
+, liblscp, libgig, qtbase, mkDerivation }:
+
+mkDerivation rec {
+  pname = "qsampler";
+  version = "0.6.1";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/qsampler/${pname}-${version}.tar.gz";
+    sha256 = "1wr7k739zx2nz00b810f60g9k3y92w05nfci987hw7y2sks9rd8j";
+  };
+
+  nativeBuildInputs = [ autoconf automake libtool pkg-config qttools ];
+  buildInputs = [ liblscp libgig qtbase ];
+
+  preConfigure = "make -f Makefile.svn";
+
+  enableParallelBuilding = true;
+
+  meta = with lib; {
+    homepage = "http://www.linuxsampler.org";
+    description = "Graphical frontend to LinuxSampler";
+    license = licenses.gpl2;
+    maintainers = [ maintainers.goibhniu ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/pkgs/applications/audio/qsynth/default.nix b/pkgs/applications/audio/qsynth/default.nix
new file mode 100644
index 00000000000..f9eaa890c57
--- /dev/null
+++ b/pkgs/applications/audio/qsynth/default.nix
@@ -0,0 +1,27 @@
+{ lib, fetchurl, alsa-lib, fluidsynth, libjack2, autoconf, pkg-config
+, mkDerivation, qtbase, qttools, qtx11extras
+}:
+
+mkDerivation  rec {
+  pname = "qsynth";
+  version = "0.9.4";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/qsynth/${pname}-${version}.tar.gz";
+    sha256 = "sha256-dlgIkMde7uv4UlMKEPhtZ7MfSTBc7RvHs+Q2yk+G/JM=";
+  };
+
+  nativeBuildInputs = [ autoconf pkg-config ];
+
+  buildInputs = [ alsa-lib fluidsynth libjack2 qtbase qttools qtx11extras ];
+
+  enableParallelBuilding = true;
+
+  meta = with lib; {
+    description = "Fluidsynth GUI";
+    homepage = "https://sourceforge.net/projects/qsynth";
+    license = licenses.gpl2Plus;
+    maintainers = with maintainers; [ goibhniu ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/pkgs/applications/audio/qtractor/default.nix b/pkgs/applications/audio/qtractor/default.nix
new file mode 100644
index 00000000000..71d628d322e
--- /dev/null
+++ b/pkgs/applications/audio/qtractor/default.nix
@@ -0,0 +1,79 @@
+{ alsa-lib
+, aubio
+, cmake
+, dssi
+, fetchurl
+, flac
+, libjack2
+, ladspaH
+, ladspaPlugins
+, liblo
+, libmad
+, libsamplerate
+, libsndfile
+, libtool
+, libvorbis
+, lilv
+, lv2
+, mkDerivation
+, opusfile
+, pkg-config
+, qttools
+, qtbase
+, rubberband
+, serd
+, sord
+, sratom
+, lib
+, suil
+}:
+
+mkDerivation rec {
+  pname = "qtractor";
+  version = "0.9.25";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/${pname}/${pname}-${version}.tar.gz";
+    sha256 = "sha256-cKXHH7rugTJ5D7MDJmr/fX6p209wyGMQvSLbv5T0KXU=";
+  };
+
+  nativeBuildInputs = [
+    cmake
+    libtool
+    pkg-config
+    qttools
+  ];
+
+  buildInputs = [
+    alsa-lib
+    aubio
+    dssi
+    flac
+    libjack2
+    ladspaH
+    ladspaPlugins
+    liblo
+    libmad
+    libsamplerate
+    libsndfile
+    libtool
+    libvorbis
+    lilv
+    lv2
+    opusfile
+    qtbase
+    rubberband
+    serd
+    sord
+    sratom
+    suil
+  ];
+
+  meta = with lib; {
+    description = "Audio/MIDI multi-track sequencer";
+    homepage = "https://qtractor.sourceforge.io";
+    license = licenses.gpl2Plus;
+    maintainers = with maintainers; [ goibhniu ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/pkgs/applications/audio/qtscrobbler/default.nix b/pkgs/applications/audio/qtscrobbler/default.nix
new file mode 100644
index 00000000000..f013c338e76
--- /dev/null
+++ b/pkgs/applications/audio/qtscrobbler/default.nix
@@ -0,0 +1,34 @@
+{ stdenv, lib, fetchurl, withMtp ? true, libmtp, pkg-config, which, qt4, qmake4Hook }:
+
+stdenv.mkDerivation rec {
+  pname = "qtscrobbler";
+  version = "0.11";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/qtscrob/qtscrob/${version}/qtscrob-${version}.tar.bz2";
+    sha256 = "01c8e48f616ed09504833d27d92fd62f455bd645ea2d1cc2a5f4c287d641daba";
+  };
+
+  nativeBuildInputs = [ qmake4Hook ] ++ lib.optionals withMtp [ pkg-config 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/pkgs/applications/audio/quadrafuzz/default.nix b/pkgs/applications/audio/quadrafuzz/default.nix
new file mode 100644
index 00000000000..1432c0b8101
--- /dev/null
+++ b/pkgs/applications/audio/quadrafuzz/default.nix
@@ -0,0 +1,43 @@
+{ stdenv, lib, fetchFromGitHub, boost, cairo, lv2, pkg-config }:
+
+stdenv.mkDerivation rec {
+  pname = "quadrafuzz";
+  version = "0.1.1";
+
+  src = fetchFromGitHub {
+    owner = "jpcima";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "1kjsf7il9krihwlrq08gk2xvil4b4q5zd87nnm103hby2w7ws7z1";
+    fetchSubmodules = true;
+  };
+
+  postPatch = ''
+    patchShebangs ./dpf/utils/generate-ttl.sh
+  '';
+
+  nativeBuildInputs = [ pkg-config ];
+
+  buildInputs = [
+    boost cairo lv2
+  ];
+
+  makeFlags = [
+    "PREFIX=$(out)"
+  ];
+
+  installPhase = ''
+    runHook preInstall
+    mkdir -p $out/lib/lv2
+    cp -r bin/quadrafuzz.lv2/ $out/lib/lv2
+    runHook postInstall
+  '';
+
+  meta = with lib; {
+    homepage = "https://github.com/jpcima/quadrafuzz";
+    description = "Multi-band fuzz distortion plugin";
+    maintainers = [ maintainers.magnetophon ];
+    platforms = platforms.linux;
+    license = licenses.gpl3Plus;
+  };
+}
diff --git a/pkgs/applications/audio/quodlibet/default.nix b/pkgs/applications/audio/quodlibet/default.nix
new file mode 100644
index 00000000000..6c8ad8225f0
--- /dev/null
+++ b/pkgs/applications/audio/quodlibet/default.nix
@@ -0,0 +1,86 @@
+{ lib, fetchurl, python3, wrapGAppsHook, gettext, libsoup, gnome, gtk3, gdk-pixbuf, librsvg,
+  tag ? "", xvfb-run, dbus, glibcLocales, glib, glib-networking, gobject-introspection, hicolor-icon-theme,
+  gst_all_1, withGstPlugins ? true,
+  xineBackend ? false, xine-lib,
+  withDbusPython ? false, withPyInotify ? false, withMusicBrainzNgs ? false, withPahoMqtt ? false,
+  webkitgtk ? null,
+  keybinder3 ? null, gtksourceview ? null, libmodplug ? null, kakasi ? null, libappindicator-gtk3 ? null }:
+
+let optionals = lib.optionals; in
+python3.pkgs.buildPythonApplication rec {
+  pname = "quodlibet${tag}";
+  version = "4.4.0";
+
+  src = fetchurl {
+    url = "https://github.com/quodlibet/quodlibet/releases/download/release-${version}/quodlibet-${version}.tar.gz";
+    sha256 = "sha256-oDMY0nZ+SVlVF2PQqH+tl3OHr3EmCP5XJxQXaiS782c=";
+  };
+
+  nativeBuildInputs = [ wrapGAppsHook gettext ];
+
+  checkInputs = [ gdk-pixbuf hicolor-icon-theme ] ++ (with python3.pkgs; [ pytest pytest-xdist polib xvfb-run dbus.daemon glibcLocales ]);
+
+  buildInputs = [ gnome.adwaita-icon-theme libsoup glib glib-networking gtk3 webkitgtk gdk-pixbuf keybinder3 gtksourceview libmodplug libappindicator-gtk3 kakasi gobject-introspection ]
+    ++ (if xineBackend then [ xine-lib ] 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 withPahoMqtt [ paho-mqtt ];
+
+  LC_ALL = "en_US.UTF-8";
+
+  pytestFlags = lib.optionals (xineBackend || !withGstPlugins) [
+    "--ignore=tests/plugin/test_replaygain.py"
+  ] ++ [
+    # requires networking
+    "--ignore=tests/test_browsers_iradio.py"
+    # the default theme doesn't have the required icons
+    "--ignore=tests/plugin/test_trayicon.py"
+    # upstream does actually not enforce source code linting
+    "--ignore=tests/quality"
+    # build failure on Arch Linux
+    # https://github.com/NixOS/nixpkgs/pull/77796#issuecomment-575841355
+    "--ignore=tests/test_operon.py"
+  ];
+
+  checkPhase = ''
+    runHook preCheck
+    # otherwise tests can't find the app icons; instead of creating index.theme from scratch
+    # I re-used the one from hicolor-icon-theme which seems to work
+    cp "${hicolor-icon-theme}/share/icons/hicolor/index.theme" quodlibet/images/hicolor
+    env XDG_DATA_DIRS="$out/share:${gtk3}/share/gsettings-schemas/${gtk3.name}:$XDG_ICON_DIRS:$XDG_DATA_DIRS" \
+      GDK_PIXBUF_MODULE_FILE=${librsvg}/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache \
+      HOME=$(mktemp -d) \
+      xvfb-run -s '-screen 0 800x600x24' dbus-run-session \
+        --config-file=${dbus.daemon}/share/dbus-1/session.conf \
+        py.test $pytestFlags
+    runHook postCheck
+  '';
+
+  preFixup = lib.optionalString (kakasi != null) "gappsWrapperArgs+=(--prefix PATH : ${kakasi}/bin)";
+
+  meta = with 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 pbogdan ];
+    homepage = "https://quodlibet.readthedocs.io/en/latest/";
+  };
+}
diff --git a/pkgs/applications/audio/r128gain/default.nix b/pkgs/applications/audio/r128gain/default.nix
new file mode 100644
index 00000000000..af22a9dce67
--- /dev/null
+++ b/pkgs/applications/audio/r128gain/default.nix
@@ -0,0 +1,44 @@
+{ lib
+, fetchFromGitHub
+, gitUpdater
+, substituteAll
+, ffmpeg
+, python3Packages
+, sox
+}:
+
+python3Packages.buildPythonApplication rec {
+  pname = "r128gain";
+  version = "1.0.3";
+
+  src = fetchFromGitHub {
+    owner = "desbma";
+    repo = "r128gain";
+    rev = version;
+    sha256 = "0w2i2szajv1vcmc96w0fczdr8xc28ijcf1gdg180f21gi6yh96sc";
+  };
+
+  patches = [
+    (substituteAll {
+      src = ./ffmpeg-location.patch;
+      inherit ffmpeg;
+    })
+  ];
+
+  propagatedBuildInputs = with python3Packages; [ crcmod ffmpeg-python mutagen tqdm ];
+  checkInputs = with python3Packages; [ requests sox ];
+
+  # Testing downloads media files for testing, which requires the
+  # sandbox to be disabled.
+  doCheck = false;
+
+  passthru.updateScript = gitUpdater { inherit pname version; };
+
+  meta = with lib; {
+    description = "Fast audio loudness scanner & tagger (ReplayGain v2 / R128)";
+    homepage = "https://github.com/desbma/r128gain";
+    license = licenses.lgpl2Plus;
+    maintainers = [ maintainers.AluisioASG ];
+    platforms = platforms.all;
+  };
+}
diff --git a/pkgs/applications/audio/r128gain/ffmpeg-location.patch b/pkgs/applications/audio/r128gain/ffmpeg-location.patch
new file mode 100644
index 00000000000..c01f115c1d6
--- /dev/null
+++ b/pkgs/applications/audio/r128gain/ffmpeg-location.patch
@@ -0,0 +1,29 @@
+--- i/r128gain/__init__.py
++++ w/r128gain/__init__.py
+@@ -78,7 +78,7 @@ def get_ffmpeg_lib_versions(ffmpeg_path=None):
+   Example: 0x3040100 for FFmpeg 3.4.1
+   """
+   r = collections.OrderedDict()
+-  cmd = (ffmpeg_path or "ffmpeg", "-version")
++  cmd = (ffmpeg_path or "@ffmpeg@/bin/ffmpeg", "-version")
+   output = subprocess.run(cmd,
+                           check=True,
+                           stdout=subprocess.PIPE,
+@@ -156,7 +156,7 @@ def get_r128_loudness(audio_filepaths, *, calc_peak=True, enable_ffmpeg_threadin
+                                      os.devnull,
+                                      **additional_ffmpeg_args,
+                                      f="null").global_args("-hide_banner", "-nostats"),
+-                       cmd=ffmpeg_path or "ffmpeg")
++                       cmd=ffmpeg_path or "@ffmpeg@/bin/ffmpeg")
+ 
+   # run
+   logger().debug(cmd_to_string(cmd))
+@@ -740,7 +740,7 @@ def cl_main():
+                           help="Maximum number of tracks to scan in parallel. If not specified, autodetect CPU count")
+   arg_parser.add_argument("-f",
+                           "--ffmpeg-path",
+-                          default=shutil.which("ffmpeg"),
++                          default="@ffmpeg@/bin/ffmpeg",
+                           help="""Full file path of ffmpeg executable (only needed if not in PATH).
+                                   If not specified, autodetect""")
+   arg_parser.add_argument("-d",
diff --git a/pkgs/applications/audio/radiotray-ng/default.nix b/pkgs/applications/audio/radiotray-ng/default.nix
new file mode 100644
index 00000000000..dd3ba17e633
--- /dev/null
+++ b/pkgs/applications/audio/radiotray-ng/default.nix
@@ -0,0 +1,98 @@
+{ lib, stdenv, fetchFromGitHub
+, cmake, pkg-config
+# Transport
+, curl
+# Libraries
+, boost
+, jsoncpp
+, libbsd
+, pcre
+# GUI/Desktop
+, dbus
+, glibmm
+, gsettings-desktop-schemas
+, hicolor-icon-theme
+, libappindicator-gtk3
+, libnotify
+, libxdg_basedir
+, wxGTK
+# GStreamer
+, gst_all_1
+# User-agent info
+, lsb-release
+# rt2rtng
+, python3
+# 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 python3.pkgs; [ python lxml ];
+in
+stdenv.mkDerivation rec {
+  pname = "radiotray-ng";
+  version = "0.2.8";
+
+  src = fetchFromGitHub {
+    owner = "ebruck";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "sha256-/0GlQdSsIPKGrDT9CgxvaH8TpAbqxFduwL2A2+BSrEI=";
+  };
+
+  nativeBuildInputs = [ cmake pkg-config wrapGAppsHook makeWrapper ];
+
+  buildInputs = [
+    curl
+    boost jsoncpp libbsd pcre
+    glibmm hicolor-icon-theme gsettings-desktop-schemas libappindicator-gtk3 libnotify
+    libxdg_basedir
+    lsb-release
+    wxGTK
+  ] ++ gstInputs
+    ++ pythonInputs;
+
+  patches = [ ./no-dl-googletest.patch ];
+
+  postPatch = ''
+    for x in package/CMakeLists.txt include/radiotray-ng/common.hpp data/*.desktop; do
+      substituteInPlace $x --replace /usr $out
+    done
+    substituteInPlace package/CMakeLists.txt --replace /etc/xdg/autostart $out/etc/xdg/autostart
+
+    # 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"}"
+  ];
+
+  checkInputs = [ gtest ];
+  doCheck = !stdenv.isAarch64; # single failure that I can't explain
+
+  preFixup = ''
+    gappsWrapperArgs+=(--suffix PATH : ${lib.makeBinPath [ dbus ]})
+    wrapProgram $out/bin/rt2rtng --prefix PYTHONPATH : $PYTHONPATH
+  '';
+
+  meta = with 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/pkgs/applications/audio/radiotray-ng/no-dl-googletest.patch b/pkgs/applications/audio/radiotray-ng/no-dl-googletest.patch
new file mode 100644
index 00000000000..3aee9751656
--- /dev/null
+++ b/pkgs/applications/audio/radiotray-ng/no-dl-googletest.patch
@@ -0,0 +1,55 @@
+From b6f7a9e2e0194c6baed63a33b7beff359080b8d9 Mon Sep 17 00:00:00 2001
+From: Will Dietz <w@wdtz.org>
+Date: Sat, 16 Mar 2019 11:40:00 -0500
+Subject: [PATCH] don't download googletest
+
+---
+ CMakeLists.txt       | 18 ------------------
+ tests/CMakeLists.txt |  1 -
+ 2 files changed, 19 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index ddba1be..3396705 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -70,25 +70,7 @@ endif()
+ 
+ # build tests? Then we need googletest...
+ if (BUILD_TESTS)
+-    include(ExternalProject)
+-
+-    ExternalProject_Add(googletest
+-        PREFIX "${CMAKE_CURRENT_BINARY_DIR}/googletest"
+-        URL https://github.com/google/googletest/archive/release-1.8.1.tar.gz
+-        URL_HASH SHA256=9bf1fe5182a604b4135edc1a425ae356c9ad15e9b23f9f12a02e80184c3a249c
+-        TIMEOUT 30
+-        DOWNLOAD_NO_PROGRESS true
+-        INSTALL_COMMAND "")
+-
+-    ExternalProject_Get_Property(googletest SOURCE_DIR)
+-    include_directories(${SOURCE_DIR}/googlemock/include ${SOURCE_DIR}/googletest/include)
+-    ExternalProject_Get_Property(googletest BINARY_DIR)
+-    link_directories(${BINARY_DIR}/googlemock ${BINARY_DIR}/googlemock/gtest)
+     set(GMOCK_BOTH_LIBRARIES gmock_main gmock gtest)
+-    set_property(DIRECTORY PROPERTY CLEAN_NO_CUSTOM "${CMAKE_CURRENT_BINARY_DIR}/googletest")
+-    unset(SOURCE_DIR)
+-    unset(BINARY_DIR)
+-
+     enable_testing()
+     add_subdirectory(tests)
+     add_subdirectory(tests/runners/)
+diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
+index 859c048..58ab5c2 100644
+--- a/tests/CMakeLists.txt
++++ b/tests/CMakeLists.txt
+@@ -2,7 +2,6 @@ include(GoogleTest)
+ 
+ function(add_gmock_test target)
+     add_executable(${target} ${ARGN})
+-    add_dependencies(${target} googletest)
+     target_link_libraries(${target} config playlist bookmarks event_bus ${GMOCK_BOTH_LIBRARIES} ${XDG_BASEDIR_LIBRARIES} ${Boost_LIBRARIES} ${CURL_LIBRARIES} ${JSONCPP_LIBRARIES} pthread)
+     target_include_directories(${target} PRIVATE ${JSONCPP_INCLUDE_DIRS})
+     gtest_discover_tests(${target})
+-- 
+2.22.0
+
diff --git a/pkgs/applications/audio/rakarrack/default.nix b/pkgs/applications/audio/rakarrack/default.nix
new file mode 100644
index 00000000000..6d5d1ca860d
--- /dev/null
+++ b/pkgs/applications/audio/rakarrack/default.nix
@@ -0,0 +1,27 @@
+{ lib, stdenv, fetchurl, alsa-lib, alsa-utils, fltk, libjack2, libXft,
+libXpm, libjpeg, libpng, libsamplerate, libsndfile, zlib }:
+
+stdenv.mkDerivation  rec {
+  pname = "rakarrack";
+  version = "0.6.1";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/rakarrack/${pname}-${version}.tar.bz2";
+    sha256 = "1rpf63pdn54c4yg13k7cb1w1c7zsvl97c4qxcpz41c8l91xd55kn";
+  };
+
+  hardeningDisable = [ "format" ];
+
+  patches = [ ./fltk-path.patch ];
+
+  buildInputs = [ alsa-lib alsa-utils fltk libjack2 libXft libXpm libjpeg
+    libpng libsamplerate libsndfile zlib ];
+
+  meta = with 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/pkgs/applications/audio/rakarrack/fltk-path.patch b/pkgs/applications/audio/rakarrack/fltk-path.patch
new file mode 100644
index 00000000000..8f042bd3a66
--- /dev/null
+++ b/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/pkgs/applications/audio/real_time_config_quick_scan/default.nix b/pkgs/applications/audio/real_time_config_quick_scan/default.nix
new file mode 100644
index 00000000000..8bc2553f521
--- /dev/null
+++ b/pkgs/applications/audio/real_time_config_quick_scan/default.nix
@@ -0,0 +1,53 @@
+{ lib, stdenv, fetchFromGitHub, perlPackages, makeWrapper }:
+
+stdenv.mkDerivation rec {
+  pname = "realTimeConfigQuickScan";
+  version = "unstable-2020-07-23";
+
+  src = fetchFromGitHub {
+    owner  = "raboof";
+    repo   = pname;
+    rev    = "4697ba093d43d512b74a73b89531cb8c5adaa274";
+    sha256 = "16kanzp5i353x972zjkwgi3m8z90wc58613mlfzb0n01djdnm6k5";
+  };
+
+  nativeBuildInputs = [ makeWrapper ];
+  buildInputs = [ perlPackages.perl ];
+
+  dontBuild = true;
+
+  installPhase = ''
+    runHook preInstall
+    mkdir -p $out/bin
+    mkdir -p $out/share/$pname
+    mkdir -p $out/share/doc/$pname
+    # Install Script Files:
+    # *.pm files
+    for i in *.pm; do
+    install -Dm 755 "$i" "$out/share/$pname/$i"
+    done
+    # Install doc files:
+    install -D COPYING  "$out/share/doc/$pname/COPYING"
+    install -D README.md  "$out/share/doc/$pname/README.md"
+    # Install Executable scripts:
+    install -Dm 755 realTimeConfigQuickScan.pl "$out/bin/realTimeConfigQuickScan"
+    install -Dm 755 QuickScan.pl "$out/bin/QuickScan"
+    runHook postInstall
+  '';
+
+  postFixup = ''
+    wrapProgram $out/bin/realTimeConfigQuickScan \
+      --set PERL5LIB "$out/share/$pname"
+    wrapProgram $out/bin/QuickScan \
+      --set PERL5LIB "$out/share/$pname:${with perlPackages; makePerlPath [ Tk ]}"
+  '';
+
+  meta = with lib; {
+    description = "Linux configuration checker for systems to be used for real-time audio";
+    homepage = "https://github.com/raboof/realtimeconfigquickscan";
+    license = licenses.gpl2Plus;
+    maintainers = with maintainers; [ magnetophon ];
+    platforms = platforms.linux ;
+  };
+}
+
diff --git a/pkgs/applications/audio/reaper/default.nix b/pkgs/applications/audio/reaper/default.nix
new file mode 100644
index 00000000000..820475be0c6
--- /dev/null
+++ b/pkgs/applications/audio/reaper/default.nix
@@ -0,0 +1,83 @@
+{ config, lib, stdenv
+, fetchurl
+, autoPatchelfHook
+, makeWrapper
+
+, alsa-lib
+, gtk3
+, lame
+, ffmpeg
+, vlc
+, xdg-utils
+, which
+
+, jackSupport ? true, libjack2
+, pulseaudioSupport ? config.pulseaudio or true, libpulseaudio
+}:
+
+stdenv.mkDerivation rec {
+  pname = "reaper";
+  version = "6.47";
+
+  src = fetchurl {
+    url = "https://www.reaper.fm/files/${lib.versions.major version}.x/reaper${builtins.replaceStrings ["."] [""] version}_linux_${stdenv.hostPlatform.qemuArch}.tar.xz";
+    hash = {
+      x86_64-linux = "sha256-31HmIx/ohbrzu5uj8KOOZiHNCmXwng9h+fIGaJfYyqA=";
+      aarch64-linux = "sha256-CMmcBpaZ6BEZJ1144aQhOJ/o2NrGD7/8aq+ObLVMXYE=";
+    }.${stdenv.hostPlatform.system};
+  };
+
+  nativeBuildInputs = [
+    autoPatchelfHook
+    makeWrapper
+    xdg-utils # Required for desktop integration
+    which
+  ];
+
+  buildInputs = [
+    alsa-lib
+    stdenv.cc.cc.lib # reaper and libSwell need libstdc++.so.6
+    gtk3
+  ];
+
+  runtimeDependencies = [
+    gtk3 # libSwell needs libgdk-3.so.0
+  ]
+  ++ lib.optional jackSupport libjack2
+  ++ lib.optional pulseaudioSupport libpulseaudio;
+
+  dontBuild = true;
+
+  installPhase = ''
+    runHook preInstall
+
+    HOME="$out/share" XDG_DATA_HOME="$out/share" ./install-reaper.sh \
+      --install $out/opt \
+      --integrate-user-desktop
+    rm $out/opt/REAPER/uninstall-reaper.sh
+
+    # Dynamic loading of plugin dependencies does not adhere to rpath of
+    # reaper executable that gets modified with runtimeDependencies.
+    # Patching each plugin with DT_NEEDED is cumbersome and requires
+    # hardcoding of API versions of each dependency.
+    # Setting the rpath of the plugin shared object files does not
+    # seem to have an effect for some plugins.
+    # We opt for wrapping the executable with LD_LIBRARY_PATH prefix.
+    wrapProgram $out/opt/REAPER/reaper \
+      --prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ lame ffmpeg vlc ]}"
+
+    mkdir $out/bin
+    ln -s $out/opt/REAPER/reaper $out/bin/
+    ln -s $out/opt/REAPER/reamote-server $out/bin/
+
+    runHook postInstall
+  '';
+
+  meta = with lib; {
+    description = "Digital audio workstation";
+    homepage = "https://www.reaper.fm/";
+    license = licenses.unfree;
+    platforms = [ "x86_64-linux" "aarch64-linux" ];
+    maintainers = with maintainers; [ jfrankenau ilian orivej uniquepointer ];
+  };
+}
diff --git a/pkgs/applications/audio/redoflacs/default.nix b/pkgs/applications/audio/redoflacs/default.nix
new file mode 100644
index 00000000000..999dc90a6e4
--- /dev/null
+++ b/pkgs/applications/audio/redoflacs/default.nix
@@ -0,0 +1,47 @@
+{ stdenv
+, lib
+, fetchFromGitHub
+, makeWrapper
+, installShellFiles
+, flac
+, sox
+}:
+
+stdenv.mkDerivation rec {
+  pname = "redoflacs";
+  version = "0.30.20190903";
+
+  src = fetchFromGitHub {
+    owner = "sirjaren";
+    repo = "redoflacs";
+    rev = "4ca544cbc075d0865884906208cb2b8bc318cf9e";
+    sha256 = "19lcl09d4ngz2zzwd8dnnxx41ddvznhar6ggrlf1xvkr5gd7lafp";
+  };
+
+  dontBuild = true;
+
+  nativeBuildInputs = [ installShellFiles makeWrapper ];
+
+  installPhase = ''
+    runHook preInstall
+
+    install -Dm755 -t $out/bin redoflacs
+    install -Dm644 -t $out/share/doc/redoflacs LICENSE *.md
+    installManPage redoflacs.1
+
+    runHook postInstall
+  '';
+
+  postFixup = ''
+    wrapProgram $out/bin/redoflacs \
+      --prefix PATH : ${lib.makeBinPath ([ flac sox ])}
+  '';
+
+  meta = with lib; {
+    description = "Parallel BASH commandline FLAC compressor, verifier, organizer, analyzer, and retagger";
+    homepage = src.meta.homepage;
+    license = licenses.gpl2;
+    maintainers = with maintainers; [ peterhoeg ];
+    platforms = platforms.all;
+  };
+}
diff --git a/pkgs/applications/audio/redux/default.nix b/pkgs/applications/audio/redux/default.nix
new file mode 100644
index 00000000000..45ee78917ac
--- /dev/null
+++ b/pkgs/applications/audio/redux/default.nix
@@ -0,0 +1,49 @@
+{ lib
+, stdenv
+, fetchurl
+, libX11
+, alsa-lib
+, autoPatchelfHook
+, releasePath ? null
+}:
+
+# To use the full release version (same as renoise):
+# 1) Sign into https://backstage.renoise.com and download the release version 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.
+
+stdenv.mkDerivation rec {
+  pname = "redux";
+  version = "1.2.2";
+
+  src = if releasePath != null then releasePath
+    else fetchurl {
+      url = "https://files.renoise.com/demo/Renoise_Redux_${lib.replaceStrings ["."] ["_"] version}_Demo_Linux.tar.gz";
+      sha256 = "0zbwsg7nh9x3q29jv2kpqb3vwi0ksdwybhb4m2qr95rxrpx1kxhm";
+    };
+
+  nativeBuildInputs = [
+    autoPatchelfHook
+  ];
+
+  buildInputs = [ libX11 alsa-lib stdenv.cc.cc.lib ];
+
+  installPhase = ''
+    runHook preInstall
+
+    OUTDIR=$out/lib/vst2/RenoiseRedux.vst2
+    mkdir -p $OUTDIR
+    cp -r ./renoise_redux_x86_64/* $OUTDIR
+
+    runHook postInstall
+  '';
+
+  meta = with lib; {
+    description = "Sample-based instrument, with a powerful phrase sequencer";
+    homepage = "https://www.renoise.com/products/redux";
+    license = licenses.unfree;
+    maintainers = with maintainers; [ mihnea-s ];
+    platforms = [ "x86_64-linux" ];
+  };
+}
diff --git a/pkgs/applications/audio/renoise/default.nix b/pkgs/applications/audio/renoise/default.nix
new file mode 100644
index 00000000000..acd1d80c86d
--- /dev/null
+++ b/pkgs/applications/audio/renoise/default.nix
@@ -0,0 +1,86 @@
+{ lib, stdenv, fetchurl, libX11, libXext, libXcursor, libXrandr, libjack2, alsa-lib
+, mpg123, releasePath ? null }:
+
+with lib;
+
+# To use the full release version:
+# 1) Sign into https://backstage.renoise.com and download the release version 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 {
+  pname = "renoise";
+  version = "3.3.2";
+
+  src =
+    if stdenv.hostPlatform.system == "x86_64-linux" then
+        if releasePath == null then
+        fetchurl {
+          urls = [
+              "https://files.renoise.com/demo/Renoise_${urlVersion version}_Demo_Linux.tar.gz"
+              "https://web.archive.org/web/https://files.renoise.com/demo/Renoise_${urlVersion version}_Demo_Linux.tar.gz"
+          ];
+          sha256 = "0d9pnrvs93d4bwbfqxwyr3lg3k6gnzmp81m95gglzwdzczxkw38k";
+        }
+        else
+          releasePath
+    else throw "Platform is not supported. Use instalation native to your platform https://www.renoise.com/";
+
+  buildInputs = [ alsa-lib libjack2 libX11 libXcursor libXext libXrandr ];
+
+  installPhase = ''
+    cp -r Resources $out
+
+    mkdir -p $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
+
+    # Desktop item
+    mkdir -p $out/share/applications
+    cp -r Installer/renoise.desktop $out/share/applications/renoise.desktop
+
+    # Desktop item icons
+    mkdir -p $out/share/icons/hicolor/{48x48,64x64,128x128}/apps
+    cp Installer/renoise-48.png $out/share/icons/hicolor/48x48/apps/renoise.png
+    cp Installer/renoise-64.png $out/share/icons/hicolor/64x64/apps/renoise.png
+    cp Installer/renoise-128.png $out/share/icons/hicolor/128x128/apps/renoise.png
+  '';
+
+  postFixup = ''
+    patchelf \
+      --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \
+      --set-rpath ${mpg123}/lib:$out/lib \
+      $out/renoise
+
+    for path in $out/AudioPluginServer*; do
+      patchelf \
+        --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \
+        --set-rpath $out/lib \
+        $path
+    done
+
+    substituteInPlace $out/share/applications/renoise.desktop \
+      --replace Exec=renoise Exec=$out/bin/renoise
+  '';
+
+  meta = {
+    description = "Modern tracker-based DAW";
+    homepage = "https://www.renoise.com/";
+    license = licenses.unfree;
+    maintainers = [];
+    platforms = [ "x86_64-linux" ];
+  };
+}
diff --git a/pkgs/applications/audio/rhvoice/default.nix b/pkgs/applications/audio/rhvoice/default.nix
new file mode 100644
index 00000000000..ca51001dd62
--- /dev/null
+++ b/pkgs/applications/audio/rhvoice/default.nix
@@ -0,0 +1,41 @@
+{ stdenv, lib, pkg-config, fetchFromGitHub, sconsPackages
+, glibmm, libpulseaudio, libao }:
+
+let
+  version = "unstable-2018-02-10";
+in stdenv.mkDerivation {
+  pname = "rhvoice";
+  inherit version;
+
+  src = fetchFromGitHub {
+    owner = "Olga-Yakovleva";
+    repo = "RHVoice";
+    rev = "7a25a881b0465e47a12d8029b56f3b71a1d02312";
+    sha256 = "1gkrlmv7msh9qlm0gkjqpl9gswghpclfdwszr1p85v8vk6m63v0b";
+  };
+
+  nativeBuildInputs = [
+    sconsPackages.scons_3_1_2 pkg-config
+  ];
+
+  buildInputs = [
+    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/pkgs/applications/audio/rhvoice/honor_nix_environment.patch b/pkgs/applications/audio/rhvoice/honor_nix_environment.patch
new file mode 100644
index 00000000000..ed180c92deb
--- /dev/null
+++ b/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/pkgs/applications/audio/rhythmbox/default.nix b/pkgs/applications/audio/rhythmbox/default.nix
new file mode 100644
index 00000000000..4898648599c
--- /dev/null
+++ b/pkgs/applications/audio/rhythmbox/default.nix
@@ -0,0 +1,102 @@
+{ lib, stdenv, fetchurl, pkg-config, fetchFromGitLab
+, python3
+, perl
+, perlPackages
+, gtk3
+, intltool
+, libpeas
+, libsoup
+, libsecret
+, libnotify
+, libdmapsharing
+, gnome
+, totem-pl-parser
+, tdb
+, json-glib
+, itstool
+, wrapGAppsHook
+, gst_all_1
+, gst_plugins ? with gst_all_1; [ gst-plugins-good gst-plugins-ugly ]
+}:
+let
+
+  # The API version of libdmapsharing required by rhythmbox 3.4.4 is 3.0.
+
+  # This PR would solve the issue:
+  # https://gitlab.gnome.org/GNOME/rhythmbox/-/merge_requests/12
+  # Unfortunately applying this patch produces a rhythmbox which
+  # cannot fetch data from DAAP shares.
+
+  libdmapsharing_3 = libdmapsharing.overrideAttrs (old: rec {
+    version = "2.9.41";
+    src = fetchFromGitLab {
+      domain = "gitlab.gnome.org";
+      owner = "GNOME";
+      repo = old.pname;
+      rev = "${lib.toUpper old.pname}_${lib.replaceStrings ["."] ["_"] version}";
+      sha256 = "05kvrzf0cp3mskdy6iv7zqq24qdczl800q2dn1h4bk3d9wchgm4p";
+    };
+  });
+
+in stdenv.mkDerivation rec {
+  pname = "rhythmbox";
+  version = "3.4.4";
+
+  src = fetchurl {
+    url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
+    sha256 = "142xcvw4l19jyr5i72nbnrihs953pvrrzcbijjn9dxmxszbv03pf";
+  };
+
+  nativeBuildInputs = [
+    pkg-config
+    intltool perl perlPackages.XMLParser
+    itstool
+    wrapGAppsHook
+  ];
+
+  buildInputs = [
+    python3
+    libsoup
+    tdb
+    json-glib
+
+    gtk3
+    libpeas
+    totem-pl-parser
+    gnome.adwaita-icon-theme
+
+    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-plugins-ugly
+    gst_all_1.gst-libav
+
+    libdmapsharing_3 # necessary for daap support
+    libsecret
+    libnotify
+  ] ++ gst_plugins;
+
+  configureFlags = [
+    "--enable-daap"
+    "--enable-libnotify"
+    "--with-libsecret"
+  ];
+
+  enableParallelBuilding = true;
+
+  passthru = {
+    updateScript = gnome.updateScript {
+      packageName = pname;
+      versionPolicy = "none";
+    };
+  };
+
+  meta = with lib; {
+    homepage = "https://wiki.gnome.org/Apps/Rhythmbox";
+    description = "A music playing application for GNOME";
+    license = licenses.gpl2Plus;
+    platforms = platforms.linux;
+    maintainers = [ maintainers.rasendubi ];
+  };
+}
diff --git a/pkgs/applications/audio/rkrlv2/default.nix b/pkgs/applications/audio/rkrlv2/default.nix
new file mode 100644
index 00000000000..19fca6af988
--- /dev/null
+++ b/pkgs/applications/audio/rkrlv2/default.nix
@@ -0,0 +1,26 @@
+{ lib, stdenv, fetchFromGitHub, pkg-config, lv2, fftw, cmake, libXpm
+, libXft, libjack2, libsamplerate, libsndfile }:
+
+stdenv.mkDerivation rec {
+  pname = "rkrlv2";
+  version = "beta_3";
+
+  src = fetchFromGitHub {
+    owner = "ssj71";
+    repo = pname;
+    rev = version;
+    sha256 = "WjpPNUEYw4aGrh57J+7kkxKFXgCJWNaWAmueFbNUJJo=";
+  };
+
+  nativeBuildInputs = [ cmake pkg-config ];
+  buildInputs = [ libXft libXpm lv2 fftw libjack2 libsamplerate libsndfile ];
+
+  meta = with lib; {
+    description = "Rakarrak effects ported to LV2";
+    homepage = "https://github.com/ssj71/rkrlv2";
+    license = licenses.gpl2Only;
+    maintainers = [ maintainers.joelmo ];
+    platforms = platforms.unix;
+    broken = stdenv.isAarch64; # g++: error: unrecognized command line option '-mfpmath=sse'
+  };
+}
diff --git a/pkgs/applications/audio/rofi-mpd/default.nix b/pkgs/applications/audio/rofi-mpd/default.nix
new file mode 100644
index 00000000000..8f9819bd913
--- /dev/null
+++ b/pkgs/applications/audio/rofi-mpd/default.nix
@@ -0,0 +1,26 @@
+{ lib, python3Packages, fetchFromGitHub }:
+
+python3Packages.buildPythonApplication rec {
+  pname = "rofi-mpd";
+  version = "2.2.1";
+
+  src = fetchFromGitHub {
+    owner = "JakeStanger";
+    repo = "Rofi_MPD";
+    rev = "v${version}";
+    sha256 = "0jabyn6gqh8ychn2a06xws3avz0lqdnx3qvqkavfd2xr6sp2q7lg";
+  };
+
+  propagatedBuildInputs = with python3Packages; [ mutagen mpd2 toml appdirs ];
+
+  # upstream doesn't contain a test suite
+  doCheck = false;
+
+  meta = with lib; {
+    description = "A rofi menu for interacting with MPD written in Python";
+    homepage = "https://github.com/JakeStanger/Rofi_MPD";
+    license = licenses.mit;
+    maintainers = with maintainers; [ jakestanger ];
+    platforms = platforms.all;
+  };
+}
diff --git a/pkgs/applications/audio/rofi-pulse-select/default.nix b/pkgs/applications/audio/rofi-pulse-select/default.nix
new file mode 100644
index 00000000000..f4f70a9d1c3
--- /dev/null
+++ b/pkgs/applications/audio/rofi-pulse-select/default.nix
@@ -0,0 +1,40 @@
+{ stdenv
+, fetchFromGitLab
+, lib
+, makeWrapper
+, ponymix
+, rofi-unwrapped
+}:
+
+stdenv.mkDerivation rec {
+  pname = "rofi-pulse-select";
+  version = "0.2.0";
+
+  src = fetchFromGitLab {
+    owner = "DamienCassou";
+    repo = pname;
+    rev = "${version}";
+    sha256 = "1405v0bh2m8ip9c23l95i8iq2gfrpanc6f4dz17nysdcff2ay2p3";
+  };
+
+  installPhase = ''
+    runHook preInstall
+
+    install -D --target-directory=$out/bin/ ./rofi-pulse-select
+
+    wrapProgram $out/bin/rofi-pulse-select \
+      --prefix PATH ":" ${lib.makeBinPath [ rofi-unwrapped ponymix ]}
+
+    runHook postInstall
+  '';
+
+  nativeBuildInputs = [ makeWrapper ];
+
+  meta = with lib; {
+    description = "Rofi-based interface to select source/sink (aka input/output) with PulseAudio";
+    homepage = "https://gitlab.com/DamienCassou/rofi-pulse-select";
+    license = licenses.gpl3Plus;
+    maintainers = with maintainers; [ DamienCassou ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/pkgs/applications/audio/roomeqwizard/default.nix b/pkgs/applications/audio/roomeqwizard/default.nix
new file mode 100644
index 00000000000..b02ab65cd87
--- /dev/null
+++ b/pkgs/applications/audio/roomeqwizard/default.nix
@@ -0,0 +1,118 @@
+{ coreutils
+, fetchurl
+, gawk
+, gnused
+, jdk8
+, lib
+, makeDesktopItem
+, makeWrapper
+, stdenv
+, writeScript
+, writeTextFile
+, recommendedUdevRules ? true
+}:
+
+stdenv.mkDerivation rec {
+  pname = "roomeqwizard";
+  version = "5.20.5";
+
+  src = fetchurl {
+    url = "https://www.roomeqwizard.com/installers/REW_linux_${lib.replaceChars [ "." ] [ "_" ] version}.sh";
+    sha256 = "NYTRiOZmwkni4k+jI2SV84z5umO7+l+eKpwPCdlDD3U=";
+  };
+
+  dontUnpack = true;
+
+  desktopItem = makeDesktopItem {
+    name = pname;
+    exec = pname;
+    icon = pname;
+    desktopName = "REW";
+    genericName = "Software for audio measurements";
+    categories = [ "AudioVideo" ];
+  };
+
+  responseFile = writeTextFile {
+    name = "response.varfile";
+    text = ''
+      createDesktopLinkAction$Boolean=false
+      executeLauncherAction$Boolean=false
+      mem$Integer=1
+      opengl$Boolean=false
+      sys.adminRights$Boolean=false
+      sys.installationDir=INSTALLDIR
+      sys.languageId=en
+      sys.programGroupDisabled$Boolean=true
+    '';
+  };
+
+  udevRules = ''
+    # MiniDSP UMIK-1 calibrated USB microphone
+    SUBSYSTEM=="usb", ATTR{idVendor}=="2752", ATTR{idProduct}=="0007", TAG+="uaccess"
+  '';
+
+  nativeBuildInputs = [ makeWrapper ];
+
+  buildPhase = ''
+    runHook preBuild
+
+    # set JDK path in installer
+    sed -E 's|^#\s*(INSTALL4J_JAVA_HOME_OVERRIDE=)|\1${jdk8}|' $src > installer
+    chmod +x installer
+
+    sed -e "s|INSTALLDIR|$out/share/roomeqwizard|" $responseFile > response.varfile
+
+    export HOME=$PWD
+
+    ./installer -q -varfile response.varfile
+
+    runHook postBuild
+  '';
+
+  installPhase = ''
+    runHook preInstall
+
+    mkdir -p $out/bin $out/lib/udev/rules.d $out/share/icons/hicolor/256x256/apps
+    makeWrapper $out/share/roomeqwizard/roomeqwizard $out/bin/roomeqwizard \
+      --set INSTALL4J_JAVA_HOME_OVERRIDE ${jdk8} \
+      --prefix PATH : ${lib.makeBinPath [ coreutils gnused gawk ]}
+
+    cp -r "$desktopItem/share/applications" $out/share/
+    cp $out/share/roomeqwizard/.install4j/s_*.png "$out/share/icons/hicolor/256x256/apps/${pname}.png"
+
+    ${lib.optionalString recommendedUdevRules ''echo "$udevRules" > $out/lib/udev/rules.d/90-roomeqwizard.rules''}
+
+    runHook postInstall
+  '';
+
+  passthru.updateScript = writeScript "${pname}-update.sh" ''
+    #!/usr/bin/env nix-shell
+    #!nix-shell -i bash -p curl common-updater-scripts nixpkgs-fmt coreutils perl
+
+    set -euo pipefail
+
+    perlexpr='if (/current version.{1,10}v(\d+)\.(\d+)\.(\d+)/i) { print "$1.$2.$3"; break; }'
+
+    oldVersion="$(nix-instantiate --eval -E "with import ./. {}; lib.getVersion ${pname}" | tr -d '"')"
+    latestVersion="$(curl -sS https://www.roomeqwizard.com/index.html | perl -ne "$perlexpr")"
+
+    if [ ! "$oldVersion" = "$latestVersion" ]; then
+      update-source-version ${pname} "$latestVersion" --version-key=version --print-changes
+      nixpkgs-fmt "pkgs/applications/audio/roomeqwizard/default.nix"
+    else
+      echo "${pname} is already up-to-date"
+    fi
+  '';
+
+  meta = with lib; {
+    homepage = "https://www.roomeqwizard.com/";
+    license = licenses.unfree;
+    platforms = platforms.all;
+    maintainers = with maintainers; [ zaninime ];
+    description = "Room Acoustics Software";
+    longDescription = ''
+      REW is free software for room acoustic measurement, loudspeaker
+      measurement and audio device measurement.
+    '';
+  };
+}
diff --git a/pkgs/applications/audio/rosegarden/default.nix b/pkgs/applications/audio/rosegarden/default.nix
new file mode 100644
index 00000000000..dd0112d8216
--- /dev/null
+++ b/pkgs/applications/audio/rosegarden/default.nix
@@ -0,0 +1,70 @@
+{ lib
+, stdenv
+, fetchurl
+, cmake
+, makedepend
+, perl
+, pkg-config
+, qttools
+, wrapQtAppsHook
+, dssi
+, fftwSinglePrec
+, ladspaH
+, ladspaPlugins
+, libjack2
+, alsa-lib
+, liblo
+, libsamplerate
+, libsndfile
+, lirc
+, lrdf
+, qtbase
+}:
+
+stdenv.mkDerivation rec {
+  pname = "rosegarden";
+  version = "20.12";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/rosegarden/${pname}-${version}.tar.bz2";
+    sha256 = "sha256-iGaEr8WFipV4I00fhFGI2xMBFPf784IIxNXs2hUTHFs=";
+  };
+
+  postPhase = ''
+    substituteInPlace src/CMakeLists.txt --replace svnheader svnversion
+  '';
+
+  nativeBuildInputs = [ cmake makedepend perl pkg-config qttools wrapQtAppsHook ];
+
+  buildInputs = [
+    dssi
+    fftwSinglePrec
+    ladspaH
+    ladspaPlugins
+    libjack2
+    liblo
+    libsamplerate
+    libsndfile
+    lirc
+    lrdf
+    qtbase
+    alsa-lib
+  ];
+
+  meta = with 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/pkgs/applications/audio/rubyripper/default.nix b/pkgs/applications/audio/rubyripper/default.nix
new file mode 100644
index 00000000000..0af80c991c2
--- /dev/null
+++ b/pkgs/applications/audio/rubyripper/default.nix
@@ -0,0 +1,38 @@
+{ lib, stdenv, fetchFromGitHub, makeWrapper
+, cdparanoia, cddiscid, ruby }:
+
+stdenv.mkDerivation rec {
+  version = "0.8.0rc3";
+  pname = "rubyripper";
+
+  src = fetchFromGitHub {
+    owner = "bleskodev";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "1qfwv8bgc9pyfh3d40bvyr9n7sjc2na61481693wwww640lm0f9f";
+  };
+
+  preConfigure = "patchShebangs .";
+
+  configureFlags = [ "--enable-cli" ];
+
+  nativeBuildInputs = [ makeWrapper ];
+
+  buildInputs = [
+    cddiscid
+    cdparanoia
+    ruby
+  ];
+
+  postFixup = ''
+    wrapProgram $out/bin/rrip_cli \
+      --prefix PATH : ${lib.makeBinPath [ cddiscid cdparanoia ruby ]}
+  '';
+
+  meta = with lib; {
+    description = "High quality CD audio ripper";
+    platforms = platforms.linux;
+    license = licenses.gpl3Plus;
+    homepage = "https://github.com/bleskodev/rubyripper";
+  };
+}
diff --git a/pkgs/applications/audio/rymcast/default.nix b/pkgs/applications/audio/rymcast/default.nix
new file mode 100644
index 00000000000..92d3151c835
--- /dev/null
+++ b/pkgs/applications/audio/rymcast/default.nix
@@ -0,0 +1,32 @@
+{ lib, stdenv, fetchzip, autoPatchelfHook, makeWrapper
+, alsa-lib, curl, gtk3, webkitgtk, zenity }:
+
+stdenv.mkDerivation rec {
+  pname = "rymcast";
+  version = "1.0.6";
+
+  src = fetchzip {
+    url = "https://www.inphonik.com/files/rymcast/rymcast-${version}-linux-x64.tar.gz";
+    hash = "sha256:0vjjhfrwdibjjgz3awbg30qxkjrzc4cya1f4pigwjh3r0vvrq0ga";
+    stripRoot = false;
+  };
+
+  nativeBuildInputs = [ autoPatchelfHook makeWrapper ];
+
+  buildInputs = [ alsa-lib curl gtk3 stdenv.cc.cc.lib webkitgtk zenity ];
+
+  installPhase = ''
+    mkdir -p "$out/bin"
+    cp RYMCast "$out/bin/"
+    wrapProgram "$out/bin/RYMCast" \
+      --set PATH "${lib.makeBinPath [ zenity ]}"
+  '';
+
+  meta = with lib; {
+    description = "Player for Mega Drive/Genesis VGM files";
+    homepage = "https://www.inphonik.com/products/rymcast-genesis-vgm-player/";
+    license = licenses.unfree;
+    platforms = [ "x86_64-linux" ];
+    maintainers = with maintainers; [ astsmtl ];
+  };
+}
diff --git a/pkgs/applications/audio/samplv1/default.nix b/pkgs/applications/audio/samplv1/default.nix
new file mode 100644
index 00000000000..95035570e92
--- /dev/null
+++ b/pkgs/applications/audio/samplv1/default.nix
@@ -0,0 +1,26 @@
+{ mkDerivation, lib, fetchurl, pkg-config, libjack2
+, alsa-lib, liblo, libsndfile, lv2, qtbase, qttools
+, rubberband
+}:
+
+mkDerivation rec {
+  pname = "samplv1";
+  version = "0.9.23";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/samplv1/${pname}-${version}.tar.gz";
+    sha256 = "sha256-eJA6ixH20Wv+cD2CKGomncyfJ4tfpOL3UrTeCkb5/q0=";
+  };
+
+  nativeBuildInputs = [ qttools pkg-config ];
+
+  buildInputs = [ libjack2 alsa-lib liblo libsndfile lv2 qtbase rubberband ];
+
+  meta = with 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/pkgs/applications/audio/sayonara/default.nix b/pkgs/applications/audio/sayonara/default.nix
new file mode 100644
index 00000000000..12a7ab0325e
--- /dev/null
+++ b/pkgs/applications/audio/sayonara/default.nix
@@ -0,0 +1,78 @@
+{ mkDerivation
+, cmake
+, fetchFromGitLab
+, nix-update-script
+, gst_all_1
+, lib
+, libpulseaudio
+, ninja
+, pcre
+, pkg-config
+, qtbase
+, qttools
+, taglib
+, zlib
+, python3
+}:
+
+let
+  py = python3.withPackages (ps: with ps; [
+    pydbus
+  ]);
+in
+mkDerivation rec {
+  pname = "sayonara";
+  version = "1.7.0-stable3";
+
+  src = fetchFromGitLab {
+    owner = "luciocarreras";
+    repo = "sayonara-player";
+    rev = version;
+    sha256 = "sha256-tJ/8tGNkmTwWRCpPy/h85SP/6QDAgcaKWJdM5MSAXJw=";
+  };
+
+  nativeBuildInputs = [ cmake ninja pkg-config qttools ];
+
+  buildInputs = [
+    libpulseaudio
+    pcre
+    qtbase
+    taglib
+    zlib
+    py
+  ]
+  ++ (with gst_all_1; [
+    gstreamer
+    gst-plugins-base
+    gst-plugins-good
+    gst-plugins-bad
+    gst-plugins-ugly
+  ]);
+
+  # we carry the patched taglib 1.11.1 that doesn't break ogg but sayonara just
+  # checks for the version
+  cmakeFlags = [
+    "-DWITH_SYSTEM_TAGLIB=ON"
+  ];
+
+  # gstreamer cannot otherwise be found
+  NIX_CFLAGS_COMPILE = "-I${gst_all_1.gst-plugins-base.dev}/include/gstreamer-1.0";
+
+  postInstall = ''
+    qtWrapperArgs+=(--prefix GST_PLUGIN_SYSTEM_PATH_1_0 : "$GST_PLUGIN_SYSTEM_PATH_1_0")
+  '';
+
+  passthru = {
+    updateScript = nix-update-script {
+      attrPath = pname;
+    };
+  };
+
+  meta = with lib; {
+    description = "Sayonara music player";
+    homepage = "https://sayonara-player.com/";
+    license = licenses.gpl3;
+    maintainers = with maintainers; [ deepfire ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/pkgs/applications/audio/sc68/default.nix b/pkgs/applications/audio/sc68/default.nix
new file mode 100644
index 00000000000..3f6bb032ec4
--- /dev/null
+++ b/pkgs/applications/audio/sc68/default.nix
@@ -0,0 +1,39 @@
+{ lib, stdenv
+, fetchsvn
+, pkg-config
+, which
+, autoconf
+, automake
+, libtool
+, hexdump
+, libao
+, zlib
+, curl
+}:
+
+stdenv.mkDerivation rec {
+  pname = "sc68";
+  version = "unstable-2021-08-23";
+
+  src = fetchsvn {
+    url = "svn://svn.code.sf.net/p/sc68/code/";
+    rev = "694";
+    sha256 = "1yycnr4ndzfhbmki41c30zskwyizpb9wb8sf0gxcprllmbq6a421";
+  };
+
+  preConfigure = "tools/svn-bootstrap.sh";
+
+  enableParallelBuilding = true;
+
+  nativeBuildInputs = [ pkg-config which autoconf automake libtool hexdump ];
+
+  buildInputs = [ libao zlib curl ];
+
+  meta = with lib; {
+    description = "Atari ST and Amiga music player";
+    homepage = "http://sc68.atari.org/project.html";
+    license = licenses.gpl3Plus;
+    maintainers = with maintainers; [ OPNA2608 ];
+    platforms = platforms.all;
+  };
+}
diff --git a/pkgs/applications/audio/schismtracker/default.nix b/pkgs/applications/audio/schismtracker/default.nix
new file mode 100644
index 00000000000..7439e566da2
--- /dev/null
+++ b/pkgs/applications/audio/schismtracker/default.nix
@@ -0,0 +1,37 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, autoreconfHook
+, alsa-lib
+, python3
+, SDL
+}:
+
+stdenv.mkDerivation rec {
+  pname = "schismtracker";
+  version = "20220125";
+
+  src = fetchFromGitHub {
+    owner = pname;
+    repo = pname;
+    rev = version;
+    sha256 = "sha256-Hqbm5+YyCde/6QuyIy4NE/jG4xNDzeNjEefMr60GEZM=";
+  };
+
+  configureFlags = [ "--enable-dependency-tracking" ]
+    ++ lib.optional stdenv.isDarwin "--disable-sdltest";
+
+  nativeBuildInputs = [ autoreconfHook python3 ];
+
+  buildInputs = [ SDL ] ++ lib.optional stdenv.isLinux alsa-lib;
+
+  enableParallelBuilding = true;
+
+  meta = with lib; {
+    description = "Music tracker application, free reimplementation of Impulse Tracker";
+    homepage = "http://schismtracker.org/";
+    license = licenses.gpl2Plus;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ ftrvxmtrx ];
+  };
+}
diff --git a/pkgs/applications/audio/scream/default.nix b/pkgs/applications/audio/scream/default.nix
new file mode 100644
index 00000000000..f2526903f36
--- /dev/null
+++ b/pkgs/applications/audio/scream/default.nix
@@ -0,0 +1,46 @@
+{ stdenv, lib, config, fetchFromGitHub, cmake, pkg-config
+, alsaSupport ? stdenv.isLinux, alsa-lib
+, pulseSupport ? config.pulseaudio or stdenv.isLinux, libpulseaudio
+, jackSupport ? false, libjack2
+}:
+
+stdenv.mkDerivation rec {
+  pname = "scream";
+  version = "3.9";
+
+  src = fetchFromGitHub {
+    owner = "duncanthrax";
+    repo = pname;
+    rev = version;
+    sha256 = "sha256-JxDR7UhS4/+oGQ9Fwm4f+yBM9OyX0Srvr9n/vaZVvxQ=";
+  };
+
+  buildInputs = lib.optional pulseSupport libpulseaudio
+    ++ lib.optional jackSupport libjack2
+    ++ lib.optional alsaSupport alsa-lib;
+  nativeBuildInputs = [ cmake pkg-config ];
+
+  cmakeFlags = [
+    "-DPULSEAUDIO_ENABLE=${if pulseSupport then "ON" else "OFF"}"
+    "-DALSA_ENABLE=${if alsaSupport then "ON" else "OFF"}"
+    "-DJACK_ENABLE=${if jackSupport then "ON" else "OFF"}"
+  ];
+
+  cmakeDir = "../Receivers/unix";
+
+  doInstallCheck = true;
+  installCheckPhase = ''
+    set +o pipefail
+
+    # Programs exit with code 1 when testing help, so grep for a string
+    $out/bin/scream -h 2>&1 | grep -q Usage:
+  '';
+
+  meta = with lib; {
+    description = "Audio receiver for the Scream virtual network sound card";
+    homepage = "https://github.com/duncanthrax/scream";
+    license = licenses.mspl;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ arcnmx ];
+  };
+}
diff --git a/pkgs/applications/audio/seq24/default.nix b/pkgs/applications/audio/seq24/default.nix
new file mode 100644
index 00000000000..f586a1592f9
--- /dev/null
+++ b/pkgs/applications/audio/seq24/default.nix
@@ -0,0 +1,24 @@
+{ lib, stdenv, fetchurl, alsa-lib, gtkmm2, libjack2, pkg-config }:
+
+stdenv.mkDerivation  rec {
+  pname = "seq24";
+  version = "0.9.3";
+
+  src = fetchurl {
+    url = "https://launchpad.net/seq24/trunk/${version}/+download/${pname}-${version}.tar.gz";
+    sha256 = "1qpyb7355s21sgy6gibkybxpzx4ikha57a8w644lca6qy9mhcwi3";
+  };
+
+  patches = [ ./mutex_no_nameclash.patch ];
+
+  buildInputs = [ alsa-lib gtkmm2 libjack2 ];
+  nativeBuildInputs = [ pkg-config ];
+
+  meta = with 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/pkgs/applications/audio/seq24/mutex_no_nameclash.patch b/pkgs/applications/audio/seq24/mutex_no_nameclash.patch
new file mode 100644
index 00000000000..dd82b1b0e09
--- /dev/null
+++ b/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/pkgs/applications/audio/seq66/default.nix b/pkgs/applications/audio/seq66/default.nix
new file mode 100644
index 00000000000..0132b967900
--- /dev/null
+++ b/pkgs/applications/audio/seq66/default.nix
@@ -0,0 +1,37 @@
+{ lib, stdenv, fetchFromGitHub, autoreconfHook, pkg-config, qttools, which
+, alsa-lib, libjack2, liblo, qtbase
+}:
+
+stdenv.mkDerivation rec {
+  pname = "seq66";
+  version = "0.90.5";
+
+  src = fetchFromGitHub {
+    owner = "ahlstromcj";
+    repo = pname;
+    rev = version;
+    sha256 = "1jvra1wzlycfpvffnqidk264zw6fyl4fsghkw5256ldk22aalmq9";
+  };
+
+  nativeBuildInputs = [ autoreconfHook pkg-config qttools which ];
+
+  buildInputs = [ alsa-lib libjack2 liblo qtbase ];
+
+  postPatch = ''
+    for d in libseq66/include libseq66/src libsessions/include libsessions/src seq_qt5/src seq_rtmidi/include seq_rtmidi/src Seqtool/src; do
+      substituteInPlace "$d/Makefile.am" --replace '$(git_info)' '${version}'
+    done
+  '';
+
+  enableParallelBuilding = true;
+
+  dontWrapQtApps = true;
+
+  meta = with lib; {
+    homepage = "https://github.com/ahlstromcj/seq66";
+    description = "Loop based midi sequencer with Qt GUI derived from seq24 and sequencer64";
+    license = licenses.gpl2Plus;
+    maintainers = with maintainers; [ orivej ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/pkgs/applications/audio/setbfree/default.nix b/pkgs/applications/audio/setbfree/default.nix
new file mode 100644
index 00000000000..7cad39b63ea
--- /dev/null
+++ b/pkgs/applications/audio/setbfree/default.nix
@@ -0,0 +1,35 @@
+{ lib, stdenv, fetchFromGitHub, alsa-lib, freetype, ftgl, libjack2, libX11, lv2
+, libGLU, libGL, pkg-config, ttf_bitstream_vera
+}:
+
+stdenv.mkDerivation  rec {
+  pname = "setbfree";
+  version = "0.8.11";
+
+  src = fetchFromGitHub {
+    owner = "pantherb";
+    repo = "setBfree";
+    rev = "v${version}";
+    sha256 = "sha256-OYrsq3zVaotmS1KUgDIQbVQgxpfweMKiB17/PC1iXDA=";
+  };
+
+  postPatch = ''
+    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 = [ pkg-config ];
+  buildInputs = [
+    alsa-lib freetype ftgl libjack2 libX11 lv2 libGLU libGL
+    ttf_bitstream_vera
+  ];
+
+  meta = with lib; {
+    description = "A DSP tonewheel organ emulator";
+    homepage = "https://setbfree.org";
+    license = licenses.gpl2;
+    platforms = [ "x86_64-linux" "i686-linux" ]; # fails on ARM and Darwin
+    maintainers = [ maintainers.goibhniu ];
+  };
+}
diff --git a/pkgs/applications/audio/sfizz/default.nix b/pkgs/applications/audio/sfizz/default.nix
new file mode 100644
index 00000000000..54acc782c60
--- /dev/null
+++ b/pkgs/applications/audio/sfizz/default.nix
@@ -0,0 +1,59 @@
+{ lib, stdenv, fetchFromGitHub, libjack2, libsndfile, xorg, freetype
+, libxkbcommon, cairo, glib, gnome, flac, libogg, libvorbis, libopus, cmake
+, pango, pkg-config }:
+
+stdenv.mkDerivation rec {
+  pname = "sfizz";
+  version = "1.2.0";
+
+  src = fetchFromGitHub {
+    owner = "sfztools";
+    repo = pname;
+    rev = version;
+    sha256 = "sha256-biHsB49Ym9NU4tMOVnUNuIxPtpcIi6oCAS7JBPhxwec=";
+    fetchSubmodules = true;
+  };
+
+  buildInputs = [
+    libjack2
+    libsndfile
+    flac
+    libogg
+    libvorbis
+    libopus
+    xorg.libX11
+    xorg.libxcb
+    xorg.libXau
+    xorg.libXdmcp
+    xorg.xcbutil
+    xorg.xcbutilcursor
+    xorg.xcbutilrenderutil
+    xorg.xcbutilkeysyms
+    xorg.xcbutilimage
+    libxkbcommon
+    cairo
+    glib
+    gnome.zenity
+    freetype
+    pango
+  ];
+  nativeBuildInputs = [ cmake pkg-config ];
+
+  postPatch = ''
+    substituteInPlace plugins/editor/external/vstgui4/vstgui/lib/platform/linux/x11fileselector.cpp \
+      --replace 'zenitypath = "zenity"' 'zenitypath = "${gnome.zenity}/bin/zenity"'
+    substituteInPlace plugins/editor/src/editor/NativeHelpers.cpp \
+      --replace '/usr/bin/zenity' '${gnome.zenity}/bin/zenity'
+  '';
+
+  cmakeFlags = [ "-DCMAKE_BUILD_TYPE=Release" "-DSFIZZ_TESTS=ON" ];
+
+  meta = with lib; {
+    homepage = "https://github.com/sfztools/sfizz";
+    description = "SFZ jack client and LV2 plugin";
+    license = licenses.bsd2;
+    maintainers = [ maintainers.magnetophon ];
+    platforms = platforms.all;
+    badPlatforms = platforms.darwin;
+  };
+}
diff --git a/pkgs/applications/audio/sfxr-qt/default.nix b/pkgs/applications/audio/sfxr-qt/default.nix
new file mode 100644
index 00000000000..bf8b826f544
--- /dev/null
+++ b/pkgs/applications/audio/sfxr-qt/default.nix
@@ -0,0 +1,43 @@
+{ lib
+, mkDerivation
+, fetchFromGitHub
+, cmake
+, extra-cmake-modules
+, qtbase
+, qtquickcontrols2
+, SDL
+, python3
+}:
+
+mkDerivation rec {
+  pname = "sfxr-qt";
+  version = "1.4.0";
+
+  src = fetchFromGitHub {
+    owner = "agateau";
+    repo = "sfxr-qt";
+    rev = version;
+    sha256 = "sha256-Mn+wcwu70BwsTLFlc12sOOe6U1AJ8hR7bCIPlPnCooE=";
+    fetchSubmodules = true;
+  };
+
+  nativeBuildInputs = [
+    cmake
+    extra-cmake-modules
+    (python3.withPackages (pp: with pp; [ pyyaml jinja2 setuptools ]))
+  ];
+
+  buildInputs = [
+    qtbase
+    qtquickcontrols2
+    SDL
+  ];
+
+  meta = with 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/pkgs/applications/audio/sfxr/default.nix b/pkgs/applications/audio/sfxr/default.nix
new file mode 100644
index 00000000000..aed27ecdba5
--- /dev/null
+++ b/pkgs/applications/audio/sfxr/default.nix
@@ -0,0 +1,56 @@
+{ lib, stdenv
+, fetchurl
+, pkg-config
+, desktop-file-utils
+, SDL
+, gtk3
+, gsettings-desktop-schemas
+, wrapGAppsHook
+}:
+
+stdenv.mkDerivation rec {
+  pname = "sfxr";
+  version = "1.2.1";
+
+  src = fetchurl {
+    url = "http://www.drpetter.se/files/sfxr-sdl-${version}.tar.gz";
+    sha256 = "0dfqgid6wzzyyhc0ha94prxax59wx79hqr25r6if6by9cj4vx4ya";
+  };
+
+  postPatch = ''
+    substituteInPlace Makefile --replace "usr/" ""
+    substituteInPlace sdlkit.h --replace \
+      "/usr/share/sfxr/sfxr.bmp" \
+      "$out/share/sfxr/sfxr.bmp"
+    substituteInPlace main.cpp \
+      --replace \
+      "/usr/share/sfxr/font.tga" \
+      "$out/share/sfxr/font.tga" \
+      --replace \
+      "/usr/share/sfxr/ld48.tga" \
+      "$out/share/sfxr/ld48.tga"
+  '';
+
+  nativeBuildInputs = [
+    pkg-config
+    desktop-file-utils
+  ];
+
+  buildInputs = [
+    SDL
+    gtk3
+    gsettings-desktop-schemas
+    wrapGAppsHook
+  ];
+
+  makeFlags = [ "DESTDIR=$(out)" ];
+
+  meta = with lib; {
+    homepage = "http://www.drpetter.se/project_sfxr.html";
+    description = "A videogame sound effect generator";
+    license = licenses.mit;
+    maintainers = with maintainers; [ fgaz ];
+    platforms = platforms.unix;
+  };
+}
+
diff --git a/pkgs/applications/audio/shntool/default.nix b/pkgs/applications/audio/shntool/default.nix
new file mode 100644
index 00000000000..8b4f736ab1c
--- /dev/null
+++ b/pkgs/applications/audio/shntool/default.nix
@@ -0,0 +1,21 @@
+{ lib, stdenv, fetchurl, flac }:
+
+stdenv.mkDerivation {
+  version = "3.0.10";
+  pname = "shntool";
+
+  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 = lib.licenses.gpl2Plus;
+    platforms = lib.platforms.all;
+    maintainers = with lib.maintainers; [ jcumming ];
+  };
+}
diff --git a/pkgs/applications/audio/shortwave/default.nix b/pkgs/applications/audio/shortwave/default.nix
new file mode 100644
index 00000000000..49492d05d15
--- /dev/null
+++ b/pkgs/applications/audio/shortwave/default.nix
@@ -0,0 +1,87 @@
+{ stdenv
+, lib
+, fetchFromGitLab
+, dbus
+, desktop-file-utils
+, gdk-pixbuf
+, gettext
+, gitMinimal
+, glib
+, gst_all_1
+, gtk4
+, libadwaita
+, meson
+, ninja
+, openssl
+, pkg-config
+, python3
+, rustPlatform
+, sqlite
+, wrapGAppsHook
+}:
+
+stdenv.mkDerivation rec {
+  pname = "shortwave";
+  version = "2.0.1";
+
+  src = fetchFromGitLab {
+    domain = "gitlab.gnome.org";
+    owner = "World";
+    repo = "Shortwave";
+    rev = version;
+    sha256 = "sha256-25qPb7qlqCwYJzl4qZxAZYx5asxSlXBlc/0dGyBdk1o=";
+  };
+
+  cargoDeps = rustPlatform.fetchCargoTarball {
+    inherit src;
+    name = "${pname}-${version}";
+    hash = "sha256-00dQXcSNmdZb2nSLG3q7jm4sugF9XR4LbH0OmcuHVxA=";
+  };
+
+  nativeBuildInputs = [
+    desktop-file-utils
+    gettext
+    gitMinimal
+    glib # for glib-compile-schemas
+    meson
+    ninja
+    pkg-config
+    python3
+    rustPlatform.rust.cargo
+    rustPlatform.cargoSetupHook
+    rustPlatform.rust.rustc
+    wrapGAppsHook
+  ];
+
+  buildInputs = [
+    dbus
+    gdk-pixbuf
+    glib
+    gtk4
+    libadwaita
+    openssl
+    sqlite
+  ] ++ (with gst_all_1; [
+    gstreamer
+    gst-plugins-base
+    gst-plugins-good
+    gst-plugins-bad
+  ]);
+
+  postPatch = ''
+    patchShebangs build-aux/meson/postinstall.py
+  '';
+
+  meta = with lib; {
+    homepage = "https://gitlab.gnome.org/World/Shortwave";
+    description = "Find and listen to internet radio stations";
+    longDescription = ''
+      Shortwave is a streaming audio player designed for the GNOME
+      desktop. It is the successor to the older Gradio application.
+    '';
+    maintainers = with maintainers; [ lasandell ];
+    broken = true; # incompatible with latest libadwaita
+    license = licenses.gpl3Plus;
+    platforms = platforms.linux;
+  };
+}
diff --git a/pkgs/applications/audio/sidplayfp/default.nix b/pkgs/applications/audio/sidplayfp/default.nix
new file mode 100644
index 00000000000..9aef427f509
--- /dev/null
+++ b/pkgs/applications/audio/sidplayfp/default.nix
@@ -0,0 +1,54 @@
+{ stdenv
+, lib
+, fetchFromGitHub
+, nix-update-script
+, autoreconfHook
+, perl
+, pkg-config
+, libsidplayfp
+, alsaSupport ? stdenv.hostPlatform.isLinux
+, alsa-lib
+, pulseSupport ? stdenv.hostPlatform.isLinux
+, libpulseaudio
+, out123Support ? stdenv.hostPlatform.isDarwin
+, mpg123
+}:
+
+stdenv.mkDerivation rec {
+  pname = "sidplayfp";
+  version = "2.2.3";
+
+  src = fetchFromGitHub {
+    owner = "libsidplayfp";
+    repo = "sidplayfp";
+    rev = "v${version}";
+    sha256 = "sha256-R60Dh19GYM157ysmN8EOJ47eO8a7sdkEEF1TObG1xzk=";
+  };
+
+  nativeBuildInputs = [ autoreconfHook perl pkg-config ];
+
+  buildInputs = [ libsidplayfp ]
+    ++ lib.optional alsaSupport alsa-lib
+    ++ lib.optional pulseSupport libpulseaudio
+    ++ lib.optional out123Support mpg123;
+
+  configureFlags = lib.optionals out123Support [
+    "--with-out123"
+  ];
+
+  enableParallelBuilding = true;
+
+  passthru = {
+    updateScript = nix-update-script {
+      attrPath = pname;
+    };
+  };
+
+  meta = with lib; {
+    description = "A SID player using libsidplayfp";
+    homepage = "https://github.com/libsidplayfp/sidplayfp";
+    license = with licenses; [ gpl2Plus ];
+    maintainers = with maintainers; [ dezgeg OPNA2608 ];
+    platforms = platforms.all;
+  };
+}
diff --git a/pkgs/applications/audio/sisco.lv2/default.nix b/pkgs/applications/audio/sisco.lv2/default.nix
new file mode 100644
index 00000000000..3ecd4665f26
--- /dev/null
+++ b/pkgs/applications/audio/sisco.lv2/default.nix
@@ -0,0 +1,44 @@
+{ lib, stdenv, fetchFromGitHub, lv2, pkg-config, libGLU, libGL, 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 = [ pkg-config ];
+  buildInputs = [ lv2 pango cairo libjack2 libGLU libGL ];
+
+  postUnpack = "chmod u+w -R ${robtkName}-src; mv ${robtkName}-src/* ${sourceRoot}/robtk";
+  sisco_VERSION = version;
+  preConfigure = "makeFlagsArray=(PREFIX=$out)";
+
+  meta = with 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/pkgs/applications/audio/snapcast/default.nix b/pkgs/applications/audio/snapcast/default.nix
new file mode 100644
index 00000000000..19016b700fd
--- /dev/null
+++ b/pkgs/applications/audio/snapcast/default.nix
@@ -0,0 +1,73 @@
+{ stdenv, lib, fetchFromGitHub, cmake, pkg-config
+, alsa-lib, asio, avahi, boost17x, flac, libogg, libvorbis, soxr
+, pulseaudioSupport ? false, libpulseaudio
+, nixosTests }:
+
+assert pulseaudioSupport -> libpulseaudio != null;
+
+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.5.0";
+    sha256  = "09mnkrans9zmwfxsiwgkm0rba66c11kg5zby9x3rjic34gnmw6ay";
+  };
+
+  popl = dependency {
+    name    = "popl";
+    version = "1.2.0";
+    sha256  = "1z6z7fwffs3d9h56mc2m24d5gp4fc5bi8836zyfb276s6fjyfcai";
+  };
+
+in
+
+stdenv.mkDerivation rec {
+  pname = "snapcast";
+  version = "0.26.0";
+
+  src = fetchFromGitHub {
+    owner  = "badaix";
+    repo   = "snapcast";
+    rev    = "v${version}";
+    sha256 = "sha256-CCifn9OEFM//Hk1PJj8T3MXIV8pXCTdBBXPsHuZwLyQ=";
+  };
+
+  nativeBuildInputs = [ cmake pkg-config ];
+  # snapcast also supports building against tremor but as we have libogg, that's
+  # not needed
+  buildInputs = [
+    boost17x
+    alsa-lib asio avahi flac libogg libvorbis
+    aixlog popl soxr
+  ] ++ lib.optional pulseaudioSupport libpulseaudio;
+
+  # 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
+  '';
+
+  passthru.tests.snapcast = nixosTests.snapcast;
+
+  meta = with lib; {
+    description = "Synchronous multi-room audio player";
+    homepage = "https://github.com/badaix/snapcast";
+    maintainers = with maintainers; [ fpletz ];
+    license = licenses.gpl3Plus;
+  };
+}
diff --git a/pkgs/applications/audio/snd/default.nix b/pkgs/applications/audio/snd/default.nix
new file mode 100644
index 00000000000..52789d64d10
--- /dev/null
+++ b/pkgs/applications/audio/snd/default.nix
@@ -0,0 +1,33 @@
+{ lib, stdenv, fetchurl, pkg-config
+, alsa-lib, fftw, gsl, motif, xorg
+, CoreServices, CoreMIDI
+}:
+
+stdenv.mkDerivation rec {
+  pname = "snd";
+  version = "22.1";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/snd/snd-${version}.tar.gz";
+    sha256 = "sha256-jrH0XRvPj9ySd8FSrOKf6qP5T1YSKrYBNHl6fz5dhkI=";
+  };
+
+  nativeBuildInputs = [ pkg-config ];
+
+  buildInputs = [ fftw gsl motif ]
+    ++ lib.optionals stdenv.isLinux [ alsa-lib ]
+    ++ lib.optionals stdenv.isDarwin [ CoreServices CoreMIDI ]
+    ++ (with xorg; [ libXext libXft libXpm libXt ]);
+
+  configureFlags = [ "--with-motif" ];
+
+  enableParallelBuilding = true;
+
+  meta = with lib; {
+    description = "Sound editor";
+    homepage = "https://ccrma.stanford.edu/software/snd/";
+    platforms = platforms.unix;
+    license = licenses.free;
+    maintainers = with maintainers; [ ];
+  };
+}
diff --git a/pkgs/applications/audio/sndpeek/default.nix b/pkgs/applications/audio/sndpeek/default.nix
new file mode 100644
index 00000000000..39f706d1f24
--- /dev/null
+++ b/pkgs/applications/audio/sndpeek/default.nix
@@ -0,0 +1,56 @@
+{ lib, stdenv, fetchurl, libsndfile, freeglut, alsa-lib, mesa, libGLU, libX11, libXmu
+, libXext, libXi }:
+
+stdenv.mkDerivation rec {
+  pname = "sndpeek";
+  version = "1.4";
+
+  src = fetchurl {
+    url = "https://soundlab.cs.princeton.edu/software/sndpeek/files/sndpeek-${version}.tgz";
+    sha256 = "2d86cf74854fa00dcdc05a35dd92bc4cf6115e87102b17023be5cba9ead8eedf";
+  };
+  sourceRoot = "sndpeek-${version}/src/sndpeek";
+
+  # this patch adds -lpthread to the list of libraries, without it a
+  # symbol-not-found-error is thrown
+  patches = [ ./pthread.patch ];
+
+  buildInputs = [
+    freeglut
+    alsa-lib
+    mesa
+    libGLU
+    libsndfile
+    libX11
+    libXmu
+    libXext
+    libXi
+  ];
+  buildFlags = [ "linux-alsa" ];
+
+  installPhase = ''
+    mkdir -p $out/bin
+    mv sndpeek $out/bin
+  '';
+
+  meta = with lib; {
+    description = "Real-time 3D animated audio display/playback";
+    longDescription = ''
+       sndpeek is just what it sounds (and looks) like:
+         * real-time 3D animated display/playback
+         * can use mic-input or wav/aiff/snd/raw/mat file (with playback)
+         * time-domain waveform
+         * FFT magnitude spectrum
+         * 3D waterfall plot
+         * lissajous! (interchannel correlation)
+         * rotatable and scalable display
+         * freeze frame! (for didactic purposes)
+         * real-time spectral feature extraction (centroid, rms, flux, rolloff)
+         * available on MacOS X, Linux, and Windows under GPL
+         * part of the sndtools distribution.
+    '';
+    homepage = "https://soundlab.cs.princeton.edu/software/sndpeek/";
+    license = licenses.gpl2;
+    maintainers = [ maintainers.laikq ];
+  };
+}
diff --git a/pkgs/applications/audio/sndpeek/pthread.patch b/pkgs/applications/audio/sndpeek/pthread.patch
new file mode 100644
index 00000000000..b2f1d37da6b
--- /dev/null
+++ b/pkgs/applications/audio/sndpeek/pthread.patch
@@ -0,0 +1,13 @@
+diff --git a/makefile.alsa b/makefile.alsa
+index 34fb848..cdaeaec 100644
+--- a/makefile.alsa
++++ b/makefile.alsa
+@@ -4,7 +4,7 @@ CPP=g++
+ INCLUDES=-I../marsyas/
+ MARSYAS_DIR=../marsyas/
+ CFLAGS=-D__LINUX_ALSA__ -D__LITTLE_ENDIAN__ $(INCLUDES) -O3 -c
+-LIBS=-L/usr/X11R6/lib -lglut -lGL -lGLU -lasound -lXmu -lX11 -lXext -lXi -lm -lsndfile
++LIBS=-L/usr/X11R6/lib -lglut -lGL -lGLU -lasound -lXmu -lX11 -lXext -lXi -lm -lsndfile -lpthread
+ 
+ OBJS=chuck_fft.o RtAudio.o Thread.o sndpeek.o Stk.o \
+ 	Centroid.o DownSampler.o Flux.o LPC.o MFCC.o RMS.o Rolloff.o \
diff --git a/pkgs/applications/audio/sonata/default.nix b/pkgs/applications/audio/sonata/default.nix
new file mode 100644
index 00000000000..9eae394488e
--- /dev/null
+++ b/pkgs/applications/audio/sonata/default.nix
@@ -0,0 +1,81 @@
+{ lib, fetchFromGitHub, wrapGAppsHook, gettext
+, python3Packages, gnome, gtk3, glib, gdk-pixbuf, gsettings-desktop-schemas, gobject-introspection }:
+
+let
+  inherit (python3Packages) buildPythonApplication isPy3k dbus-python pygobject3 mpd2 setuptools;
+in buildPythonApplication rec {
+  pname = "sonata";
+  version = "1.7.0";
+
+  src = fetchFromGitHub {
+    owner = "multani";
+    repo = "sonata";
+    rev = "v${version}";
+    sha256 = "0rl8w7s2asff626clzfvyz987l2k4ml5dg417mqp9v8a962q0v2x";
+  };
+
+  disabled = !isPy3k;
+
+  nativeBuildInputs = [
+    gettext
+    gobject-introspection
+    wrapGAppsHook
+  ];
+
+  buildInputs = [
+    glib
+    gnome.adwaita-icon-theme
+    gsettings-desktop-schemas
+    gtk3
+    gdk-pixbuf
+  ];
+
+  # The optional tagpy dependency (for editing metadata) is not yet
+  # included because it's difficult to build.
+  pythonPath = [
+    dbus-python
+    mpd2
+    pygobject3
+    setuptools
+  ];
+
+  # Otherwise the setup hook for gobject-introspection is not run:
+  # https://github.com/NixOS/nixpkgs/issues/56943
+  strictDeps = false;
+
+  postPatch = ''
+    # Remove "Local MPD" tab which is not suitable for NixOS.
+    sed -i '/localmpd/d' sonata/consts.py
+  '';
+
+  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 = lib.licenses.gpl3;
+    platforms = lib.platforms.linux;
+    maintainers = [ lib.maintainers.rvl ];
+  };
+}
diff --git a/pkgs/applications/audio/songrec/default.nix b/pkgs/applications/audio/songrec/default.nix
new file mode 100644
index 00000000000..03cfae066b2
--- /dev/null
+++ b/pkgs/applications/audio/songrec/default.nix
@@ -0,0 +1,40 @@
+{ lib
+, rustPlatform
+, fetchFromGitHub
+, gtk3
+, openssl
+, alsa-lib
+, pkg-config
+, ffmpeg
+, dbus
+}:
+
+rustPlatform.buildRustPackage rec {
+  pname = "songrec";
+  version = "0.3.0";
+
+  src = fetchFromGitHub {
+    owner = "marin-m";
+    repo = pname;
+    rev = version;
+    sha256 = "sha256-aHZH3sQNUUPcMRySy8Di0XUoFo4qjGi2pi0phLwORaA=";
+  };
+
+  cargoSha256 = "sha256-EpkB43rMUJO6ouUV9TmQ+RSnGhX32DZHpKic1E6lUyU=";
+
+  nativeBuildInputs = [ pkg-config ];
+
+  buildInputs = [ alsa-lib dbus gtk3 openssl ffmpeg ];
+
+  postInstall = ''
+    mv packaging/rootfs/usr/share $out/share
+  '';
+
+  meta = with lib; {
+    description = "An open-source Shazam client for Linux, written in Rust";
+    homepage = "https://github.com/marin-m/SongRec";
+    license = licenses.gpl3Only;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ tcbravo ];
+  };
+}
diff --git a/pkgs/applications/audio/sonic-lineup/default.nix b/pkgs/applications/audio/sonic-lineup/default.nix
new file mode 100644
index 00000000000..711444651c3
--- /dev/null
+++ b/pkgs/applications/audio/sonic-lineup/default.nix
@@ -0,0 +1,38 @@
+{ lib, stdenv, fetchurl, alsa-lib, boost, bzip2, fftw, fftwFloat, libfishsound
+, libid3tag, liblo, libmad, liboggz, libpulseaudio, libsamplerate
+, libsndfile, lrdf, opusfile, portaudio, rubberband, serd, sord, capnproto
+, wrapQtAppsHook, pkg-config
+}:
+
+stdenv.mkDerivation rec {
+  pname = "sonic-lineup";
+  version = "1.1";
+
+  src = fetchurl {
+    url = "https://code.soundsoftware.ac.uk/attachments/download/2765/${pname}-${version}.tar.gz";
+    sha256 = "0k45k9fawcm4s5yy05x00pgww7j8m7k2cxcc7g0fn9vqy7vcbq9h";
+  };
+
+  buildInputs =
+    [ alsa-lib boost bzip2 fftw fftwFloat libfishsound libid3tag liblo
+      libmad liboggz libpulseaudio libsamplerate libsndfile lrdf opusfile
+      portaudio rubberband serd sord capnproto
+    ];
+
+  nativeBuildInputs = [ pkg-config wrapQtAppsHook ];
+
+  enableParallelBuilding = true;
+
+  # comment out the tests
+  preConfigure = ''
+    sed -i 's/sub_test_svcore_/#sub_test_svcore_/' sonic-lineup.pro
+  '';
+
+  meta = with lib; {
+    description = "Comparative visualisation of related audio recordings";
+    homepage = "https://www.sonicvisualiser.org/sonic-lineup/";
+    license = licenses.gpl2Plus;
+    maintainers = [ maintainers.vandenoever ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/pkgs/applications/audio/sonic-pi/default.nix b/pkgs/applications/audio/sonic-pi/default.nix
new file mode 100644
index 00000000000..f7a3e2e3674
--- /dev/null
+++ b/pkgs/applications/audio/sonic-pi/default.nix
@@ -0,0 +1,121 @@
+{ mkDerivation
+, lib
+, qtbase
+, fetchFromGitHub
+, fftwSinglePrec
+, ruby
+, aubio
+, cmake
+, pkg-config
+, boost
+, bash
+, jack2
+, supercollider
+, qwt
+, osmid
+}:
+
+let
+
+  supercollider_single_prec = supercollider.override {  fftw = fftwSinglePrec; };
+
+in
+
+mkDerivation rec {
+  version = "3.2.2";
+  pname = "sonic-pi";
+
+  src = fetchFromGitHub {
+    owner = "samaaron";
+    repo = "sonic-pi";
+    rev = "v${version}";
+    sha256 = "1nlkpkpg9iz2hvf5pymvk6lqhpdpjbdrvr0hrnkc3ymj7llvf1cm";
+  };
+
+  buildInputs = [
+    bash
+    cmake
+    pkg-config
+    qtbase
+    qwt
+    ruby
+    aubio
+    supercollider_single_prec
+    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
+    export OSMID_DIR=app/server/native/osmid
+
+    mkdir -p $OSMID_DIR
+    cp ${osmid}/bin/{m2o,o2m} $OSMID_DIR
+
+    pushd app/server/ruby/bin
+      ./compile-extensions.rb
+      ./i18n-tool.rb -t
+    popd
+
+    pushd app/gui/qt
+      cp -f utils/ruby_help.tmpl utils/ruby_help.h
+      ../../server/ruby/bin/qt-doc.rb -o utils/ruby_help.h
+
+      lrelease lang/*.ts
+
+      mkdir build
+      pushd build
+        cmake -G "Unix Makefiles" ..
+        make
+      popd
+    popd
+  '';
+
+  installPhase = ''
+    runHook preInstall
+
+    mkdir $out
+    cp -r {bin,etc} $out/
+
+    # Copy server whole.
+    mkdir -p $out/app
+    cp -r app/server $out/app/
+
+    # Copy only necessary files for the gui app.
+    mkdir -p $out/app/gui/qt/build
+    cp -r app/gui/qt/{book,fonts,help,html,images,image_source,info,lang,theme} $out/app/gui/qt/
+    cp app/gui/qt/build/sonic-pi $out/app/gui/qt/build/sonic-pi
+
+    runHook postInstall
+  '';
+
+  # $out/bin/sonic-pi is a shell script, and wrapQtAppsHook doesn't wrap them.
+  dontWrapQtApps = true;
+  preFixup = ''
+    wrapQtApp "$out/bin/sonic-pi" \
+      --prefix PATH : ${lib.makeBinPath [ bash jack2 ruby supercollider ] } \
+      --set AUBIO_LIB "${aubio}/lib/libaubio.so"
+    makeWrapper \
+      $out/app/server/ruby/bin/sonic-pi-server.rb \
+      $out/bin/sonic-pi-server \
+      --prefix PATH : ${lib.makeBinPath [ bash jack2 ruby supercollider ] } \
+      --set AUBIO_LIB "${aubio}/lib/libaubio.so"
+  '';
+
+  meta = {
+    homepage = "https://sonic-pi.net/";
+    description = "Free live coding synth for everyone originally designed to support computing and music lessons within schools";
+    license = lib.licenses.mit;
+    maintainers = with lib.maintainers; [ Phlogistique kamilchm c0deaddict ];
+    platforms = lib.platforms.linux;
+  };
+}
diff --git a/pkgs/applications/audio/sonic-visualiser/default.nix b/pkgs/applications/audio/sonic-visualiser/default.nix
new file mode 100644
index 00000000000..43254e6c2b0
--- /dev/null
+++ b/pkgs/applications/audio/sonic-visualiser/default.nix
@@ -0,0 +1,54 @@
+# TODO add plugins having various licenses, see http://www.vamp-plugins.org/download.html
+
+{ lib, stdenv, fetchurl, alsa-lib, bzip2, fftw, libjack2, libX11, liblo
+, libmad, lrdf, librdf_raptor, librdf_rasqal, libsamplerate
+, libsndfile, pkg-config, libpulseaudio, qtbase, qtsvg, redland
+, rubberband, serd, sord, vamp-plugin-sdk, fftwFloat
+, capnproto, liboggz, libfishsound, libid3tag, opusfile
+, wrapQtAppsHook
+}:
+
+stdenv.mkDerivation rec {
+  pname = "sonic-visualiser";
+  version = "4.2";
+
+  src = fetchurl {
+    url = "https://code.soundsoftware.ac.uk/attachments/download/2755/${pname}-${version}.tar.gz";
+    sha256 = "1wsvranhvdl21ksbinbgb55qvs3g2d4i57ssj1vx2aln6m01ms9q";
+  };
+
+  nativeBuildInputs = [ pkg-config wrapQtAppsHook ];
+  buildInputs =
+    [ libsndfile qtbase qtsvg fftw fftwFloat bzip2 lrdf rubberband
+      libsamplerate vamp-plugin-sdk alsa-lib librdf_raptor librdf_rasqal redland
+      serd
+      sord
+      # optional
+      libjack2
+      # portaudio
+      libpulseaudio
+      libmad
+      libfishsound
+      liblo
+      libX11
+      capnproto
+      liboggz
+      libid3tag
+      opusfile
+    ];
+
+  # comment out the tests
+  preConfigure = ''
+    sed -i 's/sub_test_svcore_/#sub_test_svcore_/' sonic-visualiser.pro
+  '';
+
+  enableParallelBuilding = true;
+
+  meta = with lib; {
+    description = "View and analyse contents of music audio files";
+    homepage = "https://www.sonicvisualiser.org/";
+    license = licenses.gpl2Plus;
+    maintainers = [ maintainers.goibhniu maintainers.marcweber ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/pkgs/applications/audio/sony-headphones-client/default.nix b/pkgs/applications/audio/sony-headphones-client/default.nix
new file mode 100644
index 00000000000..e3e6573c432
--- /dev/null
+++ b/pkgs/applications/audio/sony-headphones-client/default.nix
@@ -0,0 +1,44 @@
+{ lib, stdenv, fetchFromGitHub, cmake, pkg-config, bluez, dbus, glew, glfw, imgui, makeDesktopItem, copyDesktopItems }:
+
+stdenv.mkDerivation rec {
+  pname = "SonyHeadphonesClient";
+  version = "1.2";
+
+  src = fetchFromGitHub {
+    owner = "Plutoberth";
+    repo = "SonyHeadphonesClient";
+    rev = "v${version}";
+    sha256 = "sha256-oejXrs9X+R6Jydro0XIw2XifzFA7asDhpobtaE3//Hc=";
+    fetchSubmodules = true;
+  };
+
+  nativeBuildInputs = [ cmake pkg-config copyDesktopItems ];
+  buildInputs = [ bluez dbus glew glfw imgui ];
+
+  sourceRoot = "./source/Client";
+
+  cmakeFlags = [ "-Wno-dev" ];
+
+  installPhase = ''
+    runHook preInstall
+    install -Dm755 -t $out/bin SonyHeadphonesClient
+    runHook postInstall
+  '';
+
+  desktopItems = [ (makeDesktopItem {
+    name = "SonyHeadphonesClient";
+    exec = "SonyHeadphonesClient";
+    icon = "SonyHeadphonesClient";
+    desktopName = "Sony Headphones Client";
+    comment     = "A client recreating the functionality of the Sony Headphones app";
+    categories  = [ "Audio" "Mixer" ];
+  }) ];
+
+  meta = with lib; {
+    description = "A client recreating the functionality of the Sony Headphones app";
+    homepage    = "https://github.com/Plutoberth/SonyHeadphonesClient";
+    license     = licenses.mit;
+    maintainers = with maintainers; [ stunkymonkey ];
+    platforms   = platforms.linux;
+  };
+}
diff --git a/pkgs/applications/audio/sooperlooper/default.nix b/pkgs/applications/audio/sooperlooper/default.nix
new file mode 100644
index 00000000000..1cad71ae297
--- /dev/null
+++ b/pkgs/applications/audio/sooperlooper/default.nix
@@ -0,0 +1,70 @@
+{ lib, stdenv
+, fetchFromGitHub
+, autoreconfHook
+, pkg-config
+, which
+, libtool
+, liblo
+, libxml2
+, libjack2
+, libsndfile
+, wxGTK30
+, libsigcxx
+, libsamplerate
+, rubberband
+, gettext
+, ncurses
+, alsa-lib
+, fftw
+}:
+
+stdenv.mkDerivation rec {
+  pname = "sooperlooper";
+  version = "1.7.4";
+
+  src = fetchFromGitHub {
+    owner = "essej";
+    repo = "sooperlooper";
+    rev = "v${builtins.replaceStrings [ "." ] [ "_" ] version}";
+    sha256 = "1jng9bkb7iikad0dy1fkiq9wjjdhh1xi1p0cp2lvnz1dsc4yk6iw";
+  };
+
+  autoreconfPhase = ''
+    patchShebangs ./autogen.sh
+    ./autogen.sh
+  '';
+
+  nativeBuildInputs = [ autoreconfHook pkg-config which libtool ];
+
+  buildInputs = [
+    liblo
+    libxml2
+    libjack2
+    libsndfile
+    wxGTK30
+    libsigcxx
+    libsamplerate
+    rubberband
+    gettext
+    ncurses
+    alsa-lib
+    fftw
+  ];
+
+  enableParallelBuilding = true;
+
+  meta = with lib; {
+    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.
+    '';
+    homepage = "http://essej.net/sooperlooper/"; # https is broken
+    license = licenses.gpl2;
+    maintainers = with maintainers; [ magnetophon ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/pkgs/applications/audio/sorcer/default.nix b/pkgs/applications/audio/sorcer/default.nix
new file mode 100644
index 00000000000..e5e875f6df3
--- /dev/null
+++ b/pkgs/applications/audio/sorcer/default.nix
@@ -0,0 +1,35 @@
+{ lib, stdenv, fetchFromGitHub , boost, cairomm, cmake, libsndfile, lv2, ntk, pkg-config }:
+
+stdenv.mkDerivation rec {
+  pname = "sorcer";
+  version = "1.1.3";
+
+  src = fetchFromGitHub {
+    owner = "openAVproductions";
+    repo = "openAV-Sorcer";
+    rev = "release-${version}";
+    sha256 = "1x7pi77nal10717l02qpnhrx6d7w5nqrljkn9zx5w7gpb8fpb3vp";
+  };
+
+  nativeBuildInputs = [ cmake pkg-config ];
+  buildInputs = [ boost cairomm libsndfile lv2 ntk ];
+
+  postPatch = ''
+     # Fix build with lv2 1.18: https://github.com/brummer10/guitarix/commit/c0334c72
+     find . -type f -exec fgrep -q LV2UI_Descriptor {} \; \
+       -exec sed -i {} -e 's/const struct _\?LV2UI_Descriptor/const LV2UI_Descriptor/' \;
+   '';
+
+  installPhase = ''
+    make install
+    cp -a ../presets/* "$out/lib/lv2"
+  '';
+
+  meta = with lib; {
+    homepage = "http://openavproductions.com/sorcer/";
+    description = "A wavetable LV2 plugin synth, targeted at the electronic / dubstep genre";
+    license = licenses.gpl3Plus;
+    maintainers = [ maintainers.magnetophon ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/pkgs/applications/audio/sound-juicer/default.nix b/pkgs/applications/audio/sound-juicer/default.nix
new file mode 100644
index 00000000000..c03b48c436b
--- /dev/null
+++ b/pkgs/applications/audio/sound-juicer/default.nix
@@ -0,0 +1,70 @@
+{ lib
+, stdenv
+, fetchurl
+, meson
+, ninja
+, pkg-config
+, glib
+, gtk3
+, itstool
+, libxml2
+, brasero
+, libcanberra-gtk3
+, gnome
+, gst_all_1
+, libmusicbrainz5
+, libdiscid
+, isocodes
+, gsettings-desktop-schemas
+, wrapGAppsHook
+}:
+
+stdenv.mkDerivation rec {
+  pname = "sound-juicer";
+  version = "3.38.0";
+
+  src = fetchurl {
+    url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
+    sha256 = "08d5d81rz9sj3m5paw8fwbgxmhlbr7bcjdzpmzj832qvg8smydxf";
+  };
+
+  nativeBuildInputs = [
+    meson
+    ninja
+    pkg-config
+    itstool
+    libxml2
+    wrapGAppsHook
+  ];
+
+  buildInputs = [
+    glib
+    gtk3
+    brasero
+    libcanberra-gtk3
+    gnome.adwaita-icon-theme
+    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
+  ];
+
+  passthru = {
+    updateScript = gnome.updateScript {
+      packageName = pname;
+    };
+  };
+
+  meta = with lib; {
+    description = "A Gnome CD Ripper";
+    homepage = "https://wiki.gnome.org/Apps/SoundJuicer";
+    maintainers = [ maintainers.bdimcheff ];
+    license = licenses.gpl2Plus;
+    platforms = platforms.linux;
+  };
+}
diff --git a/pkgs/applications/audio/soundconverter/default.nix b/pkgs/applications/audio/soundconverter/default.nix
new file mode 100644
index 00000000000..c0966e9ab3f
--- /dev/null
+++ b/pkgs/applications/audio/soundconverter/default.nix
@@ -0,0 +1,85 @@
+{ lib, fetchurl
+# Optional due to unfree license.
+, faacSupport ? false
+, glib, python3Packages, gtk3, wrapGAppsHook
+, gsettings-desktop-schemas, intltool, xvfb-run
+, gobject-introspection, gst_all_1, fdk-aac-encoder }:
+
+python3Packages.buildPythonApplication rec {
+  pname = "soundconverter";
+  version = "4.0.3";
+
+  src = fetchurl {
+    url = "https://launchpad.net/soundconverter/trunk/${version}/+download/${pname}-${version}.tar.gz";
+    sha256 = "sha256-hzIG/4LD3705erPYvXb7uoRwF9LtKKIKB3jrhpYMsZ0=";
+  };
+
+  buildInputs = [
+    gtk3
+    fdk-aac-encoder
+    gobject-introspection
+    gst_all_1.gst-libav
+    gst_all_1.gst-plugins-base
+    gst_all_1.gst-plugins-good
+    gst_all_1.gst-plugins-ugly
+    (gst_all_1.gst-plugins-bad.override { inherit faacSupport; })
+  ];
+
+  nativeBuildInputs = [
+    intltool
+    wrapGAppsHook
+  ];
+
+  propagatedBuildInputs = [
+    python3Packages.gst-python
+    python3Packages.distutils_extra
+    python3Packages.setuptools
+    python3Packages.pygobject3
+  ];
+
+  checkInputs = [
+    xvfb-run
+  ];
+
+  postPatch = ''
+    substituteInPlace  bin/soundconverter --replace \
+      "DATA_PATH = os.path.join(SOURCE_PATH, 'data')" \
+      "DATA_PATH = '$out/share/soundconverter'"
+  '';
+
+  preCheck = let
+    self = { outPath = "$out"; name = "${pname}-${version}"; };
+    xdgPaths = lib.concatMapStringsSep ":" glib.getSchemaDataDirPath;
+  in ''
+    export HOME=$TMPDIR
+    export XDG_DATA_DIRS=$XDG_DATA_DIRS:${xdgPaths [gtk3 gsettings-desktop-schemas self]}
+    # FIXME: Fails due to weird Gio.file_parse_name() behavior.
+    sed -i '49 a\    @unittest.skip("Gio.file_parse_name issues")' tests/testcases/names.py
+  '' + lib.optionalString (!faacSupport) ''
+    substituteInPlace tests/testcases/integration.py --replace \
+      "for encoder in ['fdkaacenc', 'faac', 'avenc_aac']:" \
+      "for encoder in ['fdkaacenc', 'avenc_aac']:"
+  '';
+
+  checkPhase = ''
+    runHook preCheck
+    xvfb-run python tests/test.py
+    runHook postCheck
+  '';
+
+  # Necessary to set GDK_PIXBUF_MODULE_FILE.
+  strictDeps = false;
+
+  meta = with lib; {
+    homepage = "https://soundconverter.org/";
+    description = "Leading audio file converter for the GNOME Desktop";
+    longDescription = ''
+      SoundConverter reads anything the GStreamer library can read,
+      and writes WAV, FLAC, MP3, AAC and Ogg Vorbis files.
+      Uses Python and GTK+ GUI toolkit, and runs on X Window System.
+    '';
+    license = licenses.gpl3Only;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ jakubgs ];
+  };
+}
diff --git a/pkgs/applications/audio/soundkonverter/default.nix b/pkgs/applications/audio/soundkonverter/default.nix
new file mode 100644
index 00000000000..1c1724fbce8
--- /dev/null
+++ b/pkgs/applications/audio/soundkonverter/default.nix
@@ -0,0 +1,106 @@
+# currently needs to be installed into an environment and needs a `kbuildsycoca5` run afterwards for plugin discovery
+{
+  mkDerivation, fetchFromGitHub, fetchpatch, lib, makeWrapper,
+  cmake, extra-cmake-modules, pkg-config,
+  libkcddb, kconfig, kconfigwidgets, ki18n, kdelibs4support, kio, solid, kwidgetsaddons, kxmlgui,
+  qtbase, phonon,
+  taglib,
+  # optional backends
+  withCD ? true, cdparanoia,
+  withFlac ? true, flac,
+  withMidi ? true, fluidsynth, timidity,
+  withSpeex ? false, speex,
+  withVorbis ? true, vorbis-tools, vorbisgain,
+  withMp3 ? true, lame, mp3gain,
+  withAac ? true, faad2, aacgain,
+  withUnfreeAac ? false, faac,
+  withFfmpeg ? true, ffmpeg-full,
+  withMplayer ? false, mplayer,
+  withSox ? true, sox,
+  withOpus ? true, opusTools,
+  withTwolame ? false, twolame,
+  withApe ? false, mac,
+  withWavpack ? false, wavpack
+}:
+
+assert withAac -> withFfmpeg || withUnfreeAac;
+assert withUnfreeAac -> withAac;
+
+let runtimeDeps = []
+    ++ lib.optional withCD cdparanoia
+    ++ lib.optional withFlac flac
+    ++ lib.optional withSpeex speex
+    ++ lib.optional withFfmpeg ffmpeg-full
+    ++ lib.optional withMplayer mplayer
+    ++ lib.optional withSox sox
+    ++ lib.optional withOpus opusTools
+    ++ lib.optional withTwolame twolame
+    ++ lib.optional withApe mac
+    ++ lib.optional withWavpack wavpack
+    ++ lib.optional withUnfreeAac faac
+    ++ lib.optionals withMidi [ fluidsynth timidity ]
+    ++ lib.optionals withVorbis [ vorbis-tools vorbisgain ]
+    ++ lib.optionals withMp3 [ lame mp3gain ]
+    ++ lib.optionals withAac [  faad2 aacgain ];
+
+in
+mkDerivation rec {
+  name = "soundkonverter";
+  version = "3.0.1";
+  src = fetchFromGitHub {
+    owner = "dfaust";
+    repo = "soundkonverter";
+    rev = "v" + version;
+    sha256 = "1g2khdsjmsi4zzynkq8chd11cbdhjzmi37r9jhpal0b730nq9x7l";
+  };
+  patches = [
+    # already merged into master, so it can go during the next release
+    (fetchpatch {
+      url = "https://patch-diff.githubusercontent.com/raw/dfaust/soundkonverter/pull/87.patch";
+      sha256 = "sha256-XIpD4ZMTZVcu+F27OtpRy51H+uQgpd5l22IZ6XsD64w=";
+      name = "soundkonverter_taglib.patch";
+      stripLen = 1;
+    })
+  ];
+
+  nativeBuildInputs = [ cmake extra-cmake-modules pkg-config kdelibs4support makeWrapper ];
+  propagatedBuildInputs = [ libkcddb kconfig kconfigwidgets ki18n kdelibs4support kio solid kwidgetsaddons kxmlgui qtbase phonon];
+  buildInputs = [ taglib ] ++ runtimeDeps;
+  # encoder plugins go to ${out}/lib so they're found by kbuildsycoca5
+  cmakeFlags = [ "-DCMAKE_INSTALL_PREFIX=$out" ];
+  sourceRoot = "source/src";
+  # add runt-time deps to PATH
+  postInstall = ''
+    wrapProgram $out/bin/soundkonverter --prefix PATH : ${lib.makeBinPath runtimeDeps }
+    '';
+  meta = {
+    license = lib.licenses.gpl2;
+    maintainers = [ lib.maintainers.schmittlauch ];
+    description = "Audio file converter, CD ripper and Replay Gain tool";
+    longDescription = ''
+      soundKonverter is a frontend to various audio converters.
+
+      The key features are:
+      - Audio file conversion
+      - Replay Gain calculation
+      - CD ripping
+
+      soundKonverter supports reading and writing tags and covers for many formats, so they are preserved when converting files.
+
+      It is extendable by plugins and supports many backends including:
+
+      - Audio file conversion
+        Backends: faac, faad, ffmpeg, flac, lame, mplayer, neroaac, timidity, fluidsynth, vorbistools, opustools, sox, twolame,
+        flake, mac, shorten, wavpack and speex
+        Formats: ogg vorbis, mp3, flac, wma, aac, ac3, opus, alac, mp2, als, amr nb, amr wb, ape, speex, m4a, mp1, musepack shorten,
+        tta, wavpack, ra, midi, mod, 3gp, rm, avi, mkv, ogv, mpeg, mov, mp4, flv, wmv and rv
+
+      - Replay Gain calculation
+        Backends: aacgain, metaflac, mp3gain, vorbisgain, wvgain, mpcgain
+        Formats: aac, mp3, flac, ogg vorbis, wavpack, musepack
+
+      - CD ripping
+        Backends: cdparanoia
+      '';
+  };
+}
diff --git a/pkgs/applications/audio/soundscape-renderer/default.nix b/pkgs/applications/audio/soundscape-renderer/default.nix
new file mode 100644
index 00000000000..3ec2cda4280
--- /dev/null
+++ b/pkgs/applications/audio/soundscape-renderer/default.nix
@@ -0,0 +1,56 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, autoreconfHook
+, help2man
+, pkg-config
+, libsndfile
+, fftwFloat
+, libjack2
+, libxml2
+, qt4
+, boost
+, ecasound
+, glibcLocales
+, libGLU
+, libGL # Needed because help2man basically does a ./ssr-binaural  --help and ssr-binaural needs libGL
+}:
+
+stdenv.mkDerivation {
+  pname = "soundscape-renderer";
+  version = "unstable-2016-11-03";
+
+  src = fetchFromGitHub {
+    owner = "SoundScapeRenderer";
+    repo = "ssr";
+    rev = "0dd0136dd24e47b63d8a4e05de467f5c7b047ec9";
+    sha256 = "sha256-9s+Elaxz9kX+Nle1CqBU/9r0hdI4dhsJ6GrNqvP5HIs=";
+  };
+
+  # 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 pkg-config ];
+  buildInputs = [ boost boost.dev ecasound libGLU libGL 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 = lib.licenses.gpl3;
+    maintainers = [ lib.maintainers.fridh ];
+  };
+
+}
diff --git a/pkgs/applications/audio/soundtracker/default.nix b/pkgs/applications/audio/soundtracker/default.nix
new file mode 100644
index 00000000000..251725ea6b2
--- /dev/null
+++ b/pkgs/applications/audio/soundtracker/default.nix
@@ -0,0 +1,75 @@
+{ lib, stdenv
+, fetchurl
+, pkg-config
+, autoreconfHook
+, gtk2
+, alsa-lib
+, SDL
+, jack2
+, audiofile
+, goocanvas # graphical envelope editing
+}:
+
+stdenv.mkDerivation rec {
+  pname = "soundtracker";
+  version = "1.0.2.1";
+
+  src = fetchurl {
+    # Past releases get moved to the "old releases" directory.
+    # Only the latest release is at the top level.
+    # Nonetheless, only the name of the file seems to affect which file is
+    # downloaded, so this path should be fine both for old and current releases.
+    url = "mirror://sourceforge/soundtracker/soundtracker-${version}.tar.xz";
+    sha256 = "0nh0dwz8nldc040q6n06vlazhss8ms42r2dffhjcrqj3hbrvfx82";
+  };
+
+  postPatch = lib.optionalString stdenv.hostPlatform.isDarwin ''
+    # Darwin binutils don't support D option for ar
+    # ALSA macros are missing on Darwin, causing error
+    substituteInPlace configure.ac \
+      --replace ARFLAGS=crD ARFLAGS=cru \
+      --replace AM_PATH_ALSA '#AM_PATH_ALSA'
+    # Avoid X11-specific workaround code on more than just Windows
+    substituteInPlace app/keys.c \
+      --replace '!defined(_WIN32)' '!defined(_WIN32) && !defined(__APPLE__)'
+    # "The application with bundle ID (null) is running setugid(), which is not allowed."
+    sed -i -e '/seteuid/d' -e '/setegid/d' app/main.c
+  '';
+
+  configureFlags = [
+    "--with-graphics-backend=gdk"
+  ] ++ lib.optionals stdenv.hostPlatform.isDarwin [
+    "--disable-alsa"
+  ];
+
+  enableParallelBuilding = true;
+
+  nativeBuildInputs = [
+    pkg-config
+    autoreconfHook
+  ];
+
+  buildInputs = [
+    gtk2
+    SDL
+    jack2
+    audiofile
+    goocanvas
+  ] ++ lib.optional stdenv.isLinux alsa-lib;
+
+  meta = with lib; {
+    description = "A music tracking tool similar in design to the DOS program FastTracker and the Amiga legend ProTracker";
+    longDescription = ''
+      SoundTracker is a pattern-oriented music editor (similar to the DOS
+      program 'FastTracker'). Samples are lined up on tracks and patterns
+      which are then arranged to a song. Supported module formats are XM and
+      MOD; the player code is the one from OpenCP. A basic sample recorder
+      and editor is also included.
+    '';
+    homepage = "http://www.soundtracker.org/";
+    downloadPage = "https://sourceforge.net/projects/soundtracker/files/";
+    license = licenses.gpl2Plus;
+    maintainers = with maintainers; [ fgaz ];
+    platforms = platforms.all;
+  };
+}
diff --git a/pkgs/applications/audio/soundwireserver/default.nix b/pkgs/applications/audio/soundwireserver/default.nix
new file mode 100755
index 00000000000..17660599b68
--- /dev/null
+++ b/pkgs/applications/audio/soundwireserver/default.nix
@@ -0,0 +1,39 @@
+{ lib
+, qt5
+, autoPatchelfHook
+, unzip
+, fetchzip
+, portaudio
+}:
+
+qt5.mkDerivation {
+  pname = "soundwire";
+  version = "3.0";
+
+  src = fetchzip {
+    url = "https://web.archive.org/web/20211120182526/https://georgielabs.net/SoundWire_Server_linux64.tar.gz";
+    hash = "sha256-TECuQ5WXpeikc9tXEE/wVBnRbdYd0OaIFFhsBRmaukA=";
+  };
+
+  nativeBuildInputs = [
+    unzip
+    autoPatchelfHook
+  ];
+
+  buildInputs = [
+    portaudio
+  ];
+
+  installPhase = ''
+    install -D SoundWire-Server.desktop $out/share/applications/SoundWireServer.desktop
+    install -D SoundWireServer $out/bin/SoundWireServer
+    install -D sw-icon.xpm $out/share/icons/hicolor/256x256/apps/sw-icon.xpm
+  '';
+
+  meta = with lib; {
+    description = "Turn your Android device into wireless headphones / wireless speaker";
+    homepage = "https://georgielabs.net/";
+    maintainers = with maintainers; [ mkg20001 ];
+    license = licenses.unfree;
+  };
+}
diff --git a/pkgs/applications/audio/spectmorph/default.nix b/pkgs/applications/audio/spectmorph/default.nix
new file mode 100644
index 00000000000..90348e7b80b
--- /dev/null
+++ b/pkgs/applications/audio/spectmorph/default.nix
@@ -0,0 +1,24 @@
+{ lib, stdenv, fetchurl, pkg-config, libjack2, lv2, glib, qt5, libao, cairo, libsndfile, fftwFloat }:
+
+stdenv.mkDerivation rec {
+  pname = "spectmorph";
+  version = "0.5.2";
+  src = fetchurl {
+    url = "https://spectmorph.org/files/releases/${pname}-${version}.tar.bz2";
+    sha256 = "0yrq7mknhk096wfsx0q3b6wwa2w5la0rxa113di26rrrw136xl1f";
+  };
+
+  buildInputs = [  libjack2 lv2 glib qt5.qtbase libao cairo libsndfile fftwFloat ];
+
+  nativeBuildInputs = [ pkg-config ];
+
+  dontWrapQtApps = true;
+
+  meta = with lib; {
+    description = "Allows to analyze samples of musical instruments, and to combine them (morphing) to construct hybrid sounds";
+    homepage = "https://spectmorph.org";
+    license = licenses.gpl3;
+    platforms = [ "x86_64-linux" "i686-linux" ];
+    maintainers = [ maintainers.magnetophon ];
+  };
+}
diff --git a/pkgs/applications/audio/spectrojack/default.nix b/pkgs/applications/audio/spectrojack/default.nix
new file mode 100644
index 00000000000..12bb972398e
--- /dev/null
+++ b/pkgs/applications/audio/spectrojack/default.nix
@@ -0,0 +1,31 @@
+{ lib, stdenv, fetchurl, pkg-config, libjack2, fftwFloat, gtk2 }:
+
+stdenv.mkDerivation rec {
+  pname = "spectrojack";
+  version = "0.4.1";
+
+  src = fetchurl {
+    url = "http://sed.free.fr/spectrojack/${pname}-${version}.tar.gz";
+    sha256 = "1kiwx0kag7kq7rhg0bvckfm8r7pqmbk76ppa39cq2980jb5v8rfp";
+  };
+  nativeBuildInputs = [ pkg-config ];
+  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 = lib.licenses.publicDomain;
+    maintainers = with lib.maintainers; [ sleexyz ];
+    platforms = with lib.platforms; linux;
+  };
+}
diff --git a/pkgs/applications/audio/speech-denoiser/default.nix b/pkgs/applications/audio/speech-denoiser/default.nix
new file mode 100644
index 00000000000..c6536c4d20f
--- /dev/null
+++ b/pkgs/applications/audio/speech-denoiser/default.nix
@@ -0,0 +1,44 @@
+{ lib, stdenv, fetchFromGitHub, autoreconfHook, pkg-config, lv2, meson, ninja }:
+
+let
+  speech-denoiser-src = fetchFromGitHub {
+    owner = "lucianodato";
+    repo = "speech-denoiser";
+    rev = "04cfba929630404f8d4f4ca5bac8d9b09a99152f";
+    sha256 = "189l6lz8sz5vr6bjyzgcsrvksl1w6crqsg0q65r94b5yjsmjnpr4";
+  };
+
+  rnnoise-nu = stdenv.mkDerivation {
+    pname = "rnnoise-nu";
+    version = "unstable-07-10-2019";
+    src = speech-denoiser-src;
+    sourceRoot = "source/rnnoise";
+    nativeBuildInputs = [ autoreconfHook ];
+    configureFlags = [ "--disable-examples" "--disable-doc" "--disable-shared" "--enable-static" ];
+    installTargets = [ "install-rnnoise-nu" ];
+  };
+in
+stdenv.mkDerivation  {
+  pname = "speech-denoiser";
+  version = "unstable-07-10-2019";
+
+  src = speech-denoiser-src;
+
+  nativeBuildInputs = [ pkg-config meson ninja ];
+  buildInputs = [ lv2 rnnoise-nu ];
+
+  mesonFlags = ("--prefix=${placeholder "out"}/lib/lv2");
+
+  postPatch = ''
+    substituteInPlace meson.build \
+      --replace "cc.find_library('rnnoise-nu',dirs: meson.current_source_dir() + '/rnnoise/.libs/',required : true)" "cc.find_library('rnnoise-nu', required : true)"
+  '';
+
+  meta = with lib; {
+    description = "Speech denoise lv2 plugin based on RNNoise library";
+    homepage = "https://github.com/lucianodato/speech-denoiser";
+    license = licenses.lgpl3;
+    maintainers = [ maintainers.magnetophon ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/pkgs/applications/audio/spek/default.nix b/pkgs/applications/audio/spek/default.nix
new file mode 100644
index 00000000000..1a73b8adea7
--- /dev/null
+++ b/pkgs/applications/audio/spek/default.nix
@@ -0,0 +1,28 @@
+{ lib, stdenv, fetchFromGitHub, autoreconfHook, intltool, pkg-config, ffmpeg, wxGTK30-gtk3, wrapGAppsHook }:
+
+stdenv.mkDerivation rec {
+  pname = "spek";
+  version = "unstable-2018-12-29";
+
+  src = fetchFromGitHub {
+    owner = "alexkay";
+    repo = "spek";
+    rev = "f071c2956176ad53c7c8059e5c00e694ded31ded";
+    sha256 = "1l9gj9c1n92zlcjnyjyk211h83dk0idk644xnm5rs7q40p2zliy5";
+  };
+
+  # needed for autoreconfHook
+  AUTOPOINT="intltoolize --automake --copy";
+
+  nativeBuildInputs = [ autoreconfHook intltool pkg-config wrapGAppsHook ];
+
+  buildInputs = [ ffmpeg wxGTK30-gtk3 wxGTK30-gtk3.gtk ];
+
+  meta = with lib; {
+    description = "Analyse your audio files by showing their spectrogram";
+    homepage = "http://spek.cc/";
+    license = licenses.gpl3;
+    maintainers = with maintainers; [ bjornfor ];
+    platforms = platforms.all;
+  };
+}
diff --git a/pkgs/applications/audio/split2flac/default.nix b/pkgs/applications/audio/split2flac/default.nix
new file mode 100644
index 00000000000..5de48d1b296
--- /dev/null
+++ b/pkgs/applications/audio/split2flac/default.nix
@@ -0,0 +1,62 @@
+{ lib, stdenv, fetchFromGitHub, makeWrapper
+, shntool, cuetools
+, flac, faac, mp4v2, wavpack, mac
+, imagemagick, libiconv, enca, lame, mutagen, vorbis-tools
+, aacgain, mp3gain, vorbisgain
+}:
+
+let
+  wrapSplit2flac =  format: ''
+    makeWrapper $out/bin/.split2flac-wrapped $out/bin/split2${format} \
+      --set SPLIT2FLAC_FORMAT ${format} \
+      --prefix PATH : ${lib.makeBinPath [
+        shntool cuetools
+        flac faac mp4v2 wavpack mac
+        imagemagick libiconv enca lame mutagen vorbis-tools
+        aacgain mp3gain vorbisgain
+      ]}
+  '';
+
+in stdenv.mkDerivation rec {
+  pname = "split2flac";
+  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 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/pkgs/applications/audio/spot/default.nix b/pkgs/applications/audio/spot/default.nix
new file mode 100644
index 00000000000..3fe3b0d06d3
--- /dev/null
+++ b/pkgs/applications/audio/spot/default.nix
@@ -0,0 +1,84 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, nix-update-script
+, meson
+, ninja
+, gettext
+, python3
+, desktop-file-utils
+, rustPlatform
+, pkg-config
+, glib
+, libadwaita
+, libhandy
+, gtk4
+, openssl
+, alsa-lib
+, libpulseaudio
+, wrapGAppsHook
+}:
+
+stdenv.mkDerivation rec {
+  pname = "spot";
+  version = "0.3.1";
+
+  src = fetchFromGitHub {
+    owner = "xou816";
+    repo = "spot";
+    rev = version;
+    hash = "sha256-uZzylK9imEazwC/ogsDO8ZBvByE5/SNSV+mIlp7Z9Ww=";
+  };
+
+  cargoDeps = rustPlatform.fetchCargoTarball {
+    inherit src;
+    name = "${pname}-${version}";
+    hash = "sha256-v5xdlsI6OlEpCYOTFePTyI8BkIrAwT6FR2JwiRTGgOA=";
+  };
+
+  nativeBuildInputs = [
+    gettext
+    meson
+    ninja
+    pkg-config
+    python3 # for meson postinstall script
+    gtk4 # for gtk-update-icon-cache
+    glib # for glib-compile-schemas
+    desktop-file-utils
+    rustPlatform.rust.cargo
+    rustPlatform.cargoSetupHook
+    rustPlatform.rust.rustc
+    wrapGAppsHook
+  ];
+
+  buildInputs = [
+    glib
+    gtk4
+    libadwaita
+    libhandy
+    openssl
+    alsa-lib
+    libpulseaudio
+  ];
+
+  # https://github.com/xou816/spot/issues/313
+  mesonBuildType = "release";
+
+  postPatch = ''
+    chmod +x build-aux/cargo.sh
+    patchShebangs build-aux/cargo.sh build-aux/meson/postinstall.py
+  '';
+
+  passthru = {
+    updateScript = nix-update-script {
+      attrPath = pname;
+    };
+  };
+
+  meta = with lib; {
+    description = "Native Spotify client for the GNOME desktop";
+    homepage = "https://github.com/xou816/spot";
+    license = licenses.mit;
+    maintainers = with maintainers; [ jtojnar tomfitzhenry ];
+  };
+}
diff --git a/pkgs/applications/audio/spotify-cli-linux/default.nix b/pkgs/applications/audio/spotify-cli-linux/default.nix
new file mode 100644
index 00000000000..e473d97ce56
--- /dev/null
+++ b/pkgs/applications/audio/spotify-cli-linux/default.nix
@@ -0,0 +1,29 @@
+{ lib, python3Packages, dbus }:
+python3Packages.buildPythonApplication rec {
+  pname = "spotify-cli-linux";
+  version = "1.6.0";
+
+  src = python3Packages.fetchPypi {
+    inherit pname version;
+    sha256 = "0slyc3jfrj3rwq8rv6p5aqkw487aw7a87kmf1fb6n4vnvcf08v7w";
+  };
+
+  preBuild = ''
+    substituteInPlace spotifycli/spotifycli.py \
+      --replace dbus-send ${dbus}/bin/dbus-send
+  '';
+
+  disabled = !python3Packages.isPy3k;
+  propagatedBuildInputs = with python3Packages; [ lyricwikia dbus-python ];
+
+  # upstream has no code tests, but uses its "tests" for linting and formatting checks
+  doCheck = false;
+
+  meta = with lib; {
+    homepage = "https://pwittchen.github.io/spotify-cli-linux/";
+    maintainers = [ maintainers.kmein ];
+    description = "A command line interface to Spotify on Linux.";
+    license = licenses.gpl3;
+    platforms = platforms.linux;
+  };
+}
diff --git a/pkgs/applications/audio/spotify-qt/default.nix b/pkgs/applications/audio/spotify-qt/default.nix
new file mode 100644
index 00000000000..45ff1bebc79
--- /dev/null
+++ b/pkgs/applications/audio/spotify-qt/default.nix
@@ -0,0 +1,36 @@
+{ fetchFromGitHub
+, lib
+, cmake
+, mkDerivation
+, libxcb
+, qtbase
+, qtsvg
+}:
+
+mkDerivation rec {
+   pname = "spotify-qt";
+   version = "3.8";
+
+   src = fetchFromGitHub {
+      owner = "kraxarn";
+      repo = pname;
+      rev = "v${version}";
+      sha256 = "sha256-Rgtw+nrM8YUBHPIIe9zVhLij/ep07piPf/2MSmTVQKk=";
+   };
+
+   buildInputs = [ libxcb qtbase qtsvg ];
+
+   nativeBuildInputs = [ cmake ];
+
+   cmakeFlags = [ "-DCMAKE_BUILD_TYPE=Release" "-DCMAKE_INSTALL_PREFIX=" ];
+
+   installFlags = [ "DESTDIR=$(out)" ];
+
+   meta = with lib; {
+    description = "Lightweight unofficial Spotify client using Qt";
+    homepage = "https://github.com/kraxarn/spotify-qt";
+    license = licenses.gpl3Only;
+    maintainers = with maintainers; [ kiyengar ];
+    platforms = platforms.unix;
+   };
+}
diff --git a/pkgs/applications/audio/spotify-tui/default.nix b/pkgs/applications/audio/spotify-tui/default.nix
new file mode 100644
index 00000000000..7395ca85d9f
--- /dev/null
+++ b/pkgs/applications/audio/spotify-tui/default.nix
@@ -0,0 +1,35 @@
+{ lib, stdenv, fetchFromGitHub, rustPlatform, installShellFiles, pkg-config, openssl, python3, libxcb, AppKit, Security }:
+
+rustPlatform.buildRustPackage rec {
+  pname = "spotify-tui";
+  version = "0.25.0";
+
+  src = fetchFromGitHub {
+    owner = "Rigellute";
+    repo = "spotify-tui";
+    rev = "v${version}";
+    sha256 = "sha256-L5gg6tjQuYoAC89XfKE38KCFONwSAwfNoFEUPH4jNAI=";
+  };
+
+  cargoSha256 = "sha256-iucI4/iMF+uXRlnMttobu4xo3IQXq7tGiSSN8eCrLM0=";
+
+  nativeBuildInputs = [ installShellFiles ] ++ lib.optionals stdenv.isLinux [ pkg-config python3 ];
+  buildInputs = [ ]
+    ++ lib.optionals stdenv.isLinux [ openssl libxcb ]
+    ++ lib.optionals stdenv.isDarwin [ AppKit Security ];
+
+  postInstall = ''
+    for shell in bash fish zsh; do
+      $out/bin/spt --completions $shell > spt.$shell
+      installShellCompletion spt.$shell
+    done
+  '';
+
+  meta = with lib; {
+    description = "Spotify for the terminal written in Rust";
+    homepage = "https://github.com/Rigellute/spotify-tui";
+    changelog = "https://github.com/Rigellute/spotify-tui/blob/v${version}/CHANGELOG.md";
+    license = licenses.mit;
+    maintainers = with maintainers; [ jwijenbergh ];
+  };
+}
diff --git a/pkgs/applications/audio/spotify/default.nix b/pkgs/applications/audio/spotify/default.nix
new file mode 100644
index 00000000000..ddc42641600
--- /dev/null
+++ b/pkgs/applications/audio/spotify/default.nix
@@ -0,0 +1,174 @@
+{ fetchurl, lib, stdenv, squashfsTools, xorg, alsa-lib, makeWrapper, wrapGAppsHook, openssl, freetype
+, glib, pango, cairo, atk, gdk-pixbuf, gtk3, cups, nspr, nss, libpng, libnotify
+, libgcrypt, systemd, fontconfig, dbus, expat, ffmpeg, curl, zlib, gnome
+, at-spi2-atk, at-spi2-core, libpulseaudio, libdrm, mesa, libxkbcommon
+}:
+
+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
+  # If an update breaks things, one of those might have valuable info:
+  # https://aur.archlinux.org/packages/spotify/
+  # https://community.spotify.com/t5/Desktop-Linux
+  version = "1.1.77.643.g3c4c6fc6";
+  # 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 = "57";
+
+  deps = [
+    alsa-lib
+    at-spi2-atk
+    at-spi2-core
+    atk
+    cairo
+    cups
+    curl
+    dbus
+    expat
+    ffmpeg
+    fontconfig
+    freetype
+    gdk-pixbuf
+    glib
+    gtk3
+    libdrm
+    libgcrypt
+    libnotify
+    libpng
+    libpulseaudio
+    libxkbcommon
+    mesa
+    nss
+    pango
+    stdenv.cc.cc
+    systemd
+    xorg.libICE
+    xorg.libSM
+    xorg.libX11
+    xorg.libxcb
+    xorg.libXcomposite
+    xorg.libXcursor
+    xorg.libXdamage
+    xorg.libXext
+    xorg.libXfixes
+    xorg.libXi
+    xorg.libXrandr
+    xorg.libXrender
+    xorg.libXScrnSaver
+    xorg.libxshmfence
+    xorg.libXtst
+    zlib
+  ];
+
+in
+
+stdenv.mkDerivation {
+  pname = "spotify-unwrapped";
+  inherit 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 = "d9f8fe692db479bcce1f47c87b65c5ac6d62e16b76a0f9b2d693d82d2b9ed2c7cf370cb091ce8ecd291c47d1efdbaa897c9bffb210edd901dc3d5425995229f7";
+  };
+
+  nativeBuildInputs = [ makeWrapper wrapGAppsHook squashfsTools ];
+
+  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
+  '';
+
+  # Prevent double wrapping
+  dontWrapGApps = true;
+
+  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* $libdir
+      ln -s ${ffmpeg.out}/lib/libavformat.so* $libdir
+
+      rpath="$out/share/spotify:$libdir"
+
+      patchelf \
+        --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
+        --set-rpath $rpath $out/share/spotify/spotify
+
+      librarypath="${lib.makeLibraryPath deps}:$libdir"
+      wrapProgram $out/share/spotify/spotify \
+        ''${gappsWrapperArgs[@]} \
+        --prefix LD_LIBRARY_PATH : "$librarypath" \
+        --prefix PATH : "${gnome.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 lib; {
+    homepage = "https://www.spotify.com/";
+    description = "Play music from the Spotify music service";
+    license = licenses.unfree;
+    maintainers = with maintainers; [ eelco ftrvxmtrx sheenobu mudri timokau ma27 ];
+    platforms = [ "x86_64-linux" ];
+  };
+}
diff --git a/pkgs/applications/audio/spotify/update.sh b/pkgs/applications/audio/spotify/update.sh
new file mode 100755
index 00000000000..a8836214f2f
--- /dev/null
+++ b/pkgs/applications/audio/spotify/update.sh
@@ -0,0 +1,88 @@
+#!/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 -s -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-to-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
+
+# Commit changes
+git add "$spotify_nix"
+git commit -m "spotify: ${current_nix_version} -> ${upstream_version}"
diff --git a/pkgs/applications/audio/spotify/wrapper.nix b/pkgs/applications/audio/spotify/wrapper.nix
new file mode 100644
index 00000000000..418ef3cbc03
--- /dev/null
+++ b/pkgs/applications/audio/spotify/wrapper.nix
@@ -0,0 +1,31 @@
+{ symlinkJoin
+, lib
+, spotify-unwrapped
+, makeWrapper
+
+  # High-DPI support: Spotify's --force-device-scale-factor argument; not added
+  # if `null`, otherwise, should be a number.
+, deviceScaleFactor ? null
+}:
+
+symlinkJoin {
+  name = "spotify-${spotify-unwrapped.version}";
+
+  paths = [ spotify-unwrapped.out ];
+
+  nativeBuildInputs = [ makeWrapper ];
+  preferLocalBuild = true;
+  passthru.unwrapped = spotify-unwrapped;
+  postBuild = ''
+    wrapProgram $out/bin/spotify \
+        ${lib.optionalString (deviceScaleFactor != null) ''
+            --add-flags ${lib.escapeShellArg "--force-device-scale-factor=${
+                builtins.toString deviceScaleFactor
+              }"}
+        ''}
+  '';
+
+  meta = spotify-unwrapped.meta // {
+    priority = (spotify-unwrapped.meta.priority or 0) - 1;
+  };
+}
diff --git a/pkgs/applications/audio/spotifyd/default.nix b/pkgs/applications/audio/spotifyd/default.nix
new file mode 100644
index 00000000000..bfeb8a7dab3
--- /dev/null
+++ b/pkgs/applications/audio/spotifyd/default.nix
@@ -0,0 +1,48 @@
+{ lib, fetchFromGitHub, rustPackages, pkg-config, openssl
+, withALSA ? true, alsa-lib
+, withPulseAudio ? false, libpulseaudio
+, withPortAudio ? false, portaudio
+, withMpris ? false
+, withKeyring ? false
+, dbus
+}:
+
+rustPackages.rustPlatform.buildRustPackage rec {
+  pname = "spotifyd";
+  version = "0.3.3";
+
+  src = fetchFromGitHub {
+    owner = "Spotifyd";
+    repo = "spotifyd";
+    rev = "v${version}";
+    sha256 = "1liql2wp7cx0x4ha1578wx3m4byd295m4ph268s05yw2wrnr3v6c";
+  };
+
+  cargoSha256 = "1plvqd55d1gj0ydimv3154pwgj2sh1fqx2182nw8akzdfmzg1150";
+
+  nativeBuildInputs = [ pkg-config ];
+
+  buildInputs = [ openssl ]
+    ++ lib.optional withALSA alsa-lib
+    ++ lib.optional withPulseAudio libpulseaudio
+    ++ lib.optional withPortAudio portaudio
+    ++ lib.optional (withMpris || withKeyring) dbus;
+
+  buildNoDefaultFeatures = true;
+  buildFeatures = lib.optional withALSA "alsa_backend"
+    ++ lib.optional withPulseAudio "pulseaudio_backend"
+    ++ lib.optional withPortAudio "portaudio_backend"
+    ++ lib.optional withMpris "dbus_mpris"
+    ++ lib.optional withKeyring "dbus_keyring";
+
+  doCheck = false;
+
+  meta = with lib; {
+    description = "An open source Spotify client running as a UNIX daemon";
+    homepage = "https://github.com/Spotifyd/spotifyd";
+    changelog = "https://github.com/Spotifyd/spotifyd/raw/v${version}/CHANGELOG.md";
+    license = licenses.gpl3Plus;
+    maintainers = with maintainers; [ anderslundstedt Br1ght0ne marsam ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/pkgs/applications/audio/spotifywm/default.nix b/pkgs/applications/audio/spotifywm/default.nix
new file mode 100644
index 00000000000..2241db126b8
--- /dev/null
+++ b/pkgs/applications/audio/spotifywm/default.nix
@@ -0,0 +1,31 @@
+{ lib, stdenv, fetchFromGitHub, spotify, xorg, runtimeShell }:
+stdenv.mkDerivation {
+  pname = "spotifywm-unstable";
+  version = "2016-11-28";
+
+  src = fetchFromGitHub {
+    owner  = "dasJ";
+    repo   = "spotifywm";
+    rev    = "91dd5532ffb7a398d775abe94fe7781904ab406f";
+    sha256 = "01z088i83410bpx1vbp7c6cq01r431v55l7340x3izp53lnpp379";
+  };
+
+  buildInputs = [ xorg.libX11 ];
+
+  propagatedBuildInputs = [ spotify ];
+
+  installPhase = ''
+    echo "#!${runtimeShell}" > 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 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/pkgs/applications/audio/sptlrx/default.nix b/pkgs/applications/audio/sptlrx/default.nix
new file mode 100644
index 00000000000..2ec9562c620
--- /dev/null
+++ b/pkgs/applications/audio/sptlrx/default.nix
@@ -0,0 +1,24 @@
+{ lib, buildGoModule, fetchFromGitHub }:
+
+buildGoModule rec {
+  pname = "sptlrx";
+  version = "0.2.0";
+
+  src = fetchFromGitHub {
+    owner = "raitonoberu";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "sha256-b38DACSdnjwPsLMrkt0Ubpqpn/4SDAgrdSlp9iAcxfE=";
+  };
+
+  vendorSha256 = "sha256-/fqWnRQBpLNoTwqrFDKqQuv1r9do1voysBhLuj223S0=";
+
+  ldflags = [ "-s" "-w" ];
+
+  meta = with lib; {
+    description = "Spotify lyrics in your terminal";
+    homepage = "https://github.com/raitonoberu/sptlrx";
+    license = licenses.mit;
+    maintainers = with maintainers; [ MoritzBoehme ];
+  };
+}
diff --git a/pkgs/applications/audio/squeezelite/default.nix b/pkgs/applications/audio/squeezelite/default.nix
new file mode 100644
index 00000000000..5fc0d6f4200
--- /dev/null
+++ b/pkgs/applications/audio/squeezelite/default.nix
@@ -0,0 +1,88 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, alsa-lib
+, flac
+, libmad
+, libpulseaudio
+, libvorbis
+, mpg123
+, audioBackend ? "alsa"
+, dsdSupport ? true
+, faad2Support ? true
+, faad2
+, ffmpegSupport ? true
+, ffmpeg
+, opusSupport ? true
+, opusfile
+, resampleSupport ? true
+, soxr
+, sslSupport ? true
+, openssl
+}:
+
+let
+  inherit (lib) optional optionalString;
+
+  pulseSupport = audioBackend == "pulse";
+
+  binName = "squeezelite${optionalString pulseSupport "-pulse"}";
+
+in
+stdenv.mkDerivation {
+  # the nixos module uses the pname as the binary name
+  pname = binName;
+  # versions are specified in `squeezelite.h`
+  # see https://github.com/ralph-irving/squeezelite/issues/29
+  version = "1.9.9.1401";
+
+  src = fetchFromGitHub {
+    owner = "ralph-irving";
+    repo = "squeezelite";
+    rev = "894df3ea80f66a27a9ae5fab918acf62a6798b8b";
+    hash = "sha256-LIi+9vb0+56AGvVrLx4gQaUkUNjIi6PmqrLViLT1DSU=";
+  };
+
+  buildInputs = [ flac libmad libvorbis mpg123 ]
+    ++ lib.singleton (if pulseSupport then libpulseaudio else alsa-lib)
+    ++ optional faad2Support faad2
+    ++ optional ffmpegSupport ffmpeg
+    ++ optional opusSupport opusfile
+    ++ optional resampleSupport soxr
+    ++ optional sslSupport openssl;
+
+  enableParallelBuilding = true;
+
+  postPatch = ''
+    substituteInPlace opus.c \
+      --replace "<opusfile.h>" "<opus/opusfile.h>"
+  '';
+
+  EXECUTABLE = binName;
+
+  OPTS = [ "-DLINKALL" ]
+    ++ optional dsdSupport "-DDSD"
+    ++ optional (!faad2Support) "-DNO_FAAD"
+    ++ optional ffmpegSupport "-DFFMPEG"
+    ++ optional opusSupport "-DOPUS"
+    ++ optional pulseSupport "-DPULSEAUDIO"
+    ++ optional resampleSupport "-DRESAMPLE"
+    ++ optional sslSupport "-DUSE_SSL";
+
+  installPhase = ''
+    runHook preInstall
+
+    install -Dm555 -t $out/bin                   ${binName}
+    install -Dm444 -t $out/share/doc/squeezelite *.txt *.md
+
+    runHook postInstall
+  '';
+
+  meta = with lib; {
+    description = "Lightweight headless squeezebox client emulator";
+    homepage = "https://github.com/ralph-irving/squeezelite";
+    license = with licenses; [ gpl3Plus ] ++ optional dsdSupport bsd2;
+    maintainers = with maintainers; [ samdoshi ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/pkgs/applications/audio/squishyball/default.nix b/pkgs/applications/audio/squishyball/default.nix
new file mode 100644
index 00000000000..1d3bb0e0bee
--- /dev/null
+++ b/pkgs/applications/audio/squishyball/default.nix
@@ -0,0 +1,60 @@
+{ lib, stdenv, autoreconfHook, fetchFromGitLab, fetchpatch, flac, libao, libvorbis, ncurses
+, opusfile, pkg-config
+}:
+
+stdenv.mkDerivation rec {
+  pname = "squishyball";
+  version = "unstable-2020-11-23";
+
+  src = fetchFromGitLab {
+    domain = "gitlab.xiph.org";
+    owner = "xiph";
+    repo = "squishyball";
+    rev = "27590fe6bac545e2dd3eacf048edbd969682263a";
+    sha256 = "07zs8wx1ahf3q505fk9b6cgzlkhnayfsscch46yy9s1wgxgphj7s";
+  };
+
+  nativeBuildInputs = [ autoreconfHook pkg-config ];
+
+  buildInputs = [ flac libao libvorbis ncurses opusfile ];
+
+  patches = [
+    ./gnu-screen.patch
+
+    # Patch pending upstream inclusion for ncurses-6.3 support:
+    #  https://gitlab.xiph.org/xiph/squishyball/-/issues/1
+    (fetchpatch {
+      name = "ncurses-6.3.patch";
+      url = "https://gitlab.xiph.org/xiph/squishyball/uploads/5609ceaf85ebb6dc297c0efe61b9a1b7/0001-mincurses.c-use-ncurses-API-to-enter-raw-mode-ncurse.patch";
+      sha256 = "06llp7cd77f4vvhz8qdld551dnlpjxf98j7rmp3i1x1kng4f0iy3";
+    })
+  ];
+
+  postInstall = ''
+    # Why doesn’t this happen automagically?
+    mkdir -p $out/share/man/man1
+    cp squishyball.1 $out/share/man/man1
+  '';
+
+  meta = with 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://gitlab.xiph.org/xiph/squishyball";
+    license = licenses.gpl2Plus;
+    maintainers = with maintainers; [ michalrus ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/pkgs/applications/audio/squishyball/gnu-screen.patch b/pkgs/applications/audio/squishyball/gnu-screen.patch
new file mode 100644
index 00000000000..addc30d604c
--- /dev/null
+++ b/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/pkgs/applications/audio/ssrc/default.nix b/pkgs/applications/audio/ssrc/default.nix
new file mode 100644
index 00000000000..3516c6e4db0
--- /dev/null
+++ b/pkgs/applications/audio/ssrc/default.nix
@@ -0,0 +1,41 @@
+{ lib, stdenv, fetchFromGitHub }:
+
+stdenv.mkDerivation rec {
+  pname = "ssrc";
+  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 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/pkgs/applications/audio/stochas/default.nix b/pkgs/applications/audio/stochas/default.nix
new file mode 100644
index 00000000000..d295689716b
--- /dev/null
+++ b/pkgs/applications/audio/stochas/default.nix
@@ -0,0 +1,33 @@
+{ lib, stdenv, fetchFromGitHub, cmake, pkg-config, libX11, libXrandr, libXinerama, libXext, libXcursor, freetype, alsa-lib, libjack2 }:
+
+stdenv.mkDerivation rec {
+  pname = "stochas";
+  version = "1.3.5";
+
+  src = fetchFromGitHub {
+    owner = "surge-synthesizer";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "1z8q53qfigw6wwbvpca92b9pf9d0mv3nyb0fmszz5ikj3pcybi7m";
+    fetchSubmodules = true;
+  };
+
+  nativeBuildInputs = [ cmake pkg-config ];
+
+  buildInputs = [
+    libX11 libXrandr libXinerama libXext libXcursor freetype alsa-lib libjack2
+  ];
+
+  installPhase = ''
+    mkdir -p $out/lib/vst3
+    cp -r stochas_artefacts/Release/VST3/Stochas.vst3 $out/lib/vst3
+  '';
+
+  meta = with lib; {
+    description = "Probabilistic polyrhythmic sequencer plugin";
+    homepage = "https://stochas.org/";
+    license = licenses.gpl3Plus;
+    maintainers = with maintainers; [ magnetophon ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/pkgs/applications/audio/stone-phaser/default.nix b/pkgs/applications/audio/stone-phaser/default.nix
new file mode 100644
index 00000000000..7d12c6cbf34
--- /dev/null
+++ b/pkgs/applications/audio/stone-phaser/default.nix
@@ -0,0 +1,34 @@
+{ lib, stdenv, fetchFromGitHub, xorg, cairo, lv2, libjack2, mesa, pkg-config }:
+
+stdenv.mkDerivation rec {
+  pname = "stone-phaser";
+  version = "0.1.2";
+
+  src = fetchFromGitHub {
+    owner = "jpcima";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "180b32z8h9zi8p0q55r1dzxfckamnngm52zjypjjvvy7qdj3mfcd";
+    fetchSubmodules = true;
+  };
+
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = [
+    xorg.libX11 cairo lv2 libjack2 mesa
+  ];
+
+  postPatch = ''
+    patch -d dpf -p 1 -i "$src/resources/patch/DPF-bypass.patch"
+    patchShebangs ./dpf/utils/generate-ttl.sh
+  '';
+
+  installFlags = [ "PREFIX=$(out)" ];
+
+  meta = with lib; {
+    homepage = "https://github.com/jpcima/stone-phaser";
+    description = "A classic analog phaser effect, made with DPF and Faust";
+    maintainers = [ maintainers.magnetophon ];
+    platforms = platforms.linux;
+    license = licenses.boost;
+  };
+}
diff --git a/pkgs/applications/audio/strawberry/default.nix b/pkgs/applications/audio/strawberry/default.nix
new file mode 100644
index 00000000000..b607e2c9a0f
--- /dev/null
+++ b/pkgs/applications/audio/strawberry/default.nix
@@ -0,0 +1,104 @@
+{ mkDerivation
+, stdenv
+, lib
+, fetchFromGitHub
+, cmake
+, pkg-config
+, alsa-lib
+, boost
+, chromaprint
+, fftw
+, gnutls
+, libcdio
+, libmtp
+, libpthreadstubs
+, libtasn1
+, libXdmcp
+, ninja
+, pcre
+, protobuf
+, sqlite
+, taglib
+, libpulseaudio
+, libselinux
+, libsepol
+, p11-kit
+, util-linux
+, qtbase
+, qtx11extras
+, qttools
+, withGstreamer ? true
+, glib-networking
+, gst_all_1
+, withVlc ? true
+, libvlc
+}:
+
+mkDerivation rec {
+  pname = "strawberry";
+  version = "1.0.2";
+
+  src = fetchFromGitHub {
+    owner = "jonaski";
+    repo = pname;
+    rev = version;
+    sha256 = "sha256-/pwHWmQTV1QBK+5SS0/NC6wMm2QQm+iCZArxiHjn4M4=";
+  };
+
+  buildInputs = [
+    alsa-lib
+    boost
+    chromaprint
+    fftw
+    gnutls
+    libcdio
+    libmtp
+    libpthreadstubs
+    libtasn1
+    libXdmcp
+    pcre
+    protobuf
+    sqlite
+    taglib
+    qtbase
+    qtx11extras
+  ] ++ lib.optionals stdenv.isLinux [
+    libpulseaudio
+    libselinux
+    libsepol
+    p11-kit
+  ] ++ lib.optionals withGstreamer (with gst_all_1; [
+    glib-networking
+    gstreamer
+    gst-plugins-base
+    gst-plugins-good
+    gst-plugins-bad
+    gst-plugins-ugly
+  ]) ++ lib.optional withVlc libvlc;
+
+  nativeBuildInputs = [
+    cmake
+    ninja
+    pkg-config
+    qttools
+  ] ++ lib.optionals stdenv.isLinux [
+    util-linux
+  ];
+
+  postInstall = lib.optionalString withGstreamer ''
+    qtWrapperArgs+=(
+      --prefix GST_PLUGIN_SYSTEM_PATH_1_0 : "$GST_PLUGIN_SYSTEM_PATH_1_0"
+      --prefix GIO_EXTRA_MODULES : "${glib-networking.out}/lib/gio/modules"
+    )
+  '';
+
+  meta = with lib; {
+    description = "Music player and music collection organizer";
+    homepage = "https://www.strawberrymusicplayer.org/";
+    changelog = "https://raw.githubusercontent.com/jonaski/strawberry/${version}/Changelog";
+    license = licenses.gpl3Only;
+    maintainers = with maintainers; [ peterhoeg ];
+    # upstream says darwin should work but they lack maintainers as of 0.6.6
+    platforms = platforms.linux;
+  };
+}
diff --git a/pkgs/applications/audio/streamripper/default.nix b/pkgs/applications/audio/streamripper/default.nix
new file mode 100644
index 00000000000..6fae14e2b1a
--- /dev/null
+++ b/pkgs/applications/audio/streamripper/default.nix
@@ -0,0 +1,20 @@
+{ lib, stdenv, fetchurl , glib, pkg-config, libogg, libvorbis, libmad }:
+
+stdenv.mkDerivation rec {
+  pname = "streamripper";
+  version = "1.64.6";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/streamripper/${pname}-${version}.tar.gz";
+    sha256 = "0hnyv3206r0rfprn3k7k6a0j959kagsfyrmyjm3gsf3vkhp5zmy1";
+  };
+
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = [ glib libogg libvorbis libmad ];
+
+  meta = with lib; {
+    homepage = "http://streamripper.sourceforge.net/";
+    description = "Application that lets you record streaming mp3 to your hard drive";
+    license = licenses.gpl2;
+  };
+}
diff --git a/pkgs/applications/audio/string-machine/default.nix b/pkgs/applications/audio/string-machine/default.nix
new file mode 100644
index 00000000000..a146ea8cd97
--- /dev/null
+++ b/pkgs/applications/audio/string-machine/default.nix
@@ -0,0 +1,36 @@
+{ lib, stdenv, fetchFromGitHub, boost, cairo, lv2, pkg-config }:
+
+stdenv.mkDerivation rec {
+  pname = "string-machine";
+  version = "unstable-2020-01-20";
+
+  src = fetchFromGitHub {
+    owner = "jpcima";
+    repo = pname;
+    rev = "188082dd0beb9a3c341035604841c53675fe66c4";
+    sha256 = "0l9xrzp3f0hk6h320qh250a0n1nbd6qhjmab21sjmrlb4ngy672v";
+    fetchSubmodules = true;
+  };
+
+  postPatch = ''
+    patchShebangs ./dpf/utils/generate-ttl.sh
+  '';
+
+  nativeBuildInputs = [ pkg-config ];
+
+  buildInputs = [
+    boost cairo lv2
+  ];
+
+  makeFlags = [
+    "PREFIX=$(out)"
+  ];
+
+  meta = with lib; {
+    homepage = "https://github.com/jpcima/string-machine";
+    description = "Digital model of electronic string ensemble instrument";
+    maintainers = [ maintainers.magnetophon ];
+    platforms = intersectLists platforms.linux platforms.x86;
+    license = licenses.boost;
+  };
+}
diff --git a/pkgs/applications/audio/sublime-music/default.nix b/pkgs/applications/audio/sublime-music/default.nix
new file mode 100644
index 00000000000..3f7e1e038f8
--- /dev/null
+++ b/pkgs/applications/audio/sublime-music/default.nix
@@ -0,0 +1,97 @@
+{ fetchFromGitLab
+, lib
+, python3Packages
+, gobject-introspection
+, gtk3
+, pango
+, wrapGAppsHook
+, xvfb-run
+, chromecastSupport ? false
+, serverSupport ? false
+, keyringSupport ? true
+, notifySupport ? true, libnotify
+, networkSupport ? true, networkmanager
+}:
+
+python3Packages.buildPythonApplication rec {
+  pname = "sublime-music";
+  version = "0.11.16";
+  format = "pyproject";
+
+  src = fetchFromGitLab {
+    owner = "sublime-music";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "sha256-n77mTgElwwFaX3WQL8tZzbkPwnsyQ08OW9imSOjpBlg=";
+  };
+
+  nativeBuildInputs = [
+    gobject-introspection
+    python3Packages.poetry-core
+    wrapGAppsHook
+  ];
+
+  buildInputs = [
+    gtk3
+    pango
+  ]
+   ++ lib.optional notifySupport libnotify
+   ++ lib.optional networkSupport networkmanager
+  ;
+
+  propagatedBuildInputs = with python3Packages; [
+    bleach
+    dataclasses-json
+    deepdiff
+    fuzzywuzzy
+    mpv
+    peewee
+    pygobject3
+    python-Levenshtein
+    python-dateutil
+    requests
+    semver
+  ]
+   ++ lib.optional chromecastSupport PyChromecast
+   ++ lib.optional keyringSupport keyring
+   ++ lib.optional serverSupport bottle
+  ;
+
+  postPatch = ''
+    sed -i "/--cov/d" setup.cfg
+    sed -i "/--no-cov-on-fail/d" setup.cfg
+  '';
+
+  # hook for gobject-introspection doesn't like strictDeps
+  # https://github.com/NixOS/nixpkgs/issues/56943
+  strictDeps = false;
+
+  checkInputs = with python3Packages; [
+    pytest
+  ];
+
+  checkPhase = ''
+    ${xvfb-run}/bin/xvfb-run pytest
+  '';
+
+  pythonImportsCheck = [
+    "sublime_music"
+  ];
+
+  postInstall = ''
+    install -Dm444 sublime-music.desktop      -t $out/share/applications
+    install -Dm444 sublime-music.metainfo.xml -t $out/share/metainfo
+
+    for size in 16 22 32 48 64 72 96 128 192 512 1024; do
+        install -Dm444 logo/rendered/"$size".png \
+          $out/share/icons/hicolor/"$size"x"$size"/apps/sublime-music.png
+    done
+  '';
+
+  meta = with lib; {
+    description = "GTK3 Subsonic/Airsonic client";
+    homepage = "https://sublimemusic.app/";
+    license = licenses.gpl3Plus;
+    maintainers = with maintainers; [ albakham sumnerevans ];
+  };
+}
diff --git a/pkgs/applications/audio/sunvox/default.nix b/pkgs/applications/audio/sunvox/default.nix
new file mode 100644
index 00000000000..503079b9ed4
--- /dev/null
+++ b/pkgs/applications/audio/sunvox/default.nix
@@ -0,0 +1,48 @@
+{ lib, stdenv, fetchurl, unzip, alsa-lib, libX11, libXi, SDL2 }:
+
+let
+  libPath = lib.makeLibraryPath [ stdenv.cc.cc alsa-lib 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 {
+  pname = "SunVox";
+  version = "2.0e";
+
+  src = fetchurl {
+    url = "https://www.warmplace.ru/soft/sunvox/sunvox-${version}.zip";
+    sha256 = "sha256-v4dQnRr7pusOAHX8ytDChKixYxEIjg30vOTD6uA/S0o=";
+  };
+
+  nativeBuildInputs = [ 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 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/pkgs/applications/audio/surge-XT/default.nix b/pkgs/applications/audio/surge-XT/default.nix
new file mode 100644
index 00000000000..a08c25f016a
--- /dev/null
+++ b/pkgs/applications/audio/surge-XT/default.nix
@@ -0,0 +1,93 @@
+{ stdenv
+, lib
+, fetchFromGitHub
+, cmake
+, pkg-config
+, alsa-lib
+, freetype
+, libjack2
+, lv2
+, libX11
+, libXcursor
+, libXext
+, libXinerama
+, libXrandr
+}:
+
+let
+  juce-lv2 = stdenv.mkDerivation {
+    pname = "juce-lv2";
+    version = "unstable-2021-12-11";
+
+    # lv2 branch
+    src = fetchFromGitHub {
+      owner = "lv2-porting-project";
+      repo = "JUCE";
+      rev = "5106d9d77b892c22afcb9379c13982f270429e2e";
+      sha256 = "sha256-bpZJ5NEDRfMtmx0RkKQFZWqS/SnYAFRhrDg9MSphh4c=";
+    };
+
+    dontConfigure = true;
+    dontBuild = true;
+
+    installPhase = ''
+      cp -r . $out
+    '';
+  };
+in
+stdenv.mkDerivation rec {
+  pname = "surge-XT";
+  version = "unstable-2021-12-11";
+
+  src = fetchFromGitHub {
+    owner = "surge-synthesizer";
+    repo = "surge";
+    rev = "320f68543d0279c11cea8dc7f5170399cccc9602";
+    fetchSubmodules = true;
+    sha256 = "sha256-Jcs5FpX5AZl72aKYNbRcfYqb2PRt0r1pQXk957xk0aM=";
+  };
+
+  nativeBuildInputs = [
+    cmake
+    pkg-config
+  ];
+
+  buildInputs = [
+    alsa-lib
+    freetype
+    libjack2
+    lv2
+    libX11
+    libXcursor
+    libXext
+    libXinerama
+    libXrandr
+  ];
+
+  cmakeFlags = [
+    "-DJUCE_SUPPORTS_LV2=ON"
+    "-DSURGE_JUCE_PATH=${juce-lv2}"
+  ];
+
+  # JUCE dlopen's these at runtime, crashes without them
+  NIX_LDFLAGS = (toString [
+    "-lX11"
+    "-lXext"
+    "-lXcursor"
+    "-lXinerama"
+    "-lXrandr"
+  ]);
+
+  # see https://github.com/NixOS/nixpkgs/pull/149487#issuecomment-991747333
+  postPatch = ''
+    export XDG_DOCUMENTS_DIR=$(mktemp -d)
+  '';
+
+  meta = with lib; {
+    description = "LV2 & VST3 synthesizer plug-in (previously released as Vember Audio Surge)";
+    homepage = "https://surge-synthesizer.github.io";
+    license = licenses.gpl3;
+    platforms = [ "x86_64-linux" ];
+    maintainers = with maintainers; [ magnetophon orivej ];
+  };
+}
diff --git a/pkgs/applications/audio/surge/default.nix b/pkgs/applications/audio/surge/default.nix
new file mode 100644
index 00000000000..849b07d67e1
--- /dev/null
+++ b/pkgs/applications/audio/surge/default.nix
@@ -0,0 +1,54 @@
+{ stdenv, lib, fetchurl, fetchFromGitHub, cmake, git, pkg-config, python3
+, cairo, libsndfile, libxcb, libxkbcommon, xcbutil, xcbutilcursor, xcbutilkeysyms, zenity
+, curl, rsync
+}:
+
+stdenv.mkDerivation rec {
+  pname = "surge";
+  version = "1.9.0";
+
+  src = fetchurl {
+    url = "https://github.com/surge-synthesizer/releases/releases/download/${version}/SurgeSrc_${version}.tgz";
+    sha256 = "00af4lfcipl0rn0dn4gfipx7nbk8ym1mrmji8v0ar98frsrpxg4k";
+  };
+
+  extraContent = fetchFromGitHub {
+    owner = "surge-synthesizer";
+    repo = "surge-extra-content";
+    # rev from: https://github.com/surge-synthesizer/surge/blob/release_1.8.1/cmake/stage-extra-content.cmake#L6
+    # or: https://github.com/surge-synthesizer/surge/blob/main/cmake/stage-extra-content.cmake
+    # SURGE_EXTRA_CONTENT_HASH
+    rev = "afc591cc06d9adc3dc8dc515a55c66873fa10296";
+    sha256 = "1wqv86l70nwlrb10n47rib80f47a96j9qqg8w5dv46ys1sq2nz7z";
+  };
+  nativeBuildInputs = [ cmake git pkg-config python3 ];
+  buildInputs = [ cairo libsndfile libxcb libxkbcommon xcbutil xcbutilcursor xcbutilkeysyms zenity curl rsync ];
+
+  postPatch = ''
+    substituteInPlace src/common/SurgeStorage.cpp --replace "/usr/share/Surge" "$out/share/surge"
+    substituteInPlace src/linux/UserInteractionsLinux.cpp --replace '"zenity' '"${zenity}/bin/zenity'
+    patchShebangs scripts/linux/
+    cp -r $extraContent/Skins/ resources/data/skins
+  '';
+
+
+  installPhase = ''
+    cd ..
+    cmake --build build --config Release --target install-everything-global
+  '';
+
+  doInstallCheck = true;
+  installCheckPhase = ''
+    export HOME=$(mktemp -d)
+    export SURGE_DISABLE_NETWORK_TESTS=TRUE
+    build/surge-headless
+  '';
+
+  meta = with lib; {
+    description = "LV2 & VST3 synthesizer plug-in (previously released as Vember Audio Surge)";
+    homepage = "https://surge-synthesizer.github.io";
+    license = licenses.gpl3;
+    platforms = [ "x86_64-linux" ];
+    maintainers = with maintainers; [ magnetophon orivej ];
+  };
+}
diff --git a/pkgs/applications/audio/svox/default.nix b/pkgs/applications/audio/svox/default.nix
new file mode 100644
index 00000000000..044fd176481
--- /dev/null
+++ b/pkgs/applications/audio/svox/default.nix
@@ -0,0 +1,30 @@
+{ lib, stdenv, fetchFromGitHub, autoreconfHook, popt }:
+
+stdenv.mkDerivation {
+  pname = "svox";
+  version = "2018-02-14";
+
+  # basically took the source code from android and borrowed autotool patches from debian
+  src = fetchFromGitHub {
+    owner = "naggety";
+    repo = "picotts";
+    rev = "e3ba46009ee868911fa0b53db672a55f9cc13b1c";
+    sha256 = "0k3m7vh1ak9gmxd83x29cvhzfkybgz5hnlhd9xj19l1bjyx84s8v";
+  };
+
+  postPatch = ''
+    cd pico
+  '';
+
+  buildInputs = [ popt ];
+
+  nativeBuildInputs = [ autoreconfHook ];
+
+  meta = with 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/pkgs/applications/audio/swh-lv2/default.nix b/pkgs/applications/audio/swh-lv2/default.nix
new file mode 100644
index 00000000000..338877d2be2
--- /dev/null
+++ b/pkgs/applications/audio/swh-lv2/default.nix
@@ -0,0 +1,39 @@
+{ lib, stdenv, fetchFromGitHub, fftwSinglePrec, libxslt, lv2, pkg-config }:
+
+stdenv.mkDerivation rec {
+  pname = "swh-lv2";
+  version = "1.0.16";
+
+  src = fetchFromGitHub {
+    owner = "swh";
+    repo = "lv2";
+    rev = "v${version}";
+    sha256 = "sha256-v6aJUWDbBZEmz0v6+cSCi/KhOYNUeK/MJLUSgzi39ng=";
+  };
+
+  patchPhase = ''
+    sed -e "s#xsltproc#${libxslt.bin}/bin/xsltproc#" -i Makefile
+    sed -e "s#PREFIX = /usr/local#PREFIX = $out#" -i Makefile
+  '';
+
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = [ fftwSinglePrec lv2 ];
+
+  installPhase = "make install-system";
+
+  meta = with 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/pkgs/applications/audio/synthv1/default.nix b/pkgs/applications/audio/synthv1/default.nix
new file mode 100644
index 00000000000..b0e9e9bde9d
--- /dev/null
+++ b/pkgs/applications/audio/synthv1/default.nix
@@ -0,0 +1,23 @@
+{ mkDerivation, lib, fetchurl, pkg-config, qtbase, qttools, libjack2, alsa-lib, liblo, lv2 }:
+
+mkDerivation rec {
+  pname = "synthv1";
+  version = "0.9.23";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/synthv1/${pname}-${version}.tar.gz";
+    sha256 = "sha256-0V72T51icT/t9fJf4mwcMYZLjzTPnmiCbU+BdwnCmw4=";
+  };
+
+  buildInputs = [ qtbase qttools libjack2 alsa-lib liblo lv2 ];
+
+  nativeBuildInputs = [ pkg-config ];
+
+  meta = with 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/pkgs/applications/audio/tageditor/default.nix b/pkgs/applications/audio/tageditor/default.nix
new file mode 100644
index 00000000000..320a26b8172
--- /dev/null
+++ b/pkgs/applications/audio/tageditor/default.nix
@@ -0,0 +1,56 @@
+{ stdenv
+, pkgs
+, fetchFromGitHub
+, pkg-config
+, cmake
+
+, cpp-utilities
+, qtutilities
+, mp4v2
+, libid3tag
+, qtbase
+, qttools
+, qtwebengine
+, qtx11extras
+, tagparser
+, wrapQtAppsHook
+}:
+
+stdenv.mkDerivation rec {
+  pname = "tageditor";
+  version = "3.3.10";
+
+  src = fetchFromGitHub {
+    owner = "martchus";
+    repo = "tageditor";
+    rev = "v${version}";
+    sha256 = "16cmq7dyalcwc8gx1y9acngw5imjh8ydp4prxy7qpzk4fj3kpsak";
+  };
+
+  nativeBuildInputs = [
+    pkg-config
+    cmake
+    wrapQtAppsHook
+  ];
+  buildInputs = [
+    mp4v2
+    libid3tag
+    pkg-config
+    qtbase
+    qttools
+    qtx11extras
+    qtwebengine
+    cpp-utilities
+    qtutilities
+    tagparser
+  ];
+
+  meta = with pkgs.lib; {
+    homepage = "https://github.com/Martchus/tageditor";
+    description = "A tag editor with Qt GUI and command-line interface supporting MP4/M4A/AAC (iTunes), ID3, Vorbis, Opus, FLAC and Matroska";
+    license = licenses.gpl2;
+    maintainers = [ maintainers.matthiasbeyer ];
+    platforms = platforms.linux;
+  };
+}
+
diff --git a/pkgs/applications/audio/tagutil/default.nix b/pkgs/applications/audio/tagutil/default.nix
new file mode 100644
index 00000000000..e5076188301
--- /dev/null
+++ b/pkgs/applications/audio/tagutil/default.nix
@@ -0,0 +1,45 @@
+{ stdenv, lib, fetchFromGitHub
+, pkg-config, cmake, libyaml
+, jansson, libvorbis, taglib
+, zlib
+}:
+
+stdenv.mkDerivation rec {
+  pname = "tagutil";
+  version = "3.1";
+
+  src = fetchFromGitHub {
+    owner = "kaworu";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "sha256-oY1aGl5CKVtpOfh8Wskio/huWYMiPuxWPqxlooTutcw=";
+  };
+
+  sourceRoot = "source/src";
+
+  nativeBuildInputs = [
+    cmake
+    pkg-config
+  ];
+
+  buildInputs = [
+    libvorbis
+    libyaml
+    jansson
+    taglib
+    zlib
+  ];
+
+  postPatch = ''
+    substituteInPlace CMakeLists.txt \
+      --replace "-o aslr" ""
+  '';
+
+  meta = with lib; {
+    description = "Scriptable music files tags tool and editor";
+    homepage = "https://github.com/kaworu/tagutil";
+    license = licenses.bsd2;
+    maintainers = with maintainers; [ dan4ik605743 ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/pkgs/applications/audio/talentedhack/default.nix b/pkgs/applications/audio/talentedhack/default.nix
new file mode 100644
index 00000000000..387fd4f5a0c
--- /dev/null
+++ b/pkgs/applications/audio/talentedhack/default.nix
@@ -0,0 +1,36 @@
+{ lib, stdenv, fetchFromGitHub, lv2, fftwFloat, pkg-config }:
+
+stdenv.mkDerivation rec {
+  pname = "talentedhack";
+  version = "1.86";
+
+  src = fetchFromGitHub {
+    owner = "jeremysalwen";
+    repo = "talentedhack";
+    rev = "v${version}";
+    sha256 = "0kwvayalysmk7y49jq0k16al252md8d45z58hphzsksmyz6148bx";
+  };
+
+  nativeBuildInputs = [ pkg-config ];
+
+  buildInputs = [ lv2 fftwFloat ];
+
+  # To avoid name clashes, plugins should be compiled with symbols hidden, except for `lv2_descriptor`:
+  preConfigure = ''
+    sed -r 's/^CFLAGS.*$/\0 -fvisibility=hidden/' -i Makefile
+  '';
+
+  installPhase = ''
+    d=$out/lib/lv2/talentedhack.lv2
+    mkdir -p $d
+    cp *.so *.ttl $d
+  '';
+
+  meta = with lib; {
+    homepage = "https://github.com/jeremysalwen/TalentedHack";
+    description = "LV2 port of Autotalent pitch correction plugin";
+    license = licenses.gpl3;
+    maintainers = [ maintainers.michalrus ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/pkgs/applications/audio/tambura/default.nix b/pkgs/applications/audio/tambura/default.nix
new file mode 100644
index 00000000000..b1a6513c7f7
--- /dev/null
+++ b/pkgs/applications/audio/tambura/default.nix
@@ -0,0 +1,33 @@
+{ lib, stdenv, fetchFromGitHub, faust2jaqt, faust2lv2 }:
+stdenv.mkDerivation rec {
+  pname = "Tambura";
+  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 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/pkgs/applications/audio/tamgamp.lv2/default.nix b/pkgs/applications/audio/tamgamp.lv2/default.nix
new file mode 100644
index 00000000000..2907a5277ee
--- /dev/null
+++ b/pkgs/applications/audio/tamgamp.lv2/default.nix
@@ -0,0 +1,53 @@
+{ lib, stdenv, fetchFromGitHub, pkg-config, lv2, zita-resampler }:
+
+stdenv.mkDerivation rec {
+  pname = "tamgamp.lv2";
+  version = "unstable-2020-06-14";
+
+  src = fetchFromGitHub {
+    owner = "sadko4u";
+    repo = pname;
+    rev = "426da74142fcb6b7687a35b2b1dda3392e171b92";
+    sha256 = "0dqsnim7v79rx13bkkh143gqz0xg26cpf6ya3mrwwprpf5hns2bp";
+  };
+
+  nativeBuildInputs = [ pkg-config ];
+
+  buildInputs = [ lv2 zita-resampler ];
+
+  makeFlags = [ "PREFIX=$(out)" ];
+
+  enableParallelBuilding = true;
+
+  meta = with lib; {
+    homepage = "https://github.com/sadko4u/tamgamp.lv2";
+    description = "Guitar amplifier simulator";
+    longDescription = ''
+       Tamgamp (Pronouncement: "Damage Amp") is an LV2 guitar amp simulator that provides two plugins:
+
+        - Tamgamp - a plugin based on Guitarix DK Builder simulated chains.
+        - TamgampGX - a plugin based on tuned Guitarix internal amplifiers implementation.
+
+       The reference to the original Guitarix project: https://guitarix.org/
+
+       It simulates the set of the following guitar amplifiers:
+
+       - Fender Princeton Reverb-amp AA1164 (without reverb module)
+       - Fender Twin Reverb-Amp AA769 (Normal channel, bright off)
+       - Fender Twin Reverb-Amp AA769 (Vibrato channel, bright on)
+       - Marshall JCM-800 High-gain input
+       - Marshall JCM-800 Low-gain input
+       - Mesa/Boogie DC3 preamplifier (lead channel)
+       - Mesa/Boogie DC3 preamplifier (rhythm channel)
+       - Mesa Dual Rectifier preamplifier (orange channel, less gain)
+       - Mesa Dual Rectifier preamplifier (red channel, more gain)
+       - Peavey 5150II crunch channel
+       - Peavey 5150II lead channel
+       - VOX AC-30 Brilliant channel
+       - VOX AC-30 normal channel
+     '';
+    maintainers = [ maintainers.magnetophon ];
+    platforms = platforms.linux;
+    license = licenses.lgpl3Plus;
+  };
+}
diff --git a/pkgs/applications/audio/tap-plugins/default.nix b/pkgs/applications/audio/tap-plugins/default.nix
new file mode 100644
index 00000000000..c0b2c64822f
--- /dev/null
+++ b/pkgs/applications/audio/tap-plugins/default.nix
@@ -0,0 +1,32 @@
+{ lib, stdenv, fetchurl, ladspa-sdk, pkgs, ... }:
+
+stdenv.mkDerivation rec {
+  pname = "tap-plugins";
+  version = "1.0.1";
+
+  src = pkgs.fetchFromGitHub {
+    owner = "tomszilagyi";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "0c6qhyf8smlypc36vmpr42dm3mrzk6pg9cc9r0vx22qbrd5zfpjw";
+  };
+
+  buildInputs = [ ladspa-sdk ];
+
+  preInstall = ''
+    substituteInPlace Makefile --replace /usr/local "$out"
+  '';
+
+  meta = with lib; {
+    description = "Tom's Audio Processing plugins";
+    longDescription = ''
+      A number of LADSPA plugins including: TAP AutoPanner, TAP Chorus/Flanger, TAP DeEsser,
+      TAP Dynamics (Mono & Stereo), TAP Equalizer and TAP Equalizer/BW, TAP Fractal Doubler, TAP Pink/Fractal Noise,
+      TAP Pitch Shifter, TAP Reflector, TAP Reverberator, TAP Rotary Speaker, TAP Scaling Limiter,
+      TAP Sigmoid Booster, TAP Stereo Echo, TAP Tremolo, TAP TubeWarmth, TAP Vibrato.
+    '';
+    homepage = "http://tap-plugins.sourceforge.net/ladspa.html";
+    license = licenses.gpl3;
+    maintainers = [ maintainers.fps ];
+  };
+}
diff --git a/pkgs/applications/audio/tauon/default.nix b/pkgs/applications/audio/tauon/default.nix
new file mode 100644
index 00000000000..d9effb3f1af
--- /dev/null
+++ b/pkgs/applications/audio/tauon/default.nix
@@ -0,0 +1,122 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, pkg-config
+, python3Packages
+, ffmpeg
+, flac
+, librsvg
+, gobject-introspection
+, gtk3
+, libnotify
+, libsamplerate
+, libvorbis
+, mpg123
+, libopenmpt
+, opusfile
+, pango
+, pulseaudio
+, withDiscordRPC ? false
+}:
+
+stdenv.mkDerivation rec {
+  pname = "tauon";
+  version = "7.1.3";
+
+  src = fetchFromGitHub {
+    owner = "Taiko2k";
+    repo = "TauonMusicBox";
+    rev = "v${version}";
+    sha256 = "sha256-UadE8qsQxRjE+POHLAUY1tRUInNXsMEqTAP02zSDSZ4=";
+  };
+
+  postPatch = ''
+    substituteInPlace tauon.py \
+      --replace 'install_mode = False' 'install_mode = True' \
+      --replace 'install_directory = os.path.dirname(os.path.abspath(__file__))' 'install_directory = "${placeholder "out"}/share/tauon"'
+
+    substituteInPlace t_modules/t_main.py \
+      --replace 'install_mode = False' 'install_mode = True' \
+      --replace 'libopenmpt.so' '${lib.getLib libopenmpt}/lib/libopenmpt.so' \
+      --replace 'lib/libphazor.so' '../../lib/libphazor.so'
+
+    substituteInPlace t_modules/t_phazor.py \
+      --replace 'lib/libphazor.so' '../../lib/libphazor.so'
+
+    patchShebangs compile-phazor.sh
+
+    substituteInPlace extra/tauonmb.desktop --replace 'Exec=/opt/tauon-music-box/tauonmb.sh' 'Exec=${placeholder "out"}/bin/tauon'
+  '';
+
+  postBuild = ''
+    ./compile-phazor.sh
+  '';
+
+  nativeBuildInputs = [
+    pkg-config
+    python3Packages.wrapPython
+  ];
+
+  buildInputs = [
+    flac
+    gobject-introspection
+    gtk3
+    libnotify
+    libopenmpt
+    librsvg
+    libsamplerate
+    libvorbis
+    mpg123
+    opusfile
+    pango
+    pulseaudio
+  ];
+
+  pythonPath = with python3Packages; [
+    beautifulsoup4
+    gst-python
+    dbus-python
+    isounidecode
+    musicbrainzngs
+    mutagen
+    pillow
+    plexapi
+    pulsectl
+    pycairo
+    pylast
+    pygobject3
+    pylyrics
+    pysdl2
+    requests
+    send2trash
+    setproctitle
+  ] ++ lib.optional withDiscordRPC pypresence;
+
+  makeWrapperArgs = [
+    "--prefix PATH : ${lib.makeBinPath [ffmpeg]}"
+    "--prefix PYTHONPATH : $out/share/tauon"
+    "--set GI_TYPELIB_PATH $GI_TYPELIB_PATH"
+  ];
+
+  installPhase = ''
+    install -Dm755 tauon.py $out/bin/tauon
+    mkdir -p $out/share/tauon
+    cp -r lib $out
+    cp -r assets input.txt t_modules theme $out/share/tauon
+
+    wrapPythonPrograms
+
+    mkdir -p $out/share/applications
+    install -Dm755 extra/tauonmb.desktop $out/share/applications/tauonmb.desktop
+    mkdir -p $out/share/icons/hicolor/scalable/apps
+    install -Dm644 extra/tauonmb{,-symbolic}.svg $out/share/icons/hicolor/scalable/apps
+'';
+
+  meta = with lib; {
+    description = "The Linux desktop music player from the future";
+    homepage = "https://tauonmusicbox.rocks/";
+    license = licenses.gpl3;
+    maintainers = with maintainers; [ SuperSandro2000 ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/pkgs/applications/audio/tenacity/default.nix b/pkgs/applications/audio/tenacity/default.nix
new file mode 100644
index 00000000000..fbf13c1748f
--- /dev/null
+++ b/pkgs/applications/audio/tenacity/default.nix
@@ -0,0 +1,148 @@
+{ stdenv
+, lib
+, fetchFromSourcehut
+, cmake
+, wxGTK
+, pkg-config
+, python3
+, gettext
+, glib
+, file
+, lame
+, libvorbis
+, libmad
+, libjack2
+, lv2
+, lilv
+, makeWrapper
+, serd
+, sord
+, sqlite
+, sratom
+, suil
+, alsa-lib
+, libsndfile
+, soxr
+, flac
+, twolame
+, expat
+, libid3tag
+, libopus
+, ffmpeg
+, soundtouch
+, pcre
+, portaudio
+, linuxHeaders
+, at-spi2-core
+, dbus
+, libepoxy
+, libXdmcp
+, libXtst
+, libpthreadstubs
+, libselinux
+, libsepol
+, libxkbcommon
+, util-linux
+}:
+
+stdenv.mkDerivation rec {
+  pname = "tenacity";
+  version = "unstable-2021-10-18";
+
+  src = fetchFromSourcehut {
+    owner = "~tenacity";
+    repo = "tenacity";
+    rev = "697c0e764ccb19c1e2f3073ae08ecdac7aa710e4";
+    sha256 = "1fc9xz8lyl8si08wkzncpxq92vizan60c3640qr4kbnxg7vi2iy4";
+  };
+
+  postPatch = ''
+    touch src/RevisionIdent.h
+
+    substituteInPlace src/FileNames.cpp \
+      --replace /usr/include/linux/magic.h ${linuxHeaders}/include/linux/magic.h
+  '';
+
+  postFixup = ''
+    rm $out/tenacity
+    wrapProgram "$out/bin/tenacity" \
+      --suffix AUDACITY_PATH : "$out/share/tenacity" \
+      --suffix AUDACITY_MODULES_PATH : "$out/lib/tenacity/modules" \
+      --prefix LD_LIBRARY_PATH : "$out/lib/tenacity" \
+      --prefix XDG_DATA_DIRS : "$out/share:$GSETTINGS_SCHEMAS_PATH"
+  '';
+
+  NIX_CFLAGS_COMPILE = "-D GIT_DESCRIBE=\"\"";
+
+  # tenacity only looks for ffmpeg at runtime, so we need to link it in manually
+  NIX_LDFLAGS = toString [
+    "-lavcodec"
+    "-lavdevice"
+    "-lavfilter"
+    "-lavformat"
+    "-lavresample"
+    "-lavutil"
+    "-lpostproc"
+    "-lswresample"
+    "-lswscale"
+  ];
+
+  nativeBuildInputs = [
+    cmake
+    gettext
+    makeWrapper
+    pkg-config
+    python3
+  ] ++ lib.optionals stdenv.isLinux [
+    linuxHeaders
+  ];
+
+  buildInputs = [
+    alsa-lib
+    expat
+    ffmpeg
+    file
+    flac
+    glib
+    lame
+    libid3tag
+    libjack2
+    libmad
+    libopus
+    libsndfile
+    libvorbis
+    lilv
+    lv2
+    pcre
+    portaudio
+    serd
+    sord
+    soundtouch
+    soxr
+    sqlite
+    sratom
+    suil
+    twolame
+    wxGTK
+    wxGTK.gtk
+  ] ++ lib.optionals stdenv.isLinux [
+    at-spi2-core
+    dbus
+    libepoxy
+    libXdmcp
+    libXtst
+    libpthreadstubs
+    libxkbcommon
+    libselinux
+    libsepol
+    util-linux
+  ];
+
+  meta = with lib; {
+    description = "Sound editor with graphical UI";
+    homepage = "https://tenacityaudio.org/";
+    license = licenses.gpl2Plus;
+    maintainers = with maintainers; [ irenes lheckemann ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/pkgs/applications/audio/termusic/default.nix b/pkgs/applications/audio/termusic/default.nix
new file mode 100644
index 00000000000..4a0035aadf5
--- /dev/null
+++ b/pkgs/applications/audio/termusic/default.nix
@@ -0,0 +1,28 @@
+{ lib
+, stdenv
+, fetchCrate
+, rustPlatform
+, pkg-config
+, alsa-lib }:
+
+rustPlatform.buildRustPackage rec {
+  pname = "termusic";
+  version = "0.6.10";
+
+  src = fetchCrate {
+    inherit pname version;
+    sha256 = "sha256-i+XxEPkLZK+JKDl88P8Nd7XBhsGhEzvUGovJtSWvRtg=";
+  };
+
+  cargoHash = "sha256-7nQzU1VvRDrtltVAXTX268vl9AbQhMOilPG4nNAJ+Xk=";
+
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = [ alsa-lib ];
+
+  meta = with lib; {
+    description = "Terminal Music Player TUI written in Rust";
+    homepage = "https://github.com/tramhao/termusic";
+    license = with licenses; [ gpl3Only ];
+    maintainers = with maintainers; [ devhell ];
+  };
+}
diff --git a/pkgs/applications/audio/tetraproc/default.nix b/pkgs/applications/audio/tetraproc/default.nix
new file mode 100644
index 00000000000..b5012029480
--- /dev/null
+++ b/pkgs/applications/audio/tetraproc/default.nix
@@ -0,0 +1,43 @@
+{ lib, stdenv, fetchurl, makeWrapper
+, expat, fftwFloat, fontconfig, freetype, libjack2, jack2, libclthreads, libclxclient
+, libsndfile, libxcb, xorg
+}:
+
+stdenv.mkDerivation rec {
+  pname = "tetraproc";
+  version = "0.8.6";
+
+  src = fetchurl {
+    url = "https://kokkinizita.linuxaudio.org/linuxaudio/downloads/${pname}-${version}.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 : "${jack2}/bin"
+  '';
+
+  meta = with 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/pkgs/applications/audio/timemachine/default.nix b/pkgs/applications/audio/timemachine/default.nix
new file mode 100644
index 00000000000..623714e706f
--- /dev/null
+++ b/pkgs/applications/audio/timemachine/default.nix
@@ -0,0 +1,32 @@
+{ lib, stdenv, fetchFromGitHub, autoconf, automake, pkg-config, gtk2
+, libjack2, libsndfile
+}:
+
+stdenv.mkDerivation rec {
+  pname = "timemachine";
+  version = "0.3.4";
+  src = fetchFromGitHub {
+    owner = "swh";
+    repo = "timemachine";
+    rev = "v${version}";
+    sha256 = "16fgyw6jnscx9279dczv72092dddghwlp53rkfw469kcgvjhwx0z";
+  };
+
+  nativeBuildInputs = [ pkg-config ];
+    buildInputs = [ autoconf automake gtk2 libjack2
+      libsndfile
+    ];
+
+  preConfigure = "./autogen.sh";
+
+  NIX_LDFLAGS = "-lm";
+
+  meta = {
+    description = "JACK audio recorder";
+    homepage = "http://plugin.org.uk/timemachine/";
+    license = lib.licenses.lgpl2;
+    platforms = lib.platforms.linux;
+    maintainers = [ lib.maintainers.nico202 ];
+  };
+}
+
diff --git a/pkgs/applications/audio/tonelib-gfx/default.nix b/pkgs/applications/audio/tonelib-gfx/default.nix
new file mode 100644
index 00000000000..108f39925b4
--- /dev/null
+++ b/pkgs/applications/audio/tonelib-gfx/default.nix
@@ -0,0 +1,58 @@
+{ lib
+, stdenv
+, fetchurl
+, autoPatchelfHook
+, dpkg
+, alsa-lib
+, freetype
+, libglvnd
+, curl
+, libXcursor
+, libXinerama
+, libXrandr
+, libXrender
+, libjack2
+}:
+
+stdenv.mkDerivation rec {
+  pname = "tonelib-gfx";
+  version = "4.7.0";
+
+  src = fetchurl {
+    url = "https://www.tonelib.net/download/0930/ToneLib-GFX-amd64.deb";
+    hash = "sha256-BcbX0dz94B4mj6QeQsnuZmwXAaXH+yJjnrUPgEYVqkU=";
+  };
+
+  nativeBuildInputs = [ autoPatchelfHook dpkg ];
+
+  buildInputs = [
+    stdenv.cc.cc.lib
+    alsa-lib
+    freetype
+    libglvnd
+  ] ++ runtimeDependencies;
+
+  runtimeDependencies = map lib.getLib [
+    curl
+    libXcursor
+    libXinerama
+    libXrandr
+    libXrender
+    libjack2
+  ];
+
+  unpackCmd = "dpkg -x $curSrc source";
+
+  installPhase = ''
+    mv usr $out
+    substituteInPlace $out/share/applications/ToneLib-GFX.desktop --replace /usr/ $out/
+ '';
+
+  meta = with lib; {
+    description = "Tonelib GFX is an amp and effects modeling software for electric guitar and bass.";
+    homepage = "https://tonelib.net/";
+    license = licenses.unfree;
+    maintainers = with maintainers; [ dan4ik605743 orivej ];
+    platforms = [ "x86_64-linux" ];
+  };
+}
diff --git a/pkgs/applications/audio/tonelib-jam/default.nix b/pkgs/applications/audio/tonelib-jam/default.nix
new file mode 100644
index 00000000000..1c0d51ed88b
--- /dev/null
+++ b/pkgs/applications/audio/tonelib-jam/default.nix
@@ -0,0 +1,61 @@
+{ lib
+, stdenv
+, fetchurl
+, autoPatchelfHook
+, dpkg
+, alsa-lib
+, freetype
+, libglvnd
+, curl
+, libXcursor
+, libXinerama
+, libXrandr
+, libXrender
+, libjack2
+}:
+
+stdenv.mkDerivation rec {
+  pname = "tonelib-jam";
+  version = "4.7.0";
+
+  src = fetchurl {
+    url = "https://www.tonelib.net/download/0930/ToneLib-Jam-amd64.deb";
+    sha256 = "sha256-xyBDp3DQVC+nK2WGnvrfUfD+9GvwtbldXgExTMmCGw0=";
+  };
+
+  nativeBuildInputs = [
+    autoPatchelfHook
+    dpkg
+  ];
+
+  buildInputs = [
+    stdenv.cc.cc.lib
+    alsa-lib
+    freetype
+    libglvnd
+  ] ++ runtimeDependencies;
+
+  runtimeDependencies = map lib.getLib [
+    curl
+    libXcursor
+    libXinerama
+    libXrandr
+    libXrender
+    libjack2
+  ];
+
+  unpackCmd = "dpkg -x $curSrc source";
+
+  installPhase = ''
+    mv usr $out
+    substituteInPlace $out/share/applications/ToneLib-Jam.desktop --replace /usr/ $out/
+  '';
+
+  meta = with lib; {
+    description = "ToneLib Jam – the learning and practice software for guitar players";
+    homepage = "https://tonelib.net/";
+    license = licenses.unfree;
+    maintainers = with maintainers; [ dan4ik605743 ];
+    platforms = [ "x86_64-linux" ];
+  };
+}
diff --git a/pkgs/applications/audio/tonelib-zoom/default.nix b/pkgs/applications/audio/tonelib-zoom/default.nix
new file mode 100644
index 00000000000..41539503e02
--- /dev/null
+++ b/pkgs/applications/audio/tonelib-zoom/default.nix
@@ -0,0 +1,63 @@
+{ lib
+, stdenv
+, fetchurl
+, autoPatchelfHook
+, dpkg
+, alsa-lib
+, freetype
+, libglvnd
+, curl
+, libXcursor
+, libXinerama
+, libXrandr
+, libXrender
+, libjack2
+, webkitgtk
+}:
+
+stdenv.mkDerivation rec {
+  pname = "tonelib-zoom";
+  version = "4.3.1";
+
+  src = fetchurl {
+    url = "https://www.tonelib.net/download/0129/ToneLib-Zoom-amd64.deb";
+    sha256 = "sha256-4q2vM0/q7o/FracnO2xxnr27opqfVQoN7fsqTD9Tr/c=";
+  };
+
+  nativeBuildInputs = [
+    autoPatchelfHook
+    dpkg
+  ];
+
+  buildInputs = [
+    stdenv.cc.cc.lib
+    alsa-lib
+    freetype
+    libglvnd
+    webkitgtk
+  ] ++ runtimeDependencies;
+
+  runtimeDependencies = map lib.getLib [
+    curl
+    libXcursor
+    libXinerama
+    libXrandr
+    libXrender
+    libjack2
+  ];
+
+  unpackCmd = "dpkg -x $curSrc source";
+
+  installPhase = ''
+    mv usr $out
+    substituteInPlace $out/share/applications/ToneLib-Zoom.desktop --replace /usr/ $out/
+  '';
+
+  meta = with lib; {
+    description = "ToneLib Zoom – change and save all the settings in your Zoom(r) guitar pedal";
+    homepage = "https://tonelib.net/";
+    license = licenses.unfree;
+    maintainers = with maintainers; [ dan4ik605743 ];
+    platforms = [ "x86_64-linux" ];
+  };
+}
diff --git a/pkgs/applications/audio/tony/default.nix b/pkgs/applications/audio/tony/default.nix
new file mode 100644
index 00000000000..15c973a46fc
--- /dev/null
+++ b/pkgs/applications/audio/tony/default.nix
@@ -0,0 +1,38 @@
+{ lib, stdenv, fetchurl, pkg-config, wrapQtAppsHook
+, alsa-lib, boost, bzip2, fftw, fftwFloat, libX11, libfishsound, libid3tag
+, libjack2, liblo, libmad, libogg, liboggz, libpulseaudio, libsamplerate
+, libsndfile, lrdf, opusfile, qtbase, qtsvg, rubberband, serd, sord
+}:
+
+stdenv.mkDerivation rec {
+  pname = "tony";
+  version = "2.1.1";
+
+  src = fetchurl {
+    url = "https://code.soundsoftware.ac.uk/attachments/download/2616/${pname}-${version}.tar.gz";
+    sha256 = "03g2bmlj08lmgvh54dyd635xccjn730g4wwlhpvsw04bffz8b7fp";
+  };
+
+  nativeBuildInputs = [ pkg-config wrapQtAppsHook ];
+
+  buildInputs = [
+    alsa-lib boost bzip2 fftw fftwFloat libX11 libfishsound libid3tag
+    libjack2 liblo libmad libogg liboggz libpulseaudio libsamplerate
+    libsndfile lrdf opusfile qtbase qtsvg rubberband serd sord
+  ];
+
+  # comment out the tests
+  preConfigure = ''
+    sed -i 's/sub_test_svcore_/#sub_test_svcore_/' tony.pro
+  '';
+
+  enableParallelBuilding = true;
+
+  meta = with lib; {
+    description = "Pitch and note annotation of unaccompanied melody";
+    homepage = "https://www.sonicvisualiser.org/tony/";
+    license = licenses.gpl2Plus;
+    maintainers = with maintainers; [ orivej ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/pkgs/applications/audio/transcode/default.nix b/pkgs/applications/audio/transcode/default.nix
new file mode 100644
index 00000000000..7a7ec1e4188
--- /dev/null
+++ b/pkgs/applications/audio/transcode/default.nix
@@ -0,0 +1,28 @@
+{ lib, stdenv, fetchurl, flac, lame, zlib, libjpeg, libvorbis, libtheora, libxml2
+, lzo, libdvdread, pkg-config, x264, libmpeg2, xvidcore }:
+
+stdenv.mkDerivation rec {
+  pname = "transcode";
+  version = "1.1.7";
+  src = fetchurl {
+    url = "https://bitbucket.org/france/transcode-tcforge/downloads/${pname}-${version}.tar.bz2";
+    sha256 = "1e4e72d8e0dd62a80b8dd90699f5ca64c9b0cb37a5c9325c184166a9654f0a92";
+  };
+
+  buildInputs = [ flac lame zlib libjpeg libvorbis libtheora libxml2 lzo
+                  libdvdread pkg-config 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 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/pkgs/applications/audio/transcribe/default.nix b/pkgs/applications/audio/transcribe/default.nix
new file mode 100644
index 00000000000..d10a0d87941
--- /dev/null
+++ b/pkgs/applications/audio/transcribe/default.nix
@@ -0,0 +1,101 @@
+{ stdenv
+, fetchzip
+, lib
+, wrapGAppsHook
+, alsa-lib
+, atk
+, cairo
+, fontconfig
+, gdk-pixbuf
+, glib
+, gst_all_1
+, gtk3
+, libSM
+, libX11
+, libXtst
+, libpng12
+, pango
+, zlib
+}:
+
+stdenv.mkDerivation rec {
+  pname = "transcribe";
+  version = "9.10";
+
+  src =
+    if stdenv.hostPlatform.system == "x86_64-linux" then
+      fetchzip
+        {
+          url = "https://www.seventhstring.com/xscribe/downlo/xscsetup-9.10.0.tar.gz";
+          sha256 = "sha256-6+P2qdjyvCzwrXYgw2yeG+hu8W5t6E0RCZx6Znkvj3g=";
+        }
+    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; lib.makeLibraryPath [
+    stdenv.cc.cc
+    glib
+    gtk3
+    atk
+    fontconfig
+    pango
+    cairo
+    gdk-pixbuf
+    alsa-lib
+    libX11
+    libXtst
+    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 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;
+  };
+}
diff --git a/pkgs/applications/audio/traverso/default.nix b/pkgs/applications/audio/traverso/default.nix
new file mode 100644
index 00000000000..698a03b4a71
--- /dev/null
+++ b/pkgs/applications/audio/traverso/default.nix
@@ -0,0 +1,30 @@
+{ mkDerivation, lib, fetchurl, cmake, pkg-config
+, alsa-lib, fftw, flac, lame, libjack2, libmad, libpulseaudio
+, libsamplerate, libsndfile, libvorbis, portaudio, qtbase, wavpack
+}:
+mkDerivation {
+  pname = "traverso";
+  version = "0.49.6";
+
+  src = fetchurl {
+    url = "https://traverso-daw.org/traverso-0.49.6.tar.gz";
+    sha256 = "12f7x8kw4fw1j0xkwjrp54cy4cv1ql0zwz2ba5arclk4pf6bhl7q";
+  };
+
+  nativeBuildInputs = [ cmake pkg-config ];
+  buildInputs = [ alsa-lib 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" ];
+
+  hardeningDisable = [ "format" ];
+
+  meta = with lib; {
+    description = "Cross-platform multitrack audio recording and audio editing suite";
+    homepage = "https://traverso-daw.org/";
+    license = with licenses; [ gpl2Plus lgpl21Plus ];
+    platforms = platforms.all;
+    maintainers = with maintainers; [ coconnor ];
+  };
+}
diff --git a/pkgs/applications/audio/tree-from-tags/Gemfile b/pkgs/applications/audio/tree-from-tags/Gemfile
new file mode 100644
index 00000000000..24f308f3f42
--- /dev/null
+++ b/pkgs/applications/audio/tree-from-tags/Gemfile
@@ -0,0 +1,3 @@
+source "https://rubygems.org"
+
+gem "taglib-ruby"
diff --git a/pkgs/applications/audio/tree-from-tags/Gemfile.lock b/pkgs/applications/audio/tree-from-tags/Gemfile.lock
new file mode 100644
index 00000000000..0ae90c1aebb
--- /dev/null
+++ b/pkgs/applications/audio/tree-from-tags/Gemfile.lock
@@ -0,0 +1,13 @@
+GEM
+  remote: https://rubygems.org/
+  specs:
+    taglib-ruby (0.7.1)
+
+PLATFORMS
+  ruby
+
+DEPENDENCIES
+  taglib-ruby
+
+BUNDLED WITH
+   2.1.4
diff --git a/pkgs/applications/audio/tree-from-tags/default.nix b/pkgs/applications/audio/tree-from-tags/default.nix
new file mode 100644
index 00000000000..4bf4db09ac0
--- /dev/null
+++ b/pkgs/applications/audio/tree-from-tags/default.nix
@@ -0,0 +1,38 @@
+{ lib, stdenv, bundlerEnv, ruby, fetchFromGitHub }:
+let
+  version = "1.1";
+  gems = bundlerEnv {
+    name = "tree-from-tags-${version}-gems";
+    inherit ruby;
+    gemdir  = ./.;
+  };
+in stdenv.mkDerivation {
+  pname = "tree-from-tags";
+  inherit version;
+  src = fetchFromGitHub {
+    owner  = "dbrock";
+    repo   = "bongo";
+    rev    = version;
+    sha256 = "1nszph9mn98flyhn1jq3y6mdh6jymjkvj5ng36ql016dj92apvhv";
+  };
+  buildInputs = [ gems ruby ];
+  installPhase = ''
+    mkdir -p $out/{bin,share}
+    cp tree-from-tags.rb $out/share/
+    bin=$out/bin/tree-from-tags
+# we are using bundle exec to start in the bundled environment
+    cat > $bin <<EOF
+#!/bin/sh -e
+exec ${gems}/bin/bundle exec ${ruby}/bin/ruby "$out"/share/tree-from-tags.rb "\$@"
+EOF
+    chmod +x $bin
+  '';
+
+  meta = with lib; {
+    description = "Create file hierarchies from media tags";
+    homepage = "https://www.emacswiki.org/emacs/Bongo";
+    platforms = ruby.meta.platforms;
+    maintainers = [ maintainers.livnev maintainers.dbrock ];
+    license = licenses.gpl2Plus;
+  };
+}
diff --git a/pkgs/applications/audio/tree-from-tags/gemset.nix b/pkgs/applications/audio/tree-from-tags/gemset.nix
new file mode 100644
index 00000000000..f482d174ebc
--- /dev/null
+++ b/pkgs/applications/audio/tree-from-tags/gemset.nix
@@ -0,0 +1,10 @@
+{
+  taglib-ruby = {
+    source = {
+      remotes = ["https://rubygems.org"];
+      sha256 = "0r8g7zdncc6243d000jn0grc1n70rn9mx16vggy3q7c4wgsa37xi";
+      type = "gem";
+    };
+    version = "0.7.1";
+  };
+}
diff --git a/pkgs/applications/audio/tunefish/default.nix b/pkgs/applications/audio/tunefish/default.nix
new file mode 100644
index 00000000000..df7564abcf0
--- /dev/null
+++ b/pkgs/applications/audio/tunefish/default.nix
@@ -0,0 +1,43 @@
+{ lib, stdenv, fetchFromGitHub, pkg-config, python3
+, alsa-lib, curl, freetype, gtk3, libGL, libX11, libXext, libXinerama, webkitgtk
+}:
+
+stdenv.mkDerivation {
+  pname = "tunefish";
+  version = "unstable-2020-08-13";
+
+  src = fetchFromGitHub {
+    owner = "jpcima";
+    repo = "tunefish";
+    rev = "b3d83cc66201619f6399500f6897fbeb1786d9ed";
+    fetchSubmodules = true;
+    sha256 = "0rjpq3s609fblzkvnc9729glcnfinmxljh0z8ldpzr245h367zxh";
+  };
+
+  nativeBuildInputs = [ pkg-config python3 ];
+  buildInputs = [ alsa-lib curl freetype gtk3 libGL libX11 libXext libXinerama webkitgtk ];
+
+  postPatch = ''
+    patchShebangs src/tunefish4/generate-lv2-ttl.py
+  '';
+
+  makeFlags = [
+    "-C" "src/tunefish4/Builds/LinuxMakefile"
+    "CONFIG=Release"
+  ];
+
+  installPhase = ''
+    mkdir -p $out/lib/lv2
+    cp -r src/tunefish4/Builds/LinuxMakefile/build/Tunefish4.lv2 $out/lib/lv2
+  '';
+
+  enableParallelBuilding = true;
+
+  meta = with lib; {
+    homepage = "https://tunefish-synth.com/";
+    description = "Virtual analog synthesizer LV2 plugin";
+    license = licenses.gpl3Plus;
+    maintainers = with maintainers; [ orivej ];
+    platforms = [ "x86_64-linux" ];
+  };
+}
diff --git a/pkgs/applications/audio/uade123/default.nix b/pkgs/applications/audio/uade123/default.nix
new file mode 100644
index 00000000000..8191fd381a4
--- /dev/null
+++ b/pkgs/applications/audio/uade123/default.nix
@@ -0,0 +1,74 @@
+{ lib
+, stdenv
+, fetchFromGitLab
+, pkg-config
+, which
+, makeWrapper
+, libao
+, libbencodetools
+, sox
+, lame
+, flac
+, vorbis-tools
+}:
+
+stdenv.mkDerivation {
+  pname = "uade123";
+  version = "unstable-2021-05-21";
+
+  src = fetchFromGitLab {
+    owner = "uade-music-player";
+    repo = "uade";
+    rev = "7169a46e777d19957cd7ff8ac31843203e725ddc";
+    sha256 = "1dm7c924fy79y3wkb0qi71m1k6yw1x6j3whw7d0w4ka9hv6za03b";
+  };
+
+  postPatch = ''
+    patchShebangs .
+    substituteInPlace src/frontends/mod2ogg/mod2ogg2.sh.in \
+      --replace '-e stat' '-n stat' \
+      --replace '/usr/local' "$out"
+  '';
+
+  nativeBuildInputs = [
+    pkg-config
+    which
+    makeWrapper
+  ];
+
+  buildInputs = [
+    libao
+    libbencodetools
+    sox
+    lame
+    flac
+    vorbis-tools
+  ];
+
+  configureFlags = [
+    "--bencode-tools-prefix=${libbencodetools}"
+  ];
+
+  enableParallelBuilding = true;
+
+  hardeningDisable = [ "format" ];
+
+  postInstall = ''
+    wrapProgram $out/bin/mod2ogg2.sh \
+      --prefix PATH : $out/bin:${lib.makeBinPath [ sox lame flac vorbis-tools ]}
+    # This is an old script, don't break expectations by renaming it
+    ln -s $out/bin/mod2ogg2{.sh,}
+  '';
+
+  meta = with lib; {
+    description = "Plays old Amiga tunes through UAE emulation and cloned m68k-assembler Eagleplayer API";
+    homepage = "https://zakalwe.fi/uade/";
+    # It's a mix of licenses. "GPL", Public Domain, "LGPL", GPL2+, BSD, LGPL21+ and source code with unknown licenses. E.g.
+    # - hippel-coso player is "[not] under any Open Source certified license"
+    # - infogrames player is disassembled from Andi Silvas player, unknown license
+    # Let's make it easy and flag the whole package as unfree.
+    license = licenses.unfree;
+    maintainers = with maintainers; [ OPNA2608 ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/pkgs/applications/audio/uhhyou.lv2/default.nix b/pkgs/applications/audio/uhhyou.lv2/default.nix
new file mode 100644
index 00000000000..eb590c22bbf
--- /dev/null
+++ b/pkgs/applications/audio/uhhyou.lv2/default.nix
@@ -0,0 +1,67 @@
+{ lib, stdenv
+, fetchFromGitHub
+, pkg-config
+, python3
+, fftw
+, libGL
+, libX11
+, libjack2
+, liblo
+, lv2
+}:
+
+stdenv.mkDerivation rec {
+  # this is what upstream calls the package, see:
+  # https://github.com/ryukau/LV2Plugins#uhhyou-plugins-lv2
+  pname = "uhhyou.lv2";
+  version = "unstable-2021-02-08";
+
+  src = fetchFromGitHub {
+    owner = "ryukau";
+    repo =  "LV2Plugins";
+    rev = "df67460fc344f94db4306d4ee21e4207e657bbee";
+    fetchSubmodules = true;
+    sha256 = "1a23av35cw26zgq93yzmmw35084hsj29cb7sb04j2silv5qisila";
+  };
+
+  nativeBuildInputs = [ pkg-config python3 ];
+
+  buildInputs = [ fftw libGL libX11 libjack2 liblo lv2 ];
+
+  makeFlags = [ "PREFIX=$(out)" ];
+
+  prePatch = ''
+    patchShebangs generate-ttl.sh patch.sh patch/apply.sh
+  '';
+
+  enableParallelBuilding = true;
+
+  meta = with lib; {
+    description = "Audio plugins for Linux";
+    longDescription = ''
+      Plugin List:
+      - CollidingCombSynth
+      - CubicPadSynth
+      - EnvelopedSine
+      - EsPhaser
+      - FDNCymbal
+      - FoldShaper
+      - IterativeSinCluster
+      - L3Reverb
+      - L4Reverb
+      - LatticeReverb
+      - LightPadSynth
+      - ModuloShaper
+      - OddPowShaper
+      - SevenDelay
+      - SoftClipper
+      - SyncSawSynth
+      - TrapezoidSynth
+      - WaveCymbal
+    '';
+    homepage = "https://github.com/ryukau/LV2Plugins/";
+    license = licenses.gpl3Plus;
+    platforms = platforms.linux;
+    maintainers = [ maintainers.magnetophon ];
+  };
+}
diff --git a/pkgs/applications/audio/vcv-rack/default.nix b/pkgs/applications/audio/vcv-rack/default.nix
new file mode 100644
index 00000000000..789b97507a1
--- /dev/null
+++ b/pkgs/applications/audio/vcv-rack/default.nix
@@ -0,0 +1,101 @@
+{ lib, stdenv, makeWrapper, fetchzip, fetchFromGitHub, pkg-config
+, alsa-lib, curl, glew, glfw, gtk2-x11, jansson, libjack2, libXext, libXi
+, libzip, rtaudio, rtmidi, speex, libsamplerate }:
+
+let
+  # The package repo vendors some of the package dependencies as submodules.
+  # Others are downloaded with `make deps`. Due to previous issues with the
+  # `glfw` submodule (see above) and because we can not access the network when
+  # building in a sandbox, we fetch the dependency source manually.
+  pfft-source = fetchzip {
+    url = "https://vcvrack.com/downloads/dep/pffft.zip";
+    sha256 = "084csgqa6f1a270bhybjayrh3mpyi2jimc87qkdgsqcp8ycsx1l1";
+  };
+  nanovg-source = fetchFromGitHub {
+    owner = "memononen";
+    repo = "nanovg";
+    rev = "1f9c8864fc556a1be4d4bf1d6bfe20cde25734b4";
+    sha256 = "08r15zrr6p1kxigxzxrg5rgya7wwbdx7d078r362qbkmws83wk27";
+  };
+  nanosvg-source = fetchFromGitHub {
+    owner = "memononen";
+    repo = "nanosvg";
+    rev = "25241c5a8f8451d41ab1b02ab2d865b01600d949";
+    sha256 = "114qgfmazsdl53rm4pgqif3gv8msdmfwi91lyc2jfadgzfd83xkg";
+  };
+  osdialog-source = fetchFromGitHub {
+    owner = "AndrewBelt";
+    repo = "osdialog";
+    rev = "e5db5de6444f4b2c4e1390c67b3efd718080c3da";
+    sha256 = "0iqxn1md053nl19hbjk8rqsdcmjwa5l5z0ci4fara77q43rc323i";
+  };
+  oui-blendish-source = fetchFromGitHub {
+    owner = "AndrewBelt";
+    repo = "oui-blendish";
+    rev = "79ec59e6bc7201017fc13a20c6e33380adca1660";
+    sha256 = "17kd0lh2x3x12bxkyhq6z8sg6vxln8m9qirf0basvcsmylr6rb64";
+  };
+in
+with lib; stdenv.mkDerivation rec {
+  pname = "VCV-Rack";
+  version = "1.1.6";
+
+  src = fetchFromGitHub {
+    owner = "VCVRack";
+    repo = "Rack";
+    rev = "v${version}";
+    sha256 = "0ji64prr74qzxf5bx1sw022kbslx9nzll16lmk5in78hbl137b3i";
+  };
+
+  patches = [
+    ./rack-minimize-vendoring.patch
+  ];
+
+  prePatch = ''
+    # As we can't use `make dep` to set up the dependencies (as explained
+    # above), we do it here manually
+    mkdir -p dep/include
+
+    cp -r ${pfft-source} dep/jpommier-pffft-source
+    cp -r ${nanovg-source}/* dep/nanovg
+    cp -r ${nanosvg-source}/* dep/nanosvg
+    cp -r ${osdialog-source}/* dep/osdialog
+    cp -r ${oui-blendish-source}/* dep/oui-blendish
+
+    cp dep/jpommier-pffft-source/*.h dep/include
+    cp dep/nanosvg/**/*.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" ""
+  '';
+
+  enableParallelBuilding = true;
+
+  nativeBuildInputs = [ makeWrapper pkg-config ];
+  buildInputs = [ alsa-lib curl glew glfw gtk2-x11 jansson libjack2 libsamplerate libzip rtaudio rtmidi speex ];
+
+  buildFlags = [ "Rack" ];
+
+  installPhase = ''
+    install -D -m755 -t $out/bin Rack
+
+    mkdir -p $out/share/vcv-rack
+    cp -r res Core.json template.vcv LICENSE* cacert.pem $out/share/vcv-rack
+
+    # Override the default global resource file directory
+    wrapProgram $out/bin/Rack --add-flags "-s $out/share/vcv-rack"
+  '';
+
+  meta = with lib; {
+    description = "Open-source virtual modular synthesizer";
+    homepage = "https://vcvrack.com/";
+    # The source is BSD-3 licensed, some of the art is CC-BY-NC 4.0 or under a
+    # no-derivatives clause
+    license = with licenses; [ bsd3 cc-by-nc-40 unfreeRedistributable ];
+    maintainers = with maintainers; [ moredread nathyong ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/pkgs/applications/audio/vcv-rack/rack-minimize-vendoring.patch b/pkgs/applications/audio/vcv-rack/rack-minimize-vendoring.patch
new file mode 100644
index 00000000000..d310d57835e
--- /dev/null
+++ b/pkgs/applications/audio/vcv-rack/rack-minimize-vendoring.patch
@@ -0,0 +1,13 @@
+diff -ru a/Makefile b/Makefile
+--- a/Makefile	1970-01-01 01:00:01.000000000 +0100
++++ b/Makefile	1970-01-01 01:00:01.000000000 +0100
+@@ -21,8 +21,8 @@
+ build/dep/osdialog/osdialog_gtk2.c.o: FLAGS += $(shell pkg-config --cflags gtk+-2.0)
+ 
+ 	LDFLAGS += -rdynamic \
+-		dep/lib/libGLEW.a dep/lib/libglfw3.a dep/lib/libjansson.a dep/lib/libcurl.a dep/lib/libssl.a dep/lib/libcrypto.a dep/lib/libzip.a dep/lib/libz.a dep/lib/libspeexdsp.a dep/lib/libsamplerate.a dep/lib/librtmidi.a dep/lib/librtaudio.a \
++		-lGLEW -lglfw -ljansson -lcurl -lssl -lcrypto -lzip -lz -lspeexdsp -lsamplerate -lrtmidi -lrtaudio \
+		-lpthread -lGL -ldl -lX11 -lasound -ljack \
+ 		$(shell pkg-config --libs gtk+-2.0)
+ 	TARGET := Rack
+ endif
diff --git a/pkgs/applications/audio/vgmstream/default.nix b/pkgs/applications/audio/vgmstream/default.nix
new file mode 100644
index 00000000000..f696c506186
--- /dev/null
+++ b/pkgs/applications/audio/vgmstream/default.nix
@@ -0,0 +1,42 @@
+{ stdenv, lib, fetchFromGitHub, cmake, pkg-config
+, mpg123, ffmpeg, libvorbis, libao, jansson, speex
+}:
+let
+  vgmstreamVersion = "r1702-5596-00bdb165b";
+in
+stdenv.mkDerivation rec {
+  pname = "vgmstream";
+  version = "unstable-2022-02-21";
+
+  src = fetchFromGitHub {
+    owner = "vgmstream";
+    repo = "vgmstream";
+    rev = "00bdb165ba6b55420bbd5b21f54c4f7a825d15a0";
+    sha256 = "18g1yqlnf48hi2xn2z2wajnjljpdbfdqmcmi7y8hi1r964ypmfcr";
+  };
+
+  passthru.updateScript = ./update.sh;
+
+  nativeBuildInputs = [ cmake pkg-config ];
+
+  buildInputs = [ mpg123 ffmpeg libvorbis libao jansson speex ];
+
+  cmakeFlags = [
+    # There's no nice way to build the audacious plugin without a circular dependency
+    "-DBUILD_AUDACIOUS=OFF"
+    # It always tries to download it, no option to use the system one
+    "-DUSE_CELT=OFF"
+  ];
+
+  postConfigure = ''
+    echo "#define VGMSTREAM_VERSION \"${vgmstreamVersion}\"" > ../version.h
+  '';
+
+  meta = with lib; {
+    description = "A library for playback of various streamed audio formats used in video games";
+    homepage    = "https://vgmstream.org";
+    maintainers = with maintainers; [ zane ];
+    license     = with licenses; isc;
+    platforms   = with platforms; unix;
+  };
+}
diff --git a/pkgs/applications/audio/vgmstream/update.sh b/pkgs/applications/audio/vgmstream/update.sh
new file mode 100755
index 00000000000..5353480dd33
--- /dev/null
+++ b/pkgs/applications/audio/vgmstream/update.sh
@@ -0,0 +1,77 @@
+#!/usr/bin/env nix-shell
+#!nix-shell -i bash --pure --keep GITHUB_TOKEN -p gnused jq nix-prefetch-git curl cacert
+
+set -euo pipefail
+
+ROOT="$(dirname "$(readlink -f "$0")")"
+if [[ ! "$(basename $ROOT)" == "vgmstream" || ! -f "$ROOT/default.nix" ]]; then
+    echo "ERROR: Not in the vgmstream folder"
+    exit 1
+fi
+
+if [[ ! -v GITHUB_TOKEN ]]; then
+    echo "ERROR: \$GITHUB_TOKEN not set"
+    exit 1
+fi
+
+
+payload=$(jq -cn --rawfile query /dev/stdin '{"query": $query}' <<EOF | curl -s -H "Authorization: bearer $GITHUB_TOKEN" -d '@-' https://api.github.com/graphql
+{
+  repository(owner: "vgmstream", name: "vgmstream") {
+    branch: ref(qualifiedName: "refs/heads/master") {
+      target {
+        oid
+        ... on Commit {
+          committedDate
+          history {
+            totalCount
+          }
+        }
+      }
+    }
+
+    tag: refs(refPrefix: "refs/tags/", first: 1, orderBy: {field: TAG_COMMIT_DATE, direction: DESC}) {
+      nodes {
+        name
+      }
+    }
+  }
+}
+EOF
+)
+
+committed_full_date=$(jq -r .data.repository.branch.target.committedDate <<< "$payload")
+committed_date=$(sed -nE 's/^([0-9]{4}-[0-9]{2}-[0-9]{2}).+$/\1/p' <<< $committed_full_date)
+commit_unix=$(date --utc --date="$committed_date" +%s)
+last_updated_unix=$(date --utc --date=$(sed -nE 's/^\s*version\s*=\s*\"unstable-([0-9]{4}-[0-9]{2}-[0-9]{2})\";$/\1/p' default.nix) +%s)
+
+commit_sha=$(jq -r .data.repository.branch.target.oid <<< "$payload")
+major_ver=$(jq -r .data.repository.tag.nodes[0].name <<< "$payload" | sed 's/^v//g')
+commit_count=$(jq -r .data.repository.branch.target.history.totalCount <<< "$payload")
+final_ver="$major_ver-$commit_count-${commit_sha::9}"
+
+
+echo "INFO: Latest commit is $commit_sha"
+echo "INFO: Latest commit date is $committed_full_date"
+echo "INFO: Latest version is $final_ver"
+
+##
+# VGMStream has no stable releases, so only update if there's been at
+# least a week between commits to reduce maintainer pressure.
+##
+time_diff=$(( $commit_unix - $last_updated_unix ))
+if [[ $time_diff -lt 604800 ]]; then
+  echo "INFO: Not updating, less than a week between commits."
+  echo "INFO: $time_diff < 604800"
+  exit 0
+fi
+
+nix_sha256=$(nix-prefetch-git --quiet https://github.com/vgmstream/vgmstream.git "$commit_sha" | jq -r .sha256)
+echo "INFO: SHA256 is $nix_sha256"
+
+sed -i -E \
+    -e "s/vgmstreamVersion\s*=\s*\"[a-z0-9-]+\";$/vgmstreamVersion = \"${final_ver}\";/g" \
+    -e "s/version\s*=\s*\"[a-z0-9-]+\";$/version = \"unstable-${committed_date}\";/g" \
+    -e "s/rev\s*=\s*\"[a-z0-9]+\";$/rev = \"${commit_sha}\";/g" \
+    -e "s/sha256\s*=\s*\"[a-z0-9]+\";$/sha256 = \"${nix_sha256}\";/g" \
+    "$ROOT/default.nix"
diff --git a/pkgs/applications/audio/vimpc/default.nix b/pkgs/applications/audio/vimpc/default.nix
new file mode 100644
index 00000000000..5cc3c109999
--- /dev/null
+++ b/pkgs/applications/audio/vimpc/default.nix
@@ -0,0 +1,50 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, fetchpatch
+, autoreconfHook
+, libmpdclient
+, ncurses
+, pcre
+, pkg-config
+, taglib
+, curl
+}:
+
+stdenv.mkDerivation rec {
+  version = "0.09.2";
+  pname = "vimpc";
+
+  src = fetchFromGitHub {
+    owner = "boysetsfrog";
+    repo = "vimpc";
+    rev = "v${version}";
+    sha256 = "0lswzkap2nm7v5h7ppb6a64cb35rajysd09nb204rxgrkij4m6nx";
+  };
+
+  patches = [
+    # Pull fix pending upstream inclusion for ncurses-6.3:
+    #  https://github.com/boysetsfrog/vimpc/pull/100
+    (fetchpatch {
+      name = "ncurses-6.3.patch";
+      url = "https://github.com/boysetsfrog/vimpc/commit/055ecdce0720fdfc9ec2528c520b6c33da36271b.patch";
+      sha256 = "01p858jjxm0bf8hnk1z8h45j8c1y9i995mafa6ff3vg9vlak61pv";
+    })
+  ];
+
+  nativeBuildInputs = [ autoreconfHook pkg-config ];
+  buildInputs = [ libmpdclient ncurses pcre taglib curl ];
+
+  postInstall = ''
+    mkdir -p $out/etc
+    cp doc/vimpcrc.example $out/etc
+  '';
+
+  meta = with 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/pkgs/applications/audio/virtual-ans/default.nix b/pkgs/applications/audio/virtual-ans/default.nix
new file mode 100644
index 00000000000..c1e41e41284
--- /dev/null
+++ b/pkgs/applications/audio/virtual-ans/default.nix
@@ -0,0 +1,89 @@
+{ lib, stdenv
+, fetchzip
+, libX11
+, libXi
+, libGL
+, alsa-lib
+, SDL2
+, autoPatchelfHook
+}:
+
+stdenv.mkDerivation rec {
+  pname = "virtual-ans";
+  version = "3.0.2c";
+
+  src = fetchzip {
+    url = "https://warmplace.ru/soft/ans/virtual_ans-${version}.zip";
+    sha256 = "03r1v3l7rd59dakr7ndvgsqchv00ppkvi6sslgf1ng07r3rsvb1n";
+  };
+
+  nativeBuildInputs = [
+    autoPatchelfHook
+  ];
+
+  buildInputs = [
+    stdenv.cc.cc.lib
+    libX11
+    libXi
+    libGL
+    alsa-lib
+    SDL2
+  ];
+
+  installPhase = ''
+    mkdir -p $out
+    cp -R ./* $out/
+
+    # Remove all executables except for current architecture
+    ls -1d $out/START*              | grep -v ${startScript}     | xargs rm -rf
+    ls -1d $out/bin/pixilang_linux* | grep -v ${linuxExecutable} | xargs rm -rf
+
+    # Start script performs relative search for resources, so it cannot be moved
+    # to bin directory
+    ln -s $out/${startScript} $out/bin/virtual-ans
+  '';
+
+  startScript = if stdenv.isx86_32 then "START_LINUX_X86"
+    else        if stdenv.isx86_64 then "START_LINUX_X86_64"
+    #else        if stdenv.isDarwin then "START_MACOS.app" # disabled because I cannot test on Darwin
+    else abort "Unsupported platform: ${stdenv.hostPlatform.linuxArch}.";
+
+  linuxExecutable = if stdenv.isx86_32 then "pixilang_linux_x86"
+    else            if stdenv.isx86_64 then "pixilang_linux_x86_64"
+    else                                    "";
+
+  meta = with lib; {
+    description = "Photoelectronic microtonal/spectral musical instrument";
+    longDescription = ''
+      Virtual ANS is a software simulator of the unique Russian synthesizer ANS
+      - photoelectronic musical instrument created by Evgeny Murzin from 1938 to
+      1958. The ANS made it possible to draw music in the form of a spectrogram
+      (sonogram), without live instruments and performers. It was used by
+      Stanislav Kreichi, Alfred Schnittke, Edward Artemiev and other Soviet
+      composers in their experimental works. You can also hear the sound of the
+      ANS in Andrei Tarkovsky's movies Solaris, The Mirror, Stalker.
+
+      The simulator extends the capabilities of the original instrument. Now
+      it's a full-featured graphics editor where you can convert sound into an
+      image, load and play pictures, draw microtonal/spectral music and create
+      some unusual deep atmospheric sounds. This app is for everyone who loves
+      experiments and is looking for something new.
+
+      Key features:
+
+      + unlimited number of pure tone generators;
+      + powerful sonogram editor - you can draw the spectrum and play it at the same time;
+      + any sound (from a WAV file or a Microphone/Line-in) can be converted to image (sonogram) and vice versa;
+      + support for MIDI devices;
+      + polyphonic synth mode with MIDI mapping;
+      + supported file formats: WAV, AIFF, PNG, JPEG, GIF;
+      + supported sound systems: ASIO, DirectSound, MME, ALSA, OSS, JACK, Audiobus, IAA.
+      '';
+    homepage = "https://warmplace.ru/soft/ans/";
+    license = licenses.free;
+    # I cannot test the Darwin version, so I'll leave it disabled
+    platforms = [ "x86_64-linux" "i686-linux" ];
+    maintainers = with maintainers; [ jacg ];
+  };
+
+}
diff --git a/pkgs/applications/audio/vkeybd/default.nix b/pkgs/applications/audio/vkeybd/default.nix
new file mode 100644
index 00000000000..ec639156217
--- /dev/null
+++ b/pkgs/applications/audio/vkeybd/default.nix
@@ -0,0 +1,33 @@
+{ lib, stdenv, fetchurl, alsa-lib, libX11, makeWrapper, tcl, tk }:
+
+stdenv.mkDerivation  rec {
+  pname = "vkeybd";
+  version = "0.1.18d";
+
+  src = fetchurl {
+    url = "ftp://ftp.suse.com/pub/people/tiwai/vkeybd/${pname}-${version}.tar.bz2";
+    sha256 = "0107b5j1gf7dwp7qb4w2snj4bqiyps53d66qzl2rwj4jfpakws5a";
+  };
+
+  nativeBuildInputs = [ makeWrapper ];
+  buildInputs = [ alsa-lib libX11 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 lib; {
+    description = "Virtual MIDI keyboard";
+    homepage = "https://www.alsa-project.org/~tiwai/alsa.html";
+    license = licenses.gpl2Plus;
+    platforms = platforms.linux;
+    maintainers = [ maintainers.goibhniu ];
+  };
+}
diff --git a/pkgs/applications/audio/vmpk/default.nix b/pkgs/applications/audio/vmpk/default.nix
new file mode 100644
index 00000000000..ff9b6c679aa
--- /dev/null
+++ b/pkgs/applications/audio/vmpk/default.nix
@@ -0,0 +1,31 @@
+{ mkDerivation, lib, fetchurl, cmake, pkg-config
+, qttools, qtx11extras, drumstick
+, docbook-xsl-nons
+}:
+
+mkDerivation rec {
+  pname = "vmpk";
+  version = "0.8.6";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/${pname}/${version}/${pname}-${version}.tar.bz2";
+    sha256 = "sha256-cwfJJVeUokyZI1iGvqBvXjcBR36VGodzrUx5Atv3POM=";
+  };
+
+  nativeBuildInputs = [ cmake pkg-config qttools docbook-xsl-nons ];
+
+  buildInputs = [ drumstick qtx11extras ];
+
+  postInstall = ''
+    # vmpk drumstickLocales looks here:
+    ln -s ${drumstick}/share/drumstick $out/share/
+  '';
+
+  meta = with lib; {
+    description = "Virtual MIDI Piano Keyboard";
+    homepage = "http://vmpk.sourceforge.net/";
+    license = licenses.gpl3Plus;
+    maintainers = with maintainers; [ orivej ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/pkgs/applications/audio/vocal/default.nix b/pkgs/applications/audio/vocal/default.nix
new file mode 100644
index 00000000000..0c80dda703e
--- /dev/null
+++ b/pkgs/applications/audio/vocal/default.nix
@@ -0,0 +1,99 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, fetchpatch
+, nix-update-script
+, cmake
+, ninja
+, vala
+, pkg-config
+, pantheon
+, gtk3
+, glib
+, glib-networking
+, libxml2
+, webkitgtk
+, clutter-gtk
+, clutter-gst
+, libunity
+, libnotify
+, sqlite
+, gst_all_1
+, json-glib
+, libgee
+, wrapGAppsHook
+}:
+
+stdenv.mkDerivation rec {
+  pname = "vocal";
+  version = "2.4.2";
+
+  src = fetchFromGitHub {
+    owner = "needle-and-thread";
+    repo = pname;
+    rev = version;
+    sha256 = "1c4n89rdl9r13kmmh2qymmy9sa6shjwai7df48k2kfn0pnzq5mad";
+  };
+
+  nativeBuildInputs = [
+    cmake
+    libxml2
+    ninja
+    vala
+    pkg-config
+    wrapGAppsHook
+  ];
+
+  buildInputs = with gst_all_1; [
+    clutter-gst
+    clutter-gtk
+    glib
+    gst-plugins-base
+    gst-plugins-good
+    gstreamer
+    gtk3
+    json-glib
+    libgee
+    libnotify
+    libunity
+    pantheon.granite
+    sqlite
+    webkitgtk
+    glib-networking
+  ];
+
+  patches = [
+    # granite 6.0.0 removed about dialogs
+    # see: https://github.com/needle-and-thread/vocal/issues/483
+    (fetchpatch {
+      name = "remove-about.patch";
+      url = "https://raw.githubusercontent.com/archlinux/svntogit-community/03543ffdb6cd52ce1a8293f3303225b3afac2431/trunk/remove-about.patch";
+      sha256 = "sha256-yGD7BYOTmqs4h+Odh/mB3fI1HM7GDO6F+QaHpRUD5p4=";
+    })
+  ];
+
+  postPatch = ''
+    # Fix build with vala 0.56
+    # https://github.com/needle-and-thread/vocal/pull/503
+    substituteInPlace src/Vocal.vala \
+      --replace "public const OptionEntry[] app_options" "private const OptionEntry[] app_options"
+  '';
+
+  passthru = {
+    updateScript = nix-update-script {
+      attrPath = pname;
+    };
+  };
+
+  meta = with 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; [ ] ++ teams.pantheon.members;
+    platforms = platforms.linux;
+    mainProgram = "com.github.needleandthread.vocal";
+  };
+}
diff --git a/pkgs/applications/audio/vocproc/default.nix b/pkgs/applications/audio/vocproc/default.nix
new file mode 100644
index 00000000000..46957000507
--- /dev/null
+++ b/pkgs/applications/audio/vocproc/default.nix
@@ -0,0 +1,27 @@
+{ lib, stdenv, fetchzip, pkg-config, lvtk, lv2, fftw, lv2-cpp-tools, gtkmm2 }:
+
+stdenv.mkDerivation rec {
+  pname = "vocproc";
+  version = "0.2.1";
+
+  src = fetchzip {
+    url = "https://hyperglitch.com/files/vocproc/${pname}-${version}.default.tar.gz";
+    sha256 = "07a1scyz14mg2jdbw6fpv4qg91zsw61qqii64n9qbnny9d5pn8n2";
+  };
+
+  nativeBuildInputs = [ pkg-config ];
+
+  buildInputs = [ lv2 fftw lv2-cpp-tools gtkmm2 ];
+
+  makeFlags = [
+    "INSTALL_DIR=$(out)/lib/lv2"
+  ];
+
+  meta = with lib; {
+    homepage = "https://hyperglitch.com/dev/VocProc";
+    description = "An LV2 plugin for pitch shifting (with or without formant correction), vocoding, automatic pitch correction and harmonizing of singing voice (harmonizer)";
+    license = licenses.gpl2;
+    maintainers = [ maintainers.michalrus ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/pkgs/applications/audio/vorbis-tools/default.nix b/pkgs/applications/audio/vorbis-tools/default.nix
new file mode 100644
index 00000000000..865d82a7356
--- /dev/null
+++ b/pkgs/applications/audio/vorbis-tools/default.nix
@@ -0,0 +1,28 @@
+{ lib, stdenv, fetchurl, libogg, libvorbis, libao, pkg-config, curl
+, speex, flac
+, autoreconfHook }:
+
+stdenv.mkDerivation rec {
+  pname = "vorbis-tools";
+  version = "1.4.2";
+
+  src = fetchurl {
+    url = "http://downloads.xiph.org/releases/vorbis/vorbis-tools-${version}.tar.gz";
+    sha256 = "1c7h4ivgfdyygz2hyh6nfibxlkz8kdk868a576qkkjgj5gn78xyv";
+  };
+
+  nativeBuildInputs = [ autoreconfHook pkg-config ];
+  buildInputs = [ libogg libvorbis libao curl speex flac ];
+
+  meta = with 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/pkgs/applications/audio/waon/default.nix b/pkgs/applications/audio/waon/default.nix
new file mode 100644
index 00000000000..970ab087b2c
--- /dev/null
+++ b/pkgs/applications/audio/waon/default.nix
@@ -0,0 +1,30 @@
+{ lib, stdenv, fetchFromGitHub, fftw, gtk2, libao, libsamplerate
+, libsndfile, ncurses, pkg-config
+}:
+
+stdenv.mkDerivation rec {
+  pname = "waon";
+  version = "0.11";
+
+  src = fetchFromGitHub {
+    owner = "kichiki";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "1xmq8d2rj58xbp4rnyav95y1vnz3r9s9db7xxfa2rd0ilq0ps4y7";
+  };
+
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = [ fftw gtk2 libao libsamplerate libsndfile ncurses ];
+
+  installPhase = ''
+    install -Dt $out/bin waon pv gwaon
+  '';
+
+  meta = with lib; {
+    description = "A Wave-to-Notes transcriber";
+    homepage = "https://kichiki.github.io/WaoN/";
+    license = licenses.gpl2;
+    maintainers = [ maintainers.puckipedia ];
+    platforms = platforms.all;
+  };
+}
diff --git a/pkgs/applications/audio/wavegain/default.nix b/pkgs/applications/audio/wavegain/default.nix
new file mode 100644
index 00000000000..d08df27e04c
--- /dev/null
+++ b/pkgs/applications/audio/wavegain/default.nix
@@ -0,0 +1,37 @@
+{ lib, stdenv, fetchFromGitHub, fetchpatch }:
+
+stdenv.mkDerivation {
+  pname = "wavegain";
+  version = "1.3.1";
+
+  src = fetchFromGitHub {
+    owner = "MestreLion";
+    repo = "wavegain";
+    rev = "c928eaf97aeec5732625491b64c882e08e314fee";
+    sha256 = "0wghqnsbypmr4xcrhb568bfjdnxzzp8qgnws3jslzmzf34dpk5ls";
+  };
+
+  patches = [
+    # Upstream fix for -fno-common toolchains.
+    (fetchpatch {
+      name = "fno-common.patch";
+      url = "https://github.com/MestreLion/wavegain/commit/ee5e0f9a0ce34c0cf2769ea6566685a54b938304.patch";
+      sha256 = "11yi0czdn5h5bsqp23cww6yn9lm60cij8i1pzfwcfhgyf6f8ym1n";
+    })
+  ];
+
+  makeFlags = [ "CC=${stdenv.cc.targetPrefix}cc" ];
+
+  installPhase = ''
+    strip -s wavegain
+    install -vD wavegain "$out/bin/wavegain"
+  '';
+
+  meta = {
+    description = "ReplayGain for wave files";
+    homepage = "https://github.com/MestreLion/wavegain";
+    license = lib.licenses.lgpl21;
+    platforms = lib.platforms.linux;
+    maintainers = [ lib.maintainers.robbinch ];
+  };
+}
diff --git a/pkgs/applications/audio/whipper/default.nix b/pkgs/applications/audio/whipper/default.nix
new file mode 100644
index 00000000000..a7a8f054172
--- /dev/null
+++ b/pkgs/applications/audio/whipper/default.nix
@@ -0,0 +1,81 @@
+{ lib
+, python3
+, fetchFromGitHub
+, fetchpatch
+, libcdio-paranoia
+, cdrdao
+, libsndfile
+, flac
+, sox
+, util-linux
+}:
+
+let
+  bins = [ libcdio-paranoia cdrdao flac sox util-linux ];
+in python3.pkgs.buildPythonApplication rec {
+  pname = "whipper";
+  version = "0.10.0";
+
+  src = fetchFromGitHub {
+    owner = "whipper-team";
+    repo = "whipper";
+    rev = "v${version}";
+    sha256 = "00cq03cy5dyghmibsdsq5sdqv3bzkzhshsng74bpnb5lasxp3ia5";
+  };
+
+  patches = [
+    (fetchpatch {
+      # Use custom YAML subclass to be compatible with ruamel_yaml>=0.17
+      # https://github.com/whipper-team/whipper/pull/543
+      url = "https://github.com/whipper-team/whipper/commit/3ce5964dfe8be1e625c3e3b091360dd0bc34a384.patch";
+      sha256 = "0n9dmib884y8syvypsg88j0h71iy42n1qsrh0am8pwna63sl15ah";
+    })
+  ];
+
+  nativeBuildInputs = with python3.pkgs; [
+    setuptools-scm
+    docutils
+  ];
+
+  propagatedBuildInputs = with python3.pkgs; [
+    musicbrainzngs
+    mutagen
+    pycdio
+    pygobject3
+    ruamel-yaml
+    discid
+    pillow
+  ];
+
+  buildInputs = [ libsndfile ];
+
+  checkInputs = with python3.pkgs; [
+    twisted
+  ] ++ bins;
+
+  makeWrapperArgs = [
+    "--prefix" "PATH" ":" (lib.makeBinPath bins)
+  ];
+
+  preBuild = ''
+    export SETUPTOOLS_SCM_PRETEND_VERSION="${version}"
+  '';
+
+  checkPhase = ''
+    runHook preCheck
+    # disable tests that require internet access
+    # https://github.com/JoeLametta/whipper/issues/291
+    substituteInPlace whipper/test/test_common_accurip.py \
+      --replace "test_AccurateRipResponse" "dont_test_AccurateRipResponse"
+    HOME=$TMPDIR ${python3.interpreter} -m unittest discover
+    runHook postCheck
+  '';
+
+  meta = with lib; {
+    homepage = "https://github.com/whipper-team/whipper";
+    description = "A CD ripper aiming for accuracy over speed";
+    maintainers = with maintainers; [ emily ];
+    license = licenses.gpl3Plus;
+    platforms = platforms.linux;
+  };
+}
diff --git a/pkgs/applications/audio/wolf-shaper/default.nix b/pkgs/applications/audio/wolf-shaper/default.nix
new file mode 100644
index 00000000000..b61ea3fc4d4
--- /dev/null
+++ b/pkgs/applications/audio/wolf-shaper/default.nix
@@ -0,0 +1,47 @@
+{ lib, stdenv, fetchFromGitHub , libjack2, lv2, xorg, liblo, libGL, libXcursor, pkg-config }:
+
+stdenv.mkDerivation rec {
+  pname = "wolf-shaper";
+  version = "0.1.8";
+
+  src = fetchFromGitHub {
+    owner = "pdesaulniers";
+    repo = "wolf-shaper";
+    rev = "v${version}";
+    sha256 = "1j9xmh1nkf45ay1c5dz2g165qvrwlanzcq6mvb3nfxar265drd9q";
+    fetchSubmodules = true;
+  };
+
+  nativeBuildInputs = [ pkg-config ];
+  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 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/pkgs/applications/audio/x42-avldrums/default.nix b/pkgs/applications/audio/x42-avldrums/default.nix
new file mode 100644
index 00000000000..d698ef68da5
--- /dev/null
+++ b/pkgs/applications/audio/x42-avldrums/default.nix
@@ -0,0 +1,31 @@
+{ lib, stdenv, fetchFromGitHub, pkg-config, cairo, glib, libGLU, lv2, pango }:
+
+stdenv.mkDerivation rec {
+  pname = "x42-avldrums";
+  version = "0.4.2";
+
+  src = fetchFromGitHub {
+    owner = "x42";
+    repo = "avldrums.lv2";
+    rev = "v${version}";
+    sha256 = "sha256-L9rLSHHQIM6PqZ397TIxR6O1N9GKAQtDfWCofV5R85E=";
+    fetchSubmodules = true;
+  };
+
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = [ cairo glib libGLU lv2 pango ];
+
+  makeFlags = [
+    "PREFIX=$(out)"
+  ];
+
+  enableParallelBuilding = true;
+
+  meta = with lib; {
+    description = "Drum sample player LV2 plugin dedicated to Glen MacArthur's AVLdrums";
+    homepage = "https://x42-plugins.com/x42/x42-avldrums";
+    maintainers = with maintainers; [ magnetophon orivej ];
+    license = licenses.gpl2Plus;
+    platforms = platforms.linux;
+  };
+}
diff --git a/pkgs/applications/audio/x42-gmsynth/default.nix b/pkgs/applications/audio/x42-gmsynth/default.nix
new file mode 100644
index 00000000000..cde67908fde
--- /dev/null
+++ b/pkgs/applications/audio/x42-gmsynth/default.nix
@@ -0,0 +1,30 @@
+{ lib, stdenv, fetchFromGitHub, pkg-config, glib, lv2 }:
+
+stdenv.mkDerivation rec {
+  pname = "x42-gmsynth";
+  version = "0.4.1";
+
+  src = fetchFromGitHub {
+    owner = "x42";
+    repo = "gmsynth.lv2";
+    rev = "v${version}";
+    sha256 = "08dvdj8r17sfl6l18g2b8abgls2irkbrq5vhrfai01hp2m0rlm34";
+  };
+
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = [ glib lv2 ];
+
+  makeFlags = [
+    "PREFIX=$(out)"
+  ];
+
+  enableParallelBuilding = true;
+
+  meta = with lib; {
+    description = "Chris Colins' General User soundfont player LV2 plugin";
+    homepage = "https://x42-plugins.com/x42/x42-gmsynth";
+    maintainers = with maintainers; [ orivej ];
+    license = licenses.gpl2Plus;
+    platforms = platforms.linux;
+  };
+}
diff --git a/pkgs/applications/audio/x42-plugins/default.nix b/pkgs/applications/audio/x42-plugins/default.nix
new file mode 100644
index 00000000000..0a6ad4bdc4c
--- /dev/null
+++ b/pkgs/applications/audio/x42-plugins/default.nix
@@ -0,0 +1,41 @@
+{ lib, stdenv, fetchurl, pkg-config
+, libltc, libsndfile, libsamplerate, ftgl, freefont_ttf, libjack2
+, libGLU, lv2, gtk2, cairo, pango, fftwFloat, zita-convolver }:
+
+stdenv.mkDerivation rec {
+  version = "20220107";
+  pname = "x42-plugins";
+
+  src = fetchurl {
+    url = "https://gareus.org/misc/x42-plugins/${pname}-${version}.tar.xz";
+    sha256 = "sha256-+lzgkRQHe6moid3h6az/iqt2XL5vbyM0BjSTwMBvd3I=";
+  };
+
+  nativeBuildInputs = [ pkg-config ];
+  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
+    patchShebangs ./matrixmixer.lv2/genttl.sh
+    patchShebangs ./matrixmixer.lv2/genhead.sh
+    sed -i 's|/usr/include/zita-convolver.h|${zita-convolver}/include/zita-convolver.h|g' ./convoLV2/Makefile
+  '';
+
+  meta = with 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/pkgs/applications/audio/xmp/default.nix b/pkgs/applications/audio/xmp/default.nix
new file mode 100644
index 00000000000..5f99555d376
--- /dev/null
+++ b/pkgs/applications/audio/xmp/default.nix
@@ -0,0 +1,21 @@
+{ lib, stdenv, fetchurl, pkg-config, alsa-lib, libxmp }:
+
+stdenv.mkDerivation rec {
+  pname = "xmp";
+  version = "4.1.0";
+
+  meta = with lib; {
+    description = "Extended module player";
+    homepage    = "http://xmp.sourceforge.net/";
+    license     = licenses.gpl2Plus;
+    platforms   = platforms.linux;
+  };
+
+  src = fetchurl {
+    url = "mirror://sourceforge/${pname}/${pname}/${pname}-${version}.tar.gz";
+    sha256 = "17i8fc7x7yn3z1x963xp9iv108gxfakxmdgmpv3mlm438w3n3g8x";
+  };
+
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = [ alsa-lib libxmp ];
+}
diff --git a/pkgs/applications/audio/xsynth-dssi/default.nix b/pkgs/applications/audio/xsynth-dssi/default.nix
new file mode 100644
index 00000000000..0802a79df04
--- /dev/null
+++ b/pkgs/applications/audio/xsynth-dssi/default.nix
@@ -0,0 +1,37 @@
+{ lib, stdenv, fetchurl, alsa-lib, autoconf, automake, dssi, gtk2, libjack2,
+ladspaH, ladspaPlugins, liblo, pkg-config }:
+
+stdenv.mkDerivation  rec {
+  pname = "xsynth-dssi";
+  version = "0.9.4";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/dssi/${pname}-${version}.tar.gz";
+    sha256 = "00nwv2pqjbmxqdc6xdm0cljq6z05lv4y6bibmhz1kih9lm0lklnk";
+  };
+
+  buildInputs = [ alsa-lib autoconf automake dssi gtk2 libjack2 ladspaH
+    ladspaPlugins liblo pkg-config ];
+
+  installPhase = ''
+    mkdir -p $out/bin
+    mkdir -p $out/lib
+    cp src/Xsynth_gtk $out/bin
+    cp src/.libs/* $out/lib
+  '';
+
+  meta = with 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/pkgs/applications/audio/xtuner/default.nix b/pkgs/applications/audio/xtuner/default.nix
new file mode 100644
index 00000000000..c5185217911
--- /dev/null
+++ b/pkgs/applications/audio/xtuner/default.nix
@@ -0,0 +1,39 @@
+{ lib, stdenv
+, fetchFromGitHub
+, pkg-config
+, cairo
+, libX11
+, libjack2
+, liblo
+, libsigcxx
+, zita-resampler
+, fftwFloat
+}:
+
+stdenv.mkDerivation rec {
+  pname = "xtuner";
+  version = "1.0";
+
+  src = fetchFromGitHub {
+    owner = "brummer10";
+    repo = "XTuner";
+    rev = "v${version}";
+    sha256 = "1i5chfnf3hcivwzni9z6cn9pb68qmwsx8bf4z7d29a5vig8kbhrv";
+    fetchSubmodules = true;
+  };
+
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = [ cairo libX11 libjack2 liblo libsigcxx zita-resampler fftwFloat ];
+
+  makeFlags = [ "PREFIX=$(out)" ];
+
+  enableParallelBuilding = true;
+
+  meta = with lib; {
+    homepage = "https://github.com/brummer10/XTuner";
+    description = "Tuner for Jack Audio Connection Kit";
+    license = licenses.gpl2Plus;
+    maintainers = with maintainers; [ magnetophon ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/pkgs/applications/audio/yams/default.nix b/pkgs/applications/audio/yams/default.nix
new file mode 100644
index 00000000000..96c1ab27b72
--- /dev/null
+++ b/pkgs/applications/audio/yams/default.nix
@@ -0,0 +1,29 @@
+{ lib, fetchFromGitHub, python3Packages }:
+
+python3Packages.buildPythonPackage rec {
+  pname = "yams";
+  version = "0.7.3";
+
+  src = fetchFromGitHub {
+    owner = "Berulacks";
+    repo = "yams";
+    rev = version;
+    sha256 = "1zkhcys9i0s6jkaz24an690rvnkv1r84jxpaa84sf46abi59ijh8";
+  };
+
+  propagatedBuildInputs = with python3Packages; [
+    pyyaml
+    psutil
+    mpd2
+    requests
+  ];
+
+  doCheck = false;
+
+  meta = with lib; {
+    homepage = "https://github.com/Berulacks/yams";
+    description = "Last.FM scrobbler for MPD";
+    license = licenses.gpl3Only;
+    maintainers = with maintainers; [ ccellado ];
+  };
+}
diff --git a/pkgs/applications/audio/yasr/10_fix_openpty_forkpty_declarations.patch b/pkgs/applications/audio/yasr/10_fix_openpty_forkpty_declarations.patch
new file mode 100644
index 00000000000..f575af5ecd3
--- /dev/null
+++ b/pkgs/applications/audio/yasr/10_fix_openpty_forkpty_declarations.patch
@@ -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/pkgs/applications/audio/yasr/20_maxpathlen.patch b/pkgs/applications/audio/yasr/20_maxpathlen.patch
new file mode 100644
index 00000000000..386c6cbf22b
--- /dev/null
+++ b/pkgs/applications/audio/yasr/20_maxpathlen.patch
@@ -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/pkgs/applications/audio/yasr/30_conf.patch b/pkgs/applications/audio/yasr/30_conf.patch
new file mode 100644
index 00000000000..98e959f55f3
--- /dev/null
+++ b/pkgs/applications/audio/yasr/30_conf.patch
@@ -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/pkgs/applications/audio/yasr/40_dectalk_extended_chars.patch b/pkgs/applications/audio/yasr/40_dectalk_extended_chars.patch
new file mode 100644
index 00000000000..cc1f0af8606
--- /dev/null
+++ b/pkgs/applications/audio/yasr/40_dectalk_extended_chars.patch
@@ -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/pkgs/applications/audio/yasr/default.nix b/pkgs/applications/audio/yasr/default.nix
new file mode 100644
index 00000000000..21313b9c059
--- /dev/null
+++ b/pkgs/applications/audio/yasr/default.nix
@@ -0,0 +1,28 @@
+{lib, stdenv,fetchurl}:
+
+stdenv.mkDerivation rec {
+  pname = "yasr";
+
+  version = "0.6.9";
+
+  src = fetchurl {
+    url = "https://sourceforge.net/projects/yasr/files/yasr/${version}/${pname}-${version}.tar.gz";
+    sha256 = "1prv9r9y6jb5ga5578ldiw507fa414m60xhlvjl29278p3x7rwa1";
+  };
+
+  patches = [
+    ./10_fix_openpty_forkpty_declarations.patch
+    ./20_maxpathlen.patch
+    ./30_conf.patch
+    ./40_dectalk_extended_chars.patch
+  ]; # 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 = lib.platforms.linux;
+    license = lib.licenses.gpl2;
+    maintainers = with lib.maintainers; [ jhhuh ];
+  };
+}
diff --git a/pkgs/applications/audio/ympd/default.nix b/pkgs/applications/audio/ympd/default.nix
new file mode 100644
index 00000000000..38c05276be4
--- /dev/null
+++ b/pkgs/applications/audio/ympd/default.nix
@@ -0,0 +1,31 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+, pkg-config
+, libmpdclient
+, openssl
+}:
+
+stdenv.mkDerivation rec {
+  pname = "ympd";
+  version = "1.3.0";
+
+  src = fetchFromGitHub {
+    owner = "notandy";
+    repo = "ympd";
+    rev = "v${version}";
+    sha256 = "1nvb19jd556v2h2bi7w4dcl507p3p8xvjkqfzrcsy7ccy3502brq";
+  };
+
+  nativeBuildInputs = [ cmake pkg-config ];
+  buildInputs = [ libmpdclient openssl ];
+
+  meta = with lib; {
+    homepage = "https://www.ympd.org";
+    description = "Standalone MPD Web GUI written in C, utilizing Websockets and Bootstrap/JS";
+    maintainers = [ maintainers.siddharthist ];
+    platforms = platforms.unix;
+    license = licenses.gpl2Plus;
+  };
+}
diff --git a/pkgs/applications/audio/yoshimi/default.nix b/pkgs/applications/audio/yoshimi/default.nix
new file mode 100644
index 00000000000..fe9da33e5ca
--- /dev/null
+++ b/pkgs/applications/audio/yoshimi/default.nix
@@ -0,0 +1,77 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, alsa-lib
+, boost
+, cairo
+, cmake
+, fftwSinglePrec
+, fltk
+, libGLU
+, libjack2
+, libsndfile
+, libXdmcp
+, lv2
+, minixml
+, pcre
+, pkg-config
+, readline
+, xorg
+, zlib
+}:
+
+assert stdenv ? glibc;
+
+stdenv.mkDerivation rec {
+  pname = "yoshimi";
+  version = "2.1.2.2";
+
+  src = fetchFromGitHub {
+    owner = "Yoshimi";
+    repo = pname;
+    rev = version;
+    hash = "sha256-6YsA6tC94yJuuWp5rXXqHzqRy28tvmJzjOR92YwQYO0=";
+  };
+
+  sourceRoot = "source/src";
+
+  postPatch = ''
+    substituteInPlace Misc/Config.cpp --replace /usr $out
+    substituteInPlace Misc/Bank.cpp --replace /usr $out
+  '';
+
+  nativeBuildInputs = [ cmake pkg-config ];
+
+  buildInputs = [
+    alsa-lib
+    boost
+    cairo
+    fftwSinglePrec
+    fltk
+    libGLU
+    libjack2
+    libsndfile
+    libXdmcp
+    lv2
+    minixml
+    pcre
+    readline
+    xorg.libpthreadstubs
+    zlib
+  ];
+
+  cmakeFlags = [ "-DFLTK_MATH_LIBRARY=${stdenv.glibc.out}/lib/libm.so" ];
+
+  meta = with 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 = "https://yoshimi.github.io/";
+    license = licenses.gpl2Plus;
+    platforms = platforms.linux;
+    maintainers = [ maintainers.goibhniu ];
+  };
+}
diff --git a/pkgs/applications/audio/ytmdesktop/default.nix b/pkgs/applications/audio/ytmdesktop/default.nix
new file mode 100644
index 00000000000..be2b85199b7
--- /dev/null
+++ b/pkgs/applications/audio/ytmdesktop/default.nix
@@ -0,0 +1,36 @@
+{ lib, fetchurl, appimageTools, }:
+
+let
+  pname = "ytmdesktop";
+  version = "1.13.0";
+  name = "${pname}-${version}";
+
+  src = fetchurl {
+    url = "https://github.com/ytmdesktop/ytmdesktop/releases/download/v${version}/YouTube-Music-Desktop-App-${version}.AppImage";
+    sha256 = "0f5l7hra3m3q9zd0ngc9dj4mh1lk0rgicvh9idpd27wr808vy28v";
+  };
+
+  appimageContents = appimageTools.extract { inherit name src; };
+in appimageTools.wrapType2 rec {
+  inherit name src;
+
+  extraInstallCommands = ''
+    mv $out/bin/{${name},${pname}}
+
+    install -m 444 \
+        -D ${appimageContents}/youtube-music-desktop-app.desktop \
+        -t $out/share/applications
+    substituteInPlace \
+        $out/share/applications/youtube-music-desktop-app.desktop \
+        --replace 'Exec=AppRun' 'Exec=${pname}'
+    cp -r ${appimageContents}/usr/share/icons $out/share
+  '';
+
+  meta = with lib; {
+    description = "A Desktop App for YouTube Music";
+    homepage = "https://ytmdesktop.app/";
+    license = licenses.cc0;
+    platforms = platforms.linux;
+    maintainers = [ maintainers.lgcl ];
+  };
+}
diff --git a/pkgs/applications/audio/zam-plugins/default.nix b/pkgs/applications/audio/zam-plugins/default.nix
new file mode 100644
index 00000000000..a07bfa60b05
--- /dev/null
+++ b/pkgs/applications/audio/zam-plugins/default.nix
@@ -0,0 +1,35 @@
+{ lib, stdenv, fetchFromGitHub, boost, libX11, libGL, liblo, libjack2, ladspaH, lv2, pkg-config, rubberband, libsndfile, fftwFloat, libsamplerate }:
+
+stdenv.mkDerivation rec {
+  pname = "zam-plugins";
+  version = "3.14";
+
+  src = fetchFromGitHub {
+    owner = "zamaudio";
+    repo = pname;
+    rev = version;
+    sha256 = "sha256-zlANfFuEXQdXlSu4CuXNyChiuV7wkumaOJqgthl6Y9Q=";
+    fetchSubmodules = true;
+  };
+
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = [ boost libX11 libGL liblo libjack2 ladspaH lv2 rubberband libsndfile fftwFloat libsamplerate ];
+
+  postPatch = ''
+    patchShebangs ./dpf/utils/generate-ttl.sh
+  '';
+
+  makeFlags = [
+    "PREFIX=${placeholder "out"}"
+  ];
+
+  enableParallelBuilding = true;
+
+  meta = with 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/pkgs/applications/audio/zita-ajbridge/default.nix b/pkgs/applications/audio/zita-ajbridge/default.nix
new file mode 100644
index 00000000000..873a294540d
--- /dev/null
+++ b/pkgs/applications/audio/zita-ajbridge/default.nix
@@ -0,0 +1,32 @@
+{ lib, stdenv, fetchurl, alsa-lib, libjack2, zita-alsa-pcmi, zita-resampler }:
+
+stdenv.mkDerivation rec {
+  pname = "zita-ajbridge";
+  version = "0.8.4";
+
+  src = fetchurl {
+    url = "https://kokkinizita.linuxaudio.org/linuxaudio/downloads/${pname}-${version}.tar.bz2";
+    sha256 = "0g5v0l0zmqh049mhv62n8s5bpm0yrlby7mkxxhs5qwadp8v4w9mw";
+  };
+
+  buildInputs = [ alsa-lib libjack2 zita-alsa-pcmi zita-resampler ];
+
+  preConfigure = ''
+    cd ./source/
+  '';
+
+  makeFlags = [
+    "PREFIX=$(out)"
+    "MANDIR=$(out)/share/man/man1"
+  ];
+
+  enableParallelBuilding = true;
+
+  meta = with lib; {
+    description = "Connect additional ALSA devices to JACK";
+    homepage = "http://kokkinizita.linuxaudio.org/linuxaudio/index.html";
+    license = licenses.gpl3Plus;
+    maintainers = with maintainers; [ orivej ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/pkgs/applications/audio/zita-at1/default.nix b/pkgs/applications/audio/zita-at1/default.nix
new file mode 100644
index 00000000000..8a629e145c4
--- /dev/null
+++ b/pkgs/applications/audio/zita-at1/default.nix
@@ -0,0 +1,37 @@
+{ lib, stdenv, fetchurl
+, cairo, fftwSinglePrec, libX11, libXft, libclthreads, libclxclient, libjack2
+, xorgproto, zita-resampler
+}:
+
+stdenv.mkDerivation rec {
+  pname = "zita-at1";
+  version = "0.6.2";
+
+  src = fetchurl {
+    url = "https://kokkinizita.linuxaudio.org/linuxaudio/downloads/${pname}-${version}.tar.bz2";
+    sha256 = "0mxfn61zvhlq3r1mqipyqzjbanrfdkk8x4nxbz8nlbdk0bf3vfqr";
+  };
+
+  buildInputs = [
+    cairo fftwSinglePrec libX11 libXft libclthreads libclxclient libjack2
+    xorgproto zita-resampler
+  ];
+
+  preConfigure = ''
+    cd ./source/
+  '';
+
+  makeFlags = [
+    "PREFIX=$(out)"
+  ];
+
+  enableParallelBuilding = true;
+
+  meta = with lib; {
+    description = "Autotuner Jack application to correct the pitch of vocal tracks";
+    homepage = "https://kokkinizita.linuxaudio.org/linuxaudio/index.html";
+    license = licenses.gpl3Plus;
+    maintainers = with maintainers; [ orivej ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/pkgs/applications/audio/zita-njbridge/default.nix b/pkgs/applications/audio/zita-njbridge/default.nix
new file mode 100644
index 00000000000..01a2ddf47b5
--- /dev/null
+++ b/pkgs/applications/audio/zita-njbridge/default.nix
@@ -0,0 +1,32 @@
+{ lib, stdenv, fetchurl, libjack2, zita-resampler }:
+
+stdenv.mkDerivation rec {
+  version = "0.4.8";
+  pname = "zita-njbridge";
+
+  src = fetchurl {
+    url = "https://kokkinizita.linuxaudio.org/linuxaudio/downloads/${pname}-${version}.tar.bz2";
+    sha256 = "sha256-EBF2oL1AfKt7/9Mm6NaIbBtlshK8M/LvuXsD+SbEeQc=";
+  };
+
+  buildInputs = [ libjack2 zita-resampler ];
+
+  preConfigure = ''
+    cd ./source/
+  '';
+
+  makeFlags = [
+    "PREFIX=$(out)"
+    "MANDIR=$(out)"
+    "SUFFIX=''"
+  ];
+
+
+  meta = with 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/pkgs/applications/audio/zrythm/default.nix b/pkgs/applications/audio/zrythm/default.nix
new file mode 100644
index 00000000000..0609438b053
--- /dev/null
+++ b/pkgs/applications/audio/zrythm/default.nix
@@ -0,0 +1,174 @@
+{ stdenv
+, lib
+, fetchFromGitHub
+, SDL2
+, alsa-lib
+, libaudec
+, bash
+, bash-completion
+, breeze-icons
+, carla
+, chromaprint
+, cmake
+, curl
+, dconf
+, libepoxy
+, fftw
+, fftwFloat
+, flex
+, glib
+, gtk4
+, gtksourceview5
+, guile
+, graphviz
+, help2man
+, json-glib
+, jq
+, libbacktrace
+, libcyaml
+, libgtop
+, libjack2
+, libpulseaudio
+, libsamplerate
+, libsndfile
+, libsoundio
+, libxml2
+, libyaml
+, lilv
+, lv2
+, meson
+, ninja
+, pandoc
+, pcre
+, pcre2
+, pkg-config
+, python3
+, reproc
+, rtaudio
+, rtmidi
+, rubberband
+, serd
+, sord
+, sratom
+, texi2html
+, wrapGAppsHook
+, xdg-utils
+, xxHash
+, vamp-plugin-sdk
+, zstd
+, libadwaita
+, sassc
+}:
+
+stdenv.mkDerivation rec {
+  pname = "zrythm";
+  version = "1.0.0-alpha.28.1.3";
+
+  src = fetchFromGitHub {
+    owner = pname;
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "sha256-ERE7I6E3+RmmpnZEtcJL/1v9a37IwFauVsbJvI9gsRQ=";
+  };
+
+  nativeBuildInputs = [
+    help2man
+    jq
+    libaudec
+    libxml2
+    meson
+    ninja
+    pandoc
+    pkg-config
+    python3
+    python3.pkgs.sphinx
+    texi2html
+    wrapGAppsHook
+    cmake
+  ];
+
+  buildInputs = [
+    SDL2
+    alsa-lib
+    bash-completion
+    carla
+    chromaprint
+    curl
+    dconf
+    libepoxy
+    fftw
+    fftwFloat
+    flex
+    breeze-icons
+    glib
+    gtk4
+    gtksourceview5
+    graphviz
+    guile
+    json-glib
+    libbacktrace
+    libcyaml
+    libgtop
+    libjack2
+    libpulseaudio
+    libsamplerate
+    libsndfile
+    libsoundio
+    libyaml
+    lilv
+    lv2
+    pcre
+    pcre2
+    reproc
+    rtaudio
+    rtmidi
+    rubberband
+    serd
+    sord
+    sratom
+    vamp-plugin-sdk
+    xdg-utils
+    xxHash
+    zstd
+    libadwaita
+    sassc
+  ];
+
+  mesonFlags = [
+    "-Drtmidi=enabled"
+    "-Drtaudio=enabled"
+    "-Dsdl=enabled"
+    "-Dcarla=enabled"
+    "-Dmanpage=true"
+    # "-Duser_manual=true" # needs sphinx-intl
+    "-Dlsp_dsp=disabled"
+    "-Db_lto=false"
+    "-Ddebug=true"
+  ];
+
+  NIX_LDFLAGS = ''
+    -lfftw3_threads -lfftw3f_threads
+  '';
+
+  dontStrip = true;
+
+  postPatch = ''
+    chmod +x scripts/meson-post-install.sh
+    patchShebangs ext/sh-manpage-completions/run.sh scripts/generic_guile_wrap.sh \
+      scripts/meson-post-install.sh tools/check_have_unlimited_memlock.sh
+  '';
+
+  preFixup = ''
+    gappsWrapperArgs+=(
+      --prefix GSETTINGS_SCHEMA_DIR : "$out/share/gsettings-schemas/${pname}-${version}/glib-2.0/schemas/"
+             )
+  '';
+
+  meta = with lib; {
+    homepage = "https://www.zrythm.org";
+    description = "Highly automated and intuitive digital audio workstation";
+    maintainers = with maintainers; [ tshaynik magnetophon ];
+    platforms = platforms.linux;
+    license = licenses.agpl3Plus;
+  };
+}
diff --git a/pkgs/applications/audio/zynaddsubfx/default.nix b/pkgs/applications/audio/zynaddsubfx/default.nix
new file mode 100644
index 00000000000..e738a0fbcbe
--- /dev/null
+++ b/pkgs/applications/audio/zynaddsubfx/default.nix
@@ -0,0 +1,130 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, callPackage
+
+  # Required build tools
+, cmake
+, makeWrapper
+, pkg-config
+
+  # Required dependencies
+, fftw
+, liblo
+, minixml
+, zlib
+
+  # Optional dependencies
+, alsaSupport ? true
+, alsa-lib
+, dssiSupport ? false
+, dssi
+, ladspaH
+, jackSupport ? true
+, libjack2
+, lashSupport ? false
+, lash
+, ossSupport ? true
+, portaudioSupport ? true
+, portaudio
+
+  # Optional GUI dependencies
+, guiModule ? "off"
+, cairo
+, fltk13
+, libGL
+, libjpeg
+, libX11
+, libXpm
+, ntk
+
+  # Test dependencies
+, cxxtest
+}:
+
+assert builtins.any (g: guiModule == g) [ "fltk" "ntk" "zest" "off" ];
+
+let
+  guiName = {
+    "fltk" = "FLTK";
+    "ntk" = "NTK";
+    "zest" = "Zyn-Fusion";
+  }.${guiModule};
+  mruby-zest = callPackage ./mruby-zest { };
+in stdenv.mkDerivation rec {
+  pname = "zynaddsubfx";
+  version = "3.0.5";
+
+  src = fetchFromGitHub {
+    owner = pname;
+    repo = pname;
+    rev = version;
+    sha256 = "1vh1gszgjxwn8m32rk5222z1j2cnjax0bqpag7b47v6i36p2q4x8";
+    fetchSubmodules = true;
+  };
+
+  postPatch = ''
+    substituteInPlace src/Misc/Config.cpp --replace /usr $out
+  '';
+
+  nativeBuildInputs = [ cmake makeWrapper pkg-config ];
+
+  buildInputs = [ fftw liblo minixml zlib ]
+    ++ lib.optionals alsaSupport [ alsa-lib ]
+    ++ lib.optionals dssiSupport [ dssi ladspaH ]
+    ++ lib.optionals jackSupport [ libjack2 ]
+    ++ lib.optionals lashSupport [ lash ]
+    ++ lib.optionals portaudioSupport [ portaudio ]
+    ++ lib.optionals (guiModule == "fltk") [ fltk13 libjpeg libXpm ]
+    ++ lib.optionals (guiModule == "ntk") [ ntk cairo libXpm ]
+    ++ lib.optionals (guiModule == "zest") [ libGL libX11 ];
+
+  cmakeFlags = [ "-DGuiModule=${guiModule}" ]
+    # OSS library is included in glibc.
+    # Must explicitly disable if support is not wanted.
+    ++ lib.optional (!ossSupport) "-DOssEnable=OFF"
+    # Find FLTK without requiring an OpenGL library in buildInputs
+    ++ lib.optional (guiModule == "fltk") "-DFLTK_SKIP_OPENGL=ON";
+
+  doCheck = true;
+  checkInputs = [ cxxtest ];
+
+  # TODO: Update cmake hook to make it simpler to selectively disable cmake tests: #113829
+  checkPhase = let
+    # Tests fail on aarch64
+    disabledTests = lib.optionals stdenv.isAarch64 [
+      "MessageTest"
+      "UnisonTest"
+    ];
+  in ''
+    runHook preCheck
+    ctest --output-on-failure -E '^${lib.concatStringsSep "|" disabledTests}$'
+    runHook postCheck
+  '';
+
+  # When building with zest GUI, patch plugins
+  # and standalone executable to properly locate zest
+  postFixup = lib.optionalString (guiModule == "zest") ''
+    patchelf --set-rpath "${mruby-zest}:$(patchelf --print-rpath "$out/lib/lv2/ZynAddSubFX.lv2/ZynAddSubFX_ui.so")" \
+      "$out/lib/lv2/ZynAddSubFX.lv2/ZynAddSubFX_ui.so"
+
+    patchelf --set-rpath "${mruby-zest}:$(patchelf --print-rpath "$out/lib/vst/ZynAddSubFX.so")" \
+      "$out/lib/vst/ZynAddSubFX.so"
+
+    wrapProgram "$out/bin/zynaddsubfx" \
+      --prefix PATH : ${mruby-zest} \
+      --prefix LD_LIBRARY_PATH : ${mruby-zest}
+  '';
+
+  meta = with lib; {
+    description = "High quality software synthesizer (${guiName} GUI)";
+    homepage =
+      if guiModule == "zest"
+      then "https://zynaddsubfx.sourceforge.io/zyn-fusion.html"
+      else "https://zynaddsubfx.sourceforge.io";
+
+    license = licenses.gpl2;
+    maintainers = with maintainers; [ goibhniu kira-bruneau ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/pkgs/applications/audio/zynaddsubfx/mruby-zest/default.nix b/pkgs/applications/audio/zynaddsubfx/mruby-zest/default.nix
new file mode 100644
index 00000000000..9dd5b583817
--- /dev/null
+++ b/pkgs/applications/audio/zynaddsubfx/mruby-zest/default.nix
@@ -0,0 +1,109 @@
+{ lib, stdenv
+, fetchFromGitHub
+, bison
+, git
+, python2
+, rake
+, ruby
+, libGL
+, libuv
+, libX11
+}:
+
+let
+  mgem-list = fetchFromGitHub {
+    owner = "mruby";
+    repo = "mgem-list";
+    rev = "2033837203c8a141b1f9d23bb781fe0cbaefbd24";
+    sha256 = "0igf2nsx5i6g0yf7sjxxkngyriv213d0sjs3yidrflrabiywpxmm";
+  };
+
+  mruby-dir = fetchFromGitHub {
+    owner = "iij";
+    repo = "mruby-dir";
+    rev = "89dceefa1250fb1ae868d4cb52498e9e24293cd1";
+    sha256 = "0zrhiy9wmwmc9ls62iyb2z86j2ijqfn7rn4xfmrbrfxygczarsm9";
+  };
+
+  mruby-errno = fetchFromGitHub {
+    owner = "iij";
+    repo = "mruby-errno";
+    rev = "b4415207ff6ea62360619c89a1cff83259dc4db0";
+    sha256 = "12djcwjjw0fygai5kssxbfs3pzh3cpnq07h9m2h5b51jziw380xj";
+  };
+
+  mruby-file-stat = fetchFromGitHub {
+    owner = "ksss";
+    repo = "mruby-file-stat";
+    rev = "aa474589f065c71d9e39ab8ba976f3bea6f9aac2";
+    sha256 = "1clarmr67z133ivkbwla1a42wcjgj638j9w0mlv5n21mhim9rid5";
+  };
+
+  mruby-process = fetchFromGitHub {
+    owner = "iij";
+    repo = "mruby-process";
+    rev = "fe171fbe2a6cc3c2cf7d713641bddde71024f7c8";
+    sha256 = "00yrzc371f90gl5m1gbkw0qq8c394bpifssjr8p1wh5fmzhxqyml";
+  };
+
+  mruby-pack = fetchFromGitHub {
+    owner = "iij";
+    repo = "mruby-pack";
+    rev = "383a9c79e191d524a9a2b4107cc5043ecbf6190b";
+    sha256 = "003glxgxifk4ixl12sy4gn9bhwvgb79b4wga549ic79isgv81w2d";
+  };
+in
+stdenv.mkDerivation rec {
+  pname = "mruby-zest";
+  version = "3.0.5";
+
+  src = fetchFromGitHub {
+    owner = pname;
+    repo = "${pname}-build";
+    rev = version;
+    sha256 = "0fxljrgamgz2rm85mclixs00b0f2yf109jc369039n1vf0l5m57d";
+    fetchSubmodules = true;
+  };
+
+  nativeBuildInputs = [ bison git python2 rake ruby ];
+  buildInputs = [ libGL libuv libX11 ];
+
+  patches = [
+    ./force-gcc-as-linker.patch
+    ./system-libuv.patch
+  ];
+
+  # Add missing dependencies of deps/mruby-dir-glob/mrbgem.rake
+  # Should be fixed in next release, see bcadb0a5490bd6d599f1a0e66ce09b46363c9dae
+  postPatch = ''
+    mkdir -p mruby/build/mrbgems
+    ln -s ${mgem-list} mruby/build/mrbgems/mgem-list
+    ln -s ${mruby-dir} mruby/build/mrbgems/mruby-dir
+    ln -s ${mruby-errno} mruby/build/mrbgems/mruby-errno
+    ln -s ${mruby-file-stat} mruby/build/mrbgems/mruby-file-stat
+    ln -s ${mruby-process} mruby/build/mrbgems/mruby-process
+    ln -s ${mruby-pack} mruby/build/mrbgems/mruby-pack
+  '';
+
+  installTargets = [ "pack" ];
+
+  postInstall = ''
+    ln -s "$out/zest" "$out/zyn-fusion"
+    cp -a package/{font,libzest.so,schema,zest} "$out"
+
+    # mruby-widget-lib/src/api.c requires MainWindow.qml as part of a
+    # sanity check, even though qml files are compiled into the binary
+    # https://github.com/mruby-zest/mruby-zest-build/tree/3.0.5/src/mruby-widget-lib/src/api.c#L99-L116
+    # https://github.com/mruby-zest/mruby-zest-build/tree/3.0.5/linux-pack.sh#L17-L18
+    mkdir -p "$out/qml"
+    touch "$out/qml/MainWindow.qml"
+  '';
+
+  meta = with lib; {
+    description = "The Zest Framework used in ZynAddSubFX's UI";
+    homepage = "https://github.com/mruby-zest";
+    license = licenses.lgpl21;
+    maintainers = with maintainers; [ kira-bruneau ];
+    platforms = platforms.all;
+  };
+}
diff --git a/pkgs/applications/audio/zynaddsubfx/mruby-zest/force-gcc-as-linker.patch b/pkgs/applications/audio/zynaddsubfx/mruby-zest/force-gcc-as-linker.patch
new file mode 100644
index 00000000000..c521d240774
--- /dev/null
+++ b/pkgs/applications/audio/zynaddsubfx/mruby-zest/force-gcc-as-linker.patch
@@ -0,0 +1,13 @@
+diff --git a/mruby/tasks/toolchains/gcc.rake b/mruby/tasks/toolchains/gcc.rake
+index f370c0ab..e5ab9f60 100644
+--- a/mruby/tasks/toolchains/gcc.rake
++++ b/mruby/tasks/toolchains/gcc.rake
+@@ -22,7 +22,7 @@ MRuby::Toolchain.new(:gcc) do |conf, _params|
+   end
+ 
+   conf.linker do |linker|
+-    linker.command = ENV['LD'] || 'gcc'
++    linker.command = 'gcc'
+     linker.flags = [ENV['LDFLAGS'] || %w()]
+     linker.libraries = %w(m)
+     linker.library_paths = []
diff --git a/pkgs/applications/audio/zynaddsubfx/mruby-zest/system-libuv.patch b/pkgs/applications/audio/zynaddsubfx/mruby-zest/system-libuv.patch
new file mode 100644
index 00000000000..b7050abc123
--- /dev/null
+++ b/pkgs/applications/audio/zynaddsubfx/mruby-zest/system-libuv.patch
@@ -0,0 +1,113 @@
+diff --git a/Makefile b/Makefile
+index f3e3be2..2398852 100644
+--- a/Makefile
++++ b/Makefile
+@@ -1,8 +1,3 @@
+-UV_DIR    = libuv-v1.9.1
+-UV_FILE   = $(UV_DIR).tar.gz
+-UV_URL    = http://dist.libuv.org/dist/v1.9.1/$(UV_FILE)
+-	 
+-
+ all:
+ 	ruby ./rebuild-fcache.rb
+ 	cd deps/nanovg/src   && $(CC) nanovg.c -c -fPIC
+@@ -10,12 +5,12 @@ all:
+ #	cd deps/pugl         && python2 ./waf configure --no-cairo --static
+ 	cd deps/pugl         && python2 ./waf configure --no-cairo --static --debug
+ 	cd deps/pugl         && python2 ./waf
+-	cd src/osc-bridge    && CFLAGS="-I ../../deps/$(UV_DIR)/include " make lib
++	cd src/osc-bridge    && make lib
+ 	cd mruby             && MRUBY_CONFIG=../build_config.rb rake
+ 	$(CC) -shared -o libzest.so `find mruby/build/host -type f | grep -e "\.o$$" | grep -v bin` ./deps/libnanovg.a \
+ 		./deps/libnanovg.a \
+ 		src/osc-bridge/libosc-bridge.a \
+-		./deps/$(UV_DIR)/.libs/libuv.a  -lm -lX11 -lGL -lpthread
++		-luv -lm -lX11 -lGL -lpthread
+ 	$(CC) test-libversion.c deps/pugl/build/libpugl-0.a -ldl -o zest -lX11 -lGL -lpthread -I deps/pugl -std=gnu99
+ 
+ osx:
+@@ -25,12 +20,12 @@ osx:
+ 	cd deps/pugl         && python2 ./waf configure --no-cairo --static
+ #	cd deps/pugl         && python2 ./waf configure --no-cairo --static --debug
+ 	cd deps/pugl         && python2 ./waf
+-	cd src/osc-bridge    && CFLAGS="-I ../../deps/$(UV_DIR)/include " make lib
++	cd src/osc-bridge    && make lib
+ 	cd mruby             && MRUBY_CONFIG=../build_config.rb rake
+ 	$(CC) -shared -o libzest.so `find mruby/build/host -type f | grep -e "\.o$$" | grep -v bin` ./deps/libnanovg.a \
+ 		./deps/libnanovg.a \
+ 		src/osc-bridge/libosc-bridge.a \
+-		./deps/$(UV_DIR)/.libs/libuv.a  -lm -framework OpenGL -lpthread
++		-luv -lm -framework OpenGL -lpthread
+ 	$(CC) test-libversion.c deps/pugl/build/libpugl-0.a -ldl -o zest -framework OpenGL -framework AppKit -lpthread -I deps/pugl -std=gnu99
+ 
+ windows:
+@@ -38,38 +33,14 @@ windows:
+ 	$(AR) rc deps/libnanovg.a deps/nanovg/src/*.o
+ 	cd deps/pugl         && CFLAGS="-mstackrealign" python2 ./waf configure --no-cairo --static --target=win32
+ 	cd deps/pugl         && python2 ./waf
+-	cd src/osc-bridge    && CFLAGS="-mstackrealign -I ../../deps/$(UV_DIR)/include " make lib
++	cd src/osc-bridge    && CFLAGS="-mstackrealign" make lib
+ 	cd mruby             && WINDOWS=1 MRUBY_CONFIG=../build_config.rb rake
+ 	$(CC) -mstackrealign -shared -o libzest.dll -static-libgcc `find mruby/build/w64 -type f | grep -e "\.o$$" | grep -v bin` \
+         ./deps/libnanovg.a \
+         src/osc-bridge/libosc-bridge.a \
+-        ./deps/libuv-win.a \
+-        -lm -lpthread -lws2_32 -lkernel32 -lpsapi -luserenv -liphlpapi -lglu32 -lgdi32 -lopengl32
++        -luv -lm -lpthread -lws2_32 -lkernel32 -lpsapi -luserenv -liphlpapi -lglu32 -lgdi32 -lopengl32
+ 	$(CC) -mstackrealign -DWIN32 test-libversion.c deps/pugl/build/libpugl-0.a -o zest.exe -lpthread -I deps/pugl -std=c99 -lws2_32 -lkernel32 -lpsapi -luserenv -liphlpapi -lglu32 -lgdi32 -lopengl32
+ 
+-
+-builddep: deps/libuv.a
+-deps/libuv.a:
+-	cd deps/$(UV_DIR)    && ./autogen.sh
+-	cd deps/$(UV_DIR)    && CFLAGS=-fPIC ./configure
+-	cd deps/$(UV_DIR)    && CFLAGS=-fPIC make
+-	cp deps/$(UV_DIR)/.libs/libuv.a deps/
+-
+-builddepwin: deps/libuv-win.a
+-deps/libuv-win.a:
+-	cd deps/$(UV_DIR)   && ./autogen.sh
+-	cd deps/$(UV_DIR)   && CFLAGS="-mstackrealign" ./configure  --host=x86_64-w64-mingw32
+-	cd deps/$(UV_DIR)   && LD=x86_64-w64-mingw32-gcc make
+-	cp deps/$(UV_DIR)/.libs/libuv.a deps/libuv-win.a
+-
+-deps/$(UV_DIR):
+-	cd deps              && wget -4 $(UV_URL) && tar xvf $(UV_FILE)
+-setup: deps/$(UV_DIR)
+-
+-setupwin:
+-	cd deps              && wget -4 $(UV_URL)
+-	cd deps              && tar xvf $(UV_FILE)
+-
+ push:
+ 	cd src/osc-bridge      && git push
+ 	cd src/mruby-qml-parse  && git push
+diff --git a/build_config.rb b/build_config.rb
+index 00f1f69..11ac15b 100644
+--- a/build_config.rb
++++ b/build_config.rb
+@@ -96,7 +96,6 @@ build_type.new(build_name) do |conf|
+   conf.cc do |cc|
+       cc.include_paths << "#{`pwd`.strip}/../deps/nanovg/src"
+       cc.include_paths << "#{`pwd`.strip}/../deps/pugl/"
+-      cc.include_paths << "#{`pwd`.strip}/../deps/libuv-v1.9.1/include/"
+       cc.include_paths << "/usr/share/mingw-w64/include/" if windows
+       cc.include_paths << "/usr/x86_64-w64-mingw32/include/" if windows
+       cc.flags << "-DLDBL_EPSILON=1e-6" if windows
+@@ -117,14 +116,14 @@ build_type.new(build_name) do |conf|
+       linker.flags_after_libraries  << "#{`pwd`.strip}/../deps/pugl/build/libpugl-0.a"
+       linker.flags_after_libraries  << "#{`pwd`.strip}/../deps/libnanovg.a"
+       if(!windows)
+-        linker.flags_after_libraries  << "#{`pwd`.strip}/../deps/libuv.a"
++        linker.flags_after_libraries  << "-luv"
+         if(ENV['OS'] != "Mac")
+           linker.libraries << 'GL'
+           linker.libraries << 'X11'
+         end
+         linker.flags_after_libraries  << "-lpthread -ldl -lm"
+       else
+-        linker.flags_after_libraries  << "#{`pwd`.strip}/../deps/libuv-win.a"
++        linker.flags_after_libraries  << "-luv"
+         linker.flags_after_libraries  << "-lws2_32 -lkernel32 -lpsapi -luserenv -liphlpapi"
+         linker.flags_after_libraries  << "-lglu32 -lgdi32 -lopengl32"
+       end