about summary refs log tree commit diff
path: root/nixpkgs/pkgs/misc
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/misc')
-rw-r--r--nixpkgs/pkgs/misc/acpilight/default.nix33
-rw-r--r--nixpkgs/pkgs/misc/apulse/default.nix33
-rw-r--r--nixpkgs/pkgs/misc/apulse/pressureaudio.nix82
-rw-r--r--nixpkgs/pkgs/misc/arm-trusted-firmware/default.nix113
-rw-r--r--nixpkgs/pkgs/misc/autotiling/default.nix23
-rw-r--r--nixpkgs/pkgs/misc/barebox/default.nix96
-rw-r--r--nixpkgs/pkgs/misc/base16-builder/default.nix8
-rwxr-xr-xnixpkgs/pkgs/misc/base16-builder/generate.sh8
-rw-r--r--nixpkgs/pkgs/misc/base16-builder/node-packages-generated.nix1650
-rw-r--r--nixpkgs/pkgs/misc/base16-builder/node-packages.json3
-rw-r--r--nixpkgs/pkgs/misc/base16-builder/node-packages.nix21
-rw-r--r--nixpkgs/pkgs/misc/base16-builder/supplement.json3
-rw-r--r--nixpkgs/pkgs/misc/base16-builder/supplement.nix680
-rw-r--r--nixpkgs/pkgs/misc/base16-shell-preview/default.nix23
-rw-r--r--nixpkgs/pkgs/misc/beep/default.nix25
-rw-r--r--nixpkgs/pkgs/misc/brightnessctl/default.nix27
-rw-r--r--nixpkgs/pkgs/misc/calaos/installer/default.nix34
-rw-r--r--nixpkgs/pkgs/misc/cbeams/default.nix21
-rw-r--r--nixpkgs/pkgs/misc/cups/cups-pk-helper.nix30
-rw-r--r--nixpkgs/pkgs/misc/cups/default.nix158
-rw-r--r--nixpkgs/pkgs/misc/cups/drivers/brgenml1cupswrapper/default.nix124
-rw-r--r--nixpkgs/pkgs/misc/cups/drivers/brgenml1lpr/default.nix93
-rw-r--r--nixpkgs/pkgs/misc/cups/drivers/brlaser/default.nix63
-rw-r--r--nixpkgs/pkgs/misc/cups/drivers/brother/mfcl3770cdw/default.nix88
-rw-r--r--nixpkgs/pkgs/misc/cups/drivers/canon/default.nix226
-rw-r--r--nixpkgs/pkgs/misc/cups/drivers/canon/preload.c81
-rw-r--r--nixpkgs/pkgs/misc/cups/drivers/carps-cups/default.nix44
-rw-r--r--nixpkgs/pkgs/misc/cups/drivers/cnijfilter2/default.nix134
-rw-r--r--nixpkgs/pkgs/misc/cups/drivers/cnijfilter_2_80/default.nix109
-rw-r--r--nixpkgs/pkgs/misc/cups/drivers/cnijfilter_2_80/patches/libpng15.patch23
-rw-r--r--nixpkgs/pkgs/misc/cups/drivers/cnijfilter_2_80/patches/missing-include.patch20
-rw-r--r--nixpkgs/pkgs/misc/cups/drivers/cnijfilter_4_00/default.nix150
-rw-r--r--nixpkgs/pkgs/misc/cups/drivers/cnijfilter_4_00/patches/cnijfilter-3.80-1-cups-1.6.patch62
-rw-r--r--nixpkgs/pkgs/misc/cups/drivers/cnijfilter_4_00/patches/cnijfilter-3.80-6-cups-1.6.patch87
-rw-r--r--nixpkgs/pkgs/misc/cups/drivers/cnijfilter_4_00/patches/cnijfilter-4.00-4-ppd.patch10
-rw-r--r--nixpkgs/pkgs/misc/cups/drivers/cnijfilter_4_00/patches/cnijfilter-4.00-5-abi_x86_32.patch45
-rw-r--r--nixpkgs/pkgs/misc/cups/drivers/cnijfilter_4_00/patches/cnijfilter-4.00-6-headers.patch11
-rw-r--r--nixpkgs/pkgs/misc/cups/drivers/cups-bjnp/default.nix30
-rw-r--r--nixpkgs/pkgs/misc/cups/drivers/cups-drv-rastertosag-gdi/default.nix53
-rw-r--r--nixpkgs/pkgs/misc/cups/drivers/dymo/default.nix28
-rw-r--r--nixpkgs/pkgs/misc/cups/drivers/dymo/fix-includes.patch80
-rw-r--r--nixpkgs/pkgs/misc/cups/drivers/estudio/default.nix54
-rw-r--r--nixpkgs/pkgs/misc/cups/drivers/fxlinuxprint/default.nix51
-rw-r--r--nixpkgs/pkgs/misc/cups/drivers/hl1110/default.nix73
-rw-r--r--nixpkgs/pkgs/misc/cups/drivers/hl1210w/default.nix62
-rw-r--r--nixpkgs/pkgs/misc/cups/drivers/hl3140cw/default.nix78
-rw-r--r--nixpkgs/pkgs/misc/cups/drivers/hll2340dw/default.nix70
-rw-r--r--nixpkgs/pkgs/misc/cups/drivers/hll2390dw-cups/default.nix71
-rw-r--r--nixpkgs/pkgs/misc/cups/drivers/kyocera/default.nix50
-rw-r--r--nixpkgs/pkgs/misc/cups/drivers/kyodialog3/default.nix61
-rw-r--r--nixpkgs/pkgs/misc/cups/drivers/mfcj470dwcupswrapper/default.nix56
-rw-r--r--nixpkgs/pkgs/misc/cups/drivers/mfcj470dwlpr/default.nix45
-rw-r--r--nixpkgs/pkgs/misc/cups/drivers/mfcj6510dwcupswrapper/default.nix65
-rw-r--r--nixpkgs/pkgs/misc/cups/drivers/mfcj6510dwlpr/default.nix89
-rw-r--r--nixpkgs/pkgs/misc/cups/drivers/mfcl2700dncupswrapper/default.nix44
-rw-r--r--nixpkgs/pkgs/misc/cups/drivers/mfcl2700dnlpr/default.nix44
-rw-r--r--nixpkgs/pkgs/misc/cups/drivers/mfcl2720dwcupswrapper/default.nix47
-rw-r--r--nixpkgs/pkgs/misc/cups/drivers/mfcl2720dwlpr/default.nix45
-rw-r--r--nixpkgs/pkgs/misc/cups/drivers/mfcl2740dwcupswrapper/default.nix45
-rw-r--r--nixpkgs/pkgs/misc/cups/drivers/mfcl2740dwlpr/default.nix43
-rw-r--r--nixpkgs/pkgs/misc/cups/drivers/mfcl8690cdwcupswrapper/default.nix45
-rw-r--r--nixpkgs/pkgs/misc/cups/drivers/mfcl8690cdwlpr/default.nix45
-rw-r--r--nixpkgs/pkgs/misc/cups/drivers/samsung/1.00.36/default.nix116
-rw-r--r--nixpkgs/pkgs/misc/cups/drivers/samsung/1.00.36/module.nix44
-rw-r--r--nixpkgs/pkgs/misc/cups/drivers/samsung/1.00.37.nix98
-rw-r--r--nixpkgs/pkgs/misc/cups/drivers/samsung/4.00.39/builder.sh35
-rw-r--r--nixpkgs/pkgs/misc/cups/drivers/samsung/4.00.39/default.nix44
-rw-r--r--nixpkgs/pkgs/misc/cups/drivers/samsung/4.01.17.nix82
-rw-r--r--nixpkgs/pkgs/misc/cups/drivers/splix/default.nix55
-rw-r--r--nixpkgs/pkgs/misc/cups/drivers/zj-58/default.nix28
-rw-r--r--nixpkgs/pkgs/misc/cups/filters.nix71
-rw-r--r--nixpkgs/pkgs/misc/documentation-highlighter/LICENSE24
-rw-r--r--nixpkgs/pkgs/misc/documentation-highlighter/README.md152
-rw-r--r--nixpkgs/pkgs/misc/documentation-highlighter/default.nix12
-rw-r--r--nixpkgs/pkgs/misc/documentation-highlighter/highlight.pack.js2
-rw-r--r--nixpkgs/pkgs/misc/documentation-highlighter/loader.js7
-rw-r--r--nixpkgs/pkgs/misc/documentation-highlighter/mono-blue.css59
-rwxr-xr-xnixpkgs/pkgs/misc/documentation-highlighter/update.sh42
-rw-r--r--nixpkgs/pkgs/misc/doge/default.nix18
-rw-r--r--nixpkgs/pkgs/misc/drivers/dell-530cdn/default.nix13
-rw-r--r--nixpkgs/pkgs/misc/drivers/epkowa/default.nix384
-rw-r--r--nixpkgs/pkgs/misc/drivers/epkowa/firmware_location.patch21
-rw-r--r--nixpkgs/pkgs/misc/drivers/epkowa/sscanf.patch29
-rw-r--r--nixpkgs/pkgs/misc/drivers/epson-201106w/default.nix77
-rw-r--r--nixpkgs/pkgs/misc/drivers/epson-alc1100/cups-data-dir.patch13
-rw-r--r--nixpkgs/pkgs/misc/drivers/epson-alc1100/default.nix71
-rw-r--r--nixpkgs/pkgs/misc/drivers/epson-alc1100/ppd.patch13
-rw-r--r--nixpkgs/pkgs/misc/drivers/epson-escpr/cups-filter-ppd-dirs.patch62
-rw-r--r--nixpkgs/pkgs/misc/drivers/epson-escpr/default.nix49
-rw-r--r--nixpkgs/pkgs/misc/drivers/epson-escpr2/cups-filter-ppd-dirs.patch55
-rw-r--r--nixpkgs/pkgs/misc/drivers/epson-escpr2/default.nix44
-rw-r--r--nixpkgs/pkgs/misc/drivers/epson-workforce-635-nx625-series/default.nix102
-rw-r--r--nixpkgs/pkgs/misc/drivers/epson_201207w/default.nix77
-rw-r--r--nixpkgs/pkgs/misc/drivers/foo2zjs/default.nix66
-rw-r--r--nixpkgs/pkgs/misc/drivers/foo2zjs/no-hardcode-fw.diff98
-rw-r--r--nixpkgs/pkgs/misc/drivers/foomatic-filters/default.nix40
-rw-r--r--nixpkgs/pkgs/misc/drivers/gutenprint/bin.nix66
-rw-r--r--nixpkgs/pkgs/misc/drivers/gutenprint/default.nix52
-rw-r--r--nixpkgs/pkgs/misc/drivers/hplip/3.16.11.nix192
-rw-r--r--nixpkgs/pkgs/misc/drivers/hplip/3.18.5.nix229
-rw-r--r--nixpkgs/pkgs/misc/drivers/hplip/default.nix253
-rw-r--r--nixpkgs/pkgs/misc/drivers/hplip/hplip-3.20.11-nixos-cups-ppd-search-path.patch24
-rw-r--r--nixpkgs/pkgs/misc/drivers/hplip/hplip.state4
-rw-r--r--nixpkgs/pkgs/misc/drivers/hplip/image-processor.patch115
-rw-r--r--nixpkgs/pkgs/misc/drivers/m33-linux/default.nix25
-rw-r--r--nixpkgs/pkgs/misc/drivers/moltengamepad/default.nix39
-rw-r--r--nixpkgs/pkgs/misc/drivers/pentablet-driver/default.nix38
-rw-r--r--nixpkgs/pkgs/misc/drivers/postscript-lexmark/default.nix38
-rw-r--r--nixpkgs/pkgs/misc/drivers/sc-controller/default.nix63
-rw-r--r--nixpkgs/pkgs/misc/drivers/spacenavd/default.nix26
-rw-r--r--nixpkgs/pkgs/misc/drivers/steamcontroller/default.nix37
-rw-r--r--nixpkgs/pkgs/misc/drivers/sundtek/default.nix51
-rw-r--r--nixpkgs/pkgs/misc/drivers/utsushi/default.nix152
-rw-r--r--nixpkgs/pkgs/misc/drivers/xboxdrv/default.nix28
-rw-r--r--nixpkgs/pkgs/misc/drivers/xow/default.nix45
-rw-r--r--nixpkgs/pkgs/misc/drivers/xwiimote/default.nix26
-rw-r--r--nixpkgs/pkgs/misc/dumb/default.nix29
-rw-r--r--nixpkgs/pkgs/misc/emulators/atari++/default.nix32
-rw-r--r--nixpkgs/pkgs/misc/emulators/atari800/default.nix43
-rw-r--r--nixpkgs/pkgs/misc/emulators/attract-mode/default.nix33
-rw-r--r--nixpkgs/pkgs/misc/emulators/blastem/default.nix51
-rw-r--r--nixpkgs/pkgs/misc/emulators/bsod/default.nix31
-rw-r--r--nixpkgs/pkgs/misc/emulators/caprice32/default.nix47
-rw-r--r--nixpkgs/pkgs/misc/emulators/ccemux/default.nix67
-rw-r--r--nixpkgs/pkgs/misc/emulators/cdemu/analyzer.nix21
-rw-r--r--nixpkgs/pkgs/misc/emulators/cdemu/base.nix37
-rw-r--r--nixpkgs/pkgs/misc/emulators/cdemu/client.nix16
-rw-r--r--nixpkgs/pkgs/misc/emulators/cdemu/daemon.nix9
-rw-r--r--nixpkgs/pkgs/misc/emulators/cdemu/gui.nix23
-rw-r--r--nixpkgs/pkgs/misc/emulators/cdemu/libmirage.nix18
-rw-r--r--nixpkgs/pkgs/misc/emulators/cdemu/vhba.nix24
-rw-r--r--nixpkgs/pkgs/misc/emulators/cen64/default.nix30
-rw-r--r--nixpkgs/pkgs/misc/emulators/citra/default.nix33
-rw-r--r--nixpkgs/pkgs/misc/emulators/commander-x16/emulator.nix42
-rw-r--r--nixpkgs/pkgs/misc/emulators/commander-x16/rom.nix46
-rw-r--r--nixpkgs/pkgs/misc/emulators/craftos-pc/default.nix43
-rw-r--r--nixpkgs/pkgs/misc/emulators/darcnes/default.nix24
-rw-r--r--nixpkgs/pkgs/misc/emulators/darcnes/label.patch13
-rw-r--r--nixpkgs/pkgs/misc/emulators/desmume/01_use_system_tinyxml.patch231
-rw-r--r--nixpkgs/pkgs/misc/emulators/desmume/default.nix57
-rw-r--r--nixpkgs/pkgs/misc/emulators/desmume/gcc6_fixes.patch59
-rw-r--r--nixpkgs/pkgs/misc/emulators/desmume/gcc7_fixes.patch18
-rw-r--r--nixpkgs/pkgs/misc/emulators/dgen-sdl/default.nix70
-rw-r--r--nixpkgs/pkgs/misc/emulators/dlx/default.nix29
-rw-r--r--nixpkgs/pkgs/misc/emulators/dolphin-emu/default.nix122
-rw-r--r--nixpkgs/pkgs/misc/emulators/dolphin-emu/master.nix88
-rw-r--r--nixpkgs/pkgs/misc/emulators/dosbox/default.nix46
-rw-r--r--nixpkgs/pkgs/misc/emulators/duckstation/default.nix34
-rw-r--r--nixpkgs/pkgs/misc/emulators/emu2/default.nix23
-rw-r--r--nixpkgs/pkgs/misc/emulators/emulationstation/default.nix37
-rw-r--r--nixpkgs/pkgs/misc/emulators/epsxe/default.nix52
-rw-r--r--nixpkgs/pkgs/misc/emulators/fakenes/build.patch84
-rw-r--r--nixpkgs/pkgs/misc/emulators/fakenes/default.nix32
-rw-r--r--nixpkgs/pkgs/misc/emulators/fceux/default.nix40
-rw-r--r--nixpkgs/pkgs/misc/emulators/firebird-emu/default.nix38
-rw-r--r--nixpkgs/pkgs/misc/emulators/fs-uae/default.nix32
-rw-r--r--nixpkgs/pkgs/misc/emulators/fuse-emulator/default.nix29
-rw-r--r--nixpkgs/pkgs/misc/emulators/gens-gs/default.nix25
-rw-r--r--nixpkgs/pkgs/misc/emulators/gxemul/default.nix35
-rw-r--r--nixpkgs/pkgs/misc/emulators/hatari/default.nix25
-rw-r--r--nixpkgs/pkgs/misc/emulators/higan/0001-change-flags.diff25
-rw-r--r--nixpkgs/pkgs/misc/emulators/higan/default.nix135
-rw-r--r--nixpkgs/pkgs/misc/emulators/kega-fusion/default.nix78
-rw-r--r--nixpkgs/pkgs/misc/emulators/lambda-delta/default.nix26
-rw-r--r--nixpkgs/pkgs/misc/emulators/libdsk/default.nix19
-rw-r--r--nixpkgs/pkgs/misc/emulators/mame/default.nix87
-rw-r--r--nixpkgs/pkgs/misc/emulators/mame/emuopts.patch29
-rw-r--r--nixpkgs/pkgs/misc/emulators/mednafen/default.nix74
-rw-r--r--nixpkgs/pkgs/misc/emulators/mednafen/server.nix21
-rw-r--r--nixpkgs/pkgs/misc/emulators/mednaffe/default.nix43
-rw-r--r--nixpkgs/pkgs/misc/emulators/melonDS/default.nix41
-rw-r--r--nixpkgs/pkgs/misc/emulators/mgba/default.nix62
-rw-r--r--nixpkgs/pkgs/misc/emulators/mupen64plus/default.nix29
-rw-r--r--nixpkgs/pkgs/misc/emulators/nestopia/build-fix.patch18
-rw-r--r--nixpkgs/pkgs/misc/emulators/nestopia/default.nix72
-rw-r--r--nixpkgs/pkgs/misc/emulators/nestopia/gcc6.patch92
-rw-r--r--nixpkgs/pkgs/misc/emulators/np2kai/default.nix196
-rw-r--r--nixpkgs/pkgs/misc/emulators/oberon-risc-emu/default.nix27
-rw-r--r--nixpkgs/pkgs/misc/emulators/openmsx/custom-nix.mk9
-rw-r--r--nixpkgs/pkgs/misc/emulators/openmsx/default.nix48
-rw-r--r--nixpkgs/pkgs/misc/emulators/pcem/default.nix29
-rw-r--r--nixpkgs/pkgs/misc/emulators/pcsx2/default.nix113
-rw-r--r--nixpkgs/pkgs/misc/emulators/pcsxr/default.nix87
-rw-r--r--nixpkgs/pkgs/misc/emulators/pcsxr/uncompress2.patch20
-rw-r--r--nixpkgs/pkgs/misc/emulators/ppsspp/default.nix70
-rw-r--r--nixpkgs/pkgs/misc/emulators/py65/default.nix25
-rw-r--r--nixpkgs/pkgs/misc/emulators/qmc2/default.nix41
-rw-r--r--nixpkgs/pkgs/misc/emulators/reicast/default.nix52
-rw-r--r--nixpkgs/pkgs/misc/emulators/resim/default.nix20
-rw-r--r--nixpkgs/pkgs/misc/emulators/retroarch/cores.nix1098
-rw-r--r--nixpkgs/pkgs/misc/emulators/retroarch/default.nix63
-rw-r--r--nixpkgs/pkgs/misc/emulators/retroarch/kodi-advanced-launchers.nix40
-rw-r--r--nixpkgs/pkgs/misc/emulators/retroarch/wrapper.nix37
-rw-r--r--nixpkgs/pkgs/misc/emulators/retrofe/default.nix78
-rw-r--r--nixpkgs/pkgs/misc/emulators/retrofe/include-paths.patch11
-rw-r--r--nixpkgs/pkgs/misc/emulators/rpcs3/default.nix54
-rw-r--r--nixpkgs/pkgs/misc/emulators/ruffle/default.nix60
-rw-r--r--nixpkgs/pkgs/misc/emulators/ryujinx/default.nix112
-rw-r--r--nixpkgs/pkgs/misc/emulators/ryujinx/deps.nix1127
-rw-r--r--nixpkgs/pkgs/misc/emulators/ryujinx/log.patch13
-rwxr-xr-xnixpkgs/pkgs/misc/emulators/ryujinx/updater.sh67
-rw-r--r--nixpkgs/pkgs/misc/emulators/sameboy/default.nix48
-rw-r--r--nixpkgs/pkgs/misc/emulators/simh/default.nix62
-rw-r--r--nixpkgs/pkgs/misc/emulators/simplenes/default.nix33
-rw-r--r--nixpkgs/pkgs/misc/emulators/snes9x-gtk/default.nix37
-rw-r--r--nixpkgs/pkgs/misc/emulators/stella/default.nix42
-rw-r--r--nixpkgs/pkgs/misc/emulators/termtekst/default.nix36
-rw-r--r--nixpkgs/pkgs/misc/emulators/tilem/default.nix30
-rw-r--r--nixpkgs/pkgs/misc/emulators/uae/default.nix26
-rw-r--r--nixpkgs/pkgs/misc/emulators/vbam/default.nix57
-rw-r--r--nixpkgs/pkgs/misc/emulators/vice/default.nix53
-rw-r--r--nixpkgs/pkgs/misc/emulators/wine/base.nix155
-rw-r--r--nixpkgs/pkgs/misc/emulators/wine/builder-wow.sh30
-rw-r--r--nixpkgs/pkgs/misc/emulators/wine/cert-path.patch23
-rw-r--r--nixpkgs/pkgs/misc/emulators/wine/default.nix69
-rw-r--r--nixpkgs/pkgs/misc/emulators/wine/fonts.nix22
-rw-r--r--nixpkgs/pkgs/misc/emulators/wine/packages.nix38
-rw-r--r--nixpkgs/pkgs/misc/emulators/wine/sources.nix78
-rw-r--r--nixpkgs/pkgs/misc/emulators/wine/staging.nix28
-rw-r--r--nixpkgs/pkgs/misc/emulators/wine/util.nix9
-rw-r--r--nixpkgs/pkgs/misc/emulators/wine/vkd3d.nix26
-rw-r--r--nixpkgs/pkgs/misc/emulators/wine/winetricks.nix32
-rw-r--r--nixpkgs/pkgs/misc/emulators/wxmupen64plus/default.nix30
-rw-r--r--nixpkgs/pkgs/misc/emulators/xcpc/default.nix29
-rw-r--r--nixpkgs/pkgs/misc/emulators/yabause/0001-Fixes-for-Qt-5.11-upgrade.patch67
-rw-r--r--nixpkgs/pkgs/misc/emulators/yabause/default.nix36
-rw-r--r--nixpkgs/pkgs/misc/emulators/yabause/linkage-rwx-linux-elf.patch20
-rw-r--r--nixpkgs/pkgs/misc/emulators/yuzu/base.nix88
-rw-r--r--nixpkgs/pkgs/misc/emulators/yuzu/default.nix28
-rw-r--r--nixpkgs/pkgs/misc/emulators/zsnes/default.nix63
-rw-r--r--nixpkgs/pkgs/misc/flashfocus/default.nix38
-rw-r--r--nixpkgs/pkgs/misc/frescobaldi/default.nix49
-rw-r--r--nixpkgs/pkgs/misc/ghostscript/default.nix140
-rw-r--r--nixpkgs/pkgs/misc/ghostscript/doc-no-ref.diff7
-rw-r--r--nixpkgs/pkgs/misc/ghostscript/urw-font-files.patch61
-rw-r--r--nixpkgs/pkgs/misc/gnash/default.nix130
-rw-r--r--nixpkgs/pkgs/misc/gnuk/default.nix11
-rw-r--r--nixpkgs/pkgs/misc/gnuk/generic.nix52
-rw-r--r--nixpkgs/pkgs/misc/hdt/default.nix27
-rw-r--r--nixpkgs/pkgs/misc/jackaudio/default.nix75
-rw-r--r--nixpkgs/pkgs/misc/jackaudio/jack1.nix39
-rw-r--r--nixpkgs/pkgs/misc/lguf-brightness/default.nix30
-rw-r--r--nixpkgs/pkgs/misc/libcardiacarrest/default.nix48
-rw-r--r--nixpkgs/pkgs/misc/lightspark/default.nix35
-rw-r--r--nixpkgs/pkgs/misc/lilypond/default.nix60
-rw-r--r--nixpkgs/pkgs/misc/lilypond/fonts.nix136
-rw-r--r--nixpkgs/pkgs/misc/lilypond/with-fonts.nix18
-rw-r--r--nixpkgs/pkgs/misc/logging/beats/6.x.nix53
-rw-r--r--nixpkgs/pkgs/misc/logging/beats/7.x.nix52
-rw-r--r--nixpkgs/pkgs/misc/long-shebang/default.nix21
-rw-r--r--nixpkgs/pkgs/misc/meson-tools/default.nix27
-rw-r--r--nixpkgs/pkgs/misc/mnemonicode/default.nix27
-rw-r--r--nixpkgs/pkgs/misc/mxt-app/default.nix26
-rw-r--r--nixpkgs/pkgs/misc/my-env/default.nix152
-rw-r--r--nixpkgs/pkgs/misc/my-env/loadenv.sh22
-rw-r--r--nixpkgs/pkgs/misc/ptouch-print/default.nix34
-rw-r--r--nixpkgs/pkgs/misc/pylode/default.nix37
-rw-r--r--nixpkgs/pkgs/misc/riscv-pk/default.nix41
-rw-r--r--nixpkgs/pkgs/misc/rkdeveloptool/default.nix27
-rw-r--r--nixpkgs/pkgs/misc/sailsd/default.nix48
-rw-r--r--nixpkgs/pkgs/misc/scimark/default.nix35
-rw-r--r--nixpkgs/pkgs/misc/scrcpy/default.nix64
-rw-r--r--nixpkgs/pkgs/misc/scream-receivers/default.nix56
-rw-r--r--nixpkgs/pkgs/misc/screensavers/alock/default.nix45
-rw-r--r--nixpkgs/pkgs/misc/screensavers/betterlockscreen/default.nix39
-rw-r--r--nixpkgs/pkgs/misc/screensavers/betterlockscreen/replace-i3lock.patch12
-rw-r--r--nixpkgs/pkgs/misc/screensavers/electricsheep/default.nix47
-rw-r--r--nixpkgs/pkgs/misc/screensavers/i3lock-pixeled/default.nix40
-rw-r--r--nixpkgs/pkgs/misc/screensavers/light-locker/default.nix90
-rw-r--r--nixpkgs/pkgs/misc/screensavers/multilockscreen/default.nix47
-rw-r--r--nixpkgs/pkgs/misc/screensavers/physlock/default.nix27
-rw-r--r--nixpkgs/pkgs/misc/screensavers/pipes/default.nix29
-rw-r--r--nixpkgs/pkgs/misc/screensavers/rss-glx/default.nix27
-rw-r--r--nixpkgs/pkgs/misc/screensavers/slock/default.nix36
-rw-r--r--nixpkgs/pkgs/misc/screensavers/vlock/default.nix29
-rw-r--r--nixpkgs/pkgs/misc/screensavers/vlock/eintr.patch34
-rw-r--r--nixpkgs/pkgs/misc/screensavers/xautolock/default.nix35
-rw-r--r--nixpkgs/pkgs/misc/screensavers/xlockmore/default.nix40
-rw-r--r--nixpkgs/pkgs/misc/screensavers/xscreensaver/default.nix64
-rw-r--r--nixpkgs/pkgs/misc/screensavers/xss-lock/default.nix23
-rw-r--r--nixpkgs/pkgs/misc/screensavers/xssproxy/default.nix30
-rw-r--r--nixpkgs/pkgs/misc/screensavers/xtrlock-pam/default.nix28
-rw-r--r--nixpkgs/pkgs/misc/seafile-shared/default.nix62
-rw-r--r--nixpkgs/pkgs/misc/sndio/default.nix22
-rw-r--r--nixpkgs/pkgs/misc/solfege/css.patch33
-rw-r--r--nixpkgs/pkgs/misc/solfege/default.nix47
-rw-r--r--nixpkgs/pkgs/misc/solfege/menubar.patch7
-rw-r--r--nixpkgs/pkgs/misc/solfege/texinfo.patch20
-rw-r--r--nixpkgs/pkgs/misc/solfege/webbrowser.patch8
-rw-r--r--nixpkgs/pkgs/misc/sound-of-sorting/default.nix28
-rw-r--r--nixpkgs/pkgs/misc/source-and-tags/default.nix95
-rw-r--r--nixpkgs/pkgs/misc/stabber/default.nix31
-rw-r--r--nixpkgs/pkgs/misc/talkfilters/default.nix26
-rw-r--r--nixpkgs/pkgs/misc/tmux-plugins/default.nix587
-rw-r--r--nixpkgs/pkgs/misc/tpm2-pkcs11/0001-configure-ac-version.patch13
-rw-r--r--nixpkgs/pkgs/misc/tpm2-pkcs11/default.nix79
-rw-r--r--nixpkgs/pkgs/misc/uboot/0001-configs-rpi-allow-for-bigger-kernels.patch45
-rw-r--r--nixpkgs/pkgs/misc/uboot/default.nix449
-rwxr-xr-xnixpkgs/pkgs/misc/uq/default.nix25
-rw-r--r--nixpkgs/pkgs/misc/urbit/default.nix31
-rw-r--r--nixpkgs/pkgs/misc/vim-plugins/aliases.nix143
-rw-r--r--nixpkgs/pkgs/misc/vim-plugins/build-vim-plugin.nix60
-rw-r--r--nixpkgs/pkgs/misc/vim-plugins/default.nix28
-rw-r--r--nixpkgs/pkgs/misc/vim-plugins/deprecated.json22
-rw-r--r--nixpkgs/pkgs/misc/vim-plugins/generated.nix8905
-rw-r--r--nixpkgs/pkgs/misc/vim-plugins/overrides.nix844
-rw-r--r--nixpkgs/pkgs/misc/vim-plugins/patches/fruzzy/get_version.patch25
-rw-r--r--nixpkgs/pkgs/misc/vim-plugins/patches/lens-vim/remove_duplicate_g_lens_animate.patch12
-rw-r--r--nixpkgs/pkgs/misc/vim-plugins/patches/vim-grammarous/set_default_languagetool.patch11
-rw-r--r--nixpkgs/pkgs/misc/vim-plugins/readme.md1
-rwxr-xr-xnixpkgs/pkgs/misc/vim-plugins/update.py91
-rw-r--r--nixpkgs/pkgs/misc/vim-plugins/vim-plugin-names740
-rw-r--r--nixpkgs/pkgs/misc/vim-plugins/vim-utils.nix536
-rw-r--r--nixpkgs/pkgs/misc/vim-plugins/vim2nix/README.txt3
-rw-r--r--nixpkgs/pkgs/misc/vim-plugins/vim2nix/addon-info.json1
-rw-r--r--nixpkgs/pkgs/misc/vim-plugins/vim2nix/autoload/nix.vim307
-rw-r--r--nixpkgs/pkgs/misc/vscode-extensions/cpptools/default.nix102
-rwxr-xr-xnixpkgs/pkgs/misc/vscode-extensions/cpptools/missing_elf_deps.sh52
-rw-r--r--nixpkgs/pkgs/misc/vscode-extensions/cpptools/package-activation-events.json25
-rwxr-xr-xnixpkgs/pkgs/misc/vscode-extensions/cpptools/update_helper.sh168
-rw-r--r--nixpkgs/pkgs/misc/vscode-extensions/default.nix1042
-rw-r--r--nixpkgs/pkgs/misc/vscode-extensions/mktplcExtRefToFetchArgs.nix8
-rw-r--r--nixpkgs/pkgs/misc/vscode-extensions/ms-dotnettools-csharp/default.nix143
-rw-r--r--nixpkgs/pkgs/misc/vscode-extensions/ms-dotnettools-csharp/rt-deps-bin-srcs.json37
-rwxr-xr-xnixpkgs/pkgs/misc/vscode-extensions/ms-dotnettools-csharp/update-bin-srcs25
-rwxr-xr-xnixpkgs/pkgs/misc/vscode-extensions/ms-dotnettools-csharp/update-bin-srcs-lib.sh154
-rw-r--r--nixpkgs/pkgs/misc/vscode-extensions/ms-vsliveshare-vsliveshare/default.nix134
-rw-r--r--nixpkgs/pkgs/misc/vscode-extensions/ms-vsliveshare-vsliveshare/noop-syslog.c1
-rw-r--r--nixpkgs/pkgs/misc/vscode-extensions/python/default.nix93
-rw-r--r--nixpkgs/pkgs/misc/vscode-extensions/python/extract-nuget.nix15
-rw-r--r--nixpkgs/pkgs/misc/vscode-extensions/remote-ssh/default.nix55
-rw-r--r--nixpkgs/pkgs/misc/vscode-extensions/rust-analyzer/build-deps/package.json27
-rw-r--r--nixpkgs/pkgs/misc/vscode-extensions/rust-analyzer/default.nix49
-rw-r--r--nixpkgs/pkgs/misc/vscode-extensions/terraform/default.nix25
-rw-r--r--nixpkgs/pkgs/misc/vscode-extensions/terraform/fix-terraform-ls.patch38
-rw-r--r--nixpkgs/pkgs/misc/vscode-extensions/updateSettings.nix39
-rw-r--r--nixpkgs/pkgs/misc/vscode-extensions/updateSettingsTest.nix6
-rwxr-xr-xnixpkgs/pkgs/misc/vscode-extensions/update_installed_exts.sh74
-rw-r--r--nixpkgs/pkgs/misc/vscode-extensions/vscode-lldb/build-deps/package.json24
-rw-r--r--nixpkgs/pkgs/misc/vscode-extensions/vscode-lldb/cmake-build-extension-only.patch34
-rw-r--r--nixpkgs/pkgs/misc/vscode-extensions/vscode-lldb/default.nix101
-rw-r--r--nixpkgs/pkgs/misc/vscode-extensions/vscode-lldb/lldb.nix23
-rw-r--r--nixpkgs/pkgs/misc/vscode-extensions/vscode-lldb/reset-cargo-config.patch11
-rwxr-xr-xnixpkgs/pkgs/misc/vscode-extensions/vscode-lldb/update.sh35
-rw-r--r--nixpkgs/pkgs/misc/vscode-extensions/vscode-utils.nix94
-rw-r--r--nixpkgs/pkgs/misc/vscode-extensions/vscodeEnv.nix86
-rw-r--r--nixpkgs/pkgs/misc/vscode-extensions/vscodeEnvTest.nix11
-rw-r--r--nixpkgs/pkgs/misc/vscode-extensions/vscodeExts2nix.nix44
-rw-r--r--nixpkgs/pkgs/misc/vscode-extensions/vscodeWithConfiguration.nix54
-rw-r--r--nixpkgs/pkgs/misc/vscode-extensions/wakatime/default.nix30
-rw-r--r--nixpkgs/pkgs/misc/xosd/default.nix21
351 files changed, 35599 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/misc/acpilight/default.nix b/nixpkgs/pkgs/misc/acpilight/default.nix
new file mode 100644
index 000000000000..b5a385ab4076
--- /dev/null
+++ b/nixpkgs/pkgs/misc/acpilight/default.nix
@@ -0,0 +1,33 @@
+{ lib, stdenv, fetchgit, python3, coreutils }:
+
+stdenv.mkDerivation rec {
+  pname = "acpilight";
+  version = "1.2";
+
+  src = fetchgit {
+    url = "https://gitlab.com/wavexx/acpilight.git";
+    rev = "v${version}";
+    sha256 = "1r0r3nx6x6vkpal6vci0zaa1n9dfacypldf6k8fxg7919vzxdn1w";
+  };
+
+  pyenv = python3.withPackages (pythonPackages: with pythonPackages; [
+    ConfigArgParse
+  ]);
+
+  postConfigure = ''
+    substituteInPlace 90-backlight.rules --replace /bin ${coreutils}/bin
+    substituteInPlace Makefile --replace udevadm true
+  '';
+
+  buildInputs = [ pyenv ];
+
+  makeFlags = [ "DESTDIR=$(out) prefix=" ];
+
+  meta = with lib; {
+    homepage = "https://gitlab.com/wavexx/acpilight";
+    description = "ACPI backlight control";
+    license = licenses.gpl3;
+    maintainers = with maintainers; [ smakarov ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/misc/apulse/default.nix b/nixpkgs/pkgs/misc/apulse/default.nix
new file mode 100644
index 000000000000..085ad7902f5d
--- /dev/null
+++ b/nixpkgs/pkgs/misc/apulse/default.nix
@@ -0,0 +1,33 @@
+{ lib, stdenv, fetchFromGitHub, alsaLib, cmake, pkg-config, glib
+, tracingSupport ? true, logToStderr ? true }:
+
+let oz = x: if x then "1" else "0"; in
+
+stdenv.mkDerivation rec {
+  pname = "apulse";
+  version = "0.1.13";
+
+  src = fetchFromGitHub {
+    owner = "i-rinat";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "1p6fh6ah5v3qz7dxhcsixx38bxg44ypbim4m03bxk3ls5i9xslmn";
+  };
+
+  nativeBuildInputs = [ cmake pkg-config ];
+
+  buildInputs = [ alsaLib glib ];
+
+  cmakeFlags = [
+    "-DWITH_TRACE=${oz tracingSupport}"
+    "-DLOG_TO_STDERR=${oz logToStderr}"
+  ];
+
+  meta = with lib; {
+    description = "PulseAudio emulation for ALSA";
+    homepage = "https://github.com/i-rinat/apulse";
+    license = licenses.mit;
+    platforms = platforms.linux;
+    maintainers = [ maintainers.jagajaga ];
+  };
+}
diff --git a/nixpkgs/pkgs/misc/apulse/pressureaudio.nix b/nixpkgs/pkgs/misc/apulse/pressureaudio.nix
new file mode 100644
index 000000000000..c69fcbc60150
--- /dev/null
+++ b/nixpkgs/pkgs/misc/apulse/pressureaudio.nix
@@ -0,0 +1,82 @@
+{ stdenv, apulse, libpulseaudio, pkg-config, intltool, autoreconfHook }:
+
+stdenv.mkDerivation {
+  name = "libpressureaudio-${apulse.version}";
+
+  src = libpulseaudio.src;
+
+  nativeBuildInputs = [ pkg-config intltool autoreconfHook ];
+
+  dontConfigure = true;
+
+  buildPhase = ":";
+
+  installPhase = ''
+    echo "Copying libraries from apulse."
+    mkdir -p $out/lib
+    ls ${apulse}/lib/apulse $out/lib
+    cp -a ${apulse}/lib/apulse/* $out/lib/
+
+    echo "Copying headers from pulseaudio."
+    mkdir -p $out/include/pulse
+    cp -a src/pulse/*.h $out/include/pulse
+
+    echo "Generating custom pkgconfig definitions."
+    mkdir -p $out/lib/pkgconfig
+    for a in libpulse.pc libpulse-simple.pc libpulse-mainloop-glib.pc ; do
+        cat > $out/lib/pkgconfig/$a << EOF
+    prefix=$out
+    libdir=$out/lib
+    includedir=$out/include
+
+    EOF
+    done
+
+    cat >> $out/lib/pkgconfig/libpulse.pc << EOF
+    Name: libpulse
+    Description: PulseAudio Client Interface
+    Version: ${libpulseaudio.version}-rebootstrapped
+    Libs: -L$out/lib -lpulse
+    Cflags: -I$out/include -D_REENTRANT
+    EOF
+
+    cat >> $out/lib/pkgconfig/libpulse-simple.pc << EOF
+    Name: libpulse-simple
+    Description: PulseAudio Simplified Synchronous Client Interface
+    Version: ${libpulseaudio.version}-rebootstrapped
+    Libs: -L$out/lib -lpulse-simple
+    Cflags: -I$out/include -D_REENTRANT
+    Requires: libpulse
+    EOF
+
+    cat >> $out/lib/pkgconfig/libpulse-mainloop-glib.pc << EOF
+    Name: libpulse-mainloop-glib
+    Description: PulseAudio GLib 2.0 Main Loop Wrapper
+    Version: ${libpulseaudio.version}-rebootstrapped
+    Libs: -L$out/lib -lpulse-mainloop-glib
+    Cflags: -I$out/include -D_REENTRANT
+    Requires: libpulse glib-2.0
+    EOF
+  '';
+
+  meta = apulse.meta // {
+    description = "libpulse without any sound daemons over pure ALSA";
+    longDescription = ''
+      apulse (${apulse.meta.homepage}) implements most of libpulse
+      API over pure ALSA in 5% LOC of the original PulseAudio.
+
+      But apulse is made to be used as a wrapper that substitutes its
+      replacement libs into LD_LIBRARY_PATH. The problem with that is
+      that you still have to link against the original libpulse.
+
+      pressureaudio (http://git.r-36.net/pressureaudio/) wraps apulse
+      with everything you need to replace libpulse completely.
+
+      This derivation is a reimplementation of pressureaudio in pure
+      nix.
+
+      You can simply override libpulse with this and most
+      packages would just work.
+    '';
+  };
+}
diff --git a/nixpkgs/pkgs/misc/arm-trusted-firmware/default.nix b/nixpkgs/pkgs/misc/arm-trusted-firmware/default.nix
new file mode 100644
index 000000000000..6ef92e170eb4
--- /dev/null
+++ b/nixpkgs/pkgs/misc/arm-trusted-firmware/default.nix
@@ -0,0 +1,113 @@
+{ lib, stdenv, fetchFromGitHub, fetchpatch, openssl, pkgsCross, buildPackages }:
+
+let
+  buildArmTrustedFirmware = { filesToInstall
+            , installDir ? "$out"
+            , platform ? null
+            , extraMakeFlags ? []
+            , extraMeta ? {}
+            , version ? "2.4"
+            , ... } @ args:
+           stdenv.mkDerivation ({
+
+    name = "arm-trusted-firmware${lib.optionalString (platform != null) "-${platform}"}-${version}";
+    inherit version;
+
+    src = fetchFromGitHub {
+      owner = "ARM-software";
+      repo = "arm-trusted-firmware";
+      rev = "v${version}";
+      sha256 = "12k0n79j156bdzqws18kpbli04kn00nh6dy42pjv6gakqrkx9px3";
+    };
+
+    depsBuildBuild = [ buildPackages.stdenv.cc ];
+
+    # For Cortex-M0 firmware in RK3399
+    nativeBuildInputs = [ pkgsCross.arm-embedded.stdenv.cc ];
+
+    buildInputs = [ openssl ];
+
+    makeFlags = [
+      "CROSS_COMPILE=${stdenv.cc.targetPrefix}"
+    ] ++ (lib.optional (platform != null) "PLAT=${platform}")
+      ++ extraMakeFlags;
+
+    installPhase = ''
+      runHook preInstall
+
+      mkdir -p ${installDir}
+      cp ${lib.concatStringsSep " " filesToInstall} ${installDir}
+
+      runHook postInstall
+    '';
+
+    hardeningDisable = [ "all" ];
+    dontStrip = true;
+
+    # Fatal error: can't create build/sun50iw1p1/release/bl31/sunxi_clocks.o: No such file or directory
+    enableParallelBuilding = false;
+
+    meta = with lib; {
+      homepage = "https://github.com/ARM-software/arm-trusted-firmware";
+      description = "A reference implementation of secure world software for ARMv8-A";
+      license = licenses.bsd3;
+      maintainers = with maintainers; [ lopsided98 ];
+    } // extraMeta;
+  } // builtins.removeAttrs args [ "extraMeta" ]);
+
+in {
+  inherit buildArmTrustedFirmware;
+
+  armTrustedFirmwareTools = buildArmTrustedFirmware rec {
+    extraMakeFlags = [
+      "HOSTCC=${stdenv.cc.targetPrefix}gcc"
+      "fiptool" "certtool" "sptool"
+    ];
+    filesToInstall = [
+      "tools/fiptool/fiptool"
+      "tools/cert_create/cert_create"
+      "tools/sptool/sptool"
+    ];
+    postInstall = ''
+      mkdir -p "$out/bin"
+      find "$out" -type f -executable -exec mv -t "$out/bin" {} +
+    '';
+  };
+
+  armTrustedFirmwareAllwinner = buildArmTrustedFirmware rec {
+    platform = "sun50i_a64";
+    extraMeta.platforms = ["aarch64-linux"];
+    filesToInstall = ["build/${platform}/release/bl31.bin"];
+  };
+
+  armTrustedFirmwareQemu = buildArmTrustedFirmware rec {
+    platform = "qemu";
+    extraMeta.platforms = ["aarch64-linux"];
+    filesToInstall = [
+      "build/${platform}/release/bl1.bin"
+      "build/${platform}/release/bl2.bin"
+      "build/${platform}/release/bl31.bin"
+    ];
+  };
+
+  armTrustedFirmwareRK3328 = buildArmTrustedFirmware rec {
+    extraMakeFlags = [ "bl31" ];
+    platform = "rk3328";
+    extraMeta.platforms = ["aarch64-linux"];
+    filesToInstall = [ "build/${platform}/release/bl31/bl31.elf"];
+  };
+
+  armTrustedFirmwareRK3399 = buildArmTrustedFirmware rec {
+    extraMakeFlags = [ "bl31" ];
+    platform = "rk3399";
+    extraMeta.platforms = ["aarch64-linux"];
+    filesToInstall = [ "build/${platform}/release/bl31/bl31.elf"];
+  };
+
+  armTrustedFirmwareS905 = buildArmTrustedFirmware rec {
+    extraMakeFlags = [ "bl31" ];
+    platform = "gxbb";
+    extraMeta.platforms = ["aarch64-linux"];
+    filesToInstall = [ "build/${platform}/release/bl31.bin"];
+  };
+}
diff --git a/nixpkgs/pkgs/misc/autotiling/default.nix b/nixpkgs/pkgs/misc/autotiling/default.nix
new file mode 100644
index 000000000000..b104f359363b
--- /dev/null
+++ b/nixpkgs/pkgs/misc/autotiling/default.nix
@@ -0,0 +1,23 @@
+{ lib, buildPythonApplication, fetchPypi, i3ipc, importlib-metadata }:
+
+buildPythonApplication rec {
+  pname = "autotiling";
+  version = "1.1";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "0hwvy9bxwv9fakqqiyrkmpckxgm0z85c240p84ibdhja9sm086v0";
+  };
+
+  propagatedBuildInputs = [ i3ipc importlib-metadata ];
+  doCheck = false;
+
+  meta = with lib; {
+    homepage = "https://github.com/nwg-piotr/autotiling";
+    description = "Script for sway and i3 to automatically switch the horizontal / vertical window split orientation";
+    license = licenses.gpl3Plus;
+    platforms= platforms.linux;
+    maintainers = with maintainers; [ artturin ];
+  };
+}
+
diff --git a/nixpkgs/pkgs/misc/barebox/default.nix b/nixpkgs/pkgs/misc/barebox/default.nix
new file mode 100644
index 000000000000..cb77a607e016
--- /dev/null
+++ b/nixpkgs/pkgs/misc/barebox/default.nix
@@ -0,0 +1,96 @@
+{ stdenv
+, lib
+, fetchurl
+, bison
+, dtc
+, flex
+, libusb1
+, lzop
+, openssl
+, pkg-config
+, buildPackages
+}:
+
+let
+  buildBarebox = {
+    filesToInstall
+  , installDir ? "$out"
+  , defconfig
+  , extraMeta ? {}
+  , ... } @ args: stdenv.mkDerivation rec {
+    pname = "barebox-${defconfig}";
+
+    version = "2020.12.0";
+
+    src = fetchurl {
+      url = "https://www.barebox.org/download/barebox-${version}.tar.bz2";
+      sha256 = "06vsd95ihaa2nywpqy6k0c7xwk2pzws4yvbp328yd2pfiigachrv";
+    };
+
+    postPatch = ''
+      patchShebangs scripts
+    '';
+
+    nativeBuildInputs = [
+      bison
+      dtc
+      flex
+      openssl
+      libusb1
+      lzop
+      pkg-config
+    ];
+    depsBuildBuild = [ buildPackages.stdenv.cc ];
+
+    hardeningDisable = [ "all" ];
+
+    makeFlags = [
+      "DTC=dtc"
+      "CROSS_COMPILE=${stdenv.cc.targetPrefix}"
+    ];
+
+    configurePhase = ''
+      runHook preConfigure
+
+      make ${defconfig}
+
+      runHook postConfigure
+    '';
+
+    installPhase = ''
+      runHook preInstall
+
+      mkdir -p ${installDir}
+      cp ${lib.concatStringsSep " " filesToInstall} ${installDir}
+
+      runHook postInstall
+    '';
+
+    enableParallelBuilding = true;
+
+    dontStrip = true;
+
+    meta = with lib; {
+      homepage = "https://www.barebox.org";
+      description = "The Swiss Army Knive for bare metal";
+      license = licenses.gpl2;
+      maintainers = with maintainers; [ emantor ];
+    } // extraMeta;
+  } // removeAttrs args [ "extraMeta" ];
+
+in {
+  inherit buildBarebox;
+
+  bareboxTools = buildBarebox {
+    defconfig = "hosttools_defconfig";
+    installDir = "$out/bin";
+    extraMeta.platforms = lib.platforms.linux;
+    filesToInstall = [
+      "scripts/bareboximd"
+      "scripts/imx/imx-usb-loader"
+      "scripts/omap4_usbboot"
+      "scripts/omap3-usb-loader"
+      "scripts/kwboot"
+    ];
+  };
+}
diff --git a/nixpkgs/pkgs/misc/base16-builder/default.nix b/nixpkgs/pkgs/misc/base16-builder/default.nix
new file mode 100644
index 000000000000..af57f2a90de3
--- /dev/null
+++ b/nixpkgs/pkgs/misc/base16-builder/default.nix
@@ -0,0 +1,8 @@
+{ stdenv, pkgs }:
+
+let
+  nodePackages = import ./node-packages.nix {
+    inherit pkgs;
+    inherit (stdenv.hostPlatform) system;
+  };
+in nodePackages.base16-builder
diff --git a/nixpkgs/pkgs/misc/base16-builder/generate.sh b/nixpkgs/pkgs/misc/base16-builder/generate.sh
new file mode 100755
index 000000000000..3fcfb5bcbc06
--- /dev/null
+++ b/nixpkgs/pkgs/misc/base16-builder/generate.sh
@@ -0,0 +1,8 @@
+#!/usr/bin/env nix-shell
+#! nix-shell -i bash -p nodePackages.node2nix
+exec node2nix --nodejs-10 \
+     --input node-packages.json \
+     --output node-packages-generated.nix \
+     --supplement-input supplement.json \
+     --composition node-packages.nix \
+     --node-env ./../../development/node-packages/node-env.nix \
diff --git a/nixpkgs/pkgs/misc/base16-builder/node-packages-generated.nix b/nixpkgs/pkgs/misc/base16-builder/node-packages-generated.nix
new file mode 100644
index 000000000000..3c03a5f0c08d
--- /dev/null
+++ b/nixpkgs/pkgs/misc/base16-builder/node-packages-generated.nix
@@ -0,0 +1,1650 @@
+# This file has been generated by node2nix 1.9.0. Do not edit!
+
+{nodeEnv, fetchurl, fetchgit, nix-gitignore, stdenv, lib, globalBuildInputs ? []}:
+
+let
+  sources = {
+    "abbrev-1.1.1" = {
+      name = "abbrev";
+      packageName = "abbrev";
+      version = "1.1.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz";
+        sha512 = "nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==";
+      };
+    };
+    "ansi-regex-2.1.1" = {
+      name = "ansi-regex";
+      packageName = "ansi-regex";
+      version = "2.1.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz";
+        sha1 = "c3b33ab5ee360d86e0e628f0468ae7ef27d654df";
+      };
+    };
+    "ansi-styles-2.2.1" = {
+      name = "ansi-styles";
+      packageName = "ansi-styles";
+      version = "2.2.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz";
+        sha1 = "b432dd3358b634cf75e1e4664368240533c1ddbe";
+      };
+    };
+    "any-promise-0.1.0" = {
+      name = "any-promise";
+      packageName = "any-promise";
+      version = "0.1.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/any-promise/-/any-promise-0.1.0.tgz";
+        sha1 = "830b680aa7e56f33451d4b049f3bd8044498ee27";
+      };
+    };
+    "aproba-1.2.0" = {
+      name = "aproba";
+      packageName = "aproba";
+      version = "1.2.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz";
+        sha512 = "Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==";
+      };
+    };
+    "are-we-there-yet-1.1.5" = {
+      name = "are-we-there-yet";
+      packageName = "are-we-there-yet";
+      version = "1.1.5";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz";
+        sha512 = "5hYdAkZlcG8tOLujVDTgCT+uPX0VnpAH28gWsLfzpXYm7wP6mp5Q/gYyR7YQ0cKVJcXJnl3j2kpBan13PtQf6w==";
+      };
+    };
+    "argparse-1.0.10" = {
+      name = "argparse";
+      packageName = "argparse";
+      version = "1.0.10";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz";
+        sha512 = "o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==";
+      };
+    };
+    "array-find-index-1.0.2" = {
+      name = "array-find-index";
+      packageName = "array-find-index";
+      version = "1.0.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.2.tgz";
+        sha1 = "df010aa1287e164bbda6f9723b0a96a1ec4187a1";
+      };
+    };
+    "balanced-match-1.0.0" = {
+      name = "balanced-match";
+      packageName = "balanced-match";
+      version = "1.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz";
+        sha1 = "89b4d199ab2bee49de164ea02b89ce462d71b767";
+      };
+    };
+    "boxen-0.3.1" = {
+      name = "boxen";
+      packageName = "boxen";
+      version = "0.3.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/boxen/-/boxen-0.3.1.tgz";
+        sha1 = "a7d898243ae622f7abb6bb604d740a76c6a5461b";
+      };
+    };
+    "brace-expansion-1.1.11" = {
+      name = "brace-expansion";
+      packageName = "brace-expansion";
+      version = "1.1.11";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz";
+        sha512 = "iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==";
+      };
+    };
+    "bulk-replace-0.0.1" = {
+      name = "bulk-replace";
+      packageName = "bulk-replace";
+      version = "0.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/bulk-replace/-/bulk-replace-0.0.1.tgz";
+        sha1 = "f095682a896abd4b3d9e08de409cc222e213f9dd";
+      };
+    };
+    "camelcase-2.1.1" = {
+      name = "camelcase";
+      packageName = "camelcase";
+      version = "2.1.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/camelcase/-/camelcase-2.1.1.tgz";
+        sha1 = "7c1d16d679a1bbe59ca02cacecfb011e201f5a1f";
+      };
+    };
+    "camelcase-keys-2.1.0" = {
+      name = "camelcase-keys";
+      packageName = "camelcase-keys";
+      version = "2.1.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-2.1.0.tgz";
+        sha1 = "308beeaffdf28119051efa1d932213c91b8f92e7";
+      };
+    };
+    "capture-stack-trace-1.0.1" = {
+      name = "capture-stack-trace";
+      packageName = "capture-stack-trace";
+      version = "1.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/capture-stack-trace/-/capture-stack-trace-1.0.1.tgz";
+        sha512 = "mYQLZnx5Qt1JgB1WEiMCf2647plpGeQ2NMR/5L0HNZzGQo4fuSPnK+wjfPnKZV0aiJDgzmWqqkV/g7JD+DW0qw==";
+      };
+    };
+    "chalk-1.1.3" = {
+      name = "chalk";
+      packageName = "chalk";
+      version = "1.1.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz";
+        sha1 = "a8115c55e4a702fe4d150abd3872822a7e09fc98";
+      };
+    };
+    "chownr-1.1.4" = {
+      name = "chownr";
+      packageName = "chownr";
+      version = "1.1.4";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz";
+        sha512 = "jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==";
+      };
+    };
+    "code-point-at-1.1.0" = {
+      name = "code-point-at";
+      packageName = "code-point-at";
+      version = "1.1.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz";
+        sha1 = "0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77";
+      };
+    };
+    "commander-1.1.1" = {
+      name = "commander";
+      packageName = "commander";
+      version = "1.1.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/commander/-/commander-1.1.1.tgz";
+        sha1 = "50d1651868ae60eccff0a2d9f34595376bc6b041";
+      };
+    };
+    "concat-map-0.0.1" = {
+      name = "concat-map";
+      packageName = "concat-map";
+      version = "0.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz";
+        sha1 = "d8a96bd77fd68df7793a73036a3ba0d5405d477b";
+      };
+    };
+    "configstore-2.1.0" = {
+      name = "configstore";
+      packageName = "configstore";
+      version = "2.1.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/configstore/-/configstore-2.1.0.tgz";
+        sha1 = "737a3a7036e9886102aa6099e47bb33ab1aba1a1";
+      };
+    };
+    "console-control-strings-1.1.0" = {
+      name = "console-control-strings";
+      packageName = "console-control-strings";
+      version = "1.1.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz";
+        sha1 = "3d7cf4464db6446ea644bf4b39507f9851008e8e";
+      };
+    };
+    "core-util-is-1.0.2" = {
+      name = "core-util-is";
+      packageName = "core-util-is";
+      version = "1.0.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz";
+        sha1 = "b5fd54220aa2bc5ab57aab7140c940754503c1a7";
+      };
+    };
+    "create-error-class-3.0.2" = {
+      name = "create-error-class";
+      packageName = "create-error-class";
+      version = "3.0.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/create-error-class/-/create-error-class-3.0.2.tgz";
+        sha1 = "06be7abef947a3f14a30fd610671d401bca8b7b6";
+      };
+    };
+    "currently-unhandled-0.4.1" = {
+      name = "currently-unhandled";
+      packageName = "currently-unhandled";
+      version = "0.4.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/currently-unhandled/-/currently-unhandled-0.4.1.tgz";
+        sha1 = "988df33feab191ef799a61369dd76c17adf957ea";
+      };
+    };
+    "debug-3.2.7" = {
+      name = "debug";
+      packageName = "debug";
+      version = "3.2.7";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz";
+        sha512 = "CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==";
+      };
+    };
+    "decamelize-1.2.0" = {
+      name = "decamelize";
+      packageName = "decamelize";
+      version = "1.2.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz";
+        sha1 = "f6534d15148269b20352e7bee26f501f9a191290";
+      };
+    };
+    "deep-extend-0.6.0" = {
+      name = "deep-extend";
+      packageName = "deep-extend";
+      version = "0.6.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz";
+        sha512 = "LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==";
+      };
+    };
+    "delegates-1.0.0" = {
+      name = "delegates";
+      packageName = "delegates";
+      version = "1.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz";
+        sha1 = "84c6e159b81904fdca59a0ef44cd870d31250f9a";
+      };
+    };
+    "detect-libc-1.0.3" = {
+      name = "detect-libc";
+      packageName = "detect-libc";
+      version = "1.0.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz";
+        sha1 = "fa137c4bd698edf55cd5cd02ac559f91a4c4ba9b";
+      };
+    };
+    "dot-prop-3.0.0" = {
+      name = "dot-prop";
+      packageName = "dot-prop";
+      version = "3.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/dot-prop/-/dot-prop-3.0.0.tgz";
+        sha1 = "1b708af094a49c9a0e7dbcad790aba539dac1177";
+      };
+    };
+    "duplexer2-0.1.4" = {
+      name = "duplexer2";
+      packageName = "duplexer2";
+      version = "0.1.4";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/duplexer2/-/duplexer2-0.1.4.tgz";
+        sha1 = "8b12dab878c0d69e3e7891051662a32fc6bddcc1";
+      };
+    };
+    "ejs-2.7.4" = {
+      name = "ejs";
+      packageName = "ejs";
+      version = "2.7.4";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/ejs/-/ejs-2.7.4.tgz";
+        sha512 = "7vmuyh5+kuUyJKePhQfRQBhXV5Ce+RnaeeQArKu1EAMpL3WbgMt5WG6uQZpEVvYSSsxMXRKOewtDk9RaTKXRlA==";
+      };
+    };
+    "error-ex-1.3.2" = {
+      name = "error-ex";
+      packageName = "error-ex";
+      version = "1.3.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz";
+        sha512 = "7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==";
+      };
+    };
+    "escape-string-regexp-1.0.5" = {
+      name = "escape-string-regexp";
+      packageName = "escape-string-regexp";
+      version = "1.0.5";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz";
+        sha1 = "1b61c0562190a8dff6ae3bb2cf0200ca130b86d4";
+      };
+    };
+    "esprima-4.0.1" = {
+      name = "esprima";
+      packageName = "esprima";
+      version = "4.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz";
+        sha512 = "eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==";
+      };
+    };
+    "filled-array-1.1.0" = {
+      name = "filled-array";
+      packageName = "filled-array";
+      version = "1.1.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/filled-array/-/filled-array-1.1.0.tgz";
+        sha1 = "c3c4f6c663b923459a9aa29912d2d031f1507f84";
+      };
+    };
+    "find-up-1.1.2" = {
+      name = "find-up";
+      packageName = "find-up";
+      version = "1.1.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz";
+        sha1 = "6b2e9822b1a2ce0a60ab64d610eccad53cb24d0f";
+      };
+    };
+    "fs-minipass-1.2.7" = {
+      name = "fs-minipass";
+      packageName = "fs-minipass";
+      version = "1.2.7";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/fs-minipass/-/fs-minipass-1.2.7.tgz";
+        sha512 = "GWSSJGFy4e9GUeCcbIkED+bgAoFyj7XF1mV8rma3QW4NIqX9Kyx79N/PF61H5udOV3aY1IaMLs6pGbH71nlCTA==";
+      };
+    };
+    "fs-promise-0.3.1" = {
+      name = "fs-promise";
+      packageName = "fs-promise";
+      version = "0.3.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/fs-promise/-/fs-promise-0.3.1.tgz";
+        sha1 = "bf34050368f24d6dc9dfc6688ab5cead8f86842a";
+      };
+    };
+    "fs.realpath-1.0.0" = {
+      name = "fs.realpath";
+      packageName = "fs.realpath";
+      version = "1.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz";
+        sha1 = "1504ad2523158caa40db4a2787cb01411994ea4f";
+      };
+    };
+    "function-bind-1.1.1" = {
+      name = "function-bind";
+      packageName = "function-bind";
+      version = "1.1.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz";
+        sha512 = "yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==";
+      };
+    };
+    "gauge-2.7.4" = {
+      name = "gauge";
+      packageName = "gauge";
+      version = "2.7.4";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz";
+        sha1 = "2c03405c7538c39d7eb37b317022e325fb018bf7";
+      };
+    };
+    "get-stdin-4.0.1" = {
+      name = "get-stdin";
+      packageName = "get-stdin";
+      version = "4.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/get-stdin/-/get-stdin-4.0.1.tgz";
+        sha1 = "b968c6b0a04384324902e8bf1a5df32579a450fe";
+      };
+    };
+    "glob-7.1.6" = {
+      name = "glob";
+      packageName = "glob";
+      version = "7.1.6";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz";
+        sha512 = "LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==";
+      };
+    };
+    "got-5.7.1" = {
+      name = "got";
+      packageName = "got";
+      version = "5.7.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/got/-/got-5.7.1.tgz";
+        sha1 = "5f81635a61e4a6589f180569ea4e381680a51f35";
+      };
+    };
+    "graceful-fs-4.2.4" = {
+      name = "graceful-fs";
+      packageName = "graceful-fs";
+      version = "4.2.4";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.4.tgz";
+        sha512 = "WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw==";
+      };
+    };
+    "has-1.0.3" = {
+      name = "has";
+      packageName = "has";
+      version = "1.0.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/has/-/has-1.0.3.tgz";
+        sha512 = "f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==";
+      };
+    };
+    "has-ansi-2.0.0" = {
+      name = "has-ansi";
+      packageName = "has-ansi";
+      version = "2.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz";
+        sha1 = "34f5049ce1ecdf2b0649af3ef24e45ed35416d91";
+      };
+    };
+    "has-unicode-2.0.1" = {
+      name = "has-unicode";
+      packageName = "has-unicode";
+      version = "2.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz";
+        sha1 = "e0e6fe6a28cf51138855e086d1691e771de2a8b9";
+      };
+    };
+    "hepburn-1.2.0" = {
+      name = "hepburn";
+      packageName = "hepburn";
+      version = "1.2.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/hepburn/-/hepburn-1.2.0.tgz";
+        sha512 = "xWjHb03dN/ivNcqG2vqA//sHQ0oapYGZ9QV/2TR7m2+cggxzoVpbDxZn9s/Zm1tF88/7a1IpdZyn00tNP5oABA==";
+      };
+    };
+    "hosted-git-info-2.8.8" = {
+      name = "hosted-git-info";
+      packageName = "hosted-git-info";
+      version = "2.8.8";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.8.tgz";
+        sha512 = "f/wzC2QaWBs7t9IYqB4T3sR1xviIViXJRJTWBlx2Gf3g0Xi5vI7Yy4koXQ1c9OYDGHN9sBy1DQ2AB8fqZBWhUg==";
+      };
+    };
+    "iconv-lite-0.4.24" = {
+      name = "iconv-lite";
+      packageName = "iconv-lite";
+      version = "0.4.24";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz";
+        sha512 = "v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==";
+      };
+    };
+    "ignore-walk-3.0.3" = {
+      name = "ignore-walk";
+      packageName = "ignore-walk";
+      version = "3.0.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/ignore-walk/-/ignore-walk-3.0.3.tgz";
+        sha512 = "m7o6xuOaT1aqheYHKf8W6J5pYH85ZI9w077erOzLje3JsB1gkafkAhHHY19dqjulgIZHFm32Cp5uNZgcQqdJKw==";
+      };
+    };
+    "imurmurhash-0.1.4" = {
+      name = "imurmurhash";
+      packageName = "imurmurhash";
+      version = "0.1.4";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz";
+        sha1 = "9218b9b2b928a238b13dc4fb6b6d576f231453ea";
+      };
+    };
+    "indent-string-2.1.0" = {
+      name = "indent-string";
+      packageName = "indent-string";
+      version = "2.1.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/indent-string/-/indent-string-2.1.0.tgz";
+        sha1 = "8e2d48348742121b4a8218b7a137e9a52049dc80";
+      };
+    };
+    "inflight-1.0.6" = {
+      name = "inflight";
+      packageName = "inflight";
+      version = "1.0.6";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz";
+        sha1 = "49bd6331d7d02d0c09bc910a1075ba8165b56df9";
+      };
+    };
+    "inherits-2.0.4" = {
+      name = "inherits";
+      packageName = "inherits";
+      version = "2.0.4";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz";
+        sha512 = "k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==";
+      };
+    };
+    "ini-1.3.8" = {
+      name = "ini";
+      packageName = "ini";
+      version = "1.3.8";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz";
+        sha512 = "JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==";
+      };
+    };
+    "is-arrayish-0.2.1" = {
+      name = "is-arrayish";
+      packageName = "is-arrayish";
+      version = "0.2.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz";
+        sha1 = "77c99840527aa8ecb1a8ba697b80645a7a926a9d";
+      };
+    };
+    "is-core-module-2.2.0" = {
+      name = "is-core-module";
+      packageName = "is-core-module";
+      version = "2.2.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/is-core-module/-/is-core-module-2.2.0.tgz";
+        sha512 = "XRAfAdyyY5F5cOXn7hYQDqh2Xmii+DEfIcQGxK/uNwMHhIkPWO0g8msXcbzLe+MpGoR951MlqM/2iIlU4vKDdQ==";
+      };
+    };
+    "is-finite-1.1.0" = {
+      name = "is-finite";
+      packageName = "is-finite";
+      version = "1.1.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/is-finite/-/is-finite-1.1.0.tgz";
+        sha512 = "cdyMtqX/BOqqNBBiKlIVkytNHm49MtMlYyn1zxzvJKWmFMlGzm+ry5BBfYyeY9YmNKbRSo/o7OX9w9ale0wg3w==";
+      };
+    };
+    "is-fullwidth-code-point-1.0.0" = {
+      name = "is-fullwidth-code-point";
+      packageName = "is-fullwidth-code-point";
+      version = "1.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz";
+        sha1 = "ef9e31386f031a7f0d643af82fde50c457ef00cb";
+      };
+    };
+    "is-npm-1.0.0" = {
+      name = "is-npm";
+      packageName = "is-npm";
+      version = "1.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/is-npm/-/is-npm-1.0.0.tgz";
+        sha1 = "f2fb63a65e4905b406c86072765a1a4dc793b9f4";
+      };
+    };
+    "is-obj-1.0.1" = {
+      name = "is-obj";
+      packageName = "is-obj";
+      version = "1.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz";
+        sha1 = "3e4729ac1f5fde025cd7d83a896dab9f4f67db0f";
+      };
+    };
+    "is-redirect-1.0.0" = {
+      name = "is-redirect";
+      packageName = "is-redirect";
+      version = "1.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/is-redirect/-/is-redirect-1.0.0.tgz";
+        sha1 = "1d03dded53bd8db0f30c26e4f95d36fc7c87dc24";
+      };
+    };
+    "is-retry-allowed-1.2.0" = {
+      name = "is-retry-allowed";
+      packageName = "is-retry-allowed";
+      version = "1.2.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/is-retry-allowed/-/is-retry-allowed-1.2.0.tgz";
+        sha512 = "RUbUeKwvm3XG2VYamhJL1xFktgjvPzL0Hq8C+6yrWIswDy3BIXGqCxhxkc30N9jqK311gVU137K8Ei55/zVJRg==";
+      };
+    };
+    "is-stream-1.1.0" = {
+      name = "is-stream";
+      packageName = "is-stream";
+      version = "1.1.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz";
+        sha1 = "12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44";
+      };
+    };
+    "is-utf8-0.2.1" = {
+      name = "is-utf8";
+      packageName = "is-utf8";
+      version = "0.2.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz";
+        sha1 = "4b0da1442104d1b336340e80797e865cf39f7d72";
+      };
+    };
+    "isarray-1.0.0" = {
+      name = "isarray";
+      packageName = "isarray";
+      version = "1.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz";
+        sha1 = "bb935d48582cba168c06834957a54a3e07124f11";
+      };
+    };
+    "js-yaml-3.14.1" = {
+      name = "js-yaml";
+      packageName = "js-yaml";
+      version = "3.14.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz";
+        sha512 = "okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==";
+      };
+    };
+    "keypress-0.1.0" = {
+      name = "keypress";
+      packageName = "keypress";
+      version = "0.1.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/keypress/-/keypress-0.1.0.tgz";
+        sha1 = "4a3188d4291b66b4f65edb99f806aa9ae293592a";
+      };
+    };
+    "latest-version-2.0.0" = {
+      name = "latest-version";
+      packageName = "latest-version";
+      version = "2.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/latest-version/-/latest-version-2.0.0.tgz";
+        sha1 = "56f8d6139620847b8017f8f1f4d78e211324168b";
+      };
+    };
+    "limax-1.7.0" = {
+      name = "limax";
+      packageName = "limax";
+      version = "1.7.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/limax/-/limax-1.7.0.tgz";
+        sha512 = "ibcGylOXT5vry2JKfKwLWx2tZudRYWm4SzG9AE/cc5zqwW+3nQy/uPLUvfAUChRdmqxVrK6SNepmO7ZY8RoKfA==";
+      };
+    };
+    "load-json-file-1.1.0" = {
+      name = "load-json-file";
+      packageName = "load-json-file";
+      version = "1.1.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz";
+        sha1 = "956905708d58b4bab4c2261b04f59f31c99374c0";
+      };
+    };
+    "loud-rejection-1.6.0" = {
+      name = "loud-rejection";
+      packageName = "loud-rejection";
+      version = "1.6.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/loud-rejection/-/loud-rejection-1.6.0.tgz";
+        sha1 = "5b46f80147edee578870f086d04821cf998e551f";
+      };
+    };
+    "lowercase-keys-1.0.1" = {
+      name = "lowercase-keys";
+      packageName = "lowercase-keys";
+      version = "1.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.1.tgz";
+        sha512 = "G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA==";
+      };
+    };
+    "map-obj-1.0.1" = {
+      name = "map-obj";
+      packageName = "map-obj";
+      version = "1.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz";
+        sha1 = "d933ceb9205d82bdcf4886f6742bdc2b4dea146d";
+      };
+    };
+    "meow-3.7.0" = {
+      name = "meow";
+      packageName = "meow";
+      version = "3.7.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/meow/-/meow-3.7.0.tgz";
+        sha1 = "72cb668b425228290abbfa856892587308a801fb";
+      };
+    };
+    "minimatch-3.0.4" = {
+      name = "minimatch";
+      packageName = "minimatch";
+      version = "3.0.4";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz";
+        sha512 = "yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==";
+      };
+    };
+    "minimist-1.2.5" = {
+      name = "minimist";
+      packageName = "minimist";
+      version = "1.2.5";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz";
+        sha512 = "FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==";
+      };
+    };
+    "minipass-2.9.0" = {
+      name = "minipass";
+      packageName = "minipass";
+      version = "2.9.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/minipass/-/minipass-2.9.0.tgz";
+        sha512 = "wxfUjg9WebH+CUDX/CdbRlh5SmfZiy/hpkxaRI16Y9W56Pa75sWgd/rvFilSgrauD9NyFymP/+JFV3KwzIsJeg==";
+      };
+    };
+    "minizlib-1.3.3" = {
+      name = "minizlib";
+      packageName = "minizlib";
+      version = "1.3.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/minizlib/-/minizlib-1.3.3.tgz";
+        sha512 = "6ZYMOEnmVsdCeTJVE0W9ZD+pVnE8h9Hma/iOwwRDsdQoePpoX56/8B6z3P9VNwppJuBKNRuFDRNRqRWexT9G9Q==";
+      };
+    };
+    "mkdirp-0.5.5" = {
+      name = "mkdirp";
+      packageName = "mkdirp";
+      version = "0.5.5";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz";
+        sha512 = "NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==";
+      };
+    };
+    "ms-2.1.3" = {
+      name = "ms";
+      packageName = "ms";
+      version = "2.1.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz";
+        sha512 = "6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==";
+      };
+    };
+    "needle-2.6.0" = {
+      name = "needle";
+      packageName = "needle";
+      version = "2.6.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/needle/-/needle-2.6.0.tgz";
+        sha512 = "KKYdza4heMsEfSWD7VPUIz3zX2XDwOyX2d+geb4vrERZMT5RMU6ujjaD+I5Yr54uZxQ2w6XRTAhHBbSCyovZBg==";
+      };
+    };
+    "node-addon-api-3.1.0" = {
+      name = "node-addon-api";
+      packageName = "node-addon-api";
+      version = "3.1.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/node-addon-api/-/node-addon-api-3.1.0.tgz";
+        sha512 = "flmrDNB06LIl5lywUz7YlNGZH/5p0M7W28k8hzd9Lshtdh1wshD2Y+U4h9LD6KObOy1f+fEVdgprPrEymjM5uw==";
+      };
+    };
+    "node-pre-gyp-0.14.0" = {
+      name = "node-pre-gyp";
+      packageName = "node-pre-gyp";
+      version = "0.14.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/node-pre-gyp/-/node-pre-gyp-0.14.0.tgz";
+        sha512 = "+CvDC7ZttU/sSt9rFjix/P05iS43qHCOOGzcr3Ry99bXG7VX953+vFyEuph/tfqoYu8dttBkE86JSKBO2OzcxA==";
+      };
+    };
+    "node-status-codes-1.0.0" = {
+      name = "node-status-codes";
+      packageName = "node-status-codes";
+      version = "1.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/node-status-codes/-/node-status-codes-1.0.0.tgz";
+        sha1 = "5ae5541d024645d32a58fcddc9ceecea7ae3ac2f";
+      };
+    };
+    "nodejieba-2.5.1" = {
+      name = "nodejieba";
+      packageName = "nodejieba";
+      version = "2.5.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/nodejieba/-/nodejieba-2.5.1.tgz";
+        sha512 = "VnJBQSl2G8swDf3ZAXMbXrMCrGFO+kVKbkB93OaBthGbEG5BrxfD8I2m7auaRX8E5C1t+hlwo3HCmQOWKkiZ9A==";
+      };
+    };
+    "nopt-4.0.3" = {
+      name = "nopt";
+      packageName = "nopt";
+      version = "4.0.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/nopt/-/nopt-4.0.3.tgz";
+        sha512 = "CvaGwVMztSMJLOeXPrez7fyfObdZqNUK1cPAEzLHrTybIua9pMdmmPR5YwtfNftIOMv3DPUhFaxsZMNTQO20Kg==";
+      };
+    };
+    "normalize-package-data-2.5.0" = {
+      name = "normalize-package-data";
+      packageName = "normalize-package-data";
+      version = "2.5.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz";
+        sha512 = "/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==";
+      };
+    };
+    "npm-bundled-1.1.1" = {
+      name = "npm-bundled";
+      packageName = "npm-bundled";
+      version = "1.1.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/npm-bundled/-/npm-bundled-1.1.1.tgz";
+        sha512 = "gqkfgGePhTpAEgUsGEgcq1rqPXA+tv/aVBlgEzfXwA1yiUJF7xtEt3CtVwOjNYQOVknDk0F20w58Fnm3EtG0fA==";
+      };
+    };
+    "npm-normalize-package-bin-1.0.1" = {
+      name = "npm-normalize-package-bin";
+      packageName = "npm-normalize-package-bin";
+      version = "1.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/npm-normalize-package-bin/-/npm-normalize-package-bin-1.0.1.tgz";
+        sha512 = "EPfafl6JL5/rU+ot6P3gRSCpPDW5VmIzX959Ob1+ySFUuuYHWHekXpwdUZcKP5C+DS4GEtdJluwBjnsNDl+fSA==";
+      };
+    };
+    "npm-packlist-1.4.8" = {
+      name = "npm-packlist";
+      packageName = "npm-packlist";
+      version = "1.4.8";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/npm-packlist/-/npm-packlist-1.4.8.tgz";
+        sha512 = "5+AZgwru5IevF5ZdnFglB5wNlHG1AOOuw28WhUq8/8emhBmLv6jX5by4WJCh7lW0uSYZYS6DXqIsyZVIXRZU9A==";
+      };
+    };
+    "npmlog-4.1.2" = {
+      name = "npmlog";
+      packageName = "npmlog";
+      version = "4.1.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz";
+        sha512 = "2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==";
+      };
+    };
+    "number-is-nan-1.0.1" = {
+      name = "number-is-nan";
+      packageName = "number-is-nan";
+      version = "1.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz";
+        sha1 = "097b602b53422a522c1afb8790318336941a011d";
+      };
+    };
+    "object-assign-4.1.1" = {
+      name = "object-assign";
+      packageName = "object-assign";
+      version = "4.1.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz";
+        sha1 = "2109adc7965887cfc05cbbd442cac8bfbb360863";
+      };
+    };
+    "once-1.4.0" = {
+      name = "once";
+      packageName = "once";
+      version = "1.4.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/once/-/once-1.4.0.tgz";
+        sha1 = "583b1aa775961d4b113ac17d9c50baef9dd76bd1";
+      };
+    };
+    "open-0.0.5" = {
+      name = "open";
+      packageName = "open";
+      version = "0.0.5";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/open/-/open-0.0.5.tgz";
+        sha1 = "42c3e18ec95466b6bf0dc42f3a2945c3f0cad8fc";
+      };
+    };
+    "os-homedir-1.0.2" = {
+      name = "os-homedir";
+      packageName = "os-homedir";
+      version = "1.0.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz";
+        sha1 = "ffbc4988336e0e833de0c168c7ef152121aa7fb3";
+      };
+    };
+    "os-tmpdir-1.0.2" = {
+      name = "os-tmpdir";
+      packageName = "os-tmpdir";
+      version = "1.0.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz";
+        sha1 = "bbe67406c79aa85c5cfec766fe5734555dfa1274";
+      };
+    };
+    "osenv-0.1.5" = {
+      name = "osenv";
+      packageName = "osenv";
+      version = "0.1.5";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/osenv/-/osenv-0.1.5.tgz";
+        sha512 = "0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g==";
+      };
+    };
+    "package-json-2.4.0" = {
+      name = "package-json";
+      packageName = "package-json";
+      version = "2.4.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/package-json/-/package-json-2.4.0.tgz";
+        sha1 = "0d15bd67d1cbbddbb2ca222ff2edb86bcb31a8bb";
+      };
+    };
+    "parse-json-2.2.0" = {
+      name = "parse-json";
+      packageName = "parse-json";
+      version = "2.2.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz";
+        sha1 = "f480f40434ef80741f8469099f8dea18f55a4dc9";
+      };
+    };
+    "path-exists-2.1.0" = {
+      name = "path-exists";
+      packageName = "path-exists";
+      version = "2.1.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz";
+        sha1 = "0feb6c64f0fc518d9a754dd5efb62c7022761f4b";
+      };
+    };
+    "path-is-absolute-1.0.1" = {
+      name = "path-is-absolute";
+      packageName = "path-is-absolute";
+      version = "1.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz";
+        sha1 = "174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f";
+      };
+    };
+    "path-parse-1.0.6" = {
+      name = "path-parse";
+      packageName = "path-parse";
+      version = "1.0.6";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz";
+        sha512 = "GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==";
+      };
+    };
+    "path-type-1.1.0" = {
+      name = "path-type";
+      packageName = "path-type";
+      version = "1.1.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz";
+        sha1 = "59c44f7ee491da704da415da5a4070ba4f8fe441";
+      };
+    };
+    "pify-2.3.0" = {
+      name = "pify";
+      packageName = "pify";
+      version = "2.3.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz";
+        sha1 = "ed141a6ac043a849ea588498e7dca8b15330e90c";
+      };
+    };
+    "pinkie-2.0.4" = {
+      name = "pinkie";
+      packageName = "pinkie";
+      version = "2.0.4";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz";
+        sha1 = "72556b80cfa0d48a974e80e77248e80ed4f7f870";
+      };
+    };
+    "pinkie-promise-2.0.1" = {
+      name = "pinkie-promise";
+      packageName = "pinkie-promise";
+      version = "2.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz";
+        sha1 = "2135d6dfa7a358c069ac9b178776288228450ffa";
+      };
+    };
+    "pinyin-2.9.1" = {
+      name = "pinyin";
+      packageName = "pinyin";
+      version = "2.9.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/pinyin/-/pinyin-2.9.1.tgz";
+        sha512 = "U7kHlVP6yUYl2DV2bX4brlYWdgaAlwtqJrdkboiyri9ixRDVqVO3LD98te3PT5deN5EA9W8ywuG9GaYZfiiIlw==";
+      };
+    };
+    "prepend-http-1.0.4" = {
+      name = "prepend-http";
+      packageName = "prepend-http";
+      version = "1.0.4";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/prepend-http/-/prepend-http-1.0.4.tgz";
+        sha1 = "d4f4562b0ce3696e41ac52d0e002e57a635dc6dc";
+      };
+    };
+    "process-nextick-args-2.0.1" = {
+      name = "process-nextick-args";
+      packageName = "process-nextick-args";
+      version = "2.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz";
+        sha512 = "3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==";
+      };
+    };
+    "rc-1.2.8" = {
+      name = "rc";
+      packageName = "rc";
+      version = "1.2.8";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz";
+        sha512 = "y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==";
+      };
+    };
+    "read-all-stream-3.1.0" = {
+      name = "read-all-stream";
+      packageName = "read-all-stream";
+      version = "3.1.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/read-all-stream/-/read-all-stream-3.1.0.tgz";
+        sha1 = "35c3e177f2078ef789ee4bfafa4373074eaef4fa";
+      };
+    };
+    "read-pkg-1.1.0" = {
+      name = "read-pkg";
+      packageName = "read-pkg";
+      version = "1.1.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz";
+        sha1 = "f5ffaa5ecd29cb31c0474bca7d756b6bb29e3f28";
+      };
+    };
+    "read-pkg-up-1.0.1" = {
+      name = "read-pkg-up";
+      packageName = "read-pkg-up";
+      version = "1.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz";
+        sha1 = "9d63c13276c065918d57f002a57f40a1b643fb02";
+      };
+    };
+    "readable-stream-2.3.7" = {
+      name = "readable-stream";
+      packageName = "readable-stream";
+      version = "2.3.7";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz";
+        sha512 = "Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==";
+      };
+    };
+    "redent-1.0.0" = {
+      name = "redent";
+      packageName = "redent";
+      version = "1.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/redent/-/redent-1.0.0.tgz";
+        sha1 = "cf916ab1fd5f1f16dfb20822dd6ec7f730c2afde";
+      };
+    };
+    "registry-auth-token-3.4.0" = {
+      name = "registry-auth-token";
+      packageName = "registry-auth-token";
+      version = "3.4.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-3.4.0.tgz";
+        sha512 = "4LM6Fw8eBQdwMYcES4yTnn2TqIasbXuwDx3um+QRs7S55aMKCBKBxvPXl2RiUjHwuJLTyYfxSpmfSAjQpcuP+A==";
+      };
+    };
+    "registry-url-3.1.0" = {
+      name = "registry-url";
+      packageName = "registry-url";
+      version = "3.1.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/registry-url/-/registry-url-3.1.0.tgz";
+        sha1 = "3d4ef870f73dde1d77f0cf9a381432444e174942";
+      };
+    };
+    "repeating-2.0.1" = {
+      name = "repeating";
+      packageName = "repeating";
+      version = "2.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/repeating/-/repeating-2.0.1.tgz";
+        sha1 = "5214c53a926d3552707527fbab415dbc08d06dda";
+      };
+    };
+    "resolve-1.19.0" = {
+      name = "resolve";
+      packageName = "resolve";
+      version = "1.19.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/resolve/-/resolve-1.19.0.tgz";
+        sha512 = "rArEXAgsBG4UgRGcynxWIWKFvh/XZCcS8UJdHhwy91zwAvCZIbcs+vAbflgBnNjYMs/i/i+/Ux6IZhML1yPvxg==";
+      };
+    };
+    "rimraf-2.7.1" = {
+      name = "rimraf";
+      packageName = "rimraf";
+      version = "2.7.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz";
+        sha512 = "uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==";
+      };
+    };
+    "safe-buffer-5.1.2" = {
+      name = "safe-buffer";
+      packageName = "safe-buffer";
+      version = "5.1.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz";
+        sha512 = "Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==";
+      };
+    };
+    "safer-buffer-2.1.2" = {
+      name = "safer-buffer";
+      packageName = "safer-buffer";
+      version = "2.1.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz";
+        sha512 = "YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==";
+      };
+    };
+    "sax-1.2.4" = {
+      name = "sax";
+      packageName = "sax";
+      version = "1.2.4";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz";
+        sha512 = "NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==";
+      };
+    };
+    "semver-5.7.1" = {
+      name = "semver";
+      packageName = "semver";
+      version = "5.7.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz";
+        sha512 = "sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==";
+      };
+    };
+    "semver-diff-2.1.0" = {
+      name = "semver-diff";
+      packageName = "semver-diff";
+      version = "2.1.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/semver-diff/-/semver-diff-2.1.0.tgz";
+        sha1 = "4bbb8437c8d37e4b0cf1a68fd726ec6d645d6d36";
+      };
+    };
+    "set-blocking-2.0.0" = {
+      name = "set-blocking";
+      packageName = "set-blocking";
+      version = "2.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz";
+        sha1 = "045f9782d011ae9a6803ddd382b24392b3d890f7";
+      };
+    };
+    "signal-exit-3.0.3" = {
+      name = "signal-exit";
+      packageName = "signal-exit";
+      version = "3.0.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.3.tgz";
+        sha512 = "VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA==";
+      };
+    };
+    "slide-1.1.6" = {
+      name = "slide";
+      packageName = "slide";
+      version = "1.1.6";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/slide/-/slide-1.1.6.tgz";
+        sha1 = "56eb027d65b4d2dce6cb2e2d32c4d4afc9e1d707";
+      };
+    };
+    "spdx-correct-3.1.1" = {
+      name = "spdx-correct";
+      packageName = "spdx-correct";
+      version = "3.1.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.1.tgz";
+        sha512 = "cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w==";
+      };
+    };
+    "spdx-exceptions-2.3.0" = {
+      name = "spdx-exceptions";
+      packageName = "spdx-exceptions";
+      version = "2.3.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz";
+        sha512 = "/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==";
+      };
+    };
+    "spdx-expression-parse-3.0.1" = {
+      name = "spdx-expression-parse";
+      packageName = "spdx-expression-parse";
+      version = "3.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz";
+        sha512 = "cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==";
+      };
+    };
+    "spdx-license-ids-3.0.7" = {
+      name = "spdx-license-ids";
+      packageName = "spdx-license-ids";
+      version = "3.0.7";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.7.tgz";
+        sha512 = "U+MTEOO0AiDzxwFvoa4JVnMV6mZlJKk2sBLt90s7G0Gd0Mlknc7kxEn3nuDPNZRta7O2uy8oLcZLVT+4sqNZHQ==";
+      };
+    };
+    "speakingurl-14.0.1" = {
+      name = "speakingurl";
+      packageName = "speakingurl";
+      version = "14.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/speakingurl/-/speakingurl-14.0.1.tgz";
+        sha512 = "1POYv7uv2gXoyGFpBCmpDVSNV74IfsWlDW216UPjbWufNf+bSU6GdbDsxdcxtfwb4xlI3yxzOTKClUosxARYrQ==";
+      };
+    };
+    "sprintf-js-1.0.3" = {
+      name = "sprintf-js";
+      packageName = "sprintf-js";
+      version = "1.0.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz";
+        sha1 = "04e6926f662895354f3dd015203633b857297e2c";
+      };
+    };
+    "string-width-1.0.2" = {
+      name = "string-width";
+      packageName = "string-width";
+      version = "1.0.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz";
+        sha1 = "118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3";
+      };
+    };
+    "string_decoder-1.1.1" = {
+      name = "string_decoder";
+      packageName = "string_decoder";
+      version = "1.1.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz";
+        sha512 = "n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==";
+      };
+    };
+    "strip-ansi-3.0.1" = {
+      name = "strip-ansi";
+      packageName = "strip-ansi";
+      version = "3.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz";
+        sha1 = "6a385fb8853d952d5ff05d0e8aaf94278dc63dcf";
+      };
+    };
+    "strip-bom-2.0.0" = {
+      name = "strip-bom";
+      packageName = "strip-bom";
+      version = "2.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz";
+        sha1 = "6219a85616520491f35788bdbf1447a99c7e6b0e";
+      };
+    };
+    "strip-indent-1.0.1" = {
+      name = "strip-indent";
+      packageName = "strip-indent";
+      version = "1.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/strip-indent/-/strip-indent-1.0.1.tgz";
+        sha1 = "0c7962a6adefa7bbd4ac366460a638552ae1a0a2";
+      };
+    };
+    "strip-json-comments-2.0.1" = {
+      name = "strip-json-comments";
+      packageName = "strip-json-comments";
+      version = "2.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz";
+        sha1 = "3c531942e908c2697c0ec344858c286c7ca0a60a";
+      };
+    };
+    "supports-color-2.0.0" = {
+      name = "supports-color";
+      packageName = "supports-color";
+      version = "2.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz";
+        sha1 = "535d045ce6b6363fa40117084629995e9df324c7";
+      };
+    };
+    "tar-4.4.13" = {
+      name = "tar";
+      packageName = "tar";
+      version = "4.4.13";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/tar/-/tar-4.4.13.tgz";
+        sha512 = "w2VwSrBoHa5BsSyH+KxEqeQBAllHhccyMFVHtGtdMpF4W7IRWfZjFiQceJPChOeTsSDVUpER2T8FA93pr0L+QA==";
+      };
+    };
+    "timed-out-3.1.3" = {
+      name = "timed-out";
+      packageName = "timed-out";
+      version = "3.1.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/timed-out/-/timed-out-3.1.3.tgz";
+        sha1 = "95860bfcc5c76c277f8f8326fd0f5b2e20eba217";
+      };
+    };
+    "trim-newlines-1.0.0" = {
+      name = "trim-newlines";
+      packageName = "trim-newlines";
+      version = "1.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/trim-newlines/-/trim-newlines-1.0.0.tgz";
+        sha1 = "5887966bb582a4503a41eb524f7d35011815a613";
+      };
+    };
+    "unzip-response-1.0.2" = {
+      name = "unzip-response";
+      packageName = "unzip-response";
+      version = "1.0.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/unzip-response/-/unzip-response-1.0.2.tgz";
+        sha1 = "b984f0877fc0a89c2c773cc1ef7b5b232b5b06fe";
+      };
+    };
+    "update-notifier-0.6.3" = {
+      name = "update-notifier";
+      packageName = "update-notifier";
+      version = "0.6.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/update-notifier/-/update-notifier-0.6.3.tgz";
+        sha1 = "776dec8daa13e962a341e8a1d98354306b67ae08";
+      };
+    };
+    "url-parse-lax-1.0.0" = {
+      name = "url-parse-lax";
+      packageName = "url-parse-lax";
+      version = "1.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-1.0.0.tgz";
+        sha1 = "7af8f303645e9bd79a272e7a14ac68bc0609da73";
+      };
+    };
+    "util-deprecate-1.0.2" = {
+      name = "util-deprecate";
+      packageName = "util-deprecate";
+      version = "1.0.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz";
+        sha1 = "450d4dc9fa70de732762fbd2d4a28981419a0ccf";
+      };
+    };
+    "uuid-2.0.3" = {
+      name = "uuid";
+      packageName = "uuid";
+      version = "2.0.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/uuid/-/uuid-2.0.3.tgz";
+        sha1 = "67e2e863797215530dff318e5bf9dcebfd47b21a";
+      };
+    };
+    "validate-npm-package-license-3.0.4" = {
+      name = "validate-npm-package-license";
+      packageName = "validate-npm-package-license";
+      version = "3.0.4";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz";
+        sha512 = "DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==";
+      };
+    };
+    "wide-align-1.1.3" = {
+      name = "wide-align";
+      packageName = "wide-align";
+      version = "1.1.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz";
+        sha512 = "QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==";
+      };
+    };
+    "widest-line-1.0.0" = {
+      name = "widest-line";
+      packageName = "widest-line";
+      version = "1.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/widest-line/-/widest-line-1.0.0.tgz";
+        sha1 = "0c09c85c2a94683d0d7eaf8ee097d564bf0e105c";
+      };
+    };
+    "wrappy-1.0.2" = {
+      name = "wrappy";
+      packageName = "wrappy";
+      version = "1.0.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz";
+        sha1 = "b5243d8f3ec1aa35f1364605bc0d1036e30ab69f";
+      };
+    };
+    "write-file-atomic-1.3.4" = {
+      name = "write-file-atomic";
+      packageName = "write-file-atomic";
+      version = "1.3.4";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-1.3.4.tgz";
+        sha1 = "f807a4f0b1d9e913ae7a48112e6cc3af1991b45f";
+      };
+    };
+    "xdg-basedir-2.0.0" = {
+      name = "xdg-basedir";
+      packageName = "xdg-basedir";
+      version = "2.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-2.0.0.tgz";
+        sha1 = "edbc903cc385fc04523d966a335504b5504d1bd2";
+      };
+    };
+    "yallist-3.1.1" = {
+      name = "yallist";
+      packageName = "yallist";
+      version = "3.1.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz";
+        sha512 = "a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==";
+      };
+    };
+  };
+in
+{
+  base16-builder = nodeEnv.buildNodePackage {
+    name = "base16-builder";
+    packageName = "base16-builder";
+    version = "1.3.0";
+    src = fetchurl {
+      url = "https://registry.npmjs.org/base16-builder/-/base16-builder-1.3.0.tgz";
+      sha1 = "320eafea9333a8ea2bc8e04bda8db2537c52d23f";
+    };
+    dependencies = [
+      sources."abbrev-1.1.1"
+      sources."ansi-regex-2.1.1"
+      sources."ansi-styles-2.2.1"
+      sources."any-promise-0.1.0"
+      sources."aproba-1.2.0"
+      sources."are-we-there-yet-1.1.5"
+      sources."argparse-1.0.10"
+      sources."array-find-index-1.0.2"
+      sources."balanced-match-1.0.0"
+      sources."boxen-0.3.1"
+      sources."brace-expansion-1.1.11"
+      sources."bulk-replace-0.0.1"
+      sources."camelcase-2.1.1"
+      sources."camelcase-keys-2.1.0"
+      sources."capture-stack-trace-1.0.1"
+      sources."chalk-1.1.3"
+      sources."chownr-1.1.4"
+      sources."code-point-at-1.1.0"
+      sources."commander-1.1.1"
+      sources."concat-map-0.0.1"
+      sources."configstore-2.1.0"
+      sources."console-control-strings-1.1.0"
+      sources."core-util-is-1.0.2"
+      sources."create-error-class-3.0.2"
+      sources."currently-unhandled-0.4.1"
+      sources."debug-3.2.7"
+      sources."decamelize-1.2.0"
+      sources."deep-extend-0.6.0"
+      sources."delegates-1.0.0"
+      sources."detect-libc-1.0.3"
+      sources."dot-prop-3.0.0"
+      sources."duplexer2-0.1.4"
+      sources."ejs-2.7.4"
+      sources."error-ex-1.3.2"
+      sources."escape-string-regexp-1.0.5"
+      sources."esprima-4.0.1"
+      sources."filled-array-1.1.0"
+      sources."find-up-1.1.2"
+      sources."fs-minipass-1.2.7"
+      sources."fs-promise-0.3.1"
+      sources."fs.realpath-1.0.0"
+      sources."function-bind-1.1.1"
+      sources."gauge-2.7.4"
+      sources."get-stdin-4.0.1"
+      sources."glob-7.1.6"
+      sources."got-5.7.1"
+      sources."graceful-fs-4.2.4"
+      sources."has-1.0.3"
+      sources."has-ansi-2.0.0"
+      sources."has-unicode-2.0.1"
+      sources."hepburn-1.2.0"
+      sources."hosted-git-info-2.8.8"
+      sources."iconv-lite-0.4.24"
+      sources."ignore-walk-3.0.3"
+      sources."imurmurhash-0.1.4"
+      sources."indent-string-2.1.0"
+      sources."inflight-1.0.6"
+      sources."inherits-2.0.4"
+      sources."ini-1.3.8"
+      sources."is-arrayish-0.2.1"
+      sources."is-core-module-2.2.0"
+      sources."is-finite-1.1.0"
+      sources."is-fullwidth-code-point-1.0.0"
+      sources."is-npm-1.0.0"
+      sources."is-obj-1.0.1"
+      sources."is-redirect-1.0.0"
+      sources."is-retry-allowed-1.2.0"
+      sources."is-stream-1.1.0"
+      sources."is-utf8-0.2.1"
+      sources."isarray-1.0.0"
+      sources."js-yaml-3.14.1"
+      sources."keypress-0.1.0"
+      sources."latest-version-2.0.0"
+      sources."limax-1.7.0"
+      sources."load-json-file-1.1.0"
+      sources."loud-rejection-1.6.0"
+      sources."lowercase-keys-1.0.1"
+      sources."map-obj-1.0.1"
+      sources."meow-3.7.0"
+      sources."minimatch-3.0.4"
+      sources."minimist-1.2.5"
+      sources."minipass-2.9.0"
+      sources."minizlib-1.3.3"
+      sources."mkdirp-0.5.5"
+      sources."ms-2.1.3"
+      sources."needle-2.6.0"
+      sources."node-addon-api-3.1.0"
+      sources."node-pre-gyp-0.14.0"
+      sources."node-status-codes-1.0.0"
+      sources."nodejieba-2.5.1"
+      sources."nopt-4.0.3"
+      sources."normalize-package-data-2.5.0"
+      sources."npm-bundled-1.1.1"
+      sources."npm-normalize-package-bin-1.0.1"
+      sources."npm-packlist-1.4.8"
+      sources."npmlog-4.1.2"
+      sources."number-is-nan-1.0.1"
+      sources."object-assign-4.1.1"
+      sources."once-1.4.0"
+      sources."open-0.0.5"
+      sources."os-homedir-1.0.2"
+      sources."os-tmpdir-1.0.2"
+      sources."osenv-0.1.5"
+      sources."package-json-2.4.0"
+      sources."parse-json-2.2.0"
+      sources."path-exists-2.1.0"
+      sources."path-is-absolute-1.0.1"
+      sources."path-parse-1.0.6"
+      sources."path-type-1.1.0"
+      sources."pify-2.3.0"
+      sources."pinkie-2.0.4"
+      sources."pinkie-promise-2.0.1"
+      sources."pinyin-2.9.1"
+      sources."prepend-http-1.0.4"
+      sources."process-nextick-args-2.0.1"
+      sources."rc-1.2.8"
+      sources."read-all-stream-3.1.0"
+      sources."read-pkg-1.1.0"
+      sources."read-pkg-up-1.0.1"
+      sources."readable-stream-2.3.7"
+      sources."redent-1.0.0"
+      sources."registry-auth-token-3.4.0"
+      sources."registry-url-3.1.0"
+      sources."repeating-2.0.1"
+      sources."resolve-1.19.0"
+      sources."rimraf-2.7.1"
+      sources."safe-buffer-5.1.2"
+      sources."safer-buffer-2.1.2"
+      sources."sax-1.2.4"
+      sources."semver-5.7.1"
+      sources."semver-diff-2.1.0"
+      sources."set-blocking-2.0.0"
+      sources."signal-exit-3.0.3"
+      sources."slide-1.1.6"
+      sources."spdx-correct-3.1.1"
+      sources."spdx-exceptions-2.3.0"
+      sources."spdx-expression-parse-3.0.1"
+      sources."spdx-license-ids-3.0.7"
+      sources."speakingurl-14.0.1"
+      sources."sprintf-js-1.0.3"
+      sources."string-width-1.0.2"
+      sources."string_decoder-1.1.1"
+      sources."strip-ansi-3.0.1"
+      sources."strip-bom-2.0.0"
+      sources."strip-indent-1.0.1"
+      sources."strip-json-comments-2.0.1"
+      sources."supports-color-2.0.0"
+      sources."tar-4.4.13"
+      sources."timed-out-3.1.3"
+      sources."trim-newlines-1.0.0"
+      sources."unzip-response-1.0.2"
+      sources."update-notifier-0.6.3"
+      sources."url-parse-lax-1.0.0"
+      sources."util-deprecate-1.0.2"
+      sources."uuid-2.0.3"
+      sources."validate-npm-package-license-3.0.4"
+      sources."wide-align-1.1.3"
+      sources."widest-line-1.0.0"
+      sources."wrappy-1.0.2"
+      sources."write-file-atomic-1.3.4"
+      sources."xdg-basedir-2.0.0"
+      sources."yallist-3.1.1"
+    ];
+    buildInputs = globalBuildInputs;
+    meta = {
+      description = "Base16 Builder is a nimble command-line tool that generates themes for your favourite programs.";
+      homepage = "https://github.com/base16-builder/base16-builder#readme";
+      license = "MIT";
+    };
+    production = true;
+    bypassCache = true;
+    reconstructLock = true;
+  };
+}
diff --git a/nixpkgs/pkgs/misc/base16-builder/node-packages.json b/nixpkgs/pkgs/misc/base16-builder/node-packages.json
new file mode 100644
index 000000000000..3266c128bc4e
--- /dev/null
+++ b/nixpkgs/pkgs/misc/base16-builder/node-packages.json
@@ -0,0 +1,3 @@
+[
+    "base16-builder"
+]
diff --git a/nixpkgs/pkgs/misc/base16-builder/node-packages.nix b/nixpkgs/pkgs/misc/base16-builder/node-packages.nix
new file mode 100644
index 000000000000..79748949ff72
--- /dev/null
+++ b/nixpkgs/pkgs/misc/base16-builder/node-packages.nix
@@ -0,0 +1,21 @@
+# This file has been generated by node2nix 1.9.0. Do not edit!
+
+{pkgs ? import <nixpkgs> {
+    inherit system;
+  }, system ? builtins.currentSystem, nodejs ? pkgs."nodejs-10_x"}:
+
+let
+  globalBuildInputs = pkgs.lib.attrValues (import ./supplement.nix {
+    inherit nodeEnv;
+    inherit (pkgs) stdenv lib nix-gitignore fetchurl fetchgit;
+  });
+  nodeEnv = import ../../development/node-packages/node-env.nix {
+    inherit (pkgs) stdenv lib python2 runCommand writeTextFile;
+    inherit pkgs nodejs;
+    libtool = if pkgs.stdenv.isDarwin then pkgs.darwin.cctools else null;
+  };
+in
+import ./node-packages-generated.nix {
+  inherit (pkgs) fetchurl nix-gitignore stdenv lib fetchgit;
+  inherit nodeEnv globalBuildInputs;
+}
diff --git a/nixpkgs/pkgs/misc/base16-builder/supplement.json b/nixpkgs/pkgs/misc/base16-builder/supplement.json
new file mode 100644
index 000000000000..2838e627165f
--- /dev/null
+++ b/nixpkgs/pkgs/misc/base16-builder/supplement.json
@@ -0,0 +1,3 @@
+[
+  "node-pre-gyp"
+]
diff --git a/nixpkgs/pkgs/misc/base16-builder/supplement.nix b/nixpkgs/pkgs/misc/base16-builder/supplement.nix
new file mode 100644
index 000000000000..104cda58dc0a
--- /dev/null
+++ b/nixpkgs/pkgs/misc/base16-builder/supplement.nix
@@ -0,0 +1,680 @@
+# This file has been generated by node2nix 1.9.0. Do not edit!
+
+{nodeEnv, fetchurl, fetchgit, nix-gitignore, stdenv, lib, globalBuildInputs ? []}:
+
+let
+  sources = {
+    "abbrev-1.1.1" = {
+      name = "abbrev";
+      packageName = "abbrev";
+      version = "1.1.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz";
+        sha512 = "nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==";
+      };
+    };
+    "ansi-regex-2.1.1" = {
+      name = "ansi-regex";
+      packageName = "ansi-regex";
+      version = "2.1.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz";
+        sha1 = "c3b33ab5ee360d86e0e628f0468ae7ef27d654df";
+      };
+    };
+    "aproba-1.2.0" = {
+      name = "aproba";
+      packageName = "aproba";
+      version = "1.2.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz";
+        sha512 = "Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==";
+      };
+    };
+    "are-we-there-yet-1.1.5" = {
+      name = "are-we-there-yet";
+      packageName = "are-we-there-yet";
+      version = "1.1.5";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz";
+        sha512 = "5hYdAkZlcG8tOLujVDTgCT+uPX0VnpAH28gWsLfzpXYm7wP6mp5Q/gYyR7YQ0cKVJcXJnl3j2kpBan13PtQf6w==";
+      };
+    };
+    "balanced-match-1.0.0" = {
+      name = "balanced-match";
+      packageName = "balanced-match";
+      version = "1.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz";
+        sha1 = "89b4d199ab2bee49de164ea02b89ce462d71b767";
+      };
+    };
+    "brace-expansion-1.1.11" = {
+      name = "brace-expansion";
+      packageName = "brace-expansion";
+      version = "1.1.11";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz";
+        sha512 = "iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==";
+      };
+    };
+    "chownr-1.1.4" = {
+      name = "chownr";
+      packageName = "chownr";
+      version = "1.1.4";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz";
+        sha512 = "jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==";
+      };
+    };
+    "code-point-at-1.1.0" = {
+      name = "code-point-at";
+      packageName = "code-point-at";
+      version = "1.1.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz";
+        sha1 = "0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77";
+      };
+    };
+    "concat-map-0.0.1" = {
+      name = "concat-map";
+      packageName = "concat-map";
+      version = "0.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz";
+        sha1 = "d8a96bd77fd68df7793a73036a3ba0d5405d477b";
+      };
+    };
+    "console-control-strings-1.1.0" = {
+      name = "console-control-strings";
+      packageName = "console-control-strings";
+      version = "1.1.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz";
+        sha1 = "3d7cf4464db6446ea644bf4b39507f9851008e8e";
+      };
+    };
+    "core-util-is-1.0.2" = {
+      name = "core-util-is";
+      packageName = "core-util-is";
+      version = "1.0.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz";
+        sha1 = "b5fd54220aa2bc5ab57aab7140c940754503c1a7";
+      };
+    };
+    "debug-3.2.7" = {
+      name = "debug";
+      packageName = "debug";
+      version = "3.2.7";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz";
+        sha512 = "CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==";
+      };
+    };
+    "deep-extend-0.6.0" = {
+      name = "deep-extend";
+      packageName = "deep-extend";
+      version = "0.6.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz";
+        sha512 = "LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==";
+      };
+    };
+    "delegates-1.0.0" = {
+      name = "delegates";
+      packageName = "delegates";
+      version = "1.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz";
+        sha1 = "84c6e159b81904fdca59a0ef44cd870d31250f9a";
+      };
+    };
+    "detect-libc-1.0.3" = {
+      name = "detect-libc";
+      packageName = "detect-libc";
+      version = "1.0.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz";
+        sha1 = "fa137c4bd698edf55cd5cd02ac559f91a4c4ba9b";
+      };
+    };
+    "fs-minipass-1.2.7" = {
+      name = "fs-minipass";
+      packageName = "fs-minipass";
+      version = "1.2.7";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/fs-minipass/-/fs-minipass-1.2.7.tgz";
+        sha512 = "GWSSJGFy4e9GUeCcbIkED+bgAoFyj7XF1mV8rma3QW4NIqX9Kyx79N/PF61H5udOV3aY1IaMLs6pGbH71nlCTA==";
+      };
+    };
+    "fs.realpath-1.0.0" = {
+      name = "fs.realpath";
+      packageName = "fs.realpath";
+      version = "1.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz";
+        sha1 = "1504ad2523158caa40db4a2787cb01411994ea4f";
+      };
+    };
+    "gauge-2.7.4" = {
+      name = "gauge";
+      packageName = "gauge";
+      version = "2.7.4";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz";
+        sha1 = "2c03405c7538c39d7eb37b317022e325fb018bf7";
+      };
+    };
+    "glob-7.1.6" = {
+      name = "glob";
+      packageName = "glob";
+      version = "7.1.6";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz";
+        sha512 = "LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==";
+      };
+    };
+    "has-unicode-2.0.1" = {
+      name = "has-unicode";
+      packageName = "has-unicode";
+      version = "2.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz";
+        sha1 = "e0e6fe6a28cf51138855e086d1691e771de2a8b9";
+      };
+    };
+    "iconv-lite-0.4.24" = {
+      name = "iconv-lite";
+      packageName = "iconv-lite";
+      version = "0.4.24";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz";
+        sha512 = "v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==";
+      };
+    };
+    "ignore-walk-3.0.3" = {
+      name = "ignore-walk";
+      packageName = "ignore-walk";
+      version = "3.0.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/ignore-walk/-/ignore-walk-3.0.3.tgz";
+        sha512 = "m7o6xuOaT1aqheYHKf8W6J5pYH85ZI9w077erOzLje3JsB1gkafkAhHHY19dqjulgIZHFm32Cp5uNZgcQqdJKw==";
+      };
+    };
+    "inflight-1.0.6" = {
+      name = "inflight";
+      packageName = "inflight";
+      version = "1.0.6";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz";
+        sha1 = "49bd6331d7d02d0c09bc910a1075ba8165b56df9";
+      };
+    };
+    "inherits-2.0.4" = {
+      name = "inherits";
+      packageName = "inherits";
+      version = "2.0.4";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz";
+        sha512 = "k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==";
+      };
+    };
+    "ini-1.3.8" = {
+      name = "ini";
+      packageName = "ini";
+      version = "1.3.8";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz";
+        sha512 = "JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==";
+      };
+    };
+    "is-fullwidth-code-point-1.0.0" = {
+      name = "is-fullwidth-code-point";
+      packageName = "is-fullwidth-code-point";
+      version = "1.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz";
+        sha1 = "ef9e31386f031a7f0d643af82fde50c457ef00cb";
+      };
+    };
+    "isarray-1.0.0" = {
+      name = "isarray";
+      packageName = "isarray";
+      version = "1.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz";
+        sha1 = "bb935d48582cba168c06834957a54a3e07124f11";
+      };
+    };
+    "minimatch-3.0.4" = {
+      name = "minimatch";
+      packageName = "minimatch";
+      version = "3.0.4";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz";
+        sha512 = "yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==";
+      };
+    };
+    "minimist-1.2.5" = {
+      name = "minimist";
+      packageName = "minimist";
+      version = "1.2.5";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz";
+        sha512 = "FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==";
+      };
+    };
+    "minipass-2.9.0" = {
+      name = "minipass";
+      packageName = "minipass";
+      version = "2.9.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/minipass/-/minipass-2.9.0.tgz";
+        sha512 = "wxfUjg9WebH+CUDX/CdbRlh5SmfZiy/hpkxaRI16Y9W56Pa75sWgd/rvFilSgrauD9NyFymP/+JFV3KwzIsJeg==";
+      };
+    };
+    "minizlib-1.3.3" = {
+      name = "minizlib";
+      packageName = "minizlib";
+      version = "1.3.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/minizlib/-/minizlib-1.3.3.tgz";
+        sha512 = "6ZYMOEnmVsdCeTJVE0W9ZD+pVnE8h9Hma/iOwwRDsdQoePpoX56/8B6z3P9VNwppJuBKNRuFDRNRqRWexT9G9Q==";
+      };
+    };
+    "mkdirp-0.5.5" = {
+      name = "mkdirp";
+      packageName = "mkdirp";
+      version = "0.5.5";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz";
+        sha512 = "NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==";
+      };
+    };
+    "ms-2.1.3" = {
+      name = "ms";
+      packageName = "ms";
+      version = "2.1.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz";
+        sha512 = "6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==";
+      };
+    };
+    "needle-2.6.0" = {
+      name = "needle";
+      packageName = "needle";
+      version = "2.6.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/needle/-/needle-2.6.0.tgz";
+        sha512 = "KKYdza4heMsEfSWD7VPUIz3zX2XDwOyX2d+geb4vrERZMT5RMU6ujjaD+I5Yr54uZxQ2w6XRTAhHBbSCyovZBg==";
+      };
+    };
+    "nopt-4.0.3" = {
+      name = "nopt";
+      packageName = "nopt";
+      version = "4.0.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/nopt/-/nopt-4.0.3.tgz";
+        sha512 = "CvaGwVMztSMJLOeXPrez7fyfObdZqNUK1cPAEzLHrTybIua9pMdmmPR5YwtfNftIOMv3DPUhFaxsZMNTQO20Kg==";
+      };
+    };
+    "npm-bundled-1.1.1" = {
+      name = "npm-bundled";
+      packageName = "npm-bundled";
+      version = "1.1.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/npm-bundled/-/npm-bundled-1.1.1.tgz";
+        sha512 = "gqkfgGePhTpAEgUsGEgcq1rqPXA+tv/aVBlgEzfXwA1yiUJF7xtEt3CtVwOjNYQOVknDk0F20w58Fnm3EtG0fA==";
+      };
+    };
+    "npm-normalize-package-bin-1.0.1" = {
+      name = "npm-normalize-package-bin";
+      packageName = "npm-normalize-package-bin";
+      version = "1.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/npm-normalize-package-bin/-/npm-normalize-package-bin-1.0.1.tgz";
+        sha512 = "EPfafl6JL5/rU+ot6P3gRSCpPDW5VmIzX959Ob1+ySFUuuYHWHekXpwdUZcKP5C+DS4GEtdJluwBjnsNDl+fSA==";
+      };
+    };
+    "npm-packlist-1.4.8" = {
+      name = "npm-packlist";
+      packageName = "npm-packlist";
+      version = "1.4.8";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/npm-packlist/-/npm-packlist-1.4.8.tgz";
+        sha512 = "5+AZgwru5IevF5ZdnFglB5wNlHG1AOOuw28WhUq8/8emhBmLv6jX5by4WJCh7lW0uSYZYS6DXqIsyZVIXRZU9A==";
+      };
+    };
+    "npmlog-4.1.2" = {
+      name = "npmlog";
+      packageName = "npmlog";
+      version = "4.1.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz";
+        sha512 = "2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==";
+      };
+    };
+    "number-is-nan-1.0.1" = {
+      name = "number-is-nan";
+      packageName = "number-is-nan";
+      version = "1.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz";
+        sha1 = "097b602b53422a522c1afb8790318336941a011d";
+      };
+    };
+    "object-assign-4.1.1" = {
+      name = "object-assign";
+      packageName = "object-assign";
+      version = "4.1.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz";
+        sha1 = "2109adc7965887cfc05cbbd442cac8bfbb360863";
+      };
+    };
+    "once-1.4.0" = {
+      name = "once";
+      packageName = "once";
+      version = "1.4.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/once/-/once-1.4.0.tgz";
+        sha1 = "583b1aa775961d4b113ac17d9c50baef9dd76bd1";
+      };
+    };
+    "os-homedir-1.0.2" = {
+      name = "os-homedir";
+      packageName = "os-homedir";
+      version = "1.0.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz";
+        sha1 = "ffbc4988336e0e833de0c168c7ef152121aa7fb3";
+      };
+    };
+    "os-tmpdir-1.0.2" = {
+      name = "os-tmpdir";
+      packageName = "os-tmpdir";
+      version = "1.0.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz";
+        sha1 = "bbe67406c79aa85c5cfec766fe5734555dfa1274";
+      };
+    };
+    "osenv-0.1.5" = {
+      name = "osenv";
+      packageName = "osenv";
+      version = "0.1.5";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/osenv/-/osenv-0.1.5.tgz";
+        sha512 = "0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g==";
+      };
+    };
+    "path-is-absolute-1.0.1" = {
+      name = "path-is-absolute";
+      packageName = "path-is-absolute";
+      version = "1.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz";
+        sha1 = "174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f";
+      };
+    };
+    "process-nextick-args-2.0.1" = {
+      name = "process-nextick-args";
+      packageName = "process-nextick-args";
+      version = "2.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz";
+        sha512 = "3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==";
+      };
+    };
+    "rc-1.2.8" = {
+      name = "rc";
+      packageName = "rc";
+      version = "1.2.8";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz";
+        sha512 = "y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==";
+      };
+    };
+    "readable-stream-2.3.7" = {
+      name = "readable-stream";
+      packageName = "readable-stream";
+      version = "2.3.7";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz";
+        sha512 = "Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==";
+      };
+    };
+    "rimraf-2.7.1" = {
+      name = "rimraf";
+      packageName = "rimraf";
+      version = "2.7.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz";
+        sha512 = "uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==";
+      };
+    };
+    "safe-buffer-5.1.2" = {
+      name = "safe-buffer";
+      packageName = "safe-buffer";
+      version = "5.1.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz";
+        sha512 = "Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==";
+      };
+    };
+    "safer-buffer-2.1.2" = {
+      name = "safer-buffer";
+      packageName = "safer-buffer";
+      version = "2.1.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz";
+        sha512 = "YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==";
+      };
+    };
+    "sax-1.2.4" = {
+      name = "sax";
+      packageName = "sax";
+      version = "1.2.4";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz";
+        sha512 = "NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==";
+      };
+    };
+    "semver-5.7.1" = {
+      name = "semver";
+      packageName = "semver";
+      version = "5.7.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz";
+        sha512 = "sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==";
+      };
+    };
+    "set-blocking-2.0.0" = {
+      name = "set-blocking";
+      packageName = "set-blocking";
+      version = "2.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz";
+        sha1 = "045f9782d011ae9a6803ddd382b24392b3d890f7";
+      };
+    };
+    "signal-exit-3.0.3" = {
+      name = "signal-exit";
+      packageName = "signal-exit";
+      version = "3.0.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.3.tgz";
+        sha512 = "VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA==";
+      };
+    };
+    "string-width-1.0.2" = {
+      name = "string-width";
+      packageName = "string-width";
+      version = "1.0.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz";
+        sha1 = "118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3";
+      };
+    };
+    "string_decoder-1.1.1" = {
+      name = "string_decoder";
+      packageName = "string_decoder";
+      version = "1.1.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz";
+        sha512 = "n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==";
+      };
+    };
+    "strip-ansi-3.0.1" = {
+      name = "strip-ansi";
+      packageName = "strip-ansi";
+      version = "3.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz";
+        sha1 = "6a385fb8853d952d5ff05d0e8aaf94278dc63dcf";
+      };
+    };
+    "strip-json-comments-2.0.1" = {
+      name = "strip-json-comments";
+      packageName = "strip-json-comments";
+      version = "2.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz";
+        sha1 = "3c531942e908c2697c0ec344858c286c7ca0a60a";
+      };
+    };
+    "tar-4.4.13" = {
+      name = "tar";
+      packageName = "tar";
+      version = "4.4.13";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/tar/-/tar-4.4.13.tgz";
+        sha512 = "w2VwSrBoHa5BsSyH+KxEqeQBAllHhccyMFVHtGtdMpF4W7IRWfZjFiQceJPChOeTsSDVUpER2T8FA93pr0L+QA==";
+      };
+    };
+    "util-deprecate-1.0.2" = {
+      name = "util-deprecate";
+      packageName = "util-deprecate";
+      version = "1.0.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz";
+        sha1 = "450d4dc9fa70de732762fbd2d4a28981419a0ccf";
+      };
+    };
+    "wide-align-1.1.3" = {
+      name = "wide-align";
+      packageName = "wide-align";
+      version = "1.1.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz";
+        sha512 = "QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==";
+      };
+    };
+    "wrappy-1.0.2" = {
+      name = "wrappy";
+      packageName = "wrappy";
+      version = "1.0.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz";
+        sha1 = "b5243d8f3ec1aa35f1364605bc0d1036e30ab69f";
+      };
+    };
+    "yallist-3.1.1" = {
+      name = "yallist";
+      packageName = "yallist";
+      version = "3.1.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz";
+        sha512 = "a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==";
+      };
+    };
+  };
+in
+{
+  node-pre-gyp = nodeEnv.buildNodePackage {
+    name = "node-pre-gyp";
+    packageName = "node-pre-gyp";
+    version = "0.17.0";
+    src = fetchurl {
+      url = "https://registry.npmjs.org/node-pre-gyp/-/node-pre-gyp-0.17.0.tgz";
+      sha512 = "abzZt1hmOjkZez29ppg+5gGqdPLUuJeAEwVPtHYEJgx0qzttCbcKFpxrCQn2HYbwCv2c+7JwH4BgEzFkUGpn4A==";
+    };
+    dependencies = [
+      sources."abbrev-1.1.1"
+      sources."ansi-regex-2.1.1"
+      sources."aproba-1.2.0"
+      sources."are-we-there-yet-1.1.5"
+      sources."balanced-match-1.0.0"
+      sources."brace-expansion-1.1.11"
+      sources."chownr-1.1.4"
+      sources."code-point-at-1.1.0"
+      sources."concat-map-0.0.1"
+      sources."console-control-strings-1.1.0"
+      sources."core-util-is-1.0.2"
+      sources."debug-3.2.7"
+      sources."deep-extend-0.6.0"
+      sources."delegates-1.0.0"
+      sources."detect-libc-1.0.3"
+      sources."fs-minipass-1.2.7"
+      sources."fs.realpath-1.0.0"
+      sources."gauge-2.7.4"
+      sources."glob-7.1.6"
+      sources."has-unicode-2.0.1"
+      sources."iconv-lite-0.4.24"
+      sources."ignore-walk-3.0.3"
+      sources."inflight-1.0.6"
+      sources."inherits-2.0.4"
+      sources."ini-1.3.8"
+      sources."is-fullwidth-code-point-1.0.0"
+      sources."isarray-1.0.0"
+      sources."minimatch-3.0.4"
+      sources."minimist-1.2.5"
+      sources."minipass-2.9.0"
+      sources."minizlib-1.3.3"
+      sources."mkdirp-0.5.5"
+      sources."ms-2.1.3"
+      sources."needle-2.6.0"
+      sources."nopt-4.0.3"
+      sources."npm-bundled-1.1.1"
+      sources."npm-normalize-package-bin-1.0.1"
+      sources."npm-packlist-1.4.8"
+      sources."npmlog-4.1.2"
+      sources."number-is-nan-1.0.1"
+      sources."object-assign-4.1.1"
+      sources."once-1.4.0"
+      sources."os-homedir-1.0.2"
+      sources."os-tmpdir-1.0.2"
+      sources."osenv-0.1.5"
+      sources."path-is-absolute-1.0.1"
+      sources."process-nextick-args-2.0.1"
+      sources."rc-1.2.8"
+      sources."readable-stream-2.3.7"
+      sources."rimraf-2.7.1"
+      sources."safe-buffer-5.1.2"
+      sources."safer-buffer-2.1.2"
+      sources."sax-1.2.4"
+      sources."semver-5.7.1"
+      sources."set-blocking-2.0.0"
+      sources."signal-exit-3.0.3"
+      sources."string-width-1.0.2"
+      sources."string_decoder-1.1.1"
+      sources."strip-ansi-3.0.1"
+      sources."strip-json-comments-2.0.1"
+      sources."tar-4.4.13"
+      sources."util-deprecate-1.0.2"
+      sources."wide-align-1.1.3"
+      sources."wrappy-1.0.2"
+      sources."yallist-3.1.1"
+    ];
+    buildInputs = globalBuildInputs;
+    meta = {
+      description = "Node.js native addon binary install tool";
+      homepage = "https://github.com/mapbox/node-pre-gyp#readme";
+      license = "BSD-3-Clause";
+    };
+    production = true;
+    bypassCache = true;
+    reconstructLock = true;
+  };
+}
diff --git a/nixpkgs/pkgs/misc/base16-shell-preview/default.nix b/nixpkgs/pkgs/misc/base16-shell-preview/default.nix
new file mode 100644
index 000000000000..15e0596e4103
--- /dev/null
+++ b/nixpkgs/pkgs/misc/base16-shell-preview/default.nix
@@ -0,0 +1,23 @@
+{ lib, python3Packages }:
+
+python3Packages.buildPythonApplication rec {
+  pname = "base16-shell-preview";
+  version = "0.3.0";
+
+  src = python3Packages.fetchPypi {
+    inherit version;
+    pname = "base16_shell_preview";
+    sha256 = "0x2fbicrcqgf2dl7dqzm14dz08vjjziabaaw33wah3v9wv4rw7jq";
+  };
+
+  # No tests
+  # If enabled, will attempt to run '__init__.py, and will fail with "/homeless-shelter" as HOME
+  doCheck = false;
+
+  meta = with lib; {
+    description = "Browse and preview Base16 Shell themes in your terminal";
+    homepage = "https://github.com/nvllsvm/base16-shell-preview";
+    license = licenses.mit;
+    maintainers = [ maintainers.rencire ];
+  };
+}
diff --git a/nixpkgs/pkgs/misc/beep/default.nix b/nixpkgs/pkgs/misc/beep/default.nix
new file mode 100644
index 000000000000..92d84bdf6dc8
--- /dev/null
+++ b/nixpkgs/pkgs/misc/beep/default.nix
@@ -0,0 +1,25 @@
+{ lib, stdenv, fetchFromGitHub }:
+
+# this package is working only as root
+# in order to work as a non privileged user you would need to suid the bin
+
+stdenv.mkDerivation rec {
+  pname = "beep";
+  version = "1.4.9";
+
+  src = fetchFromGitHub {
+    owner = "spkr-beep";
+    repo = "beep";
+    rev = "v${version}";
+    sha256 = "JLaoiINHpIFWSqsRl8wJ/NeBu7SCcPuT/BzY8szEu0o=";
+  };
+
+  makeFlags = [ "DESTDIR=\${out}" "prefix="];
+
+  meta = with lib; {
+    description = "The advanced PC speaker beeper";
+    homepage = "https://github.com/spkr-beep/beep";
+    license = licenses.gpl2Only;
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/misc/brightnessctl/default.nix b/nixpkgs/pkgs/misc/brightnessctl/default.nix
new file mode 100644
index 000000000000..2fab8b4bd676
--- /dev/null
+++ b/nixpkgs/pkgs/misc/brightnessctl/default.nix
@@ -0,0 +1,27 @@
+{ lib, stdenv, fetchFromGitHub, pkg-config, systemd }:
+
+stdenv.mkDerivation rec {
+  pname = "brightnessctl";
+  version = "0.5.1";
+
+  src = fetchFromGitHub {
+    owner = "Hummer12007";
+    repo = "brightnessctl";
+    rev = version;
+    sha256 = "0immxc7almmpg80n3bdn834p3nrrz7bspl2syhb04s3lawa5y2lq";
+  };
+
+  makeFlags = [ "PREFIX=" "DESTDIR=$(out)" "ENABLE_SYSTEMD=1" ];
+
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = [ systemd ];
+
+  meta = with lib; {
+    homepage = "https://github.com/Hummer12007/brightnessctl";
+    description = "This program allows you read and control device brightness";
+    license = licenses.mit;
+    maintainers = with maintainers; [ megheaiulian ];
+    platforms = platforms.linux;
+  };
+
+}
diff --git a/nixpkgs/pkgs/misc/calaos/installer/default.nix b/nixpkgs/pkgs/misc/calaos/installer/default.nix
new file mode 100644
index 000000000000..575471b2ee51
--- /dev/null
+++ b/nixpkgs/pkgs/misc/calaos/installer/default.nix
@@ -0,0 +1,34 @@
+{ mkDerivation, lib, stdenv, fetchFromGitHub, qmake, qttools, qtbase }:
+
+mkDerivation rec {
+  pname = "calaos_installer";
+  version = "3.5";
+
+  src = fetchFromGitHub {
+    owner = "calaos";
+    repo = "calaos_installer";
+    rev = "v${version}";
+    sha256 = "hx7XVF2iueKFR67U0EvSK1vYZnJBnuOpUOkSjx7h1XY=";
+  };
+
+  nativeBuildInputs = [ qmake qttools ];
+  buildInputs = [ qtbase ];
+
+  qmakeFlags = [ "REVISION=${version}" ];
+
+  installPhase = if stdenv.isDarwin then ''
+    mkdir -p $out/Applications
+    cp -a calaos_installer.app $out/Applications
+  '' else ''
+    mkdir -p $out/bin
+    cp -a calaos_installer $out/bin
+  '';
+
+  meta = with lib; {
+    description = "Calaos Installer, a tool to create calaos configuration";
+    homepage = "https://www.calaos.fr/";
+    license = licenses.gpl3Plus;
+    platforms = platforms.all;
+    maintainers = with maintainers; [ tiramiseb ];
+  };
+}
diff --git a/nixpkgs/pkgs/misc/cbeams/default.nix b/nixpkgs/pkgs/misc/cbeams/default.nix
new file mode 100644
index 000000000000..928b03df09f7
--- /dev/null
+++ b/nixpkgs/pkgs/misc/cbeams/default.nix
@@ -0,0 +1,21 @@
+{ lib, buildPythonApplication, fetchPypi, isPy3k, blessings, docopt }:
+
+buildPythonApplication rec {
+  pname = "cbeams";
+  version = "1.0.3";
+  disabled = !isPy3k;
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "1agcjg6kmcyvk834xd2j60mi349qi9iw3dc2vwpd7pqwq1daq3gi";
+  };
+
+  propagatedBuildInputs = [ blessings docopt ];
+
+  meta = with lib; {
+    homepage = "https://github.com/tartley/cbeams";
+    description = "Command-line program to draw animated colored circles in the terminal";
+    license = licenses.bsd3;
+    maintainers = with maintainers; [ oxzi ];
+  };
+}
diff --git a/nixpkgs/pkgs/misc/cups/cups-pk-helper.nix b/nixpkgs/pkgs/misc/cups/cups-pk-helper.nix
new file mode 100644
index 000000000000..f5edc7293407
--- /dev/null
+++ b/nixpkgs/pkgs/misc/cups/cups-pk-helper.nix
@@ -0,0 +1,30 @@
+{ lib, stdenv, fetchurl, intltool, pkg-config, glib, polkit, cups, fetchpatch }:
+
+stdenv.mkDerivation rec {
+  version = "0.2.6";
+  pname = "cups-pk-helper";
+
+  src = fetchurl {
+    url = "https://www.freedesktop.org/software/cups-pk-helper/releases/cups-pk-helper-${version}.tar.xz";
+    sha256 = "0a52jw6rm7lr5nbyksiia0rn7sasyb5cjqcb95z1wxm2yprgi6lm";
+  };
+
+  nativeBuildInputs = [ pkg-config intltool ];
+  buildInputs = [ glib polkit cups ];
+
+  patches = [
+    # Don't use etc/dbus-1/system.d
+    (fetchpatch {
+      url = "https://gitlab.freedesktop.org/cups-pk-helper/cups-pk-helper/merge_requests/2.patch";
+      sha256 = "1kamhr5kn8c1y0q8xbip0fgr7maf3dyddlvab4n0iypk7rwwikl0";
+    })
+  ];
+
+  meta = with lib; {
+    description = "PolicyKit helper to configure cups with fine-grained privileges";
+    homepage = "http://www.freedesktop.org/wiki/Software/cups-pk-helper/";
+    license = licenses.gpl2;
+    platforms = platforms.linux;
+    maintainers = [ maintainers.bjornfor ];
+  };
+}
diff --git a/nixpkgs/pkgs/misc/cups/default.nix b/nixpkgs/pkgs/misc/cups/default.nix
new file mode 100644
index 000000000000..3812ae500e5c
--- /dev/null
+++ b/nixpkgs/pkgs/misc/cups/default.nix
@@ -0,0 +1,158 @@
+{ lib, stdenv
+, fetchurl
+, pkg-config
+, removeReferencesTo
+, zlib
+, libjpeg
+, libpng
+, libtiff
+, pam
+, dbus
+, enableSystemd ? stdenv.isLinux && !stdenv.hostPlatform.isMusl
+, systemd
+, acl
+, gmp
+, darwin
+, libusb1 ? null
+, gnutls ? null
+, avahi ? null
+, libpaper ? null
+, coreutils
+}:
+
+### IMPORTANT: before updating cups, make sure the nixos/tests/printing.nix test
+### works at least for your platform.
+
+with lib;
+stdenv.mkDerivation rec {
+  pname = "cups";
+
+  # After 2.2.6, CUPS requires headers only available in macOS 10.12+
+  version = if stdenv.isDarwin then "2.2.6" else "2.3.3";
+
+  passthru = { inherit version; };
+
+  src = fetchurl {
+    url = "https://github.com/apple/cups/releases/download/v${version}/cups-${version}-source.tar.gz";
+    sha256 = if version == "2.2.6"
+             then "16qn41b84xz6khrr2pa2wdwlqxr29rrrkjfi618gbgdkq9w5ff20"
+             else "1vpk0b2vq830f8fvf9z8qjsm5k141i7pi8djbinpnr78pi4dj7r6";
+  };
+
+  outputs = [ "out" "lib" "dev" "man" ];
+
+  postPatch = ''
+    substituteInPlace cups/testfile.c \
+      --replace 'cupsFileFind("cat", "/bin' 'cupsFileFind("cat", "${coreutils}/bin'
+  '';
+
+  nativeBuildInputs = [ pkg-config removeReferencesTo ];
+
+  buildInputs = [ zlib libjpeg libpng libtiff libusb1 gnutls libpaper ]
+    ++ optionals stdenv.isLinux [ avahi pam dbus ]
+    ++ optional enableSystemd systemd
+    # Separate from above only to not modify order, to avoid mass rebuilds; merge this with the above at next big change.
+    ++ optionals stdenv.isLinux [ acl ]
+    ++ optionals stdenv.isDarwin (with darwin; [
+      configd apple_sdk.frameworks.ApplicationServices
+    ]);
+
+  propagatedBuildInputs = [ gmp ];
+
+  configureFlags = [
+    "--localstatedir=/var"
+    "--sysconfdir=/etc"
+    "--enable-raw-printing"
+    "--enable-threads"
+  ] ++ optionals stdenv.isLinux [
+    "--enable-dbus"
+    "--enable-pam"
+    "--with-dbusdir=${placeholder "out"}/share/dbus-1"
+  ] ++ optional (libusb1 != null) "--enable-libusb"
+    ++ optional (gnutls != null) "--enable-ssl"
+    ++ optional (avahi != null) "--enable-avahi"
+    ++ optional (libpaper != null) "--enable-libpaper"
+    ++ optional stdenv.isDarwin "--disable-launchd";
+
+  # AR has to be an absolute path
+  preConfigure = ''
+    export AR="${getBin stdenv.cc.bintools.bintools}/bin/${stdenv.cc.targetPrefix}ar"
+    configureFlagsArray+=(
+      # Put just lib/* and locale into $lib; this didn't work directly.
+      # lib/cups is moved back to $out in postInstall.
+      # Beware: some parts of cups probably don't fully respect these.
+      "--prefix=$lib"
+      "--datadir=$out/share"
+      "--localedir=$lib/share/locale"
+
+      "--with-systemd=$out/lib/systemd/system"
+
+      ${optionalString stdenv.isDarwin ''
+        "--with-bundledir=$out"
+      ''}
+    )
+  '';
+
+  installFlags =
+    [ # Don't try to write in /var at build time.
+      "CACHEDIR=$(TMPDIR)/dummy"
+      "LOGDIR=$(TMPDIR)/dummy"
+      "REQUESTS=$(TMPDIR)/dummy"
+      "STATEDIR=$(TMPDIR)/dummy"
+      # Idem for /etc.
+      "PAMDIR=$(out)/etc/pam.d"
+      "XINETD=$(out)/etc/xinetd.d"
+      "SERVERROOT=$(out)/etc/cups"
+      # Idem for /usr.
+      "MENUDIR=$(out)/share/applications"
+      "ICONDIR=$(out)/share/icons"
+      # Work around a Makefile bug.
+      "CUPS_PRIMARY_SYSTEM_GROUP=root"
+    ];
+
+  enableParallelBuilding = true;
+
+  postInstall = ''
+      libexec=${if stdenv.isDarwin then "libexec/cups" else "lib/cups"}
+      moveToOutput $libexec "$out"
+
+      # $lib contains references to $out/share/cups.
+      # CUPS is working without them, so they are not vital.
+      find "$lib" -type f -exec grep -q "$out" {} \; \
+           -printf "removing references from %p\n" \
+           -exec remove-references-to -t "$out" {} +
+
+      # Delete obsolete stuff that conflicts with cups-filters.
+      rm -rf $out/share/cups/banners $out/share/cups/data/testprint
+
+      moveToOutput bin/cups-config "$dev"
+      sed -e "/^cups_serverbin=/s|$lib|$out|" \
+          -i "$dev/bin/cups-config"
+
+      # Rename systemd files provided by CUPS
+      for f in "$out"/lib/systemd/system/*; do
+        substituteInPlace "$f" \
+          --replace "$lib/$libexec" "$out/$libexec" \
+          --replace "org.cups.cupsd" "cups" \
+          --replace "org.cups." ""
+
+        if [[ "$f" =~ .*cupsd\..* ]]; then
+          mv "$f" "''${f/org\.cups\.cupsd/cups}"
+        else
+          mv "$f" "''${f/org\.cups\./}"
+        fi
+      done
+    '' + optionalString stdenv.isLinux ''
+      # Use xdg-open when on Linux
+      substituteInPlace "$out"/share/applications/cups.desktop \
+        --replace "Exec=htmlview" "Exec=xdg-open"
+    '';
+
+  meta = {
+    homepage = "https://cups.org/";
+    description = "A standards-based printing system for UNIX";
+    license = licenses.gpl2; # actually LGPL for the library and GPL for the rest
+    maintainers = with maintainers; [ matthewbauer ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/misc/cups/drivers/brgenml1cupswrapper/default.nix b/nixpkgs/pkgs/misc/cups/drivers/brgenml1cupswrapper/default.nix
new file mode 100644
index 000000000000..ec02e8c4f0e0
--- /dev/null
+++ b/nixpkgs/pkgs/misc/cups/drivers/brgenml1cupswrapper/default.nix
@@ -0,0 +1,124 @@
+{ lib, stdenv, fetchurl, makeWrapper, cups, perl, coreutils, gnused, gnugrep
+, brgenml1lpr, debugLvl ? "0"}:
+
+/*
+    [Setup instructions](http://support.brother.com/g/s/id/linux/en/instruction_prn1a.html).
+
+    URI example
+     ~  `lpd://BRW0080927AFBCE/binary_p1`
+
+    Logging
+    -------
+
+    `/tmp/br_cupswrapper_ml1.log` when `DEBUG > 0` in `brother_lpdwrapper_BrGenML1`.
+    Note that when `DEBUG > 1` the wrapper stops performing its function. Better
+    keep `DEBUG == 1` unless this is desirable.
+
+    Now activable through this package's `debugLvl` parameter whose value is to be
+    used to establish `DEBUG`.
+
+    Issues
+    ------
+
+     1.  >  Error: /tmp/brBrGenML1rc_15642 :cannot open file !!
+
+        Fixed.
+
+     2.  >  touch: cannot touch '/tmp/BrGenML1_latest_print_info': Permission denied
+
+        Fixed.
+
+     3.  >  perl: warning: Falling back to the standard locale ("C").
+
+            are supported and installed on your system.
+            LANG = "en_US.UTF-8"
+            LC_ALL = (unset),
+            LANGUAGE = (unset),
+            perl: warning: Please check that your locale settings:
+            perl: warning: Setting locale failed.
+
+        TODO: Address.
+
+     4. Since nixos 16.03 release, in `brother_lpdwrapper_BrGenML1`:
+
+        > sh: grep: command not found
+          sh: chmod: command not found
+          sh: cp: command not found
+          Error: /tmp/brBrGenML1rc_1850 :cannot open file !!
+          sh: sed: command not found
+
+        Fixed by use of a wrapper that brings `coreutils`, `gnused`, `gnugrep`
+        in `PATH`.
+*/
+
+stdenv.mkDerivation rec {
+
+  name = "brgenml1cupswrapper-3.1.0-1";
+  src = fetchurl {
+    url = "https://download.brother.com/welcome/dlf101125/${name}.i386.deb";
+    sha256 = "0kd2a2waqr10kfv1s8is3nd5dlphw4d1343srdsbrlbbndja3s6r";
+  };
+
+  unpackPhase = ''
+    ar x $src
+    tar xfvz data.tar.gz
+  '';
+
+  nativeBuildInputs = [ makeWrapper ];
+  buildInputs = [ cups perl coreutils gnused gnugrep brgenml1lpr ];
+
+  dontBuild = true;
+
+  patchPhase = ''
+    WRAPPER=opt/brother/Printers/BrGenML1/cupswrapper/brother_lpdwrapper_BrGenML1
+    PAPER_CFG=opt/brother/Printers/BrGenML1/cupswrapper/paperconfigml1
+
+    substituteInPlace $WRAPPER \
+      --replace "basedir =~" "basedir = \"${brgenml1lpr}/opt/brother/Printers/BrGenML1\"; #" \
+      --replace "PRINTER =~" "PRINTER = \"BrGenML1\"; #" \
+      --replace "\$DEBUG=0;" "\$DEBUG=${debugLvl};"
+
+    # Fixing issue #1 and #2.
+    substituteInPlace $WRAPPER \
+      --replace "\`cp " "\`cp -p " \
+      --replace "\$TEMPRC\`" "\$TEMPRC; chmod a+rw \$TEMPRC\`" \
+      --replace "\`mv " "\`cp -p "
+
+    # This config script make this assumption that the *.ppd are found in a global location `/etc/cups/ppd`.
+    substituteInPlace $PAPER_CFG \
+      --replace "/etc/cups/ppd" "$out/share/cups/model"
+  '';
+
+
+  installPhase = ''
+    CUPSFILTER_DIR=$out/lib/cups/filter
+    CUPSPPD_DIR=$out/share/cups/model
+    CUPSWRAPPER_DIR=opt/brother/Printers/BrGenML1/cupswrapper
+
+    mkdir -p $out/$CUPSWRAPPER_DIR
+    cp -rp $CUPSWRAPPER_DIR/* $out/$CUPSWRAPPER_DIR
+
+    mkdir -p $CUPSFILTER_DIR
+    # Fixing issue #4.
+    makeWrapper \
+      $out/$CUPSWRAPPER_DIR/brother_lpdwrapper_BrGenML1 \
+      $CUPSFILTER_DIR/brother_lpdwrapper_BrGenML1 \
+      --prefix PATH : ${coreutils}/bin \
+      --prefix PATH : ${gnused}/bin \
+      --prefix PATH : ${gnugrep}/bin
+
+    mkdir -p $CUPSPPD_DIR
+    ln -s $out/$CUPSWRAPPER_DIR/brother-BrGenML1-cups-en.ppd $CUPSPPD_DIR
+  '';
+
+  dontPatchELF = true;
+  dontStrip = true;
+
+  meta = {
+    description = "Brother BrGenML1 CUPS wrapper driver";
+    homepage = "http://www.brother.com";
+    platforms = lib.platforms.linux;
+    license = lib.licenses.gpl2Plus;
+    maintainers = with lib.maintainers; [ jraygauthier ];
+  };
+}
diff --git a/nixpkgs/pkgs/misc/cups/drivers/brgenml1lpr/default.nix b/nixpkgs/pkgs/misc/cups/drivers/brgenml1lpr/default.nix
new file mode 100644
index 000000000000..6cdff2c4124e
--- /dev/null
+++ b/nixpkgs/pkgs/misc/cups/drivers/brgenml1lpr/default.nix
@@ -0,0 +1,93 @@
+{ lib, stdenv, fetchurl, cups, perl, glibc, ghostscript, which, makeWrapper}:
+
+/*
+    [Setup instructions](http://support.brother.com/g/s/id/linux/en/instruction_prn1a.html).
+
+    URI example
+     ~  `lpd://BRW0080927AFBCE/binary_p1`
+
+    Logging
+    -------
+
+    `/tmp/br_lpdfilter_ml1.log` when `$ENV{LPD_DEBUG} > 0` in `filter_BrGenML1`
+    which is activated automatically when `DEBUG > 0` in `brother_lpdwrapper_BrGenML1`
+    from the cups wrapper.
+
+    Issues
+    ------
+
+     -  filter_BrGenML1 ln 196 `my $GHOST_SCRIPT=`which gs`;`
+
+        `GHOST_SCRIPT` is empty resulting in an empty `/tmp/br_lpdfilter_ml1_gsout.dat` file.
+        See `/tmp/br_lpdfilter_ml1.log` for the executed command.
+
+    Notes
+    -----
+
+     -  The `setupPrintcap` has totally no use in our context.
+*/
+
+let
+  myPatchElf = file: with lib; ''
+    patchelf --set-interpreter \
+      ${stdenv.glibc}/lib/ld-linux${optionalString stdenv.is64bit "-x86-64"}.so.2 \
+      ${file}
+  '';
+in
+stdenv.mkDerivation rec {
+
+  name = "brgenml1lpr-3.1.0-1";
+  src = fetchurl {
+    url = "https://download.brother.com/welcome/dlf101123/${name}.i386.deb";
+    sha256 = "0zdvjnrjrz9sba0k525linxp55lr4cyivfhqbkq1c11br2nvy09f";
+  };
+
+  unpackPhase = ''
+    ar x $src
+    tar xfvz data.tar.gz
+  '';
+
+  nativeBuildInputs = [ makeWrapper ];
+  buildInputs = [ cups perl glibc ghostscript which ];
+
+  dontBuild = true;
+
+  patchPhase = ''
+    INFDIR=opt/brother/Printers/BrGenML1/inf
+    LPDDIR=opt/brother/Printers/BrGenML1/lpd
+
+    # Setup max debug log by default.
+    substituteInPlace $LPDDIR/filter_BrGenML1 \
+      --replace "BR_PRT_PATH =~" "BR_PRT_PATH = \"$out/opt/brother/Printers/BrGenML1\"; #" \
+      --replace "PRINTER =~" "PRINTER = \"BrGenML1\"; #"
+
+    ${myPatchElf "$INFDIR/braddprinter"}
+    ${myPatchElf "$LPDDIR/brprintconflsr3"}
+    ${myPatchElf "$LPDDIR/rawtobr3"}
+  '';
+
+  installPhase = ''
+    INFDIR=opt/brother/Printers/BrGenML1/inf
+    LPDDIR=opt/brother/Printers/BrGenML1/lpd
+
+    mkdir -p $out/$INFDIR
+    cp -rp $INFDIR/* $out/$INFDIR
+    mkdir -p $out/$LPDDIR
+    cp -rp $LPDDIR/* $out/$LPDDIR
+
+    wrapProgram $out/$LPDDIR/filter_BrGenML1 \
+      --prefix PATH ":" "${ghostscript}/bin" \
+      --prefix PATH ":" "${which}/bin"
+  '';
+
+  dontPatchELF = true;
+
+
+  meta = {
+    description = "Brother BrGenML1 LPR driver";
+    homepage = "http://www.brother.com";
+    platforms = lib.platforms.linux;
+    license = lib.licenses.unfreeRedistributable;
+    maintainers = with lib.maintainers; [ jraygauthier ];
+  };
+}
diff --git a/nixpkgs/pkgs/misc/cups/drivers/brlaser/default.nix b/nixpkgs/pkgs/misc/cups/drivers/brlaser/default.nix
new file mode 100644
index 000000000000..b0dfd8d8170a
--- /dev/null
+++ b/nixpkgs/pkgs/misc/cups/drivers/brlaser/default.nix
@@ -0,0 +1,63 @@
+{ lib, stdenv, fetchFromGitHub, cmake, zlib, cups }:
+
+stdenv.mkDerivation rec {
+  pname = "brlaser";
+  version = "6";
+
+  src = fetchFromGitHub {
+    owner = "pdewacht";
+    repo = "brlaser";
+    rev = "v${version}";
+    sha256 = "1995s69ksq1fz0vb34v0ndiqncrinbrlpmp70rkl6az7kag99s80";
+  };
+
+  nativeBuildInputs = [ cmake ];
+  buildInputs = [ zlib cups ];
+
+  cmakeFlags = [ "-DCUPS_SERVER_BIN=lib/cups" "-DCUPS_DATA_DIR=share/cups" ];
+
+  meta = with lib; {
+    description = "A CUPS driver for Brother laser printers";
+    longDescription =
+      ''
+       Although most Brother printers support a standard printer language such as PCL or PostScript, not all do. If you have a monochrome Brother laser printer (or multi-function device) and the other open source drivers don't work, this one might help.
+
+       This driver is known to work with these printers:
+
+           Brother DCP-1510
+           Brother DCP-1602
+           Brother DCP-7030
+           Brother DCP-7040
+           Brother DCP-7055
+           Brother DCP-7055W
+           Brother DCP-7060D
+           Brother DCP-7065DN
+           Brother DCP-7080
+           Brother DCP-L2500D
+           Brother DCP-L2520D
+           Brother DCP-L2540DW
+           Brother HL-1110
+           Brother HL-1200
+           Brother HL-2030
+           Brother HL-2140
+           Brother HL-2220
+           Brother HL-2270DW
+           Brother HL-5030
+           Brother HL-L2300D
+           Brother HL-L2320D
+           Brother HL-L2340D
+           Brother HL-L2360D
+           Brother MFC-1910W
+           Brother MFC-7240
+           Brother MFC-7360N
+           Brother MFC-7365DN
+           Brother MFC-7840W
+           Brother MFC-L2710DW
+           Lenovo M7605D
+      '';
+    homepage = "https://github.com/pdewacht/brlaser";
+    license = licenses.gpl2;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ StijnDW ];
+  };
+}
diff --git a/nixpkgs/pkgs/misc/cups/drivers/brother/mfcl3770cdw/default.nix b/nixpkgs/pkgs/misc/cups/drivers/brother/mfcl3770cdw/default.nix
new file mode 100644
index 000000000000..10ed4368ce21
--- /dev/null
+++ b/nixpkgs/pkgs/misc/cups/drivers/brother/mfcl3770cdw/default.nix
@@ -0,0 +1,88 @@
+{ pkgsi686Linux
+, stdenv
+, fetchurl
+, dpkg
+, makeWrapper
+, coreutils
+, ghostscript
+, gnugrep
+, gnused
+, which
+, perl
+, lib
+}:
+
+let
+  model = "mfcl3770cdw";
+  version = "1.0.2-0";
+  src = fetchurl {
+    url = "https://download.brother.com/welcome/dlf103935/${model}pdrv-${version}.i386.deb";
+    sha256 = "09fhbzhpjymhkwxqyxzv24b06ybmajr6872yp7pri39595mhrvay";
+  };
+  reldir = "opt/brother/Printers/${model}/";
+
+in rec {
+  driver = pkgsi686Linux.stdenv.mkDerivation rec {
+    inherit src version;
+    name = "${model}drv-${version}";
+
+    nativeBuildInputs = [ dpkg makeWrapper ];
+
+    unpackPhase = "dpkg-deb -x $src $out";
+
+    installPhase = ''
+      dir="$out/${reldir}"
+      substituteInPlace $dir/lpd/filter_${model} \
+        --replace /usr/bin/perl ${perl}/bin/perl \
+        --replace "BR_PRT_PATH =~" "BR_PRT_PATH = \"$dir\"; #" \
+        --replace "PRINTER =~" "PRINTER = \"${model}\"; #"
+      wrapProgram $dir/lpd/filter_${model} \
+        --prefix PATH : ${lib.makeBinPath [
+          coreutils ghostscript gnugrep gnused which
+        ]}
+    # need to use i686 glibc here, these are 32bit proprietary binaries
+    patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
+      $dir/lpd/brmfcl3770cdwfilter
+    '';
+
+    meta = {
+      description = "Brother ${lib.strings.toUpper model} driver";
+      homepage = "http://www.brother.com/";
+      license = lib.licenses.unfree;
+      platforms = [ "x86_64-linux" "i686-linux" ];
+      maintainers = [ lib.maintainers.steveej ];
+    };
+  };
+
+  cupswrapper = stdenv.mkDerivation rec {
+    inherit version src;
+    name = "${model}cupswrapper-${version}";
+
+    nativeBuildInputs = [ dpkg makeWrapper ];
+
+    unpackPhase = "dpkg-deb -x $src $out";
+
+    installPhase = ''
+      basedir=${driver}/${reldir}
+      dir=$out/${reldir}
+      substituteInPlace $dir/cupswrapper/brother_lpdwrapper_${model} \
+        --replace /usr/bin/perl ${perl}/bin/perl \
+        --replace "basedir =~" "basedir = \"$basedir\"; #" \
+        --replace "PRINTER =~" "PRINTER = \"${model}\"; #"
+      wrapProgram $dir/cupswrapper/brother_lpdwrapper_${model} \
+        --prefix PATH : ${lib.makeBinPath [ coreutils gnugrep gnused ]}
+      mkdir -p $out/lib/cups/filter
+      mkdir -p $out/share/cups/model
+      ln $dir/cupswrapper/brother_lpdwrapper_${model} $out/lib/cups/filter
+      ln $dir/cupswrapper/brother_${model}_printer_en.ppd $out/share/cups/model
+    '';
+
+    meta = {
+      description = "Brother ${lib.strings.toUpper model} CUPS wrapper driver";
+      homepage = "http://www.brother.com/";
+      license = lib.licenses.gpl2;
+      platforms = [ "x86_64-linux" "i686-linux" ];
+      maintainers = [ lib.maintainers.steveej ];
+    };
+  };
+}
diff --git a/nixpkgs/pkgs/misc/cups/drivers/canon/default.nix b/nixpkgs/pkgs/misc/cups/drivers/canon/default.nix
new file mode 100644
index 000000000000..0d6ec276b5f4
--- /dev/null
+++ b/nixpkgs/pkgs/misc/cups/drivers/canon/default.nix
@@ -0,0 +1,226 @@
+{ lib, stdenv, fetchurl, unzip, autoreconfHook, libtool, makeWrapper, cups
+, ghostscript, pkgsi686Linux, zlib }:
+
+let
+
+  i686_NIX_GCC = pkgsi686Linux.callPackage ({gcc}: gcc) {};
+  i686_libxml2 = pkgsi686Linux.callPackage ({libxml2}: libxml2) {};
+
+  commonVer = "4.10";
+  version = "3.70";
+  dl = "8/0100007658/08";
+
+  versionNoDots = builtins.replaceStrings ["."] [""] version;
+  src_canon = fetchurl {
+    url = "http://gdlp01.c-wss.com/gds/${dl}/linux-UFRII-drv-v${versionNoDots}-uken-05.tar.gz";
+    sha256 = "0424lvyrsvsb94qga4p4ldis7f714c5yw5ydv3f84mdl2a7papg0";
+  };
+
+in
+
+
+stdenv.mkDerivation {
+  pname = "canon-cups-ufr2";
+  inherit version;
+  src = src_canon;
+
+  phases = [ "unpackPhase" "installPhase" ];
+
+  postUnpack = ''
+    (cd $sourceRoot; tar -xzf Sources/cndrvcups-common-${commonVer}-1.tar.gz)
+    (cd $sourceRoot; tar -xzf Sources/cndrvcups-lb-${version}-1.tar.gz)
+  '';
+
+  nativeBuildInputs = [ makeWrapper unzip autoreconfHook libtool ];
+
+  buildInputs = [ cups zlib ];
+
+  installPhase = ''
+    ##
+    ## cndrvcups-common buildPhase
+    ##
+    ( cd cndrvcups-common-${commonVer}/buftool
+      autoreconf -fi
+      ./autogen.sh --prefix=$out --enable-progpath=$out/bin --libdir=$out/lib --disable-shared --enable-static
+      make
+    )
+
+    ( cd cndrvcups-common-${commonVer}/backend
+      ./autogen.sh --prefix=$out --libdir=$out/lib
+      make
+    )
+
+    ( cd cndrvcups-common-${commonVer}/c3plmod_ipc
+      make
+    )
+
+    ##
+    ## cndrvcups-common installPhase
+    ##
+
+    ( cd cndrvcups-common-${commonVer}/buftool
+      make install
+    )
+
+    ( cd cndrvcups-common-${commonVer}/backend
+      make install
+    )
+
+    ( cd cndrvcups-common-${commonVer}/c3plmod_ipc
+      make install DESTDIR=$out/lib
+    )
+
+    ( cd cndrvcups-common-${commonVer}/libs
+      chmod 755 *
+      mkdir -p $out/lib32
+      mkdir -p $out/bin
+      cp libcaiowrap.so.1.0.0 $out/lib32
+      cp libcaiousb.so.1.0.0 $out/lib32
+      cp libc3pl.so.0.0.1 $out/lib32
+      cp libcaepcm.so.1.0 $out/lib32
+      cp libColorGear.so.0.0.0 $out/lib32
+      cp libColorGearC.so.1.0.0 $out/lib32
+      cp libcanon_slim.so.1.0.0 $out/lib32
+      cp c3pldrv $out/bin
+    )
+
+    (cd cndrvcups-common-${commonVer}/Rule
+      mkdir -p $out/share/usb
+      chmod 644 *.usb-quirks $out/share/usb
+    )
+
+    (cd cndrvcups-common-${commonVer}/data
+      chmod 644 *.ICC
+      mkdir -p $out/share/caepcm
+      cp *.ICC $out/share/caepcm
+      cp *.icc $out/share/caepcm
+      cp *.PRF $out/share/caepcm
+    )
+
+    (cd $out/lib32
+      ln -sf libc3pl.so.0.0.1 libc3pl.so.0
+      ln -sf libc3pl.so.0.0.1 libc3pl.so
+      ln -sf libcaepcm.so.1.0 libcaepcm.so.1
+      ln -sf libcaepcm.so.1.0 libcaepcm.so
+      ln -sf libcaiowrap.so.1.0.0 libcaiowrap.so.1
+      ln -sf libcaiowrap.so.1.0.0 libcaiowrap.so
+      ln -sf libcaiousb.so.1.0.0 libcaiousb.so.1
+      ln -sf libcaiousb.so.1.0.0 libcaiousb.so
+      ln -sf libcanon_slim.so.1.0.0 libcanon_slim.so.1
+      ln -sf libcanon_slim.so.1.0.0 libcanon_slim.so
+      ln -sf libColorGear.so.0.0.0 libColorGear.so.0
+      ln -sf libColorGear.so.0.0.0 libColorGear.so
+      ln -sf libColorGearC.so.1.0.0 libColorGearC.so.1
+      ln -sf libColorGearC.so.1.0.0 libColorGearC.so
+    )
+
+    (cd $out/lib
+      ln -sf libcanonc3pl.so.1.0.0 libcanonc3pl.so
+      ln -sf libcanonc3pl.so.1.0.0 libcanonc3pl.so.1
+    )
+
+    patchelf --set-rpath "$(cat ${i686_NIX_GCC}/nix-support/orig-cc)/lib" $out/lib32/libColorGear.so.0.0.0
+    patchelf --set-rpath "$(cat ${i686_NIX_GCC}/nix-support/orig-cc)/lib" $out/lib32/libColorGearC.so.1.0.0
+
+    patchelf --interpreter "$(cat ${i686_NIX_GCC}/nix-support/dynamic-linker)" --set-rpath "$out/lib32" $out/bin/c3pldrv
+
+    # c3pldrv is programmed with fixed paths that point to "/usr/{bin,lib.share}/..."
+    # preload32 wrappes all necessary function calls to redirect the fixed paths
+    # into $out.
+    mkdir -p $out/libexec
+    preload32=$out/libexec/libpreload32.so
+    ${i686_NIX_GCC}/bin/gcc -shared ${./preload.c} -o $preload32 -ldl -DOUT=\"$out\" -fPIC
+    wrapProgram "$out/bin/c3pldrv" \
+      --set PRELOAD_DEBUG 1 \
+      --set LD_PRELOAD $preload32 \
+      --prefix LD_LIBRARY_PATH : "$out/lib32"
+
+
+
+    ##
+    ## cndrvcups-lb buildPhase
+    ##
+
+    ( cd cndrvcups-lb-${version}/buftool
+      ./autogen.sh --prefix=$out --libdir=$out/lib --enable-progpath=$out/bin --enable-static
+      make
+    )
+
+    ( cd cndrvcups-lb-${version}/pstoufr2cpca
+      ./autogen.sh --prefix=$out --libdir=$out/lib
+      make
+    )
+
+    ##
+    ## cndrvcups-lb installPhase
+    ##
+
+    ( cd cndrvcups-lb-${version}/pstoufr2cpca
+      make install
+    )
+
+    ( cd cndrvcups-lb-${version}/libs
+      chmod 755 *
+      mkdir -p $out/lib32
+      mkdir -p $out/bin
+      cp libcanonufr2.la $out/lib32
+      cp libcanonufr2.so.1.0.0 $out/lib32
+      cp libufr2filter.so.1.0.0 $out/lib32
+      cp libEnoJBIG.so.1.0.0 $out/lib32
+      cp libEnoJPEG.so.1.0.0 $out/lib32
+      cp libcaiocnpkbidi.so.1.0.0 $out/lib32
+      cp libcnlbcm.so.1.0 $out/lib32
+
+      cp cnpkmoduleufr2 $out/bin #maybe needs setuid 4755
+      cp cnpkbidi $out/bin
+    )
+
+    ( cd $out/lib32
+      ln -sf libcanonufr2.so.1.0.0 libcanonufr2.so
+      ln -sf libcanonufr2.so.1.0.0 libcanonufr2.so.1
+      ln -sf libufr2filter.so.1.0.0 libufr2filter.so
+      ln -sf libufr2filter.so.1.0.0 libufr2filter.so.1
+      ln -sf libEnoJBIG.so.1.0.0 libEnoJBIG.so
+      ln -sf libEnoJBIG.so.1.0.0 libEnoJBIG.so.1
+      ln -sf libEnoJPEG.so.1.0.0 libEnoJPEG.so
+      ln -sf libEnoJPEG.so.1.0.0 libEnoJPEG.so.1
+      ln -sf libcaiocnpkbidi.so.1.0.0 libcaiocnpkbidi.so
+      ln -sf libcaiocnpkbidi.so.1.0.0 libcaiocnpkbidi.so.1
+      ln -sf libcnlbcm.so.1.0 libcnlbcm.so.1
+      ln -sf libcnlbcm.so.1.0 libcnlbcm.so
+    )
+
+    ( cd cndrvcups-lb-${version}
+      chmod 644 data/CnLB*
+      chmod 644 libs/cnpkbidi_info*
+      chmod 644 libs/ThLB*
+      mkdir -p $out/share/caepcm
+      mkdir -p $out/share/cnpkbidi
+      mkdir -p $out/share/ufr2filter
+      cp data/CnLB* $out/share/caepcm
+      cp libs/cnpkbidi_info* $out/share/cnpkbidi
+      cp libs/ThLB* $out/share/ufr2filter
+    )
+
+    mkdir -p $out/share/cups/model
+    install -c -m 644 cndrvcups-lb-${version}/ppd/CN*.ppd $out/share/cups/model/
+
+    patchelf --set-rpath "$out/lib32:${i686_libxml2.out}/lib" $out/lib32/libcanonufr2.so.1.0.0
+
+    patchelf --interpreter "$(cat ${i686_NIX_GCC}/nix-support/dynamic-linker)" --set-rpath "$out/lib32" $out/bin/cnpkmoduleufr2
+    patchelf --interpreter "$(cat ${i686_NIX_GCC}/nix-support/dynamic-linker)" --set-rpath "$out/lib32:${i686_libxml2.out}/lib" $out/bin/cnpkbidi
+
+    makeWrapper "${ghostscript}/bin/gs" "$out/bin/gs" \
+      --prefix LD_LIBRARY_PATH ":" "$out/lib" \
+      --prefix PATH ":" "$out/bin"
+    '';
+
+  meta = with lib; {
+    description = "CUPS Linux drivers for Canon printers";
+    homepage = "http://www.canon.com/";
+    license = licenses.unfree;
+    maintainers = with maintainers; [
+      kylesferrazza
+    ];
+  };
+}
diff --git a/nixpkgs/pkgs/misc/cups/drivers/canon/preload.c b/nixpkgs/pkgs/misc/cups/drivers/canon/preload.c
new file mode 100644
index 000000000000..f3a30063a6e3
--- /dev/null
+++ b/nixpkgs/pkgs/misc/cups/drivers/canon/preload.c
@@ -0,0 +1,81 @@
+/*
+ * LD_PRELOAD trick to make c3pldrv handle the absolute path to /usr/{bin,lib,share)}.
+ * As c3pldrv is a 32 bit executable, /lib will be rewritten to /lib32.
+ *
+ * Usage:
+ *   gcc -shared -fPIC -DOUT="$out" preload.c -o preload.so -ldl
+ *   LD_PRELOAD=$PWD/preload.so ./c3pldrv
+ */
+
+#define _GNU_SOURCE
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+#include <fcntl.h>
+#include <dlfcn.h>
+#include <limits.h>
+
+#ifndef OUT
+#error Missing OUT define - path to the installation directory.
+#endif
+
+typedef void *(*dlopen_func_t)(const char *filename, int flag);
+typedef int (*open_func_t)(const char *pathname, int flags, ...);
+typedef int (*execv_func_t)(const char *path, char *const argv[]);
+
+
+void *dlopen(const char *filename, int flag)
+{
+	dlopen_func_t orig_dlopen;
+	const char *new_filename;
+	char buffer[PATH_MAX];
+
+	orig_dlopen = (dlopen_func_t)dlsym(RTLD_NEXT, "dlopen");
+
+	new_filename = filename;
+	if (strncmp("/usr/lib", filename, 8) == 0) {
+		snprintf(buffer, PATH_MAX, OUT "/lib32%s", filename+8);
+		buffer[PATH_MAX-1] = '\0';
+		new_filename = buffer;
+	}
+	
+	return orig_dlopen(new_filename, flag);
+}
+
+int open(const char *pathname, int flags, ...)
+{
+	open_func_t orig_open;
+	const char *new_pathname;
+	char buffer[PATH_MAX];
+
+	orig_open = (open_func_t)dlsym(RTLD_NEXT, "open");
+
+	new_pathname = pathname;
+	if (strncmp("/usr/share", pathname, 10) == 0) {
+		snprintf(buffer, PATH_MAX, OUT "%s", pathname+4);
+		buffer[PATH_MAX-1] = '\0';
+		new_pathname = buffer;
+	}
+	
+	return orig_open(new_pathname, flags);
+}
+
+int execv(const char *path, char *const argv[])
+{
+	execv_func_t orig_execv;
+	const char *new_path;
+	char buffer[PATH_MAX];
+
+	orig_execv = (execv_func_t)dlsym(RTLD_NEXT, "execv");
+
+	new_path = path;
+	if (strncmp("/usr/bin", path, 8) == 0) {
+		snprintf(buffer, PATH_MAX, OUT "%s", path+4);
+		buffer[PATH_MAX-1] = '\0';
+		new_path = buffer;
+	}
+	
+	return orig_execv(new_path, argv);
+}
+
diff --git a/nixpkgs/pkgs/misc/cups/drivers/carps-cups/default.nix b/nixpkgs/pkgs/misc/cups/drivers/carps-cups/default.nix
new file mode 100644
index 000000000000..32e92da16084
--- /dev/null
+++ b/nixpkgs/pkgs/misc/cups/drivers/carps-cups/default.nix
@@ -0,0 +1,44 @@
+{ stdenv
+, lib
+, fetchFromGitHub
+, cups
+}:
+
+stdenv.mkDerivation {
+  pname = "carps-cups";
+  version = "unstable-2018-03-05";
+
+  src = fetchFromGitHub {
+    owner = "ondrej-zary";
+    repo = "carps-cups";
+    rev = "18d80d1d6f473dd9132e4b6d8b5c592c74982f17";
+    sha256 = "0mjj9hs5lqxi0qamgb4sxfz4fvf7ggi66bxd37bkz3fl0g9xff70";
+  };
+
+  preBuild = ''
+    export CUPS_DATADIR="${cups}/share/cups"
+  '';
+
+  installPhase = ''
+    CUPSDIR="$out/lib/cups"
+    CUPSDATADIR="$out/share/cups"
+
+    mkdir -p "$CUPSDIR/filter" "$CUPSDATADIR/drv" "$CUPSDATADIR/usb"
+
+    install -s rastertocarps $CUPSDIR/filter
+    install -m 644 carps.drv $CUPSDATADIR/drv/
+    install -m 644 carps.usb-quirks $CUPSDATADIR/usb/
+  '';
+
+  buildInputs = [ cups ];
+
+  meta = with lib; {
+    description = "CUPS Linux drivers for Canon printers";
+    homepage = "https://www.canon.com/";
+    license = licenses.gpl3Plus;
+    maintainers = with maintainers; [
+      ewok
+    ];
+  };
+}
+
diff --git a/nixpkgs/pkgs/misc/cups/drivers/cnijfilter2/default.nix b/nixpkgs/pkgs/misc/cups/drivers/cnijfilter2/default.nix
new file mode 100644
index 000000000000..c46bb564a1ea
--- /dev/null
+++ b/nixpkgs/pkgs/misc/cups/drivers/cnijfilter2/default.nix
@@ -0,0 +1,134 @@
+{ stdenv, lib, fetchzip, autoconf, automake, cups, glib, libxml2, libusb1, libtool
+, withDebug ? false }:
+
+stdenv.mkDerivation {
+  pname = "cnijfilter2";
+
+  version = "6.00";
+
+  src = fetchzip {
+    url = "https://gdlp01.c-wss.com/gds/9/0100010739/01/cnijfilter2-source-6.00-1.tar.gz";
+    sha256 = "1n4vq44zya0n4a7jvq3yyqy7dcvc2911cjvxmq48zqicb2xdgafr";
+  };
+
+  buildInputs = [
+    cups automake autoconf glib libxml2 libusb1 libtool
+  ];
+
+  # lgmon3's --enable-libdir flag is used soley for specifying in which
+  # directory the cnnnet.ini cache file should reside.
+  # NixOS uses /var/cache/cups, and given the name, it seems like a reasonable
+  # place to put the cnnet.ini file, and thus we do so.
+  #
+  # Note that the drivers attempt to dlopen
+  # $out/lib/cups/filter/libcnbpcnclapicom2.so
+  buildPhase = ''
+    mkdir -p $out/lib
+    cp com/libs_bin64/* $out/lib
+    mkdir -p $out/lib/cups/filter
+    ln -s $out/lib/libcnbpcnclapicom2.so $out/lib/cups/filter
+
+    export NIX_LDFLAGS="$NIX_LDFLAGS -L$out/lib"
+  '' + lib.optionalString withDebug ''
+    export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -D__DEBUG__ -DDEBUG_LOG"
+  '' + ''
+
+    (
+      cd lgmon3
+      substituteInPlace src/Makefile.am \
+        --replace /usr/include/libusb-1.0 \
+                  ${libusb1.dev}/include/libusb-1.0
+      ./autogen.sh --prefix=$out --enable-progpath=$out/bin \
+                   --datadir=$out/share \
+                   --enable-libdir=/var/cache/cups
+      make
+    )
+
+    (
+      cd cmdtocanonij2
+      ./autogen.sh --prefix=$out
+      make
+    )
+
+    (
+      cd cnijbe2
+      substituteInPlace src/Makefile.am \
+        --replace "/usr/lib/cups/backend" \
+                  "$out/lib/cups/backend"
+      ./autogen.sh --prefix=$out --enable-progpath=$out/bin
+      make
+    )
+
+    (
+      cd rastertocanonij
+      ./autogen.sh --prefix=$out --enable-progpath=$out/bin
+      make
+    )
+
+    (
+      cd tocanonij
+      ./autogen.sh --prefix=$out --enable-progpath=$out/bin
+      make
+    )
+
+    (
+      cd tocnpwg
+      ./autogen.sh --prefix=$out --enable-progpath=$out/bin
+      make
+    )
+  '';
+
+  installPhase = ''
+    (
+      cd lgmon3
+      make install
+    )
+
+    (
+      cd cmdtocanonij2
+      make install
+    )
+
+    (
+      cd cnijbe2
+      make install
+    )
+
+    (
+      cd rastertocanonij
+      make install
+    )
+
+    (
+      cd tocanonij
+      make install
+    )
+
+    (
+      cd tocnpwg
+      make install
+    )
+
+    mkdir -p $out/share/cups/model
+    cp ppd/*.ppd $out/share/cups/model
+  '';
+
+  meta = with lib; {
+    description = "Canon InkJet printer drivers for many Pixma series printers.";
+    longDescription = ''
+      Canon InjKet printer drivers for series E200, E300, E3100, E3300, E4200, E450, E470, E480,
+      G3000, G3010, G4000, G4010, G5000, G5080, G6000, G6050, G6080, G7000, G7050, G7080, GM2000,
+      GM2080, GM4000, GM4080, iB4000, iB4100, iP110, MB2000, MB2100, MB2300, MB2700, MB5000,
+      MB5100, MB5300, MB5400, MG2900, MG3000, MG3600, MG5600, MG5700, MG6600, MG6700, MG6800,
+      MG6900, MG7500, MG7700, MX490, TR4500, TR703, TR7500, TR7530, TR8500, TR8530, TR8580, TR9530,
+      TS200, TS300, TS3100, TS3300, TS5000, TS5100, TS5300, TS5380, TS6000, TS6100, TS6130, TS6180,
+      TS6200, TS6230, TS6280, TS6300, TS6330, TS6380, TS700, TS708, TS7330, TS8000, TS8100, TS8130,
+      TS8180, TS8200, TS8230, TS8280, TS8300, TS8330, TS8380, TS9000, TS9100, TS9180, TS9500,
+      TS9580, XK50, XK60, XK70, XK80.
+    '';
+    homepage = "https://hk.canon/en/support/0101048401/1";
+    license = licenses.unfree;
+    platforms = [ "i686-linux" "x86_64-linux" ];
+    maintainers = with maintainers; [ cstrahan ];
+  };
+}
diff --git a/nixpkgs/pkgs/misc/cups/drivers/cnijfilter_2_80/default.nix b/nixpkgs/pkgs/misc/cups/drivers/cnijfilter_2_80/default.nix
new file mode 100644
index 000000000000..2cb3fe01ddb6
--- /dev/null
+++ b/nixpkgs/pkgs/misc/cups/drivers/cnijfilter_2_80/default.nix
@@ -0,0 +1,109 @@
+{ stdenv, lib, fetchzip,
+  autoconf, automake, libtool,
+  cups, popt, libtiff, libpng,
+  ghostscript }:
+
+/* this derivation is basically just a transcription of the rpm .spec
+   file included in the tarball */
+
+stdenv.mkDerivation {
+  pname = "cnijfilter";
+
+  /* important note about versions: cnijfilter packages seem to use
+     versions in a non-standard way.  the version indicates which
+     printers are supported in the package.  so this package should
+     not be "upgraded" in the usual way.
+
+     instead, if you want to include another version supporting your
+     printer, you should try to abstract out the common things (which
+     should be pretty much everything except the version and the 'pr'
+     and 'pr_id' values to loop over). */
+  version = "2.80";
+
+  src = fetchzip {
+    url = "http://gdlp01.c-wss.com/gds/1/0100000841/01/cnijfilter-common-2.80-1.tar.gz";
+    sha256 = "06s9nl155yxmx56056y22kz1p5b2sb5fhr3gf4ddlczjkd1xch53";
+  };
+
+  buildInputs = [ autoconf libtool automake
+                  cups popt libtiff libpng
+                  ghostscript ];
+
+  patches = [ ./patches/missing-include.patch
+              ./patches/libpng15.patch ];
+
+  postPatch = ''
+    sed -i "s|/usr/lib/cups/backend|$out/lib/cups/backend|" backend/src/Makefile.am;
+    sed -i "s|/usr|$out|" backend/src/cnij_backend_common.c;
+    sed -i "s|/usr/bin|${ghostscript}/bin|" pstocanonij/filter/pstocanonij.c;
+    sed -i "s|/usr/local|$out|" libs/bjexec/bjexec.c;
+  '';
+
+  configurePhase = ''
+    cd libs
+    ./autogen.sh --prefix=$out;
+
+    cd ../cngpij
+    ./autogen.sh --prefix=$out --enable-progpath=$out/bin;
+
+    cd ../pstocanonij
+    ./autogen.sh --prefix=$out --enable-progpath=$out/bin;
+
+    cd ../backend
+    ./autogen.sh --prefix=$out;
+    cd ..;
+  '';
+
+  preInstall = ''
+    mkdir -p $out/bin $out/lib/cups/filter $out/share/cups/model;
+  '';
+
+  postInstall = ''
+    for pr in mp140 mp210 ip3500 mp520 ip4500 mp610; do
+      cd ppd;
+      ./autogen.sh --prefix=$out --program-suffix=$pr
+      make clean;
+      make;
+      make install;
+
+      cd ../cnijfilter;
+      ./autogen.sh --prefix=$out --program-suffix=$pr --enable-libpath=/var/lib/cups/path/lib/bjlib --enable-binpath=$out/bin;
+      make clean;
+      make;
+      make install;
+
+      cd ..;
+    done;
+
+    mkdir -p $out/lib/bjlib;
+    for pr_id in 315 316 319 328 326 327; do
+      install -c -m 755 $pr_id/database/* $out/lib/bjlib;
+      install -c -s -m 755 $pr_id/libs_bin/*.so.* $out/lib;
+    done;
+
+    pushd $out/lib;
+    for so_file in *.so.*; do
+      ln -s $so_file ''${so_file/.so.*/}.so;
+      patchelf --set-rpath $out/lib $so_file;
+    done;
+    popd;
+  '';
+
+  /* the tarball includes some pre-built shared libraries.  we run
+     'patchelf --set-rpath' on them just a few lines above, so that
+     they can find each other.  but that's not quite enough.  some of
+     those libraries load each other in non-standard ways -- they
+     don't list each other in the DT_NEEDED section.  so, if the
+     standard 'patchelf --shrink-rpath' (from
+     pkgs/development/tools/misc/patchelf/setup-hook.sh) is run on
+     them, it undoes the --set-rpath.  this prevents that. */
+  dontPatchELF = true;
+
+  meta = with lib; {
+    description = "Canon InkJet printer drivers for the iP5400, MP520, MP210, MP140, iP3500, and MP610 series.  (MP520 drivers also work for MX700.)";
+    homepage = "http://support-asia.canon-asia.com/content/EN/0100084101.html";
+    license = licenses.unfree;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ jerith666 ];
+  };
+}
diff --git a/nixpkgs/pkgs/misc/cups/drivers/cnijfilter_2_80/patches/libpng15.patch b/nixpkgs/pkgs/misc/cups/drivers/cnijfilter_2_80/patches/libpng15.patch
new file mode 100644
index 000000000000..f5b3a1b13db5
--- /dev/null
+++ b/nixpkgs/pkgs/misc/cups/drivers/cnijfilter_2_80/patches/libpng15.patch
@@ -0,0 +1,23 @@
+diff -aur cnijfilter-source-3.20-1/cnijfilter/src/bjfimage.c cnijfilter-source-3.20-1.new/cnijfilter/src/bjfimage.c
+--- cnijfilter-source-3.20-1/cnijfilter/src/bjfimage.c	2009-03-26 06:11:05.000000000 +0100
++++ cnijfilter-source-3.20-1.new/cnijfilter/src/bjfimage.c	2012-02-10 09:33:52.512334139 +0100
+@@ -1520,8 +1520,8 @@
+ 	short			tmpformat;
+ 	short			retbyte = 0;
+ 	short			bpp = 3;
+-	long			width = 0;
+-	long			length = 0;
++	png_uint_32		width = 0;
++	png_uint_32		length = 0;
+ 	long			rstep = 0;
+ 	long			RasterLength = 0;
+ 	long			i;
+@@ -1574,7 +1574,7 @@
+ 		goto onErr;
+ 	}
+ 
+-	if (setjmp (png_p->jmpbuf))
++	if (setjmp (png_jmpbuf(png_p)))
+ 	{
+ 		png_destroy_read_struct(&png_p, &info_p, (png_infopp)NULL);
+ 		goto onErr;
diff --git a/nixpkgs/pkgs/misc/cups/drivers/cnijfilter_2_80/patches/missing-include.patch b/nixpkgs/pkgs/misc/cups/drivers/cnijfilter_2_80/patches/missing-include.patch
new file mode 100644
index 000000000000..20c2d756d1eb
--- /dev/null
+++ b/nixpkgs/pkgs/misc/cups/drivers/cnijfilter_2_80/patches/missing-include.patch
@@ -0,0 +1,20 @@
+--- a/backend/src/cnij_backend_common.c	2008-09-01 10:05:44.000000000 +0200
++++ b/backend/src/cnij_backend_common.c	2012-05-06 17:38:40.000000000 +0200
+@@ -39,6 +39,7 @@
+ // CUPS Header
+ #include <cups/cups.h>
+ #include <cups/ipp.h>
++#include <cups/ppd.h>
+ 
+ // Header file for CANON
+ #include "cnij_backend_common.h"
+--- a/cngpijmon/src/bjcupsmon_cups.c	2008-09-02 12:28:24.000000000 +0200
++++ b/cngpijmon/src/bjcupsmon_cups.c	2012-05-06 17:39:20.000000000 +0200
+@@ -21,6 +21,7 @@
+ /*** Includes ***/
+ #include <cups/cups.h>
+ #include <cups/language.h>
++#include <cups/ppd.h>
+ #include <sys/types.h>
+ #include <unistd.h>
+ #include <pwd.h>
diff --git a/nixpkgs/pkgs/misc/cups/drivers/cnijfilter_4_00/default.nix b/nixpkgs/pkgs/misc/cups/drivers/cnijfilter_4_00/default.nix
new file mode 100644
index 000000000000..f6504b598cb0
--- /dev/null
+++ b/nixpkgs/pkgs/misc/cups/drivers/cnijfilter_4_00/default.nix
@@ -0,0 +1,150 @@
+{ stdenv, lib, fetchzip,
+  autoconf, automake, libtool,
+  cups, popt, libtiff, libpng,
+  ghostscript, glib, libusb1, libxml2 }:
+
+/* this derivation is basically just a transcription of the rpm .spec
+   file included in the tarball */
+
+let arch =
+  if stdenv.hostPlatform.system == "x86_64-linux" then "64"
+    else if stdenv.hostPlatform.system == "i686-linux" then "32"
+    else throw "Unsupported system ${stdenv.hostPlatform.system}";
+
+in stdenv.mkDerivation {
+  pname = "cnijfilter";
+
+  /* important note about versions: cnijfilter packages seem to use
+     versions in a non-standard way.  the version indicates which
+     printers are supported in the package.  so this package should
+     not be "upgraded" in the usual way.
+
+     instead, if you want to include another version supporting your
+     printer, you should try to abstract out the common things (which
+     should be pretty much everything except the version and the 'pr'
+     and 'pr_id' values to loop over). */
+  version = "4.00";
+
+  src = fetchzip {
+    url = "http://gdlp01.c-wss.com/gds/5/0100005515/01/cnijfilter-source-4.00-1.tar.gz";
+    sha256 = "1f6vpx1z3qa88590i5m0s49j9n90vpk81xmw6pvj0nfd3qbvzkya";
+  };
+
+  buildInputs = [ autoconf libtool automake
+                  cups popt libtiff libpng
+                  ghostscript glib libusb1 libxml2 ];
+
+  # patches from https://github.com/tokiclover/bar-overlay/tree/master/net-print/cnijfilter
+  patches = [
+    ./patches/cnijfilter-3.80-1-cups-1.6.patch
+    ./patches/cnijfilter-3.80-6-cups-1.6.patch
+    ./patches/cnijfilter-4.00-4-ppd.patch
+    ./patches/cnijfilter-4.00-5-abi_x86_32.patch
+    ./patches/cnijfilter-4.00-6-headers.patch
+  ];
+
+  postPatch = ''
+    sed -i "s|/usr/lib/cups/backend|$out/lib/cups/backend|" backend/src/Makefile.am;
+    sed -i "s|/usr/lib/cups/backend|$out/lib/cups/backend|" backendnet/backend/Makefile.am;
+    sed -i "s|/usr/lib/cups/backend|$out/lib/cups/backend|" cnijbe/src/Makefile.am;
+    sed -i "s|/usr|$out|" backend/src/cnij_backend_common.c;
+    sed -i "s|/usr/bin|${ghostscript}/bin|" pstocanonij/filter/pstocanonij.c;
+  '';
+
+  configurePhase = ''
+    cd libs
+    ./autogen.sh --prefix=$out
+
+    cd ../bscc2sts
+    ./autogen.sh
+
+    cd ../cnijnpr
+    ./autogen.sh --prefix=$out --enable-libpath=$out/lib/bjlib
+
+    cd ../cngpij
+    ./autogen.sh --prefix=$out --enable-progpath=$out/bin
+
+    cd ../cngpijmnt
+    ./autogen.sh --prefix=$out --enable-progpath=$out/bin
+
+    cd ../pstocanonij
+    ./autogen.sh --prefix=$out --enable-progpath=$out/bin
+
+    cd ../backend
+    ./autogen.sh --prefix=$out
+
+    cd ../backendnet
+    ./autogen.sh --prefix=$out --enable-libpath=$out/lib/bjlib --enable-progpath=$out/bin
+
+    cd ../cmdtocanonij
+    ./autogen.sh --prefix=$out --datadir=$out/share
+
+    cd ../cnijbe
+    ./autogen.sh --prefix=$out --enable-progpath=$out/bin
+
+    cd ../lgmon2
+    substituteInPlace src/Makefile.am \
+        --replace /usr/include/libusb-1.0 \
+                  ${libusb1.dev}/include/libusb-1.0
+    ./autogen.sh --prefix=$out --enable-libpath=$out/lib/bjlib --enable-progpath=$out/bin
+
+    cd ..;
+
+    sed -e "s,cnijlgmon2_LDADD =,cnijlgmon2_LDADD = -L../../com/libs_bin${arch}," \
+    -i lgmon2/src/Makefile.am || die
+  '';
+
+  preInstall = ''
+    mkdir -p $out/bin $out/lib/cups/filter $out/share/cups/model;
+  '';
+
+  postInstall = ''
+    set -o xtrace
+    for pr in mg2400 mg2500 mg3500 mg5500 mg6400 mg6500 mg7100 p200; do
+      cd ppd;
+      ./autogen.sh --prefix=$out --program-suffix=$pr
+      make clean;
+      make;
+      make install;
+
+      cd ../cnijfilter;
+      ./autogen.sh --prefix=$out --program-suffix=$pr --enable-libpath=/var/lib/cups/path/lib/bjlib --enable-binpath=$out/bin;
+      make clean;
+      make;
+      make install;
+
+      cd ..;
+    done;
+
+    mkdir -p $out/lib/bjlib;
+    for pr_id in 423 424 425 426 427 428 429 430; do
+      install -c -m 755 $pr_id/database/* $out/lib/bjlib;
+      install -c -s -m 755 $pr_id/libs_bin${arch}/*.so.* $out/lib;
+    done;
+
+    pushd $out/lib;
+    for so_file in *.so.*; do
+      ln -s $so_file ''${so_file/.so.*/}.so;
+      patchelf --set-rpath $out/lib $so_file;
+    done;
+    popd;
+  '';
+
+  /* the tarball includes some pre-built shared libraries.  we run
+     'patchelf --set-rpath' on them just a few lines above, so that
+     they can find each other.  but that's not quite enough.  some of
+     those libraries load each other in non-standard ways -- they
+     don't list each other in the DT_NEEDED section.  so, if the
+     standard 'patchelf --shrink-rpath' (from
+     pkgs/development/tools/misc/patchelf/setup-hook.sh) is run on
+     them, it undoes the --set-rpath.  this prevents that. */
+  dontPatchELF = true;
+
+  meta = with lib; {
+    description = "Canon InkJet printer drivers for the MG2400 MG2500 MG3500 MG5500 MG6400 MG6500 MG7100 and P200 series";
+    homepage = "https://www.canon-europe.com/support/consumer_products/products/fax__multifunctionals/inkjet/pixma_mg_series/pixma_mg5550.aspx?type=drivers&driverdetailid=tcm:13-1094072";
+    license = licenses.unfree;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ chpatrick ];
+  };
+}
diff --git a/nixpkgs/pkgs/misc/cups/drivers/cnijfilter_4_00/patches/cnijfilter-3.80-1-cups-1.6.patch b/nixpkgs/pkgs/misc/cups/drivers/cnijfilter_4_00/patches/cnijfilter-3.80-1-cups-1.6.patch
new file mode 100644
index 000000000000..dfc0bb2268cb
--- /dev/null
+++ b/nixpkgs/pkgs/misc/cups/drivers/cnijfilter_4_00/patches/cnijfilter-3.80-1-cups-1.6.patch
@@ -0,0 +1,62 @@
+--- a/cngpij/cngpij/bjcups.c
++++ a/cngpij/cngpij/bjcups.c
+@@ -698,8 +719,8 @@
+ 	else {
+ 		pRequest = ippNew();
+ 		
+-		pRequest->request.op.operation_id = CUPS_GET_PRINTERS;
+-		pRequest->request.op.request_id   = 1;
++		ippSetOperation(pRequest, CUPS_GET_PRINTERS);
++		ippSetRequestId(pRequest, 1);
+ 		
+ 		pLanguage = bjcupsLangDefault();	// cupsLangDefault() -> bjcupsLangDefault() for cups-1.1.19
+ 		
+@@ -708,29 +729,29 @@
+ 		ippAddString(pRequest, IPP_TAG_OPERATION, IPP_TAG_URI, "printer-uri", NULL, NULL);
+ 		
+ 		if ((pResponse = cupsDoRequest(pHTTP, pRequest, "/")) != NULL) {
+-			if (pResponse->request.status.status_code > IPP_OK_CONFLICT) {
++			if (ippGetStatusCode(pResponse) > IPP_OK_CONFLICT) {
+ 				fputs("ERROR: IPP ERROR\n", stderr);
+ 				goto onErr;
+ 			}
+ 			else {
+-				pAttribute = pResponse->attrs;
++				pAttribute = ippFirstAttribute(pResponse);
+ 
+ 				while (pAttribute != NULL) {
+-					while (pAttribute != NULL && pAttribute->group_tag != IPP_TAG_PRINTER) {
+-						pAttribute = pAttribute->next;
++					while (pAttribute != NULL && ippGetGroupTag(pAttribute) != IPP_TAG_PRINTER) {
++						pAttribute = ippNextAttribute(pResponse);
+ 					}
+ 					if (pAttribute == NULL) {
+ 						break;
+ 					}
+ 					
+-					while (pAttribute != NULL && pAttribute->group_tag == IPP_TAG_PRINTER) {
+-						if (strcmp(pAttribute->name, "printer-name") == 0 && pAttribute->value_tag == IPP_TAG_NAME) {
+-							pPrinter = pAttribute->values[0].string.text;
++					while (pAttribute != NULL && ippGetGroupTag(pAttribute) == IPP_TAG_PRINTER) {
++						if (strcmp(ippGetName(pAttribute), "printer-name") == 0 && ippGetValueTag(pAttribute) == IPP_TAG_NAME) {
++							pPrinter = ippGetString(pAttribute, 0, NULL);
+ 						}
+-						if (strcmp(pAttribute->name, "device-uri") == 0 && pAttribute->value_tag == IPP_TAG_URI) {
+-							pDUri = pAttribute->values[0].string.text;
++						if (strcmp(ippGetName(pAttribute), "device-uri") == 0 && ippGetValueTag(pAttribute) == IPP_TAG_URI) {
++							pDUri = ippGetString(pAttribute, 0, NULL);
+ 						}
+-						pAttribute = pAttribute->next;
++						pAttribute = ippNextAttribute(pResponse);
+ 					}
+ 
+ 					if (strcasecmp(pDestName, pPrinter) == 0) {
+@@ -739,7 +760,7 @@
+ 					}
+ 					
+ 					if (pAttribute != NULL)
+-						 pAttribute = pAttribute->next;
++						pAttribute = ippNextAttribute(pResponse);
+ 				}
+ 			}
+
diff --git a/nixpkgs/pkgs/misc/cups/drivers/cnijfilter_4_00/patches/cnijfilter-3.80-6-cups-1.6.patch b/nixpkgs/pkgs/misc/cups/drivers/cnijfilter_4_00/patches/cnijfilter-3.80-6-cups-1.6.patch
new file mode 100644
index 000000000000..6b51d4837d45
--- /dev/null
+++ b/nixpkgs/pkgs/misc/cups/drivers/cnijfilter_4_00/patches/cnijfilter-3.80-6-cups-1.6.patch
@@ -0,0 +1,87 @@
+diff --git a/cngpijmnt/src/getipc.c b/cngpijmnt/src/getipc.c
+index 8688032..54c7933 100755
+--- a/cngpijmnt/src/getipc.c
++++ b/cngpijmnt/src/getipc.c
+@@ -42,7 +42,7 @@ int GetIPCData(LPIPCU pipc, char *sname)
+ 	int server_fd;
+ 	int client_fd;
+ 	char buf[128];
+-	size_t len;
++	socklen_t len;
+ 	short ret = RET_ERROR;
+ 
+ 	if( (server_fd = socket(PF_UNIX, SOCK_STREAM, 0)) < 0 )
+
+--- a/cngpijmnt/src/main.c	2016-11-12 23:39:03.534855723 +0100
++++ b/cngpijmnt/src/main.c	2016-11-12 23:47:02.521847145 +0100
+@@ -308,8 +308,8 @@
+ 					*pResponse;					// Pointer to CUPS IPP response.
+ 	ipp_attribute_t	*pAttribute;				// Pointer to CUPS attributes.
+ 	cups_lang_t		*pLanguage;					// Pointer to language.
+-	char			*pPrinter = NULL;			// Pointer to printer name.
+-	char			*pDUri = NULL;				// Pointer to Device uri.
++	const char			*pPrinter = NULL;			// Pointer to printer name.
++	const char			*pDUri = NULL;				// Pointer to Device uri.
+ 	short			retVal = -1;	// Return value.
+ /*** Parameters end ***/
+ 	
+@@ -321,8 +321,8 @@
+ 	else {
+ 		pRequest = ippNew();
+ 		
+-		pRequest->request.op.operation_id = CUPS_GET_PRINTERS;
+-		pRequest->request.op.request_id   = 1;
++		ippSetOperation(pRequest, CUPS_GET_PRINTERS);
++		ippSetRequestId(pRequest, 1);
+ 		
+ 		pLanguage = bjcupsLangDefault();	// cupsLangDefault() -> bjcupsLangDefault() for cups-1.1.19
+ 		
+@@ -331,29 +331,29 @@
+ 		ippAddString(pRequest, IPP_TAG_OPERATION, IPP_TAG_URI, "printer-uri", NULL, NULL);
+ 		
+ 		if ((pResponse = cupsDoRequest(pHTTP, pRequest, "/")) != NULL) {
+-			if (pResponse->request.status.status_code > IPP_OK_CONFLICT) {
++			if (ippGetStatusCode(pResponse) > IPP_OK_CONFLICT) {
+ 				fputs("ERROR: IPP ERROR\n", stderr);
+ 				goto onErr;
+ 			}
+ 			else {
+-				pAttribute = pResponse->attrs;
++				pAttribute = ippFirstAttribute(pResponse);
+ 
+ 				while (pAttribute != NULL) {
+-					while (pAttribute != NULL && pAttribute->group_tag != IPP_TAG_PRINTER) {
+-						pAttribute = pAttribute->next;
++					while (pAttribute != NULL && ippGetGroupTag(pAttribute) != IPP_TAG_PRINTER) {
++						pAttribute = ippNextAttribute(pResponse);
+ 					}
+ 					if (pAttribute == NULL) {
+ 						break;
+ 					}
+ 					
+-					while (pAttribute != NULL && pAttribute->group_tag == IPP_TAG_PRINTER) {
+-						if (strcmp(pAttribute->name, "printer-name") == 0 && pAttribute->value_tag == IPP_TAG_NAME) {
+-							pPrinter = pAttribute->values[0].string.text;
++					while (pAttribute != NULL && ippGetGroupTag(pAttribute) == IPP_TAG_PRINTER) {
++						if (strcmp(ippGetName(pAttribute), "printer-name") == 0 && ippGetValueTag(pAttribute) == IPP_TAG_NAME) {
++							pPrinter = ippGetString(pAttribute, 0, NULL);
+ 						}
+-						if (strcmp(pAttribute->name, "device-uri") == 0 && pAttribute->value_tag == IPP_TAG_URI) {
+-							pDUri = pAttribute->values[0].string.text;
++						if (strcmp(ippGetName(pAttribute), "device-uri") == 0 && ippGetValueTag(pAttribute) == IPP_TAG_URI) {
++							pDUri = ippGetString(pAttribute, 0, NULL);
+ 						}
+-						pAttribute = pAttribute->next;
++						pAttribute = ippNextAttribute(pResponse);
+ 					}
+ 
+ 					if (strcasecmp(pDestName, pPrinter) == 0) {
+@@ -362,7 +362,7 @@
+ 					}
+ 					
+ 					if (pAttribute != NULL)
+-						 pAttribute = pAttribute->next;
++						 pAttribute = ippNextAttribute(pResponse);
+ 				}
+ 			}
+ 			
diff --git a/nixpkgs/pkgs/misc/cups/drivers/cnijfilter_4_00/patches/cnijfilter-4.00-4-ppd.patch b/nixpkgs/pkgs/misc/cups/drivers/cnijfilter_4_00/patches/cnijfilter-4.00-4-ppd.patch
new file mode 100644
index 000000000000..92bef72ba056
--- /dev/null
+++ b/nixpkgs/pkgs/misc/cups/drivers/cnijfilter_4_00/patches/cnijfilter-4.00-4-ppd.patch
@@ -0,0 +1,10 @@
+--- a/backend/src/cnij_backend_common.c	2016-11-13 00:08:34.600824006 +0100
++++ a/backend/src/cnij_backend_common.c	2016-11-13 00:08:52.037823694 +0100
+@@ -37,6 +37,7 @@
+ // CUPS Header
+ #include <cups/cups.h>
+ #include <cups/ipp.h>
++#include <cups/ppd.h>
+ 
+ // Header file for CANON
+ #include "cnij_backend_common.h"
diff --git a/nixpkgs/pkgs/misc/cups/drivers/cnijfilter_4_00/patches/cnijfilter-4.00-5-abi_x86_32.patch b/nixpkgs/pkgs/misc/cups/drivers/cnijfilter_4_00/patches/cnijfilter-4.00-5-abi_x86_32.patch
new file mode 100644
index 000000000000..dc85801a256b
--- /dev/null
+++ b/nixpkgs/pkgs/misc/cups/drivers/cnijfilter_4_00/patches/cnijfilter-4.00-5-abi_x86_32.patch
@@ -0,0 +1,45 @@
+--- a/backendnet/configure.in	2014-08-11 08:38:46.034984462 +0200
++++ a/backendnet/configure.in	2014-08-11 08:35:42.902985813 +0200
+@@ -19,7 +19,11 @@
+ AC_DEFINE_UNQUOTED(BJLIB_PATH, "$enable_libpath")
+ AC_SUBST(BJLIB_PATH)
+ 
+-ARC=`getconf LONG_BIT`
++case "$ABI" in
++    x86) ARC=32;;
++    amd64) ARC=64;;
++    *) ARC=`getconf LONG_BIT`;;
++esac
+ AC_SUBST(ARC)
+ 
+ # Checks for programs.
+--- a/cnijfilter/configure.in	2014-08-11 08:39:44.426984031 +0200
++++ a/cnijfilter/configure.in	2014-08-11 08:35:19.788985984 +0200
+@@ -43,7 +43,11 @@
+ esac
+ AC_SUBST(CNCL_LIB_ID)
+ 
+-ARC=`getconf LONG_BIT`
++case "$ABI" in
++    x86) ARC=32;;
++    amd64) ARC=64;;
++    *) ARC=`getconf LONG_BIT`;;
++esac
+ AC_SUBST(ARC)
+ 
+ AC_PROG_CC
+--- a/cnijnpr/configure.in	2014-08-11 08:41:12.712983380 +0200
++++ a/cnijnpr/configure.in	2014-08-11 08:40:44.354983589 +0200
+@@ -37,7 +37,11 @@
+ 
+ CFLAGS="-O2"
+ 
+-ARC=`getconf LONG_BIT`
++case "$ABI" in
++    x86) ARC=32;;
++    amd64) ARC=64;;
++    *) ARC=`getconf LONG_BIT`;;
++esac
+ AC_SUBST(ARC)
+ 
+ AC_OUTPUT(Makefile
diff --git a/nixpkgs/pkgs/misc/cups/drivers/cnijfilter_4_00/patches/cnijfilter-4.00-6-headers.patch b/nixpkgs/pkgs/misc/cups/drivers/cnijfilter_4_00/patches/cnijfilter-4.00-6-headers.patch
new file mode 100644
index 000000000000..7dba79995114
--- /dev/null
+++ b/nixpkgs/pkgs/misc/cups/drivers/cnijfilter_4_00/patches/cnijfilter-4.00-6-headers.patch
@@ -0,0 +1,11 @@
+--- a/cnijnpr/src/cnijnpr.c	2016-11-13 21:51:33.844977618 +0100
++++ a/cnijnpr/src/cnijnpr.c	2016-11-13 21:52:03.129977094 +0100
+@@ -34,6 +34,8 @@
+ #include <sys/ioctl.h>
+ #include <net/if.h>
+ #include <sys/sysctl.h>
++#include <sys/types.h>
++#include <unistd.h>
+ #include <config.h>
+ #include <fcntl.h>
+ 
diff --git a/nixpkgs/pkgs/misc/cups/drivers/cups-bjnp/default.nix b/nixpkgs/pkgs/misc/cups/drivers/cups-bjnp/default.nix
new file mode 100644
index 000000000000..40243bb91969
--- /dev/null
+++ b/nixpkgs/pkgs/misc/cups/drivers/cups-bjnp/default.nix
@@ -0,0 +1,30 @@
+{lib, stdenv, fetchurl, cups}:
+
+stdenv.mkDerivation rec {
+  name = "cups-bjnp-1.2.2";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/cups-bjnp/${name}.tar.gz";
+    sha256 = "0sb0vm1sf8ismzd9ba33qswxmsirj2z1b7lnyrc9v5ixm7q0bnrm";
+  };
+
+  preConfigure = ''configureFlags="--with-cupsbackenddir=$out/lib/cups/backend"'';
+
+  buildInputs = [cups];
+  NIX_CFLAGS_COMPILE = [
+    "-include stdio.h"
+    "-Wno-error=stringop-truncation"
+    "-Wno-error=deprecated-declarations"
+  ];
+
+  meta = {
+    description = "CUPS back-end for Canon printers";
+    longDescription = ''
+      CUPS back-end for the canon printers using the proprietary USB over IP
+      BJNP protocol. This back-end allows Cups to print over the network to a
+      Canon printer. The design is based on reverse engineering of the protocol.
+    '';
+    homepage = "http://cups-bjnp.sourceforge.net";
+    platforms = lib.platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/misc/cups/drivers/cups-drv-rastertosag-gdi/default.nix b/nixpkgs/pkgs/misc/cups/drivers/cups-drv-rastertosag-gdi/default.nix
new file mode 100644
index 000000000000..d49143655459
--- /dev/null
+++ b/nixpkgs/pkgs/misc/cups/drivers/cups-drv-rastertosag-gdi/default.nix
@@ -0,0 +1,53 @@
+{ lib
+, fetchzip
+, fetchpatch
+, cups
+, python3Packages
+}:
+
+python3Packages.buildPythonApplication rec {
+  pname = "rastertosag-gdi";
+  version = "0.1";
+  src = fetchzip {
+    url = "https://www.openprinting.org/download/printing/${pname}/${pname}-${version}.tar.gz";
+    sha256 = "1ldplpv497j8vhw24sksg3fiw8c5pqr0wajajh7p5xpvb6zlcmvw";
+  };
+  patches = [
+    # port to python 3
+    ( fetchpatch {
+      url = "https://sources.debian.org/data/main/r/${pname}/0.1-7/debian/patches/0001-${pname}-python3.patch";
+      sha256 = "1l3xbrs67025595k9ba5794q3s74anizpbxwsshcfhmbrzd9h8hg";
+    })
+  ];
+  format = "other";
+  nativeBuildInputs = [ (lib.getBin cups) ];
+  # The source image also brings pre-built ppd files,
+  # be we prefer to generate from source where possible, so
+  # the following line generates ppd files from the drv file.
+  postBuild = ''
+    ppdc -v -d . -I "${cups}/share/cups/ppdc" rastertosag-gdi.drv
+  '';
+  installPhase = ''
+    runHook preInstall
+    install -vDm 0644 -t "${placeholder "out"}/share/cups/model/rastertosag-gdi/" *.ppd
+    install -vDm 0755 -t "${placeholder "out"}/bin/" rastertosag-gdi
+    install -vd "${placeholder "out"}/lib/cups/filter/"
+    ln -vst "${placeholder "out"}/lib/cups/filter/" "${placeholder "out"}/bin/rastertosag-gdi"
+    runHook postInstall
+  '';
+  meta = {
+    description = "CUPS driver for Ricoh Aficio SP 1000S and SP 1100S printers";
+    downloadPage = "https://www.openprinting.org/download/printing/rastertosag-gdi/";
+    homepage = "https://www.openprinting.org/driver/rastertosag-gdi/";
+    license = lib.licenses.free;  # just "GPL", according to README
+    maintainers = [ lib.maintainers.yarny ];
+    longDescription = ''
+      This package brings CUPS raster filter
+      for Ricoh Aficio SP 1000S and SP 1100S.
+      In contrast to other Ricoh laser printers,
+      they use the proprietary SAG-GDI raster format by
+      Sagem Communication and do not understand PCL or PostScript.
+      Therefore they do not work with Ricoh's PPD files.
+    '';
+  };
+}
diff --git a/nixpkgs/pkgs/misc/cups/drivers/dymo/default.nix b/nixpkgs/pkgs/misc/cups/drivers/dymo/default.nix
new file mode 100644
index 000000000000..97dcbde2b8b5
--- /dev/null
+++ b/nixpkgs/pkgs/misc/cups/drivers/dymo/default.nix
@@ -0,0 +1,28 @@
+{ stdenv, lib, fetchurl, cups, ... }:
+
+stdenv.mkDerivation rec {
+  pname = "cups-dymo";
+  version = "1.4.0.5";
+
+  # exposed version and 'real' version may differ
+  # in this case the download states '1.4.0' but the real version is '1.4.0.5'
+  # this has the potential to break future builds
+  dl-name = "dymo-cups-drivers-1.4.0";
+
+  src = fetchurl {
+    url = "http://download.dymo.com/dymo/Software/Download%20Drivers/Linux/Download/${dl-name}.tar.gz";
+    sha256 = "0wagsrz3q7yrkzb5ws0m5faq68rqnqfap9p98sgk5jl6x7krf1y6";
+  };
+
+  buildInputs = [ cups ];
+  patches = [ ./fix-includes.patch ];
+
+  makeFlags = [ "cupsfilterdir=$(out)/lib/cups/filter" "cupsmodeldir=$(out)/share/cups/model" ];
+
+  meta = {
+    description = "CUPS Linux drivers and SDK for DYMO printers";
+    homepage = "https://www.dymo.com/";
+    license = lib.licenses.gpl2;
+    maintainers = with lib.maintainers; [ makefu ];
+  };
+}
diff --git a/nixpkgs/pkgs/misc/cups/drivers/dymo/fix-includes.patch b/nixpkgs/pkgs/misc/cups/drivers/dymo/fix-includes.patch
new file mode 100644
index 000000000000..55f71369a001
--- /dev/null
+++ b/nixpkgs/pkgs/misc/cups/drivers/dymo/fix-includes.patch
@@ -0,0 +1,80 @@
+diff -rp dymo-cups-drivers-1.4.0.5/src/common/CupsFilter.h dymo-cups-drivers-1.4.0.5-fix/src/common/CupsFilter.h
+*** dymo-cups-drivers-1.4.0.5/src/common/CupsFilter.h	2012-02-07 14:22:37.000000000 +0100
+--- dymo-cups-drivers-1.4.0.5-fix/src/common/CupsFilter.h	2017-03-27 23:10:17.638976126 +0200
+***************
+*** 22,29 ****
+--- 22,31 ----
+  #define hfc4bbdea_8a1b_427c_9ab5_50b84576b19e
+  
+  #include <cups/cups.h>
++ #include <cups/ppd.h>
+  #include <cups/raster.h>
+  #include <memory>
++ #include <stdio.h>
+  #include <string>
+  #include "CupsPrintEnvironment.h"
+  #include "ErrorDiffusionHalftoning.h"
+diff -rp dymo-cups-drivers-1.4.0.5/src/common/CupsPrintEnvironment.h dymo-cups-drivers-1.4.0.5-fix/src/common/CupsPrintEnvironment.h
+*** dymo-cups-drivers-1.4.0.5/src/common/CupsPrintEnvironment.h	2012-02-07 14:22:37.000000000 +0100
+--- dymo-cups-drivers-1.4.0.5-fix/src/common/CupsPrintEnvironment.h	2017-03-27 23:10:17.638976126 +0200
+***************
+*** 22,27 ****
+--- 22,28 ----
+  #define h952b1c81_8931_433a_8479_7ae6d8e85a86
+  
+  #include "PrinterDriver.h"
++ #include <stdio.h>
+  
+  namespace DymoPrinterDriver
+  {
+diff -rp dymo-cups-drivers-1.4.0.5/src/lm/CupsFilterLabelManager.h dymo-cups-drivers-1.4.0.5-fix/src/lm/CupsFilterLabelManager.h
+*** dymo-cups-drivers-1.4.0.5/src/lm/CupsFilterLabelManager.h	2012-02-07 14:22:38.000000000 +0100
+--- dymo-cups-drivers-1.4.0.5-fix/src/lm/CupsFilterLabelManager.h	2017-03-27 23:10:17.635976126 +0200
+***************
+*** 22,27 ****
+--- 22,28 ----
+  #define he780684b_6efc_428d_bfdb_c5422b1ed982
+  
+  #include <cups/cups.h>
++ #include <cups/ppd.h>
+  #include <cups/raster.h>
+  #include "LabelManagerDriver.h"
+  #include "LabelManagerLanguageMonitor.h"
+*************** public:
+*** 50,53 ****
+  
+  /*
+   * End of "$Id: CupsFilterLabelManager.h 14880 2011-03-31 16:29:05Z aleksandr $".
+!  */
+\ No newline at end of file
+--- 51,54 ----
+  
+  /*
+   * End of "$Id: CupsFilterLabelManager.h 14880 2011-03-31 16:29:05Z aleksandr $".
+!  */
+diff -rp dymo-cups-drivers-1.4.0.5/src/lw/CupsFilterLabelWriter.h dymo-cups-drivers-1.4.0.5-fix/src/lw/CupsFilterLabelWriter.h
+*** dymo-cups-drivers-1.4.0.5/src/lw/CupsFilterLabelWriter.h	2012-02-07 14:22:37.000000000 +0100
+--- dymo-cups-drivers-1.4.0.5-fix/src/lw/CupsFilterLabelWriter.h	2017-03-27 23:10:17.632976126 +0200
+***************
+*** 22,27 ****
+--- 22,28 ----
+  #define hd8574b83_b264_47b2_8d33_a46ae75691d2
+  
+  #include <cups/cups.h>
++ #include <cups/ppd.h>
+  #include <cups/raster.h>
+  #include "LabelWriterDriver.h"
+  #include "LabelWriterLanguageMonitor.h"
+diff -rp dymo-cups-drivers-1.4.0.5/src/common/CupsPrintEnvironment.cpp dymo-cups-drivers-1.4.0.5-fix/src/common/CupsPrintEnvironment.cpp
+*** dymo-cups-drivers-1.4.0.5/src/common/CupsPrintEnvironment.cpp	2019-12-16 19:37:23.429662838 +0000
+--- dymo-cups-drivers-1.4.0.5-fix/src/common/CupsPrintEnvironment.cpp	2019-12-16 19:41:48.506991614 +0000
+***************
+*** 23,28 ****
+--- 23,29 ----
+  #include "CupsPrintEnvironment.h"
+  #include <errno.h>
+  #include <cups/cups.h>
++ #include <cups/sidechannel.h>
+  #include <cassert>
+
+  namespace DymoPrinterDriver
diff --git a/nixpkgs/pkgs/misc/cups/drivers/estudio/default.nix b/nixpkgs/pkgs/misc/cups/drivers/estudio/default.nix
new file mode 100644
index 000000000000..37b39556d932
--- /dev/null
+++ b/nixpkgs/pkgs/misc/cups/drivers/estudio/default.nix
@@ -0,0 +1,54 @@
+{ lib, stdenv, fetchurl, perl }:
+
+stdenv.mkDerivation {
+  pname = "cups-toshiba-estudio";
+  version = "7.89";
+
+  src = fetchurl {
+    url = "http://business.toshiba.com/downloads/KB/f1Ulds/15178/TOSHIBA_ColorMFP_CUPS.tar";
+    sha256 = "0qz4r7q55i0adf4fv3aqnfqgi2pz3jb1jixkqm9x6nk4vanyjf4r";
+  };
+
+  buildInputs = [ perl ];
+
+  phases = [ "unpackPhase"
+             "patchPhase"
+             "installPhase" ];
+
+  patchPhase = ''
+    patchShebangs lib/
+    gunzip                share/cups/model/Toshiba/TOSHIBA_ColorMFP_CUPS.gz
+    sed -i "s+/usr+$out+" share/cups/model/Toshiba/TOSHIBA_ColorMFP_CUPS
+    gzip                  share/cups/model/Toshiba/TOSHIBA_ColorMFP_CUPS
+  '';
+
+  installPhase = ''
+    mkdir -p $out/lib/cups/filter
+    mkdir -p $out/share/cups/model/Toshiba
+    cp {.,$out}/lib/cups/filter/est6550_Authentication
+    chmod 755 $out/lib/cups/filter/est6550_Authentication
+    cp {.,$out}/share/cups/model/Toshiba/TOSHIBA_ColorMFP_CUPS.gz
+    chmod 755 $out/share/cups/model/Toshiba/TOSHIBA_ColorMFP_CUPS.gz
+  '';
+
+  meta = with lib; {
+    description = "Printer only driver for the Toshiba e-STUDIO class of printers";
+    longDescription = ''
+      This driver supports the following printers: TOSHIBA e-STUDIO2000AC,
+      TOSHIBA e-STUDIO2005AC, TOSHIBA e-STUDIO2040C, TOSHIBA e-STUDIO2050C,
+      TOSHIBA e-STUDIO2055C, TOSHIBA e-STUDIO2500AC, TOSHIBA e-STUDIO2505AC,
+      TOSHIBA e-STUDIO2540C, TOSHIBA e-STUDIO2550C, TOSHIBA e-STUDIO2555C,
+      TOSHIBA e-STUDIO287CS, TOSHIBA e-STUDIO3005AC, TOSHIBA e-STUDIO3040C,
+      TOSHIBA e-STUDIO3055C, TOSHIBA e-STUDIO347CS, TOSHIBA e-STUDIO3505AC,
+      TOSHIBA e-STUDIO3540C, TOSHIBA e-STUDIO3555C, TOSHIBA e-STUDIO407CS,
+      TOSHIBA e-STUDIO4505AC, TOSHIBA e-STUDIO4540C, TOSHIBA e-STUDIO4555C,
+      TOSHIBA e-STUDIO5005AC, TOSHIBA e-STUDIO5055C, TOSHIBA e-STUDIO5506AC,
+      TOSHIBA e-STUDIO5540C, TOSHIBA e-STUDIO5560C, TOSHIBA e-STUDIO6506AC,
+      TOSHIBA e-STUDIO6540C, TOSHIBA e-STUDIO6550C, TOSHIBA e-STUDIO6560C,
+      TOSHIBA e-STUDIO6570C and TOSHIBA e-STUDIO7506AC.
+    '';
+    homepage = "http://business.toshiba.com/support/downloads/index.html";
+    license = licenses.unfree;
+    maintainers = [ maintainers.jpotier ];
+  };
+}
diff --git a/nixpkgs/pkgs/misc/cups/drivers/fxlinuxprint/default.nix b/nixpkgs/pkgs/misc/cups/drivers/fxlinuxprint/default.nix
new file mode 100644
index 000000000000..36134780e9bf
--- /dev/null
+++ b/nixpkgs/pkgs/misc/cups/drivers/fxlinuxprint/default.nix
@@ -0,0 +1,51 @@
+{ stdenv, lib, fetchzip, dpkg, autoPatchelfHook, cups }:
+let
+  debPlatform =
+    if stdenv.hostPlatform.system == "x86_64-linux" then "amd64"
+    else if stdenv.hostPlatform.system == "i686-linux" then "i386"
+         else throw "Unsupported system: ${stdenv.hostPlatform.system}";
+in
+stdenv.mkDerivation rec {
+  pname = "fxlinuxprint";
+  version = "1.1.2-1";
+
+  src = fetchzip {
+    url = "https://onlinesupport.fujixerox.com/driver_downloads/fxlinuxpdf112119031.zip";
+    sha256 = "1mv07ch6ysk9bknfmjqsgxb803sj6vfin29s9knaqv17jvgyh0n3";
+    curlOpts = "--user-agent Mozilla/5.0";  # HTTP 410 otherwise
+  };
+
+  nativeBuildInputs = [ dpkg autoPatchelfHook ];
+  buildInputs = [ cups ];
+
+  sourceRoot = ".";
+  unpackCmd = "dpkg-deb -x $curSrc/fxlinuxprint_${version}_${debPlatform}.deb .";
+
+  dontConfigure = true;
+  dontBuild = true;
+
+  installPhase = ''
+    mkdir -p $out
+    mv etc $out
+    mv usr/lib $out
+
+    mkdir -p $out/share/cups/model
+    mv usr/share/ppd/FujiXerox/* $out/share/cups/model
+  '';
+
+  meta = with lib; {
+    description = "Fuji Xerox Linux Printer Driver";
+    longDescription = ''
+      DocuPrint P365/368 d
+      DocuPrint CM315/318 z
+      DocuPrint CP315/318 dw
+      ApeosPort-VI C2271/C3370/C3371/C4471/C5571/C6671/C7771
+      DocuCentre-VI C2271/C3370/C3371/C4471/C5571/C6671/C7771
+      DocuPrint 3205 d/3208 d/3505 d/3508 d/4405 d/4408 d
+    '';
+    homepage = "https://onlinesupport.fujixerox.com";
+    license = licenses.unfree;
+    maintainers = with maintainers; [ delan ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/misc/cups/drivers/hl1110/default.nix b/nixpkgs/pkgs/misc/cups/drivers/hl1110/default.nix
new file mode 100644
index 000000000000..916ac32c2e9b
--- /dev/null
+++ b/nixpkgs/pkgs/misc/cups/drivers/hl1110/default.nix
@@ -0,0 +1,73 @@
+{lib, stdenv, fetchurl, cups, dpkg, gnused, makeWrapper, ghostscript, file, a2ps, coreutils, gawk}:
+
+let
+  version = "3.0.1-1";
+cupsdeb = fetchurl {
+  url = "http://download.brother.com/welcome/dlf100421/hl1110cupswrapper-${version}.i386.deb";
+  sha256 = "a87880f4ece764a724411b5b24d15d1b912f6ffc6ecbfd9fac4cd5eda13d2eb7";
+};
+srcdir = "hl1110cupswrapper-GPL_src-${version}";
+cupssrc = fetchurl {
+  url = "http://download.brother.com/welcome/dlf100422/${srcdir}.tar.gz";
+  sha256 = "be1dce6a4608cb253b0b382db30bf5885da46b010e8eb595b15c435e2487761c";
+};
+lprdeb = fetchurl {
+  url = "http://download.brother.com/welcome/dlf100419/hl1110lpr-${version}.i386.deb";
+  sha256 = "5af241782a0d500d7f47e06ea43d61127f4019b5b1c6e68b4c1cb4521a742c22";
+};
+  in
+stdenv.mkDerivation {
+  name = "cups-brother-hl1110";
+
+  srcs = [ lprdeb cupssrc cupsdeb ];
+  nativeBuildInputs = [ makeWrapper ];
+  buildInputs = [ cups ghostscript dpkg a2ps ];
+  unpackPhase = ''
+    tar -xvf ${cupssrc}
+    '';
+  buildPhase = ''
+    gcc -Wall ${srcdir}/brcupsconfig/brcupsconfig.c -o brcupsconfig4
+    '';
+  installPhase = ''
+    # install lpr
+    dpkg-deb -x ${lprdeb} $out
+
+    substituteInPlace $out/opt/brother/Printers/HL1110/lpd/filter_HL1110 \
+    --replace /opt "$out/opt" \
+
+    sed -i '/GHOST_SCRIPT=/c\GHOST_SCRIPT=gs' $out/opt/brother/Printers/HL1110/lpd/psconvert2
+
+    patchelf --set-interpreter ${stdenv.glibc.out}/lib/ld-linux.so.2 $out/opt/brother/Printers/HL1110/lpd/brprintconflsr3
+    patchelf --set-interpreter ${stdenv.glibc.out}/lib/ld-linux.so.2 $out/opt/brother/Printers/HL1110/lpd/rawtobr3
+    patchelf --set-interpreter ${stdenv.glibc.out}/lib/ld-linux.so.2 $out/opt/brother/Printers/HL1110/inf/braddprinter
+
+    wrapProgram $out/opt/brother/Printers/HL1110/lpd/psconvert2 \
+    --prefix PATH ":" ${ lib.makeBinPath [ gnused coreutils gawk ] }
+
+    wrapProgram $out/opt/brother/Printers/HL1110/lpd/filter_HL1110 \
+    --prefix PATH ":" ${ lib.makeBinPath [ ghostscript a2ps file gnused coreutils ] }
+
+
+    dpkg-deb -x ${cupsdeb} $out
+
+    substituteInPlace $out/opt/brother/Printers/HL1110/cupswrapper/brother_lpdwrapper_HL1110 --replace /opt "$out/opt"
+
+    mkdir -p $out/lib/cups/filter
+    ln -s $out/opt/brother/Printers/HL1110/cupswrapper/brother_lpdwrapper_HL1110 $out/lib/cups/filter/brother_lpdwrapper_HL1110
+    ln -s $out/opt/brother/Printers/HL1110/cupswrapper/brother-HL1110-cups-en.ppd $out/lib/cups/filter/brother-HL1110-cups-en.ppd
+    cp brcupsconfig4 $out/opt/brother/Printers/HL1110/cupswrapper/
+    ln -s $out/opt/brother/Printers/HL1110/cupswrapper/brcupsconfig4 $out/lib/cups/filter/brcupsconfig4
+
+    wrapProgram $out/opt/brother/Printers/HL1110/cupswrapper/brother_lpdwrapper_HL1110 \
+    --prefix PATH ":" ${ lib.makeBinPath [ gnused coreutils gawk ] }
+
+    '';
+
+  meta = {
+    homepage = "http://www.brother.com/";
+    description = "Brother HL1110 printer driver";
+    license = lib.licenses.unfree;
+    platforms = lib.platforms.linux;
+    downloadPage = "http://support.brother.com/g/b/downloadlist.aspx?c=eu_ot&lang=en&prod=hl1110_us_eu_as&os=128#SelectLanguageType-561_0_1";
+  };
+}
diff --git a/nixpkgs/pkgs/misc/cups/drivers/hl1210w/default.nix b/nixpkgs/pkgs/misc/cups/drivers/hl1210w/default.nix
new file mode 100644
index 000000000000..975e07aa6c3f
--- /dev/null
+++ b/nixpkgs/pkgs/misc/cups/drivers/hl1210w/default.nix
@@ -0,0 +1,62 @@
+{lib, stdenv, pkgsi686Linux, fetchurl, cups, dpkg, gnused, makeWrapper, ghostscript, file, a2ps, coreutils, gawk}:
+
+let
+  version = "3.0.1-1";
+  cupsdeb = fetchurl {
+    url = "https://download.brother.com/welcome/dlf101546/hl1210wcupswrapper-${version}.i386.deb";
+    sha256 = "0395mnw6c7qpjgjch9in5q9p2fjdqvz9bwfwp6q1hzhs08ryk7w0";
+  };
+  lprdeb = fetchurl {
+    url = "https://download.brother.com/welcome/dlf101547/hl1210wlpr-${version}.i386.deb";
+    sha256 = "1sl3g2cd4a2gygryrr27ax3qaa65cbirz3kzskd8afkwqpmjyv7j";
+  };
+in
+stdenv.mkDerivation {
+  name = "cups-brother-hl1210W";
+
+  srcs = [ lprdeb cupsdeb ];
+  nativeBuildInputs = [ makeWrapper ];
+  buildInputs = [ cups ghostscript dpkg a2ps ];
+  dontUnpack = true;
+
+  installPhase = ''
+    # install lpr
+    dpkg-deb -x ${lprdeb} $out
+
+    substituteInPlace $out/opt/brother/Printers/HL1210W/lpd/filter_HL1210W \
+      --replace /opt "$out/opt"
+
+    sed -i '/GHOST_SCRIPT=/c\GHOST_SCRIPT=gs' $out/opt/brother/Printers/HL1210W/lpd/psconvert2
+
+    patchelf --set-interpreter ${pkgsi686Linux.glibc.out}/lib/ld-linux.so.2 $out/opt/brother/Printers/HL1210W/lpd/brprintconflsr3
+    patchelf --set-interpreter ${pkgsi686Linux.glibc.out}/lib/ld-linux.so.2 $out/opt/brother/Printers/HL1210W/lpd/rawtobr3
+    patchelf --set-interpreter ${pkgsi686Linux.glibc.out}/lib/ld-linux.so.2 $out/opt/brother/Printers/HL1210W/inf/braddprinter
+
+    wrapProgram $out/opt/brother/Printers/HL1210W/lpd/psconvert2 \
+      --prefix PATH ":" ${ lib.makeBinPath [ gnused coreutils gawk ] }
+    wrapProgram $out/opt/brother/Printers/HL1210W/lpd/filter_HL1210W \
+      --prefix PATH ":" ${ lib.makeBinPath [ ghostscript a2ps file gnused coreutils ] }
+
+    # install cups
+    dpkg-deb -x ${cupsdeb} $out
+
+    substituteInPlace $out/opt/brother/Printers/HL1210W/cupswrapper/brother_lpdwrapper_HL1210W --replace /opt "$out/opt"
+
+    mkdir -p $out/lib/cups/filter
+    ln -s $out/opt/brother/Printers/HL1210W/cupswrapper/brother_lpdwrapper_HL1210W $out/lib/cups/filter/brother_lpdwrapper_HL1210W
+    ln -s $out/opt/brother/Printers/HL1210W/cupswrapper/brother-HL1210W-cups-en.ppd $out/lib/cups/filter/brother-HL1210W-cups-en.ppd
+    # cp brcupsconfig4 $out/opt/brother/Printers/HL1110/cupswrapper/
+    ln -s $out/opt/brother/Printers/HL1210W/cupswrapper/brcupsconfig4 $out/lib/cups/filter/brcupsconfig4
+
+    wrapProgram $out/opt/brother/Printers/HL1210W/cupswrapper/brother_lpdwrapper_HL1210W \
+      --prefix PATH ":" ${ lib.makeBinPath [ gnused coreutils gawk ] }
+    '';
+
+  meta = {
+    homepage = "http://www.brother.com/";
+    description = "Brother HL1210W printer driver";
+    license = lib.licenses.unfree;
+    platforms = lib.platforms.linux;
+    downloadPage = "https://support.brother.com/g/b/downloadlist.aspx?c=nz&lang=en&prod=hl1210w_eu_as&os=128";
+  };
+}
diff --git a/nixpkgs/pkgs/misc/cups/drivers/hl3140cw/default.nix b/nixpkgs/pkgs/misc/cups/drivers/hl3140cw/default.nix
new file mode 100644
index 000000000000..255fae09c7a7
--- /dev/null
+++ b/nixpkgs/pkgs/misc/cups/drivers/hl3140cw/default.nix
@@ -0,0 +1,78 @@
+{lib, stdenv, fetchurl, cups, dpkg, gnused, makeWrapper, ghostscript, file, a2ps, coreutils, gawk}:
+
+let
+  version = "1.1.4-0";
+  cupsdeb = fetchurl {
+    url = "https://download.brother.com/welcome/dlf007070/hl3140cwcupswrapper-${version}.i386.deb";
+    sha256 = "a76281828ca6ee86c63034673577fadcf5f24e8ed003213bdbb6bf47a7aced6f";
+  };
+  srcdir = "hl3140cw_cupswrapper_GPL_source_${version}";
+  cupssrc = fetchurl {
+    url = "https://download.brother.com/welcome/dlf006740/${srcdir}.tar.gz";
+    sha256 = "1wp85rbvbar6rqqkaffymxjpls6jx9m9230dlrpqwy5akiaxf0rl";
+  };
+  lprdeb = fetchurl {
+    url = "https://support.brother.com/g/b/files/dlf/dlf007068/hl3140cwlpr-1.1.2-1.i386.deb";
+    sha256 = "601f392b52ed7080f71b780181823bb8f6abfd0591146b452ba1f23e21f9f865";
+  };
+in
+stdenv.mkDerivation {
+  name = "cups-brother-hl3140cw";
+  nativeBuildInputs = [ makeWrapper dpkg ];
+  buildInputs = [ cups ghostscript a2ps ];
+
+  unpackPhase = ''
+    tar -xvf ${cupssrc}
+  '';
+
+  buildPhase = ''
+    gcc -Wall ${srcdir}/brcupsconfig/brcupsconfig.c -o brcupsconfpt1
+  '';
+
+  installPhase = ''
+    # install lpr
+    dpkg-deb -x ${lprdeb} $out
+
+    substituteInPlace $out/opt/brother/Printers/hl3140cw/lpd/filterhl3140cw \
+      --replace /opt "$out/opt"
+    substituteInPlace $out/opt/brother/Printers/hl3140cw/inf/setupPrintcapij \
+      --replace /opt "$out/opt"
+
+    sed -i '/GHOST_SCRIPT=/c\GHOST_SCRIPT=gs' $out/opt/brother/Printers/hl3140cw/lpd/psconvertij2
+
+    patchelf --set-interpreter ${stdenv.glibc.out}/lib/ld-linux.so.2 $out/opt/brother/Printers/hl3140cw/lpd/brhl3140cwfilter
+    patchelf --set-interpreter ${stdenv.glibc.out}/lib/ld-linux.so.2 $out/usr/bin/brprintconf_hl3140cw
+
+    wrapProgram $out/opt/brother/Printers/hl3140cw/lpd/psconvertij2 \
+      --prefix PATH ":" ${ lib.makeBinPath [ gnused coreutils gawk ] }
+
+    wrapProgram $out/opt/brother/Printers/hl3140cw/lpd/filterhl3140cw \
+      --prefix PATH ":" ${ lib.makeBinPath [ ghostscript a2ps file gnused coreutils ] }
+
+
+    dpkg-deb -x ${cupsdeb} $out
+
+    substituteInPlace $out/opt/brother/Printers/hl3140cw/cupswrapper/cupswrapperhl3140cw \
+      --replace /opt "$out/opt"
+
+    mkdir -p $out/lib/cups/filter
+    ln -s $out/opt/brother/Printers/hl3140cw/cupswrapper/cupswrapperhl3140cw $out/lib/cups/filter/cupswrapperhl3140cw
+
+    ln -s $out/opt/brother/Printers/hl3140cw/cupswrapper/brother_hl3140cw_printer_en.ppd $out/lib/cups/filter/brother_hl3140cw_printer_en.ppd
+
+    cp brcupsconfpt1 $out/opt/brother/Printers/hl3140cw/cupswrapper/
+    ln -s $out/opt/brother/Printers/hl3140cw/cupswrapper/brcupsconfpt1 $out/lib/cups/filter/brcupsconfpt1
+    ln -s $out/opt/brother/Printers/hl3140cw/lpd/filterhl3140cw $out/lib/cups/filter/brother_lpdwrapper_hl3140cw
+
+    wrapProgram $out/opt/brother/Printers/hl3140cw/cupswrapper/cupswrapperhl3140cw \
+      --prefix PATH ":" ${ lib.makeBinPath [ gnused coreutils gawk ] }
+  '';
+
+  meta = {
+    homepage = "http://www.brother.com/";
+    description = "Brother hl3140cw printer driver";
+    license = lib.licenses.unfree;
+    platforms = lib.platforms.linux;
+    downloadPage = "https://support.brother.com/g/b/downloadlist.aspx?c=eu_ot&lang=en&prod=hl3140cw_us_eu&os=128";
+  };
+}
diff --git a/nixpkgs/pkgs/misc/cups/drivers/hll2340dw/default.nix b/nixpkgs/pkgs/misc/cups/drivers/hll2340dw/default.nix
new file mode 100644
index 000000000000..e61d3ace5f15
--- /dev/null
+++ b/nixpkgs/pkgs/misc/cups/drivers/hll2340dw/default.nix
@@ -0,0 +1,70 @@
+{ lib, stdenv, fetchurl, cups, dpkg, gnused, makeWrapper, ghostscript, file
+, a2ps, coreutils, perl, gnugrep, which
+}:
+
+let
+  version = "3.2.0-1";
+  lprdeb = fetchurl {
+    url = "https://download.brother.com/welcome/dlf101912/hll2340dlpr-${version}.i386.deb";
+    sha256 = "c0ae98b49b462cd8fbef445550f2177ce9d8bf627c904e182daa8cbaf8781e50";
+  };
+
+  cupsdeb = fetchurl {
+    url = "https://download.brother.com/welcome/dlf101913/hll2340dcupswrapper-${version}.i386.deb";
+    sha256 = "8aa24a6a825e3a4d5b51778cb46fe63032ec5a731ace22f9ef2b0ffcc2033cc9";
+  };
+
+in
+stdenv.mkDerivation {
+  name = "cups-brother-hll2340dw";
+
+  nativeBuildInputs = [ makeWrapper ];
+  buildInputs = [ cups ghostscript dpkg a2ps ];
+
+  dontUnpack = true;
+
+  installPhase = ''
+    mkdir -p $out
+    dpkg-deb -x ${cupsdeb} $out
+    dpkg-deb -x ${lprdeb} $out
+
+    substituteInPlace $out/opt/brother/Printers/HLL2340D/lpd/filter_HLL2340D \
+      --replace /opt "$out/opt" \
+      --replace /usr/bin/perl ${perl}/bin/perl \
+      --replace "BR_PRT_PATH =~" "BR_PRT_PATH = \"$out/opt/brother/Printers/HLL2340D/\"; #" \
+      --replace "PRINTER =~" "PRINTER = \"HLL2340D\"; #"
+
+    patchelf --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \
+      $out/opt/brother/Printers/HLL2340D/lpd/brprintconflsr3
+    patchelf --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \
+      $out/opt/brother/Printers/HLL2340D/lpd/rawtobr3
+
+    for f in \
+      $out/opt/brother/Printers/HLL2340D/cupswrapper/brother_lpdwrapper_HLL2340D \
+      $out/opt/brother/Printers/HLL2340D/cupswrapper/paperconfigml1 \
+    ; do
+      wrapProgram $f \
+        --prefix PATH : ${lib.makeBinPath [
+          coreutils ghostscript gnugrep gnused
+        ]}
+    done
+
+    mkdir -p $out/lib/cups/filter/
+    ln -s $out/opt/brother/Printers/HLL2340D/lpd/filter_HLL2340D $out/lib/cups/filter/brother_lpdwrapper_HLL2340D
+
+    mkdir -p $out/share/cups/model
+    ln -s $out/opt/brother/Printers/HLL2340D/cupswrapper/brother-HLL2340D-cups-en.ppd $out/share/cups/model/
+
+    wrapProgram $out/opt/brother/Printers/HLL2340D/lpd/filter_HLL2340D \
+      --prefix PATH ":" ${ lib.makeBinPath [ ghostscript a2ps file gnused gnugrep coreutils which ] }
+    '';
+
+  meta = with lib; {
+    homepage = "http://www.brother.com/";
+    description = "Brother hl-l2340dw printer driver";
+    license = licenses.unfree;
+    platforms = platforms.linux;
+    downloadPage = "https://support.brother.com/g/b/downloadlist.aspx?c=us&lang=es&prod=hll2340dw_us_eu_as&os=128&flang=English";
+    maintainers = [ maintainers.qknight ];
+  };
+}
diff --git a/nixpkgs/pkgs/misc/cups/drivers/hll2390dw-cups/default.nix b/nixpkgs/pkgs/misc/cups/drivers/hll2390dw-cups/default.nix
new file mode 100644
index 000000000000..04087c765e68
--- /dev/null
+++ b/nixpkgs/pkgs/misc/cups/drivers/hll2390dw-cups/default.nix
@@ -0,0 +1,71 @@
+{ lib, stdenv, fetchurl, makeWrapper
+, cups
+, dpkg
+, a2ps, ghostscript, gnugrep, gnused, coreutils, file, perl, which
+}:
+
+stdenv.mkDerivation rec {
+  pname = "hll2390dw-cups";
+  version = "4.0.0-1";
+
+  src = fetchurl {
+    # The i386 part is a lie. There are x86, x86_64 and armv7l drivers.
+    # Though this builds only supports x86_64 for now.
+    url = "https://download.brother.com/welcome/dlf103579/hll2390dwpdrv-${version}.i386.deb";
+    sha256 = "0w8rxh1sa5amxr87qmzs4m2p06b1b36wn2q127mg427sbkh1rwni";
+  };
+
+  nativeBuildInputs = [ makeWrapper ];
+  buildInputs = [ cups ghostscript dpkg a2ps ];
+
+  dontUnpack = true;
+
+  installPhase = ''
+    dpkg-deb -x $src $out
+
+    substituteInPlace $out/opt/brother/Printers/HLL2390DW/lpd/lpdfilter \
+      --replace /opt "$out/opt" \
+      --replace /usr/bin/perl ${perl}/bin/perl \
+      --replace "BR_PRT_PATH =~" "BR_PRT_PATH = \"$out\"; #" \
+      --replace "PRINTER =~" "PRINTER = \"HLL2390DW\"; #"
+
+    # FIXME : Allow i686 and armv7l variations to be setup instead.
+    _PLAT=x86_64
+    patchelf --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \
+      $out/opt/brother/Printers/HLL2390DW/lpd/$_PLAT/brprintconflsr3
+    patchelf --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \
+      $out/opt/brother/Printers/HLL2390DW/lpd/$_PLAT/rawtobr3
+    ln -s $out/opt/brother/Printers/HLL2390DW/lpd/$_PLAT/brprintconflsr3 $out/opt/brother/Printers/HLL2390DW/lpd/brprintconflsr3
+    ln -s $out/opt/brother/Printers/HLL2390DW/lpd/$_PLAT/rawtobr3 $out/opt/brother/Printers/HLL2390DW/lpd/rawtobr3
+
+    for f in \
+      $out/opt/brother/Printers/HLL2390DW/cupswrapper/lpdwrapper \
+      $out/opt/brother/Printers/HLL2390DW/cupswrapper/paperconfigml2 \
+    ; do
+      #substituteInPlace $f \
+      wrapProgram $f \
+        --prefix PATH : ${lib.makeBinPath [
+          coreutils ghostscript gnugrep gnused
+        ]}
+    done
+
+    mkdir -p $out/lib/cups/filter/
+    ln -s $out/opt/brother/Printers/HLL2390DW/lpd/lpdfilter $out/lib/cups/filter/brother_lpdwrapper_HLL2390DW
+
+    mkdir -p $out/share/cups/model
+    ln -s $out/opt/brother/Printers/HLL2390DW/cupswrapper/brother-HLL2390DW-cups-en.ppd $out/share/cups/model/
+
+    wrapProgram $out/opt/brother/Printers/HLL2390DW/lpd/lpdfilter \
+      --prefix PATH ":" ${ lib.makeBinPath [ ghostscript a2ps file gnused gnugrep coreutils which ] }
+    '';
+
+  meta = with lib; {
+    homepage = "http://www.brother.com/";
+    description = "Brother HL-L2390DW combined print driver";
+    license = licenses.unfree;
+    platforms = [ "x86_64-linux" ];
+    downloadPage = "http://support.brother.com/g/b/downloadlist.aspx?c=us_ot&lang=en&prod=hll2390dw_us&os=128";
+    maintainers = [ maintainers.samueldr ];
+  };
+}
+
diff --git a/nixpkgs/pkgs/misc/cups/drivers/kyocera/default.nix b/nixpkgs/pkgs/misc/cups/drivers/kyocera/default.nix
new file mode 100644
index 000000000000..cd4c049e67f7
--- /dev/null
+++ b/nixpkgs/pkgs/misc/cups/drivers/kyocera/default.nix
@@ -0,0 +1,50 @@
+{ stdenv, lib, fetchzip, cups }:
+
+let
+  platform =
+    if stdenv.hostPlatform.system == "x86_64-linux" then "64bit"
+    else if stdenv.hostPlatform.system == "i686-linux" then "32bit"
+         else throw "Unsupported system: ${stdenv.hostPlatform.system}";
+
+  libPath = lib.makeLibraryPath [ cups ];
+in
+
+stdenv.mkDerivation {
+  pname = "cups-kyocera";
+  version = "1.1203";
+
+  dontPatchELF = true;
+  dontStrip = true;
+
+  src = fetchzip {
+    # this site does not like curl -> override useragent
+    curlOpts = "-A ''";
+    url = "https://cdn.kyostatics.net/dlc/ru/driver/all/linuxdrv_1_1203_fs-1x2xmfp.-downloadcenteritem-Single-File.downloadcenteritem.tmp/LinuxDrv_1.1203_FS-1x2xMFP.zip";
+    sha256 = "0z1pbgidkibv4j21z0ys8cq1lafc6687syqa07qij2qd8zp15wiz";
+  };
+
+  installPhase = ''
+    tar -xvf ${platform}/Global/English.tar.gz
+    install -Dm755 English/rastertokpsl $out/lib/cups/filter/rastertokpsl
+    patchelf \
+      --set-rpath ${libPath} \
+      --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \
+      $out/lib/cups/filter/rastertokpsl
+
+    mkdir -p $out/share/cups/model/Kyocera
+    cd English
+    for i in *.ppd; do
+      sed -i $i -e \
+        "s,/usr/lib/cups/filter/rastertokpsl,$out/lib/cups/filter/rastertokpsl,g"
+      cp $i $out/share/cups/model/Kyocera
+    done;
+  '';
+
+  meta = with lib; {
+    description = "CUPS drivers for several Kyocera FS-{1020,1025,1040,1060,1120,1125} printers";
+    homepage = "https://www.kyoceradocumentsolutions.ru/index/service_support/download_center.false.driver.FS1040._.EN.html#";
+    license = licenses.unfree;
+    maintainers = [ maintainers.vanzef ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/misc/cups/drivers/kyodialog3/default.nix b/nixpkgs/pkgs/misc/cups/drivers/kyodialog3/default.nix
new file mode 100644
index 000000000000..7e0a0dea67d1
--- /dev/null
+++ b/nixpkgs/pkgs/misc/cups/drivers/kyodialog3/default.nix
@@ -0,0 +1,61 @@
+{ stdenv, lib, fetchzip, cups, autoPatchelfHook
+
+  # Can either be "EU" or "Global"; it's unclear what the difference is
+  , region ? "Global", qt4
+}:
+
+let
+  platform =
+    if stdenv.hostPlatform.system == "x86_64-linux" then "64bit"
+    else if stdenv.hostPlatform.system == "i686-linux" then "32bit"
+         else throw "Unsupported system: ${stdenv.hostPlatform.system}";
+  debPlatform =
+    if platform == "64bit" then "amd64"
+    else "i386";
+  debRegion = if region == "EU" then "EU." else "";
+in
+stdenv.mkDerivation rec {
+  pname = "cups-kyodialog3";
+  version = "8.1601";
+
+  dontStrip = true;
+
+  src = fetchzip {
+    url = "https://la.kyoceradocumentsolutions.com/content/dam/kdc/kdag/downloads/technical/executables/drivers/kyoceradocumentsolutions/lad/en/Kyocera_Linux_PPD_Ver_${version}.tar.gz";
+    sha256 = "11znnlkfssakml7w80gxlz1k59f3nvhph91fkzzadnm9i7a8yjal";
+  };
+
+  nativeBuildInputs = [ autoPatchelfHook ];
+
+  buildInputs = [ cups qt4 ];
+
+  installPhase = ''
+    mkdir -p $out
+    cd $out
+
+    # unpack the debian archive
+    ar p ${src}/KyoceraLinuxPackages/${region}/${platform}/kyodialog3.en${debRegion}_0.5-0_${debPlatform}.deb data.tar.gz | tar -xz
+    rm -Rf KyoceraLinuxPackages
+
+    # strip $out/usr
+    mv usr/* .
+    rmdir usr
+
+    # allow cups to find the ppd files
+    mkdir -p share/cups/model
+    mv share/ppd/kyocera share/cups/model/Kyocera
+    rmdir share/ppd
+
+    # prepend $out to all references in ppd and desktop files
+    find -name "*.ppd" -exec sed -E -i "s:/usr/lib:$out/lib:g" {} \;
+    find -name "*.desktop" -exec sed -E -i "s:/usr/lib:$out/lib:g" {} \;
+  '';
+
+  meta = with lib; {
+    description = "CUPS drivers for several Kyocera printers";
+    homepage = "https://www.kyoceradocumentsolutions.com";
+    license = licenses.unfree;
+    maintainers = [ maintainers.steveej ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/misc/cups/drivers/mfcj470dwcupswrapper/default.nix b/nixpkgs/pkgs/misc/cups/drivers/mfcj470dwcupswrapper/default.nix
new file mode 100644
index 000000000000..2ff073591d05
--- /dev/null
+++ b/nixpkgs/pkgs/misc/cups/drivers/mfcj470dwcupswrapper/default.nix
@@ -0,0 +1,56 @@
+{ lib, stdenv, fetchurl, mfcj470dwlpr, makeWrapper}:
+
+stdenv.mkDerivation rec {
+  pname = "mfcj470dw-cupswrapper";
+  version = "3.0.0-1";
+
+  src = fetchurl {
+    url = "https://download.brother.com/welcome/dlf006866/mfcj470dw_cupswrapper_GPL_source_${version}.tar.gz";
+    sha256 = "b88f9b592723a00c024129560367f40a560ca3cba06fd99512ab368dd6855853";
+  };
+
+  nativeBuildInputs = [ makeWrapper ];
+  buildInputs = [ mfcj470dwlpr ];
+
+  patchPhase = ''
+    WRAPPER=cupswrapper/cupswrappermfcj470dw
+
+    substituteInPlace $WRAPPER \
+    --replace /opt "${mfcj470dwlpr}/opt" \
+    --replace /usr "${mfcj470dwlpr}/usr" \
+    --replace /etc "$out/etc"
+
+    substituteInPlace $WRAPPER \
+    --replace "\`cp " "\`cp -p " \
+    --replace "\`mv " "\`cp -p "
+    '';
+
+  buildPhase = ''
+    cd brcupsconfpt1
+    make all
+    cd ..
+    '';
+
+  installPhase = ''
+    TARGETFOLDER=$out/opt/brother/Printers/mfcj470dw/cupswrapper/
+    mkdir -p $out/opt/brother/Printers/mfcj470dw/cupswrapper/
+
+    cp brcupsconfpt1/brcupsconfpt1 $TARGETFOLDER
+    cp cupswrapper/cupswrappermfcj470dw $TARGETFOLDER/
+    cp PPD/brother_mfcj470dw_printer_en.ppd $TARGETFOLDER/
+    '';
+
+  cleanPhase = ''
+    cd brcupsconfpt1
+    make clean
+    '';
+
+  meta = {
+    homepage = "http://www.brother.com/";
+    description = "Brother MFC-J470DW CUPS wrapper driver";
+    license = lib.licenses.gpl2;
+    platforms = lib.platforms.linux;
+    downloadPage = "http://support.brother.com/g/b/downloadlist.aspx?c=us&lang=en&prod=mfcj470dw_us_eu_as&os=128";
+    maintainers = [ lib.maintainers.yochai ];
+  };
+}
diff --git a/nixpkgs/pkgs/misc/cups/drivers/mfcj470dwlpr/default.nix b/nixpkgs/pkgs/misc/cups/drivers/mfcj470dwlpr/default.nix
new file mode 100644
index 000000000000..b2dbd0ca77ab
--- /dev/null
+++ b/nixpkgs/pkgs/misc/cups/drivers/mfcj470dwlpr/default.nix
@@ -0,0 +1,45 @@
+{ lib, stdenv, fetchurl, cups, dpkg, ghostscript, a2ps, coreutils, gnused, gawk, file, makeWrapper }:
+
+stdenv.mkDerivation rec {
+  pname = "mfcj470dw-cupswrapper";
+  version = "3.0.0-1";
+
+  src = fetchurl {
+    url = "https://download.brother.com/welcome/dlf006843/mfcj470dwlpr-${version}.i386.deb";
+    sha256 = "7202dd895d38d50bb767080f2995ed350eed99bc2b7871452c3c915c8eefc30a";
+  };
+
+  nativeBuildInputs = [ makeWrapper ];
+  buildInputs = [ cups ghostscript dpkg a2ps ];
+
+  dontUnpack = true;
+
+  installPhase = ''
+    dpkg-deb -x $src $out
+
+    substituteInPlace $out/opt/brother/Printers/mfcj470dw/lpd/filtermfcj470dw \
+    --replace /opt "$out/opt" \
+
+    sed -i '/GHOST_SCRIPT=/c\GHOST_SCRIPT=gs' $out/opt/brother/Printers/mfcj470dw/lpd/psconvertij2
+
+    patchelf --set-interpreter ${stdenv.glibc.out}/lib/ld-linux.so.2 $out/opt/brother/Printers/mfcj470dw/lpd/brmfcj470dwfilter
+
+    mkdir -p $out/lib/cups/filter/
+    ln -s $out/opt/brother/Printers/mfcj470dw/lpd/filtermfcj470dw $out/lib/cups/filter/brother_lpdwrapper_mfcj470dw
+
+    wrapProgram $out/opt/brother/Printers/mfcj470dw/lpd/psconvertij2 \
+    --prefix PATH ":" ${ lib.makeBinPath [ gnused coreutils gawk ] }
+
+    wrapProgram $out/opt/brother/Printers/mfcj470dw/lpd/filtermfcj470dw \
+    --prefix PATH ":" ${ lib.makeBinPath [ ghostscript a2ps file gnused coreutils ] }
+    '';
+
+  meta = {
+    homepage = "http://www.brother.com/";
+    description = "Brother MFC-J470DW LPR driver";
+    license = lib.licenses.unfree;
+    platforms = lib.platforms.linux;
+    downloadPage = "http://support.brother.com/g/b/downloadlist.aspx?c=us&lang=en&prod=mfcj470dw_us_eu_as&os=128";
+    maintainers = [ lib.maintainers.yochai ];
+  };
+}
diff --git a/nixpkgs/pkgs/misc/cups/drivers/mfcj6510dwcupswrapper/default.nix b/nixpkgs/pkgs/misc/cups/drivers/mfcj6510dwcupswrapper/default.nix
new file mode 100644
index 000000000000..1653ced85c5a
--- /dev/null
+++ b/nixpkgs/pkgs/misc/cups/drivers/mfcj6510dwcupswrapper/default.nix
@@ -0,0 +1,65 @@
+{ lib, stdenv, fetchurl, mfcj6510dwlpr, makeWrapper}:
+
+stdenv.mkDerivation rec {
+  pname = "mfcj6510dw-cupswrapper";
+  version = "3.0.0-1";
+
+  src = fetchurl {
+    url = "https://download.brother.com/welcome/dlf006814/mfcj6510dw_cupswrapper_GPL_source_${version}.tar.gz";
+    sha256 = "0y5iffybxjin8injrdmc9n9hl4s6b8n6ck76m1z78bzi88vwmhai";
+  };
+
+  nativeBuildInputs = [ makeWrapper ];
+  buildInputs = [ mfcj6510dwlpr ];
+
+  buildPhase = ''
+    cd brcupsconfig
+    make all
+    cd ..
+    '';
+
+  installPhase = ''
+    TARGETFOLDER=$out/opt/brother/Printers/mfcj6510dw/cupswrapper
+    mkdir -p $TARGETFOLDER
+    cp PPD/brother_mfcj6510dw_printer_en.ppd $TARGETFOLDER
+    cp brcupsconfig/brcupsconfpt1 $TARGETFOLDER
+    cp scripts/cupswrappermfcj6510dw $TARGETFOLDER
+    sed -i -e '26,304d' $TARGETFOLDER/cupswrappermfcj6510dw
+    substituteInPlace $TARGETFOLDER/cupswrappermfcj6510dw \
+      --replace "\$ppd_file_name" "$TARGETFOLDER/brother_mfcj6510dw_printer_en.ppd"
+
+    CPUSFILTERFOLDER=$out/lib/cups/filter
+    mkdir -p $TARGETFOLDER $CPUSFILTERFOLDER
+    ln -s ${mfcj6510dwlpr}/lib/cups/filter/brother_lpdwrapper_mfcj6510dw $out/lib/cups/filter/brother_lpdwrapper_mfcj6510dw
+    ##TODO: Use the cups filter instead of the LPR one.
+    #cp scripts/cupswrappermfcj6510dw $CPUSFILTERFOLDER/brother_lpdwrapper_mfcj6510dw
+    #sed -i -e '110,258!d' $CPUSFILTERFOLDER/brother_lpdwrapper_mfcj6510dw
+    #sed -i -e '33,40d' $CPUSFILTERFOLDER/brother_lpdwrapper_mfcj6510dw
+    #sed -i -e '34,35d' $CPUSFILTERFOLDER/brother_lpdwrapper_mfcj6510dw
+    #substituteInPlace $CPUSFILTERFOLDER/brother_lpdwrapper_mfcj6510dw \
+    #  --replace "/opt/brother/$``{device_model``}/$``{printer_model``}/lpd/filter$``{printer_model``}" \
+    #    "${mfcj6510dwlpr}/opt/brother/Printers/mfcj6510dw/lpd/filtermfcj6510dw" \
+    #  --replace "/opt/brother/Printers/$``{printer_model``}/inf/br$``{printer_model``}rc" \
+    #    "${mfcj6510dwlpr}/opt/brother/Printers/mfcj6510dw/inf/brmfcj6510dwrc" \
+    #  --replace "/opt/brother/$``{device_model``}/$``{printer_model``}/cupswrapper/brcupsconfpt1" \
+    #    "$out/opt/brother/Printers/mfcj6510dw/cupswrapper/brcupsconfpt1" \
+    #  --replace "/usr/share/cups/model/Brother/brother_" "$out/opt/brother/Printers/mfcj6510dw/cupswrapper/brother_"
+    #substituteInPlace $CPUSFILTERFOLDER/brother_lpdwrapper_mfcj6510dw \
+    #  --replace "$``{printer_model``}" "mfcj6510dw" \
+    #  --replace "$``{printer_name``}" "MFCJ6510DW"
+    '';
+
+  cleanPhase = ''
+    cd brcupsconfpt1
+    make clean
+    '';
+
+  meta = with lib; {
+    homepage = "http://www.brother.com/";
+    description = "Brother MFC-J6510DW CUPS wrapper driver";
+    license = with licenses; gpl2;
+    platforms = with platforms; linux;
+    downloadPage = "http://support.brother.com/g/b/downloadlist.aspx?c=us&lang=en&prod=mfcj6510dw_all&os=128";
+    maintainers = with maintainers; [ ramkromberg ];
+  };
+}
diff --git a/nixpkgs/pkgs/misc/cups/drivers/mfcj6510dwlpr/default.nix b/nixpkgs/pkgs/misc/cups/drivers/mfcj6510dwlpr/default.nix
new file mode 100644
index 000000000000..741abc74f26a
--- /dev/null
+++ b/nixpkgs/pkgs/misc/cups/drivers/mfcj6510dwlpr/default.nix
@@ -0,0 +1,89 @@
+{ lib, stdenv, fetchurl, pkgsi686Linux, dpkg, makeWrapper, coreutils, gnused, gawk, file, cups, util-linux, xxd, runtimeShell
+, ghostscript, a2ps }:
+
+# Why:
+# The executable "brprintconf_mfcj6510dw" binary is looking for "/opt/brother/Printers/%s/inf/br%sfunc" and "/opt/brother/Printers/%s/inf/br%src".
+# Whereby, %s is printf(3) string substitution for stdin's arg0 (the command's own filename) from the 10th char forwards, as a runtime dependency.
+# e.g. Say the filename is "0123456789ABCDE", the runtime will be looking for /opt/brother/Printers/ABCDE/inf/brABCDEfunc.
+# Presumably, the binary was designed to be deployed under the filename "printconf_mfcj6510dw", whereby it will search for "/opt/brother/Printers/mfcj6510dw/inf/brmfcj6510dwfunc".
+# For NixOS, we want to change the string to the store path of brmfcj6510dwfunc and brmfcj6510dwrc but we're faced with two complications:
+# 1. Too little room to specify the nix store path. We can't even take advantage of %s by renaming the file to the store path hash since the variable is too short and can't contain the whole hash.
+# 2. The binary needs the directory it's running from to be r/w.
+# What:
+# As such, we strip the path and substitution altogether, leaving only "brmfcj6510dwfunc" and "brmfcj6510dwrc", while filling the leftovers with nulls.
+# Fully null terminating the cstrings is necessary to keep the array the same size and preventing overflows.
+# We then use a shell script to link and execute the binary, func and rc files in a temporary directory.
+# How:
+# In the package, we dump the raw binary as a string of search-able hex values using hexdump. We execute the substitution with sed. We then convert the hex values back to binary form using xxd.
+# We also write a shell script that invoked "mktemp -d" to produce a r/w temporary directory and link what we need in the temporary directory.
+# Result:
+# The user can run brprintconf_mfcj6510dw in the shell.
+
+stdenv.mkDerivation rec {
+  pname = "mfcj6510dwlpr";
+  version = "3.0.0-1";
+
+  src = fetchurl {
+    url = "https://download.brother.com/welcome/dlf006614/mfcj6510dwlpr-${version}.i386.deb";
+    sha256 = "1ccvx393pqavsgzd8igrzlin5jrsf01d3acyvwqd1d0yz5jgqy6d";
+  };
+
+  nativeBuildInputs = [ makeWrapper ];
+  buildInputs = [ cups ghostscript dpkg a2ps ];
+
+  dontUnpack = true;
+
+  brprintconf_mfcj6510dw_script = ''
+    #!${runtimeShell}
+    cd $(mktemp -d)
+    ln -s @out@/usr/bin/brprintconf_mfcj6510dw_patched brprintconf_mfcj6510dw_patched
+    ln -s @out@/opt/brother/Printers/mfcj6510dw/inf/brmfcj6510dwfunc brmfcj6510dwfunc
+    ln -s @out@/opt/brother/Printers/mfcj6510dw/inf/brmfcj6510dwrc brmfcj6510dwrc
+    ./brprintconf_mfcj6510dw_patched "$@"
+  '';
+
+  installPhase = ''
+    dpkg-deb -x $src $out
+    substituteInPlace $out/opt/brother/Printers/mfcj6510dw/lpd/filtermfcj6510dw \
+      --replace /opt "$out/opt"
+    substituteInPlace $out/opt/brother/Printers/mfcj6510dw/lpd/psconvertij2 \
+      --replace "GHOST_SCRIPT=`which gs`" "GHOST_SCRIPT=${ghostscript}/bin/gs"
+    substituteInPlace $out/opt/brother/Printers/mfcj6510dw/inf/setupPrintcapij \
+      --replace "/opt/brother/Printers" "$out/opt/brother/Printers" \
+      --replace "printcap.local" "printcap"
+
+    patchelf --set-interpreter ${pkgsi686Linux.stdenv.cc.libc.out}/lib/ld-linux.so.2 \
+      --set-rpath $out/opt/brother/Printers/mfcj6510dw/inf:$out/opt/brother/Printers/mfcj6510dw/lpd \
+      $out/opt/brother/Printers/mfcj6510dw/lpd/brmfcj6510dwfilter
+    patchelf --set-interpreter ${pkgsi686Linux.stdenv.cc.libc.out}/lib/ld-linux.so.2 $out/usr/bin/brprintconf_mfcj6510dw
+
+    #stripping the hardcoded path.
+    ${util-linux}/bin/hexdump -ve '1/1 "%.2X"' $out/usr/bin/brprintconf_mfcj6510dw | \
+    sed 's.2F6F70742F62726F746865722F5072696E746572732F25732F696E662F6272257366756E63.62726d66636a36353130647766756e63000000000000000000000000000000000000000000.' | \
+    sed 's.2F6F70742F62726F746865722F5072696E746572732F25732F696E662F627225737263.62726D66636A3635313064777263000000000000000000000000000000000000000000.' | \
+    ${xxd}/bin/xxd -r -p > $out/usr/bin/brprintconf_mfcj6510dw_patched
+    chmod +x $out/usr/bin/brprintconf_mfcj6510dw_patched
+    #executing from current dir. segfaults if it's not r\w.
+    mkdir -p $out/bin
+    echo -n "$brprintconf_mfcj6510dw_script" > $out/bin/brprintconf_mfcj6510dw
+    chmod +x $out/bin/brprintconf_mfcj6510dw
+    substituteInPlace $out/bin/brprintconf_mfcj6510dw --replace @out@ $out
+
+    mkdir -p $out/lib/cups/filter/
+    ln -s $out/opt/brother/Printers/mfcj6510dw/lpd/filtermfcj6510dw $out/lib/cups/filter/brother_lpdwrapper_mfcj6510dw
+
+    wrapProgram $out/opt/brother/Printers/mfcj6510dw/lpd/psconvertij2 \
+      --prefix PATH ":" ${ lib.makeBinPath [ coreutils gnused gawk ] }
+    wrapProgram $out/opt/brother/Printers/mfcj6510dw/lpd/filtermfcj6510dw \
+      --prefix PATH ":" ${ lib.makeBinPath [ coreutils gnused file ghostscript a2ps ] }
+    '';
+
+  meta = with lib; {
+    description  = "Brother MFC-J6510DW LPR driver";
+    downloadPage = "http://support.brother.com/g/b/downloadlist.aspx?c=us&lang=en&prod=mfcj6510dw_all&os=128";
+    homepage     = "http://www.brother.com/";
+    license      = with licenses; unfree;
+    maintainers  = with maintainers; [ ramkromberg ];
+    platforms    = with platforms; linux;
+  };
+}
diff --git a/nixpkgs/pkgs/misc/cups/drivers/mfcl2700dncupswrapper/default.nix b/nixpkgs/pkgs/misc/cups/drivers/mfcl2700dncupswrapper/default.nix
new file mode 100644
index 000000000000..6eebfe64d5a7
--- /dev/null
+++ b/nixpkgs/pkgs/misc/cups/drivers/mfcl2700dncupswrapper/default.nix
@@ -0,0 +1,44 @@
+{ coreutils, dpkg, fetchurl, gnugrep, gnused, makeWrapper, mfcl2700dnlpr, perl, lib, stdenv }:
+
+stdenv.mkDerivation rec {
+  name = "mfcl2700dncupswrapper-${meta.version}";
+
+  src = fetchurl {
+    url = "https://download.brother.com/welcome/dlf102086/${name}.i386.deb";
+    sha256 = "07w48mah0xbv4h8vsh1qd5cd4b463bx8y6gc5x9pfgsxsy6h6da1";
+  };
+
+  nativeBuildInputs = [ dpkg makeWrapper ];
+
+  phases = [ "installPhase" ];
+
+  installPhase = ''
+    dpkg-deb -x $src $out
+
+    basedir=${mfcl2700dnlpr}/opt/brother/Printers/MFCL2700DN
+    dir=$out/opt/brother/Printers/MFCL2700DN
+
+    substituteInPlace $dir/cupswrapper/brother_lpdwrapper_MFCL2700DN \
+      --replace /usr/bin/perl ${perl}/bin/perl \
+      --replace "basedir =~" "basedir = \"$basedir\"; #" \
+      --replace "PRINTER =~" "PRINTER = \"MFCL2700DN\"; #"
+
+    wrapProgram $dir/cupswrapper/brother_lpdwrapper_MFCL2700DN \
+      --prefix PATH : ${lib.makeBinPath [ coreutils gnugrep gnused ]}
+
+    mkdir -p $out/lib/cups/filter
+    mkdir -p $out/share/cups/model
+
+    ln $dir/cupswrapper/brother_lpdwrapper_MFCL2700DN $out/lib/cups/filter
+    ln $dir/cupswrapper/brother-MFCL2700DN-cups-en.ppd $out/share/cups/model
+  '';
+
+  meta = {
+    description = "Brother MFC-L2700DN CUPS wrapper driver";
+    homepage = "http://www.brother.com/";
+    license = lib.licenses.gpl2Plus;
+    maintainers = [ lib.maintainers.tv ];
+    platforms = lib.platforms.linux;
+    version = "3.2.0-1";
+  };
+}
diff --git a/nixpkgs/pkgs/misc/cups/drivers/mfcl2700dnlpr/default.nix b/nixpkgs/pkgs/misc/cups/drivers/mfcl2700dnlpr/default.nix
new file mode 100644
index 000000000000..0d11579e9541
--- /dev/null
+++ b/nixpkgs/pkgs/misc/cups/drivers/mfcl2700dnlpr/default.nix
@@ -0,0 +1,44 @@
+{ lib, stdenv, coreutils, dpkg, fetchurl, ghostscript, gnugrep, gnused, makeWrapper, perl, which }:
+
+stdenv.mkDerivation rec {
+  pname = "mfcl2700dnlpr";
+  version = "3.2.0-1";
+
+  src = fetchurl {
+    url = "https://download.brother.com/welcome/dlf102085/${pname}-${version}.i386.deb";
+    sha256 = "170qdzxlqikzvv2wphvfb37m19mn13az4aj88md87ka3rl5knk4m";
+  };
+
+  nativeBuildInputs = [ dpkg makeWrapper ];
+
+  phases = [ "installPhase" ];
+
+  installPhase = ''
+    dpkg-deb -x $src $out
+
+    dir=$out/opt/brother/Printers/MFCL2700DN
+
+    substituteInPlace $dir/lpd/filter_MFCL2700DN \
+      --replace /usr/bin/perl ${perl}/bin/perl \
+      --replace "BR_PRT_PATH =~" "BR_PRT_PATH = \"$dir\"; #" \
+      --replace "PRINTER =~" "PRINTER = \"MFCL2700DN\"; #"
+
+    wrapProgram $dir/lpd/filter_MFCL2700DN \
+      --prefix PATH : ${lib.makeBinPath [
+        coreutils ghostscript gnugrep gnused which
+      ]}
+
+    interpreter=$(cat $NIX_CC/nix-support/dynamic-linker)
+    patchelf --set-interpreter "$interpreter" $dir/inf/braddprinter
+    patchelf --set-interpreter "$interpreter" $dir/lpd/brprintconflsr3
+    patchelf --set-interpreter "$interpreter" $dir/lpd/rawtobr3
+  '';
+
+  meta = {
+    description = "Brother MFC-L2700DN LPR driver";
+    homepage = "http://www.brother.com/";
+    license = lib.licenses.unfree;
+    maintainers = [ lib.maintainers.tv ];
+    platforms = [ "i686-linux" ];
+  };
+}
diff --git a/nixpkgs/pkgs/misc/cups/drivers/mfcl2720dwcupswrapper/default.nix b/nixpkgs/pkgs/misc/cups/drivers/mfcl2720dwcupswrapper/default.nix
new file mode 100644
index 000000000000..5d4980da9d17
--- /dev/null
+++ b/nixpkgs/pkgs/misc/cups/drivers/mfcl2720dwcupswrapper/default.nix
@@ -0,0 +1,47 @@
+{ lib, stdenv, fetchurl, dpkg, makeWrapper, coreutils, gnugrep, gnused, perl, mfcl2720dwlpr }:
+
+stdenv.mkDerivation rec {
+  pname = "mfcl2720dwcupswrapper";
+  version = "3.2.0-1";
+
+  src = fetchurl {
+    url = "https://download.brother.com/welcome/dlf101802/${pname}-${version}.i386.deb";
+    sha256 = "6d131926ce22c51b1854d2b91e426cc7ecbf5d6dabd698ef51a417090e35c598";
+  };
+
+  nativeBuildInputs = [ dpkg makeWrapper ];
+
+  phases = [ "installPhase" ];
+
+  installPhase = ''
+    dpkg-deb -x $src $out
+
+    basedir=${mfcl2720dwlpr}/opt/brother/Printers/MFCL2720DW
+    dir=$out/opt/brother/Printers/MFCL2720DW
+
+    substituteInPlace $dir/cupswrapper/brother_lpdwrapper_MFCL2720DW \
+      --replace /usr/bin/perl ${perl}/bin/perl \
+      --replace "basedir =~" "basedir = \"$basedir\"; #" \
+      --replace "PRINTER =~" "PRINTER = \"MFCL2720DW\"; #"
+
+    substituteInPlace $dir/cupswrapper/paperconfigml1 \
+      --replace /usr/bin/perl ${perl}/bin/perl
+
+    wrapProgram $dir/cupswrapper/brother_lpdwrapper_MFCL2720DW \
+      --prefix PATH : ${lib.makeBinPath [ coreutils gnugrep gnused ]}
+
+    mkdir -p $out/lib/cups/filter
+    mkdir -p $out/share/cups/model
+
+    ln $dir/cupswrapper/brother_lpdwrapper_MFCL2720DW $out/lib/cups/filter
+    ln $dir/cupswrapper/brother-MFCL2720DW-cups-en.ppd $out/share/cups/model
+  '';
+
+  meta = {
+    description = "Brother MFC-L2720DW CUPS wrapper driver";
+    homepage = "http://www.brother.com/";
+    license = lib.licenses.gpl2;
+    platforms = [ "x86_64-linux" "i686-linux" ];
+    maintainers = [ lib.maintainers.xeji ];
+  };
+}
diff --git a/nixpkgs/pkgs/misc/cups/drivers/mfcl2720dwlpr/default.nix b/nixpkgs/pkgs/misc/cups/drivers/mfcl2720dwlpr/default.nix
new file mode 100644
index 000000000000..2b6c458e7454
--- /dev/null
+++ b/nixpkgs/pkgs/misc/cups/drivers/mfcl2720dwlpr/default.nix
@@ -0,0 +1,45 @@
+{ pkgs, lib, stdenv, fetchurl, dpkg, makeWrapper, coreutils, ghostscript, gnugrep, gnused, which, perl }:
+
+stdenv.mkDerivation rec {
+  pname = "mfcl2720dwlpr";
+  version = "3.2.0-1";
+
+  src = fetchurl {
+    url = "https://download.brother.com/welcome/dlf101801/${pname}-${version}.i386.deb";
+    sha256 = "088217e9ad118ec1e7f3d3f8f60f3bd839fe2c7d7c1136b249e9ac648dc742af";
+  };
+
+  nativeBuildInputs = [ dpkg makeWrapper ];
+
+  phases = [ "installPhase" ];
+
+  installPhase = ''
+    dpkg-deb -x $src $out
+
+    dir=$out/opt/brother/Printers/MFCL2720DW
+
+    substituteInPlace $dir/lpd/filter_MFCL2720DW \
+      --replace /usr/bin/perl ${perl}/bin/perl \
+      --replace "BR_PRT_PATH =~" "BR_PRT_PATH = \"$dir\"; #" \
+      --replace "PRINTER =~" "PRINTER = \"MFCL2720DW\"; #"
+
+    wrapProgram $dir/lpd/filter_MFCL2720DW \
+      --prefix PATH : ${lib.makeBinPath [
+        coreutils ghostscript gnugrep gnused which
+      ]}
+
+    # need to use i686 glibc here, these are 32bit proprietary binaries
+    interpreter=${pkgs.pkgsi686Linux.glibc}/lib/ld-linux.so.2
+    patchelf --set-interpreter "$interpreter" $dir/inf/braddprinter
+    patchelf --set-interpreter "$interpreter" $dir/lpd/brprintconflsr3
+    patchelf --set-interpreter "$interpreter" $dir/lpd/rawtobr3
+  '';
+
+  meta = {
+    description = "Brother MFC-L2720DW lpr driver";
+    homepage = "http://www.brother.com/";
+    license = lib.licenses.unfree;
+    platforms = [ "x86_64-linux" "i686-linux" ];
+    maintainers = [ lib.maintainers.xeji ];
+  };
+}
diff --git a/nixpkgs/pkgs/misc/cups/drivers/mfcl2740dwcupswrapper/default.nix b/nixpkgs/pkgs/misc/cups/drivers/mfcl2740dwcupswrapper/default.nix
new file mode 100644
index 000000000000..a119c31517ce
--- /dev/null
+++ b/nixpkgs/pkgs/misc/cups/drivers/mfcl2740dwcupswrapper/default.nix
@@ -0,0 +1,45 @@
+{ lib, stdenv, fetchurl, dpkg, makeWrapper, coreutils, gnugrep, gnused, perl, mfcl2740dwlpr }:
+
+stdenv.mkDerivation rec {
+  pname = "mfcl2740dwcupswrapper";
+  version = "3.2.0-1";
+
+  src = fetchurl {
+    url = "https://download.brother.com/welcome/dlf101726/${pname}-${version}.i386.deb";
+    sha256 = "078453e19f20ab6c7fc4d63c3e09f162f3d1410c04c23a294b6ffbd720b35ffb";
+  };
+
+  nativeBuildInputs = [ dpkg makeWrapper ];
+
+  unpackPhase = "dpkg-deb -x $src $out";
+
+  installPhase = ''
+    basedir=${mfcl2740dwlpr}/opt/brother/Printers/MFCL2740DW
+    dir=$out/opt/brother/Printers/MFCL2740DW
+
+    substituteInPlace $dir/cupswrapper/brother_lpdwrapper_MFCL2740DW \
+      --replace /usr/bin/perl ${perl}/bin/perl \
+      --replace "basedir =~" "basedir = \"$basedir\"; #" \
+      --replace "PRINTER =~" "PRINTER = \"MFCL2740DW\"; #"
+
+    substituteInPlace $dir/cupswrapper/paperconfigml1 \
+      --replace /usr/bin/perl ${perl}/bin/perl
+
+    wrapProgram $dir/cupswrapper/brother_lpdwrapper_MFCL2740DW \
+      --prefix PATH : ${lib.makeBinPath [ coreutils gnugrep gnused ]}
+
+    mkdir -p $out/lib/cups/filter
+    mkdir -p $out/share/cups/model
+
+    ln $dir/cupswrapper/brother_lpdwrapper_MFCL2740DW $out/lib/cups/filter
+    ln $dir/cupswrapper/brother-MFCL2740DW-cups-en.ppd $out/share/cups/model
+  '';
+
+  meta = {
+    description = "Brother MFC-L2740DW CUPS wrapper driver";
+    homepage = "http://www.brother.com/";
+    license = lib.licenses.gpl2;
+    platforms = [ "x86_64-linux" "i686-linux" ];
+    maintainers = [ lib.maintainers.enzime ];
+  };
+}
diff --git a/nixpkgs/pkgs/misc/cups/drivers/mfcl2740dwlpr/default.nix b/nixpkgs/pkgs/misc/cups/drivers/mfcl2740dwlpr/default.nix
new file mode 100644
index 000000000000..38722a734a66
--- /dev/null
+++ b/nixpkgs/pkgs/misc/cups/drivers/mfcl2740dwlpr/default.nix
@@ -0,0 +1,43 @@
+{ pkgsi686Linux, lib, stdenv, fetchurl, dpkg, makeWrapper, coreutils, ghostscript, gnugrep, gnused, which, perl }:
+
+stdenv.mkDerivation rec {
+  pname = "mfcl2740dwlpr";
+  version = "3.2.0-1";
+
+  src = fetchurl {
+    url = "https://download.brother.com/welcome/dlf101727/${pname}-${version}.i386.deb";
+    sha256 = "10a2bc672bd54e718b478f3afc7e47d451557f7d5513167d3ad349a3d00bffaf";
+  };
+
+  nativeBuildInputs = [ dpkg makeWrapper ];
+
+  unpackPhase = "dpkg-deb -x $src $out";
+
+  installPhase = ''
+    dir=$out/opt/brother/Printers/MFCL2740DW
+
+    substituteInPlace $dir/lpd/filter_MFCL2740DW \
+      --replace /usr/bin/perl ${perl}/bin/perl \
+      --replace "BR_PRT_PATH =~" "BR_PRT_PATH = \"$dir\"; #" \
+      --replace "PRINTER =~" "PRINTER = \"MFCL2740DW\"; #"
+
+    wrapProgram $dir/lpd/filter_MFCL2740DW \
+      --prefix PATH : ${lib.makeBinPath [
+        coreutils ghostscript gnugrep gnused which
+      ]}
+
+    # need to use i686 glibc here, these are 32bit proprietary binaries
+    interpreter=${pkgsi686Linux.glibc}/lib/ld-linux.so.2
+    patchelf --set-interpreter "$interpreter" $dir/inf/braddprinter
+    patchelf --set-interpreter "$interpreter" $dir/lpd/brprintconflsr3
+    patchelf --set-interpreter "$interpreter" $dir/lpd/rawtobr3
+  '';
+
+  meta = {
+    description = "Brother MFC-L2740DW lpr driver";
+    homepage = "http://www.brother.com/";
+    license = lib.licenses.unfree;
+    platforms = [ "x86_64-linux" "i686-linux" ];
+    maintainers = [ lib.maintainers.enzime ];
+  };
+}
diff --git a/nixpkgs/pkgs/misc/cups/drivers/mfcl8690cdwcupswrapper/default.nix b/nixpkgs/pkgs/misc/cups/drivers/mfcl8690cdwcupswrapper/default.nix
new file mode 100644
index 000000000000..ebb2e4392989
--- /dev/null
+++ b/nixpkgs/pkgs/misc/cups/drivers/mfcl8690cdwcupswrapper/default.nix
@@ -0,0 +1,45 @@
+{ coreutils, dpkg, fetchurl, gnugrep, gnused, makeWrapper,
+mfcl8690cdwlpr, perl, lib, stdenv}:
+
+stdenv.mkDerivation rec {
+  pname = "mfcl8690cdwcupswrapper";
+  version = "1.4.0-0";
+
+  src = fetchurl {
+    url = "http://download.brother.com/welcome/dlf103250/${pname}-${version}.i386.deb";
+    sha256 = "1bl9r8mmj4vnanwpfjqgq3c9lf2v46wp5k6r2n9iqprf7ldd1kb2";
+  };
+
+  nativeBuildInputs = [ dpkg makeWrapper ];
+
+  phases = [ "installPhase" ];
+
+  installPhase = ''
+    dpkg-deb -x $src $out
+
+    basedir=${mfcl8690cdwlpr}/opt/brother/Printers/mfcl8690cdw
+    dir=$out/opt/brother/Printers/mfcl8690cdw
+
+    substituteInPlace $dir/cupswrapper/brother_lpdwrapper_mfcl8690cdw \
+      --replace /usr/bin/perl ${perl}/bin/perl \
+      --replace "basedir =~" "basedir = \"$basedir/\"; #" \
+      --replace "PRINTER =~" "PRINTER = \"mfcl8690cdw\"; #"
+
+    wrapProgram $dir/cupswrapper/brother_lpdwrapper_mfcl8690cdw \
+      --prefix PATH : ${lib.makeBinPath [ coreutils gnugrep gnused ]}
+
+    mkdir -p $out/lib/cups/filter
+    mkdir -p $out/share/cups/model
+
+    ln $dir/cupswrapper/brother_lpdwrapper_mfcl8690cdw $out/lib/cups/filter
+    ln $dir/cupswrapper/brother_mfcl8690cdw_printer_en.ppd $out/share/cups/model
+    '';
+
+  meta = {
+    description = "Brother MFC-L8690CDW CUPS wrapper driver";
+    homepage = "http://www.brother.com/";
+    license = lib.licenses.unfree;
+    platforms = lib.platforms.linux;
+    maintainers = [ lib.maintainers.fuzzy-id ];
+  };
+}
diff --git a/nixpkgs/pkgs/misc/cups/drivers/mfcl8690cdwlpr/default.nix b/nixpkgs/pkgs/misc/cups/drivers/mfcl8690cdwlpr/default.nix
new file mode 100644
index 000000000000..2b5dc44cead8
--- /dev/null
+++ b/nixpkgs/pkgs/misc/cups/drivers/mfcl8690cdwlpr/default.nix
@@ -0,0 +1,45 @@
+{ coreutils, dpkg, fetchurl, file, ghostscript, gnugrep, gnused,
+makeWrapper, perl, pkgs, lib, stdenv, which }:
+
+stdenv.mkDerivation rec {
+  pname = "mfcl8690cdwlpr";
+  version = "1.3.0-0";
+
+  src = fetchurl {
+    url = "http://download.brother.com/welcome/dlf103241/${pname}-${version}.i386.deb";
+    sha256 = "0x8zd4b1psmw1znp2ibncs37xm5mljcy9yza2rx8jm8lp0a3l85v";
+  };
+
+  nativeBuildInputs = [ dpkg makeWrapper ];
+
+  phases = [ "installPhase" ];
+
+  installPhase = ''
+    dpkg-deb -x $src $out
+
+    dir=$out/opt/brother/Printers/mfcl8690cdw
+    filter=$dir/lpd/filter_mfcl8690cdw
+
+    substituteInPlace $filter \
+      --replace /usr/bin/perl ${perl}/bin/perl \
+      --replace "BR_PRT_PATH =~" "BR_PRT_PATH = \"$dir/\"; #" \
+      --replace "PRINTER =~" "PRINTER = \"mfcl8690cdw\"; #"
+
+    wrapProgram $filter \
+      --prefix PATH : ${lib.makeBinPath [
+      coreutils file ghostscript gnugrep gnused which
+      ]}
+
+    # need to use i686 glibc here, these are 32bit proprietary binaries
+    interpreter=${pkgs.pkgsi686Linux.glibc}/lib/ld-linux.so.2
+    patchelf --set-interpreter "$interpreter" $dir/lpd/brmfcl8690cdwfilter
+  '';
+
+  meta = {
+    description = "Brother MFC-L8690CDW LPR printer driver";
+    homepage = "http://www.brother.com/";
+    license = lib.licenses.unfree;
+    maintainers = [ lib.maintainers.fuzzy-id ];
+    platforms = [ "i686-linux" ];
+  };
+}
diff --git a/nixpkgs/pkgs/misc/cups/drivers/samsung/1.00.36/default.nix b/nixpkgs/pkgs/misc/cups/drivers/samsung/1.00.36/default.nix
new file mode 100644
index 000000000000..2ea0e2538539
--- /dev/null
+++ b/nixpkgs/pkgs/misc/cups/drivers/samsung/1.00.36/default.nix
@@ -0,0 +1,116 @@
+{ lib, stdenv, fetchurl, cups, libusb-compat-0_1, libxml2, perl }:
+
+let
+
+    arch = if stdenv.system == "x86_64-linux"
+      then "x86_64"
+      else "i386";
+
+in stdenv.mkDerivation rec {
+  pname = "samsung-unified-linux-driver";
+  version = "1.00.36";
+
+  src = fetchurl {
+    sha256 = "1a7ngd03x0bkdl7pszy5zqqic0plxvdxqm5w7klr6hbdskx1lir9";
+    url = "http://www.bchemnet.com/suldr/driver/UnifiedLinuxDriver-${version}.tar.gz";
+  };
+
+  buildInputs = [
+    cups
+    libusb-compat-0_1
+    libxml2
+    perl
+  ];
+
+  installPhase = ''
+
+    mkdir -p $out/bin
+    cp -R ${arch}/{gettext,pstosecps,rastertospl,smfpnetdiscovery,usbresetter} $out/bin
+
+    mkdir -p $out/etc/sane.d/dll.d/
+    install -m644 noarch/etc/smfp.conf $out/etc/sane.d
+    echo smfp >> $out/etc/sane.d/dll.d/smfp-scanner.conf
+
+    mkdir -p $out/etc/smfp-common/scanner/share/
+    install -m644 noarch/libsane-smfp.cfg $out/etc/smfp-common/scanner/share/
+    install -m644 noarch/pagesize.xml $out/etc/smfp-common/scanner/share/
+
+    mkdir -p $out/etc/samsung/scanner/share/
+    install -m644 noarch/oem.conf $out/etc/samsung/scanner/share/
+
+    mkdir -p $out/lib
+    install -m755 ${arch}/libscmssc.so* $out/lib
+
+    mkdir -p $out/lib/cups/backend
+    ln -s $out/bin/smfpnetdiscovery $out/lib/cups/backend
+
+    mkdir -p $out/lib/cups/filter
+    ln -s $out/bin/{pstosecps,rastertospl} $out/lib/cups/filter
+    ln -s $ghostscript/bin/gs $out/lib/cups/filter
+
+    mkdir -p $out/lib/sane
+    install -m755 ${arch}/libsane-smfp.so* $out/lib/sane
+    ln -s libsane-smfp.so.1.0.1 $out/lib/sane/libsane-smfp.so.1
+    ln -s libsane-smfp.so.1     $out/lib/sane/libsane-smfp.so
+
+    perl -pi -e \
+      's|/opt/smfp-common/scanner/.usedby/|/tmp/\0\0fp-common/scanner/.usedby/|g' \
+       $out/lib/sane/libsane-smfp.so.1.0.1
+    perl -pi -e 's|/opt|/etc|g' \
+       $out/lib/sane/libsane-smfp.so.1.0.1 \
+       $out/bin/rastertospl \
+       noarch/package_utils \
+       noarch/pre_install.sh
+
+    mkdir -p $out/lib/udev/rules.d
+    (
+      OEM_FILE=noarch/oem.conf
+      INSTALL_LOG_FILE=/dev/null
+      . noarch/scripting_utils
+      . noarch/package_utils
+      . noarch/scanner-script.pkg
+      fill_full_template noarch/etc/smfp.rules.in $out/lib/udev/rules.d/60_smfp_samsung.rules
+      chmod -x $out/lib/udev/rules.d/60_smfp_samsung.rules
+    )
+
+    mkdir -p $out/share
+    cp -R noarch/share/* $out/share
+    gzip -9 $out/share/ppd/*.ppd
+    rm -r $out/share/locale/*/*/install.mo
+
+    mkdir -p $out/share/cups
+    cd $out/share/cups
+    ln -s ../ppd .
+    ln -s ppd model
+  '';
+
+  preFixup = ''
+    for bin in "$out/bin/"*; do
+      patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" "$bin"
+      patchelf --set-rpath "$out/lib:${lib.getLib cups}/lib" "$bin"
+    done
+
+    patchelf --set-rpath "$out/lib:${lib.getLib cups}/lib" "$out/lib/libscmssc.so"
+    patchelf --set-rpath "$out/lib:${libxml2.out}/lib:${libusb-compat-0_1.out}/lib" "$out/lib/sane/libsane-smfp.so.1.0.1"
+
+    ln -s ${stdenv.cc.cc.lib}/lib/libstdc++.so.6 $out/lib/
+  '';
+
+  # all binaries are already stripped
+  dontStrip = true;
+
+  # we did this in prefixup already
+  dontPatchELF = true;
+
+  meta = with lib; {
+    description = "Unified Linux Driver for Samsung printers and scanners";
+    homepage = "http://www.bchemnet.com/suldr";
+    downloadPage = "http://www.bchemnet.com/suldr/driver/";
+    license = licenses.unfree;
+
+    # Tested on linux-x86_64. Might work on linux-i386.
+    # Probably won't work on anything else.
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ tohl ];
+  };
+}
diff --git a/nixpkgs/pkgs/misc/cups/drivers/samsung/1.00.36/module.nix b/nixpkgs/pkgs/misc/cups/drivers/samsung/1.00.36/module.nix
new file mode 100644
index 000000000000..e98da9de2b60
--- /dev/null
+++ b/nixpkgs/pkgs/misc/cups/drivers/samsung/1.00.36/module.nix
@@ -0,0 +1,44 @@
+# the original samsung-unified-linux-driver_1_00_36 has some paths
+# hardcoded in binary files
+#
+# nixos samsung-unified-linux-driver_1_00_36 tries to fix those paths
+# by patching the binaries
+#
+# this module is needed to put the expected files in the new paths
+#
+# printing works without problems
+#
+# scanning works, except one detail: sometimes it is possible to scan
+# more pages in sequence.  most of the time though, scanning stops
+# working after one page.  this problem happens both with scanimage
+# and simple-scan.  errors indicate an I/O error.  scanning works
+# again after turning the device off and on.  atm i have no idea how
+# to fix this and no time to do more about it.
+{config, pkgs, lib ? pkgs.lib, ...}:
+with lib;
+let
+  cfg = config.services.samsung-unified-linux-driver_1_00_36;
+  pkg = pkgs.samsung-unified-linux-driver_1_00_36;
+in {
+  options = {
+    services.samsung-unified-linux-driver_1_00_36 = {
+      enable = mkEnableOption "enable samsung-unified-linux-driver_1_00_36";
+    };
+  };
+  config = mkIf cfg.enable {
+    services.printing.drivers = [pkg];
+    hardware.sane.extraBackends = [pkg];
+    environment.etc = {
+      "samsung/scanner/share/oem.conf".source
+        = "${pkg}/etc/samsung/scanner/share/oem.conf";
+      "smfp-common/scanner/share/libsane-smfp.cfg".source
+        = "${pkg}/etc/smfp-common/scanner/share/libsane-smfp.cfg";
+      "smfp-common/scanner/share/pagesize.xml".source
+        = "${pkg}/etc/smfp-common/scanner/share/pagesize.xml";
+      "sane.d/smfp.conf".source
+        = "${pkg}/etc/sane.d/smfp.conf";
+      "sane.d/dll.d/smfp-scanner.conf".source
+        = "${pkg}/etc/sane.d/dll.d/smfp-scanner.conf";
+    };
+  };
+}
diff --git a/nixpkgs/pkgs/misc/cups/drivers/samsung/1.00.37.nix b/nixpkgs/pkgs/misc/cups/drivers/samsung/1.00.37.nix
new file mode 100644
index 000000000000..9fb26f62d76d
--- /dev/null
+++ b/nixpkgs/pkgs/misc/cups/drivers/samsung/1.00.37.nix
@@ -0,0 +1,98 @@
+{ lib, stdenv, fetchurl, cups, libusb-compat-0_1, libxml2 }:
+
+let
+
+    arch = if stdenv.hostPlatform.system == "x86_64-linux"
+      then "x86_64"
+      else "i386";
+
+in stdenv.mkDerivation rec {
+  pname = "samsung-unified-linux-driver";
+  version = "1.00.37";
+
+  src = fetchurl {
+    sha256 = "0r66l9zp0p1qgakh4j08hynwsr4lsgq5yrpxyr0x4ldvl0z2b1bb";
+    url = "http://www.bchemnet.com/suldr/driver/UnifiedLinuxDriver-${version}.tar.gz";
+  };
+
+  buildInputs = [
+    cups
+    libusb-compat-0_1
+    libxml2
+  ];
+
+  installPhase = ''
+
+    mkdir -p $out/bin
+    cp -R ${arch}/{gettext,pstosecps,rastertospl,smfpnetdiscovery,usbresetter} $out/bin
+
+    mkdir -p $out/etc/sane.d/dll.d/
+    install -m644 noarch/etc/smfp.conf $out/etc/sane.d
+    echo smfp >> $out/etc/sane.d/dll.d/smfp-scanner.conf
+
+    mkdir -p $out/lib
+    install -m755 ${arch}/libscmssc.so* $out/lib
+
+    mkdir -p $out/lib/cups/backend
+    ln -s $out/bin/smfpnetdiscovery $out/lib/cups/backend
+
+    mkdir -p $out/lib/cups/filter
+    ln -s $out/bin/{pstosecps,rastertospl} $out/lib/cups/filter
+    ln -s $ghostscript/bin/gs $out/lib/cups/filter
+
+    mkdir -p $out/lib/sane
+    install -m755 ${arch}/libsane-smfp.so* $out/lib/sane
+    ln -s libsane-smfp.so.1.0.1 $out/lib/sane/libsane-smfp.so.1
+    ln -s libsane-smfp.so.1     $out/lib/sane/libsane-smfp.so
+
+    mkdir -p $out/lib/udev/rules.d
+    (
+      OEM_FILE=noarch/oem.conf
+      INSTALL_LOG_FILE=/dev/null
+      . noarch/scripting_utils
+      . noarch/package_utils
+      . noarch/scanner-script.pkg
+      fill_full_template noarch/etc/smfp.rules.in $out/lib/udev/rules.d/60_smfp_samsung.rules
+      chmod -x $out/lib/udev/rules.d/60_smfp_samsung.rules
+    )
+
+    mkdir -p $out/share
+    cp -R noarch/share/* $out/share
+    gzip -9 $out/share/ppd/*.ppd
+    rm -r $out/share/locale/*/*/install.mo
+
+    mkdir -p $out/share/cups
+    cd $out/share/cups
+    ln -s ../ppd .
+    ln -s ppd model
+  '';
+
+  preFixup = ''
+    for bin in "$out/bin/"*; do
+      patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" "$bin"
+      patchelf --set-rpath "$out/lib:${lib.getLib cups}/lib" "$bin"
+    done
+
+    patchelf --set-rpath "$out/lib:${lib.getLib cups}/lib" "$out/lib/libscmssc.so"
+    patchelf --set-rpath "$out/lib:${libxml2.out}/lib:${libusb-compat-0_1.out}/lib" "$out/lib/sane/libsane-smfp.so.1.0.1"
+
+    ln -s ${stdenv.cc.cc.lib}/lib/libstdc++.so.6 $out/lib/
+  '';
+
+  # all binaries are already stripped
+  dontStrip = true;
+
+  # we did this in prefixup already
+  dontPatchELF = true;
+
+  meta = with lib; {
+    description = "Unified Linux Driver for Samsung printers and scanners";
+    homepage = "http://www.bchemnet.com/suldr";
+    downloadPage = "http://www.bchemnet.com/suldr/driver/";
+    license = licenses.unfree;
+
+    # Tested on linux-x86_64. Might work on linux-i386.
+    # Probably won't work on anything else.
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/misc/cups/drivers/samsung/4.00.39/builder.sh b/nixpkgs/pkgs/misc/cups/drivers/samsung/4.00.39/builder.sh
new file mode 100644
index 000000000000..f750df6e5063
--- /dev/null
+++ b/nixpkgs/pkgs/misc/cups/drivers/samsung/4.00.39/builder.sh
@@ -0,0 +1,35 @@
+source $stdenv/setup
+
+arch=$(uname -m)
+echo "$arch" | egrep -q '^i[3456]86$' && arch=i386
+echo "Installing for $arch"
+
+unpackPhase
+patchPhase
+
+set -v
+
+cd cdroot/Linux
+mkdir -p $out/opt
+cp -r $arch/at_root/* $out
+cp -r $arch/at_opt/* $out/opt
+#cp -r noarch/at_root/* $out
+cp -r noarch/at_opt/* $out/opt
+
+cd $out
+test -d usr/lib64 && ln -s usr/lib64 lib ||
+    ln -s usr/lib lib
+mkdir -p share/cups
+cd share/cups
+ln -s ../../opt/share/* .
+ln -s ppd model
+
+cd $out/lib/cups/filter
+for i in $(ls); do
+    echo "Patching $i..."
+    patchelf --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) $i ||
+      echo "Couldn't set interpreter!"
+    patchelf --set-rpath $cups/lib:$gcc/lib:$glibc/lib $i  # This might not be necessary.
+done
+
+ln -s $ghostscript/bin/gs $out/lib/cups/filter
diff --git a/nixpkgs/pkgs/misc/cups/drivers/samsung/4.00.39/default.nix b/nixpkgs/pkgs/misc/cups/drivers/samsung/4.00.39/default.nix
new file mode 100644
index 000000000000..92f5fdc409c4
--- /dev/null
+++ b/nixpkgs/pkgs/misc/cups/drivers/samsung/4.00.39/default.nix
@@ -0,0 +1,44 @@
+# Tested on linux-x86_64.  Might work on linux-i386.  Probably won't work on anything else.
+
+# To use this driver in NixOS, add it to printing.drivers in configuration.nix.
+# configuration.nix might look like this when you're done:
+# { pkgs, ... }: {
+#   printing = {
+#     enable = true;
+#     drivers = [ pkgs.samsungUnifiedLinuxDriver ];
+#   };
+#   (more stuff)
+# }
+# (This advice was tested on 2010 August 2.)
+
+{ lib, stdenv, fetchurl, cups, gcc, ghostscript, glibc, patchelf }:
+
+# Do not bump lightly! Visit <http://www.bchemnet.com/suldr/supported.html>
+# to see what will break when upgrading. Consider a new versioned attribute.
+let
+  cups' = lib.getLib cups;
+in stdenv.mkDerivation rec {
+  pname = "samsung-UnifiedLinuxDriver";
+  version = "4.00.39";
+
+  src = fetchurl {
+    url = "http://www.bchemnet.com/suldr/driver/UnifiedLinuxDriver-${version}.tar.gz";
+    sha256 = "144b4xggbzjfq7ga5nza7nra2cf6qn63z5ls7ba1jybkx1vm369k";
+  };
+
+  nativeBuildInputs = [ patchelf ];
+  buildInputs = [ cups' gcc ghostscript glibc ];
+
+  inherit gcc ghostscript glibc;
+  cups = cups';
+
+  builder = ./builder.sh;
+
+  meta = with lib; {
+    description = "Samsung's Linux printing drivers; includes binaries without source code";
+    homepage = "http://www.samsung.com/";
+    license = licenses.unfree;
+    platforms = platforms.linux;
+    broken = true;   # libscmssc.so and libmfp.so can't find their library dependencies at run-time
+  };
+}
diff --git a/nixpkgs/pkgs/misc/cups/drivers/samsung/4.01.17.nix b/nixpkgs/pkgs/misc/cups/drivers/samsung/4.01.17.nix
new file mode 100644
index 000000000000..2591cf735661
--- /dev/null
+++ b/nixpkgs/pkgs/misc/cups/drivers/samsung/4.01.17.nix
@@ -0,0 +1,82 @@
+# Tested on linux-x86_64.  Might work on linux-i386.  Probably won't work on anything else.
+
+# To use this driver in NixOS, add it to printing.drivers in configuration.nix.
+# configuration.nix might look like this when you're done:
+# { pkgs, ... }: {
+#   printing = {
+#     enable = true;
+#     drivers = [ pkgs.samsung-unified-linux-driver_4_01_17 ];
+#   };
+#   (more stuff)
+# }
+# (This advice was tested on the 1st November 2016.)
+
+{ lib, stdenv, fetchurl, cups, libusb-compat-0_1 }:
+
+# Do not bump lightly! Visit <http://www.bchemnet.com/suldr/supported.html>
+# to see what will break when upgrading. Consider a new versioned attribute.
+let
+  installationPath = if stdenv.hostPlatform.system == "x86_64-linux" then "x86_64" else "i386";
+  appendPath = if stdenv.hostPlatform.system == "x86_64-linux" then "64" else "";
+  libPath = lib.makeLibraryPath [ cups libusb-compat-0_1 ] + ":$out/lib:${stdenv.cc.cc.lib}/lib${appendPath}";
+in stdenv.mkDerivation rec {
+  pname = "samsung-UnifiedLinuxDriver";
+  version = "4.01.17";
+
+  src = fetchurl {
+    url = "http://www.bchemnet.com/suldr/driver/UnifiedLinuxDriver-${version}.tar.gz";
+    sha256 = "1vv3pzvqpg1dq3xjr8161x2yp3v7ca75vil56ranhw5pkjwq66x0";
+  };
+
+  dontPatchELF = true;
+  dontStrip = true;
+
+  installPhase = ''
+    cd Linux/${installationPath}
+    mkdir -p $out/lib/cups/{backend,filter}
+    install -Dm755 mfp $out/lib/cups/backend/
+    install -Dm755 pstosecps pstospl pstosplc rastertospl rastertosplc $out/lib/cups/filter/
+    install -Dm755 libscmssc.so $out/lib/
+
+    GLOBIGNORE=*.so
+    for exe in $out/lib/cups/**/*; do
+      echo "Patching $exe"
+      patchelf \
+        --set-rpath ${libPath} \
+        --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \
+        $exe
+    done
+    unset GLOBIGNORE
+
+    install -v at_root/usr/lib${appendPath}/libmfp.so.1.0.1 $out/lib
+    cd $out/lib
+    ln -s -f libmfp.so.1.0.1 libmfp.so.1
+    ln -s -f libmfp.so.1 libmfp.so
+
+    for lib in $out/lib/*.so; do
+      echo "Patching $lib"
+      patchelf \
+        --set-rpath ${libPath} \
+        $lib
+    done
+
+    mkdir -p $out/share/cups/model/samsung
+    cd -
+    cd ../noarch/at_opt/share/ppd
+    for i in *.ppd; do
+      sed -i $i -e \
+        "s,pstosecps,$out/lib/cups/filter/pstosecps,g; \
+         s,pstospl,$out/lib/cups/filter/pstospl,g; \
+         s,rastertospl,$out/lib/cups/filter/rastertospl,g"
+    done;
+    cp -r ./* $out/share/cups/model/samsung
+  '';
+
+  meta = with lib; {
+    description = "Samsung's Linux printing drivers; includes binaries without source code";
+    homepage = "http://www.samsung.com/";
+    license = licenses.unfree;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ joko ];
+  };
+}
diff --git a/nixpkgs/pkgs/misc/cups/drivers/splix/default.nix b/nixpkgs/pkgs/misc/cups/drivers/splix/default.nix
new file mode 100644
index 000000000000..1125e7697112
--- /dev/null
+++ b/nixpkgs/pkgs/misc/cups/drivers/splix/default.nix
@@ -0,0 +1,55 @@
+{ lib, stdenv, fetchsvn, fetchurl, cups, cups-filters, jbigkit, zlib }:
+
+let
+
+  color-profiles = stdenv.mkDerivation {
+    name = "splix-color-profiles-20070625";
+
+    src = fetchurl {
+      url = "http://splix.ap2c.org/samsung_cms.tar.bz2";
+      sha256 = "1156flics5m9m7a4hdmcc2nphbdyary6dfmbcrmsp9xb7ivsypdl";
+    };
+
+    phases = [ "unpackPhase" "installPhase" ];
+
+    installPhase = ''
+      mkdir -p $out/share/cups/profiles/samsung
+      cp * $out/share/cups/profiles/samsung/
+    '';
+  };
+
+in stdenv.mkDerivation rec {
+  name = "splix-svn-${rev}";
+  rev = "315";
+
+  src = fetchsvn {
+    # We build this from svn, because splix hasn't been in released in several years
+    # although the community has been adding some new printer models.
+    url = "svn://svn.code.sf.net/p/splix/code/splix";
+    inherit rev;
+    sha256 = "16wbm4xnz35ca3mw2iggf5f4jaxpyna718ia190ka6y4ah932jxl";
+  };
+
+  postPatch = ''
+    mv -v *.ppd ppd/
+    substituteInPlace src/pstoqpdl.cpp \
+      --replace "RASTERDIR \"/\" RASTERTOQPDL" "\"$out/lib/cups/filter/rastertoqpdl\"" \
+      --replace "RASTERDIR" "\"${cups-filters}/lib/cups/filter\"" \
+  '';
+
+  makeFlags = [
+    "CUPSFILTER=$(out)/lib/cups/filter"
+    "CUPSPPD=$(out)/share/cups/model"
+    "CUPSPROFILE=${color-profiles}/share/cups/profiles"
+  ];
+
+  buildInputs = [ cups zlib jbigkit ];
+
+  meta = with lib; {
+    description = "CUPS drivers for SPL (Samsung Printer Language) printers";
+    homepage = "http://splix.ap2c.org";
+    license = licenses.gpl2;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ jfrankenau peti ];
+  };
+}
diff --git a/nixpkgs/pkgs/misc/cups/drivers/zj-58/default.nix b/nixpkgs/pkgs/misc/cups/drivers/zj-58/default.nix
new file mode 100644
index 000000000000..0e2534997e35
--- /dev/null
+++ b/nixpkgs/pkgs/misc/cups/drivers/zj-58/default.nix
@@ -0,0 +1,28 @@
+{lib, stdenv, fetchFromGitHub, cups}:
+
+stdenv.mkDerivation {
+  pname = "cups-zj-58";
+  version = "2018-02-22";
+
+  src = fetchFromGitHub {
+    owner = "klirichek";
+    repo = "zj-58";
+    rev = "e4212cd";
+    sha256 = "1w2qkspm4qqg5h8n6gmakzhiww7gag64chvy9kf89xsl3wsyp6pi";
+  };
+
+  buildInputs = [ cups ];
+
+  installPhase = ''
+    install -D rastertozj $out/lib/cups/filter/rastertozj
+    install -D ZJ-58.ppd $out/share/cups/model/zjiang/ZJ-58.ppd
+  '';
+
+  meta = with lib; {
+    description = "CUPS filter for thermal printer Zjiang ZJ-58";
+    homepage = "https://github.com/klirichek/zj-58";
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ makefu ];
+    license = licenses.bsd2;
+  };
+}
diff --git a/nixpkgs/pkgs/misc/cups/filters.nix b/nixpkgs/pkgs/misc/cups/filters.nix
new file mode 100644
index 000000000000..8b1e7fe8fc70
--- /dev/null
+++ b/nixpkgs/pkgs/misc/cups/filters.nix
@@ -0,0 +1,71 @@
+{ lib, stdenv, fetchurl, pkg-config, cups, poppler, poppler_utils, fontconfig
+, libjpeg, libpng, perl, ijs, qpdf, dbus, avahi
+, makeWrapper, coreutils, gnused, bc, gawk, gnugrep, which, ghostscript
+, mupdf
+}:
+
+let
+  binPath = lib.makeBinPath [ coreutils gnused bc gawk gnugrep which ];
+
+in stdenv.mkDerivation rec {
+  pname = "cups-filters";
+  version = "1.25.12";
+
+  src = fetchurl {
+    url = "https://openprinting.org/download/cups-filters/${pname}-${version}.tar.xz";
+    sha256 = "1kv25011iyzvd33n5zmmn1z2p6pzk26hmmw6qvjjnx8p3sp7raqn";
+  };
+
+  nativeBuildInputs = [ pkg-config makeWrapper ];
+
+  buildInputs = [
+    cups poppler poppler_utils fontconfig libjpeg libpng perl
+    ijs qpdf dbus avahi ghostscript mupdf
+  ];
+
+  configureFlags = [
+    # TODO(Profpatsch): mupdf support
+    "--with-pdftops=pdftops"
+    "--with-pdftops-path=${poppler_utils}/bin/pdftops"
+    "--with-gs-path=${ghostscript}/bin/gs"
+    "--with-pdftocairo-path=${poppler_utils}/bin/pdftocairo"
+    "--with-ippfind-path=${cups}/bin/ippfind"
+    "--enable-imagefilters"
+    "--with-rcdir=no"
+    "--with-shell=${stdenv.shell}"
+    "--with-test-font-path=/path-does-not-exist"
+  ];
+
+  makeFlags = [ "CUPS_SERVERBIN=$(out)/lib/cups" "CUPS_DATADIR=$(out)/share/cups" "CUPS_SERVERROOT=$(out)/etc/cups" ];
+
+  postConfigure =
+    ''
+      # Ensure that bannertopdf can find the PDF templates in
+      # $out. (By default, it assumes that cups and cups-filters are
+      # installed in the same prefix.)
+      substituteInPlace config.h --replace ${cups.out}/share/cups/data $out/share/cups/data
+
+      # Ensure that gstoraster can find gs in $PATH.
+      substituteInPlace filter/gstoraster.c --replace execve execvpe
+
+      # Patch shebangs of generated build scripts
+      patchShebangs filter
+    '';
+
+  postInstall =
+    ''
+      for i in $out/lib/cups/filter/*; do
+        wrapProgram "$i" --prefix PATH ':' ${binPath}
+      done
+    '';
+
+  enableParallelBuilding = true;
+  doCheck = false; # fails 4 out of 6 tests
+
+  meta = {
+    homepage = "http://www.linuxfoundation.org/collaborate/workgroups/openprinting/cups-filters";
+    description = "Backends, filters, and other software that was once part of the core CUPS distribution but is no longer maintained by Apple Inc";
+    license = lib.licenses.gpl2;
+    platforms = lib.platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/misc/documentation-highlighter/LICENSE b/nixpkgs/pkgs/misc/documentation-highlighter/LICENSE
new file mode 100644
index 000000000000..422deb7350fe
--- /dev/null
+++ b/nixpkgs/pkgs/misc/documentation-highlighter/LICENSE
@@ -0,0 +1,24 @@
+Copyright (c) 2006, Ivan Sagalaev
+All rights reserved.
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+    * Redistributions of source code must retain the above copyright
+      notice, this list of conditions and the following disclaimer.
+    * Redistributions in binary form must reproduce the above copyright
+      notice, this list of conditions and the following disclaimer in the
+      documentation and/or other materials provided with the distribution.
+    * Neither the name of highlight.js nor the names of its contributors 
+      may be used to endorse or promote products derived from this software 
+      without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS AND CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/nixpkgs/pkgs/misc/documentation-highlighter/README.md b/nixpkgs/pkgs/misc/documentation-highlighter/README.md
new file mode 100644
index 000000000000..f4baa3c8e001
--- /dev/null
+++ b/nixpkgs/pkgs/misc/documentation-highlighter/README.md
@@ -0,0 +1,152 @@
+This file was generated with pkgs/misc/documentation-highlighter/update.sh
+
+# Highlight.js
+
+[![Build Status](https://travis-ci.org/isagalaev/highlight.js.svg?branch=master)](https://travis-ci.org/isagalaev/highlight.js)
+
+Highlight.js is a syntax highlighter written in JavaScript. It works in
+the browser as well as on the server. It works with pretty much any
+markup, doesn’t depend on any framework and has automatic language
+detection.
+
+## Getting Started
+
+The bare minimum for using highlight.js on a web page is linking to the
+library along with one of the styles and calling
+[`initHighlightingOnLoad`][1]:
+
+```html
+<link rel="stylesheet" href="/path/to/styles/default.css">
+<script src="/path/to/highlight.pack.js"></script>
+<script>hljs.initHighlightingOnLoad();</script>
+```
+
+This will find and highlight code inside of `<pre><code>` tags; it tries
+to detect the language automatically. If automatic detection doesn’t
+work for you, you can specify the language in the `class` attribute:
+
+```html
+<pre><code class="html">...</code></pre>
+```
+
+The list of supported language classes is available in the [class
+reference][2].  Classes can also be prefixed with either `language-` or
+`lang-`.
+
+To disable highlighting altogether use the `nohighlight` class:
+
+```html
+<pre><code class="nohighlight">...</code></pre>
+```
+
+## Custom Initialization
+
+When you need a bit more control over the initialization of
+highlight.js, you can use the [`highlightBlock`][3] and [`configure`][4]
+functions. This allows you to control *what* to highlight and *when*.
+
+Here’s an equivalent way to calling [`initHighlightingOnLoad`][1] using
+jQuery:
+
+```javascript
+$(document).ready(function() {
+  $('pre code').each(function(i, block) {
+    hljs.highlightBlock(block);
+  });
+});
+```
+
+You can use any tags instead of `<pre><code>` to mark up your code. If
+you don't use a container that preserve line breaks you will need to
+configure highlight.js to use the `<br>` tag:
+
+```javascript
+hljs.configure({useBR: true});
+
+$('div.code').each(function(i, block) {
+  hljs.highlightBlock(block);
+});
+```
+
+For other options refer to the documentation for [`configure`][4].
+
+
+## Web Workers
+
+You can run highlighting inside a web worker to avoid freezing the browser
+window while dealing with very big chunks of code.
+
+In your main script:
+
+```javascript
+addEventListener('load', function() {
+  var code = document.querySelector('#code');
+  var worker = new Worker('worker.js');
+  worker.onmessage = function(event) { code.innerHTML = event.data; }
+  worker.postMessage(code.textContent);
+})
+```
+
+In worker.js:
+
+```javascript
+onmessage = function(event) {
+  importScripts('<path>/highlight.pack.js');
+  var result = self.hljs.highlightAuto(event.data);
+  postMessage(result.value);
+}
+```
+
+
+## Getting the Library
+
+You can get highlight.js as a hosted, or custom-build, browser script or
+as a server module. Right out of the box the browser script supports
+both AMD and CommonJS, so if you wish you can use RequireJS or
+Browserify without having to build from source. The server module also
+works perfectly fine with Browserify, but there is the option to use a
+build specific to browsers rather than something meant for a server.
+Head over to the [download page][5] for all the options.
+
+**Don't link to GitHub directly.** The library is not supposed to work straight
+from the source, it requires building. If none of the pre-packaged options
+work for you refer to the [building documentation][6].
+
+**The CDN-hosted package doesn't have all the languages.** Otherwise it'd be
+too big. If you don't see the language you need in the ["Common" section][5],
+it can be added manually:
+
+```html
+<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.4.0/languages/go.min.js"></script>
+```
+
+**On Almond.** You need to use the optimizer to give the module a name. For
+example:
+
+```
+r.js -o name=hljs paths.hljs=/path/to/highlight out=highlight.js
+```
+
+
+## License
+
+Highlight.js is released under the BSD License. See [LICENSE][7] file
+for details.
+
+## Links
+
+The official site for the library is at <https://highlightjs.org/>.
+
+Further in-depth documentation for the API and other topics is at
+<http://highlightjs.readthedocs.io/>.
+
+Authors and contributors are listed in the [AUTHORS.en.txt][8] file.
+
+[1]: http://highlightjs.readthedocs.io/en/latest/api.html#inithighlightingonload
+[2]: http://highlightjs.readthedocs.io/en/latest/css-classes-reference.html
+[3]: http://highlightjs.readthedocs.io/en/latest/api.html#highlightblock-block
+[4]: http://highlightjs.readthedocs.io/en/latest/api.html#configure-options
+[5]: https://highlightjs.org/download/
+[6]: http://highlightjs.readthedocs.io/en/latest/building-testing.html
+[7]: https://github.com/isagalaev/highlight.js/blob/master/LICENSE
+[8]: https://github.com/isagalaev/highlight.js/blob/master/AUTHORS.en.txt
diff --git a/nixpkgs/pkgs/misc/documentation-highlighter/default.nix b/nixpkgs/pkgs/misc/documentation-highlighter/default.nix
new file mode 100644
index 000000000000..2a34e36742d5
--- /dev/null
+++ b/nixpkgs/pkgs/misc/documentation-highlighter/default.nix
@@ -0,0 +1,12 @@
+{ lib, runCommand }:
+runCommand "documentation-highlighter" {
+  meta = {
+    description = "Highlight.js sources for the Nix Ecosystem's documentation";
+    homepage = "https://highlightjs.org";
+    license = lib.licenses.bsd3;
+    platforms = lib.platforms.all;
+    maintainers = [ lib.maintainers.grahamc ];
+  };
+} ''
+  cp -r ${./.} $out
+''
diff --git a/nixpkgs/pkgs/misc/documentation-highlighter/highlight.pack.js b/nixpkgs/pkgs/misc/documentation-highlighter/highlight.pack.js
new file mode 100644
index 000000000000..f909702367ec
--- /dev/null
+++ b/nixpkgs/pkgs/misc/documentation-highlighter/highlight.pack.js
@@ -0,0 +1,2 @@
+/*! highlight.js v9.12.0 | BSD3 License | git.io/hljslicense */
+!function(e){var n="object"==typeof window&&window||"object"==typeof self&&self;"undefined"!=typeof exports?e(exports):n&&(n.hljs=e({}),"function"==typeof define&&define.amd&&define([],function(){return n.hljs}))}(function(e){function n(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function t(e){return e.nodeName.toLowerCase()}function r(e,n){var t=e&&e.exec(n);return t&&0===t.index}function a(e){return k.test(e)}function i(e){var n,t,r,i,o=e.className+" ";if(o+=e.parentNode?e.parentNode.className:"",t=B.exec(o))return w(t[1])?t[1]:"no-highlight";for(o=o.split(/\s+/),n=0,r=o.length;r>n;n++)if(i=o[n],a(i)||w(i))return i}function o(e){var n,t={},r=Array.prototype.slice.call(arguments,1);for(n in e)t[n]=e[n];return r.forEach(function(e){for(n in e)t[n]=e[n]}),t}function u(e){var n=[];return function r(e,a){for(var i=e.firstChild;i;i=i.nextSibling)3===i.nodeType?a+=i.nodeValue.length:1===i.nodeType&&(n.push({event:"start",offset:a,node:i}),a=r(i,a),t(i).match(/br|hr|img|input/)||n.push({event:"stop",offset:a,node:i}));return a}(e,0),n}function c(e,r,a){function i(){return e.length&&r.length?e[0].offset!==r[0].offset?e[0].offset<r[0].offset?e:r:"start"===r[0].event?e:r:e.length?e:r}function o(e){function r(e){return" "+e.nodeName+'="'+n(e.value).replace('"',"&quot;")+'"'}s+="<"+t(e)+E.map.call(e.attributes,r).join("")+">"}function u(e){s+="</"+t(e)+">"}function c(e){("start"===e.event?o:u)(e.node)}for(var l=0,s="",f=[];e.length||r.length;){var g=i();if(s+=n(a.substring(l,g[0].offset)),l=g[0].offset,g===e){f.reverse().forEach(u);do c(g.splice(0,1)[0]),g=i();while(g===e&&g.length&&g[0].offset===l);f.reverse().forEach(o)}else"start"===g[0].event?f.push(g[0].node):f.pop(),c(g.splice(0,1)[0])}return s+n(a.substr(l))}function l(e){return e.v&&!e.cached_variants&&(e.cached_variants=e.v.map(function(n){return o(e,{v:null},n)})),e.cached_variants||e.eW&&[o(e)]||[e]}function s(e){function n(e){return e&&e.source||e}function t(t,r){return new RegExp(n(t),"m"+(e.cI?"i":"")+(r?"g":""))}function r(a,i){if(!a.compiled){if(a.compiled=!0,a.k=a.k||a.bK,a.k){var o={},u=function(n,t){e.cI&&(t=t.toLowerCase()),t.split(" ").forEach(function(e){var t=e.split("|");o[t[0]]=[n,t[1]?Number(t[1]):1]})};"string"==typeof a.k?u("keyword",a.k):x(a.k).forEach(function(e){u(e,a.k[e])}),a.k=o}a.lR=t(a.l||/\w+/,!0),i&&(a.bK&&(a.b="\\b("+a.bK.split(" ").join("|")+")\\b"),a.b||(a.b=/\B|\b/),a.bR=t(a.b),a.e||a.eW||(a.e=/\B|\b/),a.e&&(a.eR=t(a.e)),a.tE=n(a.e)||"",a.eW&&i.tE&&(a.tE+=(a.e?"|":"")+i.tE)),a.i&&(a.iR=t(a.i)),null==a.r&&(a.r=1),a.c||(a.c=[]),a.c=Array.prototype.concat.apply([],a.c.map(function(e){return l("self"===e?a:e)})),a.c.forEach(function(e){r(e,a)}),a.starts&&r(a.starts,i);var c=a.c.map(function(e){return e.bK?"\\.?("+e.b+")\\.?":e.b}).concat([a.tE,a.i]).map(n).filter(Boolean);a.t=c.length?t(c.join("|"),!0):{exec:function(){return null}}}}r(e)}function f(e,t,a,i){function o(e,n){var t,a;for(t=0,a=n.c.length;a>t;t++)if(r(n.c[t].bR,e))return n.c[t]}function u(e,n){if(r(e.eR,n)){for(;e.endsParent&&e.parent;)e=e.parent;return e}return e.eW?u(e.parent,n):void 0}function c(e,n){return!a&&r(n.iR,e)}function l(e,n){var t=N.cI?n[0].toLowerCase():n[0];return e.k.hasOwnProperty(t)&&e.k[t]}function p(e,n,t,r){var a=r?"":I.classPrefix,i='<span class="'+a,o=t?"":C;return i+=e+'">',i+n+o}function h(){var e,t,r,a;if(!E.k)return n(k);for(a="",t=0,E.lR.lastIndex=0,r=E.lR.exec(k);r;)a+=n(k.substring(t,r.index)),e=l(E,r),e?(B+=e[1],a+=p(e[0],n(r[0]))):a+=n(r[0]),t=E.lR.lastIndex,r=E.lR.exec(k);return a+n(k.substr(t))}function d(){var e="string"==typeof E.sL;if(e&&!y[E.sL])return n(k);var t=e?f(E.sL,k,!0,x[E.sL]):g(k,E.sL.length?E.sL:void 0);return E.r>0&&(B+=t.r),e&&(x[E.sL]=t.top),p(t.language,t.value,!1,!0)}function b(){L+=null!=E.sL?d():h(),k=""}function v(e){L+=e.cN?p(e.cN,"",!0):"",E=Object.create(e,{parent:{value:E}})}function m(e,n){if(k+=e,null==n)return b(),0;var t=o(n,E);if(t)return t.skip?k+=n:(t.eB&&(k+=n),b(),t.rB||t.eB||(k=n)),v(t,n),t.rB?0:n.length;var r=u(E,n);if(r){var a=E;a.skip?k+=n:(a.rE||a.eE||(k+=n),b(),a.eE&&(k=n));do E.cN&&(L+=C),E.skip||(B+=E.r),E=E.parent;while(E!==r.parent);return r.starts&&v(r.starts,""),a.rE?0:n.length}if(c(n,E))throw new Error('Illegal lexeme "'+n+'" for mode "'+(E.cN||"<unnamed>")+'"');return k+=n,n.length||1}var N=w(e);if(!N)throw new Error('Unknown language: "'+e+'"');s(N);var R,E=i||N,x={},L="";for(R=E;R!==N;R=R.parent)R.cN&&(L=p(R.cN,"",!0)+L);var k="",B=0;try{for(var M,j,O=0;;){if(E.t.lastIndex=O,M=E.t.exec(t),!M)break;j=m(t.substring(O,M.index),M[0]),O=M.index+j}for(m(t.substr(O)),R=E;R.parent;R=R.parent)R.cN&&(L+=C);return{r:B,value:L,language:e,top:E}}catch(T){if(T.message&&-1!==T.message.indexOf("Illegal"))return{r:0,value:n(t)};throw T}}function g(e,t){t=t||I.languages||x(y);var r={r:0,value:n(e)},a=r;return t.filter(w).forEach(function(n){var t=f(n,e,!1);t.language=n,t.r>a.r&&(a=t),t.r>r.r&&(a=r,r=t)}),a.language&&(r.second_best=a),r}function p(e){return I.tabReplace||I.useBR?e.replace(M,function(e,n){return I.useBR&&"\n"===e?"<br>":I.tabReplace?n.replace(/\t/g,I.tabReplace):""}):e}function h(e,n,t){var r=n?L[n]:t,a=[e.trim()];return e.match(/\bhljs\b/)||a.push("hljs"),-1===e.indexOf(r)&&a.push(r),a.join(" ").trim()}function d(e){var n,t,r,o,l,s=i(e);a(s)||(I.useBR?(n=document.createElementNS("http://www.w3.org/1999/xhtml","div"),n.innerHTML=e.innerHTML.replace(/\n/g,"").replace(/<br[ \/]*>/g,"\n")):n=e,l=n.textContent,r=s?f(s,l,!0):g(l),t=u(n),t.length&&(o=document.createElementNS("http://www.w3.org/1999/xhtml","div"),o.innerHTML=r.value,r.value=c(t,u(o),l)),r.value=p(r.value),e.innerHTML=r.value,e.className=h(e.className,s,r.language),e.result={language:r.language,re:r.r},r.second_best&&(e.second_best={language:r.second_best.language,re:r.second_best.r}))}function b(e){I=o(I,e)}function v(){if(!v.called){v.called=!0;var e=document.querySelectorAll("pre code");E.forEach.call(e,d)}}function m(){addEventListener("DOMContentLoaded",v,!1),addEventListener("load",v,!1)}function N(n,t){var r=y[n]=t(e);r.aliases&&r.aliases.forEach(function(e){L[e]=n})}function R(){return x(y)}function w(e){return e=(e||"").toLowerCase(),y[e]||y[L[e]]}var E=[],x=Object.keys,y={},L={},k=/^(no-?highlight|plain|text)$/i,B=/\blang(?:uage)?-([\w-]+)\b/i,M=/((^(<[^>]+>|\t|)+|(?:\n)))/gm,C="</span>",I={classPrefix:"hljs-",tabReplace:null,useBR:!1,languages:void 0};return e.highlight=f,e.highlightAuto=g,e.fixMarkup=p,e.highlightBlock=d,e.configure=b,e.initHighlighting=v,e.initHighlightingOnLoad=m,e.registerLanguage=N,e.listLanguages=R,e.getLanguage=w,e.inherit=o,e.IR="[a-zA-Z]\\w*",e.UIR="[a-zA-Z_]\\w*",e.NR="\\b\\d+(\\.\\d+)?",e.CNR="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",e.BNR="\\b(0b[01]+)",e.RSR="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",e.BE={b:"\\\\[\\s\\S]",r:0},e.ASM={cN:"string",b:"'",e:"'",i:"\\n",c:[e.BE]},e.QSM={cN:"string",b:'"',e:'"',i:"\\n",c:[e.BE]},e.PWM={b:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},e.C=function(n,t,r){var a=e.inherit({cN:"comment",b:n,e:t,c:[]},r||{});return a.c.push(e.PWM),a.c.push({cN:"doctag",b:"(?:TODO|FIXME|NOTE|BUG|XXX):",r:0}),a},e.CLCM=e.C("//","$"),e.CBCM=e.C("/\\*","\\*/"),e.HCM=e.C("#","$"),e.NM={cN:"number",b:e.NR,r:0},e.CNM={cN:"number",b:e.CNR,r:0},e.BNM={cN:"number",b:e.BNR,r:0},e.CSSNM={cN:"number",b:e.NR+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",r:0},e.RM={cN:"regexp",b:/\//,e:/\/[gimuy]*/,i:/\n/,c:[e.BE,{b:/\[/,e:/\]/,r:0,c:[e.BE]}]},e.TM={cN:"title",b:e.IR,r:0},e.UTM={cN:"title",b:e.UIR,r:0},e.METHOD_GUARD={b:"\\.\\s*"+e.UIR,r:0},e});hljs.registerLanguage("nix",function(e){var r={keyword:"rec with let in inherit assert if else then",literal:"true false or and null",built_in:"import abort baseNameOf dirOf isNull builtins map removeAttrs throw toString derivation"},t={cN:"subst",b:/\$\{/,e:/}/,k:r},i={b:/[a-zA-Z0-9-_]+(\s*=)/,rB:!0,r:0,c:[{cN:"attr",b:/\S+/}]},s={cN:"string",c:[t],v:[{b:"''",e:"''"},{b:'"',e:'"'}]},a=[e.NM,e.HCM,e.CBCM,s,i];return t.c=a,{aliases:["nixos"],k:r,c:a}});hljs.registerLanguage("bash",function(e){var t={cN:"variable",v:[{b:/\$[\w\d#@][\w\d_]*/},{b:/\$\{(.*?)}/}]},s={cN:"string",b:/"/,e:/"/,c:[e.BE,t,{cN:"variable",b:/\$\(/,e:/\)/,c:[e.BE]}]},a={cN:"string",b:/'/,e:/'/};return{aliases:["sh","zsh"],l:/\b-?[a-z\._]+\b/,k:{keyword:"if then else elif fi for while in do done case esac function",literal:"true false",built_in:"break cd continue eval exec exit export getopts hash pwd readonly return shift test times trap umask unset alias bind builtin caller command declare echo enable help let local logout mapfile printf read readarray source type typeset ulimit unalias set shopt autoload bg bindkey bye cap chdir clone comparguments compcall compctl compdescribe compfiles compgroups compquote comptags comptry compvalues dirs disable disown echotc echoti emulate fc fg float functions getcap getln history integer jobs kill limit log noglob popd print pushd pushln rehash sched setcap setopt stat suspend ttyctl unfunction unhash unlimit unsetopt vared wait whence where which zcompile zformat zftp zle zmodload zparseopts zprof zpty zregexparse zsocket zstyle ztcp",_:"-ne -eq -lt -gt -f -d -e -s -l -a"},c:[{cN:"meta",b:/^#![^\n]+sh\s*$/,r:10},{cN:"function",b:/\w[\w\d_]*\s*\(\s*\)\s*\{/,rB:!0,c:[e.inherit(e.TM,{b:/\w[\w\d_]*/})],r:0},e.HCM,s,a,t]}});
\ No newline at end of file
diff --git a/nixpkgs/pkgs/misc/documentation-highlighter/loader.js b/nixpkgs/pkgs/misc/documentation-highlighter/loader.js
new file mode 100644
index 000000000000..4ad7dbf24b51
--- /dev/null
+++ b/nixpkgs/pkgs/misc/documentation-highlighter/loader.js
@@ -0,0 +1,7 @@
+/* This file is NOT part of highlight.js */
+document.onreadystatechange = function () {
+    var listings = document.querySelectorAll('.programlisting, .screen');
+    for (i = 0; i < listings.length; ++i) {
+        hljs.highlightBlock(listings[i]);
+    }
+}
diff --git a/nixpkgs/pkgs/misc/documentation-highlighter/mono-blue.css b/nixpkgs/pkgs/misc/documentation-highlighter/mono-blue.css
new file mode 100644
index 000000000000..884c97c7673f
--- /dev/null
+++ b/nixpkgs/pkgs/misc/documentation-highlighter/mono-blue.css
@@ -0,0 +1,59 @@
+/*
+  Five-color theme from a single blue hue.
+*/
+.hljs {
+  display: block;
+  overflow-x: auto;
+  padding: 0.5em;
+  background: #eaeef3;
+}
+
+.hljs {
+  color: #00193a;
+}
+
+.hljs-keyword,
+.hljs-selector-tag,
+.hljs-title,
+.hljs-section,
+.hljs-doctag,
+.hljs-name,
+.hljs-strong {
+  font-weight: bold;
+}
+
+.hljs-comment {
+  color: #738191;
+}
+
+.hljs-string,
+.hljs-title,
+.hljs-section,
+.hljs-built_in,
+.hljs-literal,
+.hljs-type,
+.hljs-addition,
+.hljs-tag,
+.hljs-quote,
+.hljs-name,
+.hljs-selector-id,
+.hljs-selector-class {
+  color: #0048ab;
+}
+
+.hljs-meta,
+.hljs-subst,
+.hljs-symbol,
+.hljs-regexp,
+.hljs-attribute,
+.hljs-deletion,
+.hljs-variable,
+.hljs-template-variable,
+.hljs-link,
+.hljs-bullet {
+  color: #4c81c9;
+}
+
+.hljs-emphasis {
+  font-style: italic;
+}
diff --git a/nixpkgs/pkgs/misc/documentation-highlighter/update.sh b/nixpkgs/pkgs/misc/documentation-highlighter/update.sh
new file mode 100755
index 000000000000..3b77af4af416
--- /dev/null
+++ b/nixpkgs/pkgs/misc/documentation-highlighter/update.sh
@@ -0,0 +1,42 @@
+#!/usr/bin/env nix-shell
+#!nix-shell -i bash -p curl -p unzip
+
+set -eu
+set -o pipefail
+
+root=$(pwd)
+
+if [ ! -f "./update.sh" ]; then
+    echo "Please run this script from within pkgs/misc/documentation-highlighter/!"
+    exit 1
+fi
+
+scratch=$(mktemp -d -t tmp.XXXXXXXXXX)
+function finish {
+  rm -rf "$scratch"
+}
+trap finish EXIT
+
+
+mkdir $scratch/src
+cd $scratch/src
+
+token=$(curl https://highlightjs.org/download/ -c "$scratch/jar" \
+    | grep csrf \
+    | cut -d"'" -f6)
+
+curl --header "Referer: https://highlightjs.org/download/"\
+    -b "$scratch/jar" \
+    --data "csrfmiddlewaretoken=$token&nix.js=on&bash.js=on" \
+    https://highlightjs.org/download/ > $scratch/out.zip
+
+unzip "$scratch/out.zip"
+out="$root/"
+mkdir -p "$out"
+cp ./{highlight.pack.js,LICENSE,styles/mono-blue.css} "$out"
+
+(
+    echo "This file was generated with pkgs/misc/documentation-highlighter/update.sh"
+    echo ""
+    cat README.md
+) > "$out/README.md"
diff --git a/nixpkgs/pkgs/misc/doge/default.nix b/nixpkgs/pkgs/misc/doge/default.nix
new file mode 100644
index 000000000000..911917e6d2fa
--- /dev/null
+++ b/nixpkgs/pkgs/misc/doge/default.nix
@@ -0,0 +1,18 @@
+{ lib, python3Packages }:
+
+python3Packages.buildPythonPackage rec {
+  pname = "doge";
+  version = "3.5.0";
+
+  src = python3Packages.fetchPypi {
+    inherit pname version;
+    sha256 = "0lwdl06lbpnaqqjk8ap9dsags3bzma30z17v0zc7spng1gz8m6xj";
+  };
+
+  meta = with lib; {
+    homepage = "https://github.com/thiderman/doge";
+    description = "wow very terminal doge";
+    license = licenses.mit;
+    maintainers = with maintainers; [ Gonzih ];
+  };
+}
diff --git a/nixpkgs/pkgs/misc/drivers/dell-530cdn/default.nix b/nixpkgs/pkgs/misc/drivers/dell-530cdn/default.nix
new file mode 100644
index 000000000000..9cabd8fa3396
--- /dev/null
+++ b/nixpkgs/pkgs/misc/drivers/dell-530cdn/default.nix
@@ -0,0 +1,13 @@
+{ runCommand, fetchurl, rpm, cpio }: let
+  version = "1.3-1";
+
+  src = fetchurl {
+    url = "http://downloads.dell.com/printer/Dell-5130cdn-Color-Laser-${version}.noarch.rpm";
+    sha256 = "0pj32sj6jcdnpa5v75af0hnvx4z0ky0m1k2522cfdx4cb1r2lna9";
+  };
+in runCommand "Dell-5130cdn-Color-Laser-1.3-1" {} ''
+  mkdir -p usr/share/cups/model
+  ${rpm}/bin/rpm2cpio ${src} | ${cpio}/bin/cpio -i
+  mkdir -p $out/share/ppd
+  mv usr/share/cups/model/Dell $out/share/ppd
+''
diff --git a/nixpkgs/pkgs/misc/drivers/epkowa/default.nix b/nixpkgs/pkgs/misc/drivers/epkowa/default.nix
new file mode 100644
index 000000000000..29ebfa173296
--- /dev/null
+++ b/nixpkgs/pkgs/misc/drivers/epkowa/default.nix
@@ -0,0 +1,384 @@
+{ lib, stdenv
+, fetchurl
+, fetchpatch
+, makeWrapper
+, symlinkJoin
+, pkg-config
+, libtool
+, gtk2
+, libxml2
+, libxslt
+, libusb-compat-0_1
+, sane-backends
+, rpm
+, cpio
+, getopt
+, autoPatchelfHook
+, gcc
+}:
+let common_meta = {
+  homepage = "http://download.ebz.epson.net/dsc/search/01/search/?OSC=LX";
+  license = with lib.licenses; epson;
+  platforms = with lib.platforms; linux;
+};
+in
+############################
+#
+#  PLUGINS
+#
+############################
+
+# adding a plugin for another printer shouldn't be too difficult, but you need the firmware to test...
+let plugins = {
+  v330 = stdenv.mkDerivation rec {
+    name = "iscan-v330-bundle";
+    version = "2.30.4";
+
+    src = fetchurl {
+      # To find new versions, visit
+      # http://download.ebz.epson.net/dsc/search/01/search/?OSC=LX and search for
+      # some printer like for instance "WF-7210" to get to the most recent
+      # version.
+      # NOTE: Don't forget to update the webarchive link too!
+      urls = [
+        "https://download2.ebz.epson.net/iscan/plugin/perfection-v330/rpm/x64/iscan-perfection-v330-bundle-${version}.x64.rpm.tar.gz"
+        "https://web.archive.org/web/https://download2.ebz.epson.net/iscan/plugin/perfection-v330/rpm/x64/iscan-perfection-v330-bundle-${version}.x64.rpm.tar.gz"
+      ];
+      sha256 = "056c04pfsf98nnknphg28l489isqb6y4l2c8g7wqhclwgj7m338i";
+    };
+
+    nativeBuildInputs = [ autoPatchelfHook rpm ];
+
+    installPhase = ''
+      ${rpm}/bin/rpm2cpio plugins/esci-interpreter-perfection-v330-*.x86_64.rpm | ${cpio}/bin/cpio -idmv
+      mkdir $out{,/share,/lib}
+      cp -r ./usr/share/{iscan-data,esci}/ $out/share/
+      cp -r ./usr/lib64/esci $out/lib
+    '';
+
+    passthru = {
+      registrationCommand = ''
+        $registry --add interpreter usb 0x04b8 0x0142 "$plugin/lib/esci/libesci-interpreter-perfection-v330 $plugin/share/esci/esfwad.bin"
+      '';
+      hw = "Perfection V330 Photo";
+    };
+    meta = common_meta // { description = "Plugin to support " + passthru.hw + " scanner in sane"; };
+  };
+  v370 = stdenv.mkDerivation rec {
+    name = "iscan-v370-bundle";
+    version = "2.30.4";
+
+    src = fetchurl {
+      urls = [
+        "https://download2.ebz.epson.net/iscan/plugin/perfection-v370/rpm/x64/iscan-perfection-v370-bundle-${version}.x64.rpm.tar.gz"
+        "https://web.archive.org/web/https://download2.ebz.epson.net/iscan/plugin/perfection-v370/rpm/x64/iscan-perfection-v370-bundle-${version}.x64.rpm.tar.gz"
+      ];
+      sha256 = "1ff7adp9mha1i2ibllz540xkagpy8r757h4s3h60bgxbyzv2yggr";
+    };
+
+    nativeBuildInputs = [ autoPatchelfHook rpm ];
+
+    installPhase = ''
+      cd plugins
+      ${rpm}/bin/rpm2cpio iscan-plugin-perfection-v370-*.x86_64.rpm | ${cpio}/bin/cpio -idmv
+
+
+      mkdir -p $out/share $out/lib
+      cp -r usr/share/{iscan-data,iscan}/ $out/share
+      cp -r usr/lib64/iscan $out/lib
+      mv $out/share/iscan $out/share/esci
+      mv $out/lib/iscan $out/lib/esci
+    '';
+
+    passthru = {
+      registrationCommand = ''
+        $registry --add interpreter usb 0x04b8 0x014a "$plugin/lib/esci/libiscan-plugin-perfection-v370 $plugin/share/esci/esfwdd.bin"
+      '';
+      hw = "Perfection V37/V370";
+    };
+    meta = common_meta // { description = "Plugin to support " + passthru.hw + " scanner in sane"; };
+  };
+  v600 = stdenv.mkDerivation rec {
+    pname = "iscan-gt-x820-bundle";
+    version = "2.30.4";
+
+    nativeBuildInputs = [ autoPatchelfHook rpm ];
+    src = fetchurl {
+      urls = [
+        "https://download2.ebz.epson.net/iscan/plugin/gt-x820/rpm/x64/iscan-gt-x820-bundle-${version}.x64.rpm.tar.gz"
+        "https://web.archive.org/web/https://download2.ebz.epson.net/iscan/plugin/gt-x820/rpm/x64/iscan-gt-x820-bundle-${version}.x64.rpm.tar.gz"
+      ];
+      sha256 = "1vlba7dsgpk35nn3n7is8nwds3yzlk38q43mppjzwsz2d2n7sr33";
+    };
+    installPhase = ''
+      cd plugins
+      ${rpm}/bin/rpm2cpio iscan-plugin-gt-x820-*.x86_64.rpm | ${cpio}/bin/cpio -idmv
+      mkdir $out
+      cp -r usr/share $out
+      cp -r usr/lib64 $out/lib
+      mv $out/share/iscan $out/share/esci
+      mv $out/lib/iscan $out/lib/esci
+    '';
+    passthru = {
+      registrationCommand = ''
+        $registry --add interpreter usb 0x04b8 0x013a "$plugin/lib/esci/libesintA1 $plugin/share/esci/esfwA1.bin"
+      '';
+      hw = "Perfection V600 Photo";
+    };
+    meta = common_meta // { description = "iscan esci x820 plugin for " + passthru.hw; };
+  };
+  x770 = stdenv.mkDerivation rec {
+    pname = "iscan-gt-x770-bundle";
+    version = "2.30.4";
+
+    nativeBuildInputs = [ autoPatchelfHook rpm ];
+    src = fetchurl {
+      urls = [
+        "https://download2.ebz.epson.net/iscan/plugin/gt-x770/rpm/x64/iscan-gt-x770-bundle-${version}.x64.rpm.tar.gz"
+        "https://web.archive.org/web/https://download2.ebz.epson.net/iscan/plugin/gt-x770/rpm/x64/iscan-gt-x770-bundle-${version}.x64.rpm.tar.gz"
+      ];
+      sha256 = "1chxdm6smv2d14pn2jl9xyd0vr42diy7vpskd3b9a61gf5h3gj03";
+    };
+    installPhase = ''
+      cd plugins
+      ${rpm}/bin/rpm2cpio iscan-plugin-gt-x770-*.x86_64.rpm | ${cpio}/bin/cpio -idmv
+      mkdir $out
+      cp -r usr/share $out
+      cp -r usr/lib64 $out/lib
+      mv $out/share/iscan $out/share/esci
+      mv $out/lib/iscan $out/lib/esci
+    '';
+    passthru = {
+      registrationCommand = ''
+        $registry --add interpreter usb 0x04b8 0x0130 "$plugin/lib/esci/libesint7C $plugin/share/esci/esfw7C.bin"
+      '';
+      hw = "Perfection V500 Photo";
+    };
+    meta = common_meta // { description = "iscan esci x770 plugin for " + passthru.hw; };
+  };
+  f720 = stdenv.mkDerivation rec {
+    pname = "iscan-gt-f720-bundle";
+    version = "2.30.4";
+
+    nativeBuildInputs = [ autoPatchelfHook ];
+    buildInputs = [ gcc.cc.lib ];
+    src = fetchurl {
+      urls = [
+        "https://download2.ebz.epson.net/iscan/plugin/gt-f720/rpm/x64/iscan-gt-f720-bundle-${version}.x64.rpm.tar.gz"
+        "https://web.archive.org/web/https://download2.ebz.epson.net/iscan/plugin/gt-f720/rpm/x64/iscan-gt-f720-bundle-${version}.x64.rpm.tar.gz"
+      ];
+      sha256 = "1xnbmb2rn610kqpg1x6k1cc13zlmx2f3l2xnj6809rnhg96qqn20";
+    };
+    installPhase = ''
+      cd plugins
+      ${rpm}/bin/rpm2cpio esci-interpreter-gt-f720-*.x86_64.rpm | ${cpio}/bin/cpio -idmv
+      mkdir $out
+      cp -r usr/share $out
+      cp -r usr/lib64 $out/lib
+    '';
+
+    passthru = {
+      registrationCommand = ''
+        $registry --add interpreter usb 0x04b8 0x0131 "$plugin/lib/esci/libesci-interpreter-gt-f720 $plugin/share/esci/esfw8b.bin"
+      '';
+      hw = "GT-F720, GT-S620, Perfection V30, Perfection V300 Photo";
+    };
+
+    meta = common_meta // { description = "iscan esci f720 plugin for " + passthru.hw; };
+  };
+  s80 = stdenv.mkDerivation rec {
+    pname = "iscan-gt-s80-bundle";
+    version = "2.30.4";
+
+    nativeBuildInputs = [ autoPatchelfHook ];
+    buildInputs = [ gcc.cc.lib libtool ];
+    src = fetchurl {
+      urls = [
+        "https://download2.ebz.epson.net/iscan/plugin/gt-s80/rpm/x64/iscan-gt-s80-bundle-${version}.x64.rpm.tar.gz"
+        "https://web.archive.org/web/https://download2.ebz.epson.net/iscan/plugin/gt-s80/rpm/x64/iscan-gt-s80-bundle-${version}.x64.rpm.tar.gz"
+      ];
+      sha256 = "00qfdgs03k7bbs67zjrk8hbxvlyinsmk890amp9cmpfjfzdxgg58";
+    };
+    installPhase = ''
+      cd plugins
+      ${rpm}/bin/rpm2cpio esci-interpreter-gt-s80-*.x86_64.rpm | ${cpio}/bin/cpio -idmv
+      ${rpm}/bin/rpm2cpio iscan-plugin-esdip-*.x86_64.rpm | ${cpio}/bin/cpio -idmv
+      mkdir $out
+      cp -r usr/share $out
+      cp -r usr/lib64 $out/lib
+      mkdir $out/share/esci
+    '';
+
+    passthru = {
+      registrationCommand = ''
+        $registry --add interpreter usb 0x04b8 0x0136 "$plugin/lib/esci/libesci-interpreter-gt-s80.so"
+        $registry --add interpreter usb 0x04b8 0x0137 "$plugin/lib/esci/libesci-interpreter-gt-s50.so"
+        $registry --add interpreter usb 0x04b8 0x0143 "$plugin/lib/esci/libesci-interpreter-gt-s50.so"
+        $registry --add interpreter usb 0x04b8 0x0144 "$plugin/lib/esci/libesci-interpreter-gt-s80.so"
+      '';
+      hw = "ES-D200, ED-D350, ES-D400, GT-S50, GT-S55, GT-S80, GT-S85";
+    };
+
+    meta = common_meta // { description = "iscan esci s80 plugin for " + passthru.hw; };
+  };
+  s650 = stdenv.mkDerivation rec {
+    name = "iscan-gt-s650-bundle";
+    version = "2.30.4";
+
+    src = fetchurl {
+      urls = [
+        "https://download2.ebz.epson.net/iscan/plugin/gt-s650/rpm/x64/iscan-gt-s650-bundle-${version}.x64.rpm.tar.gz"
+        "https://web.archive.org/web/https://download2.ebz.epson.net/iscan/plugin/gt-s650/rpm/x64/iscan-gt-s650-bundle-${version}.x64.rpm.tar.gz"
+      ];
+      sha256 = "0fn4lz4g0a8l301v6yv7fwl37wgwhz5y90nf681f655xxc91hqh7";
+    };
+
+    nativeBuildInputs = [ autoPatchelfHook rpm ];
+
+    installPhase = ''
+      cd plugins
+      ${rpm}/bin/rpm2cpio iscan-plugin-gt-s650-*.x86_64.rpm | ${cpio}/bin/cpio -idmv
+      mkdir $out
+      cp -r usr/share $out
+      cp -r usr/lib64 $out/lib
+      mv $out/share/iscan $out/share/esci
+      mv $out/lib/iscan $out/lib/esci
+    '';
+
+    passthru = {
+      registrationCommand = ''
+        $registry --add interpreter usb 0x04b8 0x013c "$plugin/lib/esci/libiscan-plugin-gt-s650 $plugin/share/esci/esfw010c.bin"
+        $registry --add interpreter usb 0x04b8 0x013d "$plugin/lib/esci/libiscan-plugin-gt-s650 $plugin/share/esci/esfw010c.bin"
+      '';
+      hw = "GT-S650, Perfection V19, Perfection V39";
+    };
+    meta = common_meta // { description = "iscan GT-S650 for " + passthru.hw; };
+  };
+  network = stdenv.mkDerivation rec {
+    pname = "iscan-nt-bundle";
+    # for the version, look for the driver of XP-750 in the search page
+    version = "2.30.4";
+
+    buildInputs = [ stdenv.cc.cc.lib ];
+    nativeBuildInputs = [ autoPatchelfHook ];
+
+    src = fetchurl {
+      urls = [
+        "https://download2.ebz.epson.net/iscan/general/rpm/x64/iscan-bundle-${version}.x64.rpm.tar.gz"
+        "https://web.archive.org/web/https://download2.ebz.epson.net/iscan/general/rpm/x64/iscan-bundle-${version}.x64.rpm.tar.gz"
+      ];
+      sha256 = "0jssigsgkxb9i7qa7db291a1gbvwl795i4ahvb7bnqp33czkj85k";
+    };
+    installPhase = ''
+      cd plugins
+      ${rpm}/bin/rpm2cpio iscan-network-nt-*.x86_64.rpm | ${cpio}/bin/cpio -idmv
+
+      mkdir $out
+      cp -r usr/share $out
+      cp -r usr/lib64 $out/lib
+      mkdir $out/share/esci
+    '';
+    passthru = {
+      registrationCommand = "";
+      hw = "network";
+    };
+
+    meta = common_meta // { description = "iscan network plugin"; };
+  };
+};
+in
+let fwdir = symlinkJoin {
+  name = "esci-firmware-dir";
+  paths = lib.mapAttrsToList (name: value: value + /share/esci) plugins;
+};
+in
+let iscan-data = stdenv.mkDerivation rec {
+  pname = "iscan-data";
+  version = "1.39.2-1";
+
+  src = fetchurl {
+    urls = [
+      "http://support.epson.net/linux/src/scanner/iscan/iscan-data_${version}.tar.gz"
+      "https://web.archive.org/web/http://support.epson.net/linux/src/scanner/iscan/iscan-data_${version}.tar.gz"
+    ];
+    sha256 = "092qhlnjjgz11ifx6mng7mz20i44gc0nlccrbmw18xr5hipbqqka";
+  };
+
+  buildInputs = [
+    libxslt
+  ];
+
+  meta = common_meta;
+};
+in
+stdenv.mkDerivation rec {
+  pname = "iscan";
+  version = "2.30.4-2";
+
+  src = fetchurl {
+    urls = [
+      "http://support.epson.net/linux/src/scanner/iscan/iscan_${version}.tar.gz"
+      "https://web.archive.org/web/http://support.epson.net/linux/src/scanner/iscan/iscan_${version}.tar.gz"
+    ];
+    sha256 = "1ma76jj0k3bz0fy06fiyl4di4y77rcryb0mwjmzs5ms2vq9rjysr";
+  };
+
+  nativeBuildInputs = [ pkg-config libtool makeWrapper ];
+  buildInputs = [
+    gtk2
+    libxml2
+    libusb-compat-0_1
+    sane-backends
+  ];
+
+  patches = [
+    # Patch for compatibility with libpng versions greater than 10499
+    (fetchpatch {
+      urls = [
+        "https://gitweb.gentoo.org/repo/gentoo.git/plain/media-gfx/iscan/files/iscan-2.28.1.3+libpng-1.5.patch?h=b6e4c805d53b49da79a0f64ef16bb82d6d800fcf"
+        "https://web.archive.org/web/https://gitweb.gentoo.org/repo/gentoo.git/plain/media-gfx/iscan/files/iscan-2.28.1.3+libpng-1.5.patch?h=b6e4c805d53b49da79a0f64ef16bb82d6d800fcf"
+      ];
+      sha256 = "04y70qjd220dpyh771fiq50lha16pms98mfigwjczdfmx6kpj1jd";
+    })
+    # Patch iscan to search appropriate folders for firmware files
+    ./firmware_location.patch
+    # Patch deprecated use of sscanf code to use a more modern C99 compatible version
+    ./sscanf.patch
+  ];
+  patchFlags = [ "-p0" ];
+
+  configureFlags = [ "--enable-dependency-reduction" "--disable-frontend" ];
+
+  postConfigure = ''
+    echo '#define NIX_ESCI_PREFIX "'${fwdir}'"' >> config.h
+  '';
+
+  postInstall = ''
+    mkdir -p $out/etc/sane.d
+    cp backend/epkowa.conf $out/etc/sane.d
+    echo "epkowa" > $out/etc/sane.d/dll.conf
+    ln -s ${iscan-data}/share/iscan-data $out/share/iscan-data
+    mkdir -p $out/lib/iscan
+    ln -s ${plugins.network}/lib/iscan/network $out/lib/iscan/network
+  '';
+  postFixup = ''
+    # iscan-registry is a shell script requiring getopt
+    wrapProgram $out/bin/iscan-registry --prefix PATH : ${getopt}/bin
+    registry=$out/bin/iscan-registry;
+  '' +
+  lib.concatStrings (lib.mapAttrsToList
+    (name: value: ''
+      plugin=${value};
+      ${value.passthru.registrationCommand}
+    '')
+    plugins);
+  meta = common_meta // {
+    description = "sane-epkowa backend for some epson scanners";
+    longDescription = ''
+      Includes gui-less iscan (aka. Image Scan! for Linux).
+      Supported hardware: at least :
+    '' +
+    lib.concatStringsSep ", " (lib.mapAttrsToList (name: value: value.passthru.hw) plugins);
+    maintainers = with lib.maintainers; [ symphorien dominikh ];
+  };
+}
diff --git a/nixpkgs/pkgs/misc/drivers/epkowa/firmware_location.patch b/nixpkgs/pkgs/misc/drivers/epkowa/firmware_location.patch
new file mode 100644
index 000000000000..0f723a4ff9d7
--- /dev/null
+++ b/nixpkgs/pkgs/misc/drivers/epkowa/firmware_location.patch
@@ -0,0 +1,21 @@
+Explanation:
+in libesci-interpreter-gt-f720.so in
+libesci_interpreter_gt_f720_342::libesci_interpreter_gt_f720_348 at 0xdf74: the
+binary blob esfw8b.bin is searched either in /usr/share/esci/ or in
+$ESCI_FIRMWARE_DIR. But since this library is to be used wia libsane.so in
+every binary in the system, we can't wrapProgram the relevant executables to
+set this environment variable. Instead, we patch iscan to set this variable
+before loading libesci-interpreter-gt-f720.so.
+--- backend/channel-usb.c.orig	2017-08-14 11:24:27.669582456 +0200
++++ backend/channel-usb.c	2017-08-14 11:31:40.509010897 +0200
+@@ -169,6 +169,10 @@
+ {
+   SANE_Status s;
+ 
++  setenv("ESCI_FIRMWARE_DIR", NIX_ESCI_PREFIX, 1);
++  setenv("ISCAN_FW_DIR", NIX_ESCI_PREFIX, 1);
++  setenv("ISCAN_FIRMWARE_DIR", NIX_ESCI_PREFIX, 1);
++
+   s = sanei_usb_open (self->name, &self->fd);
+ 
+   if (SANE_STATUS_GOOD == s)
diff --git a/nixpkgs/pkgs/misc/drivers/epkowa/sscanf.patch b/nixpkgs/pkgs/misc/drivers/epkowa/sscanf.patch
new file mode 100644
index 000000000000..7bee9cae5180
--- /dev/null
+++ b/nixpkgs/pkgs/misc/drivers/epkowa/sscanf.patch
@@ -0,0 +1,29 @@
+The "%as" verb requests sscanf to allocate a buffer for us. However,
+this use of 'a' has been long deprecated, and gcc doesn't support it
+in this manner when using -std=c99. The modern replacement is "%ms".
+
+Without this change, iscan couldn't read the interpreter file, in turn
+breaking all scanners that require plugins.
+--- backend/cfg-obj.c.orig	2020-03-19 01:27:17.254762077 +0100
++++ backend/cfg-obj.c	2020-03-19 02:01:52.293329873 +0100
+@@ -1026,7 +1026,7 @@
+       char *vendor = NULL;
+       char *model  = NULL;
+ 
+-      sscanf (string, "%*s %as %as", &vendor, &model);
++      sscanf (string, "%*s %ms %ms", &vendor, &model);
+ 
+       if (list_append (_cfg->seen[CFG_KEY_SCSI], info))
+         {
+@@ -1108,10 +1112,10 @@
+       char *library  = NULL;
+       char *firmware = NULL;
+ 
+-      sscanf (string, "%*s %*s %x %x %as %as",
++      sscanf (string, "%*s %*s %x %x %ms %ms",
+               &vendor, &product, &library, &firmware);
+ 
+       if (library && _cfg_have_interpreter (library, firmware)
+           && list_append (_cfg->seen[CFG_KEY_INTERPRETER], info))
+         {
+ 
diff --git a/nixpkgs/pkgs/misc/drivers/epson-201106w/default.nix b/nixpkgs/pkgs/misc/drivers/epson-201106w/default.nix
new file mode 100644
index 000000000000..a5a32644c3a5
--- /dev/null
+++ b/nixpkgs/pkgs/misc/drivers/epson-201106w/default.nix
@@ -0,0 +1,77 @@
+{ lib, stdenv, fetchurl, rpmextract, autoreconfHook, file, libjpeg, cups }:
+
+let
+  version = "1.0.1";
+  filterVersion = "1.0.0";
+in
+  stdenv.mkDerivation {
+
+    pname = "epson-201106w";
+    inherit version;
+
+    src = fetchurl {
+      # NOTE: Don't forget to update the webarchive link too!
+      urls = [
+        "https://download.ebz.epson.net/dsc/op/stable/SRPMS/epson-inkjet-printer-201106w-${version}-1lsb3.2.src.rpm"
+        "https://web.archive.org/web/https://download.ebz.epson.net/dsc/op/stable/SRPMS/epson-inkjet-printer-201106w-${version}-1lsb3.2.src.rpm"
+      ];
+
+      sha256 = "1yig1xrh1ikblbp7sx706n5nnc237wy4mbch23ymy6akbgqg4aig";
+    };
+
+    nativeBuildInputs = [ rpmextract autoreconfHook file ];
+
+    buildInputs = [ libjpeg cups ];
+
+    unpackPhase = ''
+      rpmextract $src
+      tar -zxf epson-inkjet-printer-201106w-${version}.tar.gz
+      tar -zxf epson-inkjet-printer-filter-${filterVersion}.tar.gz
+      for ppd in epson-inkjet-printer-201106w-${version}/ppds/*; do
+        substituteInPlace $ppd --replace "/opt/epson-inkjet-printer-201106w" "$out"
+        substituteInPlace $ppd --replace "/cups/lib" "/lib/cups"
+      done
+      cd epson-inkjet-printer-filter-${filterVersion}
+    '';
+
+    preConfigure = ''
+      chmod +x configure
+      export LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
+    '';
+
+    postInstall = ''
+      cd ../epson-inkjet-printer-201106w-${version}
+      cp -a lib64 resource watermark $out
+      mkdir -p $out/share/cups/model/epson-inkjet-printer-201106w
+      cp -a ppds $out/share/cups/model/epson-inkjet-printer-201106w/
+      cp -a Manual.txt $out/doc/
+      cp -a README $out/doc/README.driver
+    '';
+
+    meta = with lib; {
+      homepage = "https://www.openprinting.org/driver/epson-201106w";
+      description = "Epson printer driver (BX535WD, BX630FW, BX635FWD, ME940FW, NX530, NX635, NX635, SX535WD, WorkForce 545, WorkForce 645";
+      longDescription = ''
+        This software is a filter program used with the Common UNIX Printing
+        System (CUPS) under Linux. It supplies high quality printing with
+        Seiko Epson Color Ink Jet Printers.
+        List of printers supported by this package:
+          Epson BX535WD Series
+          Epson BX630FW Series
+          Epson BX635FWD Series
+          Epson ME940FW Series
+          Epson NX530 Series
+          Epson SX535WD Series
+          Epson WorkForce 545 Series
+          Epson WorkForce 645 Series
+        To use the driver adjust your configuration.nix file:
+          services.printing = {
+            enable = true;
+            drivers = [ pkgs.epson-201106w ];
+          };
+      '';
+      license = with licenses; [ lgpl21 epson ];
+      platforms = platforms.linux;
+      maintainers = [ maintainers.nphilou ];
+    };
+  }
diff --git a/nixpkgs/pkgs/misc/drivers/epson-alc1100/cups-data-dir.patch b/nixpkgs/pkgs/misc/drivers/epson-alc1100/cups-data-dir.patch
new file mode 100644
index 000000000000..2277a9afcccf
--- /dev/null
+++ b/nixpkgs/pkgs/misc/drivers/epson-alc1100/cups-data-dir.patch
@@ -0,0 +1,13 @@
+diff --git a/configure b/configure
+index 0053441..9a6b855 100755
+--- a/configure
++++ b/configure
+@@ -2833,7 +2833,7 @@ if test $have_cups_config = yes; then
+    CUPS_LIBS=`cups-config --libs`
+    CUPS_IMAGE_LIBS=`cups-config --image --libs`
+    CUPS_SERVER_DIR=`cups-config --serverbin`
+-   CUPS_DATA_DIR=`cups-config --datadir`
++   CUPS_DATA_DIR="${prefix}/share/cups"
+ else
+    { { echo "$as_me:$LINENO: error: *** 'cups-config' missing, please install CUPS or fix your \$PATH ***" >&5
+ echo "$as_me: error: *** 'cups-config' missing, please install CUPS or fix your \$PATH ***" >&2;}
diff --git a/nixpkgs/pkgs/misc/drivers/epson-alc1100/default.nix b/nixpkgs/pkgs/misc/drivers/epson-alc1100/default.nix
new file mode 100644
index 000000000000..2a0fd92867ee
--- /dev/null
+++ b/nixpkgs/pkgs/misc/drivers/epson-alc1100/default.nix
@@ -0,0 +1,71 @@
+{ lib, stdenv, fetchurl, cups, pkgsi686Linux, dpkg, psutils, makeWrapper, ghostscript, bash }:
+
+let
+  version = "1.2-0";
+
+  libstdcpp5 = fetchurl {
+    url = "http://old-releases.ubuntu.com/ubuntu/pool/universe/g/gcc-3.3/libstdc++5_3.3.6-17ubuntu1_i386.deb";
+    sha256 = "10f8zcmqaa7skvg2bz94mnlgqpan4iscvi8913r6iawjh7hiisjy";
+  };
+in
+  stdenv.mkDerivation {
+    pname = "epson-alc1100";
+    inherit version;
+
+    src = fetchurl {
+      url = "http://a1227.g.akamai.net/f/1227/40484/7d/download.ebz.epson.net/dsc/f/01/00/01/58/65/cd71929d2bf41ebf7e96f68fa9f1279556545ef1/Epson-ALC1100-filter-1.2.tar.gz";
+      sha256 = "0q0bf4dfm4v69l7xg6sgkh7rwb0h77i8j9kplq1dfkd208g7y81p";
+    };
+
+    patches = [ ./cups-data-dir.patch ./ppd.patch ];
+
+    nativeBuildInputs = [ dpkg makeWrapper ];
+
+    buildInputs = [ cups pkgsi686Linux.glibc psutils ghostscript bash ];
+
+    postUnpack = ''
+      dpkg -x ${libstdcpp5} libstdcpp5_i386;
+
+      mkdir -p $out/lib;
+
+      mv libstdcpp5_i386/usr/lib/* $out/lib;
+    '';
+
+    postFixup = ''
+      patchelf --set-interpreter ${pkgsi686Linux.glibc}/lib/ld-linux.so.2 \
+        --set-rpath "${lib.makeLibraryPath [
+          pkgsi686Linux.glibc
+          "$out"
+        ]}" $out/bin/alc1100
+
+      patchelf --set-rpath "${lib.makeLibraryPath [
+          pkgsi686Linux.glibc
+        ]}" $out/lib/libstdc++.so.5.0.7
+
+      wrapProgram $out/bin/alc1100_lprwrapper.sh \
+        --suffix PATH : "\$PATH:${psutils}/bin:/var/lib/cups/path/bin"
+
+      wrapProgram $out/bin/pstoalc1100.sh \
+        --suffix PATH : "\$PATH:${psutils}/bin:${ghostscript}/bin:${bash}/bin:/var/lib/cups/path/bin"
+    '';
+
+    meta = with lib; {
+      homepage = "http://download.ebz.epson.net/dsc/search/01/search/";
+      description = "Epson AcuLaser C1100 Driver";
+      longDescription = ''
+        This package provides a print filter for printing to EPSON AL-C1100
+        printers on Linux systems.
+
+        To use the driver adjust your configuration.nix file:
+          services.printing = {
+            enable = true;
+            drivers = [ pkgs.epson-alc1100 ];
+          };
+      '';
+
+      license = with licenses; [ mit eapl ];
+      maintainers = [ maintainers.eperuffo ];
+      platforms = platforms.linux;
+    };
+
+  }
diff --git a/nixpkgs/pkgs/misc/drivers/epson-alc1100/ppd.patch b/nixpkgs/pkgs/misc/drivers/epson-alc1100/ppd.patch
new file mode 100644
index 000000000000..71d86668f53d
--- /dev/null
+++ b/nixpkgs/pkgs/misc/drivers/epson-alc1100/ppd.patch
@@ -0,0 +1,13 @@
+diff --git a/ppd/Epson-AL-C1100-fm3.ppd b/ppd/Epson-AL-C1100-fm3.ppd
+index 75c7fff..ecd04c8 100644
+--- a/ppd/Epson-AL-C1100-fm3.ppd
++++ b/ppd/Epson-AL-C1100-fm3.ppd
+@@ -68,7 +68,7 @@
+ *%*********** Foomatic Configulations ************
+ *%pprRIP:        foomatic-rip other
+ *FoomaticIDs: Epson-AL-C1100 alc1100
+-*FoomaticRIPCommandLine: "pstoalc1100.sh %C"
++*FoomaticRIPCommandLine: "/var/lib/cups/path/bin/pstoalc1100.sh %C"
+ 
+ *%**************** Paper Handling ******************
+ 
diff --git a/nixpkgs/pkgs/misc/drivers/epson-escpr/cups-filter-ppd-dirs.patch b/nixpkgs/pkgs/misc/drivers/epson-escpr/cups-filter-ppd-dirs.patch
new file mode 100644
index 000000000000..b9f198b14b74
--- /dev/null
+++ b/nixpkgs/pkgs/misc/drivers/epson-escpr/cups-filter-ppd-dirs.patch
@@ -0,0 +1,62 @@
+diff --git a/configure b/configure_new
+index 12b4662..6ec641c 100755
+--- a/configure
++++ b/configure_new
+@@ -12162,55 +12162,8 @@ else
+ $as_echo "no" >&6; }
+ fi
+ 
+-
+-
+-if test "xNONE" != "x${prefix}" ; then
+-   cups_default_prefix="${prefix}"
+-else
+-   cups_default_prefix="${ac_default_prefix}"
+-fi
+-
+-
+-# Check whether --with-cupsfilterdir was given.
+-if test "${with_cupsfilterdir+set}" = set; then :
+-  withval=$with_cupsfilterdir;
+-else
+-  with_cupsfilterdir=no
+-fi
+-
+-if test "xno" = "x${with_cupsfilterdir}"; then
+-   if test "xyes" = "x$have_cups_config" ; then
+-            CUPS_FILTER_DIR="${cups_default_prefix}`cups-config --serverbin | sed -e 's,^/[^/][^/]*,,'`/filter"
+-   else
+-      CUPS_FILTER_DIR="${cups_default_prefix}/lib/cups/filter"
+-   fi
+-else
+-   CUPS_FILTER_DIR="${with_cupsfilterdir}"
+-fi
+-
+-
+-# Check whether --with-cupsppddir was given.
+-if test "${with_cupsppddir+set}" = set; then :
+-  withval=$with_cupsppddir;
+-else
+-  with_cupsppddir=no
+-fi
+-
+-if test "xno" = "x${with_cupsppddir}"; then
+-   if test -d "${cups_default_prefix}/share/ppd" ; then
+-      CUPS_PPD_DIR="${cups_default_prefix}/share/ppd"
+-   elif test "xyes" = "x$have_cups_config" ; then
+-            CUPS_PPD_DIR="${cups_default_prefix}`cups-config --datadir | sed -e 's,^/[^/][^/]*,,'`/model"
+-   else
+-      CUPS_PPD_DIR="${cups_default_prefix}/share/cups/model"
+-   fi
+-else
+-   CUPS_PPD_DIR="${with_cupsppddir}"
+-fi
+-
+-
+-
+-
++CUPS_FILTER_DIR="${prefix}/lib/cups/filter"
++CUPS_PPD_DIR="${prefix}/share/cups/model"
+ 
+ # Check whether --enable-lsb was given.
+ if test "${enable_lsb+set}" = set; then :
diff --git a/nixpkgs/pkgs/misc/drivers/epson-escpr/default.nix b/nixpkgs/pkgs/misc/drivers/epson-escpr/default.nix
new file mode 100644
index 000000000000..bdb2839ab0b3
--- /dev/null
+++ b/nixpkgs/pkgs/misc/drivers/epson-escpr/default.nix
@@ -0,0 +1,49 @@
+{ lib, stdenv, fetchurl, cups }:
+
+stdenv.mkDerivation {
+  pname = "epson-escpr";
+  version = "1.7.3";
+
+  src = fetchurl {
+    # To find new versions, visit
+    # http://download.ebz.epson.net/dsc/search/01/search/?OSC=LX and search for
+    # some printer like for instance "WF-7110" to get to the most recent
+    # version.
+    # NOTE: Don't forget to update the webarchive link too!
+    urls = [
+      "https://download3.ebz.epson.net/dsc/f/03/00/09/83/26/f90d0f70b33a9d7d77a2408364c47fba1ccbf943/epson-inkjet-printer-escpr-1.7.3-1lsb3.2.tar.gz"
+      "https://web.archive.org/web/https://download3.ebz.epson.net/dsc/f/03/00/09/83/26/f90d0f70b33a9d7d77a2408364c47fba1ccbf943/epson-inkjet-printer-escpr-1.7.3-1lsb3.2.tar.gz"
+    ];
+    sha256 = "0r3jkdfk33irha9gpyvhha056ans59p7dq9i153i292ifjsd8458";
+  };
+
+  patches = [ ./cups-filter-ppd-dirs.patch ];
+
+  buildInputs = [ cups ];
+
+  meta = with lib; {
+    homepage = "http://download.ebz.epson.net/dsc/search/01/search/";
+    description = "ESC/P-R Driver (generic driver)";
+    longDescription = ''
+      Epson Inkjet Printer Driver (ESC/P-R) for Linux and the
+      corresponding PPD files. The list of supported printers
+      can be found at http://www.openprinting.org/driver/epson-escpr/ .
+
+      To use the driver adjust your configuration.nix file:
+        services.printing = {
+          enable = true;
+          drivers = [ pkgs.epson-escpr ];
+        };
+
+      To setup a wireless printer, enable Avahi which provides
+      printer's hostname to CUPS and nss-mdns to make this
+      hostname resolvable:
+        services.avahi = {
+          enable = true;
+          nssmdns = true;
+        };'';
+    license = licenses.gpl3Plus;
+    maintainers = with maintainers; [ artuuge ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/misc/drivers/epson-escpr2/cups-filter-ppd-dirs.patch b/nixpkgs/pkgs/misc/drivers/epson-escpr2/cups-filter-ppd-dirs.patch
new file mode 100644
index 000000000000..02897f4f44d9
--- /dev/null
+++ b/nixpkgs/pkgs/misc/drivers/epson-escpr2/cups-filter-ppd-dirs.patch
@@ -0,0 +1,55 @@
+diff --git a/configure.orig b/configure
+index e9d400f..dac1943 100755
+--- a/configure.orig
++++ b/configure
+@@ -12184,48 +12184,8 @@ esac
+ #	*)		ESCPR_LIB_NAME="escpr2_32" ;;
+ #esac
+ 
+-
+-
+-# Check whether --with-cupsfilterdir was given.
+-if test "${with_cupsfilterdir+set}" = set; then :
+-  withval=$with_cupsfilterdir;
+-else
+-  with_cupsfilterdir=no
+-fi
+-
+-if test "xno" = "x${with_cupsfilterdir}"; then
+-   if test "xyes" = "x$have_cups_config" ; then
+-            CUPS_FILTER_DIR="${cups_default_prefix}`cups-config --serverbin | sed -e 's,^/[^/][^/]*,,'`/filter"
+-   else
+-      CUPS_FILTER_DIR="${cups_default_prefix}/lib/cups/filter"
+-   fi
+-else
+-   CUPS_FILTER_DIR="${with_cupsfilterdir}"
+-fi
+-
+-
+-# Check whether --with-cupsppddir was given.
+-if test "${with_cupsppddir+set}" = set; then :
+-  withval=$with_cupsppddir;
+-else
+-  with_cupsppddir=no
+-fi
+-
+-if test "xno" = "x${with_cupsppddir}"; then
+-   if test -d "${cups_default_prefix}/share/ppd" ; then
+-      CUPS_PPD_DIR="${cups_default_prefix}/share/ppd"
+-   elif test "xyes" = "x$have_cups_config" ; then
+-            CUPS_PPD_DIR="${cups_default_prefix}`cups-config --datadir | sed -e 's,^/[^/][^/]*,,'`/model"
+-   else
+-      CUPS_PPD_DIR="${cups_default_prefix}/share/cups/model"
+-   fi
+-else
+-   CUPS_PPD_DIR="${with_cupsppddir}"
+-fi
+-
+-
+-
+-
++CUPS_FILTER_DIR="${prefix}/lib/cups/filter"
++CUPS_PPD_DIR="${prefix}/share/cups/model"
+ 
+ # Check whether --enable-lsb was given.
+ if test "${enable_lsb+set}" = set; then :
diff --git a/nixpkgs/pkgs/misc/drivers/epson-escpr2/default.nix b/nixpkgs/pkgs/misc/drivers/epson-escpr2/default.nix
new file mode 100644
index 000000000000..04cf6c3d96c2
--- /dev/null
+++ b/nixpkgs/pkgs/misc/drivers/epson-escpr2/default.nix
@@ -0,0 +1,44 @@
+{ lib, stdenv, fetchurl, cups, busybox }:
+
+stdenv.mkDerivation rec {
+  pname = "epson-inkjet-printer-escpr2";
+  version = "1.1.25";
+
+  src = fetchurl {
+    # To find new versions, visit
+    # http://download.ebz.epson.net/dsc/search/01/search/?OSC=LX and search for
+    # some printer like for instance "WF-7210" to get to the most recent
+    # version.
+    # NOTE: Don't forget to update the webarchive link too!
+    urls = [
+      "https://download3.ebz.epson.net/dsc/f/03/00/12/46/43/e233a3fefeb49723ba4b0a2f357527e3b45bf53a/epson-inkjet-printer-escpr2-1.1.25-1lsb3.2.src.rpm"
+      "https://web.archive.org/web/20210212220538if_/https://download3.ebz.epson.net/dsc/f/03/00/12/46/43/e233a3fefeb49723ba4b0a2f357527e3b45bf53a/epson-inkjet-printer-escpr2-1.1.25-1lsb3.2.src.rpm"
+    ];
+    sha256 = "sha256-8hgafO/1qOTVdfAdx7FpOOSLqfTl0sBFunuN/2q7KHw=";
+  };
+
+  patches = [ ./cups-filter-ppd-dirs.patch ];
+
+  buildInputs = [ cups busybox ];
+
+  unpackPhase = ''
+    rpm2cpio $src | cpio -idmv
+
+    tar xvf ${pname}-${version}-1lsb3.2.tar.gz
+    cd ${pname}-${version}
+  '';
+
+  meta = with lib; {
+    homepage = "http://download.ebz.epson.net/dsc/search/01/search/";
+    description = "ESC/P-R 2 Driver (generic driver)";
+    longDescription = ''
+      Epson Inkjet Printer Driver 2 (ESC/P-R 2) for Linux and the
+      corresponding PPD files.
+
+      Refer to the description of epson-escpr for usage.
+    '';
+    license = licenses.gpl2;
+    maintainers = with maintainers; [ ma9e ma27 ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/misc/drivers/epson-workforce-635-nx625-series/default.nix b/nixpkgs/pkgs/misc/drivers/epson-workforce-635-nx625-series/default.nix
new file mode 100644
index 000000000000..e06a0c911624
--- /dev/null
+++ b/nixpkgs/pkgs/misc/drivers/epson-workforce-635-nx625-series/default.nix
@@ -0,0 +1,102 @@
+{
+  autoreconfHook, cups, gzip, libjpeg, rpmextract,
+  fetchurl, lib, stdenv
+}:
+
+let
+  srcdirs = {
+    filter = "epson-inkjet-printer-filter-1.0.0";
+    driver = "epson-inkjet-printer-workforce-635-nx625-series-1.0.1";
+  };
+in stdenv.mkDerivation rec {
+  name = "epson-inkjet-printer-workforce-635-nx625-series";
+  version = "1.0.1";
+
+  src = fetchurl {
+    # NOTE: Don't forget to update the webarchive link too!
+    urls = [
+      "https://download.ebz.epson.net/dsc/op/stable/SRPMS/${name}-${version}-1lsb3.2.src.rpm"
+      "https://web.archive.org/web/https://download.ebz.epson.net/dsc/op/stable/SRPMS/${name}-${version}-1lsb3.2.src.rpm"
+    ];
+    sha256 = "19nb2h0y9rvv6rg7j262f8sqap9kjvz8kmisxnjg1w0v19zb9zf2";
+  };
+  sourceRoot = srcdirs.filter;
+
+  nativeBuildInputs = [ autoreconfHook gzip rpmextract ];
+  buildInputs = [ cups libjpeg ];
+
+  unpackPhase = ''
+    rpmextract "$src"
+    for i in ${lib.concatStringsSep " " (builtins.attrValues srcdirs)}; do
+        tar xvf "$i".tar.gz
+    done
+  '';
+
+  preConfigure = ''
+    chmod u+x configure
+  '';
+
+  installPhase =
+    let
+      filterdir = "$out/cups/lib/filter";
+      docdir  = "$out/share/doc";
+      ppddir  = "$out/share/cups/model/${name}";
+      libdir =
+        if stdenv.system == "x86_64-linux"    then "lib64"
+        else if stdenv.system == "i686_linux" then "lib"
+        else throw "other platforms than i686_linux and x86_64-linux are not yet supported";
+    in ''
+      mkdir -p "$out" "${docdir}" "${filterdir}" "${ppddir}"
+      cp src/epson_inkjet_printer_filter "${filterdir}"
+
+      cd ../${srcdirs.driver}
+      for ppd in ppds/*; do
+          substituteInPlace "$ppd" --replace '/opt/${name}' "$out"
+          gzip -c "$ppd" > "${ppddir}/''${ppd#*/}"
+      done
+      cp COPYING.EPSON README "${docdir}"
+      cp -r resource watermark ${libdir} "$out"
+    '';
+
+  meta = {
+    description = "Proprietary CUPS drivers for Epson inkjet printers";
+    longDescription = ''
+      This software is a filter program used with Common UNIX Printing
+      System (CUPS) from the Linux. This can supply the high quality print
+      with Seiko Epson Color Ink Jet Printers.
+
+      This printer driver is supporting the following printers.
+
+      WorkForce 60
+      WorkForce 625
+      WorkForce 630
+      WorkForce 633
+      WorkForce 635
+      WorkForce T42WD
+      Epson Stylus NX625
+      Epson Stylus SX525WD
+      Epson Stylus SX620FW
+      Epson Stylus TX560WD
+      Epson Stylus Office B42WD
+      Epson Stylus Office BX525WD
+      Epson Stylus Office BX625FWD
+      Epson Stylus Office TX620FWD
+      Epson ME OFFICE 82WD
+      Epson ME OFFICE 85ND
+      Epson ME OFFICE 900WD
+      Epson ME OFFICE 960FWD
+
+      License: LGPL and SEIKO EPSON CORPORATION SOFTWARE LICENSE AGREEMENT
+
+      To use the driver adjust your configuration.nix file:
+        services.printing = {
+          enable = true;
+          drivers = [ pkgs.${name} ];
+        };
+    '';
+    downloadPage = "https://download.ebz.epson.net/dsc/du/02/DriverDownloadInfo.do?LG2=EN&CN2=&DSCMI=16857&DSCCHK=4334d3487503d7f916ccf5d58071b05b7687294f";
+    license = with lib.licenses; [ lgpl21 epson ];
+    maintainers = [ lib.maintainers.jorsn ];
+    platforms = [ "x86_64-linux" "i686-linux" ];
+  };
+}
diff --git a/nixpkgs/pkgs/misc/drivers/epson_201207w/default.nix b/nixpkgs/pkgs/misc/drivers/epson_201207w/default.nix
new file mode 100644
index 000000000000..d5c57b35c32e
--- /dev/null
+++ b/nixpkgs/pkgs/misc/drivers/epson_201207w/default.nix
@@ -0,0 +1,77 @@
+{ lib, stdenv, fetchurl, rpmextract, autoreconfHook, file, libjpeg, cups }:
+
+let
+  version = "1.0.0";
+in
+  stdenv.mkDerivation {
+
+    pname = "epson_201207w";
+    inherit version;
+
+    src = fetchurl {
+      # NOTE: Don't forget to update the webarchive link too!
+      urls = [
+        "https://download.ebz.epson.net/dsc/op/stable/SRPMS/epson-inkjet-printer-201207w-${version}-1lsb3.2.src.rpm"
+        "https://web.archive.org/web/https://download.ebz.epson.net/dsc/op/stable/SRPMS/epson-inkjet-printer-201207w-${version}-1lsb3.2.src.rpm"
+      ];
+      sha256 = "1ixnhn2dk83nh9v8sdivzgc2bm9z2phvsbx8bc6ainbjq6vn7lns";
+    };
+
+    nativeBuildInputs = [ rpmextract autoreconfHook file ];
+
+    buildInputs = [ libjpeg cups ];
+
+    unpackPhase = ''
+      rpmextract $src
+      tar -zxf epson-inkjet-printer-201207w-${version}.tar.gz
+      tar -zxf epson-inkjet-printer-filter-${version}.tar.gz
+      for ppd in epson-inkjet-printer-201207w-${version}/ppds/*; do
+        substituteInPlace $ppd --replace "/opt/epson-inkjet-printer-201207w" "$out"
+        substituteInPlace $ppd --replace "/cups/lib" "/lib/cups"
+      done
+      cd epson-inkjet-printer-filter-${version}
+    '';
+
+    preConfigure = ''
+      chmod +x configure
+      export LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
+    '';
+
+    postInstall = ''
+      cd ../epson-inkjet-printer-201207w-${version}
+      cp -a lib64 resource watermark $out
+      mkdir -p $out/share/cups/model/epson-inkjet-printer-201207w
+      cp -a ppds $out/share/cups/model/epson-inkjet-printer-201207w/
+      cp -a Manual.txt $out/doc/
+      cp -a README $out/doc/README.driver
+    '';
+
+    meta = with lib; {
+      homepage = "https://www.openprinting.org/driver/epson-201207w";
+      description = "Epson printer driver (L110, L210, L300, L350, L355, L550, L555)";
+      longDescription = ''
+        This software is a filter program used with the Common UNIX Printing
+        System (CUPS) under Linux. It supplies high quality printing with
+        Seiko Epson Color Ink Jet Printers.
+
+        List of printers supported by this package:
+           Epson L110 Series
+           Epson L210 Series
+           Epson L300 Series
+           Epson L350 Series
+           Epson L355 Series
+           Epson L550 Series
+           Epson L555 Series
+
+        To use the driver adjust your configuration.nix file:
+          services.printing = {
+            enable = true;
+            drivers = [ pkgs.epson_201207w ];
+          };
+      '';
+      license = with licenses; [ lgpl21 epson ];
+      maintainers = [ maintainers.romildo ];
+      platforms = [ "x86_64-linux" ];
+    };
+
+  }
diff --git a/nixpkgs/pkgs/misc/drivers/foo2zjs/default.nix b/nixpkgs/pkgs/misc/drivers/foo2zjs/default.nix
new file mode 100644
index 000000000000..7302cfb25bcf
--- /dev/null
+++ b/nixpkgs/pkgs/misc/drivers/foo2zjs/default.nix
@@ -0,0 +1,66 @@
+{ lib, stdenv, fetchurl, foomatic-filters, bc, unzip, ghostscript, systemd, vim, time }:
+
+stdenv.mkDerivation rec {
+  pname = "foo2zjs";
+  version = "20210116";
+
+  src = fetchurl {
+    url = "http://www.loegria.net/mirrors/foo2zjs/foo2zjs-${version}.tar.gz";
+    sha256 = "14x3wizvncdy0xgvmcx541qanwb7bg76abygqy17bxycn1zh5r1x";
+  };
+
+  nativeBuildInputs = [ unzip ];
+  buildInputs = [ foomatic-filters bc ghostscript systemd vim ];
+
+  patches = [ ./no-hardcode-fw.diff ];
+
+  makeFlags = [
+    "PREFIX=$(out)"
+    "APPL=$(out)/share/applications"
+    "PIXMAPS=$(out)/share/pixmaps"
+    "UDEVBIN=$(out)/bin"
+    "UDEVDIR=$(out)/etc/udev/rules.d"
+    "UDEVD=${systemd}/sbin/udevd"
+    "LIBUDEVDIR=$(out)/lib/udev/rules.d"
+    "USBDIR=$(out)/etc/hotplug/usb"
+    "FOODB=$(out)/share/foomatic/db/source"
+    "MODEL=$(out)/share/cups/model"
+  ];
+
+  installFlags = [ "install-hotplug" ];
+
+  postPatch = ''
+    touch all-test
+    sed -e "/BASENAME=/iPATH=$out/bin:$PATH" -i *-wrapper *-wrapper.in
+    sed -e "s@PREFIX=/usr@PREFIX=$out@" -i *-wrapper{,.in}
+    sed -e "s@/usr/share@$out/share@" -i hplj10xx_gui.tcl
+    sed -e "s@\[.*-x.*/usr/bin/logger.*\]@type logger >/dev/null 2>\&1@" -i *wrapper{,.in}
+    sed -e '/install-usermap/d' -i Makefile
+    sed -e "s@/etc/hotplug/usb@$out&@" -i *rules*
+    sed -e "s@/usr@$out@g" -i hplj1020.desktop
+    sed -e "/PRINTERID=/s@=.*@=$out/bin/usb_printerid@" -i hplj1000
+  '';
+
+  checkInputs = [ time ];
+  doCheck = false; # fails to find its own binary. Also says "Tests will pass only if you are using ghostscript-8.71-16.fc14".
+
+  preInstall = ''
+    mkdir -pv $out/{etc/udev/rules.d,lib/udev/rules.d,etc/hotplug/usb}
+    mkdir -pv $out/share/foomatic/db/source/{opt,printer,driver}
+    mkdir -pv $out/share/cups/model
+    mkdir -pv $out/share/{applications,pixmaps}
+
+    mkdir -pv "$out/bin"
+    cp -v getweb arm2hpdl "$out/bin"
+  '';
+
+  meta = with lib; {
+    description = "ZjStream printer drivers";
+    maintainers = with maintainers;
+    [
+      raskin
+    ];
+    platforms = platforms.linux;
+    license = licenses.gpl2Plus;
+  };
+}
diff --git a/nixpkgs/pkgs/misc/drivers/foo2zjs/no-hardcode-fw.diff b/nixpkgs/pkgs/misc/drivers/foo2zjs/no-hardcode-fw.diff
new file mode 100644
index 000000000000..003272858a42
--- /dev/null
+++ b/nixpkgs/pkgs/misc/drivers/foo2zjs/no-hardcode-fw.diff
@@ -0,0 +1,98 @@
+#
+#
+# patch "hplj1000"
+#  from [d5336e74866d31735d97874191351a0dcc092b44]
+#    to [55102b37684ee5181674d19d866caec2cf603412]
+#
+============================================================
+--- a/hplj1000	d5336e74866d31735d97874191351a0dcc092b44
++++ b/hplj1000	55102b37684ee5181674d19d866caec2cf603412
+@@ -39,11 +39,6 @@ DEV=""
+ DEV=""
+ 
+ #
+-# Directory to find downloadable HP firmware files sihpMMMM.dl
+-#
+-FWDIR=/usr/share/foo2zjs/firmware
+-
+-#
+ # Program used to determine USB printer id information
+ #
+ # NOTE: /usr/bin is NOT mounted at this point
+@@ -83,57 +78,61 @@ case "$0" in
+     MODEL=P1005; FWMODEL=$MODEL
+     USB1=0x03f0	#Vendor
+     USB2=0x3d17	#Model
+-    FWDIR=/usr/share/foo2xqx/firmware
++    DRIVER=foo2xqx
+     ;;
+ *P1006)
+     MODEL=P1006; FWMODEL=$MODEL
+     USB1=0x03f0	#Vendor
+     USB2=0x3e17	#Model
+-    FWDIR=/usr/share/foo2xqx/firmware
++    DRIVER=foo2xqx
+     ;;
+ *P1007)
+     MODEL=P1007; FWMODEL=P1005		# Alias
+     USB1=0x03f0	#Vendor
+     USB2=0x4817	#Model
+-    FWDIR=/usr/share/foo2xqx/firmware
++    DRIVER=foo2xqx
+     ;;
+ *P1008)
+     MODEL=P1008; FWMODEL=P1006		# Alias
+     USB1=0x03f0	#Vendor
+     USB2=0x4917	#Model
+-    FWDIR=/usr/share/foo2xqx/firmware
++    DRIVER=foo2xqx
+     ;;
+ *P1505)
+     MODEL=P1505; FWMODEL=$MODEL
+     USB1=0x03f0	#Vendor
+     USB2=0x3f17	#Model
+-    FWDIR=/usr/share/foo2xqx/firmware
++    DRIVER=foo2xqx
+     ;;
+ *P1505n)
+     MODEL=P1505n; FWMODEL=$MODEL
+     USB1=0x03f0	#Vendor
+     USB2=0x4017	#Model
+-    FWDIR=/usr/share/foo2xqx/firmware
++    DRIVER=foo2xqx
+     ;;
+ *1000)
+     MODEL=1000; FWMODEL=$MODEL
+     USB1=0x03f0	#Vendor
+     USB2=0x0517	#Model
++    DRIVER=foo2zjs
+     ;;
+ *1005)
+     MODEL=1005; FWMODEL=$MODEL
+     USB1=0x03f0	#Vendor
+     USB2=0x1317	#Model
++    DRIVER=foo2zjs
+     ;;
+ *1018)
+     MODEL=1018; FWMODEL=$MODEL
+     USB1=0x03f0 #Vendor
+     USB2=0x4117 #Model
++    DRIVER=foo2zjs
+     ;;
+ *1020)
+     MODEL=1020; FWMODEL=$MODEL
+     USB1=0x03f0 #Vendor
+     USB2=0x2b17 #Model
++    DRIVER=foo2zjs
+     ;;
+ *)
+     log "Only HP LaserJet 100[05],1018,1020,P100[5678],P1505 are supported"
+@@ -203,7 +202,7 @@ load1() {
+ #
+ load1() {
+     _dev="$1"
+-    fw="$FWDIR/sihp$FWMODEL.dl"
++    fw="${FOO2ZJS_DATADIR:-/usr/share}/$DRIVER/firmware/sihp$FWMODEL.dl"
+     if [ ! -f "$fw" ]; then
+ 	log "Missing HP LaserJet $MODEL firmware file $fw"
+ 	log "...read foo2zjs installation instructions and run ./getweb $MODEL"
diff --git a/nixpkgs/pkgs/misc/drivers/foomatic-filters/default.nix b/nixpkgs/pkgs/misc/drivers/foomatic-filters/default.nix
new file mode 100644
index 000000000000..db1da676a515
--- /dev/null
+++ b/nixpkgs/pkgs/misc/drivers/foomatic-filters/default.nix
@@ -0,0 +1,40 @@
+{ lib, stdenv, fetchpatch, fetchurl, pkg-config, perl, cups, dbus, enscript }:
+
+stdenv.mkDerivation rec {
+  name = "foomatic-filters-4.0.17";
+
+  src = fetchurl {
+    url = "https://www.openprinting.org/download/foomatic/${name}.tar.gz";
+    sha256 = "1qrkgbm5jay2r7sh9qbyf0aiyrsl1mdc844hxf7fhw95a0zfbqm2";
+  };
+
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = [ perl cups dbus enscript ];
+
+  patches = [
+    (fetchpatch {
+      name = "CVE-2015-8327+CVE-2015-8560.patch";
+      url = "https://salsa.debian.org/debian/foomatic-filters/raw/a3abbef2d2f8c7e62d2fe64f64afe294563fdf8f/debian/patches/0500-r7406_also_consider_the_back_tick_as_an_illegal_shell_escape_character.patch";
+      sha256 = "055nwi3sjf578nk40bqsch3wx8m2h65hdih0wmxflb6l0hwkq4p4";
+    })
+  ];
+
+  preConfigure =
+    ''
+      substituteInPlace foomaticrip.c --replace /bin/bash ${stdenv.shell}
+    '';
+
+  installTargets = [ "install-cups" ];
+
+  installFlags = [
+    "CUPS_FILTERS=$(out)/lib/cups/filter"
+    "CUPS_BACKENDS=$(out)/lib/cups/backend"
+  ];
+
+  meta = {
+    description = "Foomatic printing filters";
+    maintainers = [ lib.maintainers.raskin ];
+    platforms = lib.platforms.linux;
+    license = lib.licenses.gpl2Plus;
+  };
+}
diff --git a/nixpkgs/pkgs/misc/drivers/gutenprint/bin.nix b/nixpkgs/pkgs/misc/drivers/gutenprint/bin.nix
new file mode 100644
index 000000000000..58b77cb91071
--- /dev/null
+++ b/nixpkgs/pkgs/misc/drivers/gutenprint/bin.nix
@@ -0,0 +1,66 @@
+{ lib, stdenv, fetchurl, rpm, cpio, zlib }:
+
+/* usage: (sorry, its still impure but works!)
+
+impure directory:
+mkdir /opt/gutenprint; sudo cp -r $(nix-build -A gutenprintBin -f $NIXPGS_ALL) /opt/gutenprint
+
+add the following lines to bindirCmds property of  printing/cupsd.nix:
+
+  ln -s ${pkgs.gutenprintBin}/lib/cups/backend/* $out/lib/cups/backend/
+  ln -s ${pkgs.gutenprintBin}/lib/cups/filter/* $out/lib/cups/filter/
+  mkdir -p $out/lib/cups/model
+  cat ${pkgs.gutenprintBin}/ppds/Canon/Canon-PIXMA_iP4000-gutenprint.5.0.sim-en.ppd.gz |gunzip > $out/lib/cups/model/Canon-PIXMA_iP4000-gutenprint.5.0.sim-en.ppd
+  sed -i 's@/opt/gutenprint/cups@${pkgs.gutenprintBin}/cups@' $out/lib/cups/model/Canon-PIXMA_iP4000-gutenprint.5.0.sim-en.ppd
+
+Then rebuild your system and add your printer using the the localhost:603 cups web interface
+select the extracted .ppd file which can be found in the model directory of
+sed -n 's/^ServerBin //p' $(sed -n 's/respawn.*-c \(.*''\) -F.*''/\1/p' /etc/event.d/cupsd)
+(sorry, cups still doesn't see it. You could copy it into /nix/store/
+*-cups/lib/cups/model/ and you would be able to select canon -> PIXMA 4000
+then. I've tried that.
+
+TODO tidy this all up. Find source instead of binary. Fix paths ... Find out how to check ink levels etc
+
+*/
+
+stdenv.mkDerivation {
+  name = "cups-gutenprint-binary-5.0.1";
+
+  src = if stdenv.hostPlatform.system == "x86_64-linux" then fetchurl {
+    url = "https://www.openprinting.org/download/printdriver/debian/dists/lsb3.1/main/binary-amd64/gutenprint_5.0.1-1lsb3.1_amd64.deb";
+    sha256 = "0an5gba6r6v54r53s2gj2fjk8fzpl4lrksjas2333528b0k8gbbc";
+  } else throw "TODO"; # get from openprint.com -> drivers -> gutenprint
+
+  buildInputs = [ rpm cpio ];
+
+  phases = "buildPhase";
+
+  libPath = lib.makeLibraryPath [ stdenv.cc.cc zlib ];
+
+  buildPhase = ''
+    ar -x $src data.tar.gz
+    tar xfz data.tar.gz
+    cp -r opt/gutenprint $out
+
+    for p in \
+        $out/cups/lib/driver/gutenprint.5.0 \
+        $out/bin/{escputil,cups-calibrate} \
+        $out/cups/lib/driver/gutenprint.5.0 \
+        $out/cups/lib/filter/{rastertogutenprint.5.0,commandtocanon,commandtoepson} \
+        $out/cups/lib/backend/{canon,epson} \
+        $out/sbin/cups-genppd.5.0 \
+      ; do
+      patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
+          --set-rpath $libPath $p
+    done
+
+    mkdir $out/lib
+    ln -s $out/cups/lib $out/lib/cups
+  '';
+
+  meta = {
+    description = "Some additional CUPS drivers including Canon drivers";
+    platforms = [ "x86_64-linux" ];
+  };
+}
diff --git a/nixpkgs/pkgs/misc/drivers/gutenprint/default.nix b/nixpkgs/pkgs/misc/drivers/gutenprint/default.nix
new file mode 100644
index 000000000000..9cd76c11ccea
--- /dev/null
+++ b/nixpkgs/pkgs/misc/drivers/gutenprint/default.nix
@@ -0,0 +1,52 @@
+# this package was called gimp-print in the past
+{ stdenv, lib, fetchurl, makeWrapper, pkg-config
+, ijs, zlib
+, gimp2Support ? false, gimp
+, cupsSupport ? true, cups, libusb-compat-0_1, perl
+}:
+
+stdenv.mkDerivation rec {
+  name = "gutenprint-5.3.4";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/gimp-print/${name}.tar.bz2";
+    sha256 = "0s0b14hjwvbxksq7af5v8z9g2rfqv9jdmxd9d81m57f5mh6rad0p";
+  };
+
+  nativeBuildInputs = [ makeWrapper pkg-config ];
+  buildInputs =
+    [ ijs zlib ]
+    ++ lib.optionals gimp2Support [ gimp.gtk gimp ]
+    ++ lib.optionals cupsSupport [ cups libusb-compat-0_1 perl ];
+
+  configureFlags = lib.optionals cupsSupport [
+    "--disable-static-genppd" # should be harmless on NixOS
+  ];
+
+  # FIXME: hacky because we modify generated configure, but I haven't found a better way.
+  # makeFlags doesn't change this everywhere (e.g. in cups-genppdupdate).
+  preConfigure = lib.optionalString cupsSupport ''
+    sed -i \
+      -e "s,cups_conf_datadir=.*,cups_conf_datadir=\"$out/share/cups\",g" \
+      -e "s,cups_conf_serverbin=.*,cups_conf_serverbin=\"$out/lib/cups\",g" \
+      -e "s,cups_conf_serverroot=.*,cups_conf_serverroot=\"$out/etc/cups\",g" \
+      configure
+  '' + lib.optionalString gimp2Support ''
+    sed -i \
+      -e "s,gimp2_plug_indir=.*,gimp2_plug_indir=\"$out/lib/gimp/${gimp.majorVersion}\",g" \
+      configure
+  '';
+
+  enableParallelBuilding = true;
+
+  # Testing is very, very long.
+  # doCheck = true;
+
+  meta = with lib; {
+    description = "Ghostscript and cups printer drivers";
+    homepage = "https://sourceforge.net/projects/gimp-print/";
+    license = licenses.gpl2;
+    platforms = platforms.linux;
+    isGutenprint = true;
+  };
+}
diff --git a/nixpkgs/pkgs/misc/drivers/hplip/3.16.11.nix b/nixpkgs/pkgs/misc/drivers/hplip/3.16.11.nix
new file mode 100644
index 000000000000..37609a66c944
--- /dev/null
+++ b/nixpkgs/pkgs/misc/drivers/hplip/3.16.11.nix
@@ -0,0 +1,192 @@
+{ lib, stdenv, fetchurl, substituteAll
+, pkg-config
+, cups, libjpeg, libusb1, python2Packages, sane-backends, dbus, usbutils
+, net-snmp, openssl, nettools
+, bash, coreutils, util-linux
+, qtSupport ? true
+, withPlugin ? false
+}:
+
+let
+
+  name = "hplip-${version}";
+  version = "3.16.11";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/hplip/${name}.tar.gz";
+    sha256 = "094vkyr0rjng72m13dgr824cdl7q20x23qjxzih4w7l9njn0rqpn";
+  };
+
+  plugin = fetchurl {
+    url = "http://www.openprinting.org/download/printdriver/auxfiles/HP/plugins/${name}-plugin.run";
+    sha256 = "1y3wdax2wb6kdd8bi40wl7v9s8ffyjz95bz42sjcpzzddmlhcaxg";
+  };
+
+  hplipState = substituteAll {
+    inherit version;
+    src = ./hplip.state;
+  };
+
+  hplipPlatforms = {
+    i686-linux    = "x86_32";
+    x86_64-linux  = "x86_64";
+    armv6l-linux  = "arm32";
+    armv7l-linux  = "arm32";
+    aarch64-linux = "arm64";
+  };
+
+  hplipArch = hplipPlatforms.${stdenv.hostPlatform.system}
+    or (throw "HPLIP not supported on ${stdenv.hostPlatform.system}");
+
+  pluginArches = [ "x86_32" "x86_64" "arm32" "arm64" ];
+
+in
+
+assert withPlugin -> builtins.elem hplipArch pluginArches
+  || throw "HPLIP plugin not supported on ${stdenv.hostPlatform.system}";
+
+python2Packages.buildPythonApplication {
+  inherit name src;
+  format = "other";
+
+  buildInputs = [
+    libjpeg
+    cups
+    libusb1
+    sane-backends
+    dbus
+    net-snmp
+    openssl
+  ];
+
+  nativeBuildInputs = [
+    pkg-config
+  ];
+
+  pythonPath = with python2Packages; [
+    dbus
+    pillow
+    pygobject2
+    reportlab
+    usbutils
+  ] ++ lib.optionals qtSupport [
+    pyqt4
+  ];
+
+  makeWrapperArgs = [ "--prefix" "PATH" ":" "${nettools}/bin" ];
+
+  prePatch = ''
+    # HPLIP hardcodes absolute paths everywhere. Nuke from orbit.
+    find . -type f -exec sed -i \
+      -e s,/etc/hp,$out/etc/hp, \
+      -e s,/etc/sane.d,$out/etc/sane.d, \
+      -e s,/usr/include/libusb-1.0,${libusb1.dev}/include/libusb-1.0, \
+      -e s,/usr/share/hal/fdi/preprobe/10osvendor,$out/share/hal/fdi/preprobe/10osvendor, \
+      -e s,/usr/lib/systemd/system,$out/lib/systemd/system, \
+      -e s,/var/lib/hp,$out/var/lib/hp, \
+      {} +
+  '';
+
+  preConfigure = ''
+    export configureFlags="$configureFlags
+      --with-hpppddir=$out/share/cups/model/HP
+      --with-cupsfilterdir=$out/lib/cups/filter
+      --with-cupsbackenddir=$out/lib/cups/backend
+      --with-icondir=$out/share/applications
+      --with-systraydir=$out/xdg/autostart
+      --with-mimedir=$out/etc/cups
+      --enable-policykit
+    "
+
+    export makeFlags="
+      halpredir=$out/share/hal/fdi/preprobe/10osvendor
+      rulesdir=$out/etc/udev/rules.d
+      policykit_dir=$out/share/polkit-1/actions
+      policykit_dbus_etcdir=$out/etc/dbus-1/system.d
+      policykit_dbus_sharedir=$out/share/dbus-1/system-services
+      hplip_confdir=$out/etc/hp
+      hplip_statedir=$out/var/lib/hp
+    "
+  '';
+
+  enableParallelBuilding = true;
+
+  postInstall = lib.optionalString withPlugin ''
+    sh ${plugin} --noexec --keep
+    cd plugin_tmp
+
+    cp plugin.spec $out/share/hplip/
+
+    mkdir -p $out/share/hplip/data/firmware
+    cp *.fw.gz $out/share/hplip/data/firmware
+
+    mkdir -p $out/share/hplip/data/plugins
+    cp license.txt $out/share/hplip/data/plugins
+
+    mkdir -p $out/share/hplip/prnt/plugins
+    for plugin in lj hbpl1; do
+      cp $plugin-${hplipArch}.so $out/share/hplip/prnt/plugins
+      ln -s $out/share/hplip/prnt/plugins/$plugin-${hplipArch}.so \
+        $out/share/hplip/prnt/plugins/$plugin.so
+    done
+
+    mkdir -p $out/share/hplip/scan/plugins
+    for plugin in bb_soap bb_marvell bb_soapht fax_marvell; do
+      cp $plugin-${hplipArch}.so $out/share/hplip/scan/plugins
+      ln -s $out/share/hplip/scan/plugins/$plugin-${hplipArch}.so \
+        $out/share/hplip/scan/plugins/$plugin.so
+    done
+
+    mkdir -p $out/var/lib/hp
+    cp ${hplipState} $out/var/lib/hp/hplip.state
+
+    mkdir -p $out/etc/sane.d/dll.d
+    mv $out/etc/sane.d/dll.conf $out/etc/sane.d/dll.d/hpaio.conf
+  '';
+
+  # The installed executables are just symlinks into $out/share/hplip,
+  # but wrapPythonPrograms ignores symlinks. We cannot replace the Python
+  # modules in $out/share/hplip with wrapper scripts because they import
+  # each other as libraries. Instead, we emulate wrapPythonPrograms by
+  # 1. Calling patchPythonProgram on the original script in $out/share/hplip
+  # 2. Making our own wrapper pointing directly to the original script.
+  dontWrapPythonPrograms = true;
+  preFixup = ''
+    buildPythonPath "$out $pythonPath"
+
+    for bin in $out/bin/*; do
+      py=$(readlink -m $bin)
+      rm $bin
+      echo "patching \`$py'..."
+      patchPythonScript "$py"
+      echo "wrapping \`$bin'..."
+      makeWrapper "$py" "$bin" \
+          --prefix PATH ':' "$program_PATH" \
+          --set PYTHONNOUSERSITE "true" \
+          $makeWrapperArgs
+    done
+  '';
+
+  postFixup = ''
+    substituteInPlace $out/etc/hp/hplip.conf --replace /usr $out
+    # Patch udev rules:
+    # with plugin, they upload firmware to printers,
+    # without plugin, they complain about the missing plugin.
+    substituteInPlace $out/etc/udev/rules.d/56-hpmud.rules \
+      --replace {,${bash}}/bin/sh \
+      --replace /usr/bin/nohup "" \
+      --replace {,${util-linux}/bin/}logger \
+      --replace {/usr,$out}/bin
+  '';
+
+  meta = with lib; {
+    description = "Print, scan and fax HP drivers for Linux";
+    homepage = "http://hplipopensource.com/";
+    downloadPage = "https://sourceforge.net/projects/hplip/files/hplip/";
+    license = if withPlugin
+      then licenses.unfree
+      else with licenses; [ mit bsd2 gpl2Plus ];
+    platforms = [ "i686-linux" "x86_64-linux" "armv6l-linux" "armv7l-linux" "aarch64-linux" ];
+    maintainers = with maintainers; [ ttuegel ];
+  };
+}
diff --git a/nixpkgs/pkgs/misc/drivers/hplip/3.18.5.nix b/nixpkgs/pkgs/misc/drivers/hplip/3.18.5.nix
new file mode 100644
index 000000000000..c62161c96f80
--- /dev/null
+++ b/nixpkgs/pkgs/misc/drivers/hplip/3.18.5.nix
@@ -0,0 +1,229 @@
+{ lib, stdenv, fetchurl, substituteAll
+, pkg-config
+, cups, zlib, libjpeg, libusb1, python2Packages, sane-backends
+, dbus, file, ghostscript, usbutils
+, net-snmp, openssl, perl, nettools
+, bash, coreutils, util-linux
+, withQt5 ? true
+, withPlugin ? false
+, withStaticPPDInstall ? false
+}:
+
+let
+
+  name = "hplip-${version}";
+  version = "3.18.5";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/hplip/${name}.tar.gz";
+    sha256 = "0xb7ga2wgbwjxsss67mjn2y6fmqsfwzmv11ivvfzhnl36lh22hkb";
+  };
+
+  plugin = fetchurl {
+    url = "https://www.openprinting.org/download/printdriver/auxfiles/HP/plugins/${name}-plugin.run";
+    sha256 = "1jf74jya071zqvwhy9n0c3007pzgcxydkw7qdh4sx70brly81i7p";
+  };
+
+  hplipState = substituteAll {
+    inherit version;
+    src = ./hplip.state;
+  };
+
+  hplipPlatforms = {
+    i686-linux    = "x86_32";
+    x86_64-linux  = "x86_64";
+    armv6l-linux  = "arm32";
+    armv7l-linux  = "arm32";
+    aarch64-linux = "arm64";
+  };
+
+  hplipArch = hplipPlatforms.${stdenv.hostPlatform.system}
+    or (throw "HPLIP not supported on ${stdenv.hostPlatform.system}");
+
+  pluginArches = [ "x86_32" "x86_64" "arm32" "arm64" ];
+
+in
+
+assert withPlugin -> builtins.elem hplipArch pluginArches
+  || throw "HPLIP plugin not supported on ${stdenv.hostPlatform.system}";
+
+python2Packages.buildPythonApplication {
+  inherit name src;
+  format = "other";
+
+  buildInputs = [
+    libjpeg
+    cups
+    libusb1
+    sane-backends
+    dbus
+    file
+    ghostscript
+    net-snmp
+    openssl
+    perl
+    zlib
+  ];
+
+  nativeBuildInputs = [
+    pkg-config
+  ];
+
+  pythonPath = with python2Packages; [
+    dbus
+    pillow
+    pygobject2
+    reportlab
+    usbutils
+    sip
+  ] ++ lib.optionals withQt5 [
+    pyqt5
+  ];
+
+  makeWrapperArgs = [ "--prefix" "PATH" ":" "${nettools}/bin" ];
+
+  prePatch = ''
+    # HPLIP hardcodes absolute paths everywhere. Nuke from orbit.
+    find . -type f -exec sed -i \
+      -e s,/etc/hp,$out/etc/hp,g \
+      -e s,/etc/sane.d,$out/etc/sane.d,g \
+      -e s,/usr/include/libusb-1.0,${libusb1.dev}/include/libusb-1.0,g \
+      -e s,/usr/share/hal/fdi/preprobe/10osvendor,$out/share/hal/fdi/preprobe/10osvendor,g \
+      -e s,/usr/lib/systemd/system,$out/lib/systemd/system,g \
+      -e s,/var/lib/hp,$out/var/lib/hp,g \
+      -e s,/usr/bin/perl,${perl}/bin/perl,g \
+      -e s,/usr/bin/file,${file}/bin/file,g \
+      -e s,/usr/bin/gs,${ghostscript}/bin/gs,g \
+      -e s,/usr/share/cups/fonts,${ghostscript}/share/ghostscript/fonts,g \
+      -e "s,ExecStart=/usr/bin/python /usr/bin/hp-config_usb_printer,ExecStart=$out/bin/hp-config_usb_printer,g" \
+      {} +
+  '';
+
+  preConfigure = ''
+    export configureFlags="$configureFlags
+      --with-hpppddir=$out/share/cups/model/HP
+      --with-cupsfilterdir=$out/lib/cups/filter
+      --with-cupsbackenddir=$out/lib/cups/backend
+      --with-icondir=$out/share/applications
+      --with-systraydir=$out/xdg/autostart
+      --with-mimedir=$out/etc/cups
+      --enable-policykit
+      ${lib.optionalString withStaticPPDInstall "--enable-cups-ppd-install"}
+      --disable-qt4
+      ${lib.optionalString withQt5 "--enable-qt5"}
+    "
+
+    export makeFlags="
+      halpredir=$out/share/hal/fdi/preprobe/10osvendor
+      rulesdir=$out/etc/udev/rules.d
+      policykit_dir=$out/share/polkit-1/actions
+      policykit_dbus_etcdir=$out/etc/dbus-1/system.d
+      policykit_dbus_sharedir=$out/share/dbus-1/system-services
+      hplip_confdir=$out/etc/hp
+      hplip_statedir=$out/var/lib/hp
+    "
+
+    # Prevent 'ppdc: Unable to find include file "<font.defs>"' which prevent
+    # generation of '*.ppd' files.
+    # This seems to be a 'ppdc' issue when the tool is run in a hermetic sandbox.
+    # Could not find how to fix the problem in 'ppdc' so this is a workaround.
+    export CUPS_DATADIR="${cups}/share/cups"
+  '';
+
+  enableParallelBuilding = true;
+
+  #
+  # Running `hp-diagnose_plugin -g` can be used to diagnose
+  # issues with plugins.
+  #
+  postInstall = lib.optionalString withPlugin ''
+    sh ${plugin} --noexec --keep
+    cd plugin_tmp
+
+    cp plugin.spec $out/share/hplip/
+
+    mkdir -p $out/share/hplip/data/firmware
+    cp *.fw.gz $out/share/hplip/data/firmware
+
+    mkdir -p $out/share/hplip/data/plugins
+    cp license.txt $out/share/hplip/data/plugins
+
+    mkdir -p $out/share/hplip/prnt/plugins
+    for plugin in lj hbpl1; do
+      cp $plugin-${hplipArch}.so $out/share/hplip/prnt/plugins
+      chmod 0755 $out/share/hplip/prnt/plugins/$plugin-${hplipArch}.so
+      ln -s $out/share/hplip/prnt/plugins/$plugin-${hplipArch}.so \
+        $out/share/hplip/prnt/plugins/$plugin.so
+    done
+
+    mkdir -p $out/share/hplip/scan/plugins
+    for plugin in bb_soap bb_marvell bb_soapht bb_escl; do
+      cp $plugin-${hplipArch}.so $out/share/hplip/scan/plugins
+      chmod 0755 $out/share/hplip/scan/plugins/$plugin-${hplipArch}.so
+      ln -s $out/share/hplip/scan/plugins/$plugin-${hplipArch}.so \
+        $out/share/hplip/scan/plugins/$plugin.so
+    done
+
+    mkdir -p $out/share/hplip/fax/plugins
+    for plugin in fax_marvell; do
+      cp $plugin-${hplipArch}.so $out/share/hplip/fax/plugins
+      chmod 0755 $out/share/hplip/fax/plugins/$plugin-${hplipArch}.so
+      ln -s $out/share/hplip/fax/plugins/$plugin-${hplipArch}.so \
+        $out/share/hplip/fax/plugins/$plugin.so
+    done
+
+    mkdir -p $out/var/lib/hp
+    cp ${hplipState} $out/var/lib/hp/hplip.state
+  '';
+
+  # The installed executables are just symlinks into $out/share/hplip,
+  # but wrapPythonPrograms ignores symlinks. We cannot replace the Python
+  # modules in $out/share/hplip with wrapper scripts because they import
+  # each other as libraries. Instead, we emulate wrapPythonPrograms by
+  # 1. Calling patchPythonProgram on the original script in $out/share/hplip
+  # 2. Making our own wrapper pointing directly to the original script.
+  dontWrapPythonPrograms = true;
+  preFixup = ''
+    buildPythonPath "$out $pythonPath"
+
+    for bin in $out/bin/*; do
+      py=$(readlink -m $bin)
+      rm $bin
+      echo "patching \`$py'..."
+      patchPythonScript "$py"
+      echo "wrapping \`$bin'..."
+      makeWrapper "$py" "$bin" \
+          --prefix PATH ':' "$program_PATH" \
+          --set PYTHONNOUSERSITE "true" \
+          $makeWrapperArgs
+    done
+  '';
+
+  # There are some binaries there, which reference gcc-unwrapped otherwise.
+  stripDebugList = [
+    "share/hplip"
+  ];
+
+  postFixup = ''
+    substituteInPlace $out/etc/hp/hplip.conf --replace /usr $out
+    # Patch udev rules:
+    # with plugin, they upload firmware to printers,
+    # without plugin, they complain about the missing plugin.
+    substituteInPlace $out/etc/udev/rules.d/56-hpmud.rules \
+      --replace {,${bash}}/bin/sh \
+      --replace /usr/bin/nohup "" \
+      --replace {,${util-linux}/bin/}logger \
+      --replace {/usr,$out}/bin
+  '';
+
+  meta = with lib; {
+    description = "Print, scan and fax HP drivers for Linux";
+    homepage = "https://developers.hp.com/hp-linux-imaging-and-printing";
+    downloadPage = "https://sourceforge.net/projects/hplip/files/hplip/";
+    license = if withPlugin
+      then licenses.unfree
+      else with licenses; [ mit bsd2 gpl2Plus ];
+    platforms = [ "i686-linux" "x86_64-linux" "armv6l-linux" "armv7l-linux" "aarch64-linux" ];
+    maintainers = with maintainers; [ jgeerds ttuegel ];
+  };
+}
diff --git a/nixpkgs/pkgs/misc/drivers/hplip/default.nix b/nixpkgs/pkgs/misc/drivers/hplip/default.nix
new file mode 100644
index 000000000000..6a7eb35ae52b
--- /dev/null
+++ b/nixpkgs/pkgs/misc/drivers/hplip/default.nix
@@ -0,0 +1,253 @@
+{ lib, stdenv, fetchurl, substituteAll
+, pkg-config
+, cups, zlib, libjpeg, libusb1, python3Packages, sane-backends
+, dbus, file, ghostscript, usbutils
+, net-snmp, openssl, perl, nettools, avahi
+, bash, coreutils, util-linux
+# To remove references to gcc-unwrapped
+, removeReferencesTo, qt5
+, withQt5 ? true
+, withPlugin ? false
+, withStaticPPDInstall ? false
+}:
+
+let
+
+  pname = "hplip";
+  version = "3.20.11";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/hplip/${pname}-${version}.tar.gz";
+    sha256 = "CxZ1s9jnCaEyX+hj9arOO9NxB3mnPq6Gj3su6aVv2xE=";
+  };
+
+  plugin = fetchurl {
+    url = "https://developers.hp.com/sites/default/files/${pname}-${version}-plugin.run";
+    sha256 = "r8PoQQFfjdHKySPCFwtDR8Tl6v5Eag9gXpBAp6sCF9Q=";
+  };
+
+  hplipState = substituteAll {
+    inherit version;
+    src = ./hplip.state;
+  };
+
+  hplipPlatforms = {
+    i686-linux   = "x86_32";
+    x86_64-linux = "x86_64";
+    armv6l-linux = "arm32";
+    armv7l-linux = "arm32";
+    aarch64-linux = "aarch64";
+  };
+
+  hplipArch = hplipPlatforms.${stdenv.hostPlatform.system}
+    or (throw "HPLIP not supported on ${stdenv.hostPlatform.system}");
+
+  pluginArches = [ "x86_32" "x86_64" "arm32" "aarch64" ];
+
+in
+
+assert withPlugin -> builtins.elem hplipArch pluginArches
+  || throw "HPLIP plugin not supported on ${stdenv.hostPlatform.system}";
+
+python3Packages.buildPythonApplication {
+  inherit pname version src;
+  format = "other";
+
+  buildInputs = [
+    libjpeg
+    cups
+    libusb1
+    sane-backends
+    dbus
+    file
+    ghostscript
+    net-snmp
+    openssl
+    perl
+    zlib
+    avahi
+  ];
+
+  nativeBuildInputs = [
+    pkg-config
+    removeReferencesTo
+  ] ++ lib.optional withQt5 qt5.wrapQtAppsHook;
+
+  pythonPath = with python3Packages; [
+    dbus
+    pillow
+    pygobject3
+    reportlab
+    usbutils
+    sip
+    dbus-python
+  ] ++ lib.optionals withQt5 [
+    pyqt5
+    enum-compat
+  ];
+
+  makeWrapperArgs = [ "--prefix" "PATH" ":" "${nettools}/bin" ];
+
+  patches = [
+    # remove ImageProcessor usage, it causes segfaults, see
+    # https://bugs.launchpad.net/hplip/+bug/1788706
+    # https://bugs.launchpad.net/hplip/+bug/1787289
+    ./image-processor.patch
+
+    # HPLIP's getSystemPPDs() function relies on searching for PPDs below common FHS
+    # paths, and hp-setup crashes if none of these paths actually exist (which they
+    # don't on NixOS).  Add the equivalent NixOS path, /var/lib/cups/path/share.
+    # See: https://github.com/NixOS/nixpkgs/issues/21796
+    ./hplip-3.20.11-nixos-cups-ppd-search-path.patch
+  ];
+
+  prePatch = ''
+    # HPLIP hardcodes absolute paths everywhere. Nuke from orbit.
+    find . -type f -exec sed -i \
+      -e s,/etc/hp,$out/etc/hp,g \
+      -e s,/etc/sane.d,$out/etc/sane.d,g \
+      -e s,/usr/include/libusb-1.0,${libusb1.dev}/include/libusb-1.0,g \
+      -e s,/usr/share/hal/fdi/preprobe/10osvendor,$out/share/hal/fdi/preprobe/10osvendor,g \
+      -e s,/usr/lib/systemd/system,$out/lib/systemd/system,g \
+      -e s,/var/lib/hp,$out/var/lib/hp,g \
+      -e s,/usr/bin/perl,${perl}/bin/perl,g \
+      -e s,/usr/bin/file,${file}/bin/file,g \
+      -e s,/usr/bin/gs,${ghostscript}/bin/gs,g \
+      -e s,/usr/share/cups/fonts,${ghostscript}/share/ghostscript/fonts,g \
+      -e "s,ExecStart=/usr/bin/python /usr/bin/hp-config_usb_printer,ExecStart=$out/bin/hp-config_usb_printer,g" \
+      {} +
+  '';
+
+  preConfigure = ''
+    export configureFlags="$configureFlags
+      --with-hpppddir=$out/share/cups/model/HP
+      --with-cupsfilterdir=$out/lib/cups/filter
+      --with-cupsbackenddir=$out/lib/cups/backend
+      --with-icondir=$out/share/applications
+      --with-systraydir=$out/xdg/autostart
+      --with-mimedir=$out/etc/cups
+      --enable-policykit
+      ${lib.optionalString withStaticPPDInstall "--enable-cups-ppd-install"}
+      --disable-qt4
+      ${lib.optionalString withQt5 "--enable-qt5"}
+    "
+
+    export makeFlags="
+      halpredir=$out/share/hal/fdi/preprobe/10osvendor
+      rulesdir=$out/etc/udev/rules.d
+      policykit_dir=$out/share/polkit-1/actions
+      policykit_dbus_etcdir=$out/etc/dbus-1/system.d
+      policykit_dbus_sharedir=$out/share/dbus-1/system-services
+      hplip_confdir=$out/etc/hp
+      hplip_statedir=$out/var/lib/hp
+    "
+
+    # Prevent 'ppdc: Unable to find include file "<font.defs>"' which prevent
+    # generation of '*.ppd' files.
+    # This seems to be a 'ppdc' issue when the tool is run in a hermetic sandbox.
+    # Could not find how to fix the problem in 'ppdc' so this is a workaround.
+    export CUPS_DATADIR="${cups}/share/cups"
+  '';
+
+  enableParallelBuilding = true;
+
+  #
+  # Running `hp-diagnose_plugin -g` can be used to diagnose
+  # issues with plugins.
+  #
+  postInstall = lib.optionalString withPlugin ''
+    sh ${plugin} --noexec --keep
+    cd plugin_tmp
+
+    cp plugin.spec $out/share/hplip/
+
+    mkdir -p $out/share/hplip/data/firmware
+    cp *.fw.gz $out/share/hplip/data/firmware
+
+    mkdir -p $out/share/hplip/data/plugins
+    cp license.txt $out/share/hplip/data/plugins
+
+    mkdir -p $out/share/hplip/prnt/plugins
+    for plugin in lj hbpl1; do
+      cp $plugin-${hplipArch}.so $out/share/hplip/prnt/plugins
+      chmod 0755 $out/share/hplip/prnt/plugins/$plugin-${hplipArch}.so
+      ln -s $out/share/hplip/prnt/plugins/$plugin-${hplipArch}.so \
+        $out/share/hplip/prnt/plugins/$plugin.so
+    done
+
+    mkdir -p $out/share/hplip/scan/plugins
+    for plugin in bb_soap bb_marvell bb_soapht bb_escl; do
+      cp $plugin-${hplipArch}.so $out/share/hplip/scan/plugins
+      chmod 0755 $out/share/hplip/scan/plugins/$plugin-${hplipArch}.so
+      ln -s $out/share/hplip/scan/plugins/$plugin-${hplipArch}.so \
+        $out/share/hplip/scan/plugins/$plugin.so
+    done
+
+    mkdir -p $out/share/hplip/fax/plugins
+    for plugin in fax_marvell; do
+      cp $plugin-${hplipArch}.so $out/share/hplip/fax/plugins
+      chmod 0755 $out/share/hplip/fax/plugins/$plugin-${hplipArch}.so
+      ln -s $out/share/hplip/fax/plugins/$plugin-${hplipArch}.so \
+        $out/share/hplip/fax/plugins/$plugin.so
+    done
+
+    mkdir -p $out/var/lib/hp
+    cp ${hplipState} $out/var/lib/hp/hplip.state
+  '';
+
+  # The installed executables are just symlinks into $out/share/hplip,
+  # but wrapPythonPrograms ignores symlinks. We cannot replace the Python
+  # modules in $out/share/hplip with wrapper scripts because they import
+  # each other as libraries. Instead, we emulate wrapPythonPrograms by
+  # 1. Calling patchPythonProgram on the original script in $out/share/hplip
+  # 2. Making our own wrapper pointing directly to the original script.
+  dontWrapPythonPrograms = true;
+  preFixup = ''
+    buildPythonPath "$out $pythonPath"
+
+    for bin in $out/bin/*; do
+      py=$(readlink -m $bin)
+      rm $bin
+      echo "patching \`$py'..."
+      patchPythonScript "$py"
+      echo "wrapping \`$bin'..."
+      makeWrapper "$py" "$bin" \
+          --prefix PATH ':' "$program_PATH" \
+          --set PYTHONNOUSERSITE "true" \
+          $makeWrapperArgs
+    done
+  '';
+
+  postFixup = ''
+    substituteInPlace $out/etc/hp/hplip.conf --replace /usr $out
+    # Patch udev rules:
+    # with plugin, they upload firmware to printers,
+    # without plugin, they complain about the missing plugin.
+    substituteInPlace $out/etc/udev/rules.d/56-hpmud.rules \
+      --replace {,${bash}}/bin/sh \
+      --replace /usr/bin/nohup "" \
+      --replace {,${util-linux}/bin/}logger \
+      --replace {/usr,$out}/bin
+    remove-references-to -t ${stdenv.cc.cc} $(readlink -f $out/lib/*.so)
+  '' + lib.optionalString withQt5 ''
+    for f in $out/bin/hp-*;do
+      wrapQtApp $f
+    done
+  '';
+
+  # There are some binaries there, which reference gcc-unwrapped otherwise.
+  stripDebugList = [
+    "share/hplip" "lib/cups/backend" "lib/cups/filter" python3Packages.python.sitePackages "lib/sane"
+  ];
+
+  meta = with lib; {
+    description = "Print, scan and fax HP drivers for Linux";
+    homepage = "https://developers.hp.com/hp-linux-imaging-and-printing";
+    downloadPage = "https://sourceforge.net/projects/hplip/files/hplip/";
+    license = if withPlugin
+      then licenses.unfree
+      else with licenses; [ mit bsd2 gpl2Plus ];
+    platforms = [ "i686-linux" "x86_64-linux" "armv6l-linux" "armv7l-linux" "aarch64-linux" ];
+    maintainers = with maintainers; [ ttuegel ];
+  };
+}
diff --git a/nixpkgs/pkgs/misc/drivers/hplip/hplip-3.20.11-nixos-cups-ppd-search-path.patch b/nixpkgs/pkgs/misc/drivers/hplip/hplip-3.20.11-nixos-cups-ppd-search-path.patch
new file mode 100644
index 000000000000..d26e13dd2d63
--- /dev/null
+++ b/nixpkgs/pkgs/misc/drivers/hplip/hplip-3.20.11-nixos-cups-ppd-search-path.patch
@@ -0,0 +1,24 @@
+From: Bryan Gardiner <bog@khumba.net>
+Date: Sat, 9 Jan 2021 16:51:20 -0800
+Subject: [PATCH] Add NixOS CUPS PPD search path.
+
+---
+ base/g.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/base/g.py b/base/g.py
+index f73e23f..758f339 100644
+--- a/base/g.py
++++ b/base/g.py
+@@ -283,7 +283,7 @@ prop.max_message_len = 8192
+ prop.max_message_read = 65536
+ prop.read_timeout = 90
+ 
+-prop.ppd_search_path = '/usr/share;/usr/local/share;/usr/lib;/usr/local/lib;/usr/libexec;/opt;/usr/lib64'
++prop.ppd_search_path = '/var/lib/cups/path/share;/usr/share;/usr/local/share;/usr/lib;/usr/local/lib;/usr/libexec;/opt;/usr/lib64'
+ prop.ppd_search_pattern = 'HP-*.ppd.*'
+ prop.ppd_download_url = 'http://www.linuxprinting.org/ppd-o-matic.cgi'
+ prop.ppd_file_suffix = '-hpijs.ppd'
+-- 
+2.29.2
+
diff --git a/nixpkgs/pkgs/misc/drivers/hplip/hplip.state b/nixpkgs/pkgs/misc/drivers/hplip/hplip.state
new file mode 100644
index 000000000000..9d19a93f3644
--- /dev/null
+++ b/nixpkgs/pkgs/misc/drivers/hplip/hplip.state
@@ -0,0 +1,4 @@
+[plugin]
+installed=1
+eula=1
+version=@version@
diff --git a/nixpkgs/pkgs/misc/drivers/hplip/image-processor.patch b/nixpkgs/pkgs/misc/drivers/hplip/image-processor.patch
new file mode 100644
index 000000000000..30df1d29d97e
--- /dev/null
+++ b/nixpkgs/pkgs/misc/drivers/hplip/image-processor.patch
@@ -0,0 +1,115 @@
+From 207aa582477dd874d1651db2d0654c5d6adb6e0a Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= <joerg@thalheim.io>
+Date: Fri, 20 Dec 2019 13:13:52 +0000
+Subject: [PATCH] remove imageprocessor
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Signed-off-by: Jörg Thalheim <joerg@thalheim.io>
+---
+ Makefile.am                  |  4 ++--
+ Makefile.in                  |  2 +-
+ prnt/hpcups/HPCupsFilter.cpp | 19 -------------------
+ 3 files changed, 3 insertions(+), 22 deletions(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index 891660d..484a051 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -166,7 +166,7 @@ if !HPLIP_CLASS_DRIVER
+ dist_hplip_SCRIPTS = hpssd.py __init__.py hpdio.py
+ endif #HPLIP_CLASS_DRIVER
+ 
+-dist_noinst_DATA += prnt/drv/hpijs.drv.in.template prnt/drv/hpcups.drv.in.template prnt/hpcups/libImageProcessor-x86_64.so prnt/hpcups/libImageProcessor-x86_32.so
++dist_noinst_DATA += prnt/drv/hpijs.drv.in.template prnt/drv/hpcups.drv.in.template
+ dist_noinst_SCRIPTS += dat2drv.py install.py  hplip-install init-suse-firewall init-iptables-firewall class_rpm_build.sh hplipclassdriver.spec createPPD.sh Makefile_dat2drv hpijs-drv
+ 
+ if !HPLIP_CLASS_DRIVER
+@@ -594,7 +594,7 @@ hpcups_SOURCES = prnt/hpcups/HPCupsFilter.cpp prnt/hpcups/HPCupsFilter.h prnt/hp
+ 	prnt/hpcups/ImageProcessor.h
+ 
+ hpcups_CXXFLAGS = $(APDK_ENDIAN_FLAG) $(DBUS_CFLAGS)
+-hpcups_LDADD = -L./prnt/hpcups/ -ljpeg -ldl -lImageProcessor -lcups -lcupsimage -lz $(DBUS_LIBS)
++hpcups_LDADD = -L./prnt/hpcups/ -ljpeg -ldl -lcups -lcupsimage -lz $(DBUS_LIBS)
+ #else
+ #hpcupsdir = $(cupsfilterdir)
+ #hpcups_PROGRAMS = hpcups
+diff --git a/Makefile.in b/Makefile.in
+index 16c39f0..46a767e 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -4814,7 +4814,7 @@ libapdk_la_CFLAGS = $(libapdk_la_CXXFLAGS) -Iprnt/hpijs
+ @HPCUPS_INSTALL_TRUE@	prnt/hpcups/ImageProcessor.h
+ 
+ @HPCUPS_INSTALL_TRUE@hpcups_CXXFLAGS = $(APDK_ENDIAN_FLAG) $(DBUS_CFLAGS)
+-@HPCUPS_INSTALL_TRUE@hpcups_LDADD = -L./prnt/hpcups/ -ljpeg -ldl -lImageProcessor -lcups -lcupsimage -lz $(DBUS_LIBS)
++@HPCUPS_INSTALL_TRUE@hpcups_LDADD = -L./prnt/hpcups/ -ljpeg -ldl -lcups -lcupsimage -lz $(DBUS_LIBS)
+ #else
+ #hpcupsdir = $(cupsfilterdir)
+ #hpcups_PROGRAMS = hpcups
+diff --git a/prnt/hpcups/HPCupsFilter.cpp b/prnt/hpcups/HPCupsFilter.cpp
+index 5b282d8..153ee3a 100644
+--- a/prnt/hpcups/HPCupsFilter.cpp
++++ b/prnt/hpcups/HPCupsFilter.cpp
+@@ -31,7 +31,6 @@
+ \*****************************************************************************/
+ 
+ #include "HPCupsFilter.h"
+-#include "ImageProcessor.h"
+ 
+ #include <signal.h>
+ #include <sys/wait.h>
+@@ -637,16 +636,10 @@ int HPCupsFilter::processRasterData(cups_raster_t *cups_raster)
+ 
+ 
+     sprintf(hpPreProcessedRasterFile, "%s/hp_%s_cups_SwapedPagesXXXXXX",CUPS_TMP_DIR, m_JA.user_name);
+-    image_processor_t* imageProcessor = imageProcessorCreate();
+ 
+     while (cupsRasterReadHeader2(cups_raster, &cups_header))
+     {
+ 
+-        IMAGE_PROCESSOR_ERROR result = imageProcessorStartPage(imageProcessor, &cups_header);
+-        if (result != IPE_SUCCESS){
+-            dbglog("DEBUG: imageProcessorStartPage failed result = %d\n", result);
+-        }
+-
+         current_page_number++;
+ 
+         if (current_page_number == 1) {
+@@ -745,11 +738,6 @@ int HPCupsFilter::processRasterData(cups_raster_t *cups_raster)
+             color_raster = rgbRaster;
+             black_raster = kRaster;
+ 
+-            result = imageProcessorProcessLine(imageProcessor, m_pPrinterBuffer, cups_header.cupsBytesPerLine);
+-            if (result != IPE_SUCCESS){
+-                dbglog("DEBUG: imageProcessorProcessLine failed result = %d\n", result);
+-            }
+-
+ 
+             if ((y == 0) && !is_ljmono) {
+                 //For ljmono, make sure that first line is not a blankRaster line.Otherwise printer
+@@ -780,11 +768,6 @@ int HPCupsFilter::processRasterData(cups_raster_t *cups_raster)
+             }
+         }  // for() loop end
+ 
+-        result = imageProcessorEndPage(imageProcessor);
+-        if (result != IPE_SUCCESS){
+-                dbglog("DEBUG: imageProcessorEndPage failed result = %d\n", result);
+-        }
+-
+ 
+         m_Job.NewPage();
+         if (err != NO_ERROR) {
+@@ -800,8 +783,6 @@ int HPCupsFilter::processRasterData(cups_raster_t *cups_raster)
+         rgbRaster = NULL;
+     }
+ 
+-    imageProcessorDestroy(imageProcessor);
+-
+     unlink(hpPreProcessedRasterFile);
+     return ret_status;
+ }
+-- 
+2.24.1
+
diff --git a/nixpkgs/pkgs/misc/drivers/m33-linux/default.nix b/nixpkgs/pkgs/misc/drivers/m33-linux/default.nix
new file mode 100644
index 000000000000..d2ba2685a291
--- /dev/null
+++ b/nixpkgs/pkgs/misc/drivers/m33-linux/default.nix
@@ -0,0 +1,25 @@
+{ lib, stdenv, fetchFromGitHub }:
+
+stdenv.mkDerivation {
+  name = "M33-Linux-2016-06-23";
+
+  src = fetchFromGitHub {
+    owner = "donovan6000";
+    repo = "M3D-Linux";
+    rev = "5c1b90c13d260771dac970b49fdc9f840fee5f4a";
+    sha256 = "1bvbclkyfcv23vxb4s1zssvygklks1nhp4iwi4v90c1fvyz0356f";
+  };
+
+  installPhase = ''
+    install -Dm755 m33-linux $out/bin/m33-linux
+    install -Dm755 90-micro-3d-local.rules $out/lib/udev/rules.d/90-micro-3d-local.rules
+  '';
+
+  meta = with lib; {
+    homepage = "https://github.com/donovan6000/M3D-Linux";
+    description = "A Linux program that can communicate with the Micro 3D printer";
+    license = licenses.gpl2;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ abbradar ];
+  };
+}
diff --git a/nixpkgs/pkgs/misc/drivers/moltengamepad/default.nix b/nixpkgs/pkgs/misc/drivers/moltengamepad/default.nix
new file mode 100644
index 000000000000..486e4e96dd41
--- /dev/null
+++ b/nixpkgs/pkgs/misc/drivers/moltengamepad/default.nix
@@ -0,0 +1,39 @@
+{ lib, stdenv, fetchFromGitHub, udev }:
+
+stdenv.mkDerivation {
+  pname = "moltengamepad-git";
+  version = "2016-05-04";
+
+  src = fetchFromGitHub {
+    owner = "jgeumlek";
+    repo = "MoltenGamepad";
+    rev = "6656357964c22be97227fc5353b53c6ab1e69929";
+    sha256 = "05cpxfzxgm86kxx0a9f76bshjwpz9w1g8bn30ib1i5a3fv7bmirl";
+  };
+
+  hardeningDisable = [ "format" ];
+
+  buildInputs = [ udev ];
+
+  buildPhase = ''
+    make
+  '';
+
+  installPhase = ''
+    mkdir -p $out/bin
+    cp moltengamepad $out/bin
+  '';
+
+  patchPhase = ''
+    sed -i -e '159d;161d;472d;473d;474d;475d' source/eventlists/key_list.cpp
+  '';
+
+  meta = with lib; {
+    homepage = "https://github.com/jgeumlek/MoltenGamepad";
+    description = "Flexible Linux input device translator, geared for gamepads";
+    license = licenses.mit;
+    maintainers = [ maintainers.ebzzry ];
+    platforms = platforms.linux;
+  };
+
+}
diff --git a/nixpkgs/pkgs/misc/drivers/pentablet-driver/default.nix b/nixpkgs/pkgs/misc/drivers/pentablet-driver/default.nix
new file mode 100644
index 000000000000..91564f2db89f
--- /dev/null
+++ b/nixpkgs/pkgs/misc/drivers/pentablet-driver/default.nix
@@ -0,0 +1,38 @@
+{ lib, stdenv, mkDerivation, fetchzip, autoPatchelfHook, libusb1, libX11, libXtst, qtbase, libglvnd }:
+
+mkDerivation rec {
+  pname = "pentablet-driver";
+  version = "1.2.13.1";
+
+  src = fetchzip {
+    url = "https://download01.xp-pen.com/file/2020/04/Linux_Pentablet_V${version}.tar.gz(20200428).zip";
+    sha256 = "1r423hcpi26v82pzl59br1zw5vablikclqsy6mcqi0v5p84hfrdd";
+  } + /Linux_Pentablet_V1.2.13.1.tar.gz;
+
+  nativeBuildInputs = [
+    autoPatchelfHook
+  ];
+
+  buildInputs = [
+    libusb1
+    libX11
+    libXtst
+    qtbase
+    libglvnd
+    stdenv.cc.cc.lib
+  ];
+
+  installPhase = ''
+    mkdir -p $out/bin
+    cp Pentablet_Driver $out/bin/pentablet-driver
+    cp config.xml $out/bin/config.xml
+  '';
+
+  meta = with lib; {
+    homepage = "https://www.xp-pen.com/download-46.html";
+    description = "Driver for XP-PEN Pentablet drawing tablets";
+    license = licenses.unfree;
+    platforms = [ "x86_64-linux" ];
+    maintainers = with maintainers; [ ivar ];
+  };
+}
diff --git a/nixpkgs/pkgs/misc/drivers/postscript-lexmark/default.nix b/nixpkgs/pkgs/misc/drivers/postscript-lexmark/default.nix
new file mode 100644
index 000000000000..ebc6439dd5ca
--- /dev/null
+++ b/nixpkgs/pkgs/misc/drivers/postscript-lexmark/default.nix
@@ -0,0 +1,38 @@
+{ lib, stdenv, fetchurl, rpmextract }:
+let
+  version = "20160218";
+in
+stdenv.mkDerivation {
+  pname = "postscript-lexmark";
+  inherit version;
+
+  src = fetchurl {
+    url = "https://www.openprinting.org/download/printdriver/components/lsb3.2/main/RPMS/noarch/openprinting-ppds-postscript-lexmark-${version}-1lsb3.2.noarch.rpm";
+    sha256 = "0wbhvypdr96a5ddg6kj41dn9sbl49n7pfi2vs762ij82hm2gvwcm";
+  };
+
+  nativeBuildInputs = [ rpmextract ];
+
+  phases = [ "unpackPhase" "installPhase"];
+
+  sourceRoot = ".";
+
+  unpackPhase = ''
+    rpmextract $src
+    for ppd in opt/OpenPrinting-Lexmark/ppds/Lexmark/*; do
+      gzip -d $ppd
+    done
+  '';
+
+  installPhase = ''
+    mkdir -p $out/share/cups/model/postscript-lexmark
+    cp opt/OpenPrinting-Lexmark/ppds/Lexmark/*.ppd $out/share/cups/model/postscript-lexmark/
+    cp -r opt/OpenPrinting-Lexmark/doc $out/doc
+  '';
+
+  meta = with lib; {
+    homepage = "http://www.openprinting.org/driver/Postscript-Lexmark/";
+    description = "Lexmark Postscript Drivers";
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/misc/drivers/sc-controller/default.nix b/nixpkgs/pkgs/misc/drivers/sc-controller/default.nix
new file mode 100644
index 000000000000..ff5fb6e5ee76
--- /dev/null
+++ b/nixpkgs/pkgs/misc/drivers/sc-controller/default.nix
@@ -0,0 +1,63 @@
+{ lib, buildPythonApplication, fetchFromGitHub, wrapGAppsHook
+, gtk3, gobject-introspection, libappindicator-gtk3, librsvg
+, evdev, pygobject3, pylibacl, pytest, bluez
+, linuxHeaders
+, libX11, libXext, libXfixes, libusb1, udev
+}:
+
+buildPythonApplication rec {
+  pname = "sc-controller";
+  version = "0.4.7";
+
+  src = fetchFromGitHub {
+    owner  = "kozec";
+    repo   = pname;
+    rev    = "v${version}";
+    sha256 = "1dskjh5qcjf4x21n4nk1zvdfivbgimsrc2lq1id85bibzps29499";
+  };
+
+  # see https://github.com/NixOS/nixpkgs/issues/56943
+  strictDeps = false;
+
+  nativeBuildInputs = [ wrapGAppsHook ];
+
+  buildInputs = [ gtk3 gobject-introspection libappindicator-gtk3 librsvg ];
+
+  propagatedBuildInputs = [ evdev pygobject3 pylibacl ];
+
+  checkInputs = [ pytest ];
+
+  postPatch = ''
+    substituteInPlace scc/paths.py --replace sys.prefix "'$out'"
+    substituteInPlace scc/uinput.py --replace /usr/include ${linuxHeaders}/include
+    substituteInPlace scc/device_monitor.py --replace "find_library('bluetooth')" "'libbluetooth.so.3'"
+  '';
+
+  LD_LIBRARY_PATH = lib.makeLibraryPath [ libX11 libXext libXfixes libusb1 udev bluez ];
+
+  preFixup = ''
+    gappsWrapperArgs+=(--prefix LD_LIBRARY_PATH : "$LD_LIBRARY_PATH")
+  '';
+
+  postFixup = ''
+    (
+      # scc runs these scripts as programs. (See find_binary() in scc/tools.py.)
+      cd $out/lib/python*/site-packages/scc/x11
+      patchPythonScript scc-autoswitch-daemon.py
+      patchPythonScript scc-osd-daemon.py
+    )
+  '';
+
+  checkPhase = ''
+    PYTHONPATH=. py.test
+  '';
+
+  meta = with lib; {
+    homepage    = "https://github.com/kozec/sc-controller";
+    # donations: https://www.patreon.com/kozec
+    description = "User-mode driver and GUI for Steam Controller and other controllers";
+    license     = licenses.gpl2;
+    platforms   = platforms.linux;
+    maintainers = with maintainers; [ orivej rnhmjoj ];
+  };
+}
diff --git a/nixpkgs/pkgs/misc/drivers/spacenavd/default.nix b/nixpkgs/pkgs/misc/drivers/spacenavd/default.nix
new file mode 100644
index 000000000000..734b2229c877
--- /dev/null
+++ b/nixpkgs/pkgs/misc/drivers/spacenavd/default.nix
@@ -0,0 +1,26 @@
+{ stdenv, lib, fetchFromGitHub, libX11 }:
+
+stdenv.mkDerivation rec {
+  version = "0.8";
+  pname = "spacenavd";
+
+  src = fetchFromGitHub {
+    owner = "FreeSpacenav";
+    repo = "spacenavd";
+    rev = "v${version}";
+    sha256 = "1zz0cm5cgvp9s5n4nzksl8rb11c7sw214bdafzra74smvqfjcjcf";
+  };
+
+  buildInputs = [ libX11 ];
+
+  configureFlags = [ "--disable-debug"];
+
+  meta = with lib; {
+    homepage = "http://spacenav.sourceforge.net/";
+    description = "Device driver and SDK for 3Dconnexion 3D input devices";
+    longDescription = "A free, compatible alternative, to the proprietary 3Dconnexion device driver and SDK, for their 3D input devices (called 'space navigator', 'space pilot', 'space traveller', etc)";
+    license = licenses.gpl3Plus;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ sohalt ];
+  };
+}
diff --git a/nixpkgs/pkgs/misc/drivers/steamcontroller/default.nix b/nixpkgs/pkgs/misc/drivers/steamcontroller/default.nix
new file mode 100644
index 000000000000..db5c8e5d903b
--- /dev/null
+++ b/nixpkgs/pkgs/misc/drivers/steamcontroller/default.nix
@@ -0,0 +1,37 @@
+{ lib, fetchFromGitHub, python3Packages, libusb1, linuxHeaders
+, GyroplotSupport ? false
+}:
+
+with python3Packages;
+
+buildPythonApplication {
+  pname = "steamcontroller";
+  version = "2017-08-11";
+
+  src = fetchFromGitHub {
+    owner  = "ynsta";
+    repo   = "steamcontroller";
+    rev    = "80928ce237925e0d0d7a65a45b481435ba6b931e";
+    sha256 = "0lv9j2zv8fmkmc0x9r7fa8zac2xrwfczms35qz1nfa1hr84wniid";
+  };
+
+  postPatch = ''
+    substituteInPlace src/uinput.py --replace \
+      "/usr/include" "${linuxHeaders}/include"
+  '';
+
+  buildInputs = [ libusb1 ];
+  propagatedBuildInputs = [ psutil python3Packages.libusb1 ]
+    ++ lib.optionals GyroplotSupport [ pyqtgraph pyside ];
+
+  doCheck = false;
+  pythonImportsCheck = [ "steamcontroller" ];
+
+  meta = with lib; {
+    description = "A standalone Steam controller driver";
+    homepage    = "https://github.com/ynsta/steamcontroller";
+    license     = licenses.mit;
+    maintainers = with maintainers; [ rnhmjoj ];
+    platforms   = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/misc/drivers/sundtek/default.nix b/nixpkgs/pkgs/misc/drivers/sundtek/default.nix
new file mode 100644
index 000000000000..d52f9dd7cde3
--- /dev/null
+++ b/nixpkgs/pkgs/misc/drivers/sundtek/default.nix
@@ -0,0 +1,51 @@
+{ fetchurl, lib, stdenv }:
+
+with lib;
+
+let
+  version = "2016-01-26";
+  rpath = makeLibraryPath [ "$out/lib" "$out/bin" ];
+  platform = with stdenv;
+    if isx86_64 then "64bit"
+    else
+    if isi686 then "32bit"
+    else throw "${system} not considered in build derivation. Might still be supported.";
+
+in
+  stdenv.mkDerivation {
+    src = fetchurl {
+      url = "http://www.sundtek.de/media/netinst/${platform}/installer.tar.gz";
+      sha256 = "15y6r5w306pcq4g1rn9f7vf70f3a7qhq237ngaf0wxh2nr0aamxp";
+    };
+    pname = "sundtek";
+    inherit version;
+
+    phases = [ "unpackPhase" "installPhase" "fixupPhase" ];
+
+    sourceRoot = ".";
+
+    installPhase = ''
+      cp -r opt $out
+
+      # add and fix pkg-config file
+      mkdir -p $out/lib/pkgconfig
+      substitute $out/doc/libmedia.pc $out/lib/pkgconfig/libmedia.pc \
+        --replace /opt $out
+    '';
+
+    postFixup = ''
+      find $out -type f -exec \
+        patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" {} \
+        patchelf --set-rpath ${rpath} {} \;
+    '';
+
+    preferLocalBuild = true;
+
+    meta = {
+      description = "Sundtek MediaTV driver";
+      maintainers = [ maintainers.simonvandel ];
+      platforms = platforms.unix;
+      license = licenses.unfree;
+      homepage = "https://support.sundtek.com/index.php/topic,1573.0.html";
+    };
+  }
diff --git a/nixpkgs/pkgs/misc/drivers/utsushi/default.nix b/nixpkgs/pkgs/misc/drivers/utsushi/default.nix
new file mode 100644
index 000000000000..ae3a083148ba
--- /dev/null
+++ b/nixpkgs/pkgs/misc/drivers/utsushi/default.nix
@@ -0,0 +1,152 @@
+{ lib, stdenv, writeScriptBin, fetchFromGitLab, autoreconfHook, pkg-config
+, autoconf-archive, libxslt, boost , gtkmm2 , imagemagick, sane-backends
+, tesseract4, udev, libusb1, gnum4 }:
+
+
+let
+  fakegit = writeScriptBin "git" ''
+    #! ${stdenv.shell} -e
+    if [ "$1" = "describe" ]; then
+      [ -r .rev ] && cat .rev || true
+    fi
+  '';
+in stdenv.mkDerivation rec {
+  pname = "utsushi";
+  version = "unstable-2021-01-01";
+
+  src = fetchFromGitLab {
+    owner = pname;
+    repo = pname;
+    rev = "1646d7d301f3d2aeb24930696688853fed5f0d43";
+    sha256 = "1g9m00qljhlw56h3hgfq67ywf4r92nl37m7x5mxa7ygaxc0dyb14";
+  };
+
+  nativeBuildInputs = [
+    autoreconfHook
+    pkg-config
+    autoconf-archive
+    fakegit
+    libxslt
+  ];
+
+  buildInputs = [
+    boost.dev
+    gtkmm2.dev
+    imagemagick
+    sane-backends
+    udev.dev
+    libusb1.dev
+  ];
+
+  NIX_CFLAGS_COMPILE = [
+    "-Wno-error=deprecated-declarations"
+    "-Wno-error=parentheses"
+    "-Wno-error=unused-variable"
+  ];
+
+
+  postPatch = ''
+    # create fake udev and sane config
+    mkdir -p $out/etc/{sane.d,udev/rules.d}
+    touch $out/etc/sane.d/dll.conf
+    # absolute paths to convert & tesseract
+    sed -i '/\[AC_DEFINE(\[HAVE_IMAGE_MAGICK\], \[1\])/a \             MAGICK_CONVERT="${imagemagick}/bin/convert"' configure.ac
+    substituteInPlace filters/magick.cpp \
+      --replace 'convert ' '${imagemagick}/bin/convert '
+    substituteInPlace filters/reorient.cpp \
+      --replace '"tesseract' '"${tesseract4}/bin/tesseract'
+    substituteInPlace filters/get-text-orientation \
+      --replace '=tesseract' '=${tesseract4}/bin/tesseract'
+  '';
+
+  configureFlags = [
+    "--with-boost-libdir=${boost}/lib"
+    "--with-sane-confdir=${placeholder "out"}/etc/sane.d"
+    "--with-udev-confdir=${placeholder "out"}/etc/udev"
+    "--with-gtkmm"
+    "--with-jpeg"
+    "--with-magick"
+    "--with-magick-pp"
+    "--with-sane"
+    "--with-tiff"
+  ];
+
+  installFlags = [ "SANE_BACKENDDIR=${placeholder "out"}/lib/sane" ];
+
+  enableParallelBuilding = true;
+
+  doInstallCheck = false;
+
+  meta = with lib; {
+    description = "SANE utsushi backend for some Epson scanners";
+    longDescription = ''
+      ImageScanV3 (aka utsushi) scanner driver. Non-free plugins are not
+      included, so no network support. To use the SANE backend, in
+      <literal>/etc/nixos/configuration.nix</literal>:
+
+      <literal>
+      hardware.sane = {
+        enable = true;
+        extraBackends = [ pkgs.utsushi ];
+      };
+      services.udev.packages = [ pkgs.utsushi ];
+      </literal>
+
+      Supported hardware:
+      DS-1610, DS-1630, DS-1660W, DS-310, DS-320, DS-360W, DS-40, DS-410,
+      DS-50000, DS-510, DS-520, DS-530, DS-535, DS-535H, DS-5500, DS-560,
+      DS-570W, DS-575W, DS-60000, DS-6500, DS-70, DS-70000, DS-7500, DS-760,
+      DS-770, DS-775, DS-780N, DS-80W, DS-860, EC-4020 Series, EC-4030 Series,
+      EC-4040 Series, EP-10VA Series, EP-30VA Series, EP-708A Series, EP-709A
+      Series, EP-710A Series, EP-711A Series, EP-712A Series, EP-808A Series,
+      EP-810A Series, EP-811A Series, EP-812A Series, EP-879A Series, EP-880A
+      Series, EP-881A Series, EP-882A Series, EP-978A3 Series, EP-979A3 Series,
+      EP-982A3 Series, EP-M570T Series, ES-200, ES-300W, ES-300WR, ES-400,
+      ES-50, ES-50, ES-500W, ES-500WR, ES-55R, ES-60W, ES-60WB, ES-60WW,
+      ES-65WR, ET-16500 Series, ET-2500 Series, ET-2550 Series, ET-2600 Series,
+      ET-2610 Series, ET-2650 Series, ET-2700 Series, ET-2710 Series, ET-2720
+      Series, ET-2750 Series, ET-2760 Series, ET-3600 Series, ET-3700 Series,
+      ET-3710 Series, ET-3750 Series, ET-3760 Series, ET-4500 Series, ET-4550
+      Series, ET-4700 Series, ET-4750 Series, ET-4760 Series, ET-7700 Series,
+      ET-7750 Series, ET-8700 Series, ET-M2140 Series, ET-M2170 Series,
+      ET-M3140 Series, ET-M3170 Series, ET-M3180 Series, EW-052A Series,
+      EW-452A Series, EW-M5071FT Series, EW-M571T Series, EW-M630T Series,
+      EW-M660FT Series, EW-M670FT Series, EW-M770T Series, EW-M970A3T Series,
+      FF-640, FF-680W, GT-S650, L1455 Series, L220 Series, L222 Series, L3050
+      Series, L3060 Series, L3070 Series, L3100 Series, L3110 Series, L3150
+      Series, L3160 Series, L360 Series, L362 Series, L364 Series, L365 Series,
+      L366 Series, L375 Series, L380 Series, L382 Series, L385 Series, L386
+      Series, L395 Series, L396 Series, L405 Series, L4150 Series, L4160
+      Series, L455 Series, L475 Series, L485 Series, L486 Series, L495 Series,
+      L5190 Series, L565 Series, L566 Series, L575 Series, L605 Series, L6160
+      Series, L6170 Series, L6190 Series, L655 Series, L7160 Series, L7180
+      Series, LX-10000F, LX-10000FK, LX-10010MF, LX-7000F, M2140 Series, M2170
+      Series, M3140 Series, M3170 Series, M3180 Series, PX-048A Series, PX-049A
+      Series, PX-M160T Series, PX-M270FT Series, PX-M270T Series, PX-M380F,
+      PX-M381FL, PX-M5080F Series, PX-M5081F Series, PX-M680F Series, PX-M7050
+      Series, PX-M7050FP, PX-M7050FX, PX-M7070FX, PX-M7110F, PX-M7110FP,
+      PX-M780F Series, PX-M781F Series, PX-M840FX, PX-M860F, PX-M880FX,
+      PX-M884F, PX-M885F, PX-M886FL, Perfection V19, Perfection V39, ST-2000
+      Series, ST-3000 Series, ST-4000 Series, ST-M3000 Series, WF-2750 Series,
+      WF-2760 Series, WF-2810 Series, WF-2830 Series, WF-2850 Series, WF-2860
+      Series, WF-3720 Series, WF-3730 Series, WF-4720 Series, WF-4730 Series,
+      WF-4740 Series, WF-6530 Series, WF-6590 Series, WF-7710 Series, WF-7720
+      Series, WF-8510 Series, WF-8590 Series, WF-C17590 Series, WF-C20590
+      Series, WF-C5710 Series, WF-C5790 Series, WF-C5790BA, WF-C579R Series,
+      WF-C579RB, WF-C8610 Series, WF-C8690 Series, WF-C8690B, WF-C869R Series,
+      WF-M20590 Series, WF-M5799 Series, WF-R8590 Series, XP-2100 Series,
+      XP-220 Series, XP-230 Series, XP-235 Series, XP-240 Series, XP-243 245
+      247 Series, XP-255 257 Series, XP-3100 Series, XP-332 335 Series, XP-340
+      Series, XP-342 343 345 Series, XP-352 355 Series, XP-4100 Series, XP-430
+      Series, XP-432 435 Series, XP-440 Series, XP-442 445 Series, XP-452 455
+      Series, XP-5100 Series, XP-530 Series, XP-540 Series, XP-6000 Series,
+      XP-6100 Series, XP-630 Series, XP-640 Series, XP-7100 Series, XP-830
+      Series, XP-8500 Series, XP-8600 Series, XP-900 Series, XP-960 Series,
+      XP-970 Series
+    '';
+    homepage = "https://gitlab.com/utsushi/imagescan";
+    license = licenses.gpl3Plus;
+    maintainers = with maintainers; [ wucke13 maxwilson ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/misc/drivers/xboxdrv/default.nix b/nixpkgs/pkgs/misc/drivers/xboxdrv/default.nix
new file mode 100644
index 000000000000..e2894802839e
--- /dev/null
+++ b/nixpkgs/pkgs/misc/drivers/xboxdrv/default.nix
@@ -0,0 +1,28 @@
+{ lib, stdenv, fetchurl, sconsPackages, libX11, pkg-config
+, libusb1, boost, glib, dbus-glib }:
+
+let
+  version = "0.8.8";
+in stdenv.mkDerivation {
+  pname = "xboxdrv";
+  inherit version;
+
+  src = fetchurl {
+    url = "https://github.com/xboxdrv/xboxdrv/archive/v${version}.tar.gz";
+    sha256 = "0jx2wqmc7602dxyj19n3h8x0cpy929h7c0h39vcc5rf0q74fh3id";
+  };
+
+  makeFlags = [ "PREFIX=$(out)" ];
+  nativeBuildInputs = [ pkg-config sconsPackages.scons_3_1_2 ];
+  buildInputs = [ libX11 libusb1 boost glib dbus-glib ];
+  dontUseSconsInstall = true;
+
+  meta = with lib; {
+    homepage = "https://pingus.seul.org/~grumbel/xboxdrv/";
+    description = "Xbox/Xbox360 (and more) gamepad driver for Linux that works in userspace";
+    license = licenses.gpl3Plus;
+    maintainers = [ ];
+    platforms = platforms.linux;
+  };
+
+}
diff --git a/nixpkgs/pkgs/misc/drivers/xow/default.nix b/nixpkgs/pkgs/misc/drivers/xow/default.nix
new file mode 100644
index 000000000000..b095d61d9876
--- /dev/null
+++ b/nixpkgs/pkgs/misc/drivers/xow/default.nix
@@ -0,0 +1,45 @@
+{ lib, stdenv, cabextract, fetchurl, fetchFromGitHub, libusb1 }:
+
+stdenv.mkDerivation rec {
+  pname = "xow";
+  version = "0.5";
+
+  src = fetchFromGitHub {
+    owner = "medusalix";
+    repo = "xow";
+    rev = "v${version}";
+    sha256 = "071r2kx44k1sc49cad3i607xg618mf34ki1ykr5lnfx9y6qyz075";
+  };
+
+  firmware = fetchurl {
+    url = "http://download.windowsupdate.com/c/msdownload/update/driver/drvs/2017/07/1cd6a87c-623f-4407-a52d-c31be49e925c_e19f60808bdcbfbd3c3df6be3e71ffc52e43261e.cab";
+    sha256 = "013g1zngxffavqrk5jy934q3bdhsv6z05ilfixdn8dj0zy26lwv5";
+  };
+
+  makeFlags = [
+    "BUILD=RELEASE"
+    "VERSION=${version}"
+    "BINDIR=${placeholder "out"}/bin"
+    "UDEVDIR=${placeholder "out"}/lib/udev/rules.d"
+    "MODLDIR=${placeholder "out"}/lib/modules-load.d"
+    "MODPDIR=${placeholder "out"}/lib/modprobe.d"
+    "SYSDDIR=${placeholder "out"}/lib/systemd/system"
+  ];
+
+  postUnpack = ''
+    cabextract -F FW_ACC_00U.bin ${firmware}
+    mv FW_ACC_00U.bin source/firmware.bin
+  '';
+
+  enableParallelBuilding = true;
+  nativeBuildInputs = [ cabextract ];
+  buildInputs = [ libusb1 ];
+
+  meta = with lib; {
+    homepage = "https://github.com/medusalix/xow";
+    description = "Linux driver for the Xbox One wireless dongle";
+    license = licenses.gpl2Plus;
+    maintainers = [ maintainers.jansol ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/misc/drivers/xwiimote/default.nix b/nixpkgs/pkgs/misc/drivers/xwiimote/default.nix
new file mode 100644
index 000000000000..8fafd1b6ebcc
--- /dev/null
+++ b/nixpkgs/pkgs/misc/drivers/xwiimote/default.nix
@@ -0,0 +1,26 @@
+{ lib, stdenv, udev, ncurses, pkg-config, fetchurl, bluez }:
+
+stdenv.mkDerivation rec {
+  name = "xwiimote-2";
+  src = fetchurl {
+    url = "https://github.com/dvdhrm/xwiimote/releases/download/${name}/${name}.tar.xz";
+    sha256 = "1g9cbhblll47l300zr999xr51x2g98y49l222f77fhswd12kjzhd";
+  };
+
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = [ udev ncurses bluez ];
+
+  configureFlags = [ "--with-doxygen=no" ];
+
+  meta = {
+    homepage = "http://dvdhrm.github.io/xwiimote";
+    description = "Userspace utilities to control connected Nintendo Wii Remotes";
+    platforms = lib.platforms.linux;
+    license = lib.licenses.mit;
+  };
+
+  postInstallPhase = ''
+    mkdir -p "$out/etc/X11/xorg.conf.d/"
+    cp "res/50-xorg-fix-xwiimote.conf" "$out/etc/X11/xorg.conf.d/50-fix-xwiimote.conf"
+  '';
+}
diff --git a/nixpkgs/pkgs/misc/dumb/default.nix b/nixpkgs/pkgs/misc/dumb/default.nix
new file mode 100644
index 000000000000..9b733e00f69c
--- /dev/null
+++ b/nixpkgs/pkgs/misc/dumb/default.nix
@@ -0,0 +1,29 @@
+{ lib, stdenv, fetchFromGitHub, cmake, allegro, SDL2 }:
+
+stdenv.mkDerivation rec {
+  pname = "dumb";
+  version = "2.0.3";
+
+  nativeBuildInputs = [ cmake ];
+  buildInputs = [ allegro SDL2 ];
+
+  src = fetchFromGitHub {
+    owner = "kode54";
+    repo = "dumb";
+    rev = version;
+    sha256 = "1cnq6rb14d4yllr0yi32p9jmcig8avs3f43bvdjrx4r1mpawspi6";
+  };
+
+  cmakeFlags = [
+    "-DCMAKE_BUILD_TYPE='Release'"
+    "-DBUILD_EXAMPLES='OFF'"
+  ];
+
+  meta = with lib; {
+    homepage = "https://github.com/kode54/dumb";
+    description = "Module/tracker based music format parser and player library";
+    license = licenses.free;  # Derivative of GPL
+    maintainers = with maintainers; [ chiiruno ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/misc/emulators/atari++/default.nix b/nixpkgs/pkgs/misc/emulators/atari++/default.nix
new file mode 100644
index 000000000000..2019820510ef
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/atari++/default.nix
@@ -0,0 +1,32 @@
+{ lib, stdenv, fetchurl, libSM, libX11, libICE, SDL, alsaLib, gcc-unwrapped, libXext }:
+
+stdenv.mkDerivation rec {
+  pname = "atari++";
+  version = "1.83";
+
+  src = fetchurl {
+    url = "http://www.xl-project.com/download/${pname}_${version}.tar.gz";
+    sha256 = "04fm2ic2qi4a52mi72wcaxyrpll4k8vvchx3qrik8rhg3jrxgm47";
+  };
+
+  buildInputs = [ libSM libX11 SDL libICE alsaLib gcc-unwrapped libXext ];
+
+  postFixup = ''
+    patchelf --set-rpath ${lib.makeLibraryPath buildInputs} "$out/bin/atari++"
+  '';
+
+  meta = with lib; {
+    homepage = "http://www.xl-project.com/";
+    description = "An enhanced, cycle-accurated Atari emulator";
+    longDescription = ''
+      The Atari++ Emulator is a Unix based emulator of the Atari eight
+      bit computers, namely the Atari 400 and 800, the Atari 400XL,
+      800XL and 130XE, and the Atari 5200 game console. The emulator
+      is auto-configurable and will compile on a variety of systems
+      (Linux, Solaris, Irix).
+    '';
+    maintainers = [ maintainers.AndersonTorres ];
+    license = licenses.gpl2Plus;
+    platforms = lib.platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/misc/emulators/atari800/default.nix b/nixpkgs/pkgs/misc/emulators/atari800/default.nix
new file mode 100644
index 000000000000..53f1009cfad5
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/atari800/default.nix
@@ -0,0 +1,43 @@
+{ lib, stdenv, fetchFromGitHub, autoreconfHook
+, unzip, zlib, SDL, readline, libGLU, libGL, libX11 }:
+
+with lib;
+stdenv.mkDerivation rec {
+  pname = "atari800";
+  version = "4.2.0";
+
+  src = fetchFromGitHub {
+    owner = "atari800";
+    repo = "atari800";
+    rev = "ATARI800_${replaceChars ["."] ["_"] version}";
+    sha256 = "15l08clqqayi9izrgsz9achan6gl4x57wqsc8mad3yn0xayzz3qy";
+  };
+
+  nativeBuildInputs = [ autoreconfHook unzip ];
+
+  buildInputs = [ zlib SDL readline libGLU libGL libX11 ];
+
+  configureFlags = [
+    "--target=default"
+    "--with-video=sdl"
+    "--with-sound=sdl"
+    "--with-readline"
+    "--with-opengl"
+    "--with-x"
+    "--enable-riodevice"
+  ];
+
+  meta = {
+    homepage = "https://atari800.github.io/";
+    description = "An Atari 8-bit emulator";
+    longDescription = ''
+      Atari800 is the emulator of Atari 8-bit computer systems and
+      5200 game console for Unix, Linux, Amiga, MS-DOS, Atari
+      TT/Falcon, MS-Windows, MS WinCE, Sega Dreamcast, Android and
+      other systems supported by the SDL library.
+    '';
+    maintainers = [ maintainers.AndersonTorres ];
+    license = licenses.gpl2Plus;
+    platforms = lib.platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/misc/emulators/attract-mode/default.nix b/nixpkgs/pkgs/misc/emulators/attract-mode/default.nix
new file mode 100644
index 000000000000..92c42a1d3943
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/attract-mode/default.nix
@@ -0,0 +1,33 @@
+{ expat, fetchFromGitHub, ffmpeg_3, fontconfig, freetype, libarchive, libjpeg
+, libGLU, libGL, openal, pkg-config, sfml, lib, stdenv, zlib
+}:
+
+stdenv.mkDerivation rec {
+  pname = "attract-mode";
+  version = "2.6.1";
+
+  src = fetchFromGitHub {
+    owner = "mickelson";
+    repo = "attract";
+    rev = "v${version}";
+    sha256 = "16p369j0hanm0l2fiy6h9d9pn0f3qblcy9l39all6h7rfxnhp9ii";
+  };
+
+  nativeBuildInputs = [ pkg-config ];
+
+  patchPhase = ''
+    sed -i "s|prefix=/usr/local|prefix=$out|" Makefile
+  '';
+
+  buildInputs = [
+    expat ffmpeg_3 fontconfig freetype libarchive libjpeg libGLU libGL openal sfml zlib
+  ];
+
+  meta = with lib; {
+    description = "A frontend for arcade cabinets and media PCs";
+    homepage = "http://attractmode.org";
+    license = licenses.gpl3Plus;
+    maintainers = with maintainers; [ hrdinka ];
+    platforms = with platforms; linux;
+  };
+}
diff --git a/nixpkgs/pkgs/misc/emulators/blastem/default.nix b/nixpkgs/pkgs/misc/emulators/blastem/default.nix
new file mode 100644
index 000000000000..a2dc86449d9e
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/blastem/default.nix
@@ -0,0 +1,51 @@
+{ lib, stdenv, fetchurl, fetchFromGitHub, pkg-config, SDL2, glew, xcftools, python, pillow, makeWrapper }:
+
+let
+  vasm =
+    stdenv.mkDerivation {
+      pname = "vasm";
+      version = "1.8c";
+      src = fetchFromGitHub {
+        owner = "mbitsnbites";
+        repo = "vasm";
+        rev = "244f8bbbdf64ae603f9f6c09a3067943837459ec";
+        sha256 = "0x4y5q7ygxfjfy2wxijkps9khsjjfb169sbda410vaw0m88wqj5p";
+      };
+      makeFlags = [ "CPU=m68k" "SYNTAX=mot" ];
+      installPhase = ''
+        mkdir -p $out/bin
+        cp vasmm68k_mot $out/bin
+      '';
+    };
+in
+stdenv.mkDerivation {
+  pname = "blastem";
+  version = "0.5.1";
+  src = fetchurl {
+    url = "https://www.retrodev.com/repos/blastem/archive/3d48cb0c28be.tar.gz";
+    sha256 = "07wzbmzp0y8mh59jxg81q17gqagz3psxigxh8dmzsipgg68y6a8r";
+  };
+  nativeBuildInputs = [ makeWrapper ];
+  buildInputs = [ pkg-config SDL2 glew xcftools python pillow vasm ];
+  preBuild = ''
+    patchShebangs img2tiles.py
+  '';
+  postBuild = ''
+    make menu.bin
+  '';
+  installPhase = ''
+    mkdir -p $out/bin $out/share/blastem
+    cp -r {blastem,menu.bin,default.cfg,rom.db,shaders} $out/share/blastem/
+    makeWrapper $out/share/blastem/blastem $out/bin/blastem
+  '';
+
+  meta = {
+    homepage = "https://www.retrodev.com/blastem/";
+    description = "The fast and accurate Genesis emulator";
+    maintainers = with lib.maintainers; [ puffnfresh ];
+    license = lib.licenses.gpl3;
+    platforms = lib.platforms.linux;
+    # Makefile:140: *** aarch64 is not a supported architecture.  Stop.
+    badPlatforms = [ "aarch64-linux" ];
+  };
+}
diff --git a/nixpkgs/pkgs/misc/emulators/bsod/default.nix b/nixpkgs/pkgs/misc/emulators/bsod/default.nix
new file mode 100644
index 000000000000..872ee8571f30
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/bsod/default.nix
@@ -0,0 +1,31 @@
+{lib, stdenv, fetchurl, ncurses}:
+
+stdenv.mkDerivation {
+  name = "bsod-0.1";
+
+  src = fetchurl {
+    url = "https://www.vanheusden.com/bsod/bsod-0.1.tgz";
+    sha256 = "0hqwacazyq5rhc04j8w8w0j0dgb6ca8k66c9lxf6bsyi6wvbhvmd";
+  };
+
+  buildInputs = [ ncurses ];
+
+  installPhase = ''
+    mkdir -p $out/bin
+    cp bsod $out/bin
+  '';
+
+  meta = {
+    description = "Blue Screen Of Death emulator for Unix";
+    longDescription = "
+      This program will let you UNIX user experience the authentic
+      microsoft windows experience.  Bsod displays the famous windows xp
+      blue screen of death on the console.  Errors and drivers causing the
+      error are selected randomly from a large set of examples.";
+    homepage = "http://www.vanheusden.com/bsod/";
+    license = lib.licenses.gpl2;
+    platforms = lib.platforms.unix;
+    maintainers = [ lib.maintainers.antono ];
+  };
+
+}
diff --git a/nixpkgs/pkgs/misc/emulators/caprice32/default.nix b/nixpkgs/pkgs/misc/emulators/caprice32/default.nix
new file mode 100644
index 000000000000..3e20ba616423
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/caprice32/default.nix
@@ -0,0 +1,47 @@
+{ lib, stdenv, fetchFromGitHub, desktop-file-utils, libpng
+, pkg-config, SDL, freetype, zlib }:
+
+stdenv.mkDerivation rec {
+
+  pname = "caprice32";
+  version = "4.6.0";
+
+  src = fetchFromGitHub {
+    repo = "caprice32";
+    rev = "v${version}";
+    owner = "ColinPitrat";
+    sha256 = "0hng5krwgc1h9bz1xlkp2hwnvas965nd7sb3z9mb2m6x9ghxlacz";
+  };
+
+  nativeBuildInputs = [ desktop-file-utils pkg-config ];
+  buildInputs = [ libpng SDL freetype zlib ];
+
+  makeFlags = [
+    "APP_PATH=${placeholder "out"}/share/caprice32"
+    "RELEASE=1"
+    "DESTDIR=${placeholder "out"}"
+    "prefix=/"
+  ];
+
+  postInstall = ''
+    mkdir -p $out/share/icons/
+    mv $out/share/caprice32/resources/freedesktop/caprice32.png $out/share/icons/
+    mv $out/share/caprice32/resources/freedesktop/emulators.png $out/share/icons/
+
+    desktop-file-install --dir $out/share/applications \
+      $out/share/caprice32/resources/freedesktop/caprice32.desktop
+
+    desktop-file-install --dir $out/share/desktop-directories \
+      $out/share/caprice32/resources/freedesktop/Emulators.directory
+
+    install -Dm644 $out/share/caprice32/resources/freedesktop/caprice32.menu -t $out/etc/xdg/menus/applications-merged/
+  '';
+
+  meta = with lib; {
+    description = "A complete emulation of CPC464, CPC664 and CPC6128";
+    homepage = "https://github.com/ColinPitrat/caprice32";
+    license = licenses.gpl2;
+    maintainers = [ ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/misc/emulators/ccemux/default.nix b/nixpkgs/pkgs/misc/emulators/ccemux/default.nix
new file mode 100644
index 000000000000..11f24d59e5c3
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/ccemux/default.nix
@@ -0,0 +1,67 @@
+{ lib, stdenv, fetchurl, makeDesktopItem, makeWrapper, jre
+, useCCTweaked ? true
+}:
+
+let
+  version = "1.1.1";
+  rev = "af12e2e4da586275ba931eae8f40a2201251bf59";
+
+  baseUrl = "https://emux.cc/versions/${lib.substring 0 8 rev}/CCEmuX";
+  jar =
+    if useCCTweaked
+    then fetchurl {
+      url = "${baseUrl}-cct.jar";
+      sha256 = "0d9gzi1h5vz32fp4lfn7dam189jcm7bwbqwmlpj0c47p8l0d4lsv";
+    }
+    else fetchurl {
+      url = "${baseUrl}-cc.jar";
+      sha256 = "0ky5vxh8m1v98zllifxif8xxd25j2xdp19hjnj4xlkck71lbnb34";
+    };
+
+  desktopIcon = fetchurl {
+    url = "https://github.com/CCEmuX/CCEmuX/raw/${rev}/src/main/resources/img/icon.png";
+    sha256 = "1vmb6rg9k2y99j8xqfgbsvfgfi3g985rmqwrd7w3y54ffr2r99c2";
+  };
+  desktopItem =  makeDesktopItem {
+    name = "CCEmuX";
+    exec = "ccemux";
+    icon = desktopIcon;
+    comment = "A modular ComputerCraft emulator";
+    desktopName = "CCEmuX";
+    genericName = "ComputerCraft Emulator";
+    categories = "Emulator;";
+  };
+in
+
+stdenv.mkDerivation rec {
+  pname = "ccemux";
+  inherit version;
+
+  src = jar;
+  dontUnpack = true;
+
+  nativeBuildInputs = [ makeWrapper ];
+  buildInputs = [ jre ];
+
+  installPhase = ''
+    runHook preInstall
+
+    mkdir -p $out/{bin,share/ccemux}
+    cp -r ${desktopItem}/share/applications $out/share/applications
+
+    install -D ${src} $out/share/ccemux/ccemux.jar
+    install -D ${desktopIcon} $out/share/pixmaps/ccemux.png
+
+    makeWrapper ${jre}/bin/java $out/bin/ccemux \
+      --add-flags "-jar $out/share/ccemux/ccemux.jar"
+
+    runHook postInstall
+  '';
+
+  meta = with lib; {
+    description = "A modular ComputerCraft emulator";
+    homepage = "https://github.com/CCEmuX/CCEmuX";
+    license = licenses.mit;
+    maintainers = with maintainers; [ CrazedProgrammer ];
+  };
+}
diff --git a/nixpkgs/pkgs/misc/emulators/cdemu/analyzer.nix b/nixpkgs/pkgs/misc/emulators/cdemu/analyzer.nix
new file mode 100644
index 000000000000..246dbb7dd350
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/cdemu/analyzer.nix
@@ -0,0 +1,21 @@
+{ callPackage, makeWrapper, gobject-introspection, cmake
+, python3Packages, gtk3, glib, libxml2, gnuplot, gnome3, gdk-pixbuf, librsvg, intltool, libmirage }:
+let pkg = import ./base.nix {
+  version = "3.2.3";
+  pkgName = "image-analyzer";
+  pkgSha256 = "17yfjmf65s77214qassz6l01cjcni4cv06nzfsm7qrzw172fmci4";
+};
+in callPackage pkg {
+  buildInputs = [ glib gtk3 libxml2 gnuplot libmirage makeWrapper
+                  gnome3.adwaita-icon-theme gdk-pixbuf librsvg intltool
+                  python3Packages.python python3Packages.pygobject3 python3Packages.matplotlib ];
+  drvParams = {
+    nativeBuildInputs = [ gobject-introspection cmake ];
+    postFixup = ''
+      wrapProgram $out/bin/image-analyzer \
+        --set PYTHONPATH "$PYTHONPATH" \
+        --set GI_TYPELIB_PATH "$GI_TYPELIB_PATH" \
+        --prefix XDG_DATA_DIRS : "$out/share:$XDG_ICON_DIRS:$GSETTINGS_SCHEMAS_PATH"
+    '';
+  };
+}
diff --git a/nixpkgs/pkgs/misc/emulators/cdemu/base.nix b/nixpkgs/pkgs/misc/emulators/cdemu/base.nix
new file mode 100644
index 000000000000..6db1089a37f5
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/cdemu/base.nix
@@ -0,0 +1,37 @@
+{ pkgName, version, pkgSha256 }:
+{ lib, stdenv, fetchurl, cmake, pkg-config, buildInputs, drvParams ? {} }:
+let name = "${pkgName}-${version}";
+in stdenv.mkDerivation ({
+  inherit name buildInputs;
+  src = fetchurl {
+    url = "mirror://sourceforge/cdemu/${name}.tar.bz2";
+    sha256 = pkgSha256;
+  };
+  nativeBuildInputs = [ pkg-config cmake ];
+  setSourceRoot = ''
+    mkdir build
+    cd build
+    sourceRoot="`pwd`"
+  '';
+  configurePhase = ''
+    cmake ../${name} -DCMAKE_INSTALL_PREFIX=$out -DCMAKE_BUILD_TYPE=Release -DCMAKE_SKIP_RPATH=ON
+  '';
+  meta = with lib; {
+    description = "A suite of tools for emulating optical drives and discs";
+    longDescription = ''
+      CDEmu consists of:
+
+      - a kernel module implementing a virtual drive-controller
+      - libmirage which is a software library for interpreting optical disc images
+      - a daemon which emulates the functionality of an optical drive+disc
+      - textmode and GTK clients for controlling the emulator
+      - an image analyzer to view the structure of image files
+
+      Optical media emulated by CDemu can be mounted within Linux. Automounting is also allowed.
+    '';
+    homepage = "http://cdemu.sourceforge.net/";
+    license = licenses.gpl2Plus;
+    platforms = platforms.linux;
+    maintainers = with lib.maintainers; [ bendlas ];
+  };
+} // drvParams)
diff --git a/nixpkgs/pkgs/misc/emulators/cdemu/client.nix b/nixpkgs/pkgs/misc/emulators/cdemu/client.nix
new file mode 100644
index 000000000000..087b15cecd16
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/cdemu/client.nix
@@ -0,0 +1,16 @@
+{ callPackage, python3Packages, intltool, makeWrapper }:
+let pkg = import ./base.nix {
+  version = "3.2.3";
+  pkgName = "cdemu-client";
+  pkgSha256 = "1bvc2m63fx03rbp3ihgl2n7k24lwg5ydwkmr84gsjfcxp46q10zq";
+};
+in callPackage pkg {
+  buildInputs = [ python3Packages.python python3Packages.dbus-python python3Packages.pygobject3
+                  intltool makeWrapper ];
+  drvParams = {
+    postFixup = ''
+      wrapProgram $out/bin/cdemu \
+        --set PYTHONPATH "$PYTHONPATH"
+    '';
+  };
+}
diff --git a/nixpkgs/pkgs/misc/emulators/cdemu/daemon.nix b/nixpkgs/pkgs/misc/emulators/cdemu/daemon.nix
new file mode 100644
index 000000000000..db6ed7ddb47a
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/cdemu/daemon.nix
@@ -0,0 +1,9 @@
+{ callPackage, glib, libao, intltool, libmirage }:
+let pkg = import ./base.nix {
+  version = "3.2.3";
+  pkgName = "cdemu-daemon";
+  pkgSha256 = "022xzgwmncswb9md71w3ly3mjkdfc93lbij2llp2jamq8grxjjxr";
+};
+in callPackage pkg {
+  buildInputs = [ glib libao libmirage intltool ];
+}
diff --git a/nixpkgs/pkgs/misc/emulators/cdemu/gui.nix b/nixpkgs/pkgs/misc/emulators/cdemu/gui.nix
new file mode 100644
index 000000000000..599531950a21
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/cdemu/gui.nix
@@ -0,0 +1,23 @@
+{ callPackage, makeWrapper, gobject-introspection, cmake
+, python3Packages, gtk3, glib, libnotify, intltool, gnome3, gdk-pixbuf, librsvg }:
+let
+  pkg = import ./base.nix {
+    version = "3.2.3";
+    pkgName = "gcdemu";
+    pkgSha256 = "19vy1awha8s7cfja3a6npaf3rfy3pl3cbsh4vd609q9jz4v4lyg4";
+  };
+  inherit (python3Packages) python pygobject3;
+in callPackage pkg {
+  buildInputs = [ python pygobject3 gtk3 glib libnotify intltool makeWrapper
+                  gnome3.adwaita-icon-theme gdk-pixbuf librsvg ];
+  drvParams = {
+    nativeBuildInputs = [ gobject-introspection cmake ];
+    postFixup = ''
+      wrapProgram $out/bin/gcdemu \
+        --set PYTHONPATH "$PYTHONPATH" \
+        --set GI_TYPELIB_PATH "$GI_TYPELIB_PATH" \
+        --prefix XDG_DATA_DIRS : "$out/share:$XDG_ICON_DIRS:$GSETTINGS_SCHEMAS_PATH"
+    '';
+    # TODO AppIndicator
+  };
+}
diff --git a/nixpkgs/pkgs/misc/emulators/cdemu/libmirage.nix b/nixpkgs/pkgs/misc/emulators/cdemu/libmirage.nix
new file mode 100644
index 000000000000..9813c906befc
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/cdemu/libmirage.nix
@@ -0,0 +1,18 @@
+{ callPackage, gobject-introspection, cmake, pkg-config
+, glib, libsndfile, zlib, bzip2, xz, libsamplerate, intltool
+, pcre, util-linux, libselinux, libsepol }:
+
+let pkg = import ./base.nix {
+  version = "3.2.3";
+  pkgName = "libmirage";
+  pkgSha256 = "08mfvqyk3833ksfd47i4j3ppmrw5ry219km6h7lywdh9hm9x14yf";
+};
+in callPackage pkg {
+  buildInputs = [ glib libsndfile zlib bzip2 xz libsamplerate intltool ];
+  drvParams = {
+    PKG_CONFIG_GOBJECT_INTROSPECTION_1_0_GIRDIR = "${placeholder "out"}/share/gir-1.0";
+    PKG_CONFIG_GOBJECT_INTROSPECTION_1_0_TYPELIBDIR = "${placeholder "out"}/lib/girepository-1.0";
+    nativeBuildInputs = [ cmake gobject-introspection pkg-config ];
+    propagatedBuildInputs = [ pcre util-linux libselinux libsepol ];
+  };
+}
diff --git a/nixpkgs/pkgs/misc/emulators/cdemu/vhba.nix b/nixpkgs/pkgs/misc/emulators/cdemu/vhba.nix
new file mode 100644
index 000000000000..182469310c41
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/cdemu/vhba.nix
@@ -0,0 +1,24 @@
+{ lib, stdenv, fetchurl, kernel }:
+
+stdenv.mkDerivation rec {
+  pname = "vhba";
+  version = "20190831";
+
+  src  = fetchurl {
+    url = "mirror://sourceforge/cdemu/vhba-module-${version}.tar.bz2";
+    sha256 = "1ybbk6l06n0y11n5wnfmvdz0baizmq55l458ywimghdyz0n7g0ws";
+  };
+
+  makeFlags = [ "KDIR=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build" "INSTALL_MOD_PATH=$(out)" ];
+  nativeBuildInputs = kernel.moduleBuildDependencies;
+
+  hardeningDisable = [ "pic" ];
+
+  meta = with lib; {
+    description = "Provides a Virtual (SCSI) HBA";
+    homepage = "http://cdemu.sourceforge.net/about/vhba/";
+    platforms = platforms.linux;
+    license = licenses.gpl2Plus;
+    maintainers = with lib.maintainers; [ bendlas ];
+  };
+}
diff --git a/nixpkgs/pkgs/misc/emulators/cen64/default.nix b/nixpkgs/pkgs/misc/emulators/cen64/default.nix
new file mode 100644
index 000000000000..ddf455473378
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/cen64/default.nix
@@ -0,0 +1,30 @@
+{ lib, cmake, fetchFromGitHub, libGL, libiconv, libX11, openal, stdenv }:
+
+stdenv.mkDerivation rec {
+  pname = "cen64";
+  version = "unstable-2021-03-12";
+
+  src = fetchFromGitHub {
+    owner = "n64dev";
+    repo = "cen64";
+    rev = "1b31ca9b3c3bb783391ab9773bd26c50db2056a8";
+    sha256 = "0x1fz3z4ffl5xssiyxnmbhpjlf0k0fxsqn4f2ikrn17742dx4c0z";
+  };
+
+  nativeBuildInputs = [ cmake ];
+  buildInputs = [ libGL libiconv openal libX11 ];
+
+  installPhase = ''
+    runHook preInstall
+    install -D {,$out/bin/}${pname}
+    runHook postInstall
+  '';
+
+  meta = with lib; {
+    description = "A Cycle-Accurate Nintendo 64 Emulator";
+    license = licenses.bsd3;
+    homepage = "https://github.com/n64dev/cen64";
+    maintainers = [ maintainers._414owen ];
+    platforms = [ "x86_64-linux" ];
+  };
+}
diff --git a/nixpkgs/pkgs/misc/emulators/citra/default.nix b/nixpkgs/pkgs/misc/emulators/citra/default.nix
new file mode 100644
index 000000000000..ae7228c22460
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/citra/default.nix
@@ -0,0 +1,33 @@
+{ mkDerivation, lib, fetchgit, cmake, SDL2, qtbase, qtmultimedia, boost }:
+
+mkDerivation {
+  pname = "citra";
+  version = "2020-12-07";
+
+  # Submodules
+  src = fetchgit {
+    url = "https://github.com/citra-emu/citra";
+    rev = "3f13e1cc2419fac837952c44d7be9db78b054a2f";
+    sha256 = "1bbg8cwrgncmcavqpj3yp4dbfkip1i491krp6dcpgvsd5yfr7f0v";
+  };
+
+  nativeBuildInputs = [ cmake ];
+  buildInputs = [ SDL2 qtbase qtmultimedia boost ];
+
+  dontWrapQtApps = true;
+
+  preConfigure = ''
+    # Trick configure system.
+    sed -n 's,^ *path = \(.*\),\1,p' .gitmodules | while read path; do
+      mkdir "$path/.git"
+    done
+  '';
+
+  meta = with lib; {
+    homepage = "https://citra-emu.org";
+    description = "An open-source emulator for the Nintendo 3DS";
+    license = licenses.gpl2;
+    maintainers = with maintainers; [ abbradar ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/misc/emulators/commander-x16/emulator.nix b/nixpkgs/pkgs/misc/emulators/commander-x16/emulator.nix
new file mode 100644
index 000000000000..73442215ff1e
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/commander-x16/emulator.nix
@@ -0,0 +1,42 @@
+{ stdenv
+, lib
+, fetchFromGitHub
+, SDL2
+}:
+
+stdenv.mkDerivation rec {
+  pname = "x16-emulator";
+  version = "38";
+
+  src = fetchFromGitHub {
+    owner = "commanderx16";
+    repo = pname;
+    rev = "r${version}";
+    sha256 = "WNRq/m97NpOBWIk6mtxBAKmkxCGWacWjXeOvIhBrkYE=";
+  };
+
+  dontConfigure = true;
+
+  buildInputs = [ SDL2 ];
+
+  installPhase = ''
+    runHook preInstall
+    install -D --mode 755 --target-directory $out/bin/ x16emu
+    install -D --mode 444 --target-directory $out/share/doc/${pname} README.md
+    runHook postInstall
+  '';
+
+  meta = with lib; {
+    homepage = "https://www.commanderx16.com/forum/index.php?/home/";
+    description = "The official emulator of CommanderX16 8-bit computer";
+    license = licenses.bsd2;
+    maintainers = with maintainers; [ AndersonTorres ];
+    platforms = SDL2.meta.platforms;
+  };
+
+  passthru = {
+    # upstream project recommends emulator and rom synchronized;
+    # passing through the version is useful to ensure this
+    inherit version;
+  };
+}
diff --git a/nixpkgs/pkgs/misc/emulators/commander-x16/rom.nix b/nixpkgs/pkgs/misc/emulators/commander-x16/rom.nix
new file mode 100644
index 000000000000..5da77ebceefe
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/commander-x16/rom.nix
@@ -0,0 +1,46 @@
+{ stdenv
+, lib
+, fetchFromGitHub
+, cc65
+}:
+
+stdenv.mkDerivation rec {
+  pname = "x16-rom";
+  version = "38";
+
+  src = fetchFromGitHub {
+    owner = "commanderx16";
+    repo = pname;
+    rev = "r${version}";
+    sha256 = "xaqF0ppB7I7ST8Uh3jPbC14uRAb/WH21tHlNeTvYpoI=";
+  };
+
+  nativeBuildInputs = [ cc65 ];
+
+  postPatch = ''
+    patchShebangs scripts/
+  '';
+
+  dontConfigure = true;
+
+  installPhase = ''
+    runHook preInstall
+    install -D --mode 444 --target-directory $out/share/${pname} build/x16/rom.bin
+    install -D --mode 444 --target-directory $out/share/doc/${pname} README.md
+    runHook postInstall
+  '';
+
+  meta = with lib; {
+    homepage = "https://www.commanderx16.com/forum/index.php?/home/";
+    description = "ROM file for CommanderX16 8-bit computer";
+    license = licenses.bsd2;
+    maintainers = with maintainers; [ AndersonTorres ];
+    platforms = cc65.meta.platforms;
+  };
+
+  passthru = {
+    # upstream project recommends emulator and rom synchronized;
+    # passing through the version is useful to ensure this
+    inherit version;
+  };
+}
diff --git a/nixpkgs/pkgs/misc/emulators/craftos-pc/default.nix b/nixpkgs/pkgs/misc/emulators/craftos-pc/default.nix
new file mode 100644
index 000000000000..3bc9e0b81cc0
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/craftos-pc/default.nix
@@ -0,0 +1,43 @@
+{ lib, stdenv, fetchFromGitHub, poco, openssl, SDL2, SDL2_mixer }:
+
+let
+  craftos2-lua = fetchFromGitHub {
+    owner = "MCJack123";
+    repo = "craftos2-lua";
+    rev = "v2.4.4";
+    sha256 = "1q63ki4sxx8bxaa6ag3xj153p7a8a12ivm0k33k935p41k6y2k64";
+  };
+in
+
+stdenv.mkDerivation rec {
+  pname = "craftos-pc";
+  version = "2.4.5";
+
+  src = fetchFromGitHub {
+    owner = "MCJack123";
+    repo = "craftos2";
+    rev = "v${version}";
+    sha256 = "00a4p365krbdprlv4979d13mm3alhxgzzj3vqz2g67795plf64j4";
+  };
+
+  buildInputs = [ poco openssl SDL2 SDL2_mixer ];
+
+  preBuild = ''
+    cp -R ${craftos2-lua}/* ./craftos2-lua/
+    chmod -R u+w ./craftos2-lua
+    make -C craftos2-lua linux
+  '';
+
+  installPhase = ''
+    mkdir -p $out/bin
+    DESTDIR=$out/bin make install
+  '';
+
+  meta = with lib; {
+    description = "An implementation of the CraftOS-PC API written in C++ using SDL";
+    homepage = "https://www.craftos-pc.cc";
+    license = licenses.mit;
+    platforms = platforms.linux;
+    maintainers = [ maintainers.siraben ];
+  };
+}
diff --git a/nixpkgs/pkgs/misc/emulators/darcnes/default.nix b/nixpkgs/pkgs/misc/emulators/darcnes/default.nix
new file mode 100644
index 000000000000..7919e0a9009c
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/darcnes/default.nix
@@ -0,0 +1,24 @@
+{ lib, stdenv, fetchurl, libX11, libXt, libXext, libXaw }:
+
+stdenv.mkDerivation rec {
+  pname = "darcnes";
+  version = "9b0401";
+
+  src = fetchurl {
+    url = "https://web.archive.org/web/20130511081532/http://www.dridus.com/~nyef/darcnes/download/dn${version}.tgz";
+    sha256 = "05a7mh51rg7ydb414m3p5mm05p4nz2bgvspqzwm3bhbj7zz543k3";
+  };
+
+  patches = [ ./label.patch ];
+
+  buildInputs = [ libX11 libXt libXext libXaw ];
+  installPhase = "install -Dt $out/bin darcnes";
+
+  meta = {
+    homepage = "https://web.archive.org/web/20130502171725/http://www.dridus.com/~nyef/darcnes/";
+    description = "Sega Master System, Game Gear, SG-1000, NES, ColecoVision and Apple II emulator";
+    # Prohibited commercial use, credit required.
+    license = lib.licenses.free;
+    platforms = [ "i686-linux" ];
+  };
+}
diff --git a/nixpkgs/pkgs/misc/emulators/darcnes/label.patch b/nixpkgs/pkgs/misc/emulators/darcnes/label.patch
new file mode 100644
index 000000000000..612aa1e3911e
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/darcnes/label.patch
@@ -0,0 +1,13 @@
+http://gentoo-overlays.zugaina.org/funtoo/portage/games-emulation/darcnes/files/darcnes-0401-exec-stack.patch
+
+diff -Naur old/video_x.c new/video_x.c
+--- old/video_x.c	2004-09-04 01:26:41.102187277 +0200
++++ new/video_x.c	2004-09-04 01:27:51.586427427 +0200
+@@ -366,6 +366,7 @@
+ 	}
+ 	
+     default:
++    	break;
+     }
+ }
+ 
diff --git a/nixpkgs/pkgs/misc/emulators/desmume/01_use_system_tinyxml.patch b/nixpkgs/pkgs/misc/emulators/desmume/01_use_system_tinyxml.patch
new file mode 100644
index 000000000000..8cec26026e7f
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/desmume/01_use_system_tinyxml.patch
@@ -0,0 +1,231 @@
+From: Evgeni Golov <evgeni@debian.org>
+Subject: use the system tinyxml instead of the embedded copy
+Last-Update: 2015-08-09
+
+diff --git a/src/Makefile.am b/src/Makefile.am
+index 7b9e263..bc7ba8c 100644
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -81,12 +81,6 @@ libdesmume_a_SOURCES = \
+ 	utils/libfat/mem_allocate.h \
+ 	utils/libfat/partition.cpp \
+ 	utils/libfat/partition.h \
+-	utils/tinyxml/tinystr.cpp \
+-	utils/tinyxml/tinystr.h \
+-	utils/tinyxml/tinyxml.cpp \
+-	utils/tinyxml/tinyxml.h \
+-	utils/tinyxml/tinyxmlerror.cpp \
+-	utils/tinyxml/tinyxmlparser.cpp \
+ 	utils/glcorearb.h \
+ 	addons/slot2_auto.cpp addons/slot2_mpcf.cpp addons/slot2_paddle.cpp addons/slot2_gbagame.cpp addons/slot2_none.cpp addons/slot2_rumblepak.cpp addons/slot2_guitarGrip.cpp addons/slot2_expMemory.cpp addons/slot2_piano.cpp addons/slot2_passme.cpp addons/slot1_none.cpp addons/slot1_r4.cpp addons/slot1_retail_nand.cpp addons/slot1_retail_auto.cpp addons/slot1_retail_mcrom.cpp addons/slot1_retail_mcrom_debug.cpp addons/slot1comp_mc.cpp addons/slot1comp_mc.h addons/slot1comp_rom.h addons/slot1comp_rom.cpp addons/slot1comp_protocol.h addons/slot1comp_protocol.cpp \
+ 	cheatSystem.cpp cheatSystem.h \
+@@ -204,3 +198,4 @@ if HAVE_GDB_STUB
+ libdesmume_a_SOURCES += gdbstub.h
+ endif
+ libdesmume_a_LIBADD = fs-$(desmume_arch).$(OBJEXT)
++LIBS += -ltinyxml
+diff --git a/src/Makefile.in b/src/Makefile.in
+index 9cf26a3..d9ff7b2 100644
+--- a/src/Makefile.in
++++ b/src/Makefile.in
+@@ -184,9 +184,6 @@ am__libdesmume_a_SOURCES_DIST = armcpu.cpp armcpu.h \
+ 	utils/libfat/libfat_public_api.h utils/libfat/lock.cpp \
+ 	utils/libfat/lock.h utils/libfat/mem_allocate.h \
+ 	utils/libfat/partition.cpp utils/libfat/partition.h \
+-	utils/tinyxml/tinystr.cpp utils/tinyxml/tinystr.h \
+-	utils/tinyxml/tinyxml.cpp utils/tinyxml/tinyxml.h \
+-	utils/tinyxml/tinyxmlerror.cpp utils/tinyxml/tinyxmlparser.cpp \
+ 	utils/glcorearb.h addons/slot2_auto.cpp addons/slot2_mpcf.cpp \
+ 	addons/slot2_paddle.cpp addons/slot2_gbagame.cpp \
+ 	addons/slot2_none.cpp addons/slot2_rumblepak.cpp \
+@@ -324,10 +321,6 @@ am_libdesmume_a_OBJECTS = armcpu.$(OBJEXT) arm_instructions.$(OBJEXT) \
+ 	utils/libfat/libfat.$(OBJEXT) \
+ 	utils/libfat/libfat_public_api.$(OBJEXT) \
+ 	utils/libfat/lock.$(OBJEXT) utils/libfat/partition.$(OBJEXT) \
+-	utils/tinyxml/tinystr.$(OBJEXT) \
+-	utils/tinyxml/tinyxml.$(OBJEXT) \
+-	utils/tinyxml/tinyxmlerror.$(OBJEXT) \
+-	utils/tinyxml/tinyxmlparser.$(OBJEXT) \
+ 	addons/slot2_auto.$(OBJEXT) addons/slot2_mpcf.$(OBJEXT) \
+ 	addons/slot2_paddle.$(OBJEXT) addons/slot2_gbagame.$(OBJEXT) \
+ 	addons/slot2_none.$(OBJEXT) addons/slot2_rumblepak.$(OBJEXT) \
+@@ -475,7 +468,7 @@ LIBAGG_LIBS = @LIBAGG_LIBS@
+ LIBGLADE_CFLAGS = @LIBGLADE_CFLAGS@
+ LIBGLADE_LIBS = @LIBGLADE_LIBS@
+ LIBOBJS = @LIBOBJS@
+-LIBS = @LIBS@
++LIBS = @LIBS@ -ltinyxml
+ LIBSOUNDTOUCH_CFLAGS = @LIBSOUNDTOUCH_CFLAGS@
+ LIBSOUNDTOUCH_LIBS = @LIBSOUNDTOUCH_LIBS@
+ LTLIBOBJS = @LTLIBOBJS@
+@@ -625,9 +618,6 @@ libdesmume_a_SOURCES = armcpu.cpp armcpu.h arm_instructions.cpp \
+ 	utils/libfat/libfat_public_api.h utils/libfat/lock.cpp \
+ 	utils/libfat/lock.h utils/libfat/mem_allocate.h \
+ 	utils/libfat/partition.cpp utils/libfat/partition.h \
+-	utils/tinyxml/tinystr.cpp utils/tinyxml/tinystr.h \
+-	utils/tinyxml/tinyxml.cpp utils/tinyxml/tinyxml.h \
+-	utils/tinyxml/tinyxmlerror.cpp utils/tinyxml/tinyxmlparser.cpp \
+ 	utils/glcorearb.h addons/slot2_auto.cpp addons/slot2_mpcf.cpp \
+ 	addons/slot2_paddle.cpp addons/slot2_gbagame.cpp \
+ 	addons/slot2_none.cpp addons/slot2_rumblepak.cpp \
+@@ -760,20 +750,6 @@ utils/libfat/lock.$(OBJEXT): utils/libfat/$(am__dirstamp) \
+ 	utils/libfat/$(DEPDIR)/$(am__dirstamp)
+ utils/libfat/partition.$(OBJEXT): utils/libfat/$(am__dirstamp) \
+ 	utils/libfat/$(DEPDIR)/$(am__dirstamp)
+-utils/tinyxml/$(am__dirstamp):
+-	@$(MKDIR_P) utils/tinyxml
+-	@: > utils/tinyxml/$(am__dirstamp)
+-utils/tinyxml/$(DEPDIR)/$(am__dirstamp):
+-	@$(MKDIR_P) utils/tinyxml/$(DEPDIR)
+-	@: > utils/tinyxml/$(DEPDIR)/$(am__dirstamp)
+-utils/tinyxml/tinystr.$(OBJEXT): utils/tinyxml/$(am__dirstamp) \
+-	utils/tinyxml/$(DEPDIR)/$(am__dirstamp)
+-utils/tinyxml/tinyxml.$(OBJEXT): utils/tinyxml/$(am__dirstamp) \
+-	utils/tinyxml/$(DEPDIR)/$(am__dirstamp)
+-utils/tinyxml/tinyxmlerror.$(OBJEXT): utils/tinyxml/$(am__dirstamp) \
+-	utils/tinyxml/$(DEPDIR)/$(am__dirstamp)
+-utils/tinyxml/tinyxmlparser.$(OBJEXT): utils/tinyxml/$(am__dirstamp) \
+-	utils/tinyxml/$(DEPDIR)/$(am__dirstamp)
+ addons/$(am__dirstamp):
+ 	@$(MKDIR_P) addons
+ 	@: > addons/$(am__dirstamp)
+@@ -1035,10 +1011,6 @@ mostlyclean-compile:
+ 	-rm -f utils/libfat/partition.$(OBJEXT)
+ 	-rm -f utils/md5.$(OBJEXT)
+ 	-rm -f utils/task.$(OBJEXT)
+-	-rm -f utils/tinyxml/tinystr.$(OBJEXT)
+-	-rm -f utils/tinyxml/tinyxml.$(OBJEXT)
+-	-rm -f utils/tinyxml/tinyxmlerror.$(OBJEXT)
+-	-rm -f utils/tinyxml/tinyxmlparser.$(OBJEXT)
+ 	-rm -f utils/vfat.$(OBJEXT)
+ 	-rm -f utils/xstring.$(OBJEXT)
+ 
+@@ -1175,10 +1147,6 @@ distclean-compile:
+ @AMDEP_TRUE@@am__include@ @am__quote@utils/libfat/$(DEPDIR)/libfat_public_api.Po@am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote@utils/libfat/$(DEPDIR)/lock.Po@am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote@utils/libfat/$(DEPDIR)/partition.Po@am__quote@
+-@AMDEP_TRUE@@am__include@ @am__quote@utils/tinyxml/$(DEPDIR)/tinystr.Po@am__quote@
+-@AMDEP_TRUE@@am__include@ @am__quote@utils/tinyxml/$(DEPDIR)/tinyxml.Po@am__quote@
+-@AMDEP_TRUE@@am__include@ @am__quote@utils/tinyxml/$(DEPDIR)/tinyxmlerror.Po@am__quote@
+-@AMDEP_TRUE@@am__include@ @am__quote@utils/tinyxml/$(DEPDIR)/tinyxmlparser.Po@am__quote@
+ 
+ .c.o:
+ @am__fastdepCC_TRUE@	depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
+@@ -1449,8 +1417,6 @@ distclean-generic:
+ 	-rm -f utils/decrypt/$(am__dirstamp)
+ 	-rm -f utils/libfat/$(DEPDIR)/$(am__dirstamp)
+ 	-rm -f utils/libfat/$(am__dirstamp)
+-	-rm -f utils/tinyxml/$(DEPDIR)/$(am__dirstamp)
+-	-rm -f utils/tinyxml/$(am__dirstamp)
+ 
+ maintainer-clean-generic:
+ 	@echo "This command is intended for maintainers to use"
+@@ -1460,7 +1426,7 @@ clean: clean-recursive
+ clean-am: clean-generic clean-noinstLIBRARIES mostlyclean-am
+ 
+ distclean: distclean-recursive
+-	-rm -rf ./$(DEPDIR) addons/$(DEPDIR) filter/$(DEPDIR) metaspu/$(DEPDIR) utils/$(DEPDIR) utils/AsmJit/core/$(DEPDIR) utils/AsmJit/x86/$(DEPDIR) utils/decrypt/$(DEPDIR) utils/libfat/$(DEPDIR) utils/tinyxml/$(DEPDIR)
++	-rm -rf ./$(DEPDIR) addons/$(DEPDIR) filter/$(DEPDIR) metaspu/$(DEPDIR) utils/$(DEPDIR) utils/AsmJit/core/$(DEPDIR) utils/AsmJit/x86/$(DEPDIR) utils/decrypt/$(DEPDIR) utils/libfat/$(DEPDIR)
+ 	-rm -f Makefile
+ distclean-am: clean-am distclean-compile distclean-generic \
+ 	distclean-tags
+@@ -1506,7 +1472,7 @@ install-ps-am:
+ installcheck-am:
+ 
+ maintainer-clean: maintainer-clean-recursive
+-	-rm -rf ./$(DEPDIR) addons/$(DEPDIR) filter/$(DEPDIR) metaspu/$(DEPDIR) utils/$(DEPDIR) utils/AsmJit/core/$(DEPDIR) utils/AsmJit/x86/$(DEPDIR) utils/decrypt/$(DEPDIR) utils/libfat/$(DEPDIR) utils/tinyxml/$(DEPDIR)
++	-rm -rf ./$(DEPDIR) addons/$(DEPDIR) filter/$(DEPDIR) metaspu/$(DEPDIR) utils/$(DEPDIR) utils/AsmJit/core/$(DEPDIR) utils/AsmJit/x86/$(DEPDIR) utils/decrypt/$(DEPDIR) utils/libfat/$(DEPDIR)
+ 	-rm -f Makefile
+ maintainer-clean-am: distclean-am maintainer-clean-generic
+ 
+diff --git a/src/cli/Makefile.am b/src/cli/Makefile.am
+index 1985209..d958323 100755
+--- a/src/cli/Makefile.am
++++ b/src/cli/Makefile.am
+@@ -5,7 +5,7 @@ AM_CPPFLAGS += $(SDL_CFLAGS) $(ALSA_CFLAGS) $(LIBAGG_CFLAGS) $(GLIB_CFLAGS) $(GT
+ 
+ bin_PROGRAMS = desmume-cli
+ desmume_cli_SOURCES = main.cpp ../sndsdl.cpp ../ctrlssdl.h ../ctrlssdl.cpp ../driver.h ../driver.cpp
+-desmume_cli_LDADD = ../libdesmume.a $(SDL_LIBS) $(ALSA_LIBS) $(LIBAGG_LIBS) $(GLIB_LIBS) $(GTHREAD_LIBS) $(LIBSOUNDTOUCH_LIBS)
++desmume_cli_LDADD = ../libdesmume.a $(SDL_LIBS) $(ALSA_LIBS) $(LIBAGG_LIBS) $(GLIB_LIBS) $(GTHREAD_LIBS) $(LIBSOUNDTOUCH_LIBS) -ltinyxml
+ if HAVE_GDB_STUB
+ desmume_cli_LDADD += ../gdbstub/libgdbstub.a
+ endif
+diff --git a/src/cli/Makefile.in b/src/cli/Makefile.in
+index 14efd77..f04ab7d 100644
+--- a/src/cli/Makefile.in
++++ b/src/cli/Makefile.in
+@@ -311,7 +311,7 @@ AM_LDFLAGS =
+ desmume_cli_SOURCES = main.cpp ../sndsdl.cpp ../ctrlssdl.h ../ctrlssdl.cpp ../driver.h ../driver.cpp
+ desmume_cli_LDADD = ../libdesmume.a $(SDL_LIBS) $(ALSA_LIBS) \
+ 	$(LIBAGG_LIBS) $(GLIB_LIBS) $(GTHREAD_LIBS) \
+-	$(LIBSOUNDTOUCH_LIBS) $(am__append_1)
++	$(LIBSOUNDTOUCH_LIBS) -ltinyxml $(am__append_1)
+ all: all-recursive
+ 
+ .SUFFIXES:
+diff --git a/src/gtk-glade/Makefile.am b/src/gtk-glade/Makefile.am
+index b667fca..c79fdac 100755
+--- a/src/gtk-glade/Makefile.am
++++ b/src/gtk-glade/Makefile.am
+@@ -33,7 +33,7 @@ desmume_glade_SOURCES =  \
+ desmume_glade_LDADD = ../libdesmume.a \
+ 			$(SDL_LIBS) $(GTKGLEXT_LIBS) $(LIBGLADE_LIBS) \
+ 			$(GTHREAD_LIBS) $(ALSA_LIBS) $(LIBAGG_LIBS) \
+-			$(LIBSOUNDTOUCH_LIBS)
++			$(LIBSOUNDTOUCH_LIBS) -ltinyxml
+ if HAVE_GDB_STUB
+ desmume_glade_LDADD += ../gdbstub/libgdbstub.a
+ endif
+diff --git a/src/gtk-glade/Makefile.in b/src/gtk-glade/Makefile.in
+index 5f77ec5..012aa72 100644
+--- a/src/gtk-glade/Makefile.in
++++ b/src/gtk-glade/Makefile.in
+@@ -367,7 +367,7 @@ desmume_glade_SOURCES = \
+ 
+ desmume_glade_LDADD = ../libdesmume.a $(SDL_LIBS) $(GTKGLEXT_LIBS) \
+ 	$(LIBGLADE_LIBS) $(GTHREAD_LIBS) $(ALSA_LIBS) $(LIBAGG_LIBS) \
+-	$(LIBSOUNDTOUCH_LIBS) $(am__append_1)
++	$(LIBSOUNDTOUCH_LIBS) -ltinyxml $(am__append_1)
+ all: all-recursive
+ 
+ .SUFFIXES:
+diff --git a/src/gtk/Makefile.am b/src/gtk/Makefile.am
+index 59cb1f2..e451102 100755
+--- a/src/gtk/Makefile.am
++++ b/src/gtk/Makefile.am
+@@ -32,7 +32,7 @@ desmume_SOURCES = \
+ 	../filter/videofilter.cpp ../filter/videofilter.h \
+ 	main.cpp main.h
+ desmume_LDADD = ../libdesmume.a \
+-	$(SDL_LIBS) $(GTK_LIBS) $(GTHREAD_LIBS) $(ALSA_LIBS) $(LIBAGG_LIBS) $(LIBSOUNDTOUCH_LIBS)
++	$(SDL_LIBS) $(GTK_LIBS) $(GTHREAD_LIBS) $(ALSA_LIBS) $(LIBAGG_LIBS) $(LIBSOUNDTOUCH_LIBS) -ltinyxml
+ if HAVE_GDB_STUB
+ desmume_LDADD += ../gdbstub/libgdbstub.a
+ endif
+diff --git a/src/gtk/Makefile.in b/src/gtk/Makefile.in
+index e1a2c37..75f392f 100644
+--- a/src/gtk/Makefile.in
++++ b/src/gtk/Makefile.in
+@@ -382,7 +382,7 @@ desmume_SOURCES = \
+ 
+ desmume_LDADD = ../libdesmume.a $(SDL_LIBS) $(GTK_LIBS) \
+ 	$(GTHREAD_LIBS) $(ALSA_LIBS) $(LIBAGG_LIBS) \
+-	$(LIBSOUNDTOUCH_LIBS) $(am__append_1) $(am__append_2) \
++	$(LIBSOUNDTOUCH_LIBS) -ltinyxml $(am__append_1) $(am__append_2) \
+ 	$(am__append_3)
+ UPDATE_DESKTOP = \
+   appsdir=$(DESTDIR)$(datadir)/applications ; \
+diff --git a/src/utils/advanscene.cpp b/src/utils/advanscene.cpp
+index 8d8f370..09c35bb 100755
+--- a/src/utils/advanscene.cpp
++++ b/src/utils/advanscene.cpp
+@@ -19,7 +19,7 @@
+ #include <time.h>

+ 

+ #define TIXML_USE_STL

+-#include "tinyxml/tinyxml.h"

++#include <tinyxml.h>

+ 

+ #include "advanscene.h"

+ #include "../common.h"

diff --git a/nixpkgs/pkgs/misc/emulators/desmume/default.nix b/nixpkgs/pkgs/misc/emulators/desmume/default.nix
new file mode 100644
index 000000000000..ff17833f690b
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/desmume/default.nix
@@ -0,0 +1,57 @@
+{ lib, stdenv, fetchurl, fetchpatch
+, pkg-config, libtool, intltool
+, libXmu
+, lua
+, tinyxml
+, agg, alsaLib, soundtouch, openal
+, desktop-file-utils
+, gtk2, gtkglext, libglade
+, libGLU, libpcap, SDL, zziplib }:
+
+with lib;
+stdenv.mkDerivation rec {
+
+  pname = "desmume";
+  version = "0.9.11";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/project/desmume/desmume/${version}/${pname}-${version}.tar.gz";
+    sha256 = "15l8wdw3q61fniy3h93d84dnm6s4pyadvh95a0j6d580rjk4pcrs";
+  };
+
+  patches = [
+    ./gcc6_fixes.patch
+    ./gcc7_fixes.patch
+    ./01_use_system_tinyxml.patch
+  ];
+
+  CXXFLAGS = "-fpermissive";
+
+  buildInputs =
+  [ pkg-config libtool intltool libXmu lua agg alsaLib soundtouch
+    openal desktop-file-utils gtk2 gtkglext libglade
+    libGLU libpcap SDL zziplib tinyxml ];
+
+  configureFlags = [
+    "--disable-glade"  # Failing on compile step
+    "--enable-openal"
+    "--enable-glx"
+    "--enable-hud"
+    "--enable-wifi" ];
+
+  meta = {
+    description = "An open-source Nintendo DS emulator";
+    longDescription = ''
+      DeSmuME is a freeware emulator for the NDS roms & Nintendo DS
+      Lite games created by YopYop156. It supports many homebrew nds
+      rom demoes as well as a handful of Wireless Multiboot demo nds
+      roms. DeSmuME is also able to emulate nearly all of the
+      commercial nds rom titles which other DS Emulators aren't.
+    '';
+    homepage = "http://www.desmume.com";
+    license = licenses.gpl1Plus;
+    maintainers = [ maintainers.AndersonTorres ];
+    platforms = platforms.linux;
+  };
+}
+# TODO: investigate glade
diff --git a/nixpkgs/pkgs/misc/emulators/desmume/gcc6_fixes.patch b/nixpkgs/pkgs/misc/emulators/desmume/gcc6_fixes.patch
new file mode 100644
index 000000000000..6eb9576f649b
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/desmume/gcc6_fixes.patch
@@ -0,0 +1,59 @@
+From: zeromus
+Origin: upstream, https://sourceforge.net/p/desmume/code/5514, https://sourceforge.net/p/desmume/code/5517, https://sourceforge.net/p/desmume/code/5430
+Subject: fix GCC6 issues
+Bug: https://sourceforge.net/p/desmume/bugs/1570/
+Bug-Debian: http://bugs.debian.org/811691
+
+Index: desmume/src/MMU_timing.h
+===================================================================
+--- desmume/src/MMU_timing.h	(revision 5513)
++++ desmume/src/MMU_timing.h	(revision 5517)
+@@ -155,8 +155,8 @@
+ 	enum { ASSOCIATIVITY = 1 << ASSOCIATIVESHIFT };

+ 	enum { BLOCKSIZE = 1 << BLOCKSIZESHIFT };

+ 	enum { TAGSHIFT = SIZESHIFT - ASSOCIATIVESHIFT };

+-	enum { TAGMASK = (u32)(~0 << TAGSHIFT) };

+-	enum { BLOCKMASK = ((u32)~0 >> (32 - TAGSHIFT)) & (u32)(~0 << BLOCKSIZESHIFT) };

++	enum { TAGMASK = (u32)(~0U << TAGSHIFT) };

++	enum { BLOCKMASK = ((u32)~0U >> (32 - TAGSHIFT)) & (u32)(~0U << BLOCKSIZESHIFT) };

+ 	enum { WORDSIZE = sizeof(u32) };

+ 	enum { WORDSPERBLOCK = (1 << BLOCKSIZESHIFT) / WORDSIZE };

+ 	enum { DATAPERWORD = WORDSIZE * ASSOCIATIVITY };

+Index: desmume/src/ctrlssdl.cpp
+===================================================================
+--- desmume/src/ctrlssdl.cpp	(revision 5513)
++++ desmume/src/ctrlssdl.cpp	(revision 5517)
+@@ -200,7 +200,7 @@
+           break;
+         case SDL_JOYAXISMOTION:
+           /* Dead zone of 50% */
+-          if( (abs(event.jaxis.value) >> 14) != 0 )
++          if( ((u32)abs(event.jaxis.value) >> 14) != 0 )
+             {
+               key = ((event.jaxis.which & 15) << 12) | JOY_AXIS << 8 | ((event.jaxis.axis & 127) << 1);
+               if (event.jaxis.value > 0) {
+@@ -370,7 +370,7 @@
+          Note: button constants have a 1bit offset. */
+     case SDL_JOYAXISMOTION:
+       key_code = ((event->jaxis.which & 15) << 12) | JOY_AXIS << 8 | ((event->jaxis.axis & 127) << 1);
+-      if( (abs(event->jaxis.value) >> 14) != 0 )
++      if( ((u32)abs(event->jaxis.value) >> 14) != 0 )
+         {
+           if (event->jaxis.value > 0)
+             key_code |= 1;
+Index: desmume/src/wifi.cpp
+===================================================================
+--- desmume/src/wifi.cpp	(revision 5429)
++++ desmume/src/wifi.cpp	(revision 5430)
+@@ -320,9 +320,9 @@
+ 
+ #if (WIFI_LOGGING_LEVEL >= 1)
+ 	#if WIFI_LOG_USE_LOGC
+-		#define WIFI_LOG(level, ...) if(level <= WIFI_LOGGING_LEVEL) LOGC(8, "WIFI: "__VA_ARGS__);
++		#define WIFI_LOG(level, ...) if(level <= WIFI_LOGGING_LEVEL) LOGC(8, "WIFI: " __VA_ARGS__);
+ 	#else
+-		#define WIFI_LOG(level, ...) if(level <= WIFI_LOGGING_LEVEL) printf("WIFI: "__VA_ARGS__);
++		#define WIFI_LOG(level, ...) if(level <= WIFI_LOGGING_LEVEL) printf("WIFI: " __VA_ARGS__);
+ 	#endif
+ #else
+ #define WIFI_LOG(level, ...) {}
diff --git a/nixpkgs/pkgs/misc/emulators/desmume/gcc7_fixes.patch b/nixpkgs/pkgs/misc/emulators/desmume/gcc7_fixes.patch
new file mode 100644
index 000000000000..a4934ff6e611
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/desmume/gcc7_fixes.patch
@@ -0,0 +1,18 @@
+From e1f7039f1b06add4fb75b2f8774000b8f05574af Mon Sep 17 00:00:00 2001
+From: rogerman <rogerman@users.sf.net>
+Date: Mon, 17 Aug 2015 21:15:04 +0000
+Subject: Fix bug with libfat string handling.
+
+diff --git a/src/utils/libfat/directory.cpp b/src/utils/libfat/directory.cpp
+index 765d7ae5..b6d7f01f 100644
+--- a/src/utils/libfat/directory.cpp
++++ b/src/utils/libfat/directory.cpp
+@@ -139,7 +139,7 @@ static size_t _FAT_directory_mbstoucs2 (ucs2_t* dst, const char* src, size_t len
+ 	int bytes;
+ 	size_t count = 0;
+ 
+-	while (count < len-1 && src != '\0') {
++	while (count < len-1 && *src != '\0') {
+ 		bytes = mbrtowc (&tempChar, src, MB_CUR_MAX, &ps);
+ 		if (bytes > 0) {
+ 			*dst = (ucs2_t)tempChar;
diff --git a/nixpkgs/pkgs/misc/emulators/dgen-sdl/default.nix b/nixpkgs/pkgs/misc/emulators/dgen-sdl/default.nix
new file mode 100644
index 000000000000..4a76ee0df026
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/dgen-sdl/default.nix
@@ -0,0 +1,70 @@
+{ lib, stdenv
+, fetchurl
+, libarchive
+, doxygen
+, SDL
+}:
+
+let
+  pname = "dgen-sdl";
+  version = "1.33";
+in stdenv.mkDerivation {
+  inherit pname version;
+
+  src = fetchurl {
+    url = "https://sourceforge.net/projects/dgen/files/dgen/${version}/${pname}-${version}.tar.gz";
+    hash = "sha256-meLAYBfCKHPHf4gYbrzAmGckTrbgQsdjuwlLArje9h4=";
+  };
+
+  buildInputs = [ SDL libarchive ];
+
+  configureFlags = [
+    "--enable-joystick"
+    "--enable-debugger"
+    "--enable-debug-vdp"
+    "--enable-pico" # experimental
+    "--enable-vgmdump"
+    "--with-star=no" # Needs ASM support
+    "--with-musa"
+    "--with-cyclone=no" # Needs ASM support
+    "--with-mz80"
+    "--with-cz80"
+    "--with-drz80=no" # Needs ASM support
+    "--with-dz80"
+  ];
+
+  meta = with lib; {
+    homepage = "https://dgen.sourceforge.net/";
+    description = "Sega Genesis/Mega Drive emulator";
+    longDescription = ''
+      DGen/SDL is a free, open source emulator for Sega Genesis/Mega Drive
+      systems. DGen was originally written by Dave, then ported to SDL by Joe
+      Groff and Phil K. Hornung in 1998.
+
+      It features:
+
+      - Game Genie/Hex codes support
+      - PAL/NTSC, fullscreen modes
+      - Joypad/joystick support
+      - Mouse support
+      - Highly configurable controls
+      - OpenGL textured video output
+      - Portable (64‐bit, endian safe), runs in Windows using MinGW
+      - Screenshots, demos recording and playback
+      - Musashi (generic) and StarScream (x86‐only) CPU cores
+      - Cyclone 68000 and DrZ80 (both ARM‐only) CPU cores
+      - CZ80 (generic) and MZ80 (generic and x86‐only versions)
+      - 16‐bit, 8000 to 48000Hz sound output
+      - Support for 8, 15, 16, 24 and 32 bpp modes
+      - Archived/compressed ROMs support
+      - M68K debugger (contributed by Edd Barrett)
+      - Z80 debugger
+      - hqx and scale2x upscaling filters
+      - VGM dumping
+    '';
+    license = licenses.mit;
+    maintainers = with maintainers; [ AndersonTorres ];
+    platforms = with platforms; unix;
+  };
+}
+# TODO: implement configure options
diff --git a/nixpkgs/pkgs/misc/emulators/dlx/default.nix b/nixpkgs/pkgs/misc/emulators/dlx/default.nix
new file mode 100644
index 000000000000..9573dd6d48dc
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/dlx/default.nix
@@ -0,0 +1,29 @@
+{ lib, stdenv, fetchzip }:
+
+stdenv.mkDerivation rec {
+  pname = "dlx";
+  version = "2012-07-08";
+
+  src = fetchzip {
+    url = "https://www.davidviner.com/zip/dlx/dlx.zip";
+    sha256 = "0508linnar9ivy3xr99gzrb2l027ngx12dlxaxs7w67cnwqnb0dg";
+  };
+
+  makeFlags = [ "CC=${stdenv.cc.targetPrefix}cc" "LINK=${stdenv.cc.targetPrefix}cc" "CFLAGS=-O2" ];
+  hardeningDisable = [ "format" ];
+
+  installPhase = ''
+    mkdir -p $out/include/dlx $out/share/dlx/{examples,doc} $out/bin
+    mv masm mon dasm $out/bin/
+    mv *.i auto.a $out/include/dlx/
+    mv *.a *.m $out/share/dlx/examples/
+    mv README.txt MANUAL.TXT $out/share/dlx/doc/
+  '';
+
+  meta = with lib; {
+    homepage = "https://www.davidviner.com/dlx.html?name=DLX+Simulator";
+    description = "An DLX simulator written in C";
+    license = licenses.gpl2Only;
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/misc/emulators/dolphin-emu/default.nix b/nixpkgs/pkgs/misc/emulators/dolphin-emu/default.nix
new file mode 100644
index 000000000000..c2d73d3e7fff
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/dolphin-emu/default.nix
@@ -0,0 +1,122 @@
+{ stdenv
+, lib
+, fetchpatch
+, pkg-config
+, cmake
+, bluez
+, ffmpeg
+, libao
+, gtk2
+, glib
+, libGLU
+, libGL
+, gettext
+, libpthreadstubs
+, libXrandr
+, libXext
+, readline
+, openal
+, libXdmcp
+, portaudio
+, fetchFromGitHub
+, libusb1
+, libevdev
+, wxGTK30
+, soundtouch
+, miniupnpc
+, mbedtls
+, curl
+, lzo
+, sfml
+, libpulseaudio ? null
+}:
+
+stdenv.mkDerivation rec {
+  pname = "dolphin-emu";
+  version = "5.0";
+
+  src = fetchFromGitHub {
+    owner = "dolphin-emu";
+    repo = "dolphin";
+    rev = version;
+    sha256 = "07mlfnh0hwvk6xarcg315x7z2j0qbg9g7cm040df9c8psiahc3g6";
+  };
+
+  patches = [
+    # Fix build with soundtouch 2.1.2
+    (fetchpatch {
+      url = "https://src.fedoraproject.org/rpms/dolphin-emu/raw/a1b91fdf94981e12c8889a02cba0ec2267d0f303/f/dolphin-emu-5.0-soundtouch-exception-fix.patch";
+      name = "dolphin-emu-5.0-soundtouch-exception-fix.patch";
+      sha256 = "0yd3l46nja5qiknnl30ryad98f3v8911jwnr67hn61dzx2kwbbaw";
+    })
+    # Fix build with gcc 8
+    (fetchpatch {
+      url = "https://salsa.debian.org/games-team/dolphin-emu/raw/9b7b4aeac1b60dcf28bdcafbed6bc498b2aeb0ad/debian/patches/03_gcc8.patch";
+      name = "03_gcc8.patch";
+      sha256 = "1da95gb8c95kd5cjhdvg19cv2z863lj3va5gx3bqc7g8r36glqxr";
+    })
+  ];
+
+  postPatch = ''
+    substituteInPlace Source/Core/VideoBackends/OGL/RasterFont.cpp \
+      --replace " CHAR_WIDTH " " CHARWIDTH "
+  '';
+
+  cmakeFlags = [
+    "-DGTK2_GLIBCONFIG_INCLUDE_DIR=${glib.out}/lib/glib-2.0/include"
+    "-DGTK2_GDKCONFIG_INCLUDE_DIR=${gtk2.out}/lib/gtk-2.0/include"
+    "-DGTK2_INCLUDE_DIRS=${gtk2.dev}/include/gtk-2.0"
+    "-DENABLE_LTO=True"
+  ];
+
+  nativeBuildInputs = [
+    pkg-config
+    cmake
+  ];
+
+  buildInputs = [
+    bluez
+    ffmpeg
+    libao
+    libGLU
+    libGL
+    gtk2
+    glib
+    gettext
+    libpthreadstubs
+    libXrandr
+    libXext
+    readline
+    openal
+    libevdev
+    libXdmcp
+    portaudio
+    libpulseaudio
+    libevdev
+    libXdmcp
+    portaudio
+    libusb1
+    libpulseaudio
+    wxGTK30
+    soundtouch
+    miniupnpc
+    mbedtls
+    curl
+    lzo
+    sfml
+  ];
+
+  postInstall = lib.optionalString stdenv.hostPlatform.isLinux ''
+    install -D $src/Data/51-usb-device.rules $out/etc/udev/rules.d/51-usb-device.rules
+  '';
+
+  meta = with lib; {
+    homepage = "https://dolphin-emu.org/";
+    description = "Gamecube/Wii/Triforce emulator for x86_64 and ARMv8";
+    license = licenses.gpl2Plus;
+    maintainers = with maintainers; [ MP2E ashkitten ];
+    # x86_32 is an unsupported platform.
+    # Enable generic build if you really want a JIT-less binary.
+    platforms = [ "x86_64-linux" ];
+  };
+}
diff --git a/nixpkgs/pkgs/misc/emulators/dolphin-emu/master.nix b/nixpkgs/pkgs/misc/emulators/dolphin-emu/master.nix
new file mode 100644
index 000000000000..8a4adfa314b0
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/dolphin-emu/master.nix
@@ -0,0 +1,88 @@
+{ lib, stdenv, fetchFromGitHub, makeDesktopItem, pkg-config, cmake
+, wrapQtAppsHook, qtbase, bluez, ffmpeg, libao, libGLU, libGL, pcre, gettext
+, libXrandr, libusb1, lzo, libpthreadstubs, libXext, libXxf86vm, libXinerama
+, libSM, libXdmcp, readline, openal, udev, libevdev, portaudio, curl, alsaLib
+, miniupnpc, enet, mbedtls, soundtouch, sfml
+, vulkan-loader ? null, libpulseaudio ? null
+
+# - Inputs used for Darwin
+, CoreBluetooth, ForceFeedback, IOKit, OpenGL, libpng, hidapi }:
+
+let
+  desktopItem = makeDesktopItem {
+    name = "dolphin-emu-master";
+    exec = "dolphin-emu-master";
+    icon = "dolphin-emu";
+    comment = "A Wii/GameCube Emulator";
+    desktopName = "Dolphin Emulator (master)";
+    genericName = "Wii/GameCube Emulator";
+    categories = "Game;Emulator;";
+    startupNotify = "false";
+  };
+in stdenv.mkDerivation rec {
+  pname = "dolphin-emu";
+  version = "5.0-13603";
+
+  src = fetchFromGitHub {
+    owner = "dolphin-emu";
+    repo = "dolphin";
+    rev = "7250d6e4e091f4b5b4f2289c2c732349b69a2e8a";
+    sha256 = "0l4vvxmc79x0b5p8k4km7p380wv8wsbmxjnif08rj0p3brbavc1i";
+  };
+
+  nativeBuildInputs = [ cmake pkg-config ]
+  ++ lib.optional stdenv.isLinux wrapQtAppsHook;
+
+  buildInputs = [
+    curl ffmpeg libao libGLU libGL pcre gettext libpthreadstubs libpulseaudio
+    libXrandr libXext libXxf86vm libXinerama libSM readline openal libXdmcp lzo
+    portaudio libusb1 libpng hidapi miniupnpc enet mbedtls soundtouch sfml
+    qtbase
+  ] ++ lib.optionals stdenv.isLinux [
+    bluez udev libevdev alsaLib vulkan-loader
+  ] ++ lib.optionals stdenv.isDarwin [
+    CoreBluetooth OpenGL ForceFeedback IOKit
+  ];
+
+  cmakeFlags = [
+    "-DUSE_SHARED_ENET=ON"
+    "-DENABLE_LTO=ON"
+    "-DDOLPHIN_WC_REVISION=${src.rev}"
+    "-DDOLPHIN_WC_DESCRIBE=${version}"
+    "-DDOLPHIN_WC_BRANCH=master"
+  ] ++ lib.optionals stdenv.isDarwin [
+    "-DOSX_USE_DEFAULT_SEARCH_PATH=True"
+  ];
+
+  qtWrapperArgs = lib.optionals stdenv.isLinux [
+    "--prefix LD_LIBRARY_PATH : ${vulkan-loader}/lib"
+  ];
+
+  # - Allow Dolphin to use nix-provided libraries instead of building them
+  postPatch = ''
+    sed -i -e 's,DISTRIBUTOR "None",DISTRIBUTOR "NixOS",g' CMakeLists.txt
+  '' + lib.optionalString stdenv.isDarwin ''
+    sed -i -e 's,if(NOT APPLE),if(true),g' CMakeLists.txt
+    sed -i -e 's,if(LIBUSB_FOUND AND NOT APPLE),if(LIBUSB_FOUND),g' \
+      CMakeLists.txt
+  '';
+
+  postInstall = ''
+    cp -r ${desktopItem}/share/applications $out/share
+    ln -sf $out/bin/dolphin-emu $out/bin/dolphin-emu-master
+  '' + lib.optionalString stdenv.hostPlatform.isLinux ''
+    install -D $src/Data/51-usb-device.rules $out/etc/udev/rules.d/51-usb-device.rules
+  '';
+
+  meta = with lib; {
+    homepage = "https://dolphin-emu.org";
+    description = "Gamecube/Wii/Triforce emulator for x86_64 and ARMv8";
+    license = licenses.gpl2Plus;
+    maintainers = with maintainers; [ MP2E ashkitten ];
+    branch = "master";
+    # x86_32 is an unsupported platform.
+    # Enable generic build if you really want a JIT-less binary.
+    broken = stdenv.isDarwin;
+    platforms = [ "x86_64-linux" "x86_64-darwin" ];
+  };
+}
diff --git a/nixpkgs/pkgs/misc/emulators/dosbox/default.nix b/nixpkgs/pkgs/misc/emulators/dosbox/default.nix
new file mode 100644
index 000000000000..160c8733ff5c
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/dosbox/default.nix
@@ -0,0 +1,46 @@
+{ stdenv, lib, fetchurl, makeDesktopItem, SDL, SDL_net, SDL_sound, libGLU, libGL, libpng, graphicsmagick }:
+
+stdenv.mkDerivation rec {
+  name = "dosbox-0.74-3";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/dosbox/${name}.tar.gz";
+    sha256 = "02i648i50dwicv1vaql15rccv4g8h5blf5g6inv67lrfxpbkvlf0";
+  };
+
+  hardeningDisable = [ "format" ];
+
+  buildInputs = [ SDL SDL_net SDL_sound libGLU libGL libpng ];
+
+  nativeBuildInputs = [ graphicsmagick ];
+
+  configureFlags = lib.optional stdenv.isDarwin "--disable-sdltest";
+
+  desktopItem = makeDesktopItem {
+    name = "dosbox";
+    exec = "dosbox";
+    icon = "dosbox";
+    comment = "x86 emulator with internal DOS";
+    desktopName = "DOSBox";
+    genericName = "DOS emulator";
+    categories = "Emulator;";
+  };
+
+  postInstall = ''
+     mkdir -p $out/share/applications
+     cp ${desktopItem}/share/applications/* $out/share/applications
+
+     mkdir -p $out/share/icons/hicolor/256x256/apps
+     gm convert src/dosbox.ico $out/share/icons/hicolor/256x256/apps/dosbox.png
+  '';
+
+  enableParallelBuilding = true;
+
+  meta = with lib; {
+    homepage = "http://www.dosbox.com/";
+    description = "A DOS emulator";
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ matthewbauer ];
+    license = licenses.gpl2;
+  };
+}
diff --git a/nixpkgs/pkgs/misc/emulators/duckstation/default.nix b/nixpkgs/pkgs/misc/emulators/duckstation/default.nix
new file mode 100644
index 000000000000..29b867f0e9e3
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/duckstation/default.nix
@@ -0,0 +1,34 @@
+{ lib, mkDerivation, fetchFromGitHub, cmake, pkg-config, SDL2, qtbase
+, wrapQtAppsHook, qttools, ninja, gtk3 }:
+mkDerivation rec {
+  pname = "duckstation";
+  version = "unstable-2020-12-29";
+
+  src = fetchFromGitHub {
+    owner = "stenzek";
+    repo = pname;
+    rev = "f8dcfabc44ff8391b2d41eab2e883dc8f21a88b7";
+    sha256 = "0v6w4di4yj1hbxpqqrcw8rbfjg18g9kla8mnb3b5zgv7i4dyzykw";
+  };
+
+  nativeBuildInputs = [ cmake wrapQtAppsHook qttools ];
+
+  buildInputs = [ SDL2 qtbase gtk3 pkg-config ];
+
+  installPhase = ''
+    mkdir -p $out/
+    mv bin $out/
+  '';
+
+  # TODO:
+  # - vulkan graphics backend (OpenGL works).
+  # - default sound backend (cubeb) does not work, but SDL does.
+  meta = with lib; {
+    description =
+      "PlayStation 1 emulator focusing on playability, speed and long-term maintainability";
+    homepage = "https://github.com/stenzek/duckstation";
+    license = licenses.gpl3;
+    platforms = platforms.linux;
+    maintainers = [ maintainers.guibou ];
+  };
+}
diff --git a/nixpkgs/pkgs/misc/emulators/emu2/default.nix b/nixpkgs/pkgs/misc/emulators/emu2/default.nix
new file mode 100644
index 000000000000..eef361ecd037
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/emu2/default.nix
@@ -0,0 +1,23 @@
+{ lib, stdenv, fetchFromGitHub }:
+
+stdenv.mkDerivation rec {
+  pname = "emu2";
+  version = "unstable-2020-06-04";
+
+  src = fetchFromGitHub {
+    owner  = "dmsc";
+    repo   = "emu2";
+    rev    = "f9599d347aab07d9281400ec8b214aabd187fbcd";
+    sha256 = "0d8fb3wp477kfi0p4mmr69lxsbgb4gl9pqmm68g9ixzrfch837v4";
+  };
+
+  makeFlags = [ "PREFIX=$(out)" ];
+
+  meta = with lib; {
+    homepage = "https://github.com/dmsc/emu2/";
+    description = "A simple text-mode x86 + DOS emulator";
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ dramaturg ];
+    license = licenses.gpl2;
+  };
+}
diff --git a/nixpkgs/pkgs/misc/emulators/emulationstation/default.nix b/nixpkgs/pkgs/misc/emulators/emulationstation/default.nix
new file mode 100644
index 000000000000..458b27d33044
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/emulationstation/default.nix
@@ -0,0 +1,37 @@
+{ lib, stdenv, fetchFromGitHub, pkg-config, cmake, curl, boost, eigen
+, freeimage, freetype, libGLU, libGL, SDL2, alsaLib, libarchive
+, fetchpatch }:
+
+stdenv.mkDerivation {
+  pname = "emulationstation";
+  version = "2.0.1a";
+
+  src = fetchFromGitHub {
+    owner = "Aloshi";
+    repo = "EmulationStation";
+    rev = "646bede3d9ec0acf0ae378415edac136774a66c5";
+    sha256 = "0cm0sq2wri2l9cvab1l0g02za59q7klj0h3p028vr96n6njj4w9v";
+  };
+
+  patches = [
+    (fetchpatch {
+      url = "https://github.com/Aloshi/EmulationStation/commit/49ccd8fc7a7b1dfd974fc57eb13317c42842f22c.patch";
+      sha256 = "1v5d81l7bav0k5z4vybrc3rjcysph6lkm5pcfr6m42wlz7jmjw0p";
+    })
+  ];
+
+  nativeBuildInputs = [ pkg-config cmake ];
+  buildInputs = [ alsaLib boost curl eigen freeimage freetype libarchive libGLU libGL SDL2 ];
+
+  installPhase = ''
+    install -D ../emulationstation $out/bin/emulationstation
+  '';
+
+  meta = {
+    description = "A flexible emulator front-end supporting keyboardless navigation and custom system themes";
+    homepage = "https://emulationstation.org";
+    maintainers = [ lib.maintainers.edwtjo ];
+    license = lib.licenses.mit;
+    platforms = lib.platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/misc/emulators/epsxe/default.nix b/nixpkgs/pkgs/misc/emulators/epsxe/default.nix
new file mode 100644
index 000000000000..7cdd88d0b941
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/epsxe/default.nix
@@ -0,0 +1,52 @@
+{ lib, stdenv, fetchurl, alsaLib, curl, gdk-pixbuf, glib, gtk3, libGLU, libGL,
+  libX11, openssl_1_0_2, ncurses5, SDL, SDL_ttf, unzip, zlib, wrapGAppsHook, autoPatchelfHook }:
+
+with lib;
+
+stdenv.mkDerivation rec {
+  pname = "epsxe";
+  version = "2.0.5";
+
+  src = let
+    version2 = replaceStrings ["."] [""] version;
+    platform = "linux" + (optionalString stdenv.is64bit "_x64");
+  in fetchurl {
+    url = "https://www.epsxe.com/files/ePSXe${version2}${platform}.zip";
+    sha256 = if stdenv.is64bit
+             then "16fa9qc2xhaz1f6294m0b56s5l86cbmclwm9w3mqnch0yjsrvab0"
+             else "1677lclam557kp8jwvchdrk27zfj50fqx2q9i3bcx26d9k61q3kl";
+  };
+
+  nativeBuildInputs = [ unzip wrapGAppsHook autoPatchelfHook ];
+  sourceRoot = ".";
+
+  buildInputs = [
+    alsaLib
+    curl
+    gdk-pixbuf
+    glib
+    gtk3
+    libX11
+    libGLU libGL
+    openssl_1_0_2
+    ncurses5
+    SDL
+    SDL_ttf
+    stdenv.cc.cc.lib
+    zlib
+  ];
+
+  dontStrip = true;
+
+  installPhase = ''
+    install -D ${if stdenv.is64bit then "epsxe_x64" else "ePSXe"} $out/bin/epsxe
+  '';
+
+  meta = {
+    homepage = "http://epsxe.com/";
+    description = "Enhanced PSX (PlayStation 1) emulator";
+    license = licenses.unfree;
+    maintainers = with maintainers; [ yegortimoshenko ];
+    platforms = [ "i686-linux" "x86_64-linux" ];
+  };
+}
diff --git a/nixpkgs/pkgs/misc/emulators/fakenes/build.patch b/nixpkgs/pkgs/misc/emulators/fakenes/build.patch
new file mode 100644
index 000000000000..90799d977a14
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/fakenes/build.patch
@@ -0,0 +1,84 @@
+diff --git a/build/openal.cbd b/build/openal.cbd
+index d18e62d..74af061 100644
+--- a/build/openal.cbd
++++ b/build/openal.cbd
+@@ -23,7 +23,7 @@ CFLAGS += ' -DUSE_OPENAL'
+ # --
+ 
+ do ifplat unix
+-   LDFLAGS += ' `openal-config --libs`'
++   LDFLAGS += ' -lopenal'
+ else
+    LDFLAGS += ' -lOpenAL32'
+ done
+diff --git a/build/alleggl.cbd b/build/alleggl.cbd
+index e2708ff..e826371 100644
+--- a/build/alleggl.cbd
++++ b/build/alleggl.cbd
+@@ -22,7 +22,7 @@ CFLAGS += ' -DUSE_ALLEGROGL'
+ 
+ # --
+ 
+-LIBAGL = agl
++LIBAGL = alleggl
+ 
+ ifopt debug LIBAGL = 'agld'
+
+diff --git a/src/apu.cpp b/src/apu.cpp
+index af59f1c..893a798 100644
+--- a/src/apu.cpp
++++ b/src/apu.cpp
+@@ -1930,7 +1930,7 @@ static void amplify(real& sample)
+          gain -= releaseRate;
+       }
+ 
+-      real output = (1.0 / max(gain, EPSILON));
++      real output = (1.0 / MAX(gain, EPSILON));
+       output = fixf(output, apu_agc_gain_floor, apu_agc_gain_ceiling);
+       sample *= output;
+    }
+diff --git a/src/audio.cpp b/src/audio.cpp
+index b9650dc..c21c05e 100644
+--- a/src/audio.cpp
++++ b/src/audio.cpp
+@@ -7,6 +7,7 @@
+    You must read and accept the license prior to use. */
+ 
+ #include <allegro.h>
++#include <cstdio>
+ #include <cstdlib>
+ #include <cstring>
+ #include <vector>
+@@ -234,7 +235,7 @@ void audio_update(void)
+          const unsigned queuedFrames = (audioQueue.size() / audio_channels);
+          if(queuedFrames > 0) {
+             // Determine how many frames we want to make room for.
+-            const unsigned framesToAdd = min(queuedFrames, audio_buffer_size_frames);
++            const unsigned framesToAdd = MIN(queuedFrames, audio_buffer_size_frames);
+             // Make room for the frames in the buffer.
+             const unsigned framesToMove = (audioBufferedFrames - framesToAdd);
+             if(framesToMove > 0) {
+@@ -258,7 +259,7 @@ void audio_update(void)
+          // Determine how many frames are available in the buffer.
+          const unsigned bufferableFrames = (audio_buffer_size_frames - audioBufferedFrames);
+          // Determine the number of frames to copy to the buffer.
+-         const unsigned framesToCopy = min(queuedFrames, bufferableFrames);
++         const unsigned framesToCopy = MIN(queuedFrames, bufferableFrames);
+ 
+          // Copy frames to the buffer.
+          for(unsigned frame = 0; frame < framesToCopy; frame++) {
+diff --git a/src/include/common.h b/src/include/common.h
+index be28795..e2d21d1 100644
+--- a/src/include/common.h
++++ b/src/include/common.h
+@@ -41,8 +41,10 @@ extern "C" {
+ #define true   TRUE
+ #define false  FALSE
+ 
++/*
+ #define min(x,y)   MIN((x),(y))
+ #define max(x,y)   MAX((x),(y))
++*/
+ 
+ #define true_or_false(x)   ((x) ? true : false)
+ 
diff --git a/nixpkgs/pkgs/misc/emulators/fakenes/default.nix b/nixpkgs/pkgs/misc/emulators/fakenes/default.nix
new file mode 100644
index 000000000000..2011d8ce0375
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/fakenes/default.nix
@@ -0,0 +1,32 @@
+{lib, stdenv, fetchurl, allegro, openal, libGLU, libGL, zlib, hawknl, freeglut, libX11,
+  libXxf86vm, libXcursor, libXpm }:
+
+stdenv.mkDerivation {
+  name = "fakenes-0.5.9b3";
+  src = fetchurl {
+    url = "mirror://sourceforge/fakenes/fakenes-0.5.9-beta3.tar.gz";
+    sha256 = "026h67s4pzc1vma59pmzk02iy379255qbai2q74wln9bxqcpniy4";
+  };
+
+  buildInputs = [ allegro openal libGLU libGL zlib hawknl freeglut libX11
+    libXxf86vm libXcursor libXpm ];
+
+  hardeningDisable = [ "format" ];
+
+  installPhase = ''
+    mkdir -p $out/bin
+    cp fakenes $out/bin
+  '';
+
+  NIX_LDFLAGS = "-lX11 -lXxf86vm -lXcursor -lXpm";
+
+  patches = [ ./build.patch ];
+
+  meta = {
+    homepage = "http://fakenes.sourceforge.net/";
+    license = lib.licenses.gpl2Plus;
+    description = "Portable Open Source NES Emulator";
+    platforms = lib.platforms.linux;
+    broken = true;
+  };
+}
diff --git a/nixpkgs/pkgs/misc/emulators/fceux/default.nix b/nixpkgs/pkgs/misc/emulators/fceux/default.nix
new file mode 100644
index 000000000000..f76fc761abbc
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/fceux/default.nix
@@ -0,0 +1,40 @@
+{lib, stdenv, fetchFromGitHub, scons, zlib, SDL, lua5_1, pkg-config}:
+
+stdenv.mkDerivation {
+  pname = "fceux-unstable";
+  version = "2020-01-29";
+
+  src = fetchFromGitHub {
+    owner = "TASVideos";
+    repo = "fceux";
+    rev = "fb8d46d9697cb24b0ebe79d84eedf282f69ab337";
+    sha256 = "0gpz411dzfwx9mr34yi4zb1hphd5hha1nvwgzxki0sviwafca992";
+  };
+
+  nativeBuildInputs = [ pkg-config scons ];
+  buildInputs = [
+    zlib SDL lua5_1
+  ];
+
+  sconsFlags = "OPENGL=false GTK=false CREATE_AVI=false LOGO=false";
+  prefixKey = "--prefix=";
+
+  # sed allows scons to find libraries in nix.
+  # mkdir is a hack to make scons succeed.  It still doesn't
+  # actually put the files in there due to a bug in the SConstruct file.
+  # OPENGL doesn't work because fceux dlopens the library.
+  preBuild = ''
+    sed -e 's/env *= *Environment *.*/&; env['"'"'ENV'"'"']=os.environ;/' -i SConstruct
+    export CC="gcc"
+    export CXX="g++"
+    mkdir -p "$out" "$out/share/applications" "$out/share/pixmaps"
+  '';
+
+  meta = {
+    description = "A Nintendo Entertainment System (NES) Emulator";
+    license = lib.licenses.gpl2;
+    maintainers = [ lib.maintainers.scubed2 ];
+    homepage = "http://www.fceux.com/";
+    platforms = lib.platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/misc/emulators/firebird-emu/default.nix b/nixpkgs/pkgs/misc/emulators/firebird-emu/default.nix
new file mode 100644
index 000000000000..c766df9e3c03
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/firebird-emu/default.nix
@@ -0,0 +1,38 @@
+{ mkDerivation, lib, fetchFromGitHub, qmake, qtbase, qtdeclarative }:
+
+mkDerivation rec {
+  pname = "firebird-emu";
+  version = "1.4";
+
+  src = fetchFromGitHub {
+    owner = "nspire-emus";
+    repo = "firebird";
+    rev = "v${version}";
+    sha256 = "0pdca6bgnmzfgf5kp83as99y348gn4plzbxnqxjs61vp489baahq";
+    fetchSubmodules = true;
+  };
+
+  enableParallelBuilding = true;
+
+  nativeBuildInputs = [ qmake ];
+
+  buildInputs = [ qtbase qtdeclarative ];
+
+  makeFlags = [ "INSTALL_ROOT=$(out)" ];
+
+  # Attempts to install to /usr/bin and /usr/share/applications, which Nix does
+  # not use.
+  prePatch = ''
+    substituteInPlace firebird.pro \
+      --replace '/usr/' '/'
+  '';
+
+  meta = {
+    homepage = "https://github.com/nspire-emus/firebird";
+    description = "Third-party multi-platform emulator of the ARM-based TI-Nspire™ calculators";
+    license = lib.licenses.gpl3;
+    maintainers = with lib.maintainers; [ pneumaticat ];
+    # Only tested on Linux, but likely possible to build on, e.g. macOS
+    platforms = lib.platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/misc/emulators/fs-uae/default.nix b/nixpkgs/pkgs/misc/emulators/fs-uae/default.nix
new file mode 100644
index 000000000000..eef8c2c32533
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/fs-uae/default.nix
@@ -0,0 +1,32 @@
+{ lib, stdenv, fetchurl, pkg-config
+, gettext, gtk2, SDL2, zlib, glib, openal, libGLU, libGL, lua, freetype, libmpeg2, zip }:
+
+with lib;
+stdenv.mkDerivation rec {
+
+  pname = "fs-uae";
+  version = "3.0.5";
+
+  src = fetchurl {
+    url = "https://fs-uae.net/stable/${version}/${pname}-${version}.tar.gz";
+    sha256 = "1qwzhp34wy7bnd3c0plv11rg9fs5m92rh3ffnr9pn6ng0cpc8vpj";
+  };
+
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = [ gettext gtk2 SDL2 zlib glib openal libGLU libGL lua freetype libmpeg2 zip ];
+
+  meta = {
+    description = "An accurate, customizable Amiga Emulator";
+    longDescription = ''
+      FS-UAE integrates the most accurate Amiga emulation code available
+      from WinUAE. FS-UAE emulates A500, A500+, A600, A1200, A1000, A3000
+      and A4000 models, but you can tweak the hardware configuration and
+      create customized Amigas.
+    '';
+    license = licenses.gpl2Plus;
+    homepage = "https://fs-uae.net";
+    maintainers = with lib; [ maintainers.AndersonTorres ];
+    platforms = [ "i686-linux" "x86_64-linux" ];
+  };
+}
+# TODO: testing and Python GUI support
diff --git a/nixpkgs/pkgs/misc/emulators/fuse-emulator/default.nix b/nixpkgs/pkgs/misc/emulators/fuse-emulator/default.nix
new file mode 100644
index 000000000000..3426b47daeac
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/fuse-emulator/default.nix
@@ -0,0 +1,29 @@
+{ lib, stdenv, fetchurl, perl, pkg-config, wrapGAppsHook
+, SDL, bzip2, glib, gtk3, libgcrypt, libpng, libspectrum, libxml2, zlib
+}:
+
+stdenv.mkDerivation rec {
+  pname = "fuse-emulator";
+  version = "1.5.7";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/${pname}/fuse-${version}.tar.gz";
+    sha256 = "0kaynjr28w42n3iha60mgr7nxm49w8j0v49plyrc7ka24qzmiqph";
+  };
+
+  nativeBuildInputs = [ perl pkg-config wrapGAppsHook ];
+
+  buildInputs = [ SDL bzip2 glib gtk3 libgcrypt libpng libspectrum libxml2 zlib ];
+
+  configureFlags = [ "--enable-desktop-integration" ];
+
+  enableParallelBuilding = true;
+
+  meta = with lib; {
+    homepage = "http://fuse-emulator.sourceforge.net/";
+    description = "ZX Spectrum emulator";
+    license = licenses.gpl2Plus;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ orivej ];
+  };
+}
diff --git a/nixpkgs/pkgs/misc/emulators/gens-gs/default.nix b/nixpkgs/pkgs/misc/emulators/gens-gs/default.nix
new file mode 100644
index 000000000000..abc676ffa632
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/gens-gs/default.nix
@@ -0,0 +1,25 @@
+{ lib, stdenv, fetchurl, pkg-config, gtk2, SDL, nasm, zlib, libpng, libGLU, libGL }:
+
+stdenv.mkDerivation {
+  name = "gens-gs-7";
+
+  src = fetchurl {
+    url = "http://retrocdn.net/images/6/6d/Gens-gs-r7.tar.gz";
+    sha256 = "1ha5s6d3y7s9aq9f4zmn9p88109c3mrj36z2w68jhiw5xrxws833";
+  };
+
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = [ gtk2 SDL nasm zlib libpng libGLU libGL ];
+
+  # Work around build failures on recent GTK.
+  # See http://ubuntuforums.org/showthread.php?p=10535837
+  NIX_CFLAGS_COMPILE = "-UGTK_DISABLE_DEPRECATED -UGSEAL_ENABLE";
+
+  meta = with lib; {
+    homepage = "https://segaretro.org/Gens/GS";
+    description = "A Genesis/Mega Drive emulator";
+    platforms = [ "i686-linux" ];
+    license = licenses.gpl2Plus;
+    maintainers = [ maintainers.eelco ];
+  };
+}
diff --git a/nixpkgs/pkgs/misc/emulators/gxemul/default.nix b/nixpkgs/pkgs/misc/emulators/gxemul/default.nix
new file mode 100644
index 000000000000..3149ccaaaac0
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/gxemul/default.nix
@@ -0,0 +1,35 @@
+{ lib, stdenv, fetchurl }:
+
+stdenv.mkDerivation rec {
+  pname = "gxemul";
+  version = "0.6.2";
+
+  src = fetchurl {
+    url = "http://gavare.se/gxemul/src/gxemul-${version}.tar.gz";
+    sha256 = "0iqmazfn7ss5n27m1a9n9nps3vzhag1phzb7qw0wgczycmwsq0x7";
+  };
+
+  configurePhase = "./configure";
+
+  installPhase = ''
+    mkdir -p {$out/bin,$out/share/${pname}-${version}}
+    cp -r {doc,demos} $out/share/${pname}-${version}
+    cp gxemul $out/bin
+    cp -r ./man $out
+  '';
+
+  meta = with lib; {
+    homepage = "http://gavare.se/gxemul/";
+    description = "Gavare's experimental emulator";
+    longDescription = ''
+      GXemul is a framework for full-system computer architecture
+      emulation. Several real machines have been implemented within the
+      framework, consisting of processors (ARM, MIPS, Motorola 88K,
+      PowerPC, and SuperH) and surrounding hardware components such as
+      framebuffers, interrupt controllers, busses, disk controllers,
+      and serial controllers. The emulation is working well enough to
+      allow several unmodified "guest" operating systems to run.
+    '';
+    license = licenses.bsd3;
+  };
+}
diff --git a/nixpkgs/pkgs/misc/emulators/hatari/default.nix b/nixpkgs/pkgs/misc/emulators/hatari/default.nix
new file mode 100644
index 000000000000..de98278b8325
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/hatari/default.nix
@@ -0,0 +1,25 @@
+{ lib, stdenv, fetchurl, zlib, SDL, cmake }:
+
+stdenv.mkDerivation rec {
+  pname = "hatari";
+  version = "2.3.1";
+
+  src = fetchurl {
+    url = "https://download.tuxfamily.org/hatari/${version}/${pname}-${version}.tar.bz2";
+    sha256 = "sha256-RKL2LKmV442eCHSAaVbwucPMhOqJ4BaaY4SbY807ZL0=";
+  };
+
+  # For pthread_cancel
+  cmakeFlags = [ "-DCMAKE_EXE_LINKER_FLAGS=-lgcc_s" ];
+
+  nativeBuildInputs = [ cmake ];
+  buildInputs = [ zlib SDL ];
+
+  meta = {
+    homepage = "http://hatari.tuxfamily.org/";
+    description = "Atari ST/STE/TT/Falcon emulator";
+    license = lib.licenses.gpl2Plus;
+    platforms = lib.platforms.linux;
+    maintainers = with lib.maintainers; [ ];
+  };
+}
diff --git a/nixpkgs/pkgs/misc/emulators/higan/0001-change-flags.diff b/nixpkgs/pkgs/misc/emulators/higan/0001-change-flags.diff
new file mode 100644
index 000000000000..745bba5d518d
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/higan/0001-change-flags.diff
@@ -0,0 +1,25 @@
+diff -Naur higan-110-old/higan/GNUmakefile higan-110-new/higan/GNUmakefile
+--- higan-110-old/higan/GNUmakefile	2020-04-15 11:06:00.279935557 -0300
++++ higan-110-new/higan/GNUmakefile	2020-04-15 11:08:32.982417291 -0300
+@@ -11,7 +11,7 @@
+ include $(nall.path)/GNUmakefile
+ 
+ ifeq ($(platform),local)
+-  flags += -march=native
++  flags +=
+ endif
+ 
+ ifeq ($(platform),windows)
+diff -Naur higan-110-old/nall/GNUmakefile higan-110-new/nall/GNUmakefile
+--- higan-110-old/nall/GNUmakefile	2020-04-15 11:06:00.396935154 -0300
++++ higan-110-new/nall/GNUmakefile	2020-04-15 11:10:37.738011488 -0300
+@@ -127,7 +127,8 @@
+ 
+ # linux settings
+ ifeq ($(platform),linux)
+-  options += -ldl
++  flags += $(CXXFLAGS)
++  options += $(LDFLAGS) -ldl
+ endif
+ 
+ # bsd settings
diff --git a/nixpkgs/pkgs/misc/emulators/higan/default.nix b/nixpkgs/pkgs/misc/emulators/higan/default.nix
new file mode 100644
index 000000000000..c7bc7e9f976e
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/higan/default.nix
@@ -0,0 +1,135 @@
+{ lib, stdenv, fetchFromGitHub
+, pkg-config
+, libX11, libXv
+, udev
+, libGLU, libGL, SDL2
+, libao, openal, libpulseaudio
+, alsaLib
+, gtk2, gtksourceview
+, runtimeShell
+# Darwin dependencies
+, libicns, Carbon, Cocoa, OpenGL, OpenAL}:
+
+let
+  inherit (lib) optionals;
+in
+stdenv.mkDerivation rec {
+
+  pname = "higan";
+  version = "110";
+
+  src = fetchFromGitHub {
+    owner = "higan-emu";
+    repo = "higan";
+    rev = "v${version}";
+    sha256 = "11rvm53c3p2f6zk8xbyv2j51xp8zmqnch7zravhj3fk590qrjrr2";
+  };
+
+  patches = [ ./0001-change-flags.diff ];
+  postPatch = ''
+    sed '1i#include <cmath>' -i higan/fc/ppu/ppu.cpp
+
+    for file in icarus/GNUmakefile higan/target-higan/GNUmakefile; do
+      substituteInPlace "$file" \
+        --replace 'sips -s format icns data/$(name).png --out out/$(name).app/Contents/Resources/$(name).icns' \
+                  'png2icns out/$(name).app/Contents/Resources/$(name).icns data/$(name).png'
+    done
+  '';
+
+  nativeBuildInputs = [ pkg-config ]
+    ++ optionals stdenv.isDarwin [ libicns ];
+
+  buildInputs = [ SDL2 libao ]
+                ++ optionals stdenv.isLinux [ alsaLib udev libpulseaudio openal
+                                              gtk2 gtksourceview libX11 libXv
+                                              libGLU libGL ]
+                ++ optionals stdenv.isDarwin [ Carbon Cocoa OpenGL OpenAL ];
+
+  buildPhase = ''
+    make compiler=c++ -C higan openmp=true target=higan
+    make compiler=c++ -C genius openmp=true
+    make compiler=c++ -C icarus openmp=true
+  '';
+
+  installPhase = (if stdenv.isDarwin then ''
+    mkdir "$out"
+    mv higan/out/higan.app "$out"/
+    mv icarus/out/icarus.app "$out"/
+    mv genius/out/genius.app "$out"/
+  '' else ''
+    install -dm 755 "$out"/bin "$out"/share/applications "$out"/share/pixmaps
+
+    install -m 755 higan/out/higan -t "$out"/bin/
+    install -m 644 higan/target-higan/resource/higan.desktop \
+            -t $out/share/applications/
+    install -m 644 higan/target-higan/resource/higan.svg \
+            $out/share/pixmaps/higan-icon.svg
+    install -m 644 higan/target-higan/resource/higan.png \
+            $out/share/pixmaps/higan-icon.png
+
+    install -m 755 icarus/out/icarus -t "$out"/bin/
+    install -m 644 icarus/data/icarus.desktop -t $out/share/applications/
+    install -m 644 icarus/data/icarus.svg $out/share/pixmaps/icarus-icon.svg
+    install -m 644 icarus/data/icarus.png $out/share/pixmaps/icarus-icon.png
+
+    install -m 755 genius/out/genius -t "$out"/bin/
+    install -m 644 genius/data/genius.desktop -t $out/share/applications/
+    install -m 644 genius/data/genius.svg $out/share/pixmaps/genius-icon.svg
+    install -m 644 genius/data/genius.png $out/share/pixmaps/genius-icon.png
+  '') + ''
+    mkdir -p "$out"/share/higan "$out"/share/icarus
+    cp --recursive --no-dereference --preserve='links' --no-preserve='ownership' \
+      higan/System/ "$out"/share/higan/
+    cp --recursive --no-dereference --preserve='links' --no-preserve='ownership' \
+      icarus/Database icarus/Firmware $out/share/icarus/
+  '';
+
+  fixupPhase = let
+    dest = if stdenv.isDarwin
+           then "\\$HOME/Library/Application Support/higan"
+           else "\\$HOME/higan";
+  in ''
+    # A dirty workaround, suggested by @cpages:
+    # we create a first-run script to populate
+    # $HOME with all the stuff needed at runtime
+
+    mkdir -p "$out"/bin
+    cat <<EOF > $out/bin/higan-init.sh
+    #!${runtimeShell}
+
+    cp --recursive --update $out/share/higan/System/ "${dest}"/
+
+    EOF
+
+    chmod +x $out/bin/higan-init.sh
+  '';
+
+  meta = with lib; {
+    description = "An open-source, cycle-accurate multi-system emulator";
+    longDescription = ''
+      higan is a multi-system game console emulator. The purpose of higan is to
+      serve as hardware documentation in source code form: it is meant to be as
+      accurate and complete as possible, with code that is easy to read and
+      understand.
+
+      It currently supports the following systems:
+      - Famicom + Famicom Disk System
+      - Super Famicom + Super Game Boy
+      - Game Boy + Game Boy Color
+      - Game Boy Advance + Game Boy Player
+      - SG-1000 + SC-3000
+      - Master System + Game Gear
+      - Mega Drive + Mega CD
+      - PC Engine + SuperGrafx
+      - MSX + MSX2
+      - ColecoVision
+      - Neo Geo Pocket + Neo Geo Pocket Color
+      - WonderSwan + WonderSwan Color + SwanCrystal + Pocket Challenge V2
+    '';
+    homepage = "https://byuu.org/higan/";
+    license = licenses.gpl3Plus;
+    maintainers = with maintainers; [ AndersonTorres ];
+    platforms = platforms.unix;
+  };
+}
+# TODO: Qt and GTK3+ support
diff --git a/nixpkgs/pkgs/misc/emulators/kega-fusion/default.nix b/nixpkgs/pkgs/misc/emulators/kega-fusion/default.nix
new file mode 100644
index 000000000000..1b00a55fe058
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/kega-fusion/default.nix
@@ -0,0 +1,78 @@
+{ stdenv, lib, writeText, fetchurl, upx, libGLU, glib, gtk2, alsaLib, libSM, libX11, gdk-pixbuf, pango, libXinerama, mpg123, runtimeShell }:
+
+let
+  libPath = lib.makeLibraryPath [ stdenv.cc.cc libGLU glib gtk2 alsaLib libSM libX11 gdk-pixbuf pango libXinerama ];
+
+in stdenv.mkDerivation {
+  pname = "kega-fusion";
+  version = "3.63x";
+
+  src = fetchurl {
+    url = "http://www.carpeludum.com/download/Fusion363x.tar.gz";
+    sha256 = "14s6czy20h5khyy7q95hd7k77v17ssafv9l6lafkiysvj2nmw94g";
+  };
+
+  plugins = fetchurl {
+    url = "http://www.carpeludum.com/download/PluginsLinux.tar.gz";
+    sha256 = "0d623cvh6n5ijj3wb64g93mxx2xbichsn7hj7brbb0ndw5cs70qj";
+  };
+
+  runner = writeText "kega-fusion" ''
+    #!${runtimeShell} -ex
+
+    kega_libdir="@out@/lib/kega-fusion"
+    kega_localdir="$HOME/.Kega Fusion"
+
+    # create local plugins directory if not present
+    mkdir -p "$kega_localdir/Plugins"
+
+    # create links for every included plugin
+    if [ $(ls -1A $kega_libdir/plugins | wc -l) -gt 0 ]; then
+      for i in $kega_libdir/plugins/*; do
+        if [ ! -e "$kega_localdir/Plugins/$(basename "$i")" ]; then
+          ln -sf "$i" "$kega_localdir/Plugins/"
+        fi
+      done
+    fi
+
+    # copy configuration file if not present
+    if ! [ -f "$kega_localdir/Fusion.ini" ]; then
+      cat > "$kega_localdir/Fusion.ini" <<EOF
+    ALSADeviceName=default
+    libmpg123path=${lib.getLib mpg123}/lib/libmpg123.so.0
+    EOF
+    else
+      sed -i 's,^\(libmpg123path=\).*,\1${lib.getLib mpg123}/lib/libmpg123.so.0,' "$kega_localdir/Fusion.ini"
+    fi
+
+    # here we go!
+    exec "$kega_libdir/Fusion" "$@"
+  '';
+
+  dontStrip = true;
+  dontPatchELF = true;
+
+  nativeBuildInputs = [ upx ];
+
+  installPhase = ''
+    upx -d Fusion
+    install -Dm755 Fusion "$out/lib/kega-fusion/Fusion"
+    patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" --set-rpath "${libPath}" "$out/lib/kega-fusion/Fusion"
+
+    tar -xaf $plugins
+    mkdir -p "$out/lib/kega-fusion/plugins"
+    cp -r Plugins/*.rpi "$out/lib/kega-fusion/plugins"
+
+    mkdir -p "$out/bin"
+    substitute "$runner" "$out/bin/kega-fusion" --subst-var out
+    chmod +x "$out/bin/kega-fusion"
+  '';
+
+  meta = with lib; {
+    description = "Sega SG1000, SC3000, SF7000, Master System, Game Gear, Genesis/Megadrive, SVP, Pico, SegaCD/MegaCD and 32X emulator";
+    homepage = "https://www.carpeludum.com/kega-fusion/";
+    maintainers = with maintainers; [ abbradar ];
+    license = licenses.unfreeRedistributable;
+    platforms = [ "i686-linux" ];
+  };
+}
diff --git a/nixpkgs/pkgs/misc/emulators/lambda-delta/default.nix b/nixpkgs/pkgs/misc/emulators/lambda-delta/default.nix
new file mode 100644
index 000000000000..a17a0eadfd5b
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/lambda-delta/default.nix
@@ -0,0 +1,26 @@
+{ lib, stdenv, fetchFromGitHub, autoreconfHook, pkg-config, SDL2 }:
+
+stdenv.mkDerivation rec {
+  pname = "lambda-delta";
+  version = "0.98.3";
+
+  src = fetchFromGitHub {
+    owner = "dseagrav";
+    repo = "ld";
+    rev = version;
+    sha256 = "02m43fj9dzc1i1jl01qwnhjiq1rh03jw1xq59sx2h3bhn7dk941x";
+  };
+
+  nativeBuildInputs = [ autoreconfHook pkg-config ];
+  buildInputs = [ SDL2 ];
+
+  configureFlags = [ "--without-SDL1" ];
+
+  meta = with lib; {
+    description = "LMI (Lambda Lisp Machine) emulator";
+    homepage = "https://github.com/dseagrav/ld";
+    license = licenses.gpl2;
+    maintainers = with maintainers; [ siraben ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/misc/emulators/libdsk/default.nix b/nixpkgs/pkgs/misc/emulators/libdsk/default.nix
new file mode 100644
index 000000000000..9ad20275489b
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/libdsk/default.nix
@@ -0,0 +1,19 @@
+{ lib, stdenv, fetchurl }:
+
+stdenv.mkDerivation rec {
+  pname = "libdsk";
+  version = "1.5.15";
+
+  src = fetchurl {
+    url = "https://www.seasip.info/Unix/LibDsk/${pname}-${version}.tar.gz";
+    sha256 = "sha256-7VjVgGRy3+SE+9mdPpBKiNzv1tg2akXpkHfv2dVoODs=";
+  };
+
+  meta = with lib; {
+    description = "A library for accessing discs and disc image files";
+    homepage = "http://www.seasip.info/Unix/LibDsk/";
+    license = licenses.gpl2Plus;
+    maintainers = [ ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/misc/emulators/mame/default.nix b/nixpkgs/pkgs/misc/emulators/mame/default.nix
new file mode 100644
index 000000000000..b50181a4d98d
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/mame/default.nix
@@ -0,0 +1,87 @@
+{ lib, stdenv, mkDerivation, fetchFromGitHub, makeDesktopItem, makeWrapper
+, python, pkg-config, SDL2, SDL2_ttf, alsaLib, which, qtbase, libXinerama
+, libpcap, CoreAudioKit, ForceFeedback
+, installShellFiles }:
+
+let
+  majorVersion = "0";
+  minorVersion = "226";
+
+  desktopItem = makeDesktopItem {
+    name = "MAME";
+    exec = "mame${lib.optionalString stdenv.is64bit "64"}";
+    desktopName = "MAME";
+    genericName = "MAME is a multi-purpose emulation framework";
+    categories = "System;Emulator;";
+  };
+
+  dest = "$out/opt/mame";
+in mkDerivation {
+  pname = "mame";
+  version = "${majorVersion}.${minorVersion}";
+
+  src = fetchFromGitHub {
+    owner = "mamedev";
+    repo = "mame";
+    rev = "mame${majorVersion}${minorVersion}";
+    sha256 = "0pnsvz4vkjkqb1ac5wzwz31vx0iknyg5ffly90nhl13kcr656jrj";
+  };
+
+  hardeningDisable = [ "fortify" ];
+  NIX_CFLAGS_COMPILE = [ "-Wno-error=maybe-uninitialized" "-Wno-error=missing-braces" ];
+
+  makeFlags = [
+    "TOOLS=1"
+    "USE_LIBSDL=1"
+  ]
+  ++ lib.optionals stdenv.cc.isClang [ "CC=clang" "CXX=clang++" ]
+  ;
+
+  dontWrapQtApps = true;
+
+  buildInputs =
+    [ SDL2 SDL2_ttf qtbase libXinerama ]
+    ++ lib.optional stdenv.isLinux alsaLib
+    ++ lib.optionals stdenv.isDarwin [ libpcap CoreAudioKit ForceFeedback ]
+    ;
+  nativeBuildInputs = [ python pkg-config which makeWrapper installShellFiles ];
+
+  # by default MAME assumes that paths with stock resources
+  # are relative and that you run MAME changing to
+  # install directory, so we add absolute paths here
+  patches = [
+    ./emuopts.patch
+  ];
+
+  postPatch = ''
+    substituteInPlace src/emu/emuopts.cpp \
+      --subst-var-by mame ${dest}
+  '';
+
+  installPhase = ''
+    make -f dist.mak PTR64=${lib.optionalString stdenv.is64bit "1"}
+    mkdir -p ${dest}
+    mv build/release/*/Release/mame/* ${dest}
+
+    mkdir -p $out/bin
+    find ${dest} -maxdepth 1 -executable -type f -exec mv -t $out/bin {} \;
+    install -Dm755 src/osd/sdl/taputil.sh $out/bin/taputil.sh
+
+    installManPage ${dest}/docs/man/*.1 ${dest}/docs/man/*.6
+
+    mv artwork plugins samples ${dest}
+  '' + lib.optionalString stdenv.isLinux ''
+    mkdir -p $out/share
+    ln -s ${desktopItem}/share/applications $out/share
+  '';
+
+  meta = with lib; {
+    description = "Is a multi-purpose emulation framework";
+    homepage = "https://www.mamedev.org/";
+    license = with licenses; [ bsd3 gpl2Plus ];
+    platforms = platforms.unix;
+    # makefile needs fixes for install target
+    badPlatforms = [ "aarch64-linux" ];
+    maintainers = with maintainers; [ gnidorah ];
+  };
+}
diff --git a/nixpkgs/pkgs/misc/emulators/mame/emuopts.patch b/nixpkgs/pkgs/misc/emulators/mame/emuopts.patch
new file mode 100644
index 000000000000..b85291f52f74
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/mame/emuopts.patch
@@ -0,0 +1,29 @@
+diff --git a/src/emu/emuopts.cpp b/src/emu/emuopts.cpp
+index c42fcef848..d1bddae060 100644
+--- a/src/emu/emuopts.cpp
++++ b/src/emu/emuopts.cpp
+@@ -36,16 +36,16 @@ const options_entry emu_options::s_option_entries[] =
+ 	{ nullptr,                                           nullptr,     OPTION_HEADER,     "CORE SEARCH PATH OPTIONS" },
+ 	{ OPTION_HOMEPATH,                                   ".",         OPTION_STRING,     "path to base folder for plugin data (read/write)" },
+ 	{ OPTION_MEDIAPATH ";rp;biospath;bp",                "roms",      OPTION_STRING,     "path to ROM sets and hard disk images" },
+-	{ OPTION_HASHPATH ";hash_directory;hash",            "hash",      OPTION_STRING,     "path to software definition files" },
+-	{ OPTION_SAMPLEPATH ";sp",                           "samples",   OPTION_STRING,     "path to audio sample sets" },
+-	{ OPTION_ARTPATH,                                    "artwork",   OPTION_STRING,     "path to artwork files" },
+-	{ OPTION_CTRLRPATH,                                  "ctrlr",     OPTION_STRING,     "path to controller definitions" },
+-	{ OPTION_INIPATH,                                    ".;ini;ini/presets",     OPTION_STRING,     "path to ini files" },
+-	{ OPTION_FONTPATH,                                   ".",         OPTION_STRING,     "path to font files" },
++	{ OPTION_HASHPATH ";hash_directory;hash",            "hash;@mame@/hash",      OPTION_STRING,     "path to software definition files" },
++	{ OPTION_SAMPLEPATH ";sp",                           "samples;@mame@/samples",   OPTION_STRING,     "path to audio sample sets" },
++	{ OPTION_ARTPATH,                                    "artwork;@mame@/artwork",   OPTION_STRING,     "path to artwork files" },
++	{ OPTION_CTRLRPATH,                                  "ctrlr;@mame@/ctrlr",     OPTION_STRING,     "path to controller definitions" },
++	{ OPTION_INIPATH,                                    ".;ini;ini/presets;@mame@/ini/presets",     OPTION_STRING,     "path to ini files" },
++	{ OPTION_FONTPATH,                                   ".;@mame@",         OPTION_STRING,     "path to font files" },
+ 	{ OPTION_CHEATPATH,                                  "cheat",     OPTION_STRING,     "path to cheat files" },
+ 	{ OPTION_CROSSHAIRPATH,                              "crosshair", OPTION_STRING,     "path to crosshair files" },
+-	{ OPTION_PLUGINSPATH,                                "plugins",   OPTION_STRING,     "path to plugin files" },
+-	{ OPTION_LANGUAGEPATH,                               "language",  OPTION_STRING,     "path to UI translation files" },
++	{ OPTION_PLUGINSPATH,                                "plugins;@mame@/plugins",   OPTION_STRING,     "path to plugin files" },
++	{ OPTION_LANGUAGEPATH,                               "language;@mame@/language",  OPTION_STRING,     "path to UI translation files" },
+ 	{ OPTION_SWPATH,                                     "software",  OPTION_STRING,     "path to loose software" },
+ 
+ 	// output directory options
diff --git a/nixpkgs/pkgs/misc/emulators/mednafen/default.nix b/nixpkgs/pkgs/misc/emulators/mednafen/default.nix
new file mode 100644
index 000000000000..aaf736f3e5e4
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/mednafen/default.nix
@@ -0,0 +1,74 @@
+{ lib, stdenv, fetchurl, pkg-config, freeglut, libGLU, libGL, libcdio, libjack2
+, libsamplerate, libsndfile, libX11, SDL2, SDL2_net, zlib, alsaLib }:
+
+stdenv.mkDerivation rec {
+  pname = "mednafen";
+  version = "1.26.1";
+
+  src = fetchurl {
+    url = "https://mednafen.github.io/releases/files/${pname}-${version}.tar.xz";
+    sha256 = "1x7xhxjhwsdbak8l0iyb497f043xkhibk73w96xck4j2bk10fac4";
+  };
+
+  nativeBuildInputs = [ pkg-config ];
+
+  buildInputs = [
+    freeglut
+    libGLU libGL
+    libcdio
+    libjack2
+    alsaLib
+    libsamplerate
+    libsndfile
+    libX11
+    SDL2
+    SDL2_net
+    zlib
+  ];
+
+  hardeningDisable = [ "pic" ];
+
+  postInstall = ''
+    mkdir -p $out/share/doc
+    mv Documentation $out/share/doc/mednafen
+  '';
+
+  meta = with lib; {
+    description = "A portable, CLI-driven, SDL+OpenGL-based, multi-system emulator";
+    longDescription = ''
+      Mednafen is a portable, utilizing OpenGL and SDL,
+      argument(command-line)-driven multi-system emulator. Mednafen has the
+      ability to remap hotkey functions and virtual system inputs to a keyboard,
+      a joystick, or both simultaneously. Save states are supported, as is
+      real-time game rewinding. Screen snapshots may be taken, in the PNG file
+      format, at the press of a button. Mednafen can record audiovisual movies
+      in the QuickTime file format, with several different lossless codecs
+      supported.
+
+      The following systems are supported (refer to the emulation module
+      documentation for more details):
+
+      - Apple II/II+
+      - Atari Lynx
+      - Neo Geo Pocket (Color)
+      - WonderSwan
+      - GameBoy (Color)
+      - GameBoy Advance
+      - Nintendo Entertainment System
+      - Super Nintendo Entertainment System/Super Famicom
+      - Virtual Boy
+      - PC Engine/TurboGrafx 16 (CD)
+      - SuperGrafx
+      - PC-FX
+      - Sega Game Gear
+      - Sega Genesis/Megadrive
+      - Sega Master System
+      - Sega Saturn (experimental, x86_64 only)
+      - Sony PlayStation
+    '';
+    homepage = "https://mednafen.github.io/";
+    license = licenses.gpl2;
+    maintainers = with maintainers; [ AndersonTorres ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/misc/emulators/mednafen/server.nix b/nixpkgs/pkgs/misc/emulators/mednafen/server.nix
new file mode 100644
index 000000000000..24c13bf0228c
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/mednafen/server.nix
@@ -0,0 +1,21 @@
+{ lib, stdenv, fetchurl }:
+
+stdenv.mkDerivation rec {
+  pname = "mednafen-server";
+  version = "0.5.2";
+
+  src = fetchurl {
+    url = "https://mednafen.github.io/releases/files/mednafen-server-${version}.tar.xz";
+    sha256 = "0xm7dj5nwnrsv69r72rcnlw03jm0l8rmrg3s05gjfvxyqmlb36dq";
+  };
+
+  postInstall = "install -m 644 -Dt $out/share/mednafen-server standard.conf";
+
+  meta = with lib; {
+    description = "Netplay server for Mednafen";
+    homepage = "https://mednafen.github.io/";
+    license = licenses.gpl2;
+    maintainers = with maintainers; [ AndersonTorres ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/misc/emulators/mednaffe/default.nix b/nixpkgs/pkgs/misc/emulators/mednaffe/default.nix
new file mode 100644
index 000000000000..8a11b633d28e
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/mednaffe/default.nix
@@ -0,0 +1,43 @@
+{ stdenv
+, lib
+, fetchFromGitHub
+, autoreconfHook
+, pkg-config
+, mednafen
+, gtk2 ? null
+, gtk3 ? null
+, wrapGAppsHook
+}:
+
+stdenv.mkDerivation rec {
+  pname = "mednaffe";
+  version = "0.9.1";
+
+  src = fetchFromGitHub {
+    owner = "AmatCoder";
+    repo = "mednaffe";
+    rev = version;
+    sha256 = "sha256-YU8PHnQHAsY90LN/WDugi4WhsuZGBj/z3BS4o69qMS4=";
+  };
+
+  nativeBuildInputs = [ autoreconfHook pkg-config wrapGAppsHook ];
+  buildInputs = [ gtk2 gtk3 mednafen ];
+
+  configureFlags = [ (lib.enableFeature (gtk3 != null) "gtk3") ];
+
+  dontWrapGApps = true;
+
+  postInstall = ''
+    wrapProgram $out/bin/mednaffe \
+      --prefix PATH ':' "${mednafen}/bin" \
+      "''${gappsWrapperArgs[@]}"
+   '';
+
+  meta = with lib; {
+    description = "GTK-based frontend for mednafen emulator";
+    homepage = "https://github.com/AmatCoder/mednaffe";
+    license = licenses.gpl3Plus;
+    maintainers = with maintainers; [ sheenobu yegortimoshenko AndersonTorres ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/misc/emulators/melonDS/default.nix b/nixpkgs/pkgs/misc/emulators/melonDS/default.nix
new file mode 100644
index 000000000000..a53d2bfc339e
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/melonDS/default.nix
@@ -0,0 +1,41 @@
+{ lib
+, fetchFromGitHub
+, mkDerivation
+, cmake
+, pkg-config
+, SDL2
+, qtbase
+, libpcap
+, libslirp
+, wrapGAppsHook
+}:
+
+mkDerivation rec {
+  pname = "melonDS";
+  version = "0.9.1";
+
+  src = fetchFromGitHub {
+    owner = "Arisotura";
+    repo = pname;
+    rev = version;
+    sha256 = "sha256-bvi0Y+zwfEcsZMNxoH85hxwIGn0UIYlg/ZaE6yJ7vlo=";
+  };
+
+  nativeBuildInputs = [ cmake pkg-config wrapGAppsHook ];
+  buildInputs = [
+    SDL2
+    qtbase
+    libpcap
+    libslirp
+  ];
+
+  cmakeFlags = [ "-UUNIX_PORTABLE" ];
+
+  meta = with lib; {
+    homepage = "http://melonds.kuribo64.net/";
+    description = "Work in progress Nintendo DS emulator";
+    license = licenses.gpl3Plus;
+    maintainers = with maintainers; [ artemist benley shamilton ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/misc/emulators/mgba/default.nix b/nixpkgs/pkgs/misc/emulators/mgba/default.nix
new file mode 100644
index 000000000000..be097c311856
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/mgba/default.nix
@@ -0,0 +1,62 @@
+{ lib, stdenv, fetchFromGitHub, makeDesktopItem, wrapQtAppsHook, pkg-config
+, cmake, epoxy, libzip, libelf, libedit, ffmpeg_3, SDL2, imagemagick
+, qtbase, qtmultimedia, qttools, minizip }:
+
+let
+  desktopItem = makeDesktopItem {
+    name = "mgba";
+    exec = "mgba-qt";
+    icon = "mgba";
+    comment = "A Game Boy Advance Emulator";
+    desktopName = "mgba";
+    genericName = "Game Boy Advance Emulator";
+    categories = "Game;Emulator;";
+    startupNotify = "false";
+  };
+in stdenv.mkDerivation rec {
+  pname = "mgba";
+  version = "0.9.0";
+
+  src = fetchFromGitHub {
+    owner = "mgba-emu";
+    repo = "mgba";
+    rev = version;
+    sha256 = "sha256-JVauGyHJVfiXVG4Z+Ydh1lRypy5rk9SKeTbeHFNFYJs=";
+  };
+
+  nativeBuildInputs = [ wrapQtAppsHook pkg-config cmake ];
+
+  buildInputs = [
+    epoxy libzip libelf libedit ffmpeg_3 SDL2 imagemagick
+    qtbase qtmultimedia qttools minizip
+  ];
+
+  postInstall = ''
+    cp -r ${desktopItem}/share/applications $out/share
+  '';
+
+  meta = with lib; {
+    homepage = "https://mgba.io";
+    description = "A modern GBA emulator with a focus on accuracy";
+
+    longDescription = ''
+      mGBA is a new Game Boy Advance emulator written in C.
+
+      The project started in April 2013 with the goal of being fast
+      enough to run on lower end hardware than other emulators
+      support, without sacrificing accuracy or portability. Even in
+      the initial version, games generally play without problems. It
+      is loosely based on the previous GBA.js emulator, although very
+      little of GBA.js can still be seen in mGBA.
+
+      Other goals include accurate enough emulation to provide a
+      development environment for homebrew software, a good workflow
+      for tool-assist runners, and a modern feature set for emulators
+      that older emulators may not support.
+    '';
+
+    license = licenses.mpl20;
+    maintainers = with maintainers; [ MP2E AndersonTorres ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/misc/emulators/mupen64plus/default.nix b/nixpkgs/pkgs/misc/emulators/mupen64plus/default.nix
new file mode 100644
index 000000000000..f5d17d9d3951
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/mupen64plus/default.nix
@@ -0,0 +1,29 @@
+{lib, stdenv, fetchurl, boost, dash, freetype, libpng, pkg-config, SDL, which, zlib, nasm }:
+
+stdenv.mkDerivation rec {
+  pname = "mupen64plus";
+  version = "2.5.9";
+
+  src = fetchurl {
+    url = "https://github.com/mupen64plus/mupen64plus-core/releases/download/${version}/mupen64plus-bundle-src-${version}.tar.gz";
+    sha256 = "1a21n4gqdvag6krwcjm5bnyw5phrlxw6m0mk73jy53iq03f3s96m";
+  };
+
+  nativeBuildInputs = [ pkg-config nasm ];
+  buildInputs = [ boost dash freetype libpng SDL which zlib ];
+
+  buildPhase = ''
+    dash m64p_build.sh PREFIX="$out" COREDIR="$out/lib/" PLUGINDIR="$out/lib/mupen64plus" SHAREDIR="$out/share/mupen64plus"
+  '';
+  installPhase = ''
+    dash m64p_install.sh DESTDIR="$out" PREFIX=""
+  '';
+
+  meta = with lib; {
+    description = "A Nintendo 64 Emulator";
+    license = licenses.gpl2Plus;
+    homepage = "http://www.mupen64plus.org/";
+    maintainers = [ maintainers.sander ];
+    platforms = [ "x86_64-linux" ];
+  };
+}
diff --git a/nixpkgs/pkgs/misc/emulators/nestopia/build-fix.patch b/nixpkgs/pkgs/misc/emulators/nestopia/build-fix.patch
new file mode 100644
index 000000000000..a7d82ead15ca
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/nestopia/build-fix.patch
@@ -0,0 +1,18 @@
+diff -wbBur rdanbrook-nestopia-f1dde9b/Makefile rdanbrook-nestopia-f1dde9b.my/Makefile
+--- rdanbrook-nestopia-f1dde9b/Makefile	2013-01-20 20:10:25.000000000 +0400
++++ rdanbrook-nestopia-f1dde9b.my/Makefile	2013-01-21 15:18:54.727577673 +0400
+@@ -197,11 +197,11 @@
+ 	install -m 0644 NstDatabase.xml $(DATADIR)
+ 	install -m 0644 source/unix/icons/*.png $(DATADIR)/icons
+ 	install -m 0644 source/unix/icons/*.svg $(DATADIR)/icons
+-	install -m 0644 source/unix/icons/nestopia.svg $(PREFIX)/share/pixmaps
+-	xdg-desktop-menu install --novendor $(DATADIR)/nestopia.desktop
++	install -m 0644 source/unix/icons/nestopia.svg $(PREFIX)/share/pixmaps/nestopia.svg
++	install -Dm0644 $(DATADIR)/nestopia.desktop $(PREFIX)/share/applications/nestopia.desktop
+ 
+ uninstall:
+-	xdg-desktop-menu uninstall $(DATADIR)/nestopia.desktop
++	rm $(PREFIX)/share/applications/nestopia.desktop
+ 	rm $(PREFIX)/share/pixmaps/nestopia.svg
+ 	rm $(BINDIR)/$(BIN)
+ 	rm -rf $(DATADIR)
diff --git a/nixpkgs/pkgs/misc/emulators/nestopia/default.nix b/nixpkgs/pkgs/misc/emulators/nestopia/default.nix
new file mode 100644
index 000000000000..70e5d94def6f
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/nestopia/default.nix
@@ -0,0 +1,72 @@
+{ lib, stdenv, fetchFromGitHub, pkg-config, SDL2, alsaLib, gtk3
+, makeWrapper, libGLU, libGL, libarchive, libao, unzip, xdg-utils
+, epoxy, gdk-pixbuf, gnome3, wrapGAppsHook
+}:
+
+stdenv.mkDerivation rec {
+  version = "1.47";
+  pname = "nestopia";
+
+  src = fetchFromGitHub {
+    owner = "rdanbrook";
+    repo = "nestopia";
+    rev = version;
+    sha256 = "0frr0gvjh5mxzdhj0ii3sh671slgnzlm8naqlc4h87rx4p4sz2y2";
+  };
+
+  # nondeterministic failures when creating directories
+  enableParallelBuilding = false;
+
+  hardeningDisable = [ "format" ];
+
+  buildInputs = [
+    SDL2
+    alsaLib
+    epoxy
+    gtk3
+    gdk-pixbuf
+    libGLU libGL
+    libarchive
+    libao
+    xdg-utils
+    gnome3.adwaita-icon-theme
+  ];
+
+  nativeBuildInputs = [
+    pkg-config
+    makeWrapper
+    wrapGAppsHook
+    unzip
+  ];
+
+  installPhase = ''
+    mkdir -p $out/{bin,share/nestopia}
+    make install PREFIX=$out
+  '';
+
+  preFixup = ''
+     for f in $out/bin/*; do
+       wrapProgram $f \
+         --prefix XDG_DATA_DIRS : "$GSETTINGS_SCHEMAS_PATH:$out/share"
+     done
+  '';
+
+  patches = [
+    #(fetchpatch {
+    #  url = "https://github.com/rdanbrook/nestopia/commit/f4bc74ac4954328b25e961e7afb7337377084079.patch";
+    #  name = "gcc6.patch";
+    #  sha256 = "1jy0c85xsfk9hrv5a6v0kk48d94864qb62yyni9fp93kyl33y2p4";
+    #})
+    ./gcc6.patch
+    ./build-fix.patch
+  ];
+
+  meta = {
+    homepage = "http://0ldsk00l.ca/nestopia/";
+    description = "NES emulator with a focus on accuracy";
+    license = lib.licenses.gpl2;
+    platforms = lib.platforms.linux;
+    maintainers = with lib.maintainers; [ MP2E ];
+  };
+}
+
diff --git a/nixpkgs/pkgs/misc/emulators/nestopia/gcc6.patch b/nixpkgs/pkgs/misc/emulators/nestopia/gcc6.patch
new file mode 100644
index 000000000000..65dcc72c0c25
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/nestopia/gcc6.patch
@@ -0,0 +1,92 @@
+From f4bc74ac4954328b25e961e7afb7337377084079 Mon Sep 17 00:00:00 2001
+From: David Seifert <soap@gentoo.org>
+Date: Sat, 31 Dec 2016 18:21:18 +0200
+Subject: [PATCH] Fix compiling in C++14 mode
+
+* Left shifting a negative signed is undefined behaviour
+* Fix incorrect printf() specifiers found with -Wformat
+---
+ source/core/NstCore.hpp            | 4 ++--
+ source/unix/gtkui/gtkui.cpp        | 2 +-
+ source/unix/gtkui/gtkui.h          | 1 -
+ source/unix/gtkui/gtkui_cheats.cpp | 8 ++++----
+ source/unix/video.cpp              | 2 +-
+ 5 files changed, 8 insertions(+), 9 deletions(-)
+
+diff --git a/source/core/NstCore.hpp b/source/core/NstCore.hpp
+index 50e20f6..420cc4a 100644
+--- a/source/core/NstCore.hpp
++++ b/source/core/NstCore.hpp
+@@ -279,14 +279,14 @@ namespace Nes
+ 		template<typename T>

+ 		inline long signed_shl(T v,uint c)

+ 		{

+-			enum {NATIVE = T(-7) << 1 == -14};

++			enum {NATIVE = -(T(7) << 1) == -14};

+ 			return Helper::ShiftSigned<T,NATIVE>::Left( v, c );

+ 		}

+ 

+ 		template<typename T>

+ 		inline long signed_shr(T v,uint c)

+ 		{

+-			enum {NATIVE = T(-7) >> 1 == -4 || T(-7) >> 1 == -3};

++			enum {NATIVE = -(T(7) >> 1) == -4 || -(T(7) >> 1) == -3};

+ 			return Helper::ShiftSigned<T,NATIVE>::Right( v, c );

+ 		}

+ 

+diff --git a/source/unix/gtkui/gtkui.cpp b/source/unix/gtkui/gtkui.cpp
+index 3cfeeab..d4a5e2d 100644
+--- a/source/unix/gtkui/gtkui.cpp
++++ b/source/unix/gtkui/gtkui.cpp
+@@ -438,7 +438,7 @@ void gtkui_message(const char* message) {
+ 				GTK_DIALOG_DESTROY_WITH_PARENT,
+ 				GTK_MESSAGE_INFO,
+ 				GTK_BUTTONS_OK,
+-				message);
++				"%s", message);
+ 	gtk_dialog_run(GTK_DIALOG(messagewindow));
+ 	gtk_widget_destroy(messagewindow);
+ }
+diff --git a/source/unix/gtkui/gtkui_cheats.cpp b/source/unix/gtkui/gtkui_cheats.cpp
+index afc01b0..e7b691a 100644
+--- a/source/unix/gtkui/gtkui_cheats.cpp
++++ b/source/unix/gtkui/gtkui_cheats.cpp
+@@ -373,7 +373,7 @@ void gtkui_cheats_fill_tree(char *filename) {
+ 				else if (node.GetChild(L"address")) { // Raw
+ 					char rawbuf[11];
+ 					snprintf(rawbuf, sizeof(rawbuf),
+-								"%04x %02x %02x",
++								"%04lu %02lu %02lu",
+ 								node.GetChild(L"address").GetUnsignedValue(),
+ 								node.GetChild(L"value").GetUnsignedValue(),
+ 								node.GetChild(L"compare").GetUnsignedValue());
+@@ -545,13 +545,13 @@ gboolean gtkui_cheats_scan_list(GtkTreeModel *model, GtkTreePath *path, GtkTreeI
+ 			int addr, value, compare;
+ 			char buf[5];
+ 			
+-			snprintf(buf, sizeof(buf), "%c%c%c%c\0", rawcode[0], rawcode[1], rawcode[2], rawcode[3]);
++			snprintf(buf, sizeof(buf), "%c%c%c%c", rawcode[0], rawcode[1], rawcode[2], rawcode[3]);
+ 			sscanf(buf, "%x", &addr);
+ 			
+-			snprintf(buf, sizeof(buf), "%c%c\0", rawcode[5], rawcode[6]);
++			snprintf(buf, sizeof(buf), "%c%c", rawcode[5], rawcode[6]);
+ 			sscanf(buf, "%x", &value);
+ 			
+-			snprintf(buf, sizeof(buf), "%c%c\0", rawcode[8], rawcode[9]);
++			snprintf(buf, sizeof(buf), "%c%c", rawcode[8], rawcode[9]);
+ 			sscanf(buf, "%x", &compare);
+ 			
+ 			code.address = addr;
+diff --git a/source/unix/video.cpp b/source/unix/video.cpp
+index 3eff19d..c34bb22 100644
+--- a/source/unix/video.cpp
++++ b/source/unix/video.cpp
+@@ -757,7 +757,7 @@ void video_screenshot(const char* filename) {
+ 	if (filename == NULL) {
+ 		// Set the filename
+ 		char sshotpath[512];
+-		snprintf(sshotpath, sizeof(sshotpath), "%sscreenshots/%s-%d-%d.png", nstpaths.nstdir, nstpaths.gamename, time(NULL), rand() % 899 + 100);
++		snprintf(sshotpath, sizeof(sshotpath), "%sscreenshots/%s-%ld-%d.png", nstpaths.nstdir, nstpaths.gamename, time(NULL), rand() % 899 + 100);
+ 		
+ 		// Save the file
+ 		lodepng_encode32_file(sshotpath, (const unsigned char*)pixels, rendersize.w, rendersize.h);
diff --git a/nixpkgs/pkgs/misc/emulators/np2kai/default.nix b/nixpkgs/pkgs/misc/emulators/np2kai/default.nix
new file mode 100644
index 000000000000..0ed47af8f5bf
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/np2kai/default.nix
@@ -0,0 +1,196 @@
+{ stdenv
+, lib
+, fetchFromGitHub
+, enable16Bit ? true
+, enable32Bit ? true
+
+, enableSDL ? true
+, withSDLVersion ? "2"
+, SDL
+, SDL_ttf
+, SDL_mixer
+, SDL2
+, SDL2_ttf
+, SDL2_mixer
+
+, enableX11 ? stdenv.hostPlatform.isLinux
+, automake
+, autoconf
+, autoconf-archive
+, libtool
+, pkg-config
+, unzip
+, gtk2
+, libusb1
+, libXxf86vm
+, nasm
+, libICE
+, libSM
+
+  # HAXM build succeeds but the binary segfaults, seemingly due to the missing HAXM kernel module
+  # Enable once there is a HAXM kernel module option in NixOS? Or somehow bind it to the system kernel having HAXM?
+  # Or leave it disabled by default?
+  # https://github.com/intel/haxm/blob/master/docs/manual-linux.md
+, enableHAXM ? false
+}:
+
+assert lib.assertMsg (enable16Bit || enable32Bit)
+  "Must enable 16-Bit and/or 32-Bit system variant.";
+assert lib.assertMsg (enableSDL || enableX11)
+  "Must enable SDL and/or X11 graphics interfaces.";
+assert lib.assertOneOf "withSDLVersion" withSDLVersion [ "1" "2" ];
+assert enableHAXM -> (lib.assertMsg enableX11
+  "Must enable X11 graphics interface for HAXM build.");
+let
+  inherit (lib) optional optionals optionalString;
+  inherit (lib.strings) concatStringsSep concatMapStringsSep;
+  isSDL2 = (withSDLVersion == "2");
+  sdlInfix = optionalString isSDL2 "2";
+  sdlDeps1 = [
+    SDL
+    SDL_ttf
+    SDL_mixer
+  ];
+  sdlDeps2 = [
+    SDL2
+    SDL2_ttf
+    SDL2_mixer
+  ];
+  sdlDepsBuildonly = if isSDL2 then sdlDeps1 else sdlDeps2;
+  sdlDepsTarget = if isSDL2 then sdlDeps2 else sdlDeps1;
+  sdlMakefileSuffix =
+    if stdenv.hostPlatform.isWindows then "win"
+    else if stdenv.hostPlatform.isDarwin then "mac"
+    else "unix";
+  sdlMakefiles = concatMapStringsSep " " (x: x + "." + sdlMakefileSuffix)
+    (optionals enable16Bit [
+      "Makefile"
+    ] ++ optionals enable32Bit [
+      "Makefile21"
+    ]);
+  sdlBuildFlags = concatStringsSep " "
+    (optionals enableSDL [
+      "SDL_VERSION=${withSDLVersion}"
+    ]);
+  sdlBins = concatStringsSep " "
+    (optionals enable16Bit [
+      "np2kai"
+    ] ++ optionals enable32Bit [
+      "np21kai"
+    ]);
+  x11ConfigureFlags = concatStringsSep " "
+    ((
+      if ((enableHAXM && (enable16Bit || enable32Bit)) || (enable16Bit && enable32Bit)) then [
+        "--enable-build-all"
+      ] else if enableHAXM then [
+        "--enable-haxm"
+      ] else if enable32Bit then [
+        "--enable-ia32"
+      ] else [ ]
+    ) ++ optionals (!isSDL2) [
+      "--enable-sdl"
+      "--enable-sdlmixer"
+      "--enable-sdlttf"
+
+      "--enable-sdl2=no"
+      "--enable-sdl2mixer=no"
+      "--enable-sdl2ttf=no"
+    ]);
+  x11BuildFlags = concatStringsSep " " [
+    "SDL2_CONFIG=sdl2-config"
+    "SDL_CONFIG=sdl-config"
+    "SDL_CFLAGS=\"$(sdl${sdlInfix}-config --cflags)\""
+    "SDL_LIBS=\"$(sdl${sdlInfix}-config --libs) -lSDL${sdlInfix}_mixer -lSDL${sdlInfix}_ttf\""
+  ];
+  x11Bins = concatStringsSep " "
+    (optionals enable16Bit [
+      "xnp2kai"
+    ] ++ optionals enable32Bit [
+      "xnp21kai"
+    ] ++ optionals enableHAXM [
+      "xnp21kai_haxm"
+    ]);
+in
+stdenv.mkDerivation rec {
+  pname = "np2kai";
+  version = "0.86rev22"; #update src.rev to commit rev accordingly
+
+  src = fetchFromGitHub rec {
+    owner = "AZO234";
+    repo = "NP2kai";
+    rev = "4a317747724669343e4c33ebdd34783fb7043221";
+    sha256 = "0kxysxhx6jyk82mx30ni0ydzmwdcbnlxlnarrlq018rsnwb4md72";
+  };
+
+  configurePhase = ''
+    export GIT_VERSION=${builtins.substring 0 7 src.rev}
+    buildFlags="$buildFlags ''${enableParallelBuilding:+-j$NIX_BUILD_CORES -l$NIX_BUILD_CORES}"
+  '' + optionalString enableX11 ''
+    cd x11
+    substituteInPlace Makefile.am \
+      --replace 'GIT_VERSION :=' 'GIT_VERSION ?='
+    ./autogen.sh ${x11ConfigureFlags}
+    ./configure ${x11ConfigureFlags}
+    cd ..
+  '';
+
+  nativeBuildInputs = sdlDepsBuildonly
+    ++ optionals enableX11 [
+    automake
+    autoconf
+    autoconf-archive
+    libtool
+    pkg-config
+    unzip
+    nasm
+  ];
+
+  buildInputs = sdlDepsTarget
+    ++ optionals enableX11 [
+    gtk2
+    libICE
+    libSM
+    libusb1
+    libXxf86vm
+  ];
+
+  enableParallelBuilding = true;
+
+  buildPhase = optionalString enableSDL ''
+    cd sdl2
+    for mkfile in ${sdlMakefiles}; do
+      substituteInPlace $mkfile \
+        --replace 'GIT_VERSION :=' 'GIT_VERSION ?='
+      echo make -f $mkfile $buildFlags ${sdlBuildFlags} clean
+      make -f $mkfile $buildFlags ${sdlBuildFlags} clean
+      make -f $mkfile $buildFlags ${sdlBuildFlags}
+    done
+    cd ..
+  '' + optionalString enableX11 ''
+    cd x11
+    make $buildFlags ${x11BuildFlags}
+    cd ..
+  '';
+
+  installPhase = optionalString enableSDL ''
+    cd sdl2
+    for emu in ${sdlBins}; do
+      install -D -m 755 $emu $out/bin/$emu
+    done
+    cd ..
+  '' + optionalString enableX11 ''
+    cd x11
+    for emu in ${x11Bins}; do
+      install -D -m 755 $emu $out/bin/$emu
+    done
+    cd ..
+  '';
+
+  meta = with lib; {
+    description = "A PC-9801 series emulator";
+    homepage = "https://github.com/AZO234/NP2kai";
+    license = licenses.mit;
+    maintainers = with maintainers; [ OPNA2608 ];
+    platforms = platforms.x86;
+  };
+}
diff --git a/nixpkgs/pkgs/misc/emulators/oberon-risc-emu/default.nix b/nixpkgs/pkgs/misc/emulators/oberon-risc-emu/default.nix
new file mode 100644
index 000000000000..749e3549bf80
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/oberon-risc-emu/default.nix
@@ -0,0 +1,27 @@
+{ lib, stdenv, fetchFromGitHub, SDL2 }:
+
+stdenv.mkDerivation {
+  pname = "oberon-risc-emu";
+  version = "unstable-2020-08-18";
+
+  src = fetchFromGitHub {
+    owner = "pdewacht";
+    repo = "oberon-risc-emu";
+    rev = "26c8ac5737c71811803c87ad51f1f0d6e62e71fe";
+    sha256 = "1iriix3cfcpbkjb5xjb4ysh592xppgprwzp3b6qhwcx44g7kdvxq";
+  };
+
+  buildInputs = [ SDL2 ];
+
+  installPhase = ''
+    mkdir -p $out/bin
+    mv risc $out/bin
+  '';
+
+  meta = with lib; {
+    homepage    = "https://github.com/pdewacht/oberon-risc-emu/";
+    description = "Emulator for the Oberon RISC machine";
+    license     = licenses.isc;
+    maintainers = with maintainers; [ siraben ];
+  };
+}
diff --git a/nixpkgs/pkgs/misc/emulators/openmsx/custom-nix.mk b/nixpkgs/pkgs/misc/emulators/openmsx/custom-nix.mk
new file mode 100644
index 000000000000..9098762e40d5
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/openmsx/custom-nix.mk
@@ -0,0 +1,9 @@
+# This file substitutes $sourceRoot/build/custom.mk
+
+VERSION_EXEC:=false
+SYMLINK_FOR_BINARY:=false
+INSTALL_CONTRIB:=true
+INSTALL_BASE:=${out}
+INSTALL_DOC_DIR:=${INSTALL_BASE}/share/doc/openmsx
+INSTALL_SHARE_DIR:=${INSTALL_BASE}/share/openmsx
+INSTALL_BINARY_DIR:=${INSTALL_BASE}/bin
diff --git a/nixpkgs/pkgs/misc/emulators/openmsx/default.nix b/nixpkgs/pkgs/misc/emulators/openmsx/default.nix
new file mode 100644
index 000000000000..d34a921e1773
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/openmsx/default.nix
@@ -0,0 +1,48 @@
+{ lib, stdenv, fetchFromGitHub, pkg-config
+, python
+, alsaLib, glew, libGL, libpng
+, libogg, libtheora, libvorbis
+, SDL2, SDL2_image, SDL2_ttf
+, freetype, tcl, zlib
+}:
+
+stdenv.mkDerivation rec {
+  pname = "openmsx";
+  version = "16.0";
+
+  src = fetchFromGitHub {
+    owner = "openMSX";
+    repo = "openMSX";
+    rev = "RELEASE_${builtins.replaceStrings ["."] ["_"] version}";
+    sha256 = "04sphn9ph378r0qv881riv90cgz58650jcqcwmi1mv6gbcb3img5";
+    fetchSubmodules = true;
+  };
+
+  nativeBuildInputs = [ pkg-config python ];
+
+  buildInputs = [ alsaLib glew libGL libpng
+    libogg libtheora libvorbis freetype
+    SDL2 SDL2_image SDL2_ttf tcl zlib ];
+
+  postPatch = ''
+    cp ${./custom-nix.mk} build/custom.mk
+  '';
+
+  dontAddPrefix = true;
+
+  # Many thanks @mthuurne from OpenMSX project
+  # for providing support to Nixpkgs :)
+  TCL_CONFIG="${tcl}/lib/";
+
+  meta = with lib;{
+    description = "The MSX emulator that aims for perfection";
+    longDescription = ''
+      OpenMSX is an emulator for the MSX home computer system. Its goal is
+      to emulate all aspects of the MSX with 100% accuracy.
+    '';
+    homepage = "https://openmsx.org";
+    maintainers = with maintainers; [ AndersonTorres ];
+    platforms = platforms.unix;
+    license = with licenses; [ bsd2 boost gpl2 ];
+  };
+}
diff --git a/nixpkgs/pkgs/misc/emulators/pcem/default.nix b/nixpkgs/pkgs/misc/emulators/pcem/default.nix
new file mode 100644
index 000000000000..6e7e3bc6379c
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/pcem/default.nix
@@ -0,0 +1,29 @@
+{ stdenv, lib, fetchzip, wxGTK31, coreutils, SDL2, openal, alsaLib, pkg-config
+, autoreconfHook, withNetworking ? true, withALSA ? true }:
+
+stdenv.mkDerivation rec {
+  pname = "pcem";
+  version = "17";
+
+  src = fetchzip {
+    url = "https://pcem-emulator.co.uk/files/PCemV${version}Linux.tar.gz";
+    stripRoot = false;
+    sha256 = "067pbnc15h6a4pnnym82klr1w8qwfm6p0pkx93gx06wvwqsxvbdv";
+  };
+
+  nativeBuildInputs = [ autoreconfHook pkg-config ];
+  buildInputs = [ wxGTK31 coreutils SDL2 openal ]
+    ++ lib.optional withALSA alsaLib;
+
+  configureFlags = [ "--enable-release-build" ]
+    ++ lib.optional withNetworking "--enable-networking"
+    ++ lib.optional withALSA "--enable-alsa";
+
+  meta = with lib; {
+    description = "Emulator for IBM PC computers and clones";
+    homepage = "https://pcem-emulator.co.uk/";
+    license = licenses.gpl2Only;
+    maintainers = [ maintainers.terin ];
+    platforms = platforms.linux ++ platforms.windows;
+  };
+}
diff --git a/nixpkgs/pkgs/misc/emulators/pcsx2/default.nix b/nixpkgs/pkgs/misc/emulators/pcsx2/default.nix
new file mode 100644
index 000000000000..52d1010b5a4f
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/pcsx2/default.nix
@@ -0,0 +1,113 @@
+{ alsaLib
+, cmake
+, fetchFromGitHub
+, fmt
+, gcc-unwrapped
+, gettext
+, glib
+, gtk3
+, harfbuzz
+, libaio
+, libpcap
+, libpng
+, libpulseaudio
+, libsamplerate
+, libxml2
+, makeWrapper
+, perl
+, pkg-config
+, portaudio
+, SDL2
+, soundtouch
+, lib, stdenv
+, udev
+, wrapGAppsHook
+, wxGTK
+, zlib
+}:
+
+stdenv.mkDerivation {
+  pname = "pcsx2";
+  version = "unstable-2020-11-13";
+
+  src = fetchFromGitHub {
+    owner = "PCSX2";
+    repo = "pcsx2";
+    fetchSubmodules = true;
+    rev = "319287dbe552c8405720b25dfdf5fa518deeee0b";
+    sha256 = "1kswc8vw9hbv2nigp8cxrgf2s0ik7p4i203cbqci8zjmnkaqpsai";
+  };
+
+  cmakeFlags = [
+    "-DCMAKE_INSTALL_PREFIX=${placeholder "out"}"
+    "-DDISABLE_ADVANCE_SIMD=TRUE"
+    "-DDISABLE_PCSX2_WRAPPER=TRUE"
+    "-DDOC_DIR=${placeholder "out"}/share/doc/pcsx2"
+    "-DGAMEINDEX_DIR=${placeholder "out"}/share/pcsx2"
+    "-DGLSL_SHADER_DIR=${placeholder "out"}/share/pcsx2"
+    "-DGTK3_API=TRUE"
+    "-DPACKAGE_MODE=TRUE"
+    "-DPLUGIN_DIR=${placeholder "out"}/lib/pcsx2"
+    "-DREBUILD_SHADER=TRUE"
+    "-DUSE_LTO=TRUE"
+    "-DwxWidgets_CONFIG_EXECUTABLE=${wxGTK}/bin/wx-config"
+    "-DwxWidgets_INCLUDE_DIRS=${wxGTK}/include"
+    "-DwxWidgets_LIBRARIES=${wxGTK}/lib"
+    "-DXDG_STD=TRUE"
+  ];
+
+  postPatch = ''
+    substituteInPlace cmake/BuildParameters.cmake \
+      --replace /usr/bin/gcc-ar ${gcc-unwrapped}/bin/gcc-ar \
+      --replace /usr/bin/gcc-nm ${gcc-unwrapped}/bin/gcc-nm \
+      --replace /usr/bin/gcc-ranlib ${gcc-unwrapped}/bin/gcc-ranlib
+  '';
+
+  postFixup = ''
+    wrapProgram $out/bin/PCSX2 \
+      --set __GL_THREADED_OPTIMIZATIONS 1
+  '';
+
+  nativeBuildInputs = [ cmake makeWrapper perl pkg-config wrapGAppsHook ];
+
+  buildInputs = [
+    alsaLib
+    fmt
+    gettext
+    glib
+    gtk3
+    harfbuzz
+    libaio
+    libpcap
+    libpng
+    libpulseaudio
+    libsamplerate
+    libxml2
+    portaudio
+    SDL2
+    soundtouch
+    udev
+    wxGTK
+    zlib
+  ];
+
+  meta = with lib; {
+    description = "Playstation 2 emulator";
+    longDescription= ''
+      PCSX2 is an open-source PlayStation 2 (AKA PS2) emulator. Its purpose
+      is to emulate the PS2 hardware, using a combination of MIPS CPU
+      Interpreters, Recompilers and a Virtual Machine which manages hardware
+      states and PS2 system memory. This allows you to play PS2 games on your
+      PC, with many additional features and benefits.
+    '';
+    homepage = "https://pcsx2.net";
+    maintainers = with maintainers; [ hrdinka govanify ];
+
+    # PCSX2's source code is released under LGPLv3+. It However ships
+    # additional data files and code that are licensed differently.
+    # This might be solved in future, for now we should stick with
+    # license.free
+    license = licenses.free;
+    platforms = platforms.x86;
+  };
+}
diff --git a/nixpkgs/pkgs/misc/emulators/pcsxr/default.nix b/nixpkgs/pkgs/misc/emulators/pcsxr/default.nix
new file mode 100644
index 000000000000..e6f0ec477440
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/pcsxr/default.nix
@@ -0,0 +1,87 @@
+{ lib, stdenv, fetchurl, autoreconfHook, intltool, pkg-config, gtk3, SDL2, xorg
+, wrapGAppsHook, libcdio, nasm, ffmpeg, file
+, fetchpatch }:
+
+stdenv.mkDerivation rec {
+  pname = "pcsxr";
+  version = "1.9.94";
+
+  # codeplex does not support direct downloading
+  src = fetchurl {
+    url = "mirror://debian/pool/main/p/pcsxr/pcsxr_${version}.orig.tar.xz";
+    sha256 = "0q7nj0z687lmss7sgr93ij6my4dmhkm2nhjvlwx48dn2lxl6ndla";
+  };
+
+  patches = [
+    ( fetchpatch {
+      url = "https://salsa.debian.org/games-team/pcsxr/raw/315e56d16e36ef3011f72d0fe86190728d2ba596/debian/patches/01_fix-i386-exec-stack.patch";
+      sha256 = "17497wjxd6b92bj458s2769d9bpp68ydbvmfs9gp51yhnq4zl81x";
+    })
+    ( fetchpatch {
+      url = "https://salsa.debian.org/games-team/pcsxr/raw/315e56d16e36ef3011f72d0fe86190728d2ba596/debian/patches/02_disable-ppc-auto-dynarec.patch";
+      sha256 = "0v8n79z034w6cqdrzhgd9fkdpri42mzvkdjm19x4asz94gg2i2kf";
+    })
+    ( fetchpatch {
+      url = "https://salsa.debian.org/games-team/pcsxr/raw/315e56d16e36ef3011f72d0fe86190728d2ba596/debian/patches/03_fix-plugin-dir.patch";
+      sha256 = "0vkl0mv6whqaz79kvvvlmlmjpynyq4lh352j3bbxcr0vjqffxvsy";
+    })
+    ( fetchpatch {
+      url = "https://salsa.debian.org/games-team/pcsxr/raw/315e56d16e36ef3011f72d0fe86190728d2ba596/debian/patches/04_update-homedir-symlinks.patch";
+      sha256 = "18r6n025ybr8fljfsaqm4ap31wp8838j73lrsffi49fkis60dp4j";
+    })
+    ( fetchpatch {
+      url = "https://salsa.debian.org/games-team/pcsxr/raw/315e56d16e36ef3011f72d0fe86190728d2ba596/debian/patches/05_format-security.patch";
+      sha256 = "03m4kfc9bk5669hf7ji1anild08diliapx634f9cigyxh72jcvni";
+    })
+    ( fetchpatch {
+      url = "https://salsa.debian.org/games-team/pcsxr/raw/315e56d16e36ef3011f72d0fe86190728d2ba596/debian/patches/06_warnings.patch";
+      sha256 = "0iz3g9ihnhisfgrzma9l74y4lhh57na9h41bmiam1millb796g71";
+    })
+    ( fetchpatch {
+      url = "https://salsa.debian.org/games-team/pcsxr/raw/315e56d16e36ef3011f72d0fe86190728d2ba596/debian/patches/07_non-linux-ip-addr.patch";
+      sha256 = "14vb9l0l4nzxcymhjjs4q57nmsncmby9qpdr7c19rly5wavm4k77";
+    })
+    ( fetchpatch {
+      url = "https://salsa.debian.org/games-team/pcsxr/raw/315e56d16e36ef3011f72d0fe86190728d2ba596/debian/patches/08_reproducible.patch";
+      sha256 = "1cx9q59drsk9h6l31097lg4aanaj93ysdz5p88pg9c7wvxk1qz06";
+    })
+
+    ./uncompress2.patch
+  ];
+
+  nativeBuildInputs = [ autoreconfHook intltool pkg-config wrapGAppsHook ];
+  buildInputs = [
+    gtk3 SDL2 xorg.libXv xorg.libXtst libcdio nasm ffmpeg file
+  ];
+
+  dynarecTarget =
+   if stdenv.isx86_64 then "x86_64"
+   else if stdenv.isi686 then "x86"
+   else "no"; #debian patch 2 says ppc doesn't work
+
+  configureFlags = [
+    "--enable-opengl"
+    "--enable-ccdda"
+    "--enable-libcdio"
+    "--enable-dynarec=${dynarecTarget}"
+  ];
+
+  postInstall = ''
+    mkdir -p "$out/share/doc/${pname}-${version}"
+    cp README \
+       AUTHORS \
+       doc/keys.txt \
+       doc/tweaks.txt \
+       ChangeLog.df \
+       ChangeLog \
+       "$out/share/doc/${pname}-${version}"
+  '';
+
+  meta = with lib; {
+    description = "Playstation 1 emulator";
+    homepage = "https://pcsxr.codeplex.com/";
+    maintainers = with maintainers; [ rardiol ];
+    license = licenses.gpl2Plus;
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/misc/emulators/pcsxr/uncompress2.patch b/nixpkgs/pkgs/misc/emulators/pcsxr/uncompress2.patch
new file mode 100644
index 000000000000..356868ce7a8b
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/pcsxr/uncompress2.patch
@@ -0,0 +1,20 @@
+--- a/libpcsxcore/cdriso.c
++++ b/libpcsxcore/cdriso.c
+@@ -1219,7 +1219,7 @@
+ 	return ret;
+ }
+ 
+-static int uncompress2(void *out, unsigned long *out_size, void *in, unsigned long in_size)
++static int uncompress3(void *out, unsigned long *out_size, void *in, unsigned long in_size)
+ {
+ 	static z_stream z;
+ 	int ret = 0;
+@@ -1298,7 +1298,7 @@
+ 	if (is_compressed) {
+ 		cdbuffer_size_expect = sizeof(compr_img->buff_raw[0]) << compr_img->block_shift;
+ 		cdbuffer_size = cdbuffer_size_expect;
+-		ret = uncompress2(compr_img->buff_raw[0], &cdbuffer_size, compr_img->buff_compressed, size);
++		ret = uncompress3(compr_img->buff_raw[0], &cdbuffer_size, compr_img->buff_compressed, size);
+ 		if (ret != 0) {
+ 			SysPrintf("uncompress failed with %d for block %d, sector %d\n",
+ 					ret, block, sector);
diff --git a/nixpkgs/pkgs/misc/emulators/ppsspp/default.nix b/nixpkgs/pkgs/misc/emulators/ppsspp/default.nix
new file mode 100644
index 000000000000..a50bc3eb3ec8
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/ppsspp/default.nix
@@ -0,0 +1,70 @@
+{ SDL2
+, cmake
+, fetchFromGitHub
+, ffmpeg_3
+, glew
+, lib
+, libzip
+, mkDerivation
+, pkg-config
+, python3
+, qtbase
+, qtmultimedia
+, snappy
+, zlib
+}:
+
+mkDerivation rec {
+  pname = "ppsspp";
+  version = "1.11";
+
+  src = fetchFromGitHub {
+    owner = "hrydgard";
+    repo = pname;
+    rev = "v${version}";
+    fetchSubmodules = true;
+    sha256 = "19948jzqpclf8zfzp3k7s580xfjgqcyfwlcp7x7xj8h8lyypzymx";
+  };
+
+  postPatch = ''
+    substituteInPlace git-version.cmake --replace unknown ${src.rev}
+    substituteInPlace UI/NativeApp.cpp --replace /usr/share $out/share
+  '';
+
+  nativeBuildInputs = [ cmake pkg-config python3 ];
+
+  buildInputs = [
+    SDL2
+    ffmpeg_3
+    glew
+    libzip
+    qtbase
+    qtmultimedia
+    snappy
+    zlib
+  ];
+
+  cmakeFlags = [
+    "-DOpenGL_GL_PREFERENCE=GLVND"
+    "-DUSE_SYSTEM_FFMPEG=ON"
+    "-DUSE_SYSTEM_LIBZIP=ON"
+    "-DUSE_SYSTEM_SNAPPY=ON"
+    "-DUSING_QT_UI=ON"
+    "-DHEADLESS=OFF"
+  ];
+
+  installPhase = ''
+    mkdir -p $out/share/ppsspp
+    install -Dm555 PPSSPPQt $out/bin/ppsspp
+    mv assets $out/share/ppsspp
+  '';
+
+  meta = with lib; {
+    description = "A HLE Playstation Portable emulator, written in C++";
+    homepage = "https://www.ppsspp.org/";
+    license = licenses.gpl2Plus;
+    maintainers = with maintainers; [ AndersonTorres ];
+    platforms = platforms.linux;
+  };
+}
+# TODO: add SDL headless port
diff --git a/nixpkgs/pkgs/misc/emulators/py65/default.nix b/nixpkgs/pkgs/misc/emulators/py65/default.nix
new file mode 100644
index 000000000000..66ba3cdf4b41
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/py65/default.nix
@@ -0,0 +1,25 @@
+{ lib, fetchPypi, buildPythonApplication }:
+
+buildPythonApplication rec {
+  pname = "py65";
+  version = "1.1.0";
+  format = "wheel";
+
+  src = fetchPypi {
+    inherit pname version format;
+    sha256 = "Q7rjiHJ/Ew985vut/8fVAf/wWYW5aBPSvNPm8A6g1zg=";
+  };
+
+  meta = with lib; {
+    homepage = "https://py65.readthedocs.io/";
+    description = "Emulate 6502-based microcomputer systems in Python";
+    longDescription = ''
+      Py65 includes a program called Py65Mon that functions as a machine
+      language monitor. This kind of program is sometimes also called a
+      debugger. Py65Mon provides a command line with many convenient commands
+      for interacting with the simulated 6502-based system.
+    '';
+    license = licenses.bsd3;
+    maintainers = with maintainers; [ AndersonTorres ];
+  };
+}
diff --git a/nixpkgs/pkgs/misc/emulators/qmc2/default.nix b/nixpkgs/pkgs/misc/emulators/qmc2/default.nix
new file mode 100644
index 000000000000..6c6a52fc65ca
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/qmc2/default.nix
@@ -0,0 +1,41 @@
+{ lib, stdenv
+, fetchurl, qttools, pkg-config
+, minizip, zlib
+, qtbase, qtsvg, qtmultimedia, qtwebkit, qttranslations, qtxmlpatterns
+, rsync, SDL2, xwininfo
+, util-linux
+, xorg
+}:
+
+stdenv.mkDerivation rec {
+  pname = "qmc2";
+  version = "0.195";
+
+  src = fetchurl {
+      url = "mirror://sourceforge/project/qmc2/qmc2/${version}/${pname}-${version}.tar.gz";
+      sha256 = "1dzmjlfk8pdspns6zg1jmd5fqzg8igd4q38cz4a1vf39lx74svns";
+  };
+
+  preBuild = ''
+    patchShebangs scripts
+  '';
+
+  nativeBuildInputs = [ qttools pkg-config ];
+  buildInputs = [ minizip qtbase qtsvg qtmultimedia qtwebkit
+                  qttranslations qtxmlpatterns rsync SDL2
+                  xwininfo zlib util-linux xorg.libxcb ];
+
+  makeFlags = [ "DESTDIR=$(out)"
+                "PREFIX=/"
+                "DATADIR=/share/"
+                "SYSCONFDIR=/etc" ];
+
+  meta = with lib; {
+    description = "A Qt frontend for MAME/MESS";
+    homepage = "https://qmc2.batcom-it.net";
+    license = licenses.gpl2;
+    maintainers = [ ];
+    platforms = platforms.linux;
+    broken = true;
+  };
+}
diff --git a/nixpkgs/pkgs/misc/emulators/reicast/default.nix b/nixpkgs/pkgs/misc/emulators/reicast/default.nix
new file mode 100644
index 000000000000..8c0bc30d4384
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/reicast/default.nix
@@ -0,0 +1,52 @@
+{ lib, stdenv
+, fetchFromGitHub
+, cmake
+, pkg-config
+, curl
+, alsaLib
+, libGLU
+, libX11
+, libevdev
+, udev
+, libpulseaudio
+}:
+
+stdenv.mkDerivation rec {
+  pname = "reicast";
+  version = "20.04";
+
+  src = fetchFromGitHub {
+    owner = "reicast";
+    repo = "reicast-emulator";
+    rev = "r${version}";
+    sha256 = "0vz3b1hg1qj6nycnqq5zcpzqpcbxw1c2ffamia5z3x7rapjx5d71";
+  };
+
+  nativeBuildInputs = [ cmake pkg-config ];
+  buildInputs = [
+    curl
+    alsaLib
+    libGLU
+    libX11
+    libevdev
+    udev
+    libpulseaudio
+  ];
+
+  # No rule to make target 'install'
+  installPhase = ''
+    runHook preInstall
+
+    install -D ./reicast $out/bin/reicast
+
+    runHook postInstall
+  '';
+
+  meta = with lib; {
+    homepage = "https://reicast.com/";
+    description = "A multi-platform Sega Dreamcast emulator";
+    license = with licenses; [ bsd3 gpl2Only lgpl2Only ];
+    platforms = ["x86_64-linux" ];
+    maintainers = [ maintainers.ivar ];
+  };
+}
diff --git a/nixpkgs/pkgs/misc/emulators/resim/default.nix b/nixpkgs/pkgs/misc/emulators/resim/default.nix
new file mode 100644
index 000000000000..6e759bd75522
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/resim/default.nix
@@ -0,0 +1,20 @@
+{ fetchFromGitHub, lib, stdenv, cmake, qt4 }:
+
+stdenv.mkDerivation {
+  name = "resim";
+  src = fetchFromGitHub {
+    owner = "itszor";
+    repo = "resim";
+    rev = "cdc7808ceb7ba4ac00d0d08ca646b58615059150";
+    sha256 = "1743lngqxd7ai4k6cd4d1cf9h60z2pnvr2iynfs1zlpcj3w1hx0c";
+  };
+  nativeBuildInputs = [ cmake ];
+  buildInputs = [ qt4 ];
+  installPhase = ''
+    mkdir -pv $out/{lib,bin}
+    cp -v libresim/libarmsim.so $out/lib/libarmsim.so
+    cp -v vc4emul/vc4emul $out/bin/vc4emul
+  '';
+
+  meta.license = lib.licenses.mit;
+}
diff --git a/nixpkgs/pkgs/misc/emulators/retroarch/cores.nix b/nixpkgs/pkgs/misc/emulators/retroarch/cores.nix
new file mode 100644
index 000000000000..7d0ba259dc51
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/retroarch/cores.nix
@@ -0,0 +1,1098 @@
+{ lib, stdenv, fetchgit, fetchFromGitHub, fetchFromGitLab, fetchpatch, cmake, pkg-config, makeWrapper, python27, python37, retroarch
+, alsaLib, fluidsynth, curl, hidapi, libGLU, gettext, glib, gtk2, portaudio, SDL, SDL_net, SDL2, SDL2_image, libGL
+, ffmpeg_3, pcre, libevdev, libpng, libjpeg, libzip, udev, libvorbis, snappy, which, hexdump
+, miniupnpc, sfml, xorg, zlib, nasm, libpcap, boost, icu, openssl
+, buildPackages }:
+
+let
+
+  d2u = lib.replaceChars ["-"] ["_"];
+
+  mkLibRetroCore = { core, src, description, license, broken ? false, ... }@a:
+  lib.makeOverridable stdenv.mkDerivation ((rec {
+
+    name = "libretro-${a.core}-${version}";
+    version = "2020-03-06";
+    inherit (a) src;
+
+    buildInputs = [ zlib ] ++ a.extraBuildInputs or [];
+    nativeBuildInputs = [ makeWrapper ] ++ a.extraNativeBuildInputs or [];
+
+    makefile = "Makefile.libretro";
+    makeFlags = [
+      "platform=${{
+        linux = "unix";
+        darwin = "osx";
+        windows = "win";
+      }.${stdenv.hostPlatform.parsed.kernel.name} or stdenv.hostPlatform.parsed.kernel.name}"
+      "ARCH=${{
+        armv7l = "arm";
+        armv6l = "arm";
+        i686 = "x86";
+      }.${stdenv.hostPlatform.parsed.cpu.name} or stdenv.hostPlatform.parsed.cpu.name}"
+    ] ++ (a.makeFlags or []);
+
+    installPhase = ''
+      COREDIR="$out/lib/retroarch/cores"
+      mkdir -p $out/bin
+      mkdir -p $COREDIR
+      mv ${d2u a.core}_libretro${stdenv.hostPlatform.extensions.sharedLibrary} $COREDIR
+      makeWrapper ${retroarch}/bin/retroarch $out/bin/retroarch-${core} \
+        --add-flags "-L $COREDIR/${d2u core}_libretro${stdenv.hostPlatform.extensions.sharedLibrary} $@"
+    '';
+
+    passthru = {
+      inherit (a) core;
+      libretroCore = "/lib/retroarch/cores";
+    };
+
+    meta = with lib; {
+      inherit (a) description license;
+      broken = a.broken or false;
+      homepage = "https://www.libretro.com/";
+      maintainers = with maintainers; [ edwtjo hrdinka MP2E ];
+      platforms = platforms.unix;
+    };
+  }) // builtins.removeAttrs a ["core" "src" "description" "license" "makeFlags"]);
+
+  fetchRetro = { repo, rev, sha256 }:
+  fetchgit {
+    inherit rev sha256;
+    url = "https://github.com/libretro/${repo}.git";
+    fetchSubmodules = true;
+  };
+
+in with lib.licenses;
+
+{
+
+  atari800 = mkLibRetroCore rec {
+    core = "atari800";
+    src = fetchRetro {
+      repo = "libretro-" + core;
+      rev = "f9bf53b864344b8bbe8d425ed2f3c628eb10519c";
+      sha256 = "0sgk93zs423pwiqzvj0x1gfwcn9gacnlrrdq53ps395k64lig6lk";
+    };
+    description = "Port of Atari800 to libretro";
+    license = gpl2;
+    makefile = "Makefile";
+    makeFlags = [ "GIT_VERSION=" ];
+  };
+
+  beetle-snes = mkLibRetroCore {
+    core = "mednafen-snes";
+    src = fetchRetro {
+      repo = "beetle-bsnes-libretro";
+      rev = "de22d8420ea606f1b2f72afd4dda34619cf2cc20";
+      sha256 = "1nd4f8frmlhp1lyxz9zpxvwwz70x0i0rrp560cn9qlm1jzdv3xvf";
+    };
+    description = "Port of Mednafen's SNES core to libretro";
+    license = gpl2;
+    makefile = "Makefile";
+  };
+
+  beetle-gba = mkLibRetroCore {
+    core = "mednafen-gba";
+    src = fetchRetro {
+      repo = "beetle-gba-libretro";
+      rev = "135afdbb9591655a3e016b75abba07e481f6d406";
+      sha256 = "0fc0x24qn4y7pz3mp1mm1ain31aj9pznp1irr0k7hvazyklzy9g3";
+    };
+    description = "Port of Mednafen's GameBoy Advance core to libretro";
+    license = gpl2;
+    makefile = "Makefile";
+  };
+
+  beetle-lynx = mkLibRetroCore {
+    core = "mednafen-lynx";
+    src = fetchRetro {
+      repo = "beetle-lynx-libretro";
+      rev = "74dde204c0ec6c4bc4cd7821c14548387fbd9ce8";
+      sha256 = "05kwibjr30laalqzazswvmn9smm3mwqsz1i0z1s0pj7idfdhjfw0";
+    };
+    description = "Port of Mednafen's Lynx core to libretro";
+    license = gpl2;
+    makefile = "Makefile";
+  };
+
+  beetle-ngp = mkLibRetroCore {
+    core = "mednafen-ngp";
+    src = fetchRetro {
+      repo = "beetle-ngp-libretro";
+      rev = "6f15532b6ad17a2d5eb9dc8241d6af62416e796b";
+      sha256 = "05r8mk9rc19nzs3gpfsjr6i7pm6xx3gn3b4xs8ab7v4vcmfg4cn2";
+    };
+    description = "Port of Mednafen's NeoGeo Pocket core to libretro";
+    license = gpl2;
+    makefile = "Makefile";
+  };
+
+  beetle-pce-fast = let der = mkLibRetroCore {
+    core = "mednafen-pce-fast";
+    src = fetchRetro {
+      repo = "beetle-pce-fast-libretro";
+      rev = "40a42b7f43f029760c92bf0b2097e7d4b90ed29c";
+      sha256 = "1gr6wg4bd4chm4c39w0c1b5zfzr05zd7234vvlmr1imk0v6m0wj6";
+    };
+    description = "Port of Mednafen's PC Engine core to libretro";
+    license = gpl2;
+    makefile = "Makefile";
+  }; in der.override {
+    name = "beetle-pce-fast-${der.version}";
+  };
+
+  beetle-pcfx = mkLibRetroCore rec {
+    core = "mednafen-pcfx";
+    src = fetchRetro {
+      repo = "beetle-pcfx-libretro";
+      rev = "7bba6699d6f903bd701b0aa525d845de8427fee6";
+      sha256 = "1lh7dh96fyi005fcg3xaf7r4ssgkq840p6anldlqy52vfwmglw3p";
+    };
+    description = "Port of Mednafen's PCFX core to libretro";
+    license = gpl2;
+    makefile = "Makefile";
+  };
+
+  beetle-psx = let der = (mkLibRetroCore {
+    core = "mednafen-psx";
+    src = fetchRetro {
+      repo = "beetle-psx-libretro";
+      rev = "0f1e7e60827cad49ebba628abdc83ad97652ab89";
+      sha256 = "1j92jgddyl970v775d6gyb50l8md6yfym2fpqhfxcr4gj1b4ivwq";
+    };
+    description = "Port of Mednafen's PSX Engine core to libretro";
+    license = gpl2;
+    makefile = "Makefile";
+    makeFlags = [ "HAVE_HW=0" "HAVE_LIGHTREC=1" ];
+  }); in der.override {
+    name = "beetle-psx-${der.version}";
+  };
+
+  beetle-psx-hw = let der = (mkLibRetroCore {
+    core = "mednafen-psx-hw";
+    src = fetchRetro {
+      repo = "beetle-psx-libretro";
+      rev = "0f1e7e60827cad49ebba628abdc83ad97652ab89";
+      sha256 = "1j92jgddyl970v775d6gyb50l8md6yfym2fpqhfxcr4gj1b4ivwq";
+    };
+    description = "Port of Mednafen's PSX Engine (with HW accel) core to libretro";
+    license = gpl2;
+    extraBuildInputs = [ libGL libGLU ];
+    makefile = "Makefile";
+    makeFlags = [ "HAVE_VULKAN=1" "HAVE_OPENGL=1" "HAVE_HW=1" "HAVE_LIGHTREC=1" ];
+  }); in der.override {
+    name = "beetle-psx-hw-${der.version}";
+  };
+
+  beetle-saturn = let der = (mkLibRetroCore {
+    core = "mednafen-saturn";
+    src = fetchRetro {
+      repo = "beetle-saturn-libretro";
+      rev = "8a65943bb7bbc3183eeb0d57c4ac3e663f1bcc11";
+      sha256 = "1f0cd9wmvarsmf4jw0p6h3lbzs6515aja7krrwapja7i4xmgbrnh";
+    };
+    description = "Port of Mednafen's Saturn core to libretro";
+    license = gpl2;
+    makefile = "Makefile";
+    makeFlags = [ "HAVE_HW=0" ];
+    meta.platforms = [ "x86_64-linux" "aarch64-linux" ];
+  }); in der.override {
+    name = "beetle-saturn-${der.version}";
+  };
+
+  beetle-saturn-hw = let der = (mkLibRetroCore {
+    core = "mednafen-saturn-hw";
+    src = fetchRetro {
+      repo = "beetle-saturn-libretro";
+      rev = "8a65943bb7bbc3183eeb0d57c4ac3e663f1bcc11";
+      sha256 = "1f0cd9wmvarsmf4jw0p6h3lbzs6515aja7krrwapja7i4xmgbrnh";
+    };
+    description = "Port of Mednafen's Saturn core to libretro";
+    license = gpl2;
+    extraBuildInputs = [ libGL libGLU ];
+    makefile = "Makefile";
+    makeFlags = [ "HAVE_OPENGL=1" "HAVE_HW=1" ];
+    meta.platforms = [ "x86_64-linux" "aarch64-linux" ];
+  }); in der.override {
+    name = "beetle-saturn-${der.version}";
+  };
+
+  beetle-supergrafx = mkLibRetroCore rec {
+    core = "mednafen-supergrafx";
+    src = fetchRetro {
+      repo = "beetle-supergrafx-libretro";
+      rev = "fadef23d59fa5ec17bc99e1e722cfd9e10535695";
+      sha256 = "15rm7p5q38qy3xpyvamhphjnna8h91fsbcqnl9vhzx9cmjg0wf54";
+    };
+    description = "Port of Mednafen's SuperGrafx core to libretro";
+    license = gpl2;
+    makefile = "Makefile";
+  };
+
+  beetle-wswan = mkLibRetroCore rec {
+    core = "mednafen-wswan";
+    src = fetchRetro {
+      repo = "beetle-wswan-libretro";
+      rev = "5b03d1b09f70dc208387d3c8b59e12e1f0d2692f";
+      sha256 = "1sm6ww3y9m85lhp74dpxbs05yxdhhqqmj2022j9s0m235z29iygc";
+    };
+    description = "Port of Mednafen's WonderSwan core to libretro";
+    license = gpl2;
+    makefile = "Makefile";
+  };
+
+  beetle-vb = mkLibRetroCore rec {
+    core = "mednafen-vb";
+    src = fetchRetro {
+      repo = "beetle-vb-libretro";
+      rev = "9a4e604a7320a3c6ed30601989fe0bc417fa9ad3";
+      sha256 = "1gallwbqxn5qbmwxr1vxb41nncksai4rxc739a7vqvp65k5kl0qp";
+    };
+    description = "Port of Mednafen's VirtualBoy core to libretro";
+    license = gpl2;
+    makefile = "Makefile";
+  };
+
+  bluemsx = mkLibRetroCore rec {
+    core = "bluemsx";
+    src = fetchRetro {
+      repo = core + "-libretro";
+      rev = "7a1d40e750860580ab7cc21fbc244b5bc6db6586";
+      sha256 = "05hnkyr47djccspr8v438zimdfsgym7v0jn1hwpkqc4i5zf70981";
+    };
+    description = "Port of BlueMSX to libretro";
+    license = gpl2;
+  };
+
+  bsnes-mercury = let bname = "bsnes-mercury"; in mkLibRetroCore {
+    core = bname + "-accuracy";
+    src = fetchRetro {
+      repo = bname;
+      rev = "4a382621da58ae6da850f1bb003ace8b5f67968c";
+      sha256 = "0z8psz24nx8497vpk2wya9vs451rzzw915lkw3qiq9bzlzg9r2wv";
+    };
+    description = "Fork of bsnes with HLE DSP emulation restored";
+    license = gpl3;
+    makefile = "Makefile";
+    postBuild = "cd out";
+  };
+
+  citra = mkLibRetroCore rec {
+    core = "citra";
+    src = fetchgit {
+      url = "https://github.com/libretro/citra.git";
+      rev = "84f31e95160b029e6d614053705054ed6a34bb38";
+      sha256 = "0gkgxpwrh0q098cpx56hprvmazi5qi448c23svwa8ar1myh8p248";
+      fetchSubmodules = true;
+      deepClone = true;
+    };
+    description = "Port of Citra to libretro";
+    license = gpl2Plus;
+    extraNativeBuildInputs = [ cmake pkg-config ];
+    extraBuildInputs = [ libGLU libGL boost ];
+    makefile = "Makefile";
+    cmakeFlags = [
+      "-DENABLE_LIBRETRO=ON"
+      "-DENABLE_QT=OFF"
+      "-DENABLE_SDL2=OFF"
+      "-DENABLE_WEB_SERVICE=OFF"
+      "-DENABLE_DISCORD_PRESENCE=OFF"
+    ];
+    preConfigure = "sed -e '77d' -i externals/cmake-modules/GetGitRevisionDescription.cmake";
+    postBuild = "cd src/citra_libretro";
+  };
+
+  desmume = mkLibRetroCore rec {
+    core = "desmume";
+    src = fetchRetro {
+      repo = core;
+      rev = "e8cf461f83eebb195f09e70090f57b07d1bcdd9f";
+      sha256 = "0rc8s5226wn39jqs5yxi30jc1snc0p106sfym7kgi98hy5na8yab";
+    };
+    description = "libretro wrapper for desmume NDS emulator";
+    license = gpl2;
+    extraBuildInputs = [ libpcap libGLU libGL xorg.libX11 ];
+    preBuild = "cd desmume/src/frontend/libretro";
+    makeFlags = lib.optional stdenv.hostPlatform.isAarch32 "platform=armv-unix"
+             ++ lib.optional (!stdenv.hostPlatform.isx86) "DESMUME_JIT=0";
+  };
+
+  desmume2015 = mkLibRetroCore rec {
+    core = "desmume2015";
+    src = fetchRetro {
+      repo = core;
+      rev = "93d5789d60f82436e20ccad05ce9cb43c6e3656e";
+      sha256 = "12nii2pbnqgh7f7jkphbwjpr2hiy2mzbwpas3xyhpf9wpy3qiasg";
+    };
+    description = "libretro wrapper for desmume NDS emulator from 2015";
+    license = gpl2;
+    extraBuildInputs = [ libpcap libGLU libGL xorg.libX11 ];
+    makeFlags = lib.optional stdenv.hostPlatform.isAarch32 "platform=armv-unix"
+             ++ lib.optional (!stdenv.hostPlatform.isx86) "DESMUME_JIT=0";
+    preBuild = "cd desmume";
+  };
+
+  dolphin = mkLibRetroCore {
+    core = "dolphin";
+    src = fetchRetro {
+      repo = "dolphin";
+      rev = "1fbd59911d1b718c142d6448dee3ede98152e395";
+      sha256 = "1rymsvs034l1hbxc3w8zi9lhmgka2qaj3jynjy152dccd480nnd4";
+    };
+    description = "Port of Dolphin to libretro";
+    license = gpl2Plus;
+
+    extraNativeBuildInputs = [ cmake curl pkg-config ];
+    extraBuildInputs = [
+      libGLU libGL pcre sfml
+      gettext hidapi
+      libevdev udev
+    ] ++ (with xorg; [ libSM libX11 libXi libpthreadstubs libxcb xcbutil libXext libXrandr libXinerama libXxf86vm ]);
+    makefile = "Makefile";
+    cmakeFlags = [
+      "-DCMAKE_BUILD_TYPE=Release"
+      "-DLIBRETRO=ON"
+      "-DLIBRETRO_STATIC=1"
+      "-DENABLE_QT=OFF"
+      "-DENABLE_LTO=OFF"
+      "-DUSE_UPNP=OFF"
+      "-DUSE_DISCORD_PRESENCE=OFF"
+    ];
+    dontUseCmakeBuildDir = true;
+  };
+
+  dosbox = mkLibRetroCore rec {
+    core = "dosbox";
+    src = fetchRetro {
+      repo = core + "-libretro";
+      rev = "e4ed503b14ed59d5d745396ef1cc7d52cf912328";
+      sha256 = "13bx0ln9hwn6hy4sv0ivqmjgjbfq8svx15dsa24hwd8lkf0kakl4";
+    };
+    description = "Port of DOSBox to libretro";
+    license = gpl2;
+  };
+
+  eightyone = mkLibRetroCore rec {
+    core = "81";
+    src = fetchRetro {
+      repo = core + "-libretro";
+      rev = "4352130bd2363954262a804b086f86b9d13d97f9";
+      sha256 = "057ynnv85imjqhgixrx7p28wn42v88vsm3fc1lp3mpcfi2bk266h";
+    };
+    description = "Port of EightyOne to libretro";
+    license = gpl3;
+  };
+
+  fbalpha2012 = mkLibRetroCore rec {
+    core = "fbalpha2012";
+    src = fetchRetro {
+      repo = core;
+      rev = "fa97cd2784a337f8ac774c2ce8a136aee69b5f43";
+      sha256 = "1i75k0r6838hl77bjjmzvan33ka5qjrdpirmclzj20g5j97lmas7";
+    };
+    description = "Port of Final Burn Alpha ~2012 to libretro";
+    license = "Non-commercial";
+    makefile = "makefile.libretro";
+    preBuild = "cd svn-current/trunk";
+  };
+
+  fbneo = mkLibRetroCore rec {
+    core = "fbneo";
+    src = fetchRetro {
+      repo = core;
+      rev = "cf43fdb1755f9f5c886266e86ba40d339bc8f5d7";
+      sha256 = "13g3c6mbwhcf0rp95ga4klszh8dab2d4ahh2vzzlmd57r69lf2lv";
+    };
+    description = "Port of FBNeo to libretro";
+    license = "Non-commercial";
+    makefile = "Makefile";
+    postPatch = ''
+      sed -i -e 's:-Wall:-Wall -Wno-format-security:g' src/burner/libretro/Makefile
+    '';
+    preBuild = "cd src/burner/libretro";
+    makeFlags = [ "USE_EXPERIMENTAL_FLAGS=1" ];
+  };
+
+  fceumm = mkLibRetroCore rec {
+    core = "fceumm";
+    src = fetchRetro {
+      repo = "libretro-" + core;
+      rev = "9ed22e5a9a1360a7f599a64283af9fe24b858e3d";
+      sha256 = "0rz6iy281jpybmsz5rh06k5xvmd9id9w2q2gd0qdv9a2ylwv7s2j";
+    };
+    description = "FCEUmm libretro port";
+    license = gpl2;
+  };
+
+  flycast = mkLibRetroCore rec {
+    core = "flycast";
+    src = fetchRetro {
+      repo = core;
+      rev = "b12f3726d9093acb4e441b1cdcf6cd11403c8644";
+      sha256 = "0nczjhdqr7svq9aflczf7rwz64bih1wqy9q0gyglb55xlslf5jqc";
+    };
+    description = "Flycast libretro port";
+    license = gpl2;
+    extraBuildInputs = [ libGL libGLU ];
+    makefile = "Makefile";
+    makeFlags = lib.optional stdenv.hostPlatform.isAarch64 [ "platform=arm64" ];
+    meta.platforms = [ "aarch64-linux" "x86_64-linux" ];
+  };
+
+  fmsx = mkLibRetroCore rec {
+    core = "fmsx";
+    src = fetchRetro {
+      repo = core + "-libretro";
+      rev = "3de916bbf15062de1ab322432d38a1fee29d5e68";
+      sha256 = "1krr4lmdiv0d7bxk37fqz5y412znb5bmxapv9g7ci6fp87sr69jq";
+    };
+    description = "FMSX libretro port";
+    license = "Non-commercial";
+    makefile = "Makefile";
+  };
+
+  freeintv = mkLibRetroCore rec {
+    core = "freeintv";
+    src = fetchRetro {
+      repo = core;
+      rev = "45030e10cc1a50cf7a80c5d921aa8cba0aeaca91";
+      sha256 = "10lngk3p012bgrg752426701hfzsiy359h8i0vzsa64pgyjbqlag";
+    };
+    description = "FreeIntv libretro port";
+    license = gpl3;
+    makefile = "Makefile";
+  };
+
+  gambatte = mkLibRetroCore rec {
+    core = "gambatte";
+    src = fetchRetro {
+      repo = core + "-libretro";
+      rev = "132f36e990dfc6effdafa6cf261373432464f9bf";
+      sha256 = "19w5k9yc1cl99c5hiqbp6j54g6z06xcblpvd3x6nmhxij81yqxy7";
+    };
+    description = "Gambatte libretro port";
+    license = gpl2;
+  };
+
+  genesis-plus-gx = mkLibRetroCore {
+    core = "genesis-plus-gx";
+    src = fetchRetro {
+      repo = "Genesis-Plus-GX";
+      rev = "50551066f71f8a5ea782ea3747891fd6d24ebe67";
+      sha256 = "150lgdrv7idcq7jbd1jj7902rcsyixd7kfjs2m5xdinjvl22kihr";
+    };
+    description = "Enhanced Genesis Plus libretro port";
+    license = "Non-commercial";
+  };
+
+  gpsp = mkLibRetroCore rec {
+    core = "gpsp";
+    src = fetchRetro {
+      repo = core;
+      rev = "3f2f57c982ffead643957db5b26931df4913596f";
+      sha256 = "09fa1c623rmy1w9zx85r75viv8q1vknhbs8fn6xbss9rhpxhivwg";
+    };
+    description = "Port of gpSP to libretro";
+    license = gpl2;
+    makefile = "Makefile";
+  };
+
+  gw = mkLibRetroCore rec {
+    core = "gw";
+    src = fetchRetro {
+      repo = core + "-libretro";
+      rev = "819b1dde560013003eeac86c2069c5be7af25c6d";
+      sha256 = "1jhgfys8hiipvbwq3gc48d7v6wq645d10rbr4w5m6px0fk6csshk";
+    };
+    description = "Port of Game and Watch to libretro";
+    license = lib.licenses.zlib;
+    makefile = "Makefile";
+  };
+
+  handy = mkLibRetroCore rec {
+    core = "handy";
+    src = fetchRetro {
+      repo = "libretro-" + core;
+      rev = "c9fe65d1a2df454ee11404ac27bdc9be319dd9a2";
+      sha256 = "1l1gi8z68mv2cpdy7a6wvhd86q55khj3mv3drf43ak4kj2ij8cvq";
+    };
+    description = "Port of Handy to libretro";
+    license = "Handy-License";
+    makefile = "Makefile";
+  };
+
+  hatari = mkLibRetroCore rec {
+    core = "hatari";
+    src = fetchRetro {
+      repo = core;
+      rev = "ec1b59c4b6c7ca7d0d23d60cfe2cb61911b11173";
+      sha256 = "1pm821s2cz93xr7qx7dv0imr44bi4pvdvlnjl486p83vff9yawfg";
+    };
+    description = "Port of Hatari to libretro";
+    license = gpl2;
+    extraBuildInputs = [ SDL zlib ];
+    extraNativeBuildInputs = [ cmake which ];
+    dontUseCmakeConfigure = true;
+    dontConfigure = true;
+    makeFlags = [ "EXTERNAL_ZLIB=1" ];
+    depsBuildBuild = [ buildPackages.stdenv.cc ];
+  };
+
+  mame = mkLibRetroCore {
+    core = "mame";
+    src = fetchRetro {
+      repo = "mame";
+      rev = "ed987ad07964a938351ff3cc1ad42e02ffd2af6d";
+      sha256 = "0qc66mvraffx6ws972skx3wgblich17q6z42798qn13q1a264p4j";
+    };
+    description = "Port of MAME to libretro";
+    license = gpl2Plus;
+
+    extraBuildInputs = [ alsaLib libGLU libGL portaudio python27 xorg.libX11 ];
+    postPatch = ''
+      # Prevent the failure during the parallel building of:
+      # make -C 3rdparty/genie/build/gmake.linux -f genie.make obj/Release/src/host/lua-5.3.0/src/lgc.o
+      mkdir -p 3rdparty/genie/build/gmake.linux/obj/Release/src/host/lua-5.3.0/src
+    '';
+    makefile = "Makefile.libretro";
+  };
+
+  mame2000 = mkLibRetroCore rec {
+    core = "mame2000";
+    src = fetchRetro {
+      repo = core + "-libretro";
+      rev = "e5d4a934c60adc6d42a3f87319312aad89595a15";
+      sha256 = "1zn63yqyrsnsk196v5f3nm7cx41mvsm3icpis1yxbma2r3dk3f89";
+    };
+    description = "Port of MAME ~2000 to libretro";
+    license = gpl2Plus;
+    makefile = "Makefile";
+    makeFlags = lib.optional (!stdenv.hostPlatform.isx86) "IS_X86=0";
+  };
+
+  mame2003 = mkLibRetroCore rec {
+    core = "mame2003";
+    src = fetchRetro {
+      repo = core + "-libretro";
+      rev = "82596014905ad38c80c9eb322ab08c625d1d92cd";
+      sha256 = "17dp2rz6p7q7nr0lajn3vhk9ghngxz16f7c6c87r6wgsy4y3xw0m";
+    };
+    description = "Port of MAME ~2003 to libretro";
+    license = gpl2Plus;
+    makefile = "Makefile";
+  };
+
+  mame2003-plus = mkLibRetroCore rec {
+    core = "mame2003-plus";
+    src = fetchRetro {
+      repo = core + "-libretro";
+      rev = "0134c428b75882aa474f78dbbf2c6ecde49b97b7";
+      sha256 = "0jln2ys6v9hrsrkhqd87jfslwvkca425f40mf7866g6b4pz56mwc";
+    };
+    description = "Port of MAME ~2003+ to libretro";
+    license = gpl2Plus;
+    makefile = "Makefile";
+  };
+
+  mame2010 = mkLibRetroCore rec {
+    core = "mame2010";
+    src = fetchRetro {
+      repo = core + "-libretro";
+      rev = "d3151837758eade73c85c28c20e7d2a8706f30c6";
+      sha256 = "0hj0yhc8zs32fkzn8j341ybhvrsknv0k6x0z2fv3l9ic7swgb93i";
+    };
+    description = "Port of MAME ~2010 to libretro";
+    license = gpl2Plus;
+    makefile = "Makefile";
+    makeFlags = lib.optionals stdenv.hostPlatform.isAarch64 [ "PTR64=1" "ARM_ENABLED=1" "X86_SH2DRC=0" "FORCE_DRC_C_BACKEND=1" ];
+  };
+
+  mame2015 = mkLibRetroCore rec {
+    core = "mame2015";
+    src = fetchRetro {
+      repo = core + "-libretro";
+      rev = "37333ed6fda4c798a1d6b055fe4708f9f0dcf5a7";
+      sha256 = "1asldlj1ywgmhabbhaagagg5hn0359122al07802q3l57ns41l64";
+    };
+    description = "Port of MAME ~2015 to libretro";
+    license = gpl2Plus;
+    extraNativeBuildInputs = [ python27 ];
+    extraBuildInputs = [ alsaLib ];
+    makefile = "Makefile";
+  };
+
+  mame2016 = mkLibRetroCore rec {
+    core = "mame2016";
+    src = fetchRetro {
+      repo = core + "-libretro";
+      rev = "02987af9b81a9c3294af8fb9d5a34f9826a2cf4d";
+      sha256 = "0gl7irmn5d8lk7kf484vgw6kb325fq4ghwsni3il4nm5n2a8yglh";
+    };
+    patches = [
+      (fetchpatch {
+        name = "fix_mame_build_on_make-4.3.patch";
+        url = "https://github.com/libretro/mame2016-libretro/commit/5874fae3d124f5e7c8a91634f5473a8eac902e47.patch";
+        sha256 = "061f1lcm72glksf475ikl8w10pnbgqa7049ylw06nikis2qdjlfn";
+      })
+    ];
+    description = "Port of MAME ~2016 to libretro";
+    license = gpl2Plus;
+    extraNativeBuildInputs = [ python27 ];
+    extraBuildInputs = [ alsaLib ];
+    postPatch = ''
+      # Prevent the failure during the parallel building of:
+      # make -C 3rdparty/genie/build/gmake.linux -f genie.make obj/Release/src/host/lua-5.3.0/src/lgc.o
+      mkdir -p 3rdparty/genie/build/gmake.linux/obj/Release/src/host/lua-5.3.0/src
+    '';
+  };
+
+  mesen = mkLibRetroCore rec {
+    core = "mesen";
+    src = fetchFromGitHub {
+      owner = "SourMesen";
+      repo = core;
+      rev = "cfc5bf6976f62ebd42ea30d5a803c138fc357509";
+      sha256 = "0ihlgvzvni1yqcyi5yxdvg36q20fsqd6n67zavwfb2ph09cqv7kz";
+    };
+    description = "Port of Mesen to libretro";
+    license = gpl3;
+    makefile = "Makefile";
+    preBuild = "cd Libretro";
+  };
+
+  meteor = mkLibRetroCore rec {
+    core = "meteor";
+    src = fetchRetro {
+      repo = core + "-libretro";
+      rev = "3d21e3b5a7596918bee0fcaca5752ae76624c05e";
+      sha256 = "0fghnxxbdrkdz6zswkd06w2r3dvr4ikvcp8jbr7nb9fc5yzn0avw";
+    };
+    description = "Port of Meteor to libretro";
+    license = gpl3;
+    makefile = "Makefile";
+    preBuild = "cd libretro";
+  };
+
+  mgba = mkLibRetroCore rec {
+    core = "mgba";
+    src = fetchRetro {
+      repo = core;
+      rev = "f87f9ef6cb38537e07dcaedeb82aecac6537d42e";
+      sha256 = "0yixvnzgk7qvcfz12r5y8i85czqxbxx6bvl1c7yms8riqn9ssvb7";
+    };
+    description = "Port of mGBA to libretro";
+    license = mpl20;
+  };
+
+  mupen64plus = mkLibRetroCore {
+    core = "mupen64plus-next";
+    src = fetchRetro {
+      repo = "mupen64plus-libretro-nx";
+      rev = "81a58df0263c90b10b7fc11b6deee04d47e3aa40";
+      sha256 = "1brqyrsdzdq53a68q7ph01q2bx5y4m8b3ymvpp25229imm88lgkn";
+    };
+    description = "Libretro port of Mupen64 Plus, GL only";
+    license = gpl2;
+
+    extraBuildInputs = [ libGLU libGL libpng nasm xorg.libX11 ];
+    makefile = "Makefile";
+  };
+
+  neocd = mkLibRetroCore rec {
+    core = "neocd";
+    src = fetchRetro {
+      repo = core + "_libretro";
+      rev = "3825848fe7dd7e0ef859729eefcb29e2ea2956b7";
+      sha256 = "018vfmjsx62zk45yx3pwisp4j133yxjbm7fnwwr244gnyms57711";
+    };
+    description = "NeoCD libretro port";
+    license = gpl3;
+    makefile = "Makefile";
+  };
+
+  nestopia = mkLibRetroCore rec {
+    core = "nestopia";
+    src = fetchRetro {
+      repo = core;
+      rev = "70c53f08c0cc92e90d095d6558ab737ce20431ac";
+      sha256 = "1hlfqml66wy6fn40f1iiy892vq9y9fj20vv3ynd2s3b3qxhwfx73";
+    };
+    description = "Nestopia libretro port";
+    license = gpl2;
+    makefile = "Makefile";
+    preBuild = "cd libretro";
+  };
+
+  np2kai = mkLibRetroCore rec {
+    core = "np2kai";
+    src = fetchFromGitHub rec {
+      owner = "AZO234";
+      repo = "NP2kai";
+      rev = "4a317747724669343e4c33ebdd34783fb7043221";
+      sha256 = "0kxysxhx6jyk82mx30ni0ydzmwdcbnlxlnarrlq018rsnwb4md72";
+    };
+    description = "Neko Project II kai libretro port";
+    license = mit;
+    makefile = "Makefile.libretro";
+    preBuild = ''
+      cd sdl2
+      substituteInPlace ${makefile} \
+        --replace 'GIT_VERSION :=' 'GIT_VERSION ?='
+      export GIT_VERSION=${builtins.substring 0 7 src.rev}
+    '';
+  };
+
+  o2em = mkLibRetroCore rec {
+    core = "o2em";
+    src = fetchRetro {
+      repo = "libretro-" + core;
+      rev = "b23a796dd3490e979ff43710317df6d43bd661e1";
+      sha256 = "1pkbq7nig394zdjdic0mzdsvx8xhzamsh53xh2hzznipyj46b7z0";
+    };
+    description = "Port of O2EM to libretro";
+    license = artistic1;
+    makefile = "Makefile";
+  };
+
+  opera = mkLibRetroCore rec {
+    core = "opera";
+    src = fetchRetro {
+      repo = core + "-libretro";
+      rev = "27bc2653ed469072a6a95102a8212a35fbb1e590";
+      sha256 = "10cxjpsd35rb4fjc5ycs1h00gvshpn2mxxvwb6xzrfrzva0kjw1l";
+    };
+    description = "Opera is a port of 4DO/libfreedo to libretro";
+    license = "Non-commercial";
+    makefile = "Makefile";
+    makeFlags = [ "CC_PREFIX=${stdenv.cc.targetPrefix}" ];
+  };
+
+  parallel-n64 = mkLibRetroCore rec {
+    core = "parallel-n64";
+    src = fetchRetro {
+      repo = core;
+      rev = "8fe07c62a364d0af1e22b7f75e839d42872dae7f";
+      sha256 = "0p3fpldw6w4n4l60bv55c17vhqwq4q39fp36h8iqmnj7c32c61kf";
+    };
+    description = "Parallel Mupen64plus rewrite for libretro.";
+    license = gpl2;
+    extraBuildInputs = [ libGLU libGL libpng ];
+    makefile = "Makefile";
+    postPatch = lib.optionalString stdenv.hostPlatform.isAarch64 ''
+      sed -i -e '1 i\CPUFLAGS += -DARM_FIX -DNO_ASM -DARM_ASM -DDONT_WANT_ARM_OPTIMIZATIONS -DARM64' Makefile \
+      && sed -i -e 's,CPUFLAGS  :=,,g' Makefile
+    '';
+  };
+
+  pcsx_rearmed = mkLibRetroCore rec {
+    core = "pcsx_rearmed";
+    src = fetchRetro {
+      repo = core;
+      rev = "8fda5dd0e28fe46621fb1ab57781c316143017da";
+      sha256 = "0k371d0xqzqwy8ishvxssgasm36q83qj7ksn2av110n879n4knwb";
+    };
+    description = "Port of PCSX ReARMed with GNU lightning to libretro";
+    license = gpl2;
+    dontConfigure = true;
+  };
+
+  picodrive = mkLibRetroCore rec {
+    core = "picodrive";
+    src = fetchRetro {
+      repo = core;
+      rev = "600894ec6eb657586a972a9ecd268f50907a279c";
+      sha256 = "1bxphwnq4b80ssmairy8sfc5cp4m6jyvrcjcj63q1vk7cs6qls7p";
+    };
+    description = "Fast MegaDrive/MegaCD/32X emulator";
+    license = "MAME";
+
+    extraBuildInputs = [ libpng SDL ];
+    SDL_CONFIG = "${SDL.dev}/bin/sdl-config";
+    dontAddPrefix = true;
+    configurePlatforms = [];
+    makeFlags = lib.optional stdenv.hostPlatform.isAarch64 [ "platform=aarch64" ];
+  };
+
+  play = mkLibRetroCore {
+    core = "play";
+    src = fetchRetro {
+      repo = "play-";
+      rev = "884ae3b96c631f235cd18b2643d1f318fa6951fb";
+      sha256 = "0m9pk20jh4y02visgzfw64bpbw93bzs15x3a3bnd19yivm34dbfc";
+    };
+    description = "Port of Play! to libretro";
+    license = bsd2;
+    extraBuildInputs = [ boost ];
+    extraNativeBuildInputs = [ cmake openssl curl icu libGL libGLU xorg.libX11 ];
+    makefile = "Makefile";
+    cmakeFlags = [ "-DBUILD_PLAY=OFF -DBUILD_LIBRETRO_CORE=ON" ];
+    postBuild = "mv Source/ui_libretro/play_libretro${stdenv.hostPlatform.extensions.sharedLibrary} play_libretro${stdenv.hostPlatform.extensions.sharedLibrary}";
+  };
+
+  ppsspp = mkLibRetroCore {
+    core = "ppsspp";
+    src = fetchgit {
+      url = "https://github.com/hrydgard/ppsspp";
+      rev = "bf1777f7d3702e6a0f71c7ec1fc51976e23c2327";
+      sha256 = "17sym0vk72lzbh9a1501mhw98c78x1gq7k1fpy69nvvb119j37wa";
+    };
+    description = "ppsspp libretro port";
+    license = gpl2;
+    extraNativeBuildInputs = [ cmake pkg-config ];
+    extraBuildInputs = [ libGLU libGL libzip ffmpeg_3 python37 snappy xorg.libX11 ];
+    makefile = "Makefile";
+    cmakeFlags = [ "-DLIBRETRO=ON -DUSE_SYSTEM_FFMPEG=ON -DUSE_SYSTEM_SNAPPY=ON -DUSE_SYSTEM_LIBZIP=ON -DOpenGL_GL_PREFERENCE=GLVND" ];
+    postBuild = "mv lib/ppsspp_libretro${stdenv.hostPlatform.extensions.sharedLibrary} ppsspp_libretro${stdenv.hostPlatform.extensions.sharedLibrary}";
+  };
+
+  prboom = mkLibRetroCore rec {
+    core = "prboom";
+    src = fetchRetro {
+      repo = "libretro-" + core;
+      rev = "991016b3c7a9c8b0e49b2bc9c72f68c60800fc7b";
+      sha256 = "1abv9qgfvh3x84shgyl3y90bjz77mjj17vibag7bg6i8hgjikjgq";
+    };
+    description = "Prboom libretro port";
+    license = gpl2;
+    makefile = "Makefile";
+  };
+
+  prosystem = mkLibRetroCore rec {
+    core = "prosystem";
+    src = fetchRetro {
+      repo = core + "-libretro";
+      rev = "6f7e34aea89db5ba2fbf674e5ff0ad6fc68a198e";
+      sha256 = "0pqkb0f51s8ma0l4m9xk2y85z2kh3fgay9g4g8fingbgqq1klvzs";
+    };
+    description = "Port of ProSystem to libretro";
+    license = gpl2;
+    makefile = "Makefile";
+  };
+
+  quicknes = mkLibRetroCore {
+    core = "quicknes";
+    src = fetchRetro {
+      repo = "QuickNES_Core";
+      rev = "31654810b9ebf8b07f9c4dc27197af7714364ea7";
+      sha256 = "15fr5a9hv7wgndb0fpmr6ws969him41jidzir2ix9xkb0mmvcm86";
+    };
+    description = "QuickNES libretro port";
+    license = lgpl21Plus;
+    makefile = "Makefile";
+  };
+
+  sameboy = mkLibRetroCore rec {
+    core = "sameboy";
+    src = fetchRetro {
+      repo = "sameboy";
+      rev = "c9e547c1063fd62c40a4b7a86e7db99dc9089051";
+      sha256 = "0bff6gicm24d7h270aqvgd8il6mi7j689nj5zl9ij0wc77hrrpmq";
+    };
+    description = "SameBoy libretro port";
+    license = mit;
+    extraNativeBuildInputs = [ which hexdump ];
+    preBuild = "cd libretro";
+    makefile = "Makefile";
+  };
+
+  scummvm = mkLibRetroCore rec {
+    core = "scummvm";
+    src = fetchRetro {
+      repo = core;
+      rev = "de91bf9bcbf4449f91e2f50fde173496a2b52ee0";
+      sha256 = "06h9xaf2b1cjk85nbslpjj0fm9iy9b2lxr1wf3i09hgs4sh6x464";
+    };
+    description = "Libretro port of ScummVM";
+    license = gpl2;
+    extraBuildInputs = [ fluidsynth libjpeg libvorbis libGLU libGL SDL ];
+    makefile = "Makefile";
+    preConfigure = "cd backends/platform/libretro/build";
+  };
+
+  smsplus-gx = mkLibRetroCore rec {
+    core = "smsplus";
+    src = fetchRetro {
+      repo = core + "-gx";
+      rev = "36c82768c03d889f1cf4b66369edac2297acba32";
+      sha256 = "1f9waikyp7kp2abb76wlv9hmf2jpc76zjmfqyc7wk2pc70ljm3l4";
+    };
+    description = "SMS Plus GX libretro port";
+    license = gpl2Plus;
+  };
+
+  snes9x = mkLibRetroCore rec {
+    core = "snes9x";
+    src = fetchFromGitHub {
+      owner = "snes9xgit";
+      repo = core;
+      rev = "bd9246ddd75a5e9f78d6189c8c57754d843630f7";
+      sha256 = "10fm7ah3aha9lf4k9hgw0dlhdvshzpig2d0ylcb12gf9zz0i22ns";
+    };
+    description = "Port of SNES9x git to libretro";
+    license = "Non-commercial";
+    makefile = "Makefile";
+    preBuild = "cd libretro";
+  };
+
+  snes9x2002 = mkLibRetroCore rec {
+    core = "snes9x2002";
+    src = fetchRetro {
+      repo = core;
+      rev = "a869da7f22c63ee1cb316f79c6dd7691a369da3e";
+      sha256 = "11lcwscnxg6sk9as2xlr4nai051qhidbsymyis4nz3r4dmgzf8j8";
+    };
+    description = "Optimized port/rewrite of SNES9x 1.39 to Libretro";
+    license = "Non-commercial";
+    makefile = "Makefile";
+  };
+
+  snes9x2005 = mkLibRetroCore rec {
+    core = "snes9x2005";
+    src = fetchRetro {
+      repo = core;
+      rev = "c216559b9e0dc3d7f059dcf31b813402ad47fea5";
+      sha256 = "19b2rpj6i32c34ryvlna4yca84y5ypza78w4x9l17qlhp021h9pv";
+    };
+    description = "Optimized port/rewrite of SNES9x 1.43 to Libretro";
+    license = "Non-commercial";
+    makefile = "Makefile";
+    makeFlags = [ "USE_BLARGG_APU=1" ];
+    postBuild = "mv snes9x2005_plus_libretro${stdenv.hostPlatform.extensions.sharedLibrary} snes9x2005_libretro${stdenv.hostPlatform.extensions.sharedLibrary}";
+  };
+
+  snes9x2010 = mkLibRetroCore rec {
+    core = "snes9x2010";
+    src = fetchRetro {
+      repo = core;
+      rev = "ba9f2240360f8db270fb6ba5465c79c317070560";
+      sha256 = "00y53sjrsp8sccpp1qqw88iawsz30g6d370cbqcxs4ya1r6awn5x";
+    };
+    description = "Optimized port/rewrite of SNES9x 1.52+ to Libretro";
+    license = "Non-commercial";
+  };
+
+  stella = mkLibRetroCore rec {
+    core = "stella";
+    src = fetchFromGitHub {
+      owner = "stella-emu";
+      repo = core;
+      rev = "506bb0bd0618e676b1959931dcc00a9d0f5f0f3d";
+      sha256 = "09nclx0ksixngnxkkjjcyhf3d0vl4ykm8fx7m307lvag8nxj7z03";
+    };
+    description = "Port of Stella to libretro";
+    license = gpl2;
+    extraBuildInputs = [ libpng pkg-config SDL ];
+    makefile = "Makefile";
+    preBuild = "cd src/libretro";
+    dontConfigure = true;
+  };
+
+  stella2014 = mkLibRetroCore rec {
+    core = "stella2014";
+    src = fetchRetro {
+      repo = core + "-libretro";
+      rev = "fc87f2c78d3b177f4b9b19698557dce452ac3ce7";
+      sha256 = "0yqzavk1w0d0ngpls32c4wlihii97fz2g6zsgadhm48apwjvn3xx";
+    };
+    description = "Port of Stella to libretro";
+    license = gpl2;
+    makefile = "Makefile";
+  };
+
+  tgbdual = mkLibRetroCore rec {
+    core = "tgbdual";
+    src = fetchRetro {
+      repo = core + "-libretro";
+      rev = "9be31d373224cbf288db404afc785df41e61b213";
+      sha256 = "19m3f3hj3jyg711z1xq8qn1hgsr593krl6s6hi0r6vf8p5x0zbzw";
+    };
+    description = "Port of TGBDual to libretro";
+    license = gpl2;
+    makefile = "Makefile";
+  };
+
+  tic80 = mkLibRetroCore {
+    core = "tic80";
+    src = fetchRetro {
+      repo = "tic-80";
+      rev = "f43bad908d5f05f2a66d5cd1d6f21b234d4abd2c";
+      sha256 = "0bp34r8qqyw52alws1z4ib9j7bs4d641q6nvqszd07snp9lpvwym";
+    };
+    description = "Port of TIC-80 to libretro";
+    license = mit;
+    extraNativeBuildInputs = [ cmake pkg-config ];
+    makefile = "Makefile";
+    cmakeFlags = [
+      "-DBUILD_LIBRETRO=ON"
+      "-DBUILD_DEMO_CARTS=OFF"
+      "-DBUILD_PRO=OFF"
+      "-DBUILD_PLAYER=OFF"
+      "-DBUILD_SDL=OFF"
+      "-DBUILD_SOKOL=OFF"
+    ];
+    postBuild = "cd lib";
+  };
+
+  vba-next = mkLibRetroCore rec {
+    core = "vba-next";
+    src = fetchRetro {
+      repo = core;
+      rev = "019132daf41e33a9529036b8728891a221a8ce2e";
+      sha256 = "0hab4rhvvcg30jifd9h9jq5q2vqk2hz5i1q456w6v2d10hl1lf15";
+    };
+    description = "VBA-M libretro port with modifications for speed";
+    license = gpl2;
+  };
+
+  vba-m = mkLibRetroCore rec {
+    core = "vbam";
+    src = fetchRetro {
+      repo = core + "-libretro";
+      rev = "7d88e045a2fe44e56b3f84846beec446b4c4b2d9";
+      sha256 = "04f8adg99a36qkqhij54vkw5z18m5ld33p78lbmv8cxk7k7g7yhy";
+    };
+    description = "vanilla VBA-M libretro port";
+    license = gpl2;
+    makefile = "Makefile";
+    preBuild = "cd src/libretro";
+  };
+
+  vecx = mkLibRetroCore rec {
+    core = "vecx";
+    src = fetchRetro {
+      repo = "libretro-" + core;
+      rev = "321205271b1c6be5dbdb8d309097a5b5c2032dbd";
+      sha256 = "1w54394yhf2yqmq1b8wi5y7lvixc5hpjxpyiancrdbjd0af7pdvd";
+    };
+    description = "Port of Vecx to libretro";
+    license = gpl3;
+  };
+
+  virtualjaguar = mkLibRetroCore rec {
+    core = "virtualjaguar";
+    src = fetchRetro {
+      repo = core + "-libretro";
+      rev = "a162fb75926f5509f187e9bfc69958bced40b0a6";
+      sha256 = "06k8xpn5y9rzmi2lwfw0v9v9pz4wvmpalycc608bw9cl39lmz10h";
+    };
+    description = "Port of VirtualJaguar to libretro";
+    license = gpl3;
+    makefile = "Makefile";
+  };
+
+  yabause = mkLibRetroCore rec {
+    core = "yabause";
+    src = fetchRetro {
+      repo = core;
+      rev = "9be109f9032afa793d2a79b837c4cc232cea5929";
+      sha256 = "0aj862bs4dmnldy62wdssj5l63ibfkbzqvkxcqa3wyvdz4i367jc";
+    };
+    description = "Port of Yabause to libretro";
+    license = gpl2;
+    makefile = "Makefile";
+    # Disable SSE for non-x86. DYNAREC doesn't build on either Aarch64 or x86_64.
+    makeFlags = lib.optional (!stdenv.hostPlatform.isx86) "HAVE_SSE=0";
+    preBuild = "cd yabause/src/libretro";
+  };
+
+}
diff --git a/nixpkgs/pkgs/misc/emulators/retroarch/default.nix b/nixpkgs/pkgs/misc/emulators/retroarch/default.nix
new file mode 100644
index 000000000000..a6ada570a500
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/retroarch/default.nix
@@ -0,0 +1,63 @@
+{ lib, stdenv, fetchFromGitHub, which, pkg-config, makeWrapper
+, ffmpeg_3, libGLU, libGL, freetype, libxml2, python3
+, libobjc, AppKit, Foundation
+, alsaLib ? null
+, libdrm ? null
+, libpulseaudio ? null
+, libv4l ? null
+, libX11 ? null
+, libXdmcp ? null
+, libXext ? null
+, libXxf86vm ? null
+, mesa ? null
+, SDL2 ? null
+, udev ? null
+, enableNvidiaCgToolkit ? false, nvidia_cg_toolkit ? null
+, withVulkan ? stdenv.isLinux, vulkan-loader ? null
+, fetchurl
+, wayland
+, libxkbcommon
+}:
+
+with lib;
+
+stdenv.mkDerivation rec {
+  pname = "retroarch-bare";
+  version = "1.8.5";
+
+  src = fetchFromGitHub {
+    owner = "libretro";
+    repo = "RetroArch";
+    sha256 = "1pg8j9wvwgrzsv4xdai6i6jgdcc922v0m42rbqxvbghbksrc8la3";
+    rev = "v${version}";
+  };
+
+  nativeBuildInputs = [ pkg-config wayland ]
+                      ++ optional withVulkan makeWrapper;
+
+  buildInputs = [ ffmpeg_3 freetype libxml2 libGLU libGL python3 SDL2 which ]
+                ++ optional enableNvidiaCgToolkit nvidia_cg_toolkit
+                ++ optional withVulkan vulkan-loader
+                ++ optionals stdenv.isDarwin [ libobjc AppKit Foundation ]
+                ++ optionals stdenv.isLinux [ alsaLib libdrm libpulseaudio libv4l libX11
+                                              libXdmcp libXext libXxf86vm mesa udev
+                                              wayland libxkbcommon ];
+
+  enableParallelBuilding = true;
+
+  configureFlags = lib.optionals stdenv.isLinux [ "--enable-kms" "--enable-egl" ];
+
+  postInstall = optionalString withVulkan ''
+    wrapProgram $out/bin/retroarch --prefix LD_LIBRARY_PATH ':' ${vulkan-loader}/lib
+  '';
+
+  preFixup = "rm $out/bin/retroarch-cg2glsl";
+
+  meta = {
+    homepage = "https://libretro.com";
+    description = "Multi-platform emulator frontend for libretro cores";
+    license = licenses.gpl3;
+    platforms = platforms.all;
+    maintainers = with maintainers; [ MP2E edwtjo matthewbauer kolbycrouch ];
+  };
+}
diff --git a/nixpkgs/pkgs/misc/emulators/retroarch/kodi-advanced-launchers.nix b/nixpkgs/pkgs/misc/emulators/retroarch/kodi-advanced-launchers.nix
new file mode 100644
index 000000000000..79dd025cf948
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/retroarch/kodi-advanced-launchers.nix
@@ -0,0 +1,40 @@
+{ stdenv, pkgs, cores, runtimeShell }:
+
+assert cores != [];
+
+with pkgs.lib;
+
+let
+
+  script = exec: ''
+    #!${runtimeShell}
+    nohup sh -c "pkill -SIGTSTP kodi" &
+    # https://forum.kodi.tv/showthread.php?tid=185074&pid=1622750#pid1622750
+    nohup sh -c "sleep 10 && ${exec} '$@' -f;pkill -SIGCONT kodi"
+  '';
+  scriptSh = exec: pkgs.writeScript ("kodi-"+exec.name) (script exec.path);
+  execs = map (core: rec { name = core.core; path = core+"/bin/retroarch-"+name;}) cores;
+
+in
+
+stdenv.mkDerivation {
+  pname = "kodi-retroarch-advanced-launchers";
+  version = "0.2";
+
+  dontBuild = true;
+
+  buildCommand = ''
+    mkdir -p $out/bin
+    ${lib.concatMapStrings (exec: "ln -s ${scriptSh exec} $out/bin/kodi-${exec.name};") execs}
+  '';
+
+  meta = {
+    description = "Kodi retroarch advanced launchers";
+    longDescription = ''
+      These retroarch launchers are intended to be used with
+      advanced (emulation) launcher for Kodi since device input is
+      otherwise caught by both Kodi and the retroarch process.
+    '';
+    license = lib.licenses.gpl3;
+  };
+}
diff --git a/nixpkgs/pkgs/misc/emulators/retroarch/wrapper.nix b/nixpkgs/pkgs/misc/emulators/retroarch/wrapper.nix
new file mode 100644
index 000000000000..40d9f07846b7
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/retroarch/wrapper.nix
@@ -0,0 +1,37 @@
+{ stdenv, lib, makeWrapper, retroarch, cores }:
+
+stdenv.mkDerivation {
+  pname = "retroarch";
+  version = lib.getVersion retroarch;
+
+  nativeBuildInputs = [ makeWrapper ];
+
+  buildCommand = ''
+    mkdir -p $out/lib
+    $(for coreDir in $cores
+    do
+      $(ln -s $coreDir/* $out/lib/.)
+    done)
+
+    ln -s -t $out ${retroarch}/share
+
+    if [ -d ${retroarch}/Applications ]; then
+      ln -s -t $out ${retroarch}/Applications
+    fi
+
+    makeWrapper ${retroarch}/bin/retroarch $out/bin/retroarch \
+      --suffix-each LD_LIBRARY_PATH ':' "$cores" \
+      --add-flags "-L $out/lib/" \
+  '';
+
+  cores = map (x: x + x.libretroCore) cores;
+  preferLocalBuild = true;
+
+  meta = with retroarch.meta; {
+    inherit license homepage platforms maintainers;
+    description = description
+                  + " (with cores: "
+                  + lib.concatStrings (lib.intersperse ", " (map (x: ""+x.name) cores))
+                  + ")";
+  };
+}
diff --git a/nixpkgs/pkgs/misc/emulators/retrofe/default.nix b/nixpkgs/pkgs/misc/emulators/retrofe/default.nix
new file mode 100644
index 000000000000..558b5ca63377
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/retrofe/default.nix
@@ -0,0 +1,78 @@
+{ lib, stdenv, fetchhg, cmake, glib, gst_all_1, makeWrapper, pkg-config
+, python, SDL2, SDL2_image, SDL2_mixer, SDL2_ttf, sqlite, zlib, runtimeShell
+}:
+
+stdenv.mkDerivation {
+  pname = "retrofe";
+  version = "0.6.169";
+
+  src = fetchhg {
+    url = "https://bitbucket.org/teamretro/retrofe";
+    rev = "8793e03";
+    sha256 = "0cvsg07ff0fdqh5zgiv2fs7s6c98hn150kpxmpw5fn6jilaszwkm";
+  };
+
+  nativeBuildInputs = [ cmake makeWrapper pkg-config python ];
+
+  buildInputs = [
+    glib gst_all_1.gstreamer SDL2 SDL2_image SDL2_mixer SDL2_ttf sqlite zlib
+  ] ++ (with gst_all_1; [ gst-libav gst-plugins-base gst-plugins-good ]);
+
+  patches = [ ./include-paths.patch ];
+
+  configurePhase = ''
+    cmake RetroFE/Source -BRetroFE/Build -DCMAKE_BUILD_TYPE=Release \
+      -DVERSION_MAJOR=0 -DVERSION_MINOR=0 -DVERSION_BUILD=0 \
+      -DGSTREAMER_BASE_INCLUDE_DIRS='${gst_all_1.gst-plugins-base.dev}/include/gstreamer-1.0'
+  '';
+
+  buildPhase = ''
+    cmake --build RetroFE/Build
+    python Scripts/Package.py --os=linux --build=full
+  '';
+
+  installPhase = ''
+    mkdir -p $out/bin
+    mkdir -p $out/share/retrofe
+    cp -r Artifacts/linux/RetroFE $out/share/retrofe/example
+    mv $out/share/retrofe/example/retrofe $out/bin/
+
+    cat > $out/bin/retrofe-init << EOF
+    #!${runtimeShell}
+
+    echo "This will install retrofe's example files into this directory"
+    echo "Example files location: $out/share/retrofe/example/"
+
+    while true; do
+        read -p "Do you want to proceed? [yn] " yn
+        case \$yn in
+            [Yy]* ) cp -r --no-preserve=all $out/share/retrofe/example/* .; break;;
+            [Nn]* ) exit;;
+            * ) echo "Please answer with yes or no.";;
+        esac
+    done
+    EOF
+
+    chmod +x $out/bin/retrofe-init
+
+    runHook postInstall
+  '';
+
+  # retrofe will look for config files in its install path ($out/bin).
+  # When set it will use $RETROFE_PATH instead. Sadly this behaviour isn't
+  # documented well. To make it behave more like as expected it's set to
+  # $PWD by default here.
+  postInstall = ''
+    wrapProgram "$out/bin/retrofe" \
+      --prefix GST_PLUGIN_PATH : "$GST_PLUGIN_SYSTEM_PATH_1_0" \
+      --run 'export RETROFE_PATH=''${RETROFE_PATH:-$PWD}'
+  '';
+
+  meta = with lib; {
+    description = "A frontend for arcade cabinets and media PCs";
+    homepage = "http://retrofe.com";
+    license = licenses.gpl3Plus;
+    maintainers = with maintainers; [ hrdinka ];
+    platforms = with platforms; linux;
+  };
+}
diff --git a/nixpkgs/pkgs/misc/emulators/retrofe/include-paths.patch b/nixpkgs/pkgs/misc/emulators/retrofe/include-paths.patch
new file mode 100644
index 000000000000..02eef2594ea6
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/retrofe/include-paths.patch
@@ -0,0 +1,11 @@
+diff -ur RetroFE.1/RetroFE/Source/CMakeLists.txt RetroFE.2/RetroFE/Source/CMakeLists.txt
+--- RetroFE.1/RetroFE/Source/CMakeLists.txt	2016-02-21 14:52:36.726070602 +0100
++++ RetroFE.2/RetroFE/Source/CMakeLists.txt	2016-02-21 14:38:43.036249029 +0100
+@@ -59,6 +59,7 @@
+ set(RETROFE_INCLUDE_DIRS

+ 	"${GLIB2_INCLUDE_DIRS}"

+ 	"${GSTREAMER_INCLUDE_DIRS}"

++	"${GSTREAMER_BASE_INCLUDE_DIRS}"

+ 	"${SDL2_INCLUDE_DIRS}"

+ 	"${SDL2_IMAGE_INCLUDE_DIRS}"

+ 	"${SDL2_MIXER_INCLUDE_DIRS}"

diff --git a/nixpkgs/pkgs/misc/emulators/rpcs3/default.nix b/nixpkgs/pkgs/misc/emulators/rpcs3/default.nix
new file mode 100644
index 000000000000..ecda439e7ab7
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/rpcs3/default.nix
@@ -0,0 +1,54 @@
+{ mkDerivation, lib, fetchgit, cmake, pkg-config, git
+, qtbase, qtquickcontrols, openal, glew, vulkan-headers, vulkan-loader, libpng
+, ffmpeg, libevdev, python3
+, pulseaudioSupport ? true, libpulseaudio
+, waylandSupport ? true, wayland
+, alsaSupport ? true, alsaLib
+}:
+
+let
+  majorVersion = "0.0.12";
+  gitVersion = "10811-a86a3d2fe"; # echo $(git rev-list HEAD --count)-$(git rev-parse --short HEAD)
+in
+mkDerivation {
+  pname = "rpcs3";
+  version = "${majorVersion}-${gitVersion}";
+
+  src = fetchgit {
+    url = "https://github.com/RPCS3/rpcs3";
+    rev = "v${majorVersion}";
+    sha256 = "182rkmbnnlcfzam4bwas7lwv10vqiqvvaw3299a3hariacd7rq8x";
+  };
+
+  preConfigure = ''
+    cat > ./rpcs3/git-version.h <<EOF
+    #define RPCS3_GIT_VERSION "${gitVersion}"
+    #define RPCS3_GIT_FULL_BRANCH "RPCS3/rpcs3/master"
+    #define RPCS3_GIT_BRANCH "HEAD"
+    #define RPCS3_GIT_VERSION_NO_UPDATE 1
+    EOF
+  '';
+
+  cmakeFlags = [
+    "-DUSE_SYSTEM_LIBPNG=ON"
+    "-DUSE_SYSTEM_FFMPEG=ON"
+    "-DUSE_NATIVE_INSTRUCTIONS=OFF"
+  ];
+
+  nativeBuildInputs = [ cmake pkg-config git ];
+
+  buildInputs = [
+    qtbase qtquickcontrols openal glew vulkan-headers vulkan-loader libpng ffmpeg
+    libevdev python3
+  ] ++ lib.optional pulseaudioSupport libpulseaudio
+    ++ lib.optional alsaSupport alsaLib
+    ++ lib.optional waylandSupport wayland;
+
+  meta = with lib; {
+    description = "PS3 emulator/debugger";
+    homepage = "https://rpcs3.net/";
+    maintainers = with maintainers; [ abbradar neonfuz ilian ];
+    license = licenses.gpl2;
+    platforms = [ "x86_64-linux" ];
+  };
+}
diff --git a/nixpkgs/pkgs/misc/emulators/ruffle/default.nix b/nixpkgs/pkgs/misc/emulators/ruffle/default.nix
new file mode 100644
index 000000000000..affbf0af15a9
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/ruffle/default.nix
@@ -0,0 +1,60 @@
+{ alsaLib
+, fetchFromGitHub
+, makeWrapper
+, openssl
+, pkg-config
+, python3
+, rustPlatform
+, lib
+, wayland
+, xorg
+, vulkan-loader
+}:
+
+rustPlatform.buildRustPackage rec {
+  pname = "ruffle";
+  version = "nightly-2021-04-02";
+
+  src = fetchFromGitHub {
+    owner = "ruffle-rs";
+    repo = pname;
+    rev = version;
+    sha256 = "1diz94y53hvii28894zz65aya12v8yw1864lqpkrdbj67yc6ykdj";
+  };
+
+  nativeBuildInputs = [
+    makeWrapper
+    pkg-config
+    python3
+  ];
+
+  buildInputs = [
+    alsaLib
+    openssl
+    wayland
+    xorg.libX11
+    xorg.libXcursor
+    xorg.libXrandr
+    xorg.libXi
+    xorg.libxcb
+    xorg.libXrender
+    vulkan-loader
+  ];
+
+  postInstall = ''
+    # This name is too generic
+    mv $out/bin/exporter $out/bin/ruffle_exporter
+
+    wrapProgram $out/bin/ruffle_desktop --prefix LD_LIBRARY_PATH ':' ${vulkan-loader}/lib
+  '';
+
+  cargoSha256 = "0pnp5kmij4dwwvmgdv81mqcawcjcgg5gd6cpyf0xalyfjgj8i732";
+
+  meta = with lib; {
+    description = "An Adobe Flash Player emulator written in the Rust programming language.";
+    homepage = "https://ruffle.rs/";
+    license = with licenses; [ mit asl20 ];
+    maintainers = with maintainers; [ govanify ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/misc/emulators/ryujinx/default.nix b/nixpkgs/pkgs/misc/emulators/ryujinx/default.nix
new file mode 100644
index 000000000000..8bad6b3cd9e7
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/ryujinx/default.nix
@@ -0,0 +1,112 @@
+{ lib, stdenv, fetchFromGitHub, fetchurl, makeWrapper, makeDesktopItem, linkFarmFromDrvs
+, dotnet-sdk_5, dotnetPackages, dotnetCorePackages, cacert
+, SDL2, libX11, libgdiplus, ffmpeg, openal, libsoundio
+, gtk3, gobject-introspection, gdk-pixbuf, wrapGAppsHook
+}:
+
+let
+  runtimeDeps = [
+    SDL2
+    gtk3
+    libX11
+    libgdiplus
+    ffmpeg
+    openal
+    libsoundio
+  ];
+in stdenv.mkDerivation rec {
+  pname = "ryujinx";
+  version = "1.0.6807"; # Versioning is based off of the official appveyor builds: https://ci.appveyor.com/project/gdkchan/ryujinx
+
+  src = fetchFromGitHub {
+    owner = "Ryujinx";
+    repo = "Ryujinx";
+    rev = "0ee314fb3b9d476d0d207a3595bde24af9c4b69b";
+    sha256 = "1yyjy5qblsdg186hr81qpc07n0cqla67q3hjf2rrzq5pyb10bldy";
+  };
+
+  nativeBuildInputs = [ dotnet-sdk_5 dotnetPackages.Nuget cacert makeWrapper wrapGAppsHook gobject-introspection gdk-pixbuf ];
+
+  nugetDeps = linkFarmFromDrvs "${pname}-nuget-deps" (import ./deps.nix {
+    fetchNuGet = { name, version, sha256 }: fetchurl {
+      name = "nuget-${name}-${version}.nupkg";
+      url = "https://www.nuget.org/api/v2/package/${name}/${version}";
+      inherit sha256;
+    };
+  });
+
+  patches = [
+    ./log.patch # Without this, Ryujinx attempts to write logs to the nix store. This patch makes it write to "~/.config/Ryujinx/Logs" on Linux.
+  ];
+
+  configurePhase = ''
+    runHook preConfigure
+
+    export HOME=$(mktemp -d)
+    export DOTNET_CLI_TELEMETRY_OPTOUT=1
+    export DOTNET_NOLOGO=1
+
+    nuget sources Add -Name nixos -Source "$PWD/nixos"
+    nuget init "$nugetDeps" "$PWD/nixos"
+
+    # FIXME: https://github.com/NuGet/Home/issues/4413
+    mkdir -p $HOME/.nuget/NuGet
+    cp $HOME/.config/NuGet/NuGet.Config $HOME/.nuget/NuGet
+
+    dotnet restore --source "$PWD/nixos" Ryujinx.sln
+
+    runHook postConfigure
+  '';
+
+  buildPhase = ''
+    runHook preBuild
+    dotnet build Ryujinx.sln \
+      --no-restore \
+      --configuration Release \
+      -p:Version=${version}
+    runHook postBuild
+  '';
+
+  installPhase = ''
+    runHook preInstall
+
+    dotnet publish Ryujinx.sln \
+      --no-build \
+      --configuration Release \
+      --no-self-contained \
+      --output $out/lib/ryujinx
+    shopt -s extglob
+
+    makeWrapper $out/lib/ryujinx/Ryujinx $out/bin/Ryujinx \
+      --set DOTNET_ROOT "${dotnetCorePackages.net_5_0}" \
+      --suffix LD_LIBRARY_PATH : "${lib.makeLibraryPath runtimeDeps}" \
+      ''${gappsWrapperArgs[@]}
+
+    for i in 16 32 48 64 96 128 256 512 1024; do
+      install -D ${src}/Ryujinx/Ui/Resources/Logo_Ryujinx.png $out/share/icons/hicolor/''${i}x$i/apps/ryujinx.png
+    done
+    cp -r ${makeDesktopItem {
+      desktopName = "Ryujinx";
+      name = "ryujinx";
+      exec = "Ryujinx";
+      icon = "ryujinx";
+      comment = meta.description;
+      type = "Application";
+      categories = "Game;";
+    }}/share/applications $out/share
+
+    runHook postInstall
+  '';
+
+  # Strip breaks the executable.
+  dontStrip = true;
+
+  meta = with lib; {
+    description = "Experimental Nintendo Switch Emulator written in C#";
+    homepage = "https://ryujinx.org/";
+    license = licenses.mit;
+    maintainers = [ maintainers.ivar ];
+    platforms = [ "x86_64-linux" ];
+  };
+  passthru.updateScript = ./updater.sh;
+}
diff --git a/nixpkgs/pkgs/misc/emulators/ryujinx/deps.nix b/nixpkgs/pkgs/misc/emulators/ryujinx/deps.nix
new file mode 100644
index 000000000000..5e3f1a4944f8
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/ryujinx/deps.nix
@@ -0,0 +1,1127 @@
+{ fetchNuGet }: [
+  (fetchNuGet {
+    name = "AtkSharp";
+    version = "3.22.25.128";
+    sha256 = "0fg01zi7v6127043jzxzihirsdp187pyj83gfa6p79cx763l7z94";
+  })
+  (fetchNuGet {
+    name = "CairoSharp";
+    version = "3.22.25.128";
+    sha256 = "1rjdxd4fq5z3n51qx8vrcaf4i277ccc62jxk88xzbsxapdmjjdf9";
+  })
+  (fetchNuGet {
+    name = "Concentus";
+    version = "1.1.7";
+    sha256 = "0y5z444wrbhlmsqpy2sxmajl1fbf74843lvgj3y6vz260dn2q0l0";
+  })
+  (fetchNuGet {
+    name = "Crc32.NET";
+    version = "1.2.0";
+    sha256 = "0qaj3192k1vfji87zf50rhydn5mrzyzybrs2k4v7ap29k8i0vi5h";
+  })
+  (fetchNuGet {
+    name = "DiscordRichPresence";
+    version = "1.0.166";
+    sha256 = "019rz0br8hamydmdrgzcc6280jfhm4i4ix27jh66a7h37alvdi3a";
+  })
+  (fetchNuGet {
+    name = "FFmpeg.AutoGen";
+    version = "4.3.0";
+    sha256 = "03lb3xzgwxik8nljq87pr1b9bsxbsl3a4kvy0kqkw9f57n29ihvk";
+  })
+  (fetchNuGet {
+    name = "GdkSharp";
+    version = "3.22.25.128";
+    sha256 = "0bmn0ddaw8797pnhpyl03h2zl8i5ha67yv38gly4ydy50az2xhj7";
+  })
+  (fetchNuGet {
+    name = "GioSharp";
+    version = "3.22.25.128";
+    sha256 = "0syfa1f2hg7wsxln5lh86n8m1lihhprc51b6km91gkl25l5hw5bv";
+  })
+  (fetchNuGet {
+    name = "GLibSharp";
+    version = "3.22.25.128";
+    sha256 = "1j8i5izk97ga30z1qpd765zqd2q5w71y8bhnkqq4bj59768fyxp5";
+  })
+  (fetchNuGet {
+    name = "GLWidget";
+    version = "1.0.2";
+    sha256 = "0nb46jiscnsywwdfy7zhx1bw4jfmca3s6l8dhbi99gc4bvp8ar7p";
+  })
+  (fetchNuGet {
+    name = "GtkSharp.Dependencies";
+    version = "1.1.0";
+    sha256 = "1g1rhcn38ww97638rds6l5bysra43hkhv47fy71fvq89623zgyxn";
+  })
+  (fetchNuGet {
+    name = "GtkSharp";
+    version = "3.22.25.128";
+    sha256 = "0z0wx0p3gc02r8d7y88k1rw307sb2vapbr1k1yc5qdc38fxz5jsy";
+  })
+  (fetchNuGet {
+    name = "LibHac";
+    version = "0.12.0";
+    sha256 = "08r9b9cdcbz6339sw8r5dfy2a8iw53df0j3xq9rygkg02xspimld";
+  })
+  (fetchNuGet {
+    name = "Microsoft.AspNetCore.App.Runtime.linux-x64";
+    version = "5.0.0";
+    sha256 = "14njzl0907wzcbsnxl62m4y6mv9pdirm68bj8qbbip0q5a6xgidw";
+  })
+  (fetchNuGet {
+    name = "Microsoft.AspNetCore.App.Runtime.osx-x64";
+    version = "5.0.0";
+    sha256 = "1mmklq1fwq4km9y9jgk63wmwjlarx4npkpvjaiwdzv83vdv104ja";
+  })
+  (fetchNuGet {
+    name = "Microsoft.AspNetCore.App.Runtime.win-x64";
+    version = "5.0.0";
+    sha256 = "0k7q89w3nky4m0j5jsk95c8gczlyp5jl9982gf1hli3gqpl2q4jr";
+  })
+  (fetchNuGet {
+    name = "Microsoft.CodeCoverage";
+    version = "16.8.0";
+    sha256 = "1y05sjk7wgd29a47v1yhn2s1lrd8wgazkilvmjbvivmrrm3fqjs8";
+  })
+  (fetchNuGet {
+    name = "Microsoft.CSharp";
+    version = "4.0.1";
+    sha256 = "0zxc0apx1gcx361jlq8smc9pfdgmyjh6hpka8dypc9w23nlsh6yj";
+  })
+  (fetchNuGet {
+    name = "Microsoft.DotNet.InternalAbstractions";
+    version = "1.0.0";
+    sha256 = "0mp8ihqlb7fsa789frjzidrfjc1lrhk88qp3xm5qvr7vf4wy4z8x";
+  })
+  (fetchNuGet {
+    name = "Microsoft.NET.Test.Sdk";
+    version = "16.8.0";
+    sha256 = "1ln2mva7j2mpsj9rdhpk8vhm3pgd8wn563xqdcwd38avnhp74rm9";
+  })
+  (fetchNuGet {
+    name = "Microsoft.NETCore.App.Host.osx-x64";
+    version = "5.0.0";
+    sha256 = "1nirb155gzn2ws1ayaqspjmjaizw87jq2684mzkn18jv4si0hbpf";
+  })
+  (fetchNuGet {
+    name = "Microsoft.NETCore.App.Host.win-x64";
+    version = "5.0.0";
+    sha256 = "0nghghcapc28ixg21wb30ccjirc9wz83h0y3bn5zyfanxv2m2ypx";
+  })
+  (fetchNuGet {
+    name = "Microsoft.NETCore.App.Runtime.linux-x64";
+    version = "5.0.0";
+    sha256 = "1k9yxklzdnjfkqysg54dz0mr75yg29fhlls9alh5qlfpsfpk32yq";
+  })
+  (fetchNuGet {
+    name = "Microsoft.NETCore.App.Runtime.osx-x64";
+    version = "5.0.0";
+    sha256 = "0lvpf4zz617y94zz3zsmzrg6zcdd6z3z9gz2bd5kq1l8y1pmq77y";
+  })
+  (fetchNuGet {
+    name = "Microsoft.NETCore.App.Runtime.win-x64";
+    version = "5.0.0";
+    sha256 = "1486654z369857h45v73jz8pwr8ibb97fiw5mfm7f01kdbyjdsdd";
+  })
+  (fetchNuGet {
+    name = "Microsoft.NETCore.Platforms";
+    version = "1.0.1";
+    sha256 = "01al6cfxp68dscl15z7rxfw9zvhm64dncsw09a1vmdkacsa2v6lr";
+  })
+  (fetchNuGet {
+    name = "Microsoft.NETCore.Platforms";
+    version = "1.1.0";
+    sha256 = "08vh1r12g6ykjygq5d3vq09zylgb84l63k49jc4v8faw9g93iqqm";
+  })
+  (fetchNuGet {
+    name = "Microsoft.NETCore.Platforms";
+    version = "2.0.0";
+    sha256 = "1fk2fk2639i7nzy58m9dvpdnzql4vb8yl8vr19r2fp8lmj9w2jr0";
+  })
+  (fetchNuGet {
+    name = "Microsoft.NETCore.Platforms";
+    version = "3.1.0";
+    sha256 = "1gc1x8f95wk8yhgznkwsg80adk1lc65v9n5rx4yaa4bc5dva0z3j";
+  })
+  (fetchNuGet {
+    name = "Microsoft.NETCore.Platforms";
+    version = "5.0.0";
+    sha256 = "0mwpwdflidzgzfx2dlpkvvnkgkr2ayaf0s80737h4wa35gaj11rc";
+  })
+  (fetchNuGet {
+    name = "Microsoft.NETCore.Targets";
+    version = "1.0.1";
+    sha256 = "0ppdkwy6s9p7x9jix3v4402wb171cdiibq7js7i13nxpdky7074p";
+  })
+  (fetchNuGet {
+    name = "Microsoft.NETCore.Targets";
+    version = "1.1.0";
+    sha256 = "193xwf33fbm0ni3idxzbr5fdq3i2dlfgihsac9jj7whj0gd902nh";
+  })
+  (fetchNuGet {
+    name = "Microsoft.TestPlatform.ObjectModel";
+    version = "16.8.0";
+    sha256 = "0ii9d88py6mjsxzj9v3zx4izh6rb9ma6s9kj85xmc0xrw7jc2g3m";
+  })
+  (fetchNuGet {
+    name = "Microsoft.TestPlatform.TestHost";
+    version = "16.8.0";
+    sha256 = "1rh8cga1km3jfafkwfjr0dwqrxb4306hf7fipwba9h02w7vlhb9a";
+  })
+  (fetchNuGet {
+    name = "Microsoft.Win32.Primitives";
+    version = "4.0.1";
+    sha256 = "1n8ap0cmljbqskxpf8fjzn7kh1vvlndsa75k01qig26mbw97k2q7";
+  })
+  (fetchNuGet {
+    name = "Microsoft.Win32.Primitives";
+    version = "4.3.0";
+    sha256 = "0j0c1wj4ndj21zsgivsc24whiya605603kxrbiw6wkfdync464wq";
+  })
+  (fetchNuGet {
+    name = "Microsoft.Win32.Registry";
+    version = "4.3.0";
+    sha256 = "1gxyzxam8163vk1kb6xzxjj4iwspjsz9zhgn1w9rjzciphaz0ig7";
+  })
+  (fetchNuGet {
+    name = "Microsoft.Win32.Registry";
+    version = "4.5.0";
+    sha256 = "1zapbz161ji8h82xiajgriq6zgzmb1f3ar517p2h63plhsq5gh2q";
+  })
+  (fetchNuGet {
+    name = "Microsoft.Win32.Registry";
+    version = "4.7.0";
+    sha256 = "0bx21jjbs7l5ydyw4p6cn07chryxpmchq2nl5pirzz4l3b0q4dgs";
+  })
+  (fetchNuGet {
+    name = "Microsoft.Win32.Registry";
+    version = "5.0.0";
+    sha256 = "102hvhq2gmlcbq8y2cb7hdr2dnmjzfp2k3asr1ycwrfacwyaak7n";
+  })
+  (fetchNuGet {
+    name = "Microsoft.Win32.SystemEvents";
+    version = "4.5.0";
+    sha256 = "0fnkv3ky12227zqg4zshx4kw2mvysq2ppxjibfw02cc3iprv4njq";
+  })
+  (fetchNuGet {
+    name = "Microsoft.Win32.SystemEvents";
+    version = "5.0.0";
+    sha256 = "0sja4ba0mrvdamn0r9mhq38b9dxi08yb3c1hzh29n1z6ws1hlrcq";
+  })
+  (fetchNuGet {
+    name = "Mono.Posix.NETStandard";
+    version = "1.0.0";
+    sha256 = "0xlja36hwpjm837haq15mjh2prcf68lyrmn72nvgpz8qnf9vappw";
+  })
+  (fetchNuGet {
+    name = "MsgPack.Cli";
+    version = "1.0.1";
+    sha256 = "1dk2bs3g16lsxcjjm7gfx6jxa4667wccw94jlh2ql7y7smvh9z8r";
+  })
+  (fetchNuGet {
+    name = "NETStandard.Library";
+    version = "1.6.0";
+    sha256 = "0nmmv4yw7gw04ik8ialj3ak0j6pxa9spih67hnn1h2c38ba8h58k";
+  })
+  (fetchNuGet {
+    name = "NETStandard.Library";
+    version = "2.0.0";
+    sha256 = "1bc4ba8ahgk15m8k4nd7x406nhi0kwqzbgjk2dmw52ss553xz7iy";
+  })
+  (fetchNuGet {
+    name = "Newtonsoft.Json";
+    version = "12.0.2";
+    sha256 = "0w2fbji1smd2y7x25qqibf1qrznmv4s6s0jvrbvr6alb7mfyqvh5";
+  })
+  (fetchNuGet {
+    name = "Newtonsoft.Json";
+    version = "9.0.1";
+    sha256 = "0mcy0i7pnfpqm4pcaiyzzji4g0c8i3a5gjz28rrr28110np8304r";
+  })
+  (fetchNuGet {
+    name = "NuGet.Frameworks";
+    version = "5.0.0";
+    sha256 = "18ijvmj13cwjdrrm52c8fpq021531zaz4mj4b4zapxaqzzxf2qjr";
+  })
+  (fetchNuGet {
+    name = "NUnit";
+    version = "3.12.0";
+    sha256 = "1880j2xwavi8f28vxan3hyvdnph4nlh5sbmh285s4lc9l0b7bdk2";
+  })
+  (fetchNuGet {
+    name = "NUnit3TestAdapter";
+    version = "3.17.0";
+    sha256 = "0kxc6z3b8ccdrcyqz88jm5yh5ch9nbg303v67q8sp5hhs8rl8nk6";
+  })
+  (fetchNuGet {
+    name = "OpenTK.NetStandard";
+    version = "1.0.5.32";
+    sha256 = "12y8kg73llmq3zibcp6j3hhiw04g7mqlm1nslmb74gfkzx0b4m9f";
+  })
+  (fetchNuGet {
+    name = "PangoSharp";
+    version = "3.22.25.128";
+    sha256 = "0dkl9j0yd65s5ds9xj5z6yb7yca7wlycqz25m8dng20d13sqr1zp";
+  })
+  (fetchNuGet {
+    name = "runtime.any.System.Collections";
+    version = "4.3.0";
+    sha256 = "0bv5qgm6vr47ynxqbnkc7i797fdi8gbjjxii173syrx14nmrkwg0";
+  })
+  (fetchNuGet {
+    name = "runtime.any.System.Diagnostics.Tools";
+    version = "4.3.0";
+    sha256 = "1wl76vk12zhdh66vmagni66h5xbhgqq7zkdpgw21jhxhvlbcl8pk";
+  })
+  (fetchNuGet {
+    name = "runtime.any.System.Diagnostics.Tracing";
+    version = "4.3.0";
+    sha256 = "00j6nv2xgmd3bi347k00m7wr542wjlig53rmj28pmw7ddcn97jbn";
+  })
+  (fetchNuGet {
+    name = "runtime.any.System.Globalization.Calendars";
+    version = "4.3.0";
+    sha256 = "1ghhhk5psqxcg6w88sxkqrc35bxcz27zbqm2y5p5298pv3v7g201";
+  })
+  (fetchNuGet {
+    name = "runtime.any.System.Globalization";
+    version = "4.3.0";
+    sha256 = "1daqf33hssad94lamzg01y49xwndy2q97i2lrb7mgn28656qia1x";
+  })
+  (fetchNuGet {
+    name = "runtime.any.System.IO";
+    version = "4.3.0";
+    sha256 = "0l8xz8zn46w4d10bcn3l4yyn4vhb3lrj2zw8llvz7jk14k4zps5x";
+  })
+  (fetchNuGet {
+    name = "runtime.any.System.Reflection.Extensions";
+    version = "4.3.0";
+    sha256 = "0zyri97dfc5vyaz9ba65hjj1zbcrzaffhsdlpxc9bh09wy22fq33";
+  })
+  (fetchNuGet {
+    name = "runtime.any.System.Reflection.Primitives";
+    version = "4.3.0";
+    sha256 = "0x1mm8c6iy8rlxm8w9vqw7gb7s1ljadrn049fmf70cyh42vdfhrf";
+  })
+  (fetchNuGet {
+    name = "runtime.any.System.Reflection";
+    version = "4.3.0";
+    sha256 = "02c9h3y35pylc0zfq3wcsvc5nqci95nrkq0mszifc0sjx7xrzkly";
+  })
+  (fetchNuGet {
+    name = "runtime.any.System.Resources.ResourceManager";
+    version = "4.3.0";
+    sha256 = "03kickal0iiby82wa5flar18kyv82s9s6d4xhk5h4bi5kfcyfjzl";
+  })
+  (fetchNuGet {
+    name = "runtime.any.System.Runtime.Handles";
+    version = "4.3.0";
+    sha256 = "0bh5bi25nk9w9xi8z23ws45q5yia6k7dg3i4axhfqlnj145l011x";
+  })
+  (fetchNuGet {
+    name = "runtime.any.System.Runtime.InteropServices";
+    version = "4.3.0";
+    sha256 = "0c3g3g3jmhlhw4klrc86ka9fjbl7i59ds1fadsb2l8nqf8z3kb19";
+  })
+  (fetchNuGet {
+    name = "runtime.any.System.Runtime";
+    version = "4.3.0";
+    sha256 = "1cqh1sv3h5j7ixyb7axxbdkqx6cxy00p4np4j91kpm492rf4s25b";
+  })
+  (fetchNuGet {
+    name = "runtime.any.System.Text.Encoding.Extensions";
+    version = "4.3.0";
+    sha256 = "0lqhgqi0i8194ryqq6v2gqx0fb86db2gqknbm0aq31wb378j7ip8";
+  })
+  (fetchNuGet {
+    name = "runtime.any.System.Text.Encoding";
+    version = "4.3.0";
+    sha256 = "0aqqi1v4wx51h51mk956y783wzags13wa7mgqyclacmsmpv02ps3";
+  })
+  (fetchNuGet {
+    name = "runtime.any.System.Threading.Tasks";
+    version = "4.3.0";
+    sha256 = "03mnvkhskbzxddz4hm113zsch1jyzh2cs450dk3rgfjp8crlw1va";
+  })
+  (fetchNuGet {
+    name = "runtime.any.System.Threading.Timer";
+    version = "4.3.0";
+    sha256 = "0aw4phrhwqz9m61r79vyfl5la64bjxj8l34qnrcwb28v49fg2086";
+  })
+  (fetchNuGet {
+    name = "runtime.debian.8-x64.runtime.native.System.Security.Cryptography.OpenSsl";
+    version = "4.3.0";
+    sha256 = "16rnxzpk5dpbbl1x354yrlsbvwylrq456xzpsha1n9y3glnhyx9d";
+  })
+  (fetchNuGet {
+    name = "runtime.fedora.23-x64.runtime.native.System.Security.Cryptography.OpenSsl";
+    version = "4.3.0";
+    sha256 = "0hkg03sgm2wyq8nqk6dbm9jh5vcq57ry42lkqdmfklrw89lsmr59";
+  })
+  (fetchNuGet {
+    name = "runtime.fedora.24-x64.runtime.native.System.Security.Cryptography.OpenSsl";
+    version = "4.3.0";
+    sha256 = "0c2p354hjx58xhhz7wv6div8xpi90sc6ibdm40qin21bvi7ymcaa";
+  })
+  (fetchNuGet {
+    name = "runtime.native.System.IO.Compression";
+    version = "4.1.0";
+    sha256 = "0d720z4lzyfcabmmnvh0bnj76ll7djhji2hmfh3h44sdkjnlkknk";
+  })
+  (fetchNuGet {
+    name = "runtime.native.System.Net.Http";
+    version = "4.0.1";
+    sha256 = "1hgv2bmbaskx77v8glh7waxws973jn4ah35zysnkxmf0196sfxg6";
+  })
+  (fetchNuGet {
+    name = "runtime.native.System.Security.Cryptography.OpenSsl";
+    version = "4.3.0";
+    sha256 = "18pzfdlwsg2nb1jjjjzyb5qlgy6xjxzmhnfaijq5s2jw3cm3ab97";
+  })
+  (fetchNuGet {
+    name = "runtime.native.System.Security.Cryptography";
+    version = "4.0.0";
+    sha256 = "0k57aa2c3b10wl3hfqbgrl7xq7g8hh3a3ir44b31dn5p61iiw3z9";
+  })
+  (fetchNuGet {
+    name = "runtime.native.System";
+    version = "4.0.0";
+    sha256 = "1ppk69xk59ggacj9n7g6fyxvzmk1g5p4fkijm0d7xqfkig98qrkf";
+  })
+  (fetchNuGet {
+    name = "runtime.native.System";
+    version = "4.3.0";
+    sha256 = "15hgf6zaq9b8br2wi1i3x0zvmk410nlmsmva9p0bbg73v6hml5k4";
+  })
+  (fetchNuGet {
+    name = "runtime.opensuse.13.2-x64.runtime.native.System.Security.Cryptography.OpenSsl";
+    version = "4.3.0";
+    sha256 = "0qyynf9nz5i7pc26cwhgi8j62ps27sqmf78ijcfgzab50z9g8ay3";
+  })
+  (fetchNuGet {
+    name = "runtime.opensuse.42.1-x64.runtime.native.System.Security.Cryptography.OpenSsl";
+    version = "4.3.0";
+    sha256 = "1klrs545awhayryma6l7g2pvnp9xy4z0r1i40r80zb45q3i9nbyf";
+  })
+  (fetchNuGet {
+    name = "runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.OpenSsl";
+    version = "4.3.0";
+    sha256 = "0zcxjv5pckplvkg0r6mw3asggm7aqzbdjimhvsasb0cgm59x09l3";
+  })
+  (fetchNuGet {
+    name = "runtime.rhel.7-x64.runtime.native.System.Security.Cryptography.OpenSsl";
+    version = "4.3.0";
+    sha256 = "0vhynn79ih7hw7cwjazn87rm9z9fj0rvxgzlab36jybgcpcgphsn";
+  })
+  (fetchNuGet {
+    name = "runtime.ubuntu.14.04-x64.runtime.native.System.Security.Cryptography.OpenSsl";
+    version = "4.3.0";
+    sha256 = "160p68l2c7cqmyqjwxydcvgw7lvl1cr0znkw8fp24d1by9mqc8p3";
+  })
+  (fetchNuGet {
+    name = "runtime.ubuntu.16.04-x64.runtime.native.System.Security.Cryptography.OpenSsl";
+    version = "4.3.0";
+    sha256 = "15zrc8fgd8zx28hdghcj5f5i34wf3l6bq5177075m2bc2j34jrqy";
+  })
+  (fetchNuGet {
+    name = "runtime.ubuntu.16.10-x64.runtime.native.System.Security.Cryptography.OpenSsl";
+    version = "4.3.0";
+    sha256 = "1p4dgxax6p7rlgj4q73k73rslcnz4wdcv8q2flg1s8ygwcm58ld5";
+  })
+  (fetchNuGet {
+    name = "runtime.unix.Microsoft.Win32.Primitives";
+    version = "4.3.0";
+    sha256 = "0y61k9zbxhdi0glg154v30kkq7f8646nif8lnnxbvkjpakggd5id";
+  })
+  (fetchNuGet {
+    name = "runtime.unix.System.Console";
+    version = "4.3.0";
+    sha256 = "1pfpkvc6x2if8zbdzg9rnc5fx51yllprl8zkm5npni2k50lisy80";
+  })
+  (fetchNuGet {
+    name = "runtime.unix.System.Diagnostics.Debug";
+    version = "4.3.0";
+    sha256 = "1lps7fbnw34bnh3lm31gs5c0g0dh7548wfmb8zz62v0zqz71msj5";
+  })
+  (fetchNuGet {
+    name = "runtime.unix.System.IO.FileSystem";
+    version = "4.3.0";
+    sha256 = "14nbkhvs7sji5r1saj2x8daz82rnf9kx28d3v2qss34qbr32dzix";
+  })
+  (fetchNuGet {
+    name = "runtime.unix.System.Net.Primitives";
+    version = "4.3.0";
+    sha256 = "0bdnglg59pzx9394sy4ic66kmxhqp8q8bvmykdxcbs5mm0ipwwm4";
+  })
+  (fetchNuGet {
+    name = "runtime.unix.System.Net.Sockets";
+    version = "4.3.0";
+    sha256 = "03npdxzy8gfv035bv1b9rz7c7hv0rxl5904wjz51if491mw0xy12";
+  })
+  (fetchNuGet {
+    name = "runtime.unix.System.Private.Uri";
+    version = "4.3.0";
+    sha256 = "1jx02q6kiwlvfksq1q9qr17fj78y5v6mwsszav4qcz9z25d5g6vk";
+  })
+  (fetchNuGet {
+    name = "runtime.unix.System.Runtime.Extensions";
+    version = "4.3.0";
+    sha256 = "0pnxxmm8whx38dp6yvwgmh22smknxmqs5n513fc7m4wxvs1bvi4p";
+  })
+  (fetchNuGet {
+    name = "runtime.win.Microsoft.Win32.Primitives";
+    version = "4.3.0";
+    sha256 = "0k1h8nnp1s0p8rjwgjyj1387cc1yycv0k22igxc963lqdzrx2z36";
+  })
+  (fetchNuGet {
+    name = "runtime.win.System.Console";
+    version = "4.3.0";
+    sha256 = "0x2yajfrbc5zc6g7nmlr44xpjk6p1hxjq47jn3xki5j7i33zw9jc";
+  })
+  (fetchNuGet {
+    name = "runtime.win.System.Diagnostics.Debug";
+    version = "4.3.0";
+    sha256 = "16fbn4bcynad1ygdq0yk1wmckvs8jvrrf104xa5dc2hlc8y3x58f";
+  })
+  (fetchNuGet {
+    name = "runtime.win.System.IO.FileSystem";
+    version = "4.3.0";
+    sha256 = "1c01nklbxywszsbfaxc76hsz7gdxac3jkphrywfkdsi3v4bwd6g8";
+  })
+  (fetchNuGet {
+    name = "runtime.win.System.Net.Primitives";
+    version = "4.3.0";
+    sha256 = "1dixh195bi7473n17hspll6i562gghdz9m4jk8d4kzi1mlzjk9cf";
+  })
+  (fetchNuGet {
+    name = "runtime.win.System.Net.Sockets";
+    version = "4.3.0";
+    sha256 = "0lr3zki831vs6qhk5wckv2b9qbfk9rcj0ds2926qvj1b9y9m6sck";
+  })
+  (fetchNuGet {
+    name = "runtime.win.System.Runtime.Extensions";
+    version = "4.3.0";
+    sha256 = "1700famsxndccfbcdz9q14qb20p49lax67mqwpgy4gx3vja1yczr";
+  })
+  (fetchNuGet {
+    name = "Ryujinx.Audio.OpenAL.Dependencies";
+    version = "1.21.0.1";
+    sha256 = "0z5k42h252nr60d02p2ww9190d7k1kzrb26vil4ydfhxqqqv6w9l";
+  })
+  (fetchNuGet {
+    name = "Ryujinx.Graphics.Nvdec.Dependencies";
+    version = "4.3.0";
+    sha256 = "0szgbdhyhvzpw8nb9k2ww37p5qipab1pdll8idkk57y5xnl2f7ll";
+  })
+  (fetchNuGet {
+    name = "SharpZipLib";
+    version = "1.3.0";
+    sha256 = "1pizj82wisch28nfdaszwqm9bz19lnl0s5mq8c0zybm2vhnrhvk4";
+  })
+  (fetchNuGet {
+    name = "SixLabors.Fonts";
+    version = "1.0.0-beta0013";
+    sha256 = "0r0aw8xxd32rwcawawcz6asiyggz02hnzg5hvz8gimq8hvwx1wql";
+  })
+  (fetchNuGet {
+    name = "SixLabors.ImageSharp.Drawing";
+    version = "1.0.0-beta11";
+    sha256 = "0hl0rs3kr1zdnx3gdssxgli6fyvmwzcfp99f4db71s0i8j8b2bp5";
+  })
+  (fetchNuGet {
+    name = "SixLabors.ImageSharp";
+    version = "1.0.2";
+    sha256 = "0fhk9sn8k18slfb26wz8mal0j699f7djwhxgv97snz6b10wynfaj";
+  })
+  (fetchNuGet {
+    name = "System.AppContext";
+    version = "4.1.0";
+    sha256 = "0fv3cma1jp4vgj7a8hqc9n7hr1f1kjp541s6z0q1r6nazb4iz9mz";
+  })
+  (fetchNuGet {
+    name = "System.Buffers";
+    version = "4.0.0";
+    sha256 = "13s659bcmg9nwb6z78971z1lr6bmh2wghxi1ayqyzl4jijd351gr";
+  })
+  (fetchNuGet {
+    name = "System.Buffers";
+    version = "4.3.0";
+    sha256 = "0fgns20ispwrfqll4q1zc1waqcmylb3zc50ys9x8zlwxh9pmd9jy";
+  })
+  (fetchNuGet {
+    name = "System.CodeDom";
+    version = "4.4.0";
+    sha256 = "1zgbafm5p380r50ap5iddp11kzhr9khrf2pnai6k593wjar74p1g";
+  })
+  (fetchNuGet {
+    name = "System.CodeDom";
+    version = "5.0.0";
+    sha256 = "14zs2wqkmdlxzj8ikx19n321lsbarx5vl2a8wrachymxn8zb5njh";
+  })
+  (fetchNuGet {
+    name = "System.Collections.Concurrent";
+    version = "4.0.12";
+    sha256 = "07y08kvrzpak873pmyxs129g1ch8l27zmg51pcyj2jvq03n0r0fc";
+  })
+  (fetchNuGet {
+    name = "System.Collections.NonGeneric";
+    version = "4.3.0";
+    sha256 = "07q3k0hf3mrcjzwj8fwk6gv3n51cb513w4mgkfxzm3i37sc9kz7k";
+  })
+  (fetchNuGet {
+    name = "System.Collections.Specialized";
+    version = "4.3.0";
+    sha256 = "1sdwkma4f6j85m3dpb53v9vcgd0zyc9jb33f8g63byvijcj39n20";
+  })
+  (fetchNuGet {
+    name = "System.Collections";
+    version = "4.0.11";
+    sha256 = "1ga40f5lrwldiyw6vy67d0sg7jd7ww6kgwbksm19wrvq9hr0bsm6";
+  })
+  (fetchNuGet {
+    name = "System.Collections";
+    version = "4.3.0";
+    sha256 = "19r4y64dqyrq6k4706dnyhhw7fs24kpp3awak7whzss39dakpxk9";
+  })
+  (fetchNuGet {
+    name = "System.ComponentModel.EventBasedAsync";
+    version = "4.3.0";
+    sha256 = "1rv9bkb8yyhqqqrx6x95njv6mdxlbvv527b44mrd93g8fmgkifl7";
+  })
+  (fetchNuGet {
+    name = "System.ComponentModel.Primitives";
+    version = "4.3.0";
+    sha256 = "1svfmcmgs0w0z9xdw2f2ps05rdxmkxxhf0l17xk9l1l8xfahkqr0";
+  })
+  (fetchNuGet {
+    name = "System.ComponentModel.TypeConverter";
+    version = "4.3.0";
+    sha256 = "17ng0p7v3nbrg3kycz10aqrrlw4lz9hzhws09pfh8gkwicyy481x";
+  })
+  (fetchNuGet {
+    name = "System.ComponentModel";
+    version = "4.3.0";
+    sha256 = "0986b10ww3nshy30x9sjyzm0jx339dkjxjj3401r3q0f6fx2wkcb";
+  })
+  (fetchNuGet {
+    name = "System.Console";
+    version = "4.0.0";
+    sha256 = "0ynxqbc3z1nwbrc11hkkpw9skw116z4y9wjzn7id49p9yi7mzmlf";
+  })
+  (fetchNuGet {
+    name = "System.Diagnostics.Debug";
+    version = "4.0.11";
+    sha256 = "0gmjghrqmlgzxivd2xl50ncbglb7ljzb66rlx8ws6dv8jm0d5siz";
+  })
+  (fetchNuGet {
+    name = "System.Diagnostics.Debug";
+    version = "4.3.0";
+    sha256 = "00yjlf19wjydyr6cfviaph3vsjzg3d5nvnya26i2fvfg53sknh3y";
+  })
+  (fetchNuGet {
+    name = "System.Diagnostics.DiagnosticSource";
+    version = "4.0.0";
+    sha256 = "1n6c3fbz7v8d3pn77h4v5wvsfrfg7v1c57lg3nff3cjyh597v23m";
+  })
+  (fetchNuGet {
+    name = "System.Diagnostics.Process";
+    version = "4.3.0";
+    sha256 = "0g4prsbkygq8m21naqmcp70f24a1ksyix3dihb1r1f71lpi3cfj7";
+  })
+  (fetchNuGet {
+    name = "System.Diagnostics.Tools";
+    version = "4.0.1";
+    sha256 = "19cknvg07yhakcvpxg3cxa0bwadplin6kyxd8mpjjpwnp56nl85x";
+  })
+  (fetchNuGet {
+    name = "System.Diagnostics.Tracing";
+    version = "4.1.0";
+    sha256 = "1d2r76v1x610x61ahfpigda89gd13qydz6vbwzhpqlyvq8jj6394";
+  })
+  (fetchNuGet {
+    name = "System.Diagnostics.Tracing";
+    version = "4.3.0";
+    sha256 = "1m3bx6c2s958qligl67q7grkwfz3w53hpy7nc97mh6f7j5k168c4";
+  })
+  (fetchNuGet {
+    name = "System.Drawing.Common";
+    version = "4.5.0";
+    sha256 = "0knqa0zsm91nfr34br8gx5kjqq4v81zdhqkacvs2hzc8nqk0ddhc";
+  })
+  (fetchNuGet {
+    name = "System.Drawing.Common";
+    version = "5.0.1";
+    sha256 = "14h722wq58k1wmgxmpws91xc7kh8109ijw0hcxjq9qkbhbi6pwmb";
+  })
+  (fetchNuGet {
+    name = "System.Dynamic.Runtime";
+    version = "4.0.11";
+    sha256 = "1pla2dx8gkidf7xkciig6nifdsb494axjvzvann8g2lp3dbqasm9";
+  })
+  (fetchNuGet {
+    name = "System.Globalization.Calendars";
+    version = "4.0.1";
+    sha256 = "0bv0alrm2ck2zk3rz25lfyk9h42f3ywq77mx1syl6vvyncnpg4qh";
+  })
+  (fetchNuGet {
+    name = "System.Globalization.Extensions";
+    version = "4.0.1";
+    sha256 = "0hjhdb5ri8z9l93bw04s7ynwrjrhx2n0p34sf33a9hl9phz69fyc";
+  })
+  (fetchNuGet {
+    name = "System.Globalization.Extensions";
+    version = "4.3.0";
+    sha256 = "02a5zfxavhv3jd437bsncbhd2fp1zv4gxzakp1an9l6kdq1mcqls";
+  })
+  (fetchNuGet {
+    name = "System.Globalization";
+    version = "4.0.11";
+    sha256 = "070c5jbas2v7smm660zaf1gh0489xanjqymkvafcs4f8cdrs1d5d";
+  })
+  (fetchNuGet {
+    name = "System.Globalization";
+    version = "4.3.0";
+    sha256 = "1cp68vv683n6ic2zqh2s1fn4c2sd87g5hpp6l4d4nj4536jz98ki";
+  })
+  (fetchNuGet {
+    name = "System.IO.Compression.ZipFile";
+    version = "4.0.1";
+    sha256 = "0h72znbagmgvswzr46mihn7xm7chfk2fhrp5krzkjf29pz0i6z82";
+  })
+  (fetchNuGet {
+    name = "System.IO.Compression";
+    version = "4.1.0";
+    sha256 = "0iym7s3jkl8n0vzm3jd6xqg9zjjjqni05x45dwxyjr2dy88hlgji";
+  })
+  (fetchNuGet {
+    name = "System.IO.FileSystem.Primitives";
+    version = "4.0.1";
+    sha256 = "1s0mniajj3lvbyf7vfb5shp4ink5yibsx945k6lvxa96r8la1612";
+  })
+  (fetchNuGet {
+    name = "System.IO.FileSystem.Primitives";
+    version = "4.3.0";
+    sha256 = "0j6ndgglcf4brg2lz4wzsh1av1gh8xrzdsn9f0yznskhqn1xzj9c";
+  })
+  (fetchNuGet {
+    name = "System.IO.FileSystem";
+    version = "4.0.1";
+    sha256 = "0kgfpw6w4djqra3w5crrg8xivbanh1w9dh3qapb28q060wb9flp1";
+  })
+  (fetchNuGet {
+    name = "System.IO.FileSystem";
+    version = "4.3.0";
+    sha256 = "0z2dfrbra9i6y16mm9v1v6k47f0fm617vlb7s5iybjjsz6g1ilmw";
+  })
+  (fetchNuGet {
+    name = "System.IO";
+    version = "4.1.0";
+    sha256 = "1g0yb8p11vfd0kbkyzlfsbsp5z44lwsvyc0h3dpw6vqnbi035ajp";
+  })
+  (fetchNuGet {
+    name = "System.IO";
+    version = "4.3.0";
+    sha256 = "05l9qdrzhm4s5dixmx68kxwif4l99ll5gqmh7rqgw554fx0agv5f";
+  })
+  (fetchNuGet {
+    name = "System.Linq.Expressions";
+    version = "4.1.0";
+    sha256 = "1gpdxl6ip06cnab7n3zlcg6mqp7kknf73s8wjinzi4p0apw82fpg";
+  })
+  (fetchNuGet {
+    name = "System.Linq";
+    version = "4.1.0";
+    sha256 = "1ppg83svb39hj4hpp5k7kcryzrf3sfnm08vxd5sm2drrijsla2k5";
+  })
+  (fetchNuGet {
+    name = "System.Linq";
+    version = "4.3.0";
+    sha256 = "1w0gmba695rbr80l1k2h4mrwzbzsyfl2z4klmpbsvsg5pm4a56s7";
+  })
+  (fetchNuGet {
+    name = "System.Management";
+    version = "5.0.0";
+    sha256 = "09hyv3p0zd549577clydlb2szl84m4gvdjnsry73n8b12ja7d75s";
+  })
+  (fetchNuGet {
+    name = "System.Net.Http";
+    version = "4.1.0";
+    sha256 = "1i5rqij1icg05j8rrkw4gd4pgia1978mqhjzhsjg69lvwcdfg8yb";
+  })
+  (fetchNuGet {
+    name = "System.Net.NameResolution";
+    version = "4.3.0";
+    sha256 = "15r75pwc0rm3vvwsn8rvm2krf929mjfwliv0mpicjnii24470rkq";
+  })
+  (fetchNuGet {
+    name = "System.Net.Primitives";
+    version = "4.0.11";
+    sha256 = "10xzzaynkzkakp7jai1ik3r805zrqjxiz7vcagchyxs2v26a516r";
+  })
+  (fetchNuGet {
+    name = "System.Net.Sockets";
+    version = "4.1.0";
+    sha256 = "1385fvh8h29da5hh58jm1v78fzi9fi5vj93vhlm2kvqpfahvpqls";
+  })
+  (fetchNuGet {
+    name = "System.Numerics.Vectors";
+    version = "4.3.0";
+    sha256 = "05kji1mv4sl75iwmc613p873145nynm02xiajx8pn0h2kx53d23s";
+  })
+  (fetchNuGet {
+    name = "System.Numerics.Vectors";
+    version = "4.5.0";
+    sha256 = "1kzrj37yzawf1b19jq0253rcs8hsq1l2q8g69d7ipnhzb0h97m59";
+  })
+  (fetchNuGet {
+    name = "System.ObjectModel";
+    version = "4.0.12";
+    sha256 = "1sybkfi60a4588xn34nd9a58png36i0xr4y4v4kqpg8wlvy5krrj";
+  })
+  (fetchNuGet {
+    name = "System.Private.Uri";
+    version = "4.3.0";
+    sha256 = "04r1lkdnsznin0fj4ya1zikxiqr0h6r6a1ww2dsm60gqhdrf0mvx";
+  })
+  (fetchNuGet {
+    name = "System.Reflection.Emit.ILGeneration";
+    version = "4.0.1";
+    sha256 = "1pcd2ig6bg144y10w7yxgc9d22r7c7ww7qn1frdfwgxr24j9wvv0";
+  })
+  (fetchNuGet {
+    name = "System.Reflection.Emit.ILGeneration";
+    version = "4.3.0";
+    sha256 = "0w1n67glpv8241vnpz1kl14sy7zlnw414aqwj4hcx5nd86f6994q";
+  })
+  (fetchNuGet {
+    name = "System.Reflection.Emit.Lightweight";
+    version = "4.0.1";
+    sha256 = "1s4b043zdbx9k39lfhvsk68msv1nxbidhkq6nbm27q7sf8xcsnxr";
+  })
+  (fetchNuGet {
+    name = "System.Reflection.Emit.Lightweight";
+    version = "4.3.0";
+    sha256 = "0ql7lcakycrvzgi9kxz1b3lljd990az1x6c4jsiwcacrvimpib5c";
+  })
+  (fetchNuGet {
+    name = "System.Reflection.Emit";
+    version = "4.0.1";
+    sha256 = "0ydqcsvh6smi41gyaakglnv252625hf29f7kywy2c70nhii2ylqp";
+  })
+  (fetchNuGet {
+    name = "System.Reflection.Emit";
+    version = "4.3.0";
+    sha256 = "11f8y3qfysfcrscjpjym9msk7lsfxkk4fmz9qq95kn3jd0769f74";
+  })
+  (fetchNuGet {
+    name = "System.Reflection.Extensions";
+    version = "4.0.1";
+    sha256 = "0m7wqwq0zqq9gbpiqvgk3sr92cbrw7cp3xn53xvw7zj6rz6fdirn";
+  })
+  (fetchNuGet {
+    name = "System.Reflection.Extensions";
+    version = "4.3.0";
+    sha256 = "02bly8bdc98gs22lqsfx9xicblszr2yan7v2mmw3g7hy6miq5hwq";
+  })
+  (fetchNuGet {
+    name = "System.Reflection.Primitives";
+    version = "4.0.1";
+    sha256 = "1bangaabhsl4k9fg8khn83wm6yial8ik1sza7401621jc6jrym28";
+  })
+  (fetchNuGet {
+    name = "System.Reflection.Primitives";
+    version = "4.3.0";
+    sha256 = "04xqa33bld78yv5r93a8n76shvc8wwcdgr1qvvjh959g3rc31276";
+  })
+  (fetchNuGet {
+    name = "System.Reflection.TypeExtensions";
+    version = "4.1.0";
+    sha256 = "1bjli8a7sc7jlxqgcagl9nh8axzfl11f4ld3rjqsyxc516iijij7";
+  })
+  (fetchNuGet {
+    name = "System.Reflection.TypeExtensions";
+    version = "4.3.0";
+    sha256 = "0y2ssg08d817p0vdag98vn238gyrrynjdj4181hdg780sif3ykp1";
+  })
+  (fetchNuGet {
+    name = "System.Reflection";
+    version = "4.1.0";
+    sha256 = "1js89429pfw79mxvbzp8p3q93il6rdff332hddhzi5wqglc4gml9";
+  })
+  (fetchNuGet {
+    name = "System.Reflection";
+    version = "4.3.0";
+    sha256 = "0xl55k0mw8cd8ra6dxzh974nxif58s3k1rjv1vbd7gjbjr39j11m";
+  })
+  (fetchNuGet {
+    name = "System.Resources.ResourceManager";
+    version = "4.0.1";
+    sha256 = "0b4i7mncaf8cnai85jv3wnw6hps140cxz8vylv2bik6wyzgvz7bi";
+  })
+  (fetchNuGet {
+    name = "System.Resources.ResourceManager";
+    version = "4.3.0";
+    sha256 = "0sjqlzsryb0mg4y4xzf35xi523s4is4hz9q4qgdvlvgivl7qxn49";
+  })
+  (fetchNuGet {
+    name = "System.Runtime.CompilerServices.Unsafe";
+    version = "4.7.0";
+    sha256 = "16r6sn4czfjk8qhnz7bnqlyiaaszr0ihinb7mq9zzr1wba257r54";
+  })
+  (fetchNuGet {
+    name = "System.Runtime.CompilerServices.Unsafe";
+    version = "5.0.0-preview.7.20364.11";
+    sha256 = "19sl184f6rjhfsizq0vapysazd6yd66lf638rszvrdhqlsxssz2m";
+  })
+  (fetchNuGet {
+    name = "System.Runtime.Extensions";
+    version = "4.1.0";
+    sha256 = "0rw4rm4vsm3h3szxp9iijc3ksyviwsv6f63dng3vhqyg4vjdkc2z";
+  })
+  (fetchNuGet {
+    name = "System.Runtime.Extensions";
+    version = "4.3.0";
+    sha256 = "1ykp3dnhwvm48nap8q23893hagf665k0kn3cbgsqpwzbijdcgc60";
+  })
+  (fetchNuGet {
+    name = "System.Runtime.Handles";
+    version = "4.0.1";
+    sha256 = "1g0zrdi5508v49pfm3iii2hn6nm00bgvfpjq1zxknfjrxxa20r4g";
+  })
+  (fetchNuGet {
+    name = "System.Runtime.Handles";
+    version = "4.3.0";
+    sha256 = "0sw2gfj2xr7sw9qjn0j3l9yw07x73lcs97p8xfc9w1x9h5g5m7i8";
+  })
+  (fetchNuGet {
+    name = "System.Runtime.InteropServices.RuntimeInformation";
+    version = "4.0.0";
+    sha256 = "0glmvarf3jz5xh22iy3w9v3wyragcm4hfdr17v90vs7vcrm7fgp6";
+  })
+  (fetchNuGet {
+    name = "System.Runtime.InteropServices.RuntimeInformation";
+    version = "4.3.0";
+    sha256 = "0q18r1sh4vn7bvqgd6dmqlw5v28flbpj349mkdish2vjyvmnb2ii";
+  })
+  (fetchNuGet {
+    name = "System.Runtime.InteropServices";
+    version = "4.1.0";
+    sha256 = "01kxqppx3dr3b6b286xafqilv4s2n0gqvfgzfd4z943ga9i81is1";
+  })
+  (fetchNuGet {
+    name = "System.Runtime.InteropServices";
+    version = "4.3.0";
+    sha256 = "00hywrn4g7hva1b2qri2s6rabzwgxnbpw9zfxmz28z09cpwwgh7j";
+  })
+  (fetchNuGet {
+    name = "System.Runtime.Numerics";
+    version = "4.0.1";
+    sha256 = "1y308zfvy0l5nrn46mqqr4wb4z1xk758pkk8svbz8b5ij7jnv4nn";
+  })
+  (fetchNuGet {
+    name = "System.Runtime.Serialization.Primitives";
+    version = "4.1.1";
+    sha256 = "042rfjixknlr6r10vx2pgf56yming8lkjikamg3g4v29ikk78h7k";
+  })
+  (fetchNuGet {
+    name = "System.Runtime";
+    version = "4.1.0";
+    sha256 = "02hdkgk13rvsd6r9yafbwzss8kr55wnj8d5c7xjnp8gqrwc8sn0m";
+  })
+  (fetchNuGet {
+    name = "System.Runtime";
+    version = "4.3.0";
+    sha256 = "066ixvgbf2c929kgknshcxqj6539ax7b9m570cp8n179cpfkapz7";
+  })
+  (fetchNuGet {
+    name = "System.Security.AccessControl";
+    version = "4.5.0";
+    sha256 = "1wvwanz33fzzbnd2jalar0p0z3x0ba53vzx1kazlskp7pwyhlnq0";
+  })
+  (fetchNuGet {
+    name = "System.Security.AccessControl";
+    version = "4.7.0";
+    sha256 = "0n0k0w44flkd8j0xw7g3g3vhw7dijfm51f75xkm1qxnbh4y45mpz";
+  })
+  (fetchNuGet {
+    name = "System.Security.AccessControl";
+    version = "5.0.0";
+    sha256 = "17n3lrrl6vahkqmhlpn3w20afgz09n7i6rv0r3qypngwi7wqdr5r";
+  })
+  (fetchNuGet {
+    name = "System.Security.Claims";
+    version = "4.3.0";
+    sha256 = "0jvfn7j22l3mm28qjy3rcw287y9h65ha4m940waaxah07jnbzrhn";
+  })
+  (fetchNuGet {
+    name = "System.Security.Cryptography.Algorithms";
+    version = "4.2.0";
+    sha256 = "148s9g5dgm33ri7dnh19s4lgnlxbpwvrw2jnzllq2kijj4i4vs85";
+  })
+  (fetchNuGet {
+    name = "System.Security.Cryptography.Cng";
+    version = "4.2.0";
+    sha256 = "118jijz446kix20blxip0f0q8mhsh9bz118mwc2ch1p6g7facpzc";
+  })
+  (fetchNuGet {
+    name = "System.Security.Cryptography.Csp";
+    version = "4.0.0";
+    sha256 = "1cwv8lqj8r15q81d2pz2jwzzbaji0l28xfrpw29kdpsaypm92z2q";
+  })
+  (fetchNuGet {
+    name = "System.Security.Cryptography.Encoding";
+    version = "4.0.0";
+    sha256 = "0a8y1a5wkmpawc787gfmnrnbzdgxmx1a14ax43jf3rj9gxmy3vk4";
+  })
+  (fetchNuGet {
+    name = "System.Security.Cryptography.OpenSsl";
+    version = "4.0.0";
+    sha256 = "16sx3cig3d0ilvzl8xxgffmxbiqx87zdi8fc73i3i7zjih1a7f4q";
+  })
+  (fetchNuGet {
+    name = "System.Security.Cryptography.Primitives";
+    version = "4.0.0";
+    sha256 = "0i7cfnwph9a10bm26m538h5xcr8b36jscp9sy1zhgifksxz4yixh";
+  })
+  (fetchNuGet {
+    name = "System.Security.Cryptography.X509Certificates";
+    version = "4.1.0";
+    sha256 = "0clg1bv55mfv5dq00m19cp634zx6inm31kf8ppbq1jgyjf2185dh";
+  })
+  (fetchNuGet {
+    name = "System.Security.Principal.Windows";
+    version = "4.3.0";
+    sha256 = "00a0a7c40i3v4cb20s2cmh9csb5jv2l0frvnlzyfxh848xalpdwr";
+  })
+  (fetchNuGet {
+    name = "System.Security.Principal.Windows";
+    version = "4.5.0";
+    sha256 = "0rmj89wsl5yzwh0kqjgx45vzf694v9p92r4x4q6yxldk1cv1hi86";
+  })
+  (fetchNuGet {
+    name = "System.Security.Principal.Windows";
+    version = "4.7.0";
+    sha256 = "1a56ls5a9sr3ya0nr086sdpa9qv0abv31dd6fp27maqa9zclqq5d";
+  })
+  (fetchNuGet {
+    name = "System.Security.Principal.Windows";
+    version = "5.0.0";
+    sha256 = "1mpk7xj76lxgz97a5yg93wi8lj0l8p157a5d50mmjy3gbz1904q8";
+  })
+  (fetchNuGet {
+    name = "System.Security.Principal";
+    version = "4.3.0";
+    sha256 = "12cm2zws06z4lfc4dn31iqv7072zyi4m910d4r6wm8yx85arsfxf";
+  })
+  (fetchNuGet {
+    name = "System.Text.Encoding.Extensions";
+    version = "4.0.11";
+    sha256 = "08nsfrpiwsg9x5ml4xyl3zyvjfdi4mvbqf93kjdh11j4fwkznizs";
+  })
+  (fetchNuGet {
+    name = "System.Text.Encoding.Extensions";
+    version = "4.3.0";
+    sha256 = "11q1y8hh5hrp5a3kw25cb6l00v5l5dvirkz8jr3sq00h1xgcgrxy";
+  })
+  (fetchNuGet {
+    name = "System.Text.Encoding";
+    version = "4.0.11";
+    sha256 = "1dyqv0hijg265dwxg6l7aiv74102d6xjiwplh2ar1ly6xfaa4iiw";
+  })
+  (fetchNuGet {
+    name = "System.Text.Encoding";
+    version = "4.3.0";
+    sha256 = "1f04lkir4iladpp51sdgmis9dj4y8v08cka0mbmsy0frc9a4gjqr";
+  })
+  (fetchNuGet {
+    name = "System.Text.RegularExpressions";
+    version = "4.1.0";
+    sha256 = "1mw7vfkkyd04yn2fbhm38msk7dz2xwvib14ygjsb8dq2lcvr18y7";
+  })
+  (fetchNuGet {
+    name = "System.Text.RegularExpressions";
+    version = "4.3.0";
+    sha256 = "1bgq51k7fwld0njylfn7qc5fmwrk2137gdq7djqdsw347paa9c2l";
+  })
+  (fetchNuGet {
+    name = "System.Threading.Overlapped";
+    version = "4.3.0";
+    sha256 = "1nahikhqh9nk756dh8p011j36rlcp1bzz3vwi2b4m1l2s3vz8idm";
+  })
+  (fetchNuGet {
+    name = "System.Threading.Tasks.Extensions";
+    version = "4.0.0";
+    sha256 = "1cb51z062mvc2i8blpzmpn9d9mm4y307xrwi65di8ri18cz5r1zr";
+  })
+  (fetchNuGet {
+    name = "System.Threading.Tasks.Extensions";
+    version = "4.3.0";
+    sha256 = "1xxcx2xh8jin360yjwm4x4cf5y3a2bwpn2ygkfkwkicz7zk50s2z";
+  })
+  (fetchNuGet {
+    name = "System.Threading.Tasks";
+    version = "4.0.11";
+    sha256 = "0nr1r41rak82qfa5m0lhk9mp0k93bvfd7bbd9sdzwx9mb36g28p5";
+  })
+  (fetchNuGet {
+    name = "System.Threading.Tasks";
+    version = "4.3.0";
+    sha256 = "134z3v9abw3a6jsw17xl3f6hqjpak5l682k2vz39spj4kmydg6k7";
+  })
+  (fetchNuGet {
+    name = "System.Threading.Thread";
+    version = "4.3.0";
+    sha256 = "0y2xiwdfcph7znm2ysxanrhbqqss6a3shi1z3c779pj2s523mjx4";
+  })
+  (fetchNuGet {
+    name = "System.Threading.ThreadPool";
+    version = "4.3.0";
+    sha256 = "027s1f4sbx0y1xqw2irqn6x161lzj8qwvnh2gn78ciiczdv10vf1";
+  })
+  (fetchNuGet {
+    name = "System.Threading.Timer";
+    version = "4.0.1";
+    sha256 = "15n54f1f8nn3mjcjrlzdg6q3520571y012mx7v991x2fvp73lmg6";
+  })
+  (fetchNuGet {
+    name = "System.Threading";
+    version = "4.0.11";
+    sha256 = "19x946h926bzvbsgj28csn46gak2crv2skpwsx80hbgazmkgb1ls";
+  })
+  (fetchNuGet {
+    name = "System.Threading";
+    version = "4.3.0";
+    sha256 = "0rw9wfamvhayp5zh3j7p1yfmx9b5khbf4q50d8k5rk993rskfd34";
+  })
+  (fetchNuGet {
+    name = "System.Xml.ReaderWriter";
+    version = "4.0.11";
+    sha256 = "0c6ky1jk5ada9m94wcadih98l6k1fvf6vi7vhn1msjixaha419l5";
+  })
+  (fetchNuGet {
+    name = "System.Xml.ReaderWriter";
+    version = "4.3.0";
+    sha256 = "0c47yllxifzmh8gq6rq6l36zzvw4kjvlszkqa9wq3fr59n0hl3s1";
+  })
+  (fetchNuGet {
+    name = "System.Xml.XDocument";
+    version = "4.0.11";
+    sha256 = "0n4lvpqzy9kc7qy1a4acwwd7b7pnvygv895az5640idl2y9zbz18";
+  })
+  (fetchNuGet {
+    name = "System.Xml.XmlDocument";
+    version = "4.3.0";
+    sha256 = "0bmz1l06dihx52jxjr22dyv5mxv6pj4852lx68grjm7bivhrbfwi";
+  })
+  (fetchNuGet {
+    name = "System.Xml.XPath.XmlDocument";
+    version = "4.3.0";
+    sha256 = "1h9lh7qkp0lff33z847sdfjj8yaz98ylbnkbxlnsbflhj9xyfqrm";
+  })
+  (fetchNuGet {
+    name = "System.Xml.XPath";
+    version = "4.3.0";
+    sha256 = "1cv2m0p70774a0sd1zxc8fm8jk3i5zk2bla3riqvi8gsm0r4kpci";
+  })
+]
diff --git a/nixpkgs/pkgs/misc/emulators/ryujinx/log.patch b/nixpkgs/pkgs/misc/emulators/ryujinx/log.patch
new file mode 100644
index 000000000000..7283ef9e7d5d
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/ryujinx/log.patch
@@ -0,0 +1,13 @@
+diff --git a/Ryujinx.Common/Configuration/LoggerModule.cs b/Ryujinx.Common/Configuration/LoggerModule.cs
+index 20c0fb46..534576bc 100644
+--- a/Ryujinx.Common/Configuration/LoggerModule.cs
++++ b/Ryujinx.Common/Configuration/LoggerModule.cs
+@@ -75,7 +75,7 @@ namespace Ryujinx.Configuration
+             if (e.NewValue)
+             {
+                 Logger.AddTarget(new AsyncLogTargetWrapper(
+-                    new FileLogTarget(AppDomain.CurrentDomain.BaseDirectory, "file"),
++                    new FileLogTarget(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "Ryujinx"), "file"),
+                     1000,
+                     AsyncLogTargetOverflowAction.Block
+                 ));
diff --git a/nixpkgs/pkgs/misc/emulators/ryujinx/updater.sh b/nixpkgs/pkgs/misc/emulators/ryujinx/updater.sh
new file mode 100755
index 000000000000..a2f47baa067b
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/ryujinx/updater.sh
@@ -0,0 +1,67 @@
+#! /usr/bin/env nix-shell
+#! nix-shell -i bash -p coreutils gnused curl common-updater-scripts nix-prefetch-git jq dotnet-sdk_5
+set -eo pipefail
+cd "$(dirname "${BASH_SOURCE[0]}")"
+
+deps_file="$(realpath "./deps.nix")"
+
+nix-prefetch-git https://github.com/ryujinx/ryujinx --quiet > repo_info
+new_hash="$(jq -r ".sha256" < repo_info)"
+new_rev="$(jq -r ".rev" < repo_info)"
+rm repo_info
+
+new_version="$(
+    curl -s https://ci.appveyor.com/api/projects/gdkchan/ryujinx/branch/master \
+        | grep -Po '"version":.*?[^\\]",' \
+        | sed  's/"version":"\(.*\)",/\1/'
+    )"
+old_version="$(sed -nE 's/\s*version = "(.*)".*/\1/p' ./default.nix)"
+
+if [[ "$new_version" == "$old_version" ]]; then
+  echo "Already up to date! Doing nothing"
+  exit 0
+fi
+
+cd ../../../..
+update-source-version ryujinx "$new_version" "$new_hash" --rev="$new_rev"
+
+store_src="$(nix-build . -A ryujinx.src --no-out-link)"
+src="$(mktemp -d /tmp/ryujinx-src.XXX)"
+cp -rT "$store_src" "$src"
+chmod -R +w "$src"
+pushd "$src"
+
+# Setup empty nuget package folder to force reinstall.
+mkdir ./nuget_tmp.packages
+cat >./nuget_tmp.config <<EOF
+<?xml version="1.0" encoding="utf-8"?>
+<configuration>
+  <packageSources>
+    <add key="nuget" value="https://api.nuget.org/v3/index.json" />
+  </packageSources>
+  <config>
+    <add key="globalPackagesFolder" value="$(realpath ./nuget_tmp.packages)" />
+  </config>
+</configuration>
+EOF
+
+dotnet restore Ryujinx.sln --configfile ./nuget_tmp.config
+
+echo "{ fetchNuGet }: [" >"$deps_file"
+while read pkg_spec; do
+  { read pkg_name; read pkg_version; } < <(
+    # Build version part should be ignored: `3.0.0-beta2.20059.3+77df2220` -> `3.0.0-beta2.20059.3`
+    sed -nE 's/.*<id>([^<]*).*/\1/p; s/.*<version>([^<+]*).*/\1/p' "$pkg_spec")
+  pkg_sha256="$(nix-hash --type sha256 --flat --base32 "$(dirname "$pkg_spec")"/*.nupkg)"
+  cat >>"$deps_file" <<EOF
+  (fetchNuGet {
+    name = "$pkg_name";
+    version = "$pkg_version";
+    sha256 = "$pkg_sha256";
+  })
+EOF
+done < <(find ./nuget_tmp.packages -name '*.nuspec' | sort)
+echo "]" >>"$deps_file"
+
+popd
+rm -r "$src"
diff --git a/nixpkgs/pkgs/misc/emulators/sameboy/default.nix b/nixpkgs/pkgs/misc/emulators/sameboy/default.nix
new file mode 100644
index 000000000000..ee91a010df77
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/sameboy/default.nix
@@ -0,0 +1,48 @@
+{ lib, stdenv, fetchFromGitHub, gtk3, rgbds, SDL2, wrapGAppsHook, glib }:
+
+stdenv.mkDerivation rec {
+  pname = "sameboy";
+  version = "0.14.2";
+
+  src = fetchFromGitHub {
+    owner = "LIJI32";
+    repo = "SameBoy";
+    rev = "v${version}";
+    sha256 = "sha256-VGyB0Em9VFU1Z1K2XfbS9wGs6gZ8/eH/FiaFAKnFdaA=";
+  };
+
+  enableParallelBuilding = true;
+  # glib and wrapGAppsHook are needed to make the Open ROM menu work.
+  nativeBuildInputs = [ rgbds glib wrapGAppsHook ];
+  buildInputs = [ SDL2 ];
+
+  makeFlags = [
+    "CONF=release"
+    "FREEDESKTOP=true"
+    "PREFIX=$(out)"
+  ];
+
+  postPatch = ''
+    substituteInPlace OpenDialog/gtk.c \
+      --replace '"libgtk-3.so"' '"${gtk3}/lib/libgtk-3.so"'
+  '';
+
+  meta = with lib; {
+    homepage = "https://sameboy.github.io";
+    description = "Game Boy, Game Boy Color, and Super Game Boy emulator";
+
+    longDescription = ''
+      SameBoy is a user friendly Game Boy, Game Boy Color and Super
+      Game Boy emulator for macOS, Windows and Unix-like platforms.
+      SameBoy is extremely accurate and includes a wide range of
+      powerful debugging features, making it ideal for both casual
+      players and developers. In addition to accuracy and developer
+      capabilities, SameBoy has all the features one would expect from
+      an emulator – from save states to scaling filters.
+    '';
+
+    license = licenses.mit;
+    maintainers = with maintainers; [ NieDzejkob ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/misc/emulators/simh/default.nix b/nixpkgs/pkgs/misc/emulators/simh/default.nix
new file mode 100644
index 000000000000..1e939538cda3
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/simh/default.nix
@@ -0,0 +1,62 @@
+{ lib, stdenv
+, fetchFromGitHub
+, SDL2
+, SDL2_ttf
+, libpcap
+, vde2
+, pcre
+}:
+
+stdenv.mkDerivation rec {
+  pname = "simh";
+  version = "3.11-1";
+
+  src = fetchFromGitHub {
+    owner = "simh";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "sha256-65+YfOWpVXPeT64TZcSaWJY+ODQ0q/pwF9jb8xGdpIs=";
+  };
+
+  buildInputs = [ SDL2 SDL2_ttf libpcap vde2 pcre ];
+
+  dontConfigure = true;
+
+  makeFlags = [ "GCC=${stdenv.cc.targetPrefix}cc" "CC_STD=-std=c99" "LDFLAGS=-lm" ];
+
+  preInstall = ''
+    install -d ${placeholder "out"}/bin
+    install -d ${placeholder "out"}/share/simh
+  '';
+
+  installPhase = ''
+    runHook preInstall
+    for i in BIN/*; do
+      install -D $i ${placeholder "out"}/bin
+    done
+    for i in VAX/*bin; do
+      install -D $i ${placeholder "out"}/share/simh
+    done
+    runHook postInstall
+  '';
+
+  postInstall = ''
+    (cd $out/bin; for i in *; do ln -s $i simh-$i; done)
+  '';
+
+  meta = with lib; {
+    homepage = "http://simh.trailing-edge.com/";
+    description = "A collection of simulators of historic hardware";
+    longDescription = ''
+      SimH (History Simulator) is a collection of simulators for historically
+      significant or just plain interesting computer hardware and software from
+      the past. The goal of the project is to create highly portable system
+      simulators and to publish them as freeware on the Internet, with freely
+      available copies of significant or representative software.
+    '';
+    license = with licenses; mit;
+    maintainers = with maintainers; [ AndersonTorres ];
+    platforms = with platforms; unix;
+  };
+}
+# TODO: install documentation
diff --git a/nixpkgs/pkgs/misc/emulators/simplenes/default.nix b/nixpkgs/pkgs/misc/emulators/simplenes/default.nix
new file mode 100644
index 000000000000..d073098507ee
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/simplenes/default.nix
@@ -0,0 +1,33 @@
+{ lib, stdenv
+, fetchFromGitHub
+, cmake
+, sfml
+}:
+
+stdenv.mkDerivation rec {
+  pname = "simplenes";
+  version = "unstable-2019-03-13";
+
+  src = fetchFromGitHub {
+    owner = "amhndu";
+    repo = "SimpleNES";
+    rev = "4edb7117970c21a33b3bfe11a6606764fffc5173";
+    sha256 = "1nmwj431iwqzzcykxd4xinqmg0rm14mx7zsjyhcc5skz7pihz86g";
+  };
+
+  nativeBuildInputs = [ cmake ];
+  buildInputs = [ sfml ];
+
+  installPhase = ''
+    mkdir -p $out/bin
+    cp ./SimpleNES $out/bin
+  '';
+
+  meta = with lib; {
+    homepage = "https://github.com/amhndu/SimpleNES";
+    description = "An NES emulator written in C++";
+    license = licenses.gpl3;
+    maintainers = with maintainers; [ ivar ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/misc/emulators/snes9x-gtk/default.nix b/nixpkgs/pkgs/misc/emulators/snes9x-gtk/default.nix
new file mode 100644
index 000000000000..3b5cb487f77a
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/snes9x-gtk/default.nix
@@ -0,0 +1,37 @@
+{ lib, stdenv, fetchFromGitHub, meson, ninja, pkg-config, wrapGAppsHook
+, SDL2, zlib, gtk3, libxml2, libXv, epoxy, minizip, pulseaudio, portaudio }:
+
+stdenv.mkDerivation rec {
+  pname = "snes9x-gtk";
+  version = "1.60";
+
+  src = fetchFromGitHub {
+    owner = "snes9xgit";
+    repo = "snes9x";
+    rev = version;
+    sha256 = "12hpn7zcdvp30ldpw2zf115yjqv55n1ldjbids7vx0lvbpr06dm1";
+  };
+
+  enableParallelBuilding = true;
+  nativeBuildInputs = [ meson ninja pkg-config wrapGAppsHook ];
+  buildInputs = [ SDL2 zlib gtk3 libxml2 libXv epoxy minizip pulseaudio portaudio ];
+
+  preConfigure = "cd gtk";
+
+  meta = with lib; {
+    homepage = "https://www.snes9x.com";
+    description = "Super Nintendo Entertainment System (SNES) emulator";
+
+    longDescription = ''
+      Snes9x is a portable, freeware Super Nintendo Entertainment System (SNES)
+      emulator. It basically allows you to play most games designed for the SNES
+      and Super Famicom Nintendo game systems on your PC or Workstation; which
+      includes some real gems that were only ever released in Japan.
+    '';
+
+    # see https://github.com/snes9xgit/snes9x/blob/master/LICENSE for exact details
+    license = licenses.unfreeRedistributable;
+    maintainers = with maintainers; [ qknight ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/misc/emulators/stella/default.nix b/nixpkgs/pkgs/misc/emulators/stella/default.nix
new file mode 100644
index 000000000000..ff90ae8908be
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/stella/default.nix
@@ -0,0 +1,42 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, pkg-config
+, SDL2
+}:
+
+stdenv.mkDerivation rec {
+  pname = "stella";
+  version = "6.5.2";
+
+  src = fetchFromGitHub {
+    owner = "stella-emu";
+    repo = pname;
+    rev = version;
+    hash = "sha256-CDLMOqSgRx75tjBoLycis/cckCNwgdlb9TRBlD3Dd04=";
+  };
+
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = [ SDL2 ];
+
+  enableParallelBuilding = true;
+
+  meta = with lib;{
+    homepage = "https://stella-emu.github.io/";
+    description = "An open-source Atari 2600 VCS emulator";
+    longDescription = ''
+      Stella is a multi-platform Atari 2600 VCS emulator released under the GNU
+      General Public License (GPL). Stella was originally developed for Linux by
+      Bradford W. Mott, and is currently maintained by Stephen Anthony. Since
+      its original release several people have joined the development team to
+      port Stella to other operating systems such as AcornOS, AmigaOS, DOS,
+      FreeBSD, IRIX, Linux, OS/2, MacOS, Unix, and Windows. The development team
+      is working hard to perfect the emulator and we hope you enjoy our effort.
+
+      As of its 3.5 release, Stella is officially donationware.
+    '';
+    license = licenses.gpl2Plus;
+    maintainers = with maintainers; [ AndersonTorres ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/misc/emulators/termtekst/default.nix b/nixpkgs/pkgs/misc/emulators/termtekst/default.nix
new file mode 100644
index 000000000000..56f56cffad97
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/termtekst/default.nix
@@ -0,0 +1,36 @@
+{ lib, fetchFromGitHub, python3Packages, ncurses }:
+
+python3Packages.buildPythonApplication rec {
+  pname = "termtekst";
+  version = "1.0";
+
+  src = fetchFromGitHub {
+    owner = "zevv";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "1gm7j5d49a60wm7px82b76f610i8pl8ccz4r6qsz90z4mp3lyw9b";
+  };
+
+  propagatedBuildInputs = with python3Packages; [ ncurses requests ];
+
+  patchPhase = ''
+    substituteInPlace setup.py \
+      --replace "assert" "assert 1==1 #"
+    substituteInPlace src/tt \
+      --replace "locale.setlocale" "#locale.setlocale"
+    '';
+
+  meta = with lib; {
+    description = "Console NOS Teletekst viewer in Python";
+    longDescription = ''
+      Small Python app using curses to display Dutch NOS Teletekst on
+      the Linux console. The original Teletekst font includes 2x6
+      raster graphics glyphs which have no representation in unicode;
+      as a workaround the braille set is abused to approximate the
+      graphics.
+    '';
+    license = licenses.mit;
+    maintainers = with maintainers; [ leenaars ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/misc/emulators/tilem/default.nix b/nixpkgs/pkgs/misc/emulators/tilem/default.nix
new file mode 100644
index 000000000000..bde706e23040
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/tilem/default.nix
@@ -0,0 +1,30 @@
+{ stdenv
+, fetchurl
+, lib
+, pkg-config
+, glib
+, gtk2
+, libticonv
+, libtifiles2
+, libticables2
+, libticalcs2
+}:
+
+stdenv.mkDerivation rec {
+  pname = "tilem";
+  version = "2.0";
+  src = fetchurl {
+    url = "mirror://sourceforge/${pname}/${pname}-${version}.tar.bz2";
+    sha256 = "1ba38xzhp3yf21ip3cgql6jzy49jc34sfnjsl4syxyrd81d269zw";
+  };
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = [ glib gtk2 libticonv libtifiles2 libticables2 libticalcs2 ];
+  NIX_CFLAGS_COMPILE = [ "-lm" ];
+  meta = with lib; {
+    homepage = "http://lpg.ticalc.org/prj_tilem/";
+    description = "Emulator and debugger for Texas Instruments Z80-based graphing calculators";
+    license = licenses.gpl3Plus;
+    maintainers = with maintainers; [ siraben luc65r ];
+    platforms = platforms.linux ++ platforms.darwin;
+  };
+}
diff --git a/nixpkgs/pkgs/misc/emulators/uae/default.nix b/nixpkgs/pkgs/misc/emulators/uae/default.nix
new file mode 100644
index 000000000000..75b86eaeebd1
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/uae/default.nix
@@ -0,0 +1,26 @@
+{lib, stdenv, fetchurl, pkg-config, gtk2, alsaLib, SDL}:
+
+stdenv.mkDerivation rec {
+  name = "uae-0.8.29";
+
+  src = fetchurl {
+    url = "http://web.archive.org/web/20130905032631/http://www.amigaemulator.org/files/sources/develop/${name}.tar.bz2";
+    sha256 = "05s3cd1rd5a970s938qf4c2xm3l7f54g5iaqw56v8smk355m4qr4";
+  };
+
+  configureFlags = [ "--with-sdl" "--with-sdl-sound" "--with-sdl-gfx" "--with-alsa" ];
+
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = [ gtk2 alsaLib SDL ];
+
+  hardeningDisable = [ "format" ];
+  LDFLAGS = [ "-lm" ];
+
+  meta = {
+    description = "Ultimate/Unix/Unusable Amiga Emulator";
+    license = lib.licenses.gpl2Plus;
+    homepage = "http://web.archive.org/web/20130901222855/http://www.amigaemulator.org/";
+    maintainers = [ lib.maintainers.sander ];
+    platforms = lib.platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/misc/emulators/vbam/default.nix b/nixpkgs/pkgs/misc/emulators/vbam/default.nix
new file mode 100644
index 000000000000..c21f67845db4
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/vbam/default.nix
@@ -0,0 +1,57 @@
+{ lib, stdenv
+, cairo
+, cmake
+, fetchFromGitHub
+, ffmpeg
+, gettext
+, libGLU, libGL
+, openal
+, pkg-config
+, SDL2
+, sfml
+, zip
+, zlib
+}:
+
+stdenv.mkDerivation rec {
+  pname = "visualboyadvance-m";
+  version = "2.1.4";
+  src = fetchFromGitHub {
+    owner = "visualboyadvance-m";
+    repo = "visualboyadvance-m";
+    rev = "v${version}";
+    sha256 = "1kgpbvng3c12ws0dy92zc0azd94h0i3j4vm7b67zc8mi3pqsppdg";
+  };
+
+  nativeBuildInputs = [ cmake pkg-config ];
+
+  buildInputs = [
+    cairo
+    ffmpeg
+    gettext
+    libGLU libGL
+    openal
+    SDL2
+    sfml
+    zip
+    zlib
+  ];
+
+  cmakeFlags = [
+    "-DCMAKE_BUILD_TYPE='Release'"
+    "-DENABLE_FFMPEG='true'"
+    "-DENABLE_LINK='true'"
+    "-DSYSCONFDIR=etc"
+    "-DENABLE_WX='false'"
+    "-DENABLE_SDL='true'"
+  ];
+
+  meta =  with lib; {
+    description = "A merge of the original Visual Boy Advance forks";
+    license = licenses.gpl2;
+    maintainers = with maintainers; [ lassulus ];
+    homepage = "https://vba-m.com/";
+    platforms = lib.platforms.linux;
+    badPlatforms = [ "aarch64-linux" ];
+  };
+}
diff --git a/nixpkgs/pkgs/misc/emulators/vice/default.nix b/nixpkgs/pkgs/misc/emulators/vice/default.nix
new file mode 100644
index 000000000000..7d63927e33f6
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/vice/default.nix
@@ -0,0 +1,53 @@
+{ lib, stdenv, fetchurl, bison, flex, perl, libpng, giflib, libjpeg, alsaLib, readline, libGLU, libGL, libXaw
+, pkg-config, gtk2, SDL, autoreconfHook, makeDesktopItem
+}:
+
+stdenv.mkDerivation rec {
+  name = "vice-3.1";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/vice-emu/vice-3.1.tar.gz";
+    sha256 = "0h0jbml02s2a36hr78dxv1zshmfhxp1wadpcdl09aq416fb1bf1y";
+  };
+
+  buildInputs = [ bison flex perl libpng giflib libjpeg alsaLib readline libGLU libGL
+    pkg-config gtk2 SDL autoreconfHook libXaw ];
+  dontDisableStatic = true;
+  configureFlags = [ "--enable-fullscreen --enable-gnomeui" ];
+
+  desktopItem = makeDesktopItem {
+    name = "vice";
+    exec = "x64";
+    comment = "Commodore 64 emulator";
+    desktopName = "VICE";
+    genericName = "Commodore 64 emulator";
+    categories = "Emulator;";
+  };
+
+  preBuild = ''
+    for i in src/resid src/resid-dtv
+    do
+        mkdir -pv $i/src
+        ln -sv ../../wrap-u-ar.sh $i/src
+    done
+  '';
+  patchPhase = ''
+    # Disable font-cache update
+    sed -i -e "s|install: install-data-am|install-no: install-data-am|" data/fonts/Makefile.am
+  '';
+
+  #NIX_LDFLAGS = "-lX11 -L${libX11}/lib";
+
+  postInstall = ''
+    mkdir -p $out/share/applications
+    cp ${desktopItem}/share/applications/* $out/share/applications
+  '';
+
+  meta = {
+    description = "Commodore 64, 128 and other emulators";
+    homepage = "http://www.viceteam.org";
+    license = lib.licenses.gpl2Plus;
+    maintainers = [ lib.maintainers.sander ];
+    platforms = lib.platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/misc/emulators/wine/base.nix b/nixpkgs/pkgs/misc/emulators/wine/base.nix
new file mode 100644
index 000000000000..6d7c2543d805
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/wine/base.nix
@@ -0,0 +1,155 @@
+{ stdenv, lib, pkgArches, callPackage,
+  name, version, src, mingwGccs, monos, geckos, platforms,
+  bison, flex, fontforge, makeWrapper, pkg-config,
+  autoconf, hexdump, perl,
+  supportFlags,
+  patches,
+  buildScript ? null, configureFlags ? []
+}:
+
+with import ./util.nix { inherit lib; };
+
+let
+  vkd3d = callPackage ./vkd3d.nix {};
+  patches' = patches;
+in
+stdenv.mkDerivation ((lib.optionalAttrs (buildScript != null) {
+  builder = buildScript;
+}) // rec {
+  inherit name src configureFlags;
+
+  # Fixes "Compiler cannot create executables" building wineWow with mingwSupport
+  strictDeps = true;
+
+  nativeBuildInputs = [
+    bison
+    flex
+    fontforge
+    makeWrapper
+    pkg-config
+
+    # Required by staging
+    autoconf
+    hexdump
+    perl
+  ]
+  ++ lib.optionals supportFlags.mingwSupport mingwGccs;
+
+  buildInputs = toBuildInputs pkgArches (with supportFlags; (pkgs:
+  [ pkgs.freetype pkgs.perl pkgs.xorg.libX11 ]
+  ++ lib.optional stdenv.isLinux         pkgs.libcap
+  ++ lib.optional pngSupport             pkgs.libpng
+  ++ lib.optional jpegSupport            pkgs.libjpeg
+  ++ lib.optional cupsSupport            pkgs.cups
+  ++ lib.optional colorManagementSupport pkgs.lcms2
+  ++ lib.optional gettextSupport         pkgs.gettext
+  ++ lib.optional dbusSupport            pkgs.dbus
+  ++ lib.optional mpg123Support          pkgs.mpg123
+  ++ lib.optional openalSupport          pkgs.openal
+  ++ lib.optional cairoSupport           pkgs.cairo
+  ++ lib.optional tiffSupport            pkgs.libtiff
+  ++ lib.optional odbcSupport            pkgs.unixODBC
+  ++ lib.optional netapiSupport          pkgs.samba4
+  ++ lib.optional cursesSupport          pkgs.ncurses
+  ++ lib.optional vaSupport              pkgs.libva
+  ++ lib.optional pcapSupport            pkgs.libpcap
+  ++ lib.optional v4lSupport             pkgs.libv4l
+  ++ lib.optional saneSupport            pkgs.sane-backends
+  ++ lib.optional gsmSupport             pkgs.gsm
+  ++ lib.optional gphoto2Support         pkgs.libgphoto2
+  ++ lib.optional ldapSupport            pkgs.openldap
+  ++ lib.optional fontconfigSupport      pkgs.fontconfig
+  ++ lib.optional alsaSupport            pkgs.alsaLib
+  ++ lib.optional pulseaudioSupport      pkgs.libpulseaudio
+  ++ lib.optional xineramaSupport        pkgs.xorg.libXinerama
+  ++ lib.optional udevSupport            pkgs.udev
+  ++ lib.optional vulkanSupport          pkgs.vulkan-loader
+  ++ lib.optional sdlSupport             pkgs.SDL2
+  ++ lib.optional faudioSupport          pkgs.faudio
+  ++ lib.optional vkd3dSupport           vkd3d
+  ++ lib.optionals gstreamerSupport      (with pkgs.gst_all_1;
+    [ gstreamer gst-plugins-base gst-plugins-good gst-plugins-ugly gst-libav
+    (gst-plugins-bad.override { enableZbar = false; }) ])
+  ++ lib.optionals gtkSupport    [ pkgs.gtk3 pkgs.glib ]
+  ++ lib.optionals openclSupport [ pkgs.opencl-headers pkgs.ocl-icd ]
+  ++ lib.optionals xmlSupport    [ pkgs.libxml2 pkgs.libxslt ]
+  ++ lib.optionals tlsSupport    [ pkgs.openssl pkgs.gnutls ]
+  ++ lib.optionals openglSupport [ pkgs.libGLU pkgs.libGL pkgs.mesa.osmesa pkgs.libdrm ]
+  ++ lib.optionals stdenv.isDarwin (with pkgs.buildPackages.darwin.apple_sdk.frameworks; [
+     CoreServices Foundation ForceFeedback AppKit OpenGL IOKit DiskArbitration Security
+     ApplicationServices AudioToolbox CoreAudio AudioUnit CoreMIDI OpenAL OpenCL Cocoa Carbon
+  ])
+  ++ lib.optionals stdenv.isLinux  (with pkgs.xorg; [
+     libXi libXcursor libXrandr libXrender libXxf86vm libXcomposite libXext
+  ])));
+
+  patches = [ ] ++ patches';
+
+  # Wine locates a lot of libraries dynamically through dlopen().  Add
+  # them to the RPATH so that the user doesn't have to set them in
+  # LD_LIBRARY_PATH.
+  NIX_LDFLAGS = toString (map (path: "-rpath " + path) (
+      map (x: "${lib.getLib x}/lib") ([ stdenv.cc.cc ] ++ buildInputs)
+      # libpulsecommon.so is linked but not found otherwise
+      ++ lib.optionals supportFlags.pulseaudioSupport (map (x: "${lib.getLib x}/lib/pulseaudio")
+          (toBuildInputs pkgArches (pkgs: [ pkgs.libpulseaudio ])))
+    ));
+
+  # Don't shrink the ELF RPATHs in order to keep the extra RPATH
+  # elements specified above.
+  dontPatchELF = true;
+
+  ## FIXME
+  # Add capability to ignore known failing tests
+  # and enable doCheck
+  doCheck = false;
+
+  postInstall = let
+    links = prefix: pkg: "ln -s ${pkg} $out/${prefix}/${pkg.name}";
+  in ''
+    mkdir -p $out/share/wine/gecko $out/share/wine/mono/
+    ${lib.strings.concatStringsSep "\n"
+          ((map (links "share/wine/gecko") geckos)
+        ++ (map (links "share/wine/mono")  monos))}
+  '' + lib.optionalString supportFlags.gstreamerSupport ''
+    # Wrapping Wine is tricky.
+    # https://github.com/NixOS/nixpkgs/issues/63170
+    # https://github.com/NixOS/nixpkgs/issues/28486
+    # The main problem is that wine-preloader opens and loads the wine(64) binary, and
+    # breakage occurs if it finds a shell script instead of the real binary. We solve this
+    # by setting WINELOADER to point to the original binary. Additionally, the locations
+    # of the 32-bit and 64-bit binaries must differ only by the presence of "64" at the
+    # end, due to the logic Wine uses to find the other binary (see get_alternate_loader
+    # in dlls/kernel32/process.c). Therefore we do not use wrapProgram which would move
+    # the binaries to ".wine-wrapped" and ".wine64-wrapped", but use makeWrapper directly,
+    # and move the binaries to ".wine" and ".wine64".
+    for i in wine wine64 ; do
+      prog="$out/bin/$i"
+      if [ -e "$prog" ]; then
+        hidden="$(dirname "$prog")/.$(basename "$prog")"
+        mv "$prog" "$hidden"
+        makeWrapper "$hidden" "$prog" \
+          --argv0 "" \
+          --set WINELOADER "$hidden" \
+          --prefix GST_PLUGIN_SYSTEM_PATH_1_0 ":" "$GST_PLUGIN_SYSTEM_PATH_1_0"
+      fi
+    done
+  '';
+
+  enableParallelBuilding = true;
+
+  # https://bugs.winehq.org/show_bug.cgi?id=43530
+  # https://github.com/NixOS/nixpkgs/issues/31989
+  hardeningDisable = [ "bindnow" ]
+    ++ lib.optional (stdenv.hostPlatform.isDarwin) "fortify"
+    ++ lib.optional (supportFlags.mingwSupport) "format";
+
+  passthru = { inherit pkgArches; };
+  meta = {
+    inherit version platforms;
+    homepage = "https://www.winehq.org/";
+    license = with lib.licenses; [ lgpl21Plus ];
+    description = "An Open Source implementation of the Windows API on top of X, OpenGL, and Unix";
+    maintainers = with lib.maintainers; [ avnik raskin bendlas ];
+  };
+})
diff --git a/nixpkgs/pkgs/misc/emulators/wine/builder-wow.sh b/nixpkgs/pkgs/misc/emulators/wine/builder-wow.sh
new file mode 100644
index 000000000000..c006db3116b5
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/wine/builder-wow.sh
@@ -0,0 +1,30 @@
+## build described at http://wiki.winehq.org/Wine64
+
+source $stdenv/setup
+
+unpackPhase
+cd $TMP/$sourceRoot
+patchPhase
+
+configureScript=$TMP/$sourceRoot/configure
+mkdir -p $TMP/wine-wow $TMP/wine64
+
+cd $TMP/wine64
+sourceRoot=`pwd`
+configureFlags="--enable-win64"
+configurePhase
+buildPhase
+# checkPhase
+
+cd $TMP/wine-wow
+sourceRoot=`pwd`
+configureFlags="--with-wine64=../wine64"
+configurePhase
+buildPhase
+# checkPhase
+
+eval "$preInstall"
+cd $TMP/wine-wow && make install
+cd $TMP/wine64 && make install
+eval "$postInstall"
+fixupPhase
diff --git a/nixpkgs/pkgs/misc/emulators/wine/cert-path.patch b/nixpkgs/pkgs/misc/emulators/wine/cert-path.patch
new file mode 100644
index 000000000000..18a90e1a9af8
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/wine/cert-path.patch
@@ -0,0 +1,23 @@
+diff --git a/dlls/crypt32/unixlib.c b/dlls/crypt32/unixlib.c
+index 035f2d936bb..959716d727a 100644
+--- a/dlls/crypt32/unixlib.c
++++ b/dlls/crypt32/unixlib.c
+@@ -24,6 +24,7 @@
+ #include "wine/port.h"
+ 
+ #include <stdarg.h>
++#include <stdlib.h>
+ #include <dirent.h>
+ #include <fcntl.h>
+ #include <unistd.h>
+@@ -605,6 +606,10 @@ static void load_root_certs(void)
+ 
+     for (i = 0; i < ARRAY_SIZE(CRYPT_knownLocations) && list_empty(&root_cert_list); i++)
+         import_certs_from_path( CRYPT_knownLocations[i], TRUE );
++
++    char *nix_cert_file = getenv("NIX_SSL_CERT_FILE");
++    if (nix_cert_file != NULL)
++        import_certs_from_path(nix_cert_file, TRUE);
+ }
+ 
+ static BOOL WINAPI enum_root_certs( void *buffer, SIZE_T size, SIZE_T *needed )
diff --git a/nixpkgs/pkgs/misc/emulators/wine/default.nix b/nixpkgs/pkgs/misc/emulators/wine/default.nix
new file mode 100644
index 000000000000..6def48b4f596
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/wine/default.nix
@@ -0,0 +1,69 @@
+## Configuration:
+# Control you default wine config in nixpkgs-config:
+# wine = {
+#   release = "stable"; # "stable", "unstable", "staging"
+#   build = "wineWow"; # "wine32", "wine64", "wineWow"
+# };
+# Make additional configurations on demand:
+# wine.override { wineBuild = "wine32"; wineRelease = "staging"; };
+{ lib, stdenv, callPackage,
+  wineRelease ? "stable",
+  wineBuild ? if stdenv.hostPlatform.system == "x86_64-linux" then "wineWow" else "wine32",
+  pngSupport ? false,
+  jpegSupport ? false,
+  tiffSupport ? false,
+  gettextSupport ? false,
+  fontconfigSupport ? false,
+  alsaSupport ? false,
+  gtkSupport ? false,
+  openglSupport ? false,
+  tlsSupport ? false,
+  gstreamerSupport ? false,
+  cupsSupport ? false,
+  colorManagementSupport ? false,
+  dbusSupport ? false,
+  mpg123Support ? false,
+  openalSupport ? false,
+  openclSupport ? false,
+  cairoSupport ? false,
+  odbcSupport ? false,
+  netapiSupport ? false,
+  cursesSupport ? false,
+  vaSupport ? false,
+  pcapSupport ? false,
+  v4lSupport ? false,
+  saneSupport ? false,
+  gsmSupport ? false,
+  gphoto2Support ? false,
+  ldapSupport ? false,
+  pulseaudioSupport ? false,
+  udevSupport ? false,
+  xineramaSupport ? false,
+  xmlSupport ? false,
+  vulkanSupport ? false,
+  sdlSupport ? false,
+  faudioSupport ? false,
+  vkd3dSupport ? false,
+  mingwSupport ? wineRelease != "stable",
+}:
+
+let wine-build = build: release:
+      lib.getAttr build (callPackage ./packages.nix {
+        wineRelease = release;
+        supportFlags = {
+          inherit pngSupport jpegSupport cupsSupport colorManagementSupport gettextSupport
+                  dbusSupport mpg123Support openalSupport cairoSupport tiffSupport odbcSupport
+                  netapiSupport cursesSupport vaSupport pcapSupport v4lSupport saneSupport
+                  gsmSupport gphoto2Support ldapSupport fontconfigSupport alsaSupport
+                  pulseaudioSupport xineramaSupport gtkSupport openclSupport xmlSupport tlsSupport
+                  openglSupport gstreamerSupport udevSupport vulkanSupport sdlSupport faudioSupport
+                  vkd3dSupport mingwSupport;
+        };
+      });
+
+in if wineRelease == "staging" then
+  callPackage ./staging.nix {
+    wineUnstable = wine-build wineBuild "unstable";
+  }
+else
+  wine-build wineBuild wineRelease
diff --git a/nixpkgs/pkgs/misc/emulators/wine/fonts.nix b/nixpkgs/pkgs/misc/emulators/wine/fonts.nix
new file mode 100644
index 000000000000..0ee1b3973d86
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/wine/fonts.nix
@@ -0,0 +1,22 @@
+{ stdenv, lib, callPackage }:
+let src = (callPackage ./sources.nix {}).stable;
+in
+stdenv.mkDerivation {
+  pname = "wine-fonts";
+  inherit (src) version;
+
+  sourceRoot = "wine-${src.version}/fonts";
+  inherit src;
+
+  installPhase = ''
+    install *.ttf -Dt $out/share/fonts/wine
+  '';
+
+  meta = {
+    description = "Microsoft replacement fonts by the Wine project";
+    homepage = "https://wiki.winehq.org/Create_Fonts";
+    license = with lib.licenses; [ lgpl21Plus ];
+    platforms = lib.platforms.all;
+    maintainers = with lib.maintainers; [ avnik raskin bendlas johnazoidberg ];
+  };
+}
diff --git a/nixpkgs/pkgs/misc/emulators/wine/packages.nix b/nixpkgs/pkgs/misc/emulators/wine/packages.nix
new file mode 100644
index 000000000000..c4fec3360e1f
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/wine/packages.nix
@@ -0,0 +1,38 @@
+{ stdenv_32bit, lib, pkgs, pkgsi686Linux, pkgsCross, callPackage,
+  wineRelease ? "stable",
+  supportFlags
+}:
+
+let src = lib.getAttr wineRelease (callPackage ./sources.nix {});
+in with src; {
+  wine32 = pkgsi686Linux.callPackage ./base.nix {
+    name = "wine-${version}";
+    inherit src version supportFlags patches;
+    pkgArches = [ pkgsi686Linux ];
+    geckos = [ gecko32 ];
+    mingwGccs = with pkgsCross; [ mingw32.buildPackages.gcc ];
+    monos =  [ mono ];
+    platforms = [ "i686-linux" "x86_64-linux" ];
+  };
+  wine64 = callPackage ./base.nix {
+    name = "wine64-${version}";
+    inherit src version supportFlags patches;
+    pkgArches = [ pkgs ];
+    mingwGccs = with pkgsCross; [ mingwW64.buildPackages.gcc ];
+    geckos = [ gecko64 ];
+    monos =  [ mono ];
+    configureFlags = [ "--enable-win64" ];
+    platforms = [ "x86_64-linux" "x86_64-darwin" ];
+  };
+  wineWow = callPackage ./base.nix {
+    name = "wine-wow-${version}";
+    inherit src version supportFlags patches;
+    stdenv = stdenv_32bit;
+    pkgArches = [ pkgs pkgsi686Linux ];
+    geckos = [ gecko32 gecko64 ];
+    mingwGccs = with pkgsCross; [ mingw32.buildPackages.gcc mingwW64.buildPackages.gcc ];
+    monos =  [ mono ];
+    buildScript = ./builder-wow.sh;
+    platforms = [ "x86_64-linux" ];
+  };
+}
diff --git a/nixpkgs/pkgs/misc/emulators/wine/sources.nix b/nixpkgs/pkgs/misc/emulators/wine/sources.nix
new file mode 100644
index 000000000000..7f02ead3e025
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/wine/sources.nix
@@ -0,0 +1,78 @@
+{ pkgs ? import <nixpkgs> {} }:
+## we default to importing <nixpkgs> here, so that you can use
+## a simple shell command to insert new sha256's into this file
+## e.g. with emacs C-u M-x shell-command
+##
+##     nix-prefetch-url sources.nix -A {stable{,.mono,.gecko64,.gecko32}, unstable, staging, winetricks}
+
+# here we wrap fetchurl and fetchFromGitHub, in order to be able to pass additional args around it
+let fetchurl = args@{url, sha256, ...}:
+  pkgs.fetchurl { inherit url sha256; } // args;
+    fetchFromGitHub = args@{owner, repo, rev, sha256, ...}:
+  pkgs.fetchFromGitHub { inherit owner repo rev sha256; } // args;
+in rec {
+
+  stable = fetchurl rec {
+    version = "6.0";
+    url = "https://dl.winehq.org/wine/source/6.0/wine-${version}.tar.xz";
+    sha256 = "sha256-tJMGXy+D7kKcYuLsWGmKPPY+94ci4bIHZYIxUuhYLFY=";
+
+    ## see http://wiki.winehq.org/Gecko
+    gecko32 = fetchurl rec {
+      version = "2.47.1";
+      url = "https://dl.winehq.org/wine/wine-gecko/${version}/wine-gecko-${version}-x86.msi";
+      sha256 = "0ld03pjm65xkpgqkvfsmk6h9krjsqbgxw4b8rvl2fj20j8l0w2zh";
+    };
+    gecko64 = fetchurl rec {
+      version = "2.47.1";
+      url = "https://dl.winehq.org/wine/wine-gecko/${version}/wine-gecko-${version}-x86_64.msi";
+      sha256 = "0jj7azmpy07319238g52a8m4nkdwj9g010i355ykxnl8m5wjwcb9";
+    };
+
+    ## see http://wiki.winehq.org/Mono
+    mono = fetchurl rec {
+      version = "5.1.1";
+      url = "https://dl.winehq.org/wine/wine-mono/${version}/wine-mono-${version}-x86.msi";
+      sha256 = "09wjrfxbw0072iv6d2vqnkc3y7dzj15vp8mv4ay44n1qp5ji4m3l";
+    };
+
+    patches = [
+      # Also look for root certificates at $NIX_SSL_CERT_FILE
+      ./cert-path.patch
+    ];
+  };
+
+  unstable = fetchurl rec {
+    # NOTE: Don't forget to change the SHA256 for staging as well.
+    version = "6.5";
+    url = "https://dl.winehq.org/wine/source/6.x/wine-${version}.tar.xz";
+    sha256 = "sha256-BgD9IIwGkl1mNNKfVDu6CmQ2HDTpvXYJwvDiCWEK00c=";
+    inherit (stable) mono gecko32 gecko64;
+
+    patches = [
+      # Also look for root certificates at $NIX_SSL_CERT_FILE
+      ./cert-path.patch
+     ];
+  };
+
+  staging = fetchFromGitHub rec {
+    # https://github.com/wine-staging/wine-staging/releases
+    inherit (unstable) version;
+    sha256 = "sha256-u6wDavrFirN1e0fFra4ui3i4PnJF0gcENYoIyNwhIYc=";
+    owner = "wine-staging";
+    repo = "wine-staging";
+    rev = "v${version}";
+
+    # Just keep list empty, if current release haven't broken patchsets
+    disabledPatchsets = [ ];
+  };
+
+  winetricks = fetchFromGitHub rec {
+    # https://github.com/Winetricks/winetricks/releases
+    version = "20201206";
+    sha256 = "1xs09v1zr98yvwvdsmzgryc2hbk92mwn54yxx8162l461465razc";
+    owner = "Winetricks";
+    repo = "winetricks";
+    rev = version;
+  };
+}
diff --git a/nixpkgs/pkgs/misc/emulators/wine/staging.nix b/nixpkgs/pkgs/misc/emulators/wine/staging.nix
new file mode 100644
index 000000000000..abfc4f832a3b
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/wine/staging.nix
@@ -0,0 +1,28 @@
+{ lib, callPackage, wineUnstable }:
+
+with callPackage ./util.nix {};
+
+let patch = (callPackage ./sources.nix {}).staging;
+    build-inputs = pkgNames: extra:
+      (mkBuildInputs wineUnstable.pkgArches pkgNames) ++ extra;
+in assert lib.getVersion wineUnstable == patch.version;
+
+(lib.overrideDerivation wineUnstable (self: {
+  buildInputs = build-inputs [ "perl" "util-linux" "autoconf" "gitMinimal" ] self.buildInputs;
+
+  name = "${self.name}-staging";
+
+  postPatch = self.postPatch or "" + ''
+    patchShebangs tools
+    cp -r ${patch}/patches .
+    chmod +w patches
+    cd patches
+    patchShebangs gitapply.sh
+    ./patchinstall.sh DESTDIR="$PWD/.." --all ${lib.concatMapStringsSep " " (ps: "-W ${ps}") patch.disabledPatchsets}
+    cd ..
+  '';
+})) // {
+  meta = wineUnstable.meta // {
+    description = wineUnstable.meta.description + " (with staging patches)";
+  };
+}
diff --git a/nixpkgs/pkgs/misc/emulators/wine/util.nix b/nixpkgs/pkgs/misc/emulators/wine/util.nix
new file mode 100644
index 000000000000..cd5bd03130b6
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/wine/util.nix
@@ -0,0 +1,9 @@
+{ lib }:
+rec {
+  toPackages = pkgNames: pkgs:
+    map (pn: lib.getAttr pn pkgs) pkgNames;
+  toBuildInputs = pkgArches: archPkgs:
+    lib.concatLists (map archPkgs pkgArches);
+  mkBuildInputs = pkgArches: pkgNames:
+    toBuildInputs pkgArches (toPackages pkgNames);
+}
diff --git a/nixpkgs/pkgs/misc/emulators/wine/vkd3d.nix b/nixpkgs/pkgs/misc/emulators/wine/vkd3d.nix
new file mode 100644
index 000000000000..303d33df217d
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/wine/vkd3d.nix
@@ -0,0 +1,26 @@
+{ lib, stdenv, fetchurl, vulkan-headers, spirv-headers, vulkan-loader }:
+
+#TODO: MoltenVK
+#TODO: unstable
+
+stdenv.mkDerivation rec {
+  pname = "vkd3d";
+  version = "1.2";
+
+  src = fetchurl {
+    url = "https://dl.winehq.org/vkd3d/source/vkd3d-${version}.tar.xz";
+    sha256 = "0szr1lw3xbgi9qjm13d1q4gyzzwv8i5wfxiwjg6dmwphrc7h6jxh";
+  };
+
+  buildInputs = [ vulkan-headers spirv-headers vulkan-loader ];
+
+  enableParallelBuilding = true;
+
+  meta = with lib; {
+    description = "A 3d library build on top on Vulkan with a similar api to DirectX 12";
+    homepage = "https://source.winehq.org/git/vkd3d.git";
+    license = licenses.lgpl21;
+    platforms = platforms.linux;
+    maintainers = [ maintainers.marius851000 ];
+  };
+}
diff --git a/nixpkgs/pkgs/misc/emulators/wine/winetricks.nix b/nixpkgs/pkgs/misc/emulators/wine/winetricks.nix
new file mode 100644
index 000000000000..cfde64fc33ac
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/wine/winetricks.nix
@@ -0,0 +1,32 @@
+{ lib, stdenv, callPackage, wine, perl, which, coreutils, zenity, curl
+, cabextract, unzip, p7zip, gnused, gnugrep, bash } :
+
+stdenv.mkDerivation rec {
+  name = "winetricks-${src.version}";
+
+  src = (callPackage ./sources.nix {}).winetricks;
+
+  buildInputs = [ perl which ];
+
+  # coreutils is for sha1sum
+  pathAdd = lib.concatMapStringsSep ":" (x: x + "/bin")
+    (lib.filter (x: x != null)
+      [ wine perl which coreutils zenity curl cabextract unzip p7zip gnused gnugrep bash ]);
+
+  makeFlags = [ "PREFIX=$(out)" ];
+
+  doCheck = false; # requires "bashate"
+
+  postInstall = ''
+    sed -i \
+      -e '2i PATH="${pathAdd}:$PATH"' \
+      "$out/bin/winetricks"
+  '';
+
+  meta = {
+    description = "A script to install DLLs needed to work around problems in Wine";
+    license = lib.licenses.lgpl21;
+    homepage = "https://github.com/Winetricks/winetricks";
+    platforms = with lib.platforms; linux;
+  };
+}
diff --git a/nixpkgs/pkgs/misc/emulators/wxmupen64plus/default.nix b/nixpkgs/pkgs/misc/emulators/wxmupen64plus/default.nix
new file mode 100644
index 000000000000..8621d213b79d
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/wxmupen64plus/default.nix
@@ -0,0 +1,30 @@
+{ lib, stdenv, fetchurl, python, wxGTK29, mupen64plus, SDL, libX11, libGLU, libGL
+, wafHook }:
+
+stdenv.mkDerivation {
+  name = "wxmupen64plus-0.3";
+  src = fetchurl {
+    url = "https://bitbucket.org/auria/wxmupen64plus/get/0.3.tar.bz2";
+    sha256 = "1mnxi4k011dd300k35li2p6x4wccwi6im21qz8dkznnz397ps67c";
+  };
+
+  nativeBuildInputs = [ wafHook ];
+  buildInputs = [ python wxGTK29 SDL libX11 libGLU libGL ];
+
+  preConfigure = ''
+    tar xf ${mupen64plus.src}
+    APIDIR=$(eval echo `pwd`/mupen64plus*/source/mupen64plus-core/src/api)
+    export CXXFLAGS="-I${libX11.dev}/include/X11 -DLIBDIR=\\\"${mupen64plus}/lib/\\\""
+    export LDFLAGS="-lwx_gtk2u_adv-2.9"
+
+    wafConfigureFlagsArray+=("--mupenapi=$APIDIR" "--wxconfig=`type -P wx-config`")
+  '';
+
+  NIX_CFLAGS_COMPILE = "-fpermissive";
+
+  meta = {
+    description = "GUI for the Mupen64Plus 2.0 emulator";
+    license = lib.licenses.gpl2Plus;
+    homepage = "https://bitbucket.org/auria/wxmupen64plus/wiki/Home";
+  };
+}
diff --git a/nixpkgs/pkgs/misc/emulators/xcpc/default.nix b/nixpkgs/pkgs/misc/emulators/xcpc/default.nix
new file mode 100644
index 000000000000..633d44bb5ae4
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/xcpc/default.nix
@@ -0,0 +1,29 @@
+{ lib, stdenv, fetchurl, pkg-config, glib, libXaw, libX11, libXext
+  , libDSKSupport ? true, libdsk
+  , motifSupport ? false, lesstif
+}:
+
+with lib;
+stdenv.mkDerivation rec {
+  version = "20070122";
+  pname = "xcpc";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/xcpc/${pname}-${version}.tar.gz";
+    sha256 = "0hxsbhmyzyyrlidgg0q8izw55q0z40xrynw5a1c3frdnihj9jf7n";
+  };
+
+  nativeBuildInputs = [ pkg-config ];
+
+  buildInputs = [ glib libdsk libXaw libX11 libXext ]
+    ++ optional libDSKSupport libdsk
+    ++ optional motifSupport lesstif;
+
+  meta = {
+    description = "A portable Amstrad CPC 464/664/6128 emulator written in C";
+    homepage = "https://www.xcpc-emulator.net";
+    license = licenses.gpl2Plus;
+    maintainers = [ ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/misc/emulators/yabause/0001-Fixes-for-Qt-5.11-upgrade.patch b/nixpkgs/pkgs/misc/emulators/yabause/0001-Fixes-for-Qt-5.11-upgrade.patch
new file mode 100644
index 000000000000..43539ef4ca58
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/yabause/0001-Fixes-for-Qt-5.11-upgrade.patch
@@ -0,0 +1,67 @@
+From 3140afd6fb7dad7a25296526a71b005fb9eae048 Mon Sep 17 00:00:00 2001
+From: Samuel Dionne-Riel <samuel@dionne-riel.com>
+Date: Sat, 8 Sep 2018 00:44:08 -0400
+Subject: [PATCH] Fixes for Qt 5.11 upgrade
+
+---
+ src/qt/ui/UICheatRaw.cpp | 2 --
+ src/qt/ui/UICheatRaw.h   | 2 +-
+ src/qt/ui/UICheats.cpp   | 2 ++
+ src/qt/ui/UIHexInput.h   | 2 ++
+ 4 files changed, 5 insertions(+), 3 deletions(-)
+
+diff --git a/src/qt/ui/UICheatRaw.cpp b/src/qt/ui/UICheatRaw.cpp
+index 4ad82d77..3f78486b 100755
+--- a/src/qt/ui/UICheatRaw.cpp
++++ b/src/qt/ui/UICheatRaw.cpp
+@@ -20,8 +20,6 @@
+ #include "UIHexInput.h"

+ #include "../QtYabause.h"

+ 

+-#include <QButtonGroup>

+-

+ UICheatRaw::UICheatRaw( QWidget* p )

+ 	: QDialog( p )

+ {

+diff --git a/src/qt/ui/UICheatRaw.h b/src/qt/ui/UICheatRaw.h
+index d97b429d..20318c67 100755
+--- a/src/qt/ui/UICheatRaw.h
++++ b/src/qt/ui/UICheatRaw.h
+@@ -21,7 +21,7 @@
+ 

+ #include "ui_UICheatRaw.h"

+ 

+-class QButtonGroup;

++#include <QButtonGroup>

+ 

+ class UICheatRaw : public QDialog, public Ui::UICheatRaw

+ {

+diff --git a/src/qt/ui/UICheats.cpp b/src/qt/ui/UICheats.cpp
+index c6027972..44d341c3 100755
+--- a/src/qt/ui/UICheats.cpp
++++ b/src/qt/ui/UICheats.cpp
+@@ -21,6 +21,8 @@
+ #include "UICheatRaw.h"
+ #include "../CommonDialogs.h"
+ 
++#include <QButtonGroup>
++
+ UICheats::UICheats( QWidget* p )
+ 	: QDialog( p )
+ {
+diff --git a/src/qt/ui/UIHexInput.h b/src/qt/ui/UIHexInput.h
+index f333b016..4bd8aed4 100644
+--- a/src/qt/ui/UIHexInput.h
++++ b/src/qt/ui/UIHexInput.h
+@@ -22,6 +22,8 @@
+ #include "ui_UIHexInput.h"

+ #include "../QtYabause.h"

+ 

++#include <QValidator>

++

+ class HexValidator : public QValidator

+ {

+    Q_OBJECT

+-- 
+2.16.4
+
diff --git a/nixpkgs/pkgs/misc/emulators/yabause/default.nix b/nixpkgs/pkgs/misc/emulators/yabause/default.nix
new file mode 100644
index 000000000000..17b7b563c15f
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/yabause/default.nix
@@ -0,0 +1,36 @@
+{ mkDerivation, lib, fetchurl, cmake, pkg-config, qtbase, qt5, libGLU, libGL
+, freeglut ? null, openal ? null, SDL2 ? null }:
+
+mkDerivation rec {
+  pname = "yabause";
+  version = "0.9.15";
+
+  src = fetchurl {
+    url = "https://download.tuxfamily.org/yabause/releases/${version}/${pname}-${version}.tar.gz";
+    sha256 = "1cn2rjjb7d9pkr4g5bqz55vd4pzyb7hg94cfmixjkzzkw0zw8d23";
+  };
+
+  nativeBuildInputs = [ cmake pkg-config ];
+  buildInputs = [ qtbase qt5.qtmultimedia libGLU libGL freeglut openal SDL2 ];
+
+  patches = [
+    ./linkage-rwx-linux-elf.patch
+    # Fixes derived from
+    # https://github.com/Yabause/yabause/commit/06a816c032c6f7fd79ced6e594dd4b33571a0e73
+    ./0001-Fixes-for-Qt-5.11-upgrade.patch
+  ];
+
+  cmakeFlags = [
+    "-DYAB_NETWORK=ON"
+    "-DYAB_OPTIMIZED_DMA=ON"
+    "-DYAB_PORTS=qt"
+  ] ;
+
+  meta = with lib; {
+    description = "An open-source Sega Saturn emulator";
+    homepage = "https://yabause.org/";
+    license = licenses.gpl2Plus;
+    maintainers = with maintainers; [ AndersonTorres ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/misc/emulators/yabause/linkage-rwx-linux-elf.patch b/nixpkgs/pkgs/misc/emulators/yabause/linkage-rwx-linux-elf.patch
new file mode 100644
index 000000000000..bb0491b373f8
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/yabause/linkage-rwx-linux-elf.patch
@@ -0,0 +1,20 @@
+--- a/src/sh2_dynarec/linkage_x64.s	2013-03-11 20:29:53.112870900 +0100
++++ b/src/sh2_dynarec/linkage_x64.s	2013-03-11 20:31:48.856778600 +0100
+@@ -747,3 +747,7 @@ breakpoint:
+ 	ret
+ 	/* Set breakpoint here for debugging */
+ 	.size	breakpoint, .-breakpoint
++
++#if defined(__linux__) && defined(__ELF__)
++.section .note.GNU-stack,"",%progbits
++#endif
+--- a/src/sh2_dynarec/linkage_x86.s	2013-03-11 20:30:08.157693100 +0100
++++ b/src/sh2_dynarec/linkage_x86.s	2013-03-11 20:32:30.993310600 +0100
+@@ -743,3 +743,7 @@ breakpoint:
+ 	ret
+ 	/* Set breakpoint here for debugging */
+ 	.size	breakpoint, .-breakpoint
++
++#if defined(__linux__) && defined(__ELF__)
++.section .note.GNU-stack,"",%progbits
++#endif
diff --git a/nixpkgs/pkgs/misc/emulators/yuzu/base.nix b/nixpkgs/pkgs/misc/emulators/yuzu/base.nix
new file mode 100644
index 000000000000..b0459d61679f
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/yuzu/base.nix
@@ -0,0 +1,88 @@
+{ pname, version, src, branchName
+, stdenv, lib, fetchFromGitHub, fetchpatch, wrapQtAppsHook
+, cmake, pkg-config
+, libpulseaudio, libjack2, alsaLib, sndio
+, vulkan-loader, vulkan-headers
+, qtbase, qtwebengine, qttools
+, nlohmann_json, rapidjson
+, zlib, zstd, libzip, lz4
+, glslang
+, boost173
+, catch2
+, fmt
+, SDL2
+, udev
+, libusb1
+, ffmpeg
+}:
+
+stdenv.mkDerivation rec {
+  inherit pname version src;
+
+  nativeBuildInputs = [ cmake pkg-config wrapQtAppsHook ];
+  buildInputs = [
+    libpulseaudio libjack2 alsaLib sndio
+    vulkan-loader vulkan-headers
+    qtbase qtwebengine qttools
+    nlohmann_json rapidjson
+    zlib zstd libzip lz4
+    glslang
+    boost173
+    catch2
+    fmt
+    SDL2
+    udev
+    libusb1
+    ffmpeg
+  ];
+
+  patches = [
+    (fetchpatch { # Without this, yuzu tries to read version info from .git which is not present.
+      url = "https://raw.githubusercontent.com/pineappleEA/Pineapple-Linux/28cbf656e3188b80eda0031d0b2713708ecd630f/inject-git-info.patch";
+      sha256 = "1zxh5fwdr7jl0aagb3yfwd0995vyyk54f0f748f7c4rqvg6867fd";
+    })
+  ];
+
+  cmakeFlags = [
+    "-DENABLE_QT_TRANSLATION=ON"
+    "-DYUZU_USE_QT_WEB_ENGINE=ON"
+    "-DUSE_DISCORD_PRESENCE=ON"
+    # Shows errors about not being able to find .git at runtime if you do not set these
+    "-DGIT_BRANCH=\"\""
+    "-DGIT_DESC=\"\""
+  ];
+
+  preConfigure = ''
+    # Trick the configure system. This prevents a check for submodule directories.
+    rm -f .gitmodules
+
+    # see https://github.com/NixOS/nixpkgs/issues/114044, setting this through cmakeFlags does not work.
+    cmakeFlagsArray+=(
+      "-DTITLE_BAR_FORMAT_IDLE=\"yuzu ${branchName} ${version}\""
+      "-DTITLE_BAR_FORMAT_RUNNING=\"yuzu ${branchName} ${version} \| \{3\}\""
+    )
+  '';
+
+  # Fix vulkan detection
+  postFixup = ''
+    wrapProgram $out/bin/yuzu --prefix LD_LIBRARY_PATH : ${vulkan-loader}/lib
+    wrapProgram $out/bin/yuzu-cmd --prefix LD_LIBRARY_PATH : ${vulkan-loader}/lib
+  '';
+
+  meta = with lib; {
+    homepage = "https://yuzu-emu.org";
+    description = "The ${branchName} branch of an experimental Nintendo Switch emulator written in C++";
+    longDescription = ''
+      An experimental Nintendo Switch emulator written in C++.
+      Using the mainline branch is recommanded for general usage.
+      Using the early-access branch is recommanded if you would like to try out experimental features, with a cost of stability.
+    '';
+    license = with licenses; [
+      gpl2Plus
+      # Icons
+      cc-by-nd-30 cc0
+    ];
+    maintainers = with maintainers; [ ivar joshuafern ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/misc/emulators/yuzu/default.nix b/nixpkgs/pkgs/misc/emulators/yuzu/default.nix
new file mode 100644
index 000000000000..d47c5937385c
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/yuzu/default.nix
@@ -0,0 +1,28 @@
+{ branch ? "mainline", libsForQt5, fetchFromGitHub }:
+let
+  inherit libsForQt5 fetchFromGitHub;
+in {
+  mainline = libsForQt5.callPackage ./base.nix rec {
+    pname = "yuzu-mainline";
+    version = "576";
+    branchName = branch;
+    src = fetchFromGitHub {
+      owner = "yuzu-emu";
+      repo = "yuzu-mainline";
+      rev = "mainline-0-${version}";
+      sha256 = "121pn3kmghpcf4pzs0mc8z3viyp32rzm7rssva7cdd5016z2648k";
+      fetchSubmodules = true;
+    };
+  };
+  early-access = libsForQt5.callPackage ./base.nix rec {
+    pname = "yuzu-ea";
+    version = "1536";
+    branchName = branch;
+    src = fetchFromGitHub {
+      owner = "pineappleEA";
+      repo = "pineapple-src";
+      rev = "EA-${version}";
+      sha256 = "0smrx05xxr4b96i8bw6n6pynkl9r21ydfvpjdzxkr9amin20r54y";
+    };
+  };
+}.${branch}
diff --git a/nixpkgs/pkgs/misc/emulators/zsnes/default.nix b/nixpkgs/pkgs/misc/emulators/zsnes/default.nix
new file mode 100644
index 000000000000..4a6b1fbda279
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/zsnes/default.nix
@@ -0,0 +1,63 @@
+{ lib, stdenv, fetchFromGitHub, nasm, SDL, zlib, libpng, ncurses, libGLU, libGL
+, makeDesktopItem }:
+
+let
+  desktopItem = makeDesktopItem {
+    name = "zsnes";
+    exec = "zsnes";
+    icon = "zsnes";
+    comment = "A SNES emulator";
+    desktopName = "zsnes";
+    genericName = "zsnes";
+    categories = "Game;";
+  };
+
+in stdenv.mkDerivation {
+  name = "zsnes-1.51";
+
+  src = fetchFromGitHub {
+    owner = "emillon";
+    repo = "zsnes";
+    rev = "fc160b2538738995f600f8405d23a66b070dac02";
+    sha256 = "1gy79d5wdaacph0cc1amw7mqm7i0716n6mvav16p1svi26iz193v";
+  };
+
+  buildInputs = [ nasm SDL zlib libpng ncurses libGLU libGL ];
+
+  prePatch = ''
+    for i in $(cat debian/patches/series); do
+      echo "applying $i"
+      patch -p1 < "debian/patches/$i"
+    done
+  '';
+
+  preConfigure = ''
+    cd src
+    sed -i "/^STRIP/d" configure
+    sed -i "/\$STRIP/d" configure
+  '';
+
+  configureFlags = [ "--enable-release" ];
+
+  postInstall = ''
+    function installIcon () {
+        mkdir -p $out/share/icons/hicolor/$1/apps/
+        cp icons/$1x32.png $out/share/icons/hicolor/$1/apps/zsnes.png
+    }
+    installIcon "16x16"
+    installIcon "32x32"
+    installIcon "48x48"
+    installIcon "64x64"
+
+    mkdir -p $out/share/applications
+    ln -s ${desktopItem}/share/applications/* $out/share/applications/
+  '';
+
+  meta = {
+    description = "A Super Nintendo Entertainment System Emulator";
+    license = lib.licenses.gpl2Plus;
+    maintainers = [ lib.maintainers.sander ];
+    homepage = "http://www.zsnes.com";
+    platforms = [ "i686-linux" "x86_64-linux" ];
+  };
+}
diff --git a/nixpkgs/pkgs/misc/flashfocus/default.nix b/nixpkgs/pkgs/misc/flashfocus/default.nix
new file mode 100644
index 000000000000..2b645817a7e5
--- /dev/null
+++ b/nixpkgs/pkgs/misc/flashfocus/default.nix
@@ -0,0 +1,38 @@
+{ lib, python3 }:
+
+python3.pkgs.buildPythonApplication rec {
+  pname = "flashfocus";
+  version = "2.2.2";
+
+  src = python3.pkgs.fetchPypi {
+    inherit pname version;
+    sha256 = "1z20d596rnc7cs0rrd221gjn14dmbr11djv94y9p4v7rr788sswv";
+  };
+
+  nativeBuildInputs = with python3.pkgs; [
+    pytestrunner
+  ];
+
+  propagatedBuildInputs = with python3.pkgs; [
+    i3ipc
+    xcffib
+    click
+    cffi
+    xpybutil
+    marshmallow
+    pyyaml
+  ];
+
+  # Tests require access to a X session
+  doCheck = false;
+
+  pythonImportsCheck = [ "flashfocus" ];
+
+  meta = with lib; {
+    homepage = "https://github.com/fennerm/flashfocus";
+    description = "Simple focus animations for tiling window managers";
+    license = licenses.mit;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ artturin ];
+  };
+}
diff --git a/nixpkgs/pkgs/misc/frescobaldi/default.nix b/nixpkgs/pkgs/misc/frescobaldi/default.nix
new file mode 100644
index 000000000000..82a3aa8c7bef
--- /dev/null
+++ b/nixpkgs/pkgs/misc/frescobaldi/default.nix
@@ -0,0 +1,49 @@
+{ lib, buildPythonApplication, fetchFromGitHub, python3Packages, pyqtwebengine, lilypond }:
+
+buildPythonApplication rec {
+  pname = "frescobaldi";
+  version = "3.1.1";
+
+  src = fetchFromGitHub {
+    owner = "wbsoft";
+    repo = "frescobaldi";
+    rev = "v${version}";
+    sha256 = "07hjlq29npasn2bsb3qrzr1gikyvcc85avx0sxybfih329bvjk03";
+  };
+
+  propagatedBuildInputs = with python3Packages; [
+    lilypond pygame python-ly sip
+    pyqt5 poppler-qt5
+    pyqtwebengine
+  ];
+
+  nativeBuildInputs = [ pyqtwebengine.wrapQtAppsHook ];
+
+  # no tests in shipped with upstream
+  doCheck = false;
+
+  dontWrapQtApps = true;
+  makeWrapperArgs = [
+      "\${qtWrapperArgs[@]}"
+  ];
+
+  meta = with lib; {
+    homepage = "https://frescobaldi.org/";
+    description = "A LilyPond sheet music text editor";
+    longDescription = ''
+      Powerful text editor with syntax highlighting and automatic completion,
+      Music view with advanced Point & Click, Midi player to proof-listen
+      LilyPond-generated MIDI files, Midi capturing to enter music,
+      Powerful Score Wizard to quickly setup a music score, Snippet Manager
+      to store and apply text snippets, templates or scripts, Use multiple
+      versions of LilyPond, automatically selects the correct version, Built-in
+      LilyPond documentation browser and built-in User Guide, Smart
+      layout-control functions like coloring specific objects in the PDF,
+      MusicXML import, Modern user iterface with configurable colors,
+      fonts and keyboard shortcuts
+    '';
+    license = licenses.gpl2Plus;
+    maintainers = with maintainers; [ sepi ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/misc/ghostscript/default.nix b/nixpkgs/pkgs/misc/ghostscript/default.nix
new file mode 100644
index 000000000000..760ec2bc0534
--- /dev/null
+++ b/nixpkgs/pkgs/misc/ghostscript/default.nix
@@ -0,0 +1,140 @@
+{ config, stdenv, lib, fetchurl, pkg-config, zlib, expat, openssl, autoconf
+, libjpeg, libpng, libtiff, freetype, fontconfig, libpaper, jbig2dec
+, libiconv, ijs, lcms2, fetchpatch
+, cupsSupport ? config.ghostscript.cups or (!stdenv.isDarwin), cups ? null
+, x11Support ? cupsSupport, xlibsWrapper ? null # with CUPS, X11 only adds very little
+}:
+
+assert x11Support -> xlibsWrapper != null;
+assert cupsSupport -> cups != null;
+
+let
+  fonts = stdenv.mkDerivation {
+    name = "ghostscript-fonts";
+
+    srcs = [
+      (fetchurl {
+        url = "mirror://sourceforge/gs-fonts/ghostscript-fonts-std-8.11.tar.gz";
+        sha256 = "00f4l10xd826kak51wsmaz69szzm2wp8a41jasr4jblz25bg7dhf";
+      })
+      (fetchurl {
+        url = "mirror://gnu/ghostscript/gnu-gs-fonts-other-6.0.tar.gz";
+        sha256 = "1cxaah3r52qq152bbkiyj2f7dx1rf38vsihlhjmrvzlr8v6cqil1";
+      })
+      # ... add other fonts here
+    ];
+
+    installPhase = ''
+      mkdir "$out"
+      mv -v * "$out/"
+    '';
+  };
+
+in
+stdenv.mkDerivation rec {
+  pname = "ghostscript";
+  version = "9.53.3";
+
+  src = fetchurl {
+    url = "https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs9${lib.versions.minor version}${lib.versions.patch version}/${pname}-${version}.tar.xz";
+    sha512 = "2vif3vgxa5wma16yxvhhkymk4p309y5204yykarq94r5rk890556d2lj5w7acnaa2ymkym6y0zd4vq9sy9ca2346igg2c6dxqkjr0zb";
+  };
+
+  patches = [
+    (fetchpatch {
+      url = "https://github.com/ArtifexSoftware/ghostpdl/commit/41ef9a0bc36b9db7115fbe9623f989bfb47bbade.patch";
+      sha256 = "1qpc6q1fpxshqc0mqgg36kng47kgljk50bmr8p7wn21jgfkh7m8w";
+    })
+    ./urw-font-files.patch
+    ./doc-no-ref.diff
+  ];
+
+  outputs = [ "out" "man" "doc" ];
+
+  enableParallelBuilding = true;
+
+  nativeBuildInputs = [ pkg-config autoconf ];
+  buildInputs =
+    [ zlib expat openssl
+      libjpeg libpng libtiff freetype fontconfig libpaper jbig2dec
+      libiconv ijs lcms2
+    ]
+    ++ lib.optional x11Support xlibsWrapper
+    ++ lib.optional cupsSupport cups
+    ;
+
+  preConfigure = ''
+    # requires in-tree (heavily patched) openjpeg
+    rm -rf jpeg libpng zlib jasper expat tiff lcms2mt jbig2dec freetype cups/libs ijs
+
+    sed "s@if ( test -f \$(INCLUDE)[^ ]* )@if ( true )@; s@INCLUDE=/usr/include@INCLUDE=/no-such-path@" -i base/unix-aux.mak
+    sed "s@^ZLIBDIR=.*@ZLIBDIR=${zlib.dev}/include@" -i configure.ac
+
+    autoconf
+  '';
+
+  configureFlags = [
+    "--with-system-libtiff"
+    "--enable-dynamic"
+  ]
+  ++ lib.optional x11Support "--with-x"
+  ++ lib.optionals cupsSupport [
+    "--enable-cups"
+    "--with-cups-serverbin=$(out)/lib/cups"
+    "--with-cups-serverroot=$(out)/etc/cups"
+    "--with-cups-datadir=$(out)/share/cups"
+  ];
+
+  doCheck = true;
+
+  # don't build/install statically linked bin/gs
+  buildFlags = [ "so" ];
+  installTargets = [ "soinstall" ];
+
+  postInstall = ''
+    ln -s gsc "$out"/bin/gs
+
+    cp -r Resource "$out/share/ghostscript/${version}"
+
+    ln -s "${fonts}" "$out/share/ghostscript/fonts"
+  '' + lib.optionalString stdenv.isDarwin ''
+    for file in $out/lib/*.dylib* ; do
+      install_name_tool -id "$file" $file
+    done
+  '';
+
+  # dynamic library name only contains maj.min, eg. '9.53'
+  dylib_version = lib.versions.majorMinor version;
+  preFixup = lib.optionalString stdenv.isDarwin ''
+    install_name_tool -change libgs.dylib.$dylib_version $out/lib/libgs.dylib.$dylib_version $out/bin/gs
+  '';
+
+  # validate dynamic linkage
+  doInstallCheck = true;
+  installCheckPhase = ''
+    runHook preInstallCheck
+
+    $out/bin/gs --version
+
+    runHook postInstallCheck
+  '';
+
+  meta = {
+    homepage = "https://www.ghostscript.com/";
+    description = "PostScript interpreter (mainline version)";
+
+    longDescription = ''
+      Ghostscript is the name of a set of tools that provides (i) an
+      interpreter for the PostScript language and the PDF file format,
+      (ii) a set of C procedures (the Ghostscript library) that
+      implement the graphics capabilities that appear as primitive
+      operations in the PostScript language, and (iii) a wide variety
+      of output drivers for various file formats and printers.
+    '';
+
+    license = lib.licenses.agpl3;
+
+    platforms = lib.platforms.all;
+    maintainers = [ lib.maintainers.viric ];
+  };
+}
diff --git a/nixpkgs/pkgs/misc/ghostscript/doc-no-ref.diff b/nixpkgs/pkgs/misc/ghostscript/doc-no-ref.diff
new file mode 100644
index 000000000000..7380ba2f9953
--- /dev/null
+++ b/nixpkgs/pkgs/misc/ghostscript/doc-no-ref.diff
@@ -0,0 +1,7 @@
+Kill the reference from libgc.so to the documentation directory.
+It's bad for closure, and probably not really good for anything.
+--- a/base/gs.mak
++++ b/base/gs.mak
+@@ -538,1 +538,1 @@
+-	$(EXP)$(ECHOGS_XE) -a $(gconfigd_h) -x 23 define -s -u GS_DOCDIR -x 2022 $(GS_DOCDIR) -x 22
++	$(EXP)$(ECHOGS_XE) -a $(gconfigd_h) -x 23 define -s -u GS_DOCDIR -x 2022 /no-path-to-docs -x 22
diff --git a/nixpkgs/pkgs/misc/ghostscript/urw-font-files.patch b/nixpkgs/pkgs/misc/ghostscript/urw-font-files.patch
new file mode 100644
index 000000000000..9a4aab0bbbef
--- /dev/null
+++ b/nixpkgs/pkgs/misc/ghostscript/urw-font-files.patch
@@ -0,0 +1,61 @@
+Sometime between 8.62 and 8.64, the fontmap file was changed such that the
+`.pfb' files of the URW++ fonts no longer appear in 8.64, making it impossible
+to display/render these fonts.
+
+--- gnu-ghostscript-8.64/Resource/Init/Fontmap.GS	2009-05-27 02:19:02.000000000 +0200
++++ gnu-ghostscript-8.62/Resource/Init/Fontmap.GS	2009-05-27 02:19:09.000000000 +0200
+@@ -81,6 +81,54 @@
+ %	Copyright URW Software, Copyright 1994 by URW.
+ %
+ 
++% Actual fonts
++
++/URWBookmanL-DemiBold	(b018015l.pfb)	;
++/URWBookmanL-DemiBoldItal	(b018035l.pfb)	;
++/URWBookmanL-Ligh	(b018012l.pfb)	;
++/URWBookmanL-LighItal	(b018032l.pfb)	;
++
++/NimbusMonL-Regu	(n022003l.pfb)	;
++/NimbusMonL-ReguObli	(n022023l.pfb)	;
++/NimbusMonL-Bold	(n022004l.pfb)	;
++/NimbusMonL-BoldObli	(n022024l.pfb)	;
++
++/URWGothicL-Book	(a010013l.pfb)	;
++/URWGothicL-BookObli	(a010033l.pfb)	;
++/URWGothicL-Demi	(a010015l.pfb)	;
++/URWGothicL-DemiObli	(a010035l.pfb)	;
++
++/NimbusSanL-Regu	(n019003l.pfb)	;
++/NimbusSanL-ReguItal	(n019023l.pfb)	;
++/NimbusSanL-Bold	(n019004l.pfb)	;
++/NimbusSanL-BoldItal	(n019024l.pfb)	;
++
++/NimbusSanL-ReguCond	(n019043l.pfb)	;
++/NimbusSanL-ReguCondItal	(n019063l.pfb)	;
++/NimbusSanL-BoldCond	(n019044l.pfb)	;
++/NimbusSanL-BoldCondItal	(n019064l.pfb)	;
++
++/URWPalladioL-Roma	(p052003l.pfb)	;
++/URWPalladioL-Ital	(p052023l.pfb)	;
++/URWPalladioL-Bold	(p052004l.pfb)	;
++/URWPalladioL-BoldItal	(p052024l.pfb)	;
++
++/CenturySchL-Roma	(c059013l.pfb)	;
++/CenturySchL-Ital	(c059033l.pfb)	;
++/CenturySchL-Bold	(c059016l.pfb)	;
++/CenturySchL-BoldItal	(c059036l.pfb)	;
++
++/NimbusRomNo9L-Regu	(n021003l.pfb)	;
++/NimbusRomNo9L-ReguItal	(n021023l.pfb)	;
++/NimbusRomNo9L-Medi	(n021004l.pfb)	;
++/NimbusRomNo9L-MediItal	(n021024l.pfb)	;
++
++/StandardSymL	(s050000l.pfb)	;
++
++/URWChanceryL-MediItal	(z003034l.pfb)	;
++
++/Dingbats	(d050000l.pfb)	;
++
+ % Aliases
+ 
+ /Bookman-Demi			/URWBookmanL-DemiBold	;
diff --git a/nixpkgs/pkgs/misc/gnash/default.nix b/nixpkgs/pkgs/misc/gnash/default.nix
new file mode 100644
index 000000000000..9f5f022b8538
--- /dev/null
+++ b/nixpkgs/pkgs/misc/gnash/default.nix
@@ -0,0 +1,130 @@
+{ lib, stdenv, fetchgit, fetchpatch, autoreconfHook
+, pkg-config, libtool, boost, SDL
+, glib, pango, gettext, curl, xorg
+, libpng, libjpeg, giflib, speex, atk
+
+# renderers
+, enableAGG    ? true,  agg   ? null
+, enableCairo  ? false, cairo ? null
+, enableOpenGL ? false
+, libGLU ? null
+, libGL  ? null
+
+# GUI toolkits
+, enableGTK ? true,  gtk2 ? null, gnome2 ? null
+, enableSDL ? false
+, enableQt  ? false, qt4  ? null
+
+# media
+, enableFFmpeg   ? true, ffmpeg_2 ? null
+
+# misc
+, enableJemalloc ? true, jemalloc ? null
+, enableHwAccel  ? true
+, enablePlugins  ? false, xulrunner ? null, npapi_sdk ? null
+}:
+
+with lib;
+
+let
+  available = x: x != null;
+
+  sound =
+    if enableFFmpeg then "ffmpeg" else "none";
+
+  renderers = []
+    ++ optional enableAGG    "agg"
+    ++ optional enableCairo  "cairo"
+    ++ optional enableOpenGL "opengl";
+
+  toolkits = []
+    ++ optional enableGTK "gtk"
+    ++ optional enableSDL "sdl"
+    ++ optional enableQt  "qt4";
+
+in
+
+# renderers
+assert enableAGG    -> available agg;
+assert enableCairo  -> available cairo;
+assert enableOpenGL -> all available [ libGLU libGL ];
+
+# GUI toolkits
+assert enableGTK -> all available [ gtk2 gnome2.gtkglext gnome2.GConf ];
+assert enableSDL -> available SDL;
+assert enableQt  -> available qt4;
+
+# media libraries
+assert enableFFmpeg    -> available ffmpeg_2 ;
+
+# misc
+assert enableJemalloc -> available jemalloc;
+assert enableHwAccel  -> all available [ libGLU libGL ];
+assert enablePlugins  -> all available [ xulrunner npapi_sdk ];
+
+assert length toolkits  == 0 -> throw "at least one GUI toolkit must be enabled";
+assert length renderers == 0 -> throw "at least one renderer must be enabled";
+
+
+stdenv.mkDerivation {
+  pname = "gnash";
+  version = "0.8.11-2019-30-01";
+
+  src = fetchgit {
+    url = "git://git.sv.gnu.org/gnash.git";
+    rev = "583ccbc1275c7701dc4843ec12142ff86bb305b4";
+    sha256 = "0fh0bljn0i6ypyh6l99afi855p7ki7lm869nq1qj6k8hrrwhmfry";
+  };
+
+  postPatch = ''
+    sed -i 's|jemalloc.h|jemalloc/jemalloc.h|' libbase/jemalloc_gnash.c
+  '';
+
+  nativeBuildInputs = [ autoreconfHook pkg-config libtool ];
+  buildInputs = [
+    glib gettext boost curl SDL speex
+    xorg.libXmu xorg.libSM xorg.libXt
+    libpng libjpeg giflib pango atk
+  ] ++ optional  enableAGG       agg
+    ++ optional  enableCairo     cairo
+    ++ optional  enableQt        qt4
+    ++ optional  enableFFmpeg    ffmpeg_2
+    ++ optional  enableJemalloc  jemalloc
+    ++ optional  enableHwAccel   [ libGL libGLU ]
+    ++ optionals enableOpenGL    [ libGL libGLU ]
+    ++ optionals enablePlugins   [ xulrunner npapi_sdk ]
+    ++ optionals enableGTK       [ gtk2 gnome2.gtkglext gnome2.GConf ];
+
+  patches = [
+    (fetchpatch { # fix compilation due to bad detection of libgif version: https://savannah.gnu.org/patch/index.php?9873
+      url = "https://savannah.gnu.org/patch/download.php?file_id=47859";
+      sha256 = "0aimayzgi5065gkcfcr8d5lkd9c0471q7dqmln42hjzq847n6d5y";
+    })
+
+    # Fix build with modern Pango
+    # https://savannah.gnu.org/bugs/index.php?57759
+    (fetchpatch {
+      url = "https://savannah.gnu.org/file/0001-Do-not-depend-on-pangox.patch?file_id=48366";
+      sha256 = "02x7sl5zwd1ld2n4b6bp16c5gk91qsap0spfbb5iwpglq3galv2l";
+    })
+  ];
+
+  configureFlags = with lib; [
+    "--with-boost-incl=${boost.dev}/include"
+    "--with-boost-lib=${boost.out}/lib"
+    "--enable-renderer=${concatStringsSep "," renderers}"
+    "--enable-gui=${concatStringsSep "," toolkits}"
+    "--enable-media=${sound}"
+    "--with-npapi-install=prefix"
+    (enableFeature enablePlugins  "plugins")
+    (enableFeature enableJemalloc "jemalloc")
+    (optionalString enableHwAccel "--enable-device=egl")
+  ];
+
+  meta = {
+    homepage    = "https://savannah.gnu.org/projects/gnash";
+    description = "A flash (SWF) player and browser plugin";
+    license     = licenses.gpl3;
+    maintainers = with maintainers; [ rnhmjoj ];
+  };
+}
diff --git a/nixpkgs/pkgs/misc/gnuk/default.nix b/nixpkgs/pkgs/misc/gnuk/default.nix
new file mode 100644
index 000000000000..afef861c0dc4
--- /dev/null
+++ b/nixpkgs/pkgs/misc/gnuk/default.nix
@@ -0,0 +1,11 @@
+{ callPackage, fetchgit, ... } @ args:
+
+callPackage ./generic.nix (args // {
+  version = "1.2.14";
+
+  src = fetchgit {
+    url = "git://git.gniibe.org/gnuk/gnuk.git";
+    rev = "177ef67edfa2306c2a369a037362385c354083e1";
+    sha256 = "16wa3xsaq4r8caw6c24hnv4j78bklacix4in2y66j35h68ggr3j1";
+  };
+})
diff --git a/nixpkgs/pkgs/misc/gnuk/generic.nix b/nixpkgs/pkgs/misc/gnuk/generic.nix
new file mode 100644
index 000000000000..b614dd52a378
--- /dev/null
+++ b/nixpkgs/pkgs/misc/gnuk/generic.nix
@@ -0,0 +1,52 @@
+{ lib, stdenv, gcc-arm-embedded, binutils-arm-embedded, makeWrapper
+, python2Packages
+
+# Extra options
+, device ? "fsij", vid ? "234b", pid ? "0000"
+
+# Version specific options
+, version, src
+, ...
+}:
+
+stdenv.mkDerivation {
+  name = "gnuk-${version}-${device}";
+
+  inherit src;
+
+  nativeBuildInputs = [ gcc-arm-embedded binutils-arm-embedded makeWrapper ];
+  buildInputs = with python2Packages; [ python pyusb colorama ];
+
+  configurePhase = ''
+    cd src
+    patchShebangs configure
+    ./configure --vidpid=${vid}:${pid}
+  '';
+
+  installPhase = ''
+    mkdir -p $out/bin
+
+    find . -name gnuk.bin -exec cp {} $out \;
+
+    #sed -i 's,Exception as e,IOError as e,' ../tool/stlinkv2.py
+    sed -i ../tool/stlinkv2.py \
+      -e "1a import array" \
+      -e "s,\(data_received =\) (),\1 array.array('B'),g" \
+      -e "s,\(data_received\) = data_received + \(.*\),\1.extend(\2),g"
+    cp ../tool/stlinkv2.py $out/bin/stlinkv2
+    wrapProgram $out/bin/stlinkv2 --prefix PYTHONPATH : "$PYTHONPATH"
+
+    # Some useful helpers
+    echo "#! ${stdenv.shell} -e" | tee $out/bin/{unlock,flash}
+    echo "$out/bin/stlinkv2 -u \$@" >> $out/bin/unlock
+    echo "$out/bin/stlinkv2 -b \$@ $out/gnuk.bin" >> $out/bin/flash
+    chmod +x $out/bin/{unlock,flash}
+  '';
+
+  meta = with lib; {
+    homepage = "http://www.fsij.org/pages/gnuk";
+    description = "An implementation of USB cryptographic token for gpg";
+    license = licenses.gpl3;
+    platforms = with platforms; linux;
+  };
+}
diff --git a/nixpkgs/pkgs/misc/hdt/default.nix b/nixpkgs/pkgs/misc/hdt/default.nix
new file mode 100644
index 000000000000..9e1efd5f836d
--- /dev/null
+++ b/nixpkgs/pkgs/misc/hdt/default.nix
@@ -0,0 +1,27 @@
+{ lib, stdenv, fetchFromGitHub, autoreconfHook, libtool, pkg-config, zlib, serd }:
+
+stdenv.mkDerivation rec {
+  pname = "hdt";
+  version = "1.3.3";
+
+  src = fetchFromGitHub {
+    owner = "rdfhdt";
+    repo = "hdt-cpp";
+    rev = "v${version}";
+    sha256 = "1vsq80jnix6cy78ayag7v8ajyw7h8dqyad1q6xkf2hzz3skvr34z";
+  };
+
+  buildInputs = [ zlib serd ];
+
+  nativeBuildInputs = [ autoreconfHook libtool pkg-config ];
+
+  enableParallelBuilding = true;
+
+  meta = with lib; {
+    homepage = "http://www.rdfhdt.org/";
+    description = "Header Dictionary Triples (HDT) is a compression format for RDF data that can also be queried for Triple Patterns";
+    license = licenses.lgpl21;
+    platforms = platforms.linux;
+    maintainers = [ maintainers.koslambrou ];
+  };
+}
diff --git a/nixpkgs/pkgs/misc/jackaudio/default.nix b/nixpkgs/pkgs/misc/jackaudio/default.nix
new file mode 100644
index 000000000000..9dd973674412
--- /dev/null
+++ b/nixpkgs/pkgs/misc/jackaudio/default.nix
@@ -0,0 +1,75 @@
+{ lib, stdenv, fetchFromGitHub, pkg-config, python3Packages, makeWrapper
+, bash, libsamplerate, libsndfile, readline, eigen, celt
+, wafHook
+# Darwin Dependencies
+, aften, AudioUnit, CoreAudio, libobjc, Accelerate
+
+# Optional Dependencies
+, dbus ? null, libffado ? null, alsaLib ? null
+, libopus ? null
+
+# Extra options
+, prefix ? ""
+}:
+
+with lib;
+let
+  inherit (python3Packages) python dbus-python;
+  shouldUsePkg = pkg: if pkg != null && lib.any (lib.meta.platformMatch stdenv.hostPlatform) pkg.meta.platforms then pkg else null;
+
+  libOnly = prefix == "lib";
+
+  optDbus = if stdenv.isDarwin then null else shouldUsePkg dbus;
+  optPythonDBus = if libOnly then null else shouldUsePkg dbus-python;
+  optLibffado = if libOnly then null else shouldUsePkg libffado;
+  optAlsaLib = if libOnly then null else shouldUsePkg alsaLib;
+  optLibopus = shouldUsePkg libopus;
+in
+stdenv.mkDerivation rec {
+  name = "${prefix}jack2-${version}";
+  version = "1.9.17";
+
+  src = fetchFromGitHub {
+    owner = "jackaudio";
+    repo = "jack2";
+    rev = "v${version}";
+    sha256 = "sha256-T6UJpLsXrsIL3HaChfVP52w0v9DCs/sJqty2/kAWNfE=";
+  };
+
+  nativeBuildInputs = [ pkg-config python makeWrapper wafHook ];
+  buildInputs = [ libsamplerate libsndfile readline eigen celt
+    optDbus optPythonDBus optLibffado optAlsaLib optLibopus
+  ] ++ optionals stdenv.isDarwin [
+    aften AudioUnit CoreAudio Accelerate libobjc
+  ];
+
+  prePatch = ''
+    substituteInPlace svnversion_regenerate.sh \
+        --replace /bin/bash ${bash}/bin/bash
+  '';
+
+  PKGCONFIG = "${stdenv.cc.targetPrefix}pkg-config";
+
+  dontAddWafCrossFlags = "true";
+  wafConfigureFlags = [
+    "--classic"
+    "--autostart=${if (optDbus != null) then "dbus" else "classic"}"
+  ] ++ optional (optDbus != null) "--dbus"
+    ++ optional (optLibffado != null) "--firewire"
+    ++ optional (optAlsaLib != null) "--alsa";
+
+  postInstall = (if libOnly then ''
+    rm -rf $out/{bin,share}
+    rm -rf $out/lib/{jack,libjacknet*,libjackserver*}
+  '' else ''
+    wrapProgram $out/bin/jack_control --set PYTHONPATH $PYTHONPATH
+  '');
+
+  meta = {
+    description = "JACK audio connection kit, version 2 with jackdbus";
+    homepage = "https://jackaudio.org";
+    license = licenses.gpl2Plus;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ goibhniu ];
+  };
+}
diff --git a/nixpkgs/pkgs/misc/jackaudio/jack1.nix b/nixpkgs/pkgs/misc/jackaudio/jack1.nix
new file mode 100644
index 000000000000..ea7356b32e91
--- /dev/null
+++ b/nixpkgs/pkgs/misc/jackaudio/jack1.nix
@@ -0,0 +1,39 @@
+{ lib, stdenv, fetchurl, pkg-config
+
+# Optional Dependencies
+, alsaLib ? null, db ? null, libuuid ? null, libffado ? null, celt ? null
+}:
+
+let
+  shouldUsePkg = pkg: if pkg != null && lib.any (lib.meta.platformMatch stdenv.hostPlatform) pkg.meta.platforms then pkg else null;
+
+  optAlsaLib = shouldUsePkg alsaLib;
+  optDb = shouldUsePkg db;
+  optLibuuid = shouldUsePkg libuuid;
+  optLibffado = shouldUsePkg libffado;
+  optCelt = shouldUsePkg celt;
+in
+stdenv.mkDerivation rec {
+  pname = "jack1";
+  version = "0.125.0";
+
+  src = fetchurl {
+    url = "https://jackaudio.org/downloads/jack-audio-connection-kit-${version}.tar.gz";
+    sha256 = "0i6l25dmfk2ji2lrakqq9icnwjxklgcjzzk65dmsff91z2zva5rm";
+  };
+
+  configureFlags = [
+    (lib.enableFeature (optLibffado != null) "firewire")
+  ];
+
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = [ optAlsaLib optDb optLibffado optCelt ];
+  propagatedBuildInputs = [ optLibuuid ];
+
+  meta = with lib; {
+    description = "JACK audio connection kit";
+    homepage = "https://jackaudio.org";
+    license = with licenses; [ gpl2 lgpl21 ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/misc/lguf-brightness/default.nix b/nixpkgs/pkgs/misc/lguf-brightness/default.nix
new file mode 100644
index 000000000000..efdc8e151482
--- /dev/null
+++ b/nixpkgs/pkgs/misc/lguf-brightness/default.nix
@@ -0,0 +1,30 @@
+{ lib, stdenv, fetchFromGitHub, cmake, libusb1, ncurses5 }:
+
+stdenv.mkDerivation rec {
+  pname = "lguf-brightness";
+
+  version = "unstable-2018-02-11";
+
+  src = fetchFromGitHub  {
+    owner = "periklis";
+    repo = pname;
+    rev = "fcb2bc1738d55c83b6395c24edc27267a520a725";
+    sha256 = "0cf7cn2kpmlvz00qxqj1m5zxmh7i2x75djbj4wqk7if7a0nlrd5m";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  buildInputs = [ libusb1 ncurses5 ];
+
+  installPhase = ''
+    install -D lguf_brightness $out/bin/lguf_brightness
+  '';
+
+  meta = with lib; {
+    description = "Adjust brightness for LG UltraFine 4K display (cross platform)";
+    homepage = "https://github.com/periklis/lguf-brightness";
+    license = licenses.lgpl21Plus;
+    maintainers = with maintainers; [ periklis ];
+    platforms = with platforms; linux ++ darwin;
+  };
+}
diff --git a/nixpkgs/pkgs/misc/libcardiacarrest/default.nix b/nixpkgs/pkgs/misc/libcardiacarrest/default.nix
new file mode 100644
index 000000000000..4139c5b0f13e
--- /dev/null
+++ b/nixpkgs/pkgs/misc/libcardiacarrest/default.nix
@@ -0,0 +1,48 @@
+{ lib, stdenv, fetchFromGitHub, pkg-config, glib, libpulseaudio }:
+
+with lib;
+
+stdenv.mkDerivation rec {
+  pname = "libcardiacarrest";
+  version = "12.2.8"; # <PA API version>.<version>
+
+  src = fetchFromGitHub {
+    owner = "oxij";
+    repo = "libcardiacarrest";
+    rev = "d89639f5b2d298cf74af26880f5ebf50e645166d";
+    sha256 = "0vrigwcw3g8zknqyznv6y3437ahn1w00gv3d303smmygr0p8bd94";
+  };
+
+  outputs = [ "out" "dev" ];
+
+  nativeBuildInputs = [ pkg-config ];
+
+  buildInputs = [ glib ];
+
+  makeFlags = [ "PREFIX=$(out)" ];
+
+  postInstall = ''
+    moveToOutput $out/include $dev
+    moveToOutput $out/lib/pkgconfig $dev
+    moveToOutput $out/lib/cmake $dev
+  '';
+
+  meta = src.meta // {
+    description = "A trivial implementation of libpulse PulseAudio library API";
+    longDescription = ''
+      libcardiacarrest is a trivial implementation of libpulse
+      PulseAudio library API that unconditionally (but gracefully)
+      fails to connect to the PulseAudio daemon and does nothing else.
+
+      apulse and pressureaudio (which uses apulse internally) are an
+      inspiration for this but unlike those two projects
+      libcardiacarrest is not an emulation layer, all it does is it
+      gracefully fails to provide the requested PulseAudio service
+      hoping the application would try something else (e.g. ALSA or
+      JACK).
+    '';
+    license = libpulseaudio.meta.license; # "same as PA headers"
+    maintainers = [ maintainers.oxij ]; # also the author
+  };
+
+}
diff --git a/nixpkgs/pkgs/misc/lightspark/default.nix b/nixpkgs/pkgs/misc/lightspark/default.nix
new file mode 100644
index 000000000000..7c9a4815e0a5
--- /dev/null
+++ b/nixpkgs/pkgs/misc/lightspark/default.nix
@@ -0,0 +1,35 @@
+{ lib, stdenv, fetchFromGitHub, pkg-config, cmake, curl, zlib, ffmpeg_3, glew, pcre
+, rtmpdump, cairo, boost, SDL2, SDL2_mixer, libjpeg, pango, xz, nasm
+, llvm, glibmm
+}:
+
+stdenv.mkDerivation rec {
+  pname = "lightspark";
+  version = "0.8.4.1";
+
+  src = fetchFromGitHub {
+    owner = "lightspark";
+    repo = "lightspark";
+    rev = version;
+    sha256 = "sha256-pIiv5wEDLvTHjlYSicXUTTI6pVAsO6FC39Gie9Z/hZ4=";
+  };
+
+  patchPhase = ''
+    sed -i 's/SET(ETCDIR "\/etc")/SET(ETCDIR "etc")/g' CMakeLists.txt
+  '';
+
+  nativeBuildInputs = [ pkg-config cmake ];
+
+  buildInputs = [
+    curl zlib ffmpeg_3 glew pcre rtmpdump cairo boost SDL2 SDL2_mixer libjpeg
+    pango xz nasm llvm glibmm
+  ];
+
+  meta = with lib; {
+    description = "Open source Flash Player implementation";
+    homepage = "https://lightspark.github.io/";
+    license = licenses.lgpl3;
+    maintainers = with maintainers; [ jchw ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/misc/lilypond/default.nix b/nixpkgs/pkgs/misc/lilypond/default.nix
new file mode 100644
index 000000000000..d8db893f7d70
--- /dev/null
+++ b/nixpkgs/pkgs/misc/lilypond/default.nix
@@ -0,0 +1,60 @@
+{ stdenv, lib, fetchurl, ghostscript, gyre-fonts, texinfo, imagemagick, texi2html, guile
+, python3, gettext, flex, perl, bison, pkg-config, autoreconfHook, dblatex
+, fontconfig, freetype, pango, fontforge, help2man, zip, netpbm, groff
+, makeWrapper, t1utils
+, texlive, tex ? texlive.combine {
+    inherit (texlive) scheme-small lh metafont epsf;
+  }
+}:
+
+stdenv.mkDerivation rec {
+  pname = "lilypond";
+  version = "2.22.0";
+
+  src = fetchurl {
+    url = "http://lilypond.org/download/sources/v${lib.versions.majorMinor version}/lilypond-${version}.tar.gz";
+    sha256 = "0khg9dlm1b02mm9w54xqc9ydj416xkikn6p08g1asiyjf4qx1pb4";
+  };
+
+  postInstall = ''
+    for f in "$out/bin/"*; do
+        # Override default argv[0] setting so LilyPond can find
+        # its Scheme libraries.
+        wrapProgram "$f" --set GUILE_AUTO_COMPILE 0 \
+                         --set PATH "${ghostscript}/bin" \
+                         --argv0 "$f"
+    done
+  '';
+
+  configureFlags = [
+    "--disable-documentation"
+     # FIXME: these URW fonts are not OTF, configure reports "URW++ OTF files... no".
+    "--with-urwotf-dir=${ghostscript}/share/ghostscript/fonts"
+    "--with-texgyre-dir=${gyre-fonts}/share/fonts/truetype/"
+  ];
+
+  preConfigure = ''
+    sed -e "s@mem=mf2pt1@mem=$PWD/mf/mf2pt1@" -i scripts/build/mf2pt1.pl
+    export HOME=$TMPDIR/home
+  '';
+
+  nativeBuildInputs = [ autoreconfHook bison flex makeWrapper pkg-config ];
+
+  buildInputs =
+    [ ghostscript texinfo imagemagick texi2html guile dblatex tex zip netpbm
+      python3 gettext perl fontconfig freetype pango
+      fontforge help2man groff t1utils
+    ];
+
+  autoreconfPhase = "NOCONFIGURE=1 sh autogen.sh";
+
+  enableParallelBuilding = true;
+
+  meta = with lib; {
+    description = "Music typesetting system";
+    homepage = "http://lilypond.org/";
+    license = licenses.gpl3;
+    maintainers = with maintainers; [ marcweber yurrriq ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/misc/lilypond/fonts.nix b/nixpkgs/pkgs/misc/lilypond/fonts.nix
new file mode 100644
index 000000000000..ca87db757cc0
--- /dev/null
+++ b/nixpkgs/pkgs/misc/lilypond/fonts.nix
@@ -0,0 +1,136 @@
+{ lib, stdenv, fetchFromGitHub, lilypond }:
+
+let
+
+  olpFont = { fontName, rev, sha256, version ? rev, ... }:
+    stdenv.mkDerivation {
+      inherit version;
+      pname = "openlilypond-font-${fontName}";
+
+      src = fetchFromGitHub {
+        inherit rev sha256;
+        owner = "OpenLilyPondFonts";
+        repo = fontName;
+      };
+
+      phases = [ "unpackPhase" "installPhase" ];
+
+      installPhase = ''
+        local fontsdir="$out/share/lilypond/${lilypond.version}/fonts"
+
+        install -m755 -d "$fontsdir/otf"
+        for font in {otf,supplementary-fonts}/**.{o,t}tf; do
+          install -Dt "$fontsdir/otf" -m755 "$font"
+        done
+
+        install -m755 -d "$fontsdir/svg"
+        for font in svg/**.{svg,woff}; do
+          install -Dt "$fontsdir/svg" -m755 "$font"
+        done
+      '';
+
+      meta = with lib; {
+        inherit (lilypond.meta) homepage platforms;
+        description = "${fontName} font for LilyPond";
+        license = licenses.ofl;
+        maintainers = with maintainers; [ yurrriq ];
+      };
+    };
+
+in
+
+rec {
+  beethoven = olpFont {
+    fontName = "beethoven";
+    rev = "669f400";
+    sha256 = "17wdklg5shmqwnb7b81qavfg52v32wx5yf15c6al0hbvv1nqqj2i";
+  };
+  bravura = olpFont {
+    fontName = "bravura";
+    rev = "53c7744";
+    sha256 = "1p27w1c3bzxlnm6rzq8n7dbfjwbxqjy4r0fhkmk9jbm8awmzw214";
+  };
+  cadence = olpFont {
+    fontName = "cadence";
+    rev = "1cc0fb7";
+    sha256 = "1zxb3m8glh8iwj8mzcgyaxhlq0bji0rwniw702m70h9kpifiim1j";
+  };
+  gonville = olpFont {
+    fontName = "gonville";
+    rev = "a638bc9";
+    sha256 = "15khy9677crgd6bpajn7l1drysgxy49wiym3b248khgpavidwyy9";
+  };
+  gutenberg1939 = olpFont {
+    fontName = "gutenberg1939";
+    rev = "2316a35";
+    sha256 = "1lkhivmrx92z37zfrb5mkhzhwggyaga9cm0wl89r0n2f2kayyc7q";
+  };
+  haydn = olpFont {
+    fontName = "haydn";
+    rev = "9e7de8b";
+    sha256 = "1jmbhb2jm887sdc498l2jilpivq1d8lmmgdb8lp59lv8d9fx105z";
+  };
+  improviso = olpFont {
+    fontName = "improviso";
+    rev = "0753f5a";
+    sha256 = "1clin9c74gjhhira12mwxynxn4b1ixij5bg04mvk828lbr740mfm";
+  };
+  lilyboulez = olpFont {
+    fontName = "lilyboulez";
+    rev = "e8455fc";
+    sha256 = "0mq92x0rbgfb6s7ipgg2zcxika2si30w3ay89rp7m6vwca01649y";
+  };
+  lilyjazz = olpFont {
+    fontName = "lilyjazz";
+    rev = "8fa7d554";
+    sha256 = "1z7px7k2sn7snnj7yfjv0p9axwbn452vn9ww9icmb1249b0d1qry";
+  };
+  lv-goldenage = olpFont {
+    fontName = "lv-goldenage";
+    rev = "8a92fd3";
+    sha256 = "03nbd1vmlaj7wkhsnl2lq09nafv7zj1k518zs966vclzah94qghp";
+  };
+  paganini = olpFont {
+    fontName = "paganini";
+    rev = "8e4e55a";
+    sha256 = "0gw9wr4hfn205j40rpgnfddhzhn9x4pwfinamj5b7607880nvx29";
+  };
+  profondo = olpFont {
+    fontName = "profondo";
+    rev = "8cfb668";
+    sha256 = "0armwbg9y0l935949b7klngws6fq42fi944lws61qvjl61780br8";
+  };
+  ross = olpFont {
+    fontName = "ross";
+    rev = "aa8127f";
+    sha256 = "1w2x3pd1d1z4x0107dpq95v7m547cj4nkkzxgqpmzfqa0074idqd";
+  };
+  scorlatti = olpFont {
+    fontName = "scorlatti";
+    rev = "1db87da";
+    sha256 = "07jam5hwdy6bydrm98cdla6p6rl8lmy8zzsfq46i55l64l3w956h";
+  };
+  sebastiano = olpFont {
+    fontName = "sebastiano";
+    rev = "44bf262";
+    sha256 = "09i8p3p4z6vz69j187cpxvikkgc4pk6gxippahy0k7i7bh0d4qaj";
+  };
+
+  all = [
+    beethoven
+    bravura
+    cadence
+    gonville
+    gutenberg1939
+    haydn
+    improviso
+    lilyboulez
+    lilyjazz
+    lv-goldenage
+    paganini
+    profondo
+    ross
+    scorlatti
+    sebastiano
+  ];
+}
diff --git a/nixpkgs/pkgs/misc/lilypond/with-fonts.nix b/nixpkgs/pkgs/misc/lilypond/with-fonts.nix
new file mode 100644
index 000000000000..47cbb59f2f01
--- /dev/null
+++ b/nixpkgs/pkgs/misc/lilypond/with-fonts.nix
@@ -0,0 +1,18 @@
+{ lib, lndir, symlinkJoin, makeWrapper
+, lilypond, openlilylib-fonts
+}:
+
+lib.appendToName "with-fonts" (symlinkJoin {
+  inherit (lilypond) meta name version ;
+
+  paths = [ lilypond ] ++ openlilylib-fonts.all;
+
+  nativeBuildInputs = [ makeWrapper ];
+  buildInputs = [ lndir ];
+
+  postBuild = ''
+    for p in $out/bin/*; do
+        wrapProgram "$p" --set LILYPOND_DATADIR "$datadir"
+    done
+  '';
+})
diff --git a/nixpkgs/pkgs/misc/logging/beats/6.x.nix b/nixpkgs/pkgs/misc/logging/beats/6.x.nix
new file mode 100644
index 000000000000..ce80b174d327
--- /dev/null
+++ b/nixpkgs/pkgs/misc/logging/beats/6.x.nix
@@ -0,0 +1,53 @@
+{ lib, fetchFromGitHub, elk6Version, buildGoPackage, libpcap, systemd }:
+
+let beat = package : extraArgs : buildGoPackage (rec {
+      name = "${package}-${version}";
+      version = elk6Version;
+
+      src = fetchFromGitHub {
+        owner = "elastic";
+        repo = "beats";
+        rev = "v${version}";
+        sha256 = "0jkiz5dfdi9zsji04ipcmcj7pml9294v455y7s2c22k24gyzbaw8";
+      };
+
+      goPackagePath = "github.com/elastic/beats";
+
+      subPackages = [ package ];
+
+      meta = with lib; {
+        homepage = "https://www.elastic.co/products/beats";
+        license = licenses.asl20;
+        maintainers = with maintainers; [ fadenb basvandijk ];
+        platforms = platforms.linux;
+      };
+    } // extraArgs);
+in {
+  filebeat6   = beat "filebeat"   {meta.description = "Lightweight shipper for logfiles";};
+  heartbeat6  = beat "heartbeat"  {meta.description = "Lightweight shipper for uptime monitoring";};
+  metricbeat6 = beat "metricbeat" {meta.description = "Lightweight shipper for metrics";};
+  packetbeat6 = beat "packetbeat" {
+    buildInputs = [ libpcap ];
+    meta.broken = true;
+    meta.description = "Network packet analyzer that ships data to Elasticsearch";
+    meta.longDescription = ''
+      Packetbeat is an open source network packet analyzer that ships the
+      data to Elasticsearch.
+
+      Think of it like a distributed real-time Wireshark with a lot more
+      analytics features. The Packetbeat shippers sniff the traffic between
+      your application processes, parse on the fly protocols like HTTP, MySQL,
+      PostgreSQL, Redis or Thrift and correlate the messages into transactions.
+    '';
+  };
+  journalbeat6  = beat "journalbeat" {
+    meta.description = ''
+      Journalbeat is an open source data collector to read and forward
+      journal entries from Linuxes with systemd.
+    '';
+    buildInputs = [ systemd.dev ];
+    postFixup = let libPath = lib.makeLibraryPath [ (lib.getLib systemd) ]; in ''
+      patchelf --set-rpath ${libPath} "$out/bin/journalbeat"
+    '';
+  };
+}
diff --git a/nixpkgs/pkgs/misc/logging/beats/7.x.nix b/nixpkgs/pkgs/misc/logging/beats/7.x.nix
new file mode 100644
index 000000000000..43ea85508c69
--- /dev/null
+++ b/nixpkgs/pkgs/misc/logging/beats/7.x.nix
@@ -0,0 +1,52 @@
+{ lib, fetchFromGitHub, elk7Version, buildGoPackage, libpcap, systemd }:
+
+let beat = package : extraArgs : buildGoPackage (rec {
+      name = "${package}-${version}";
+      version = elk7Version;
+
+      src = fetchFromGitHub {
+        owner = "elastic";
+        repo = "beats";
+        rev = "v${version}";
+        sha256 = "192ygz3ppfah8d2b811x67jfqhcr5ivz7qh4vwrd729rjfr0bbgb";
+      };
+
+      goPackagePath = "github.com/elastic/beats";
+
+      subPackages = [ package ];
+
+      meta = with lib; {
+        homepage = "https://www.elastic.co/products/beats";
+        license = licenses.asl20;
+        maintainers = with maintainers; [ fadenb basvandijk ];
+        platforms = platforms.linux;
+      };
+    } // extraArgs);
+in {
+  filebeat7   = beat "filebeat"   {meta.description = "Lightweight shipper for logfiles";};
+  heartbeat7  = beat "heartbeat"  {meta.description = "Lightweight shipper for uptime monitoring";};
+  metricbeat7 = beat "metricbeat" {meta.description = "Lightweight shipper for metrics";};
+  packetbeat7 = beat "packetbeat" {
+    buildInputs = [ libpcap ];
+    meta.description = "Network packet analyzer that ships data to Elasticsearch";
+    meta.longDescription = ''
+      Packetbeat is an open source network packet analyzer that ships the
+      data to Elasticsearch.
+
+      Think of it like a distributed real-time Wireshark with a lot more
+      analytics features. The Packetbeat shippers sniff the traffic between
+      your application processes, parse on the fly protocols like HTTP, MySQL,
+      PostgreSQL, Redis or Thrift and correlate the messages into transactions.
+    '';
+  };
+  journalbeat7  = beat "journalbeat" {
+    meta.description = ''
+      Journalbeat is an open source data collector to read and forward
+      journal entries from Linuxes with systemd.
+    '';
+    buildInputs = [ systemd.dev ];
+    postFixup = let libPath = lib.makeLibraryPath [ (lib.getLib systemd) ]; in ''
+      patchelf --set-rpath ${libPath} "$out/bin/journalbeat"
+    '';
+  };
+}
diff --git a/nixpkgs/pkgs/misc/long-shebang/default.nix b/nixpkgs/pkgs/misc/long-shebang/default.nix
new file mode 100644
index 000000000000..6ad7c8496ed5
--- /dev/null
+++ b/nixpkgs/pkgs/misc/long-shebang/default.nix
@@ -0,0 +1,21 @@
+{ lib, stdenv, fetchurl }: let
+  version = "1.2.0";
+in stdenv.mkDerivation {
+  pname = "long-shebang";
+  inherit version;
+
+  src = fetchurl {
+    url = "https://github.com/shlevy/long-shebang/releases/download/v${version}/long-shebang-${version}.tar.xz";
+    sha256 = "10h29w1c5bm0rlscyjiz1kzb134rn92as6v4y7i8mhhmdh6mmf79";
+  };
+
+  meta = {
+    description = "A tool for #! scripts with more than one argument";
+
+    homepage = "https://github.com/shlevy/long-shebang";
+
+    license = lib.licenses.mit;
+
+    platforms = lib.platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/misc/meson-tools/default.nix b/nixpkgs/pkgs/misc/meson-tools/default.nix
new file mode 100644
index 000000000000..02b162c88098
--- /dev/null
+++ b/nixpkgs/pkgs/misc/meson-tools/default.nix
@@ -0,0 +1,27 @@
+{ lib, stdenv, fetchFromGitHub, openssl }:
+
+stdenv.mkDerivation rec {
+  pname = "meson-tools";
+  version = "0.1";
+
+  src = fetchFromGitHub {
+    owner = "afaerber";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "1bvshfa9pa012yzdwapi3nalpgcwmfq7d3n3w3mlr357a6kq64qk";
+  };
+
+  buildInputs = [ openssl ];
+
+  installPhase = ''
+    mkdir -p "$out/bin"
+    mv amlbootsig unamlbootsig amlinfo "$out/bin"
+  '';
+
+  meta = with lib; {
+    homepage = "https://github.com/afaerber/meson-tools";
+    description = "Tools for Amlogic Meson ARM platforms";
+    license = licenses.gpl2;
+    maintainers = with maintainers; [ lopsided98 ];
+  };
+}
diff --git a/nixpkgs/pkgs/misc/mnemonicode/default.nix b/nixpkgs/pkgs/misc/mnemonicode/default.nix
new file mode 100644
index 000000000000..352dd038fb5a
--- /dev/null
+++ b/nixpkgs/pkgs/misc/mnemonicode/default.nix
@@ -0,0 +1,27 @@
+{ stdenv, lib, fetchFromGitHub }:
+
+stdenv.mkDerivation {
+  pname = "mnemonicode";
+  version = "2015-11-30";
+  src = fetchFromGitHub {
+    owner = "singpolyma";
+    repo = "mnemonicode";
+    rev = "1687fabdf48acf68d4186f219bc20bffe02e8ee0";
+    sha256 = "0kp1jhhqfwfiqg9kx0mbyr4qh4yc4zg4szqk5fbf809nx2pvprm5";
+  };
+  installPhase = ''
+    mkdir -p $out/bin
+    cp mnencode $out/bin
+    cp mndecode $out/bin
+  '';
+  meta = with lib; {
+    description = ''
+      Routines which implement a method for encoding binary data into a sequence
+      of words which can be spoken over the phone, for example, and converted
+      back to data on the other side.
+    '';
+    license = licenses.mit;
+    platforms = platforms.all;
+    maintainers = [ maintainers.cstrahan ];
+  };
+}
diff --git a/nixpkgs/pkgs/misc/mxt-app/default.nix b/nixpkgs/pkgs/misc/mxt-app/default.nix
new file mode 100644
index 000000000000..099300634e8c
--- /dev/null
+++ b/nixpkgs/pkgs/misc/mxt-app/default.nix
@@ -0,0 +1,26 @@
+{ lib, stdenv, fetchFromGitHub, autoreconfHook, libtool }:
+
+stdenv.mkDerivation rec {
+  version="1.32";
+  pname = "mxt-app";
+
+  src = fetchFromGitHub {
+    owner = "atmel-maxtouch";
+    repo = "mxt-app";
+    rev = "v${version}";
+    sha256 = "1z1g5h14j3yw3r9phgir33s9j07ns9c0r5lkl49940pzqycnrwbj";
+  };
+
+  nativeBuildInputs = [ autoreconfHook ];
+  buildInputs = [ libtool ];
+
+  hardeningDisable = [ "fortify" ];
+
+  meta = with lib; {
+    description = "Command line utility for Atmel maXTouch devices";
+    homepage = "https://github.com/atmel-maxtouch/mxt-app";
+    license = licenses.bsd2;
+    maintainers = [ maintainers.colemickens ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/misc/my-env/default.nix b/nixpkgs/pkgs/misc/my-env/default.nix
new file mode 100644
index 000000000000..8a35525b3e82
--- /dev/null
+++ b/nixpkgs/pkgs/misc/my-env/default.nix
@@ -0,0 +1,152 @@
+# idea: provide a build environments for your developement of preference
+/*
+  #### examples of use: ####
+  # Add this to your ~/.config/nixpkgs/config.nix:
+  {
+    packageOverrides = pkgs : with pkgs; {
+      sdlEnv = pkgs.myEnvFun {
+          name = "sdl";
+          nativeBuildInputs = [ cmake pkg-config ];
+          buildInputs = [ stdenv SDL SDL_image SDL_ttf SDL_gfx SDL_net];
+      };
+    };
+  }
+
+  # Then you can install it by:
+  #  $ nix-env -i env-sdl
+  # And you can load it simply calling:
+  #  $ load-env-sdl
+  # and this will update your env vars to have 'make' and 'gcc' finding the SDL
+  # headers and libs.
+
+
+  ##### Another example, more complicated but achieving more: #######
+  # Make an environment to build nix from source and create ctags (tagfiles can
+  # be extracted from TAG_FILES) from every source package. Here would be a
+  # full ~/.config/nixpkgs/config.nix
+  {
+    packageOverrides = pkgs : with pkgs; with sourceAndTags;
+    let complicatedMyEnv = { name, buildInputs ? [], cTags ? [], extraCmds ? ""}:
+            pkgs.myEnvFun {
+              inherit name;
+            buildInputs = buildInputs
+                  ++ map (x : sourceWithTagsDerivation
+                    ( (addCTaggingInfo x ).passthru.sourceWithTags ) ) cTags;
+            extraCmds = ''
+              ${extraCmds}
+              HOME=${builtins.getEnv "HOME"}
+              . ~/.bashrc
+            '';
+          };
+    in rec {
+      # this is the example we will be using
+      nixEnv = complicatedMyEnv {
+        name = "nix";
+        buildInputs = [ libtool stdenv perl curl bzip2 openssl db5 autoconf automake zlib ];
+      };
+    };
+  }
+
+  # Now we should build our newly defined custom environment using this command on a shell, so type:
+  #  $ nix-env -i env-nix
+
+  # You can load the environment simply typing a "load-env-${name}" command.
+  #  $ load-env-nix
+  # The result using that command should be:
+  #  env-nix loaded
+  and show you a shell with a prefixed prompt.
+*/
+
+{ mkDerivation, substituteAll, pkgs }:
+    { stdenv ? pkgs.stdenv, name, buildInputs ? []
+    , propagatedBuildInputs ? [], gcc ? stdenv.cc, extraCmds ? ""
+    , cleanupCmds ? "", shell ? "${pkgs.bashInteractive}/bin/bash --norc"}:
+
+mkDerivation {
+  inherit buildInputs propagatedBuildInputs;
+
+  name = "env-${name}";
+  phases = [ "buildPhase" "fixupPhase" ];
+  setupNew = substituteAll {
+    src = ../../stdenv/generic/setup.sh;
+    inherit gcc;
+  };
+
+  buildPhase = let
+    initialPath = import ../../stdenv/common-path.nix { inherit pkgs; };
+  in ''
+    set -x
+    mkdir -p "$out/dev-envs" "$out/nix-support" "$out/bin"
+    s="$out/nix-support/setup-new-modified"
+    # shut some warning up.., do not use set -e
+    sed -e 's@set -eu@@' \
+        -e 's@assertEnvExists\s\+NIX_STORE@:@' \
+        -e 's@trap.*@@' \
+        -e '1i initialPath="${toString initialPath}"' \
+        "$setupNew" > "$s"
+    cat >> "$out/dev-envs/''${name/env-/}" << EOF
+      defaultNativeBuildInputs="$defaultNativeBuildInputs"
+      buildInputs="$buildInputs"
+      propagatedBuildInputs="$propagatedBuildInputs"
+      # the setup-new script wants to write some data to a temp file.. so just let it do that and tidy up afterwards
+      tmp="\$("${pkgs.coreutils}/bin/mktemp" -d)"
+      NIX_BUILD_TOP="\$tmp"
+      phases=
+      # only do all the setup stuff in nix-support/*
+      set +e
+      # This prevents having -rpath /lib in NIX_LDFLAGS
+      export NIX_NO_SELF_RPATH=1
+      if [[ -z "\$ZSH_VERSION" ]]; then
+        source "$s"
+      else
+        setopt interactivecomments
+        # fix bash indirection
+        # let's hope the bash arrays aren't used
+        # substitute is using bash array, so skip it
+        echo '
+            setopt NO_BAD_PATTERN
+            setopt NO_BANG_HIST
+            setopt NO_BG_NICE
+            setopt NO_EQUALS
+            setopt NO_FUNCTION_ARGZERO
+            setopt GLOB_SUBST
+            setopt NO_HUP
+            setopt INTERACTIVE_COMMENTS
+            setopt KSH_ARRAYS
+            setopt NO_MULTIOS
+            setopt NO_NOMATCH
+            setopt RM_STAR_SILENT
+            setopt POSIX_BUILTINS
+            setopt SH_FILE_EXPANSION
+            setopt SH_GLOB
+            setopt SH_OPTION_LETTERS
+            setopt SH_WORD_SPLIT
+          ' >> "\$tmp/script"
+        sed -e 's/\''${!\([^}]*\)}/\''${(P)\1}/g' \
+            -e 's/[[]\*\]//' \
+            -e 's/substitute() {/ substitute() { return; /' \
+            -e 's@PATH=\$@PATH=${pkgs.coreutils}/bin@' \
+            "$s" >> "\$tmp/script"
+        echo "\$tmp/script";
+        source "\$tmp/script";
+      fi
+      ${pkgs.coreutils}/bin/rm -fr "\$tmp"
+      ${extraCmds}
+
+      nix_cleanup() {
+        :
+        ${cleanupCmds}
+      }
+
+      export PATH
+      echo $name loaded >&2
+
+      trap nix_cleanup EXIT
+    EOF
+
+    mkdir -p $out/bin
+    sed -e 's,@shell@,${shell},' -e s,@myenvpath@,$out/dev-envs/${name}, \
+      -e 's,@name@,${name},' ${./loadenv.sh} > $out/bin/load-env-${name}
+    chmod +x $out/bin/load-env-${name}
+  '';
+}
diff --git a/nixpkgs/pkgs/misc/my-env/loadenv.sh b/nixpkgs/pkgs/misc/my-env/loadenv.sh
new file mode 100644
index 000000000000..1688d2f158fb
--- /dev/null
+++ b/nixpkgs/pkgs/misc/my-env/loadenv.sh
@@ -0,0 +1,22 @@
+#!@shell@
+
+OLDPATH="$PATH"
+OLDTZ="$TZ"
+OLD_http_proxy="$http_proxy"
+OLD_ftp_proxy="$http_proxy"
+source @myenvpath@
+
+PATH="$PATH:$OLDPATH"
+export PS1="\n@name@:[\u@\h:\w]\$ "
+export NIX_MYENV_NAME="@name@"
+export buildInputs
+export TZ="$OLDTZ"
+export http_proxy="$OLD_http_proxy"
+export ftp_proxy="$OLD_ftp_proxy"
+
+if test $# -gt 0; then
+    exec "$@"
+else
+    exec @shell@
+fi
+
diff --git a/nixpkgs/pkgs/misc/ptouch-print/default.nix b/nixpkgs/pkgs/misc/ptouch-print/default.nix
new file mode 100644
index 000000000000..f9889cfe4bef
--- /dev/null
+++ b/nixpkgs/pkgs/misc/ptouch-print/default.nix
@@ -0,0 +1,34 @@
+{ lib, stdenv
+, fetchgit
+, autoreconfHook
+, gd
+, libusb1
+}:
+
+stdenv.mkDerivation rec {
+  pname = "ptouch-print";
+  version = "1.4.3";
+
+  src = fetchgit {
+    url = "https://mockmoon-cybernetics.ch/cgi/cgit/linux/ptouch-print.git";
+    rev = "v${version}";
+    sha256 = "0i57asg2hj1nfwy5lcb0vhrpvb9dqfhf81vh4i929h1kiqhlw2hx";
+  };
+
+  nativeBuildInputs = [
+    autoreconfHook
+  ];
+
+  buildInputs = [
+    gd
+    libusb1
+  ];
+
+  meta = with lib; {
+    description = "Command line tool to print labels on Brother P-Touch printers on Linux";
+    license = licenses.gpl3Plus;
+    homepage = "https://mockmoon-cybernetics.ch/computer/p-touch2430pc/";
+    maintainers = with maintainers; [ shamilton ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/misc/pylode/default.nix b/nixpkgs/pkgs/misc/pylode/default.nix
new file mode 100644
index 000000000000..fb908151765c
--- /dev/null
+++ b/nixpkgs/pkgs/misc/pylode/default.nix
@@ -0,0 +1,37 @@
+{ lib
+, python3Packages
+, fetchFromGitHub
+}:
+
+python3Packages.buildPythonApplication rec {
+  pname = "pyLODE";
+  version = "2.8.6";
+
+  src = fetchFromGitHub {
+    owner = "RDFLib";
+    repo = pname;
+    rev = version;
+    sha256 = "0zbk5lj9vlg32rmvw1himlw63kxd7sim7nzglrjs5zm6vpi4x5ch";
+  };
+
+  propagatedBuildInputs = with python3Packages; [
+    dateutil
+    falcon
+    gunicorn
+    isodate
+    jinja2
+    markdown
+    rdflib
+    rdflib-jsonld
+    requests
+    six
+    beautifulsoup4
+  ];
+
+  meta = with lib; {
+    description = "An OWL ontology documentation tool using Python and templating, based on LODE";
+    homepage = "https://github.com/RDFLib/pyLODE";
+    license = licenses.gpl3Only;
+    maintainers = with maintainers; [ koslambrou ];
+  };
+}
diff --git a/nixpkgs/pkgs/misc/riscv-pk/default.nix b/nixpkgs/pkgs/misc/riscv-pk/default.nix
new file mode 100644
index 000000000000..66b7321c780d
--- /dev/null
+++ b/nixpkgs/pkgs/misc/riscv-pk/default.nix
@@ -0,0 +1,41 @@
+{ lib, stdenv, fetchFromGitHub, autoreconfHook, payload ? null }:
+
+stdenv.mkDerivation rec {
+  pname = "riscv-pk";
+  version = "1.0.0";
+
+  src = fetchFromGitHub {
+    owner = "riscv";
+    repo = "riscv-pk";
+    rev = "v${version}";
+    sha256 = "1cc0rz4q3a1zw8756b8yysw8lb5g4xbjajh5lvqbjix41hbdx6xz";
+  };
+
+  nativeBuildInputs = [ autoreconfHook ];
+
+  preConfigure = ''
+    mkdir build
+    cd build
+  '';
+
+  configureScript = "../configure";
+
+  configureFlags = lib.optional (payload != null)
+    "--with-payload=${payload}";
+
+  hardeningDisable = [ "all" ];
+
+  postInstall = ''
+    mv $out/* $out/.cleanup
+    mv $out/.cleanup/* $out
+    rmdir $out/.cleanup
+  '';
+
+  meta = {
+    description = "RISC-V Proxy Kernel and Bootloader";
+    homepage = "https://github.com/riscv/riscv-pk";
+    license = lib.licenses.bsd3;
+    platforms = lib.platforms.riscv;
+    maintainers = [ lib.maintainers.shlevy ];
+  };
+}
diff --git a/nixpkgs/pkgs/misc/rkdeveloptool/default.nix b/nixpkgs/pkgs/misc/rkdeveloptool/default.nix
new file mode 100644
index 000000000000..517a8cc65328
--- /dev/null
+++ b/nixpkgs/pkgs/misc/rkdeveloptool/default.nix
@@ -0,0 +1,27 @@
+{ lib, stdenv, fetchFromGitHub, autoreconfHook, pkg-config, libusb1 }:
+
+stdenv.mkDerivation {
+  pname = "rkdeveloptool";
+  version = "unstable-2021-02-03";
+
+  src = fetchFromGitHub {
+    owner = "rockchip-linux";
+    repo = "rkdeveloptool";
+    rev = "e607a5d6ad3f6af66d3daf3f6370e6dc9763a20d";
+    sha256 = "08m0yfds5rpr5l0s75ynfarq3hrv94l3aadld17cz5gqapqcfs2n";
+  };
+
+  nativeBuildInputs = [ autoreconfHook pkg-config ];
+
+  buildInputs = [ libusb1 ];
+
+  # main.cpp:1568:36: error: '%s' directive output may be truncated writing up to 557 bytes into a region of size 5
+  CPPFLAGS = "-Wno-error=format-truncation";
+
+  meta = with lib; {
+    homepage = "https://github.com/rockchip-linux/rkdeveloptool";
+    description = "A tool from Rockchip to communicate with Rockusb devices";
+    license = licenses.gpl2;
+    maintainers = [ maintainers.lopsided98 ];
+  };
+}
diff --git a/nixpkgs/pkgs/misc/sailsd/default.nix b/nixpkgs/pkgs/misc/sailsd/default.nix
new file mode 100644
index 000000000000..d2f91c42638a
--- /dev/null
+++ b/nixpkgs/pkgs/misc/sailsd/default.nix
@@ -0,0 +1,48 @@
+{ lib, stdenv, fetchFromGitHub, pkg-config, jansson }:
+
+let
+  libsailing = fetchFromGitHub {
+    owner = "sails-simulator";
+    repo = "libsailing";
+    rev = "9b2863ff0c539cd23d91b0254032a7af9c840574";
+    sha256 = "06rcxkwgms9sxqr1swnnc4jnvgs0iahm4cksd475yd1bp5p1gq6j";
+  };
+in
+stdenv.mkDerivation rec {
+  version = "0.3.0";
+  pname = "sailsd";
+  src = fetchFromGitHub {
+    owner = "sails-simulator";
+    repo = "sailsd";
+    rev = version;
+    sha256 = "1s4nlffp683binbdxwwzbsci61kbjylbcr1jf44sv1h1r5d5js05";
+  };
+
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = [ jansson libsailing ];
+
+  INSTALL_PATH = "$(out)";
+
+  postUnpack = ''
+    rmdir $sourceRoot/libsailing
+    cp -r ${libsailing} $sourceRoot/libsailing
+    chmod 755 -R $sourceRoot/libsailing
+  '';
+
+  patchPhase = ''
+    substituteInPlace Makefile \
+      --replace gcc cc
+  '';
+
+  meta = with lib; {
+    description = "Simulator daemon for autonomous sailing boats";
+    homepage = "https://github.com/sails-simulator/sailsd";
+    license = licenses.gpl3;
+    longDescription = ''
+      Sails is a simulator designed to test the AI of autonomous sailing
+      robots. It emulates the basic physics of sailing a small single sail
+      boat'';
+    maintainers = with maintainers; [ kragniz ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/misc/scimark/default.nix b/nixpkgs/pkgs/misc/scimark/default.nix
new file mode 100644
index 000000000000..7558c676ba52
--- /dev/null
+++ b/nixpkgs/pkgs/misc/scimark/default.nix
@@ -0,0 +1,35 @@
+{ lib
+, stdenv
+, fetchurl
+, unzip
+}:
+
+stdenv.mkDerivation rec {
+  pname = "scimark";
+  version = "4c";
+
+  src = fetchurl {
+    url = "https://math.nist.gov/scimark2/${pname}${version}.zip";
+    hash = "sha256-kcg5vKYp0B7+bC/CmFMO/tMwxf9q6nvuFv0vRSy3MbE=";
+  };
+
+  nativeBuildInputs = [
+    unzip
+  ];
+
+  dontConfigure = true;
+
+  installPhase = ''
+    install -d $out/bin/
+    install scimark4 $out/bin/
+  '';
+
+  meta = with lib; {
+    homepage = "https://math.nist.gov/scimark2/index.html";
+    description = "Scientific and numerical computing benchmark (ANSI C version)";
+    license = licenses.publicDomain;
+    maintainers = with maintainers; [ AndersonTorres ];
+    platforms = platforms.all;
+  };
+}
+# TODO [ AndersonTorres ]: Java version
diff --git a/nixpkgs/pkgs/misc/scrcpy/default.nix b/nixpkgs/pkgs/misc/scrcpy/default.nix
new file mode 100644
index 000000000000..50383fd005d7
--- /dev/null
+++ b/nixpkgs/pkgs/misc/scrcpy/default.nix
@@ -0,0 +1,64 @@
+{ lib, stdenv, fetchurl, fetchFromGitHub, makeWrapper
+, meson
+, ninja
+, pkg-config
+, fetchpatch
+
+, platform-tools
+, ffmpeg
+, SDL2
+}:
+
+let
+  version = "1.17";
+  prebuilt_server = fetchurl {
+    url = "https://github.com/Genymobile/scrcpy/releases/download/v${version}/scrcpy-server-v${version}";
+    sha256 = "sha256-EbWtLRvJuXMPtyVKeO/XGo/0axk4/0aOR6IbZTobZyU=";
+  };
+in
+stdenv.mkDerivation rec {
+  pname = "scrcpy";
+  inherit version;
+
+  src = fetchFromGitHub {
+    owner = "Genymobile";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "sha256-xCzrbWhMve0bJerFNHiUdSzp5O1pSaKRkcJSs/0nHpk=";
+  };
+
+  # postPatch:
+  #   screen.c: When run without a hardware accelerator, this allows the command to continue working rather than failing unexpectedly.
+  #   This can happen when running on non-NixOS because then scrcpy seems to have a hard time using the host OpenGL-supporting hardware.
+  #   It would be better to fix the OpenGL problem, but that seems much more intrusive.
+  postPatch = ''
+    substituteInPlace app/src/screen.c \
+      --replace "SDL_RENDERER_ACCELERATED" "SDL_RENDERER_ACCELERATED || SDL_RENDERER_SOFTWARE"
+  '';
+
+  nativeBuildInputs = [ makeWrapper meson ninja pkg-config ];
+
+  buildInputs = [ ffmpeg SDL2 ];
+
+  # Manually install the server jar to prevent Meson from "fixing" it
+  preConfigure = ''
+    echo -n > server/meson.build
+  '';
+
+  mesonFlags = [ "-Doverride_server_path=${prebuilt_server}" ];
+  postInstall = ''
+    mkdir -p "$out/share/scrcpy"
+    ln -s "${prebuilt_server}" "$out/share/scrcpy/scrcpy-server"
+
+    # runtime dep on `adb` to push the server
+    wrapProgram "$out/bin/scrcpy" --prefix PATH : "${platform-tools}/bin"
+  '';
+
+  meta = with lib; {
+    description = "Display and control Android devices over USB or TCP/IP";
+    homepage = "https://github.com/Genymobile/scrcpy";
+    license = licenses.asl20;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ deltaevo lukeadams ];
+  };
+}
diff --git a/nixpkgs/pkgs/misc/scream-receivers/default.nix b/nixpkgs/pkgs/misc/scream-receivers/default.nix
new file mode 100644
index 000000000000..6c0f73f1b258
--- /dev/null
+++ b/nixpkgs/pkgs/misc/scream-receivers/default.nix
@@ -0,0 +1,56 @@
+{ stdenv, lib, fetchFromGitHub, alsaLib
+, pulseSupport ? false, libpulseaudio ? null
+}:
+
+stdenv.mkDerivation rec {
+  pname = "scream-receivers";
+  version = "3.4";
+
+  src = fetchFromGitHub {
+    owner = "duncanthrax";
+    repo = "scream";
+    rev = version;
+    sha256 = "1ig89bmzfrm57nd8lamzsdz5z81ks5vjvq3f0xhgm2dk2mrgjsj3";
+  };
+
+  buildInputs = [ alsaLib ] ++ lib.optional pulseSupport libpulseaudio;
+
+  buildPhase = ''
+    (cd Receivers/alsa && make)
+    (cd Receivers/alsa-ivshmem && make)
+  '' + lib.optionalString pulseSupport ''
+    (cd Receivers/pulseaudio && make)
+    (cd Receivers/pulseaudio-ivshmem && make)
+  '';
+
+  installPhase = ''
+    mkdir -p $out/bin
+    mv ./Receivers/alsa/scream-alsa $out/bin/
+    mv ./Receivers/alsa-ivshmem/scream-ivshmem-alsa $out/bin/
+  '' + lib.optionalString pulseSupport ''
+    mv ./Receivers/pulseaudio/scream-pulse $out/bin/
+    mv ./Receivers/pulseaudio-ivshmem/scream-ivshmem-pulse $out/bin/
+  '';
+
+  doInstallCheck = true;
+  installCheckPhase = ''
+    export PATH=$PATH:$out/bin
+    set -o verbose
+    set +o pipefail
+
+    # Programs exit with code 1 when testing help, so grep for a string
+    scream-alsa -h 2>&1 | grep -q Usage:
+    scream-ivshmem-alsa 2>&1 | grep -q Usage:
+  '' + lib.optionalString pulseSupport ''
+    scream-pulse -h 2>&1 | grep -q Usage:
+    scream-ivshmem-pulse 2>&1 | grep -q Usage:
+  '';
+
+  meta = with lib; {
+    description = "Audio receivers for the Scream virtual network sound card";
+    homepage = "https://github.com/duncanthrax/scream";
+    license = licenses.mspl;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ ];
+  };
+}
diff --git a/nixpkgs/pkgs/misc/screensavers/alock/default.nix b/nixpkgs/pkgs/misc/screensavers/alock/default.nix
new file mode 100644
index 000000000000..d10082a71e3e
--- /dev/null
+++ b/nixpkgs/pkgs/misc/screensavers/alock/default.nix
@@ -0,0 +1,45 @@
+{ lib, stdenv, fetchgit, pkg-config, autoreconfHook
+, libX11, pam, libgcrypt, libXrender, imlib2 }:
+
+stdenv.mkDerivation rec {
+  date = "20170720";
+  name = "alock-${date}";
+
+  src = fetchgit {
+    url = "https://github.com/Arkq/alock";
+    rev = "2035e1d4a2293432f5503e82d10f899232eb0f38";
+    sha256 = "1by954fjn0ryqda89zlmq3gclakg3gz7zy1wjrbgw4lzsk538va6";
+  };
+
+  PAM_DEFAULT_SERVICE = "login";
+
+  configureFlags = [
+    "--enable-pam"
+    "--enable-hash"
+    "--enable-xrender"
+    "--enable-imlib2"
+  ];
+
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = [
+    autoreconfHook libX11
+    pam libgcrypt libXrender imlib2
+  ];
+
+  meta = with lib; {
+    homepage = "https://github.com/Arkq/alock";
+    description = "Simple screen lock application for X server";
+    longDescription = ''
+      alock locks the X server until the user enters a password
+      via the keyboard. If the authentification was successful
+      the X server is unlocked and the user can continue to work.
+
+      alock does not provide any fancy animations like xlock or
+      xscreensaver and never will. It's just for locking the current
+      X session.
+    '';
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ ftrvxmtrx chris-martin ];
+    license = licenses.mit;
+  };
+}
diff --git a/nixpkgs/pkgs/misc/screensavers/betterlockscreen/default.nix b/nixpkgs/pkgs/misc/screensavers/betterlockscreen/default.nix
new file mode 100644
index 000000000000..8d40df14616e
--- /dev/null
+++ b/nixpkgs/pkgs/misc/screensavers/betterlockscreen/default.nix
@@ -0,0 +1,39 @@
+{
+  lib, stdenv, makeWrapper, fetchFromGitHub,
+  imagemagick, i3lock-color, xdpyinfo, xrandr, bc, feh, procps, xrdb
+}:
+
+stdenv.mkDerivation rec {
+  pname = "betterlockscreen";
+  version = "3.0.1";
+
+  src = fetchFromGitHub {
+    owner = "pavanjadhaw";
+    repo = "betterlockscreen";
+    rev = version;
+    sha256 = "0jc8ifb69shmd0avx6vny4m1w5dfxkkf5vnm7qcrmc8yflb0s3z6";
+  };
+
+  nativeBuildInputs = [ makeWrapper ];
+
+  patches = [ ./replace-i3lock.patch ];
+
+  installPhase =
+    let
+      PATH =
+        lib.makeBinPath
+        [imagemagick i3lock-color xdpyinfo xrandr bc feh procps xrdb];
+    in ''
+      mkdir -p $out/bin
+      cp betterlockscreen $out/bin/betterlockscreen
+      wrapProgram "$out/bin/betterlockscreen" --prefix PATH : "$out/bin:${PATH}"
+    '';
+
+  meta = with lib; {
+    description = "A simple minimal lock screen which allows you to cache images with different filters and lockscreen with blazing speed";
+    homepage = "https://github.com/pavanjadhaw/betterlockscreen";
+    license = licenses.mit;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ eyjhb ];
+  };
+}
diff --git a/nixpkgs/pkgs/misc/screensavers/betterlockscreen/replace-i3lock.patch b/nixpkgs/pkgs/misc/screensavers/betterlockscreen/replace-i3lock.patch
new file mode 100644
index 000000000000..3bbbfcfd613d
--- /dev/null
+++ b/nixpkgs/pkgs/misc/screensavers/betterlockscreen/replace-i3lock.patch
@@ -0,0 +1,12 @@
+--- a/betterlockscreen
++++ b/betterlockscreen
+@@ -76,7 +76,7 @@ prelock() {
+ lock() {
+ 	#$1 image path
+ 
+-	i3lock \
++	i3lock-color \
+ 		-t -i "$1" \
+ 		--timepos='x+110:h-70' \
+ 		--datepos='x+43:h-45' \
+
diff --git a/nixpkgs/pkgs/misc/screensavers/electricsheep/default.nix b/nixpkgs/pkgs/misc/screensavers/electricsheep/default.nix
new file mode 100644
index 000000000000..74d9e3cffee0
--- /dev/null
+++ b/nixpkgs/pkgs/misc/screensavers/electricsheep/default.nix
@@ -0,0 +1,47 @@
+{ lib, stdenv, fetchFromGitHub, autoreconfHook, wxGTK30, ffmpeg, lua5_1, curl
+, libpng, xorg, pkg-config, flam3, libgtop, boost, tinyxml, freeglut, libGLU, libGL
+, glee }:
+
+stdenv.mkDerivation rec {
+  pname = "electricsheep";
+  version = "3.0.2-2019-10-05";
+
+  src = fetchFromGitHub {
+    owner = "scottdraves";
+    repo = pname;
+    rev = "37ba0fd692d6581f8fe009ed11c9650cd8174123";
+    sha256 = "1z49l53j1lhk7ahdy96lm9r0pklwpf2i5s6y2l2rn6l4z8dxkjmk";
+  };
+
+  nativeBuildInputs = [ autoreconfHook pkg-config ];
+
+  buildInputs = [
+    wxGTK30 ffmpeg lua5_1 curl libpng xorg.libXrender
+    flam3 libgtop boost tinyxml freeglut libGLU libGL glee
+  ];
+
+  preAutoreconf = ''
+    cd client_generic
+    sed -i '/ACX_PTHREAD/d' configure.ac
+  '';
+
+  configureFlags = [
+    "CPPFLAGS=-I${glee}/include/GL"
+  ];
+
+  makeFlags = [
+    ''CXXFLAGS+="-DGL_GLEXT_PROTOTYPES"''
+  ];
+
+  preBuild = ''
+    sed -i "s|/usr|$out|" Makefile
+  '';
+
+  meta = with lib; {
+    description = "Electric Sheep, a distributed screen saver for evolving artificial organisms";
+    homepage = "https://electricsheep.org/";
+    maintainers = with maintainers; [ nand0p fpletz ];
+    platforms = platforms.linux;
+    license = licenses.gpl1;
+  };
+}
diff --git a/nixpkgs/pkgs/misc/screensavers/i3lock-pixeled/default.nix b/nixpkgs/pkgs/misc/screensavers/i3lock-pixeled/default.nix
new file mode 100644
index 000000000000..cb7a2fd1e184
--- /dev/null
+++ b/nixpkgs/pkgs/misc/screensavers/i3lock-pixeled/default.nix
@@ -0,0 +1,40 @@
+{ lib, stdenv, i3lock, imagemagick, scrot, playerctl, fetchFromGitLab }:
+
+stdenv.mkDerivation rec {
+  pname = "i3lock-pixeled";
+  version = "1.2.1";
+
+  src = fetchFromGitLab {
+    owner = "Ma27";
+    repo = "i3lock-pixeled";
+    rev = version;
+    sha256 = "1l9yjf9say0mcqnnjkyj4z3f6y83bnx4jsycd1h10p3m8afbh8my";
+  };
+
+  propagatedBuildInputs = [
+    i3lock
+    imagemagick
+    scrot
+    playerctl
+  ];
+
+  makeFlags = [
+    "PREFIX=$(out)/bin"
+  ];
+
+  patchPhase = ''
+    substituteInPlace i3lock-pixeled \
+       --replace i3lock    "${i3lock}/bin/i3lock" \
+       --replace convert   "${imagemagick}/bin/convert" \
+       --replace scrot     "${scrot}/bin/scrot" \
+       --replace playerctl "${playerctl}/bin/playerctl"
+  '';
+
+  meta = with lib; {
+    description = "Simple i3lock helper which pixels a screenshot by scaling it down and up to get a pixeled version of the screen when the lock is active";
+    homepage = "https://gitlab.com/Ma27/i3lock-pixeled";
+    license = licenses.mit;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ ma27 ];
+  };
+}
diff --git a/nixpkgs/pkgs/misc/screensavers/light-locker/default.nix b/nixpkgs/pkgs/misc/screensavers/light-locker/default.nix
new file mode 100644
index 000000000000..ef1143f41430
--- /dev/null
+++ b/nixpkgs/pkgs/misc/screensavers/light-locker/default.nix
@@ -0,0 +1,90 @@
+{ lib, stdenv
+, fetchFromGitHub
+, nix-update-script
+, meson
+, ninja
+, pkg-config
+, gtk3
+, glib
+, intltool
+, dbus-glib
+, libX11
+, libXScrnSaver
+, libXxf86vm
+, libXext
+, systemd
+, pantheon
+, wrapGAppsHook
+}:
+
+stdenv.mkDerivation rec {
+  pname = "light-locker";
+  version = "1.9.0";
+
+  outputs = [ "out" "man" ];
+
+  src = fetchFromGitHub {
+    owner = "the-cavalry";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "1z5lcd02gqax65qc14hj5khifg7gr53zy3s5i6apba50lbdlfk46";
+  };
+
+  nativeBuildInputs = [
+    intltool
+    meson
+    ninja
+    pkg-config
+    wrapGAppsHook
+  ];
+
+  buildInputs = [
+    dbus-glib
+    glib
+    gtk3
+    libX11
+    libXScrnSaver
+    libXext
+    libXxf86vm
+    systemd
+  ];
+
+  mesonFlags = [
+    "-Dmit-ext=true"
+    "-Ddpms-ext=true"
+    "-Dxf86gamma-ext=true"
+    "-Dsystemd=true"
+    "-Dupower=true"
+    "-Dlate-locking=true"
+    "-Dlock-on-suspend=true"
+    "-Dlock-on-lid=true"
+    "-Dgsettings=true"
+  ];
+
+  postInstall = ''
+    ${glib.dev}/bin/glib-compile-schemas $out/share/glib-2.0/schemas
+  '';
+
+  passthru = {
+    updateScript = nix-update-script {
+      attrPath = pname;
+    };
+  };
+
+  meta = with lib; {
+    homepage = "https://github.com/the-cavalry/light-locker";
+    description = "A simple session-locker for LightDM";
+    longDescription = ''
+      A simple locker (forked from gnome-screensaver) that aims to
+      have simple, sane, secure defaults and be well integrated with
+      the desktop while not carrying any desktop-specific
+      dependencies.
+
+      It relies on LightDM for locking and unlocking your session via
+      ConsoleKit/UPower or logind/systemd.
+    '';
+    license = licenses.gpl2;
+    maintainers = with maintainers; [ obadz ] ++ pantheon.maintainers;
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/misc/screensavers/multilockscreen/default.nix b/nixpkgs/pkgs/misc/screensavers/multilockscreen/default.nix
new file mode 100644
index 000000000000..56f5c82fe301
--- /dev/null
+++ b/nixpkgs/pkgs/misc/screensavers/multilockscreen/default.nix
@@ -0,0 +1,47 @@
+{
+  lib, stdenv, makeWrapper, fetchFromGitHub, writeShellScriptBin,
+  imagemagick, i3lock-color, xdpyinfo, xrandr, bc, feh, procps, xrdb, xset,
+  gnused, gnugrep, coreutils
+}:
+let
+  i3lock = writeShellScriptBin "i3lock" ''
+    ${i3lock-color}/bin/i3lock-color "$@"
+  '';
+  binPath = lib.makeBinPath [
+    imagemagick i3lock
+    xdpyinfo xrandr xset
+    bc feh procps xrdb
+    gnused gnugrep coreutils
+  ];
+in
+stdenv.mkDerivation rec {
+  pname = "multilockscreen";
+  version = "1.0.0";
+
+  src = fetchFromGitHub {
+    owner = "jeffmhubbard";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "0gmnrq7ibbhiwsn7mfi2r71fwm6nvhiwf4wsyz44cscm474z83p0";
+  };
+
+  nativeBuildInputs = [ makeWrapper ];
+
+  installPhase = ''
+    mkdir -p $out/bin
+    cp multilockscreen $out/bin/multilockscreen
+    wrapProgram "$out/bin/multilockscreen" --prefix PATH : "${binPath}"
+  '';
+
+  meta = with lib; {
+    description = "Wrapper script for i3lock-color";
+    longDescription = ''
+      multilockscreen is a wrapper script for i3lock-color.
+      It allows you to cache background images for i3lock-color with a variety of different effects and adds a stylish indicator.
+    '';
+    homepage = "https://github.com/jeffmhubbard/multilockscreen";
+    license = licenses.mit;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ kylesferrazza ];
+  };
+}
diff --git a/nixpkgs/pkgs/misc/screensavers/physlock/default.nix b/nixpkgs/pkgs/misc/screensavers/physlock/default.nix
new file mode 100644
index 000000000000..d25a777e650b
--- /dev/null
+++ b/nixpkgs/pkgs/misc/screensavers/physlock/default.nix
@@ -0,0 +1,27 @@
+{ lib, stdenv, fetchFromGitHub, pam, systemd }:
+
+stdenv.mkDerivation rec {
+  version = "v13";
+  pname = "physlock";
+  src = fetchFromGitHub {
+    owner = "muennich";
+    repo = pname;
+    rev = version;
+    sha256 = "1mz4xxjip5ldiw9jgfq9zvqb6w10bcjfx6939w1appqg8f521a7s";
+  };
+
+  buildInputs = [ pam systemd ];
+
+  preConfigure = ''
+    substituteInPlace Makefile \
+      --replace "-m 4755 -o root -g root" ""
+  '';
+
+  makeFlags = [ "PREFIX=$(out)" "SESSION=systemd" ];
+
+  meta = with lib; {
+    description = "A secure suspend/hibernate-friendly alternative to `vlock -an`";
+    license = licenses.gpl2;
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/misc/screensavers/pipes/default.nix b/nixpkgs/pkgs/misc/screensavers/pipes/default.nix
new file mode 100644
index 000000000000..be605192acce
--- /dev/null
+++ b/nixpkgs/pkgs/misc/screensavers/pipes/default.nix
@@ -0,0 +1,29 @@
+{ lib, stdenv, fetchurl, makeWrapper, coreutils, ncurses }:
+
+stdenv.mkDerivation rec {
+  pname = "pipes";
+  version = "1.3.0";
+
+  src = fetchurl {
+    url = "https://github.com/pipeseroni/pipes.sh/archive/v${version}.tar.gz";
+    sha256 = "09m4alb3clp3rhnqga5v6070p7n1gmnwp2ssqhq87nf2ipfpcaak";
+  };
+
+  nativeBuildInputs = [ makeWrapper ];
+
+  installPhase = ''
+    mkdir $out -p
+    make PREFIX=$out/ install
+
+    wrapProgram $out/bin/pipes.sh \
+      --set PATH "${lib.makeBinPath [ coreutils ncurses ]}"
+  '';
+
+  meta = with lib; {
+    homepage = "https://github.com/pipeseroni/pipes.sh";
+    description = "Animated pipes terminal screensaver";
+    license = licenses.mit;
+    maintainers = [ maintainers.matthiasbeyer ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/misc/screensavers/rss-glx/default.nix b/nixpkgs/pkgs/misc/screensavers/rss-glx/default.nix
new file mode 100644
index 000000000000..981db782c7c9
--- /dev/null
+++ b/nixpkgs/pkgs/misc/screensavers/rss-glx/default.nix
@@ -0,0 +1,27 @@
+{lib, stdenv, fetchurl, pkg-config, xlibsWrapper, libXext, libGLU, libGL, imagemagick6, libtiff, bzip2}:
+
+stdenv.mkDerivation rec {
+  version = "0.9.1";
+  pname = "rss-glx";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/rss-glx/rss-glx_${version}.tar.bz2";
+    sha256 = "1aikafjqrfmv23jnrrm5d56dg6injh4l67zjdxzdapv9chw7g3cg";
+  };
+
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = [ libGLU libGL xlibsWrapper imagemagick6 libtiff bzip2 ];
+
+  NIX_CFLAGS_COMPILE = "-I${imagemagick6.dev}/include/ImageMagick";
+  NIX_LDFLAGS= "-rpath ${libXext}/lib";
+
+  meta = {
+    description = "Really Slick Screensavers Port to GLX";
+    longDescription = ''
+      This package currently contains all of the screensavers from the
+      original collection, plus a few others.
+    '';
+    license = lib.licenses.gpl2;
+    platforms = lib.platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/misc/screensavers/slock/default.nix b/nixpkgs/pkgs/misc/screensavers/slock/default.nix
new file mode 100644
index 000000000000..800a81d2ffcd
--- /dev/null
+++ b/nixpkgs/pkgs/misc/screensavers/slock/default.nix
@@ -0,0 +1,36 @@
+{ lib, stdenv, fetchurl, writeText
+, xorgproto, libX11, libXext, libXrandr
+# default header can be obtained from
+# https://git.suckless.org/slock/tree/config.def.h
+, conf ? null }:
+
+with lib;
+stdenv.mkDerivation rec {
+  name = "slock-1.4";
+
+  src = fetchurl {
+    url = "https://dl.suckless.org/tools/${name}.tar.gz";
+    sha256 = "0sif752303dg33f14k6pgwq2jp1hjyhqv6x4sy3sj281qvdljf5m";
+  };
+
+  buildInputs = [ xorgproto libX11 libXext libXrandr ];
+
+  installFlags = [ "DESTDIR=\${out}" "PREFIX=" ];
+
+  postPatch = "sed -i '/chmod u+s/d' Makefile";
+
+  preBuild = optionalString (conf != null) ''
+    cp ${writeText "config.def.h" conf} config.def.h
+  '';
+
+  meta = {
+    homepage = "https://tools.suckless.org/slock";
+    description = "Simple X display locker";
+    longDescription = ''
+      Simple X display locker. This is the simplest X screen locker.
+    '';
+    license = licenses.mit;
+    maintainers = with maintainers; [ astsmtl ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/misc/screensavers/vlock/default.nix b/nixpkgs/pkgs/misc/screensavers/vlock/default.nix
new file mode 100644
index 000000000000..243d582bdcee
--- /dev/null
+++ b/nixpkgs/pkgs/misc/screensavers/vlock/default.nix
@@ -0,0 +1,29 @@
+{ lib, stdenv, fetchurl, pam }:
+
+stdenv.mkDerivation {
+  name = "vlock-2.2.2";
+  src = fetchurl
+  {
+    url = "mirror://debian/pool/main/v/vlock/vlock_2.2.2.orig.tar.gz";
+    sha256 = "1b9gv7hmlb8swda5bn40lp1yki8b8wv29vdnhcjqfl6ir98551za";
+  };
+
+  prePatch = ''
+    sed -i -e '/INSTALL/ {
+      s/-[og] [^ ]*//g; s/4711/755/
+    }' Makefile modules/Makefile
+  '';
+
+  patches = [ ./eintr.patch ];
+
+  configureFlags = [ "VLOCK_GROUP=root" "ROOT_GROUP=root" ];
+
+  buildInputs = [ pam ];
+
+  meta = with lib; {
+    description = "Virtual console locking program";
+    license = licenses.gpl2;
+    maintainers = [ maintainers.lethalman ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/misc/screensavers/vlock/eintr.patch b/nixpkgs/pkgs/misc/screensavers/vlock/eintr.patch
new file mode 100644
index 000000000000..64f432434324
--- /dev/null
+++ b/nixpkgs/pkgs/misc/screensavers/vlock/eintr.patch
@@ -0,0 +1,34 @@
+In systemd I have seen this error, using it as a service:
+
+vlock-start[14567]: vlock-new: could not activate new terminal: Interrupted system call
+
+I think this should fix that.
+
+Also on github: https://github.com/viric/vlock/commit/781a26087f83c7247601b6f82f784cca9266694e
+
+diff --git a/modules/new.c b/modules/new.c
+index e9b15fb..7aed640 100644
+--- a/modules/new.c
++++ b/modules/new.c
+@@ -103,9 +103,19 @@ static char *get_console_name(int n)
+  * file descriptor. */
+ static int activate_console(int consfd, int vtno)
+ {
+-  int c = ioctl(consfd, VT_ACTIVATE, vtno);
++  int c;
++  do {
++    c = ioctl(consfd, VT_ACTIVATE, vtno);
++  } while(c != 0 && errno == EINTR);
+ 
+-  return c < 0 ? c : ioctl(consfd, VT_WAITACTIVE, vtno);
++  if (c < 0)
++      return c;
++
++  do {
++    c = ioctl(consfd, VT_WAITACTIVE, vtno);
++  } while(c != 0 && errno == EINTR);
++
++  return c;
+ }
+ 
+ struct new_console_context {
diff --git a/nixpkgs/pkgs/misc/screensavers/xautolock/default.nix b/nixpkgs/pkgs/misc/screensavers/xautolock/default.nix
new file mode 100644
index 000000000000..cdb12b554647
--- /dev/null
+++ b/nixpkgs/pkgs/misc/screensavers/xautolock/default.nix
@@ -0,0 +1,35 @@
+{ lib, stdenv, fetchFromGitHub, xlibsWrapper
+, imake, gccmakedep, libXScrnSaver, xorgproto
+}:
+
+stdenv.mkDerivation rec {
+  pname = "xautolock";
+  version = "2.2-7-ga23dd5c";
+
+  # This repository contains xautolock-2.2 plus various useful patches that
+  # were collected from Debian, etc.
+  src = fetchFromGitHub {
+    owner = "peti";
+    repo = "xautolock";
+    rev = "v${version}";
+    sha256 = "10j61rl0sx9sh84rjyfyddl73xb5i2cpb17fyrli8kwj39nw0v2g";
+  };
+
+  nativeBuildInputs = [ imake gccmakedep ];
+  buildInputs = [ xlibsWrapper libXScrnSaver xorgproto ];
+
+  makeFlags = [
+    "BINDIR=$(out)/bin"
+    "MANPATH=$(out)/share/man"
+  ];
+
+  installTargets = [ "install" "install.man" ];
+
+  meta = with lib; {
+    description = "Launch a given program when your X session has been idle for a given time";
+    homepage = "http://www.ibiblio.org/pub/linux/X11/screensavers";
+    maintainers = with maintainers; [ peti ];
+    platforms = platforms.linux;
+    license = licenses.gpl2;
+  };
+}
diff --git a/nixpkgs/pkgs/misc/screensavers/xlockmore/default.nix b/nixpkgs/pkgs/misc/screensavers/xlockmore/default.nix
new file mode 100644
index 000000000000..17b22ce07234
--- /dev/null
+++ b/nixpkgs/pkgs/misc/screensavers/xlockmore/default.nix
@@ -0,0 +1,40 @@
+{ stdenv, lib, fetchurl, pam ? null, libX11, libXext, libXinerama
+, libXdmcp, libXt }:
+
+stdenv.mkDerivation rec {
+  name = "xlockmore-5.66";
+
+  src = fetchurl {
+    url = "http://sillycycle.com/xlock/${name}.tar.xz";
+    sha256 = "sha256-WXalw2YoKNFFIskOBvKN3PyOV3iP3gjri3pw6e87q3E=";
+    curlOpts = "--user-agent 'Mozilla/5.0'";
+  };
+
+  # Optionally, it can use GTK.
+  buildInputs = [ pam libX11 libXext libXinerama libXdmcp libXt ];
+
+  # Don't try to install `xlock' setuid. Password authentication works
+  # fine via PAM without super user privileges.
+  configureFlags =
+    [ "--disable-setuid"
+    ] ++ (lib.optional (pam != null) "--enable-pam");
+
+  postPatch =
+    let makePath = p: lib.concatMapStringsSep " " (x: x + "/" + p) buildInputs;
+        inputs = "${makePath "lib"} ${makePath "include"}";
+    in ''
+      sed -i 's,\(for ac_dir in\),\1 ${inputs},' configure.ac
+      sed -i 's,/usr/,/no-such-dir/,g' configure.ac
+      configureFlags+=" --enable-appdefaultdir=$out/share/X11/app-defaults"
+    '';
+
+  hardeningDisable = [ "format" ]; # no build output otherwise
+
+  meta = with lib; {
+    description = "Screen locker for the X Window System";
+    homepage = "http://sillycycle.com/xlockmore.html";
+    license = licenses.gpl2;
+    maintainers = with maintainers; [ pSub ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/misc/screensavers/xscreensaver/default.nix b/nixpkgs/pkgs/misc/screensavers/xscreensaver/default.nix
new file mode 100644
index 000000000000..5f41090d05fc
--- /dev/null
+++ b/nixpkgs/pkgs/misc/screensavers/xscreensaver/default.nix
@@ -0,0 +1,64 @@
+{ lib, stdenv, fetchurl, pkg-config, bc, perl, perlPackages, pam, libXext, libXScrnSaver, libX11
+, libXrandr, libXmu, libXxf86vm, libXrender, libXxf86misc, libjpeg, libGLU, libGL, gtk2
+, libxml2, libglade, intltool, xorg, makeWrapper, gle, gdk-pixbuf, gdk-pixbuf-xlib
+, forceInstallAllHacks ? false
+}:
+
+stdenv.mkDerivation rec {
+  version = "5.44";
+  pname = "xscreensaver";
+
+  src = fetchurl {
+    url = "https://www.jwz.org/${pname}/${pname}-${version}.tar.gz";
+    sha256 = "15bv05vpfjwsrqbazrjmm382jd7vvw0mp6y9vasn6wvxzjf0in3k";
+  };
+
+  buildInputs =
+    [ pkg-config bc perl libjpeg libGLU libGL gtk2 libxml2 libglade pam
+      libXext libXScrnSaver libX11 libXrandr libXmu libXxf86vm libXrender
+      libXxf86misc intltool xorg.appres makeWrapper gle gdk-pixbuf
+      gdk-pixbuf-xlib
+    ];
+
+  preConfigure =
+    ''
+      # Fix installation paths for GTK resources.
+      sed -e 's%@GTK_DATADIR@%@datadir@% ; s%@PO_DATADIR@%@datadir@%' \
+          -i driver/Makefile.in po/Makefile.in.in
+    '';
+
+  configureFlags =
+    [ "--with-gl" "--with-pam" "--with-pixbuf" "--with-proc-interrupts"
+      "--with-dpms-ext" "--with-randr-ext" "--with-xinerama-ext"
+      "--with-xf86vmode-ext" "--with-xf86gamma-ext" "--with-randr-ext"
+      "--with-xshm-ext" "--with-xdbe-ext"
+      "--with-x-app-defaults=\${out}/share/xscreensaver/app-defaults"
+    ];
+
+  postInstall = ''
+      wrapProgram $out/bin/xscreensaver-text \
+        --prefix PATH : ${lib.makeBinPath [xorg.appres]}
+      wrapProgram $out/bin/xscreensaver-getimage-file \
+        --set PERL5LIB "$out/${perlPackages.perl.libPrefix}:${with perlPackages; makePerlPath [
+              EncodeLocale HTTPDate HTTPMessage IOSocketSSL LWP LWPProtocolHttps
+              MozillaCA NetHTTP NetSSLeay TryTiny URI
+              ]}"
+  ''
+  + lib.optionalString forceInstallAllHacks ''
+    make -C hacks/glx dnalogo
+    cat hacks/Makefile.in | grep -E '([a-z0-9]+):[[:space:]]*\1[.]o' | cut -d : -f 1  | xargs make -C hacks
+    cat hacks/glx/Makefile.in | grep -E '([a-z0-9]+):[[:space:]]*\1[.]o' | cut -d : -f 1  | xargs make -C hacks/glx
+    cp -f $(find hacks -type f -perm -111 "!" -name "*.*" )  "$out/libexec/xscreensaver"
+  ''
+  ;
+
+  meta = {
+    homepage = "https://www.jwz.org/xscreensaver/";
+    description = "A set of screensavers";
+    maintainers = with lib.maintainers; [ raskin ];
+    platforms = lib.platforms.unix; # Once had cygwin problems
+    inherit version;
+    downloadPage = "https://www.jwz.org/xscreensaver/download.html";
+    updateWalker = true;
+  };
+}
diff --git a/nixpkgs/pkgs/misc/screensavers/xss-lock/default.nix b/nixpkgs/pkgs/misc/screensavers/xss-lock/default.nix
new file mode 100644
index 000000000000..c6dafd2a8127
--- /dev/null
+++ b/nixpkgs/pkgs/misc/screensavers/xss-lock/default.nix
@@ -0,0 +1,23 @@
+{ lib, stdenv, fetchFromGitHub, cmake, docutils, pkg-config, glib, libpthreadstubs
+, libXau, libXdmcp, xcbutil }:
+
+stdenv.mkDerivation {
+  name = "xss-lock-git-2018-05-31";
+
+  src = fetchFromGitHub {
+    owner = "xdbob";
+    repo = "xss-lock";
+    rev = "cd0b89df9bac1880ea6ea830251c6b4492d505a5";
+    sha256 = "040nqgfh564frvqkrkmak3x3h0yadz6kzk81jkfvd9vd20a9drh7";
+  };
+
+  nativeBuildInputs = [ cmake pkg-config docutils ];
+  buildInputs = [ glib libpthreadstubs libXau libXdmcp xcbutil ];
+
+  meta = with lib; {
+    description = "Use external locker (such as i3lock) as X screen saver";
+    license = licenses.mit;
+    maintainers = with maintainers; [ malyn offline ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/misc/screensavers/xssproxy/default.nix b/nixpkgs/pkgs/misc/screensavers/xssproxy/default.nix
new file mode 100644
index 000000000000..5e1c42084137
--- /dev/null
+++ b/nixpkgs/pkgs/misc/screensavers/xssproxy/default.nix
@@ -0,0 +1,30 @@
+{ lib, stdenv, fetchFromGitHub, glib, pkg-config, xorg, dbus }:
+
+let rev = "1.0.0"; in
+
+stdenv.mkDerivation {
+  name = "xssproxy-${rev}";
+
+  src = fetchFromGitHub {
+    owner = "timakro";
+    repo = "xssproxy";
+    rev = "v${rev}";
+    sha256 = "0c83wmipnsdnbihc5niyczs7jrkss2s8n6iwwjdia7hkjzbd0hl7";
+  };
+
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = [ glib xorg.libX11 xorg.libXScrnSaver dbus ];
+
+  makeFlags = [
+    "bindir=$(out)/bin"
+    "man1dir=$(out)/share/man/man1"
+  ];
+
+  meta = {
+    description = "Forward freedesktop.org Idle Inhibition Service calls to Xss";
+    homepage = "https://github.com/timakro/xssproxy";
+    license = lib.licenses.gpl3;
+    maintainers = with lib.maintainers; [ benley ];
+    platforms = lib.platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/misc/screensavers/xtrlock-pam/default.nix b/nixpkgs/pkgs/misc/screensavers/xtrlock-pam/default.nix
new file mode 100644
index 000000000000..c563cca05efe
--- /dev/null
+++ b/nixpkgs/pkgs/misc/screensavers/xtrlock-pam/default.nix
@@ -0,0 +1,28 @@
+{ lib, stdenv, fetchgit, python, pkg-config, xlibsWrapper, pam }:
+
+stdenv.mkDerivation {
+  name = "xtrlock-pam-3.4-post-20150909";
+
+  src = fetchgit {
+    url = "https://github.com/aanatoly/xtrlock-pam";
+    rev = "6f4920fcfff54791c0779057e9efacbbbbc05df6";
+    sha256 = "1z2wlhi5d05b18pvwz146kp0lkcc6z2mnilk01mk19hzbziyqmsc";
+  };
+
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = [ python xlibsWrapper pam ];
+
+  configurePhase = ''
+    substituteInPlace .config/options.py --replace /usr/include/security/pam_appl.h ${pam}/include/security/pam_appl.h
+    substituteInPlace src/xtrlock.c --replace system-local-login xscreensaver
+    python configure --prefix=$out
+  '';
+
+  meta = {
+    homepage = "https://github.com/aanatoly/xtrlock-pam";
+    description = "PAM based X11 screen locker";
+    license = "unknown";
+    maintainers = with lib.maintainers; [ tstrobel ];
+    platforms = with lib.platforms; linux;
+  };
+}
diff --git a/nixpkgs/pkgs/misc/seafile-shared/default.nix b/nixpkgs/pkgs/misc/seafile-shared/default.nix
new file mode 100644
index 000000000000..15a129246e18
--- /dev/null
+++ b/nixpkgs/pkgs/misc/seafile-shared/default.nix
@@ -0,0 +1,62 @@
+{ lib, stdenv
+, fetchFromGitHub
+, autoreconfHook
+, curl
+, libevent
+, libsearpc
+, libuuid
+, pkg-config
+, python3
+, sqlite
+, vala
+}:
+
+stdenv.mkDerivation rec {
+  pname = "seafile-shared";
+  version = "8.0.1";
+
+  src = fetchFromGitHub {
+    owner = "haiwen";
+    repo = "seafile";
+    rev = "d34499a2aafa024623a4210fe7f663cef13fe9a6";
+    sha256 = "VKoGr3CTDFg3Q0X+MTlwa4BbfLB+28FeTyTJRCq37RA=";
+  };
+
+  nativeBuildInputs = [
+    autoreconfHook
+    vala
+    pkg-config
+    python3
+    python3.pkgs.wrapPython
+  ];
+
+  buildInputs = [
+    libuuid
+    sqlite
+    libsearpc
+    libevent
+    curl
+  ];
+
+  configureFlags = [
+    "--disable-server"
+    "--disable-console"
+    "--with-python3"
+  ];
+
+  pythonPath = with python3.pkgs; [
+    libsearpc
+  ];
+
+  postFixup = ''
+    wrapPythonPrograms
+  '';
+
+  meta = with lib; {
+    homepage = "https://github.com/haiwen/seafile";
+    description = "Shared components of Seafile: seafile-daemon, libseafile, libseafile python bindings, manuals, and icons";
+    license = licenses.gpl3;
+    platforms = platforms.linux;
+    maintainers = [ ];
+  };
+}
diff --git a/nixpkgs/pkgs/misc/sndio/default.nix b/nixpkgs/pkgs/misc/sndio/default.nix
new file mode 100644
index 000000000000..c86198a6985b
--- /dev/null
+++ b/nixpkgs/pkgs/misc/sndio/default.nix
@@ -0,0 +1,22 @@
+{ lib, stdenv, fetchurl, alsaLib, fixDarwinDylibNames }:
+
+stdenv.mkDerivation rec {
+  pname = "sndio";
+  version = "1.7.0";
+  enableParallelBuilding = true;
+  nativeBuildInputs = lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames;
+  buildInputs = lib.optional stdenv.hostPlatform.isLinux alsaLib;
+
+  src = fetchurl {
+    url = "http://www.sndio.org/sndio-${version}.tar.gz";
+    sha256 = "0ljmac0lnjn61admgbcwjfcr5fwccrsblx9rj9bys8wlhz8f796x";
+  };
+
+  meta = with lib; {
+    homepage = "http://www.sndio.org";
+    description = "Small audio and MIDI framework part of the OpenBSD project";
+    license = licenses.isc;
+    maintainers = with maintainers; [ chiiruno ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/misc/solfege/css.patch b/nixpkgs/pkgs/misc/solfege/css.patch
new file mode 100644
index 000000000000..40273df0132b
--- /dev/null
+++ b/nixpkgs/pkgs/misc/solfege/css.patch
@@ -0,0 +1,33 @@
+Fix theme parsing errors: https://savannah.gnu.org/bugs/index.php?53107
+
+--- a/solfege.css
++++ b/solfege.css
+@@ -7,19 +7,19 @@
+-#ProgressionNameLabel, #Feedback { font: "Sans 18" }
+-#ProgressionLabelNumber { font: "Sans 12" }
+-#BoldText { font: Bold }
++#ProgressionNameLabel, #Feedback { font: 18px Sans }
++#ProgressionLabelNumber { font: 12px Sans }
++#BoldText { font: 12px Sans Bold }
+ 
+-#StatisticsH1, #Heading1 { font: Sans 18 }
+-#StatisticsH2, #Heading2 { font: Sans 14 }
++#StatisticsH1, #Heading1 { font: 18px Sans }
++#StatisticsH2, #Heading2 { font: 14px Sans }
+ 
+-#BpmInactiveLabel { font: Sans 12 }
+-#BpmActiveLabel { font: Sans Bold 12 }
++#BpmInactiveLabel { font: 12px Sans }
++#BpmActiveLabel { font: 12px Sans Bold }
+ 
+ #DIALOGWARNING2 { background: red; }
+ #DIALOGWARNING  { background: yellow; }
+ 
+ #DEBUGWARNING {
+   background: red;
+-  font: Sans Bold 24;
++  font: 24px Sans Bold;
+ }
+ 
+-#FlashBarLabel { font: Sans 16 }
++#FlashBarLabel { font: 16px Sans }
diff --git a/nixpkgs/pkgs/misc/solfege/default.nix b/nixpkgs/pkgs/misc/solfege/default.nix
new file mode 100644
index 000000000000..af2ce3f53cf2
--- /dev/null
+++ b/nixpkgs/pkgs/misc/solfege/default.nix
@@ -0,0 +1,47 @@
+{ lib, fetchurl, gettext, pkg-config, texinfo, wrapGAppsHook
+, buildPythonApplication, pycairo, pygobject3
+, gobject-introspection, gtk3, librsvg
+, alsaUtils, timidity, mpg123, vorbis-tools, csound, lilypond
+}:
+
+buildPythonApplication rec {
+  name = "solfege-3.23.4";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/solfege/${name}.tar.gz";
+    sha256 = "0sc17vf4xz6gy0s0z9ghi68yskikdmyb4gdaxx6imrm40734k8mp";
+  };
+
+  patches = [
+    ./css.patch
+    ./menubar.patch
+    ./texinfo.patch
+    ./webbrowser.patch
+  ];
+
+  nativeBuildInputs = [ gettext pkg-config texinfo wrapGAppsHook ];
+  buildInputs = [ gobject-introspection gtk3 librsvg ];
+  propagatedBuildInputs = [ pycairo pygobject3 ];
+
+  preBuild = ''
+    sed -i -e 's|wav_player=.*|wav_player=${alsaUtils}/bin/aplay|' \
+           -e 's|midi_player=.*|midi_player=${timidity}/bin/timidity|' \
+           -e 's|mp3_player=.*|mp3_player=${mpg123}/bin/mpg123|' \
+           -e 's|ogg_player=.*|ogg_player=${vorbis-tools}/bin/ogg123|' \
+           -e 's|csound=.*|csound=${csound}/bin/csound|' \
+           -e 's|lilypond-book=.*|lilypond-book=${lilypond}/bin/lilypond-book|' \
+           default.config
+  '';
+
+  format = "other";
+
+  enableParallelBuilding = true;
+
+  meta = with lib; {
+    description = "Ear training program";
+    homepage = "https://www.solfege.org/";
+    license = licenses.gpl3;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ bjornfor orivej ];
+  };
+}
diff --git a/nixpkgs/pkgs/misc/solfege/menubar.patch b/nixpkgs/pkgs/misc/solfege/menubar.patch
new file mode 100644
index 000000000000..36d3944af61d
--- /dev/null
+++ b/nixpkgs/pkgs/misc/solfege/menubar.patch
@@ -0,0 +1,7 @@
+Fix https://savannah.gnu.org/bugs/index.php?53109
+
+--- a/solfege/mainwin.py
++++ b/solfege/mainwin.py
+@@ -270,1 +270,1 @@
+-        hdlbox = Gtk.HandleBox()
++        hdlbox = Gtk.HBox()
diff --git a/nixpkgs/pkgs/misc/solfege/texinfo.patch b/nixpkgs/pkgs/misc/solfege/texinfo.patch
new file mode 100644
index 000000000000..d681b3e901bd
--- /dev/null
+++ b/nixpkgs/pkgs/misc/solfege/texinfo.patch
@@ -0,0 +1,20 @@
+Fix build with texinfo 6.7. Otherwise
+
+    makeinfo -I topdocs --no-split --no-headers --output AUTHORS topdocs/AUTHORS.texi
+
+fails with
+
+    utf8 "\xC1" does not map to Unicode at /nix/store/...-texinfo-6.7/share/texinfo/Texinfo/ParserNonXS.pm line 1796, <FH> line 38.
+
+--- a/topdocs/AUTHORS.texi
++++ b/topdocs/AUTHORS.texi
+@@ -1,2 +1,3 @@
+ \input texinfo
++@documentencoding ISO-8859-1
+ @setfilename AUTHORS.info
+--- a/topdocs/README.texi
++++ b/topdocs/README.texi
+@@ -1,2 +1,3 @@
+ \input texinfo
++@documentencoding ISO-8859-1
+ @setfilename README.info
diff --git a/nixpkgs/pkgs/misc/solfege/webbrowser.patch b/nixpkgs/pkgs/misc/solfege/webbrowser.patch
new file mode 100644
index 000000000000..2c9b77d0b8eb
--- /dev/null
+++ b/nixpkgs/pkgs/misc/solfege/webbrowser.patch
@@ -0,0 +1,8 @@
+Fix startup.
+
+--- a/solfege/mainwin.py
++++ b/solfege/mainwin.py
+@@ -27,2 +27,3 @@ import textwrap
+ try:
++    webbrowser.register_standard_browsers()
+     i = webbrowser._tryorder.index("x-www-browser")
diff --git a/nixpkgs/pkgs/misc/sound-of-sorting/default.nix b/nixpkgs/pkgs/misc/sound-of-sorting/default.nix
new file mode 100644
index 000000000000..6e838803dea0
--- /dev/null
+++ b/nixpkgs/pkgs/misc/sound-of-sorting/default.nix
@@ -0,0 +1,28 @@
+{ lib, stdenv, fetchFromGitHub, SDL2, wxGTK } :
+
+stdenv.mkDerivation rec {
+
+  pname = "sound-of-sorting";
+  version = "2017-12-23";
+
+  src = fetchFromGitHub {
+    owner = "bingmann";
+    repo = "sound-of-sorting";
+    rev = "5884a357af5775fb57d89eb028d4bf150760db75";
+    sha256 = "01bpzn38cwn9zlydzvnfz9k7mxdnjnvgnbcpx7i4al8fha7x9lw8";
+  };
+
+  buildInputs =
+  [ wxGTK SDL2 ];
+
+  preConfigure = ''
+    export SDL_CONFIG=${SDL2.dev}/bin/sdl2-config
+  '';
+
+  meta = with lib; {
+    description = "Audibilization and Visualization of Sorting Algorithms";
+    homepage = "https://panthema.net/2013/sound-of-sorting/";
+    license = with licenses; gpl3;
+    maintainers = with maintainers; [ AndersonTorres ];
+  };
+}
diff --git a/nixpkgs/pkgs/misc/source-and-tags/default.nix b/nixpkgs/pkgs/misc/source-and-tags/default.nix
new file mode 100644
index 000000000000..966a451c060c
--- /dev/null
+++ b/nixpkgs/pkgs/misc/source-and-tags/default.nix
@@ -0,0 +1,95 @@
+{ stdenv, lib, glibcLocales, unzip, hasktags, ctags } : {
+  # optional srcDir
+  annotatedWithSourceAndTagInfo = x : (x ? passthru && x.passthru ? sourceWithTags
+                                      || x ? meta && x.meta ? sourceWithTags );
+  # hack because passthru doesn't work the way I'd expect. Don't have time to spend on this right now
+  # that's why I'm abusing meta for the same purpose in ghcsAndLibs
+  sourceWithTagsFromDerivation = x : if x ? passthru && x.passthru ? sourceWithTags  then x.passthru.sourceWithTags
+                                     else if x ? meta && x.meta ? sourceWithTags  then x.meta.sourceWithTags
+                                       else null;
+
+  # createTagFiles =  [ { name  = "my_tag_name_without_suffix", tagCmd = "ctags -R . -o \$TAG_FILE"; } ]
+  # tag command must create file named $TAG_FILE
+  sourceWithTagsDerivation = {name, src, srcDir ? ".", tagSuffix ? "_tags", createTagFiles ? []} :
+    stdenv.mkDerivation {
+    phases = "unpackPhase buildPhase";
+    inherit src srcDir tagSuffix;
+    name = "${name}-source-with-tags";
+    nativeBuildInputs = [ unzip ];
+    # using separate tag directory so that you don't have to glob that much files when starting your editor
+    # is this a good choice?
+    buildPhase =
+      let createTags = lib.concatStringsSep "\n"
+          (map (a: ''
+            TAG_FILE="$SRC_DEST/${a.name}$tagSuffix"
+            echo running tag cmd "${a.tagCmd}" in `pwd`
+            ${a.tagCmd}
+            TAG_FILES="$TAG_FILES''${TAG_FILES:+:}$TAG_FILE"
+           '') createTagFiles );
+      in ''
+      SRC_DEST=$out/src/$name
+      mkdir -p $SRC_DEST
+      pwd; ls
+      cp -r $srcDir $SRC_DEST
+      cd $SRC_DEST
+      ${createTags}
+
+      mkdir -p $out/nix-support
+      echo "TAG_FILES=\"\$TAG_FILES\''${TAG_FILES:+:}$TAG_FILES\"" >> $out/nix-support/setup-hook
+    '';
+  };
+  # example usage
+  #testSourceWithTags = sourceWithTagsDerivation (ghc68extraLibs ghcsAndLibs.ghc68).happs_server_darcs.passthru.sourceWithTags;
+
+
+  # creates annotated derivation (comments see above)
+  addHasktagsTaggingInfo = deriv : deriv // {
+      passthru = {
+        sourceWithTags = {
+         inherit (deriv) src;
+         srcDir = if deriv ? srcDir then deriv.srcDir else ".";
+         name = deriv.name;
+         createTagFiles = [
+               { name = "${deriv.name}_haskell";
+                 # tagCmd = "${toString ghcsAndLibs.ghc68.ghc}/bin/hasktags --ignore-close-implementation --ctags `find . -type f -name \"*.*hs\"`; sort tags > \$TAG_FILE"; }
+                 # *.*hs.* to catch gtk2hs .hs.pp files
+                 tagCmd = "
+                   srcs=\"`find . -type f -name \"*.*hs\"; find . -type f -name \"*.*hs*\";`\"
+                   [ -z \"$srcs\" ] || {
+                    # without this creating tag files for lifted-base fails
+                    export LC_ALL=en_US.UTF-8
+                    export LANG=en_US.UTF-8
+                    ${if stdenv.isLinux then "export LOCALE_ARCHIVE=${glibcLocales}/lib/locale/locale-archive;" else ""}
+
+                    ${toString hasktags}/bin/hasktags --ignore-close-implementation --ctags .
+                    mv tags \$TAG_FILE
+                   }";
+              }
+          ];
+       };
+    };
+  };
+
+
+  addCTaggingInfo = deriv :
+    deriv // {
+      passthru = {
+        sourceWithTags = {
+         inherit (deriv) src;
+         name = "${deriv.name}-source-ctags";
+         createTagFiles = [
+               { inherit  (deriv) name;
+                 tagCmd = "${toString ctags}/bin/ctags --sort=yes -o \$TAG_FILE -R ."; }
+          ];
+        };
+  }; };
+}
+/*
+experimental
+idea:
+a) Attach some information to a nexpression telling how to create a tag file which can then be used within your favourite editor
+   Do this in a way not affecting the expression (using passthru or meta which is ignored when calculating the hash)
+   implementations: addCTaggingInfo (C / C++) and addHasktagsTaggingInfo (Haskell)
+b) use sourceWithTagsDerivation function to create a derivation installing the source along with the generated tag files
+   so that you can use them easily witihn your favourite text editor
+*/
diff --git a/nixpkgs/pkgs/misc/stabber/default.nix b/nixpkgs/pkgs/misc/stabber/default.nix
new file mode 100644
index 000000000000..eb0d6a4109d0
--- /dev/null
+++ b/nixpkgs/pkgs/misc/stabber/default.nix
@@ -0,0 +1,31 @@
+{ lib, stdenv, fetchFromGitHub, autoreconfHook, pkg-config, glib, expat
+, libmicrohttpd
+}:
+
+with lib;
+
+stdenv.mkDerivation {
+  pname = "stabber-unstable";
+  version = "2020-06-08";
+
+  src = fetchFromGitHub {
+    owner = "boothj5";
+    repo = "stabber";
+    rev = "3e5c2200715666aad403d0076e8ab584b329965e";
+    sha256 = "0042nbgagl4gcxa5fj7bikjdi1gbk0jwyqnzc5lswpb0l5y0i1ql";
+  };
+
+  preAutoreconf = ''
+    mkdir m4
+  '';
+
+  buildInputs = [ autoreconfHook pkg-config glib expat libmicrohttpd ];
+
+  meta = {
+    description = "Stubbed XMPP Server";
+    homepage = "https://github.com/profanity-im/stabber";
+    license = licenses.gpl3;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ hschaeidt ];
+  };
+}
diff --git a/nixpkgs/pkgs/misc/talkfilters/default.nix b/nixpkgs/pkgs/misc/talkfilters/default.nix
new file mode 100644
index 000000000000..0f265f7e259c
--- /dev/null
+++ b/nixpkgs/pkgs/misc/talkfilters/default.nix
@@ -0,0 +1,26 @@
+{ lib, stdenv, fetchurl }:
+
+let
+  pname = "talkfilters";
+  version = "2.3.8";
+in
+
+stdenv.mkDerivation {
+  name = "${pname}-${version}";
+
+  src = fetchurl {
+    url = "http://www.hyperrealm.com/${pname}/${pname}-${version}.tar.gz";
+    sha256 = "19nc5vq4bnkjvhk8srqddzhcs93jyvpm9r6lzjzwc1mgf08yg0a6";
+  };
+
+  hardeningDisable = [ "format" ];
+
+  meta = {
+    description = "Converts English text into text that mimics a stereotyped or humorous dialect";
+    homepage = "http://www.hyperrealm.com/talkfilters/talkfilters.html";
+    license = lib.licenses.gpl2;
+    maintainers = with lib.maintainers; [ ikervagyok ];
+    platforms = with lib.platforms; unix;
+  };
+}
+
diff --git a/nixpkgs/pkgs/misc/tmux-plugins/default.nix b/nixpkgs/pkgs/misc/tmux-plugins/default.nix
new file mode 100644
index 000000000000..d8ab3dcc5c6f
--- /dev/null
+++ b/nixpkgs/pkgs/misc/tmux-plugins/default.nix
@@ -0,0 +1,587 @@
+{ lib
+, fetchFromGitHub
+, pkgs
+, stdenv
+}:
+
+let
+  rtpPath = "share/tmux-plugins";
+
+  addRtp = path: rtpFilePath: attrs: derivation:
+    derivation // { rtp = "${derivation}/${path}/${rtpFilePath}"; } // {
+      overrideAttrs = f: mkTmuxPlugin (attrs // f attrs);
+    };
+
+  mkTmuxPlugin = a@{
+    pluginName,
+    rtpFilePath ? (builtins.replaceStrings ["-"] ["_"] pluginName) + ".tmux",
+    namePrefix ? "tmuxplugin-",
+    src,
+    unpackPhase ? "",
+    configurePhase ? ":",
+    buildPhase ? ":",
+    addonInfo ? null,
+    preInstall ? "",
+    postInstall ? "",
+    path ? lib.getName pluginName,
+    ...
+  }:
+    if lib.hasAttr "dependencies" a then
+      throw "dependencies attribute is obselete. see NixOS/nixpkgs#118034" # added 2021-04-01
+    else addRtp "${rtpPath}/${path}" rtpFilePath a (stdenv.mkDerivation (a // {
+      pname = namePrefix + pluginName;
+
+      inherit pluginName unpackPhase configurePhase buildPhase addonInfo preInstall postInstall;
+
+      installPhase = ''
+        runHook preInstall
+
+        target=$out/${rtpPath}/${path}
+        mkdir -p $out/${rtpPath}
+        cp -r . $target
+        if [ -n "$addonInfo" ]; then
+          echo "$addonInfo" > $target/addon-info.json
+        fi
+
+        runHook postInstall
+      '';
+    }));
+
+in rec {
+  inherit mkTmuxPlugin;
+
+  mkDerivation = throw "tmuxPlugins.mkDerivation is deprecated, use tmuxPlugins.mkTmuxPlugin instead"; # added 2021-03-14
+
+  battery = mkTmuxPlugin {
+    pluginName = "battery";
+    version = "unstable-2019-07-04";
+    src = fetchFromGitHub {
+      owner = "tmux-plugins";
+      repo = "tmux-battery";
+      rev = "f8b8e8451990365e0c98c38c184962e4f83b793b";
+      sha256 = "1bhdzsx3kdjqjmm1q4j8937lrpkzf71irr3fqhdbddsghwrrmwim";
+    };
+  };
+
+  continuum = mkTmuxPlugin {
+    pluginName = "continuum";
+    version = "unstable-2020-10-16";
+    src = fetchFromGitHub {
+      owner = "tmux-plugins";
+      repo = "tmux-continuum";
+      rev = "26eb5ffce0b559d682b9f98c8d4b6c370ecb639b";
+      sha256 = "1glwa89bv2r92qz579a49prk3jf612cpd5hw46j4wfb35xhnj3ab";
+    };
+    meta = {
+      homepage = "https://github.com/tmux-plugins/tmux-continuum";
+      description = "continous saving of tmux environment";
+      longDescription =
+      ''
+        Features:
+        * continuous saving of tmux environment
+        * automatic tmux start when computer/server is turned on
+        * automatic restore when tmux is started
+
+        Together, these features enable uninterrupted tmux usage. No matter the
+        computer or server restarts, if the machine is on, tmux will be there how
+        you left it off the last time it was used.
+      '';
+      license = lib.licenses.mit;
+      platforms = lib.platforms.unix;
+      maintainers = with lib.maintainers; [ ronanmacf ];
+    };
+  };
+
+  copycat = mkTmuxPlugin {
+    pluginName = "copycat";
+    version = "unstable-2020-01-09";
+    src = fetchFromGitHub {
+      owner = "tmux-plugins";
+      repo = "tmux-copycat";
+      rev = "77ca3aab2aed8ede3e2b941079b1c92dd221cf5f";
+      sha256 = "1bchwzhai8k5rk32n4lrmh56rw944jqxr8imjk74hyaa7bbn81ds";
+    };
+  };
+
+  cpu = mkTmuxPlugin {
+    pluginName = "cpu";
+    version = "unstable-2020-07-25";
+    src = fetchFromGitHub {
+      owner = "tmux-plugins";
+      repo = "tmux-cpu";
+      rev = "20120a38ade17057441482b43eb5390e6ea2c1c1";
+      sha256 = "1gdz2awyd9icvyiw2p40gwymh6ngjhb9mkiv63ix53snp9ii794i";
+    };
+  };
+
+  ctrlw = mkTmuxPlugin rec {
+    pluginName = "ctrlw";
+    version = "0.1.1";
+    src = fetchFromGitHub {
+      owner = "eraserhd";
+      repo = "tmux-ctrlw";
+      rev = "v${version}";
+      sha256 = "1kv5pqfjczd6z7i9jf6j5xmcai50l9bn5p2p1w1l5fi6cj8cz1k1";
+    };
+  };
+
+  dracula = mkTmuxPlugin rec {
+    pluginName = "dracula";
+    version = "unstable-2021-02-18";
+    src = fetchFromGitHub {
+      owner = "dracula";
+      repo = "tmux";
+      rev = "8d1a7fa41b773d4f7b53dfff2d9fc5166d34f104";
+      sha256 = "DG+oKbTkYO4hwoOlOqW5IuCLdVEttlvLM2en4DUHyMY=";
+    };
+    meta = with lib; {
+      homepage = "https://draculatheme.com/tmux";
+      description = "A feature packed Dracula theme for tmux!";
+      license = licenses.mit;
+      platforms = platforms.unix;
+      maintainers = with maintainers; [ ethancedwards8 ];
+    };
+  };
+
+  extrakto = mkTmuxPlugin {
+    pluginName = "extrakto";
+    version = "unstable-2021-04-04";
+    src = fetchFromGitHub {
+      owner = "laktak";
+      repo = "extrakto";
+      rev = "de8ac3e8a9fa887382649784ed8cae81f5757f77";
+      sha256 = "0mkp9r6mipdm7408w7ls1vfn6i3hj19nmir2bvfcp12b69zlzc47";
+    };
+    nativeBuildInputs = [ pkgs.makeWrapper ];
+    postInstall = ''
+    for f in extrakto.sh open.sh tmux-extrakto.sh; do
+      wrapProgram $target/scripts/$f \
+        --prefix PATH : ${with pkgs; lib.makeBinPath (
+        [ pkgs.fzf pkgs.python3 pkgs.xclip ]
+        )}
+    done
+
+    '';
+    meta = {
+      homepage = "https://github.com/laktak/extrakto";
+      description = "Fuzzy find your text with fzf instead of selecting it by hand ";
+      license = lib.licenses.mit;
+      platforms = lib.platforms.unix;
+      maintainers = with lib.maintainers; [ kidd ];
+    };
+  };
+
+  fingers = mkTmuxPlugin rec {
+    pluginName = "fingers";
+    rtpFilePath = "tmux-fingers.tmux";
+    version = "1.0.1";
+    src = fetchFromGitHub {
+      owner = "Morantron";
+      repo = "tmux-fingers";
+      rev = version;
+      sha256 = "0gp37m3d0irrsih96qv2yalvr1wmf1n64589d4qzyzq16lzyjcr0";
+      fetchSubmodules = true;
+    };
+    nativeBuildInputs = [ pkgs.makeWrapper ];
+    postInstall = ''
+      for f in config.sh tmux-fingers.sh setup-fingers-mode-bindings.sh; do
+      wrapProgram $target/scripts/$f \
+        --prefix PATH : ${with pkgs; lib.makeBinPath (
+          [ gawk ] ++ lib.optionals stdenv.isDarwin [ reattach-to-user-namespace ]
+        )}
+      done
+    '';
+  };
+
+  fpp = mkTmuxPlugin {
+    pluginName = "fpp";
+    version = "unstable-2016-03-08";
+    src = fetchFromGitHub {
+      owner = "tmux-plugins";
+      repo = "tmux-fpp";
+      rev = "ca125d5a9c80bb156ac114ac3f3d5951a795c80e";
+      sha256 = "1b89s6mfzifi7s5iwf22w7niddpq28w48nmqqy00dv38z4yga5ws";
+    };
+    postInstall = ''
+      sed -i -e 's|fpp |${pkgs.fpp}/bin/fpp |g' $target/fpp.tmux
+    '';
+  };
+
+  fzf-tmux-url = mkTmuxPlugin {
+    pluginName = "fzf-tmux-url";
+    rtpFilePath = "fzf-url.tmux";
+    version = "unstable-2019-12-02";
+    src = fetchFromGitHub {
+      owner = "wfxr";
+      repo = "tmux-fzf-url";
+      rev = "2baa410bf7a0f6ceb62a83770baf90d570406ac0";
+      sha256 = "0rjzzlmxgjrr8g19bg2idcqr9ny07mrq2s39vndg24n0m7znh3fz";
+    };
+  };
+
+  gruvbox = mkTmuxPlugin {
+    pluginName = "gruvbox";
+    rtpFilePath = "gruvbox-tpm.tmux";
+    version = "unstable-2019-05-05";
+    src = fetchFromGitHub {
+      owner = "egel";
+      repo = "tmux-gruvbox";
+      rev = "6149fd8b5d6924925b4d5aa6935039780e94f3d6";
+      sha256 = "1ykr4yardavd0x7yfrnshd4b0gi8p31pji7i79ib0nss134zncpb";
+    };
+  };
+
+  jump = mkTmuxPlugin {
+    pluginName = "jump";
+    version = "2020-06-26";
+    rtpFilePath = "tmux-jump.tmux";
+    src = fetchFromGitHub {
+      owner = "schasse";
+      repo = "tmux-jump";
+      rev = "416f613d3eaadbe1f6f9eda77c49430527ebaffb";
+      sha256 = "1xbzdyhsgaq2in0f8f491gwjmx6cxpkf2c35d2dk0kg4jfs505sz";
+    };
+    postInstall = ''
+      sed -i -e 's|ruby|${pkgs.ruby}/bin/ruby|g' $target/scripts/tmux-jump.sh
+    '';
+    meta = with lib; {
+      homepage = "https://github.com/schasse/tmux-jump";
+      description = "Vimium/Easymotion like navigation for tmux";
+      license = licenses.gpl3;
+      platforms = platforms.unix;
+      maintainers = with maintainers; [ arnarg ];
+    };
+  };
+
+  logging = mkTmuxPlugin {
+    pluginName = "logging";
+    version = "unstable-2019-04-19";
+    src = fetchFromGitHub {
+      owner = "tmux-plugins";
+      repo = "tmux-logging";
+      rev = "b085ad423b5d59a2c8b8d71772352e7028b8e1d0";
+      sha256 = "0p0sawysalhi8k2a5hdxniqx6kb24kd8rnvfzkjqigzid5ik37js";
+    };
+  };
+
+  net-speed = mkTmuxPlugin {
+    pluginName = "net-speed";
+    version = "unstable-2018-12-02";
+    src = fetchFromGitHub {
+      owner = "tmux-plugins";
+      repo = "tmux-net-speed";
+      rev = "58abb615971cb617821e2e7e41c660334f55a92d";
+      sha256 = "1aj06gdhzcxsydjzf21n9kyxigwf38kh2rg8hh7gnjk260ydqlrc";
+    };
+  };
+
+  nord = mkTmuxPlugin rec {
+    pluginName = "nord";
+    version = "0.3.0";
+    src = pkgs.fetchFromGitHub {
+      owner = "arcticicestudio";
+      repo = "nord-tmux";
+      rev = "v${version}";
+      sha256 = "14xhh49izvjw4ycwq5gx4if7a0bcnvgsf3irywc3qps6jjcf5ymk";
+    };
+  };
+
+  maildir-counter = mkTmuxPlugin {
+    pluginName = "maildir-counter";
+    version = "unstable-2016-11-25";
+    src = fetchFromGitHub {
+      owner = "tmux-plugins";
+      repo = "tmux-maildir-counter";
+      rev = "9415f0207e71e37cbd870c9443426dbea6da78b9";
+      sha256 = "0dwvqhiv9bjwr01hsi5c57n55jyv5ha5m5q1aqgglf4wyhbnfms4";
+    };
+  };
+
+  online-status = mkTmuxPlugin {
+    pluginName = "online-status";
+    version = "unstable-2018-11-30";
+    src = fetchFromGitHub {
+      owner = "tmux-plugins";
+      repo = "tmux-online-status";
+      rev = "ea86704ced8a20f4a431116aa43f57edcf5a6312";
+      sha256 = "1hy3vg8v2sir865ylpm2r4ip1zgd4wlrf24jbwh16m23qdcvc19r";
+    };
+  };
+
+  open = mkTmuxPlugin {
+    pluginName = "open";
+    version = "unstable-2019-12-02";
+    src = fetchFromGitHub {
+      owner = "tmux-plugins";
+      repo = "tmux-open";
+      rev = "cedb4584908bd8458fadc8d3e64101d3cbb48d46";
+      sha256 = "10s0xdhmg0dhpj13ybcq72pw3xgb2dq5v5h2mwidzqyh9g17wndh";
+    };
+  };
+
+  onedark-theme = mkTmuxPlugin {
+    pluginName = "onedark-theme";
+    rtpFilePath = "tmux-onedark-theme.tmux";
+    version = "unstable-2020-06-07";
+    src = fetchFromGitHub {
+      owner = "odedlaz";
+      repo = "tmux-onedark-theme";
+      rev = "3607ef889a47dd3b4b31f66cda7f36da6f81b85c";
+      sha256 = "19jljshwp2p83b634cd1mw69091x42jj0dg40ipw61qy6642h2m5";
+    };
+  };
+
+  pain-control = mkTmuxPlugin {
+    pluginName = "pain-control";
+    version = "unstable-2020-02-18";
+    src = fetchFromGitHub {
+      owner = "tmux-plugins";
+      repo = "tmux-pain-control";
+      rev = "2db63de3b08fc64831d833240749133cecb67d92";
+      sha256 = "0w7a6n4n86ysiqcqj12j2hg9r5fznvbp3dz8pzas9q1k3avlk0zk";
+    };
+  };
+
+  plumb = mkTmuxPlugin rec {
+    pluginName = "plumb";
+    version = "0.1.1";
+    src = fetchFromGitHub {
+      owner = "eraserhd";
+      repo = "tmux-plumb";
+      rev = "v${version}";
+      sha256 = "1c6k4fdl0az9811r6k164mgd4w5la75xr6x7nabmy046xc0z5i2r";
+    };
+    postInstall = ''
+      sed -i -e 's,9 plumb,${pkgs.plan9port}/bin/9 plumb,' $target/scripts/plumb
+    '';
+  };
+
+  power-theme = mkTmuxPlugin {
+    pluginName = "power";
+    rtpFilePath = "tmux-power.tmux";
+    version = "unstable-2020-11-18";
+    src = pkgs.fetchFromGitHub {
+      owner = "wfxr";
+      repo = "tmux-power";
+      rev = "aec44aa5e00cc39eb71c668b1d73823270058e7d";
+      sha256 = "11nm8cylx10d565g17acy0bj12n6dcbxp71zca2bmg0j1dq859cm";
+    };
+  };
+
+  prefix-highlight = mkTmuxPlugin {
+    pluginName = "prefix-highlight";
+    version = "unstable-2020-03-26";
+    src = fetchFromGitHub {
+      owner = "tmux-plugins";
+      repo = "tmux-prefix-highlight";
+      rev = "1db6e735aad54503b076391d791c56e1af213917";
+      sha256 = "0ws9blzg00zhz548m51cm6zbrkqlz7jazkr5029vka1f6qk36x0g";
+    };
+  };
+
+  resurrect = mkTmuxPlugin {
+    pluginName = "resurrect";
+    version = "unstable-2020-09-18";
+    src = fetchFromGitHub {
+      owner = "tmux-plugins";
+      repo = "tmux-resurrect";
+      rev = "e4825055c92e54b0c6ec572afc9b6c4723aba6c8";
+      sha256 = "0a96drkx1kpadkbxabcnvb542p75xdh2dbizvlq2lac5ldpb4hmx";
+    };
+    meta = {
+      homepage = "https://github.com/tmux-plugins/tmux-resurrect";
+      description = "Restore tmux environment after system restart";
+      longDescription =
+        ''
+          This plugin goes to great lengths to save and restore all the details
+          from your tmux environment. Here's what's been taken care of:
+
+          * all sessions, windows, panes and their order
+          * current working directory for each pane
+          * exact pane layouts within windows (even when zoomed)
+          * active and alternative session
+          * active and alternative window for each session
+          * windows with focus
+          * active pane for each window
+          * "grouped sessions" (useful feature when using tmux with multiple monitors)
+          * programs running within a pane! More details in the restoring programs doc.
+
+          Optional:
+          * restoring vim and neovim sessions
+          * restoring pane contents
+      '';
+      license = lib.licenses.mit;
+      platforms = lib.platforms.unix;
+      maintainers = with lib.maintainers; [ ronanmacf ];
+    };
+  };
+
+  sensible = mkTmuxPlugin {
+    pluginName = "sensible";
+    version = "unstable-2017-09-05";
+    src = fetchFromGitHub {
+      owner = "tmux-plugins";
+      repo = "tmux-sensible";
+      rev = "e91b178ff832b7bcbbf4d99d9f467f63fd1b76b5";
+      sha256 = "1z8dfbwblrbmb8sgb0k8h1q0dvfdz7gw57las8nwd5gj6ss1jyvx";
+    };
+    postInstall = lib.optionalString stdenv.isDarwin ''
+      sed -e 's:reattach-to-user-namespace:${pkgs.reattach-to-user-namespace}/bin/reattach-to-user-namespace:g' -i $target/sensible.tmux
+    '';
+  };
+
+  sessionist = mkTmuxPlugin {
+    pluginName = "sessionist";
+    version = "unstable-2017-12-03";
+    src = fetchFromGitHub {
+      owner = "tmux-plugins";
+      repo = "tmux-sessionist";
+      rev = "09ec86be38eae98ffc27bd0dde605ed10ae0dc89";
+      sha256 = "030q2mmj8akbc26jnqn8n7fckg1025p0ildx4wr401b6p1snnlw4";
+    };
+  };
+
+  sidebar = mkTmuxPlugin {
+    pluginName = "sidebar";
+    version = "unstable-2018-11-30";
+    src = fetchFromGitHub {
+      owner = "tmux-plugins";
+      repo = "tmux-sidebar";
+      rev = "aacbdb45bc5ab69db448a72de4155d0b8dbac677";
+      sha256 = "1bp90zbv19kbbiik0bgb893ybss1jqsnk3353a631993xjwsih7c";
+    };
+  };
+
+  sysstat = mkTmuxPlugin {
+    pluginName = "sysstat";
+    version = "unstable-2017-12-12";
+    src = fetchFromGitHub {
+      owner = "samoshkin";
+      repo = "tmux-plugin-sysstat";
+      rev = "29e150f403151f2341f3abcb2b2487a5f011dd23";
+      sha256 = "013mv9p6r2r0ls3p60l8hdad4hm8niv3wr27vgm925gxmibi4hyq";
+    };
+  };
+
+  tilish = mkTmuxPlugin {
+    pluginName = "tilish";
+    version = "2020-08-12";
+    src = fetchFromGitHub {
+      owner = "jabirali";
+      repo = "tmux-tilish";
+      rev = "73d2404cdc0ef6bd7fbc8982edae0b0e2a4dd860";
+      sha256 = "1x58h3bg9d69j40fh8rcjpxvg0i6j04pj8p3jk57l3cghxis5j05";
+    };
+
+    meta = with lib; {
+      homepage = "https://github.com/jabirali/tmux-tilish";
+      description = "Plugin which makes tmux work and feel like i3wm";
+      license = licenses.mit;
+      platforms = platforms.unix;
+      maintainers = with maintainers; [ arnarg ];
+    };
+  };
+
+  tmux-colors-solarized = mkTmuxPlugin {
+    pluginName = "tmuxcolors";
+    version = "unstable-2019-07-14";
+    src = fetchFromGitHub {
+      owner = "seebi";
+      repo = "tmux-colors-solarized";
+      rev = "e5e7b4f1af37f8f3fc81ca17eadee5ae5d82cd09";
+      sha256 = "1l3i82abzi4b395cgdsjg7lcfaq15kyyhijwvrgchzxi95z3hl4x";
+    };
+  };
+
+  tmux-fzf = mkTmuxPlugin {
+    pluginName = "tmux-fzf";
+    rtpFilePath = "main.tmux";
+    version = "unstable-2020-12-07";
+    src = fetchFromGitHub {
+      owner = "sainnhe";
+      repo = "tmux-fzf";
+      rev = "5efeb91086040a3becf5372fb38258acd0579954";
+      sha256 = "1z0zmsf8asxs9wbwvkiyd81h93wb2ikl8nxxc26sdpi6l333q5s9";
+    };
+    postInstall = ''
+      find $target -type f -print0 | xargs -0 sed -i -e 's|fzf |${pkgs.fzf}/bin/fzf |g'
+      find $target -type f -print0 | xargs -0 sed -i -e 's|sed |${pkgs.gnused}/bin/sed |g'
+      find $target -type f -print0 | xargs -0 sed -i -e 's|tput |${pkgs.ncurses}/bin/tput |g'
+    '';
+    meta = {
+      homepage = "https://github.com/sainnhe/tmux-fzf";
+      description = "Use fzf to manage your tmux work environment! ";
+      longDescription =
+        ''
+        Features:
+        * Manage sessions (attach, detach*, rename, kill*).
+        * Manage windows (switch, link, move, swap, rename, kill*).
+        * Manage panes (switch, break, join*, swap, layout, kill*, resize).
+        * Multiple selection (support for actions marked by *).
+        * Search commands and append to command prompt.
+        * Search key bindings and execute.
+        * User menu.
+        * Popup window support.
+      '';
+      license = lib.licenses.mit;
+      platforms = lib.platforms.unix;
+      maintainers = with lib.maintainers; [ kyleondy ];
+    };
+  };
+
+  urlview = mkTmuxPlugin {
+    pluginName = "urlview";
+    version = "unstable-2016-01-06";
+    src = fetchFromGitHub {
+      owner = "tmux-plugins";
+      repo = "tmux-urlview";
+      rev = "b84c876cffdd22990b4ab51247e795cbd7813d53";
+      sha256 = "1jp4jq57cn116b3i34v6yy69izd8s6mp2ijr260cw86g0470k0fn";
+    };
+    postInstall = ''
+      sed -i -e '14,20{s|urlview|${pkgs.urlview}/bin/urlview|g}' $target/urlview.tmux
+    '';
+  };
+
+  vim-tmux-focus-events = mkTmuxPlugin {
+    pluginName = "vim-tmux-focus-events";
+    version = "unstable-2020-10-05";
+    src = fetchFromGitHub {
+      owner = "tmux-plugins";
+      repo = "vim-tmux-focus-events";
+      rev = "a568192ca0de4ca0bd7b3cd0249aad491625c941";
+      sha256 = "130l73v18md95djkc4s9d0fr018f8f183sjcgy7dgldwdaxlqdi1";
+    };
+
+    meta = with lib; {
+      homepage = "https://github.com/tmux-plugins/vim-tmux-focus-events";
+      description = "Makes FocusGained and FocusLost autocommand events work in vim when using tmux";
+      license = licenses.mit;
+      platforms = platforms.unix;
+      maintainers = with maintainers; [ ronanmacf ];
+    };
+  };
+
+  vim-tmux-navigator = mkTmuxPlugin {
+    pluginName = "vim-tmux-navigator";
+    rtpFilePath = "vim-tmux-navigator.tmux";
+    version = "unstable-2019-12-10";
+    src = fetchFromGitHub {
+      owner = "christoomey";
+      repo = "vim-tmux-navigator";
+      rev = "8fdf78292bb3aed1c9de880be7e03efdbf23d306";
+      sha256 = "0y92na4dcfcsj5zbs3m7y6csl3sd46a9968id78cdn9cgg8iwzac";
+    };
+  };
+
+  yank = mkTmuxPlugin {
+    pluginName = "yank";
+    version = "unstable-2019-12-02";
+    src = fetchFromGitHub {
+      owner = "tmux-plugins";
+      repo = "tmux-yank";
+      rev = "648005db64d9bf3c4650eff694ecb6cf3e42b0c8";
+      sha256 = "1zg9k8yk1iw01vl8m44w4sv20lln4l0lq9dafc09lxmgxm9dllj4";
+    };
+  };
+}
diff --git a/nixpkgs/pkgs/misc/tpm2-pkcs11/0001-configure-ac-version.patch b/nixpkgs/pkgs/misc/tpm2-pkcs11/0001-configure-ac-version.patch
new file mode 100644
index 000000000000..fa2575cb938a
--- /dev/null
+++ b/nixpkgs/pkgs/misc/tpm2-pkcs11/0001-configure-ac-version.patch
@@ -0,0 +1,13 @@
+diff --git a/configure.ac b/configure.ac
+index e861e42..018c19c 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -26,7 +26,7 @@
+ #;**********************************************************************;
+ 
+ AC_INIT([tpm2-pkcs11],
+-  [m4_esyscmd_s([git describe --tags --always --dirty])],
++  [git-@VERSION@],
+   [https://github.com/tpm2-software/tpm2-pkcs11/issues],
+   [],
+   [https://github.com/tpm2-software/tpm2-pkcs11])
diff --git a/nixpkgs/pkgs/misc/tpm2-pkcs11/default.nix b/nixpkgs/pkgs/misc/tpm2-pkcs11/default.nix
new file mode 100644
index 000000000000..232b86b1e7ab
--- /dev/null
+++ b/nixpkgs/pkgs/misc/tpm2-pkcs11/default.nix
@@ -0,0 +1,79 @@
+{ stdenv, lib, fetchFromGitHub, substituteAll
+, pkg-config, autoreconfHook, autoconf-archive, makeWrapper, patchelf
+, tpm2-tss, tpm2-tools, opensc, openssl, sqlite, python37, glibc, libyaml
+, abrmdSupport ? true, tpm2-abrmd ? null
+}:
+
+stdenv.mkDerivation rec {
+  pname = "tpm2-pkcs11";
+  version = "1.5.0";
+
+  src = fetchFromGitHub {
+    owner = "tpm2-software";
+    repo = pname;
+    rev = version;
+    sha256 = "0sm73a762c7qd6x3f052m00d7daprifimsfa17dfdf4jvy9fqy56";
+  };
+
+  patches = lib.singleton (
+    substituteAll {
+      src = ./0001-configure-ac-version.patch;
+      VERSION = version;
+    });
+
+  # The preConfigure phase doesn't seem to be working here
+  # ./bootstrap MUST be executed as the first step, before all
+  # of the autoreconfHook stuff
+  postPatch = ''
+    ./bootstrap
+  '';
+
+  nativeBuildInputs = [
+    pkg-config autoreconfHook autoconf-archive makeWrapper patchelf
+  ];
+  buildInputs = [
+    tpm2-tss tpm2-tools opensc openssl sqlite libyaml
+    (python37.withPackages (ps: [ ps.pyyaml ps.cryptography ps.pyasn1-modules ]))
+  ];
+
+  outputs = [ "out" "bin" "dev" ];
+
+  dontStrip = true;
+  dontPatchELF = true;
+
+  # To be able to use the userspace resource manager, the RUNPATH must
+  # explicitly include the tpm2-abrmd shared libraries.
+  preFixup = let
+    rpath = lib.makeLibraryPath (
+      (lib.optional abrmdSupport tpm2-abrmd)
+      ++ [
+        tpm2-tss
+        sqlite
+        openssl
+        glibc
+        libyaml
+      ]
+    );
+  in ''
+    patchelf \
+      --set-rpath ${rpath} \
+      ${lib.optionalString abrmdSupport "--add-needed ${lib.makeLibraryPath [tpm2-abrmd]}/libtss2-tcti-tabrmd.so"} \
+      --add-needed ${lib.makeLibraryPath [tpm2-tss]}/libtss2-tcti-device.so \
+      $out/lib/libtpm2_pkcs11.so.0.0.0
+  '';
+
+  postInstall = ''
+    mkdir -p $bin/bin/ $bin/share/tpm2_pkcs11/
+    mv ./tools/* $bin/share/tpm2_pkcs11/
+    makeWrapper $bin/share/tpm2_pkcs11/tpm2_ptool.py $bin/bin/tpm2_ptool \
+      --prefix PATH : ${lib.makeBinPath [ tpm2-tools ]}
+  '';
+
+  meta = with lib; {
+    description = "A PKCS#11 interface for TPM2 hardware";
+    homepage = "https://github.com/tpm2-software/tpm2-pkcs11";
+    license = licenses.bsd2;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ matthiasbeyer ];
+  };
+}
diff --git a/nixpkgs/pkgs/misc/uboot/0001-configs-rpi-allow-for-bigger-kernels.patch b/nixpkgs/pkgs/misc/uboot/0001-configs-rpi-allow-for-bigger-kernels.patch
new file mode 100644
index 000000000000..3d0324a692cc
--- /dev/null
+++ b/nixpkgs/pkgs/misc/uboot/0001-configs-rpi-allow-for-bigger-kernels.patch
@@ -0,0 +1,45 @@
+From 3d0ce353cf62efea11aa88f814aa23bf8c04acc9 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Milan=20P=C3=A4ssler?= <milan@petabyte.dev>
+Date: Mon, 11 Jan 2021 15:13:10 +0100
+Subject: [PATCH] configs/rpi: allow for bigger kernels
+
+---
+ include/configs/rpi.h | 16 ++++++++--------
+ 1 file changed, 8 insertions(+), 8 deletions(-)
+
+diff --git a/include/configs/rpi.h b/include/configs/rpi.h
+index 834f1cd..10ab1e7 100644
+--- a/include/configs/rpi.h
++++ b/include/configs/rpi.h
+@@ -153,20 +153,20 @@
+  * more than ~700M away from the start of the kernel image but this number can
+  * be larger OR smaller depending on e.g. the 'vmalloc=xxxM' command line
+  * parameter given to the kernel. So reserving memory from low to high
+- * satisfies this constraint again. Reserving 1M at 0x02600000-0x02700000 for
+- * the DTB leaves rest of the free RAM to the initrd starting at 0x02700000.
++ * satisfies this constraint again. Reserving 1M at 0x02e00000-0x02f00000 for
++ * the DTB leaves rest of the free RAM to the initrd starting at 0x02f00000.
+  * Even with the smallest possible CPU-GPU memory split of the CPU getting
+- * only 64M, the remaining 25M starting at 0x02700000 should allow quite
+- * large initrds before they start colliding with U-Boot.
++ * only 64M, the remaining 17M starting at 0x02f00000 should allow reasonably
++ * sized initrds before they start colliding with U-Boot.
+  */
+ #define ENV_MEM_LAYOUT_SETTINGS \
+ 	"fdt_high=" FDT_HIGH "\0" \
+ 	"initrd_high=" INITRD_HIGH "\0" \
+ 	"kernel_addr_r=0x00080000\0" \
+-	"scriptaddr=0x02400000\0" \
+-	"pxefile_addr_r=0x02500000\0" \
+-	"fdt_addr_r=0x02600000\0" \
+-	"ramdisk_addr_r=0x02700000\0"
++	"scriptaddr=0x02c00000\0" \
++	"pxefile_addr_r=0x02d00000\0" \
++	"fdt_addr_r=0x02e00000\0" \
++	"ramdisk_addr_r=0x02f00000\0"
+ 
+ #if CONFIG_IS_ENABLED(CMD_MMC)
+ 	#define BOOT_TARGET_MMC(func) \
+-- 
+2.29.2
+
diff --git a/nixpkgs/pkgs/misc/uboot/default.nix b/nixpkgs/pkgs/misc/uboot/default.nix
new file mode 100644
index 000000000000..6c59c13d12e2
--- /dev/null
+++ b/nixpkgs/pkgs/misc/uboot/default.nix
@@ -0,0 +1,449 @@
+{ stdenv
+, lib
+, fetchurl
+, fetchpatch
+, fetchFromGitHub
+, bc
+, bison
+, dtc
+, flex
+, openssl
+, swig
+, meson-tools
+, armTrustedFirmwareAllwinner
+, armTrustedFirmwareRK3328
+, armTrustedFirmwareRK3399
+, armTrustedFirmwareS905
+, buildPackages
+}:
+
+let
+  defaultVersion = "2021.01";
+  defaultSrc = fetchurl {
+    url = "ftp://ftp.denx.de/pub/u-boot/u-boot-${defaultVersion}.tar.bz2";
+    sha256 = "0m04glv9kn3bhs62sn675w60wkrl4m3a4hnbnnw67s3l198y21xl";
+  };
+  buildUBoot = {
+    version ? null
+  , src ? null
+  , filesToInstall
+  , installDir ? "$out"
+  , defconfig
+  , extraConfig ? ""
+  , extraPatches ? []
+  , extraMakeFlags ? []
+  , extraMeta ? {}
+  , ... } @ args: stdenv.mkDerivation ({
+    pname = "uboot-${defconfig}";
+
+    version = if src == null then defaultVersion else version;
+
+    src = if src == null then defaultSrc else src;
+
+    patches = [
+      ./0001-configs-rpi-allow-for-bigger-kernels.patch
+    ] ++ extraPatches;
+
+    postPatch = ''
+      patchShebangs tools
+      patchShebangs arch/arm/mach-rockchip
+    '';
+
+    nativeBuildInputs = [
+      bc
+      bison
+      dtc
+      flex
+      openssl
+      (buildPackages.python3.withPackages (p: [
+        p.libfdt
+        p.setuptools # for pkg_resources
+      ]))
+      swig
+    ];
+    depsBuildBuild = [ buildPackages.stdenv.cc ];
+
+    hardeningDisable = [ "all" ];
+
+    makeFlags = [
+      "DTC=dtc"
+      "CROSS_COMPILE=${stdenv.cc.targetPrefix}"
+    ] ++ extraMakeFlags;
+
+    passAsFile = [ "extraConfig" ];
+
+    configurePhase = ''
+      runHook preConfigure
+
+      make ${defconfig}
+
+      cat $extraConfigPath >> .config
+
+      runHook postConfigure
+    '';
+
+    installPhase = ''
+      runHook preInstall
+
+      mkdir -p ${installDir}
+      cp ${lib.concatStringsSep " " filesToInstall} ${installDir}
+
+      runHook postInstall
+    '';
+
+    # make[2]: *** No rule to make target 'lib/efi_loader/helloworld.efi', needed by '__build'.  Stop.
+    enableParallelBuilding = false;
+
+    dontStrip = true;
+
+    meta = with lib; {
+      homepage = "http://www.denx.de/wiki/U-Boot/";
+      description = "Boot loader for embedded systems";
+      license = licenses.gpl2;
+      maintainers = with maintainers; [ dezgeg samueldr lopsided98 ];
+    } // extraMeta;
+  } // removeAttrs args [ "extraMeta" ]);
+
+in {
+  inherit buildUBoot;
+
+  ubootTools = buildUBoot {
+    defconfig = "tools-only_defconfig";
+    installDir = "$out/bin";
+    hardeningDisable = [];
+    dontStrip = false;
+    extraMeta.platforms = lib.platforms.linux;
+    extraMakeFlags = [ "HOST_TOOLS_ALL=y" "CROSS_BUILD_TOOLS=1" "NO_SDL=1" "tools" ];
+    filesToInstall = [
+      "tools/dumpimage"
+      "tools/fdtgrep"
+      "tools/kwboot"
+      "tools/mkenvimage"
+      "tools/mkimage"
+    ];
+  };
+
+  ubootA20OlinuxinoLime = buildUBoot {
+    defconfig = "A20-OLinuXino-Lime_defconfig";
+    extraMeta.platforms = ["armv7l-linux"];
+    filesToInstall = ["u-boot-sunxi-with-spl.bin"];
+  };
+
+  ubootAmx335xEVM = buildUBoot {
+    defconfig = "am335x_evm_defconfig";
+    extraMeta.platforms = ["armv7l-linux"];
+    filesToInstall = ["MLO" "u-boot.img"];
+  };
+
+  ubootBananaPi = buildUBoot {
+    defconfig = "Bananapi_defconfig";
+    extraMeta.platforms = ["armv7l-linux"];
+    filesToInstall = ["u-boot-sunxi-with-spl.bin"];
+  };
+
+  ubootBananaPim3 = buildUBoot {
+    defconfig = "Sinovoip_BPI_M3_defconfig";
+    extraMeta.platforms = ["armv7l-linux"];
+    filesToInstall = ["u-boot-sunxi-with-spl.bin"];
+  };
+
+  ubootBananaPim64 = buildUBoot {
+    defconfig = "bananapi_m64_defconfig";
+    extraMeta.platforms = ["aarch64-linux"];
+    BL31 = "${armTrustedFirmwareAllwinner}/bl31.bin";
+    filesToInstall = ["u-boot-sunxi-with-spl.bin"];
+  };
+
+  # http://git.denx.de/?p=u-boot.git;a=blob;f=board/solidrun/clearfog/README;hb=refs/heads/master
+  ubootClearfog = buildUBoot {
+    defconfig = "clearfog_defconfig";
+    extraMeta.platforms = ["armv7l-linux"];
+    filesToInstall = ["u-boot-spl.kwb"];
+  };
+
+  ubootGuruplug = buildUBoot {
+    defconfig = "guruplug_defconfig";
+    extraMeta.platforms = ["armv5tel-linux"];
+    filesToInstall = ["u-boot.bin"];
+  };
+
+  ubootJetsonTK1 = buildUBoot {
+    defconfig = "jetson-tk1_defconfig";
+    extraMeta.platforms = ["armv7l-linux"];
+    filesToInstall = ["u-boot" "u-boot.dtb" "u-boot-dtb-tegra.bin" "u-boot-nodtb-tegra.bin"];
+    # tegra-uboot-flasher expects this exact directory layout, sigh...
+    postInstall = ''
+      mkdir -p $out/spl
+      cp spl/u-boot-spl $out/spl/
+    '';
+  };
+
+  ubootNanoPCT4 = buildUBoot rec {
+    rkbin = fetchFromGitHub {
+      owner = "armbian";
+      repo = "rkbin";
+      rev = "3bd0321cae5ef881a6005fb470009ad5a5d1462d";
+      sha256 = "09r4dzxsbs3pff4sh70qnyp30s3rc7pkc46v1m3152s7jqjasp31";
+    };
+
+    defconfig = "nanopc-t4-rk3399_defconfig";
+
+    extraMeta = {
+      platforms = ["aarch64-linux"];
+      license = lib.licenses.unfreeRedistributableFirmware;
+    };
+    BL31="${armTrustedFirmwareRK3399}/bl31.elf";
+    filesToInstall = ["u-boot.itb" "idbloader.img"];
+    postBuild = ''
+      ./tools/mkimage -n rk3399 -T rksd -d ${rkbin}/rk33/rk3399_ddr_800MHz_v1.24.bin idbloader.img
+      cat ${rkbin}/rk33/rk3399_miniloader_v1.19.bin >> idbloader.img
+    '';
+  };
+
+  ubootNovena = buildUBoot {
+    defconfig = "novena_defconfig";
+    extraMeta.platforms = ["armv7l-linux"];
+    filesToInstall = ["u-boot-dtb.img" "SPL"];
+  };
+
+  # Flashing instructions:
+  # dd if=bl1.bin.hardkernel of=<device> conv=fsync bs=1 count=442
+  # dd if=bl1.bin.hardkernel of=<device> conv=fsync bs=512 skip=1 seek=1
+  # dd if=u-boot.gxbb of=<device> conv=fsync bs=512 seek=97
+  ubootOdroidC2 = let
+    firmwareBlobs = fetchFromGitHub {
+      owner = "armbian";
+      repo = "odroidc2-blobs";
+      rev = "47c5aac4bcac6f067cebe76e41fb9924d45b429c";
+      sha256 = "1ns0a130yxnxysia8c3q2fgyjp9k0nkr689dxk88qh2vnibgchnp";
+      meta.license = lib.licenses.unfreeRedistributableFirmware;
+    };
+  in buildUBoot {
+    defconfig = "odroid-c2_defconfig";
+    extraMeta.platforms = ["aarch64-linux"];
+    filesToInstall = ["u-boot.bin" "u-boot.gxbb" "${firmwareBlobs}/bl1.bin.hardkernel"];
+    postBuild = ''
+      # BL301 image needs at least 64 bytes of padding after it to place
+      # signing headers (with amlbootsig)
+      truncate -s 64 bl301.padding.bin
+      cat '${firmwareBlobs}/gxb/bl301.bin' bl301.padding.bin > bl301.padded.bin
+      # The downstream fip_create tool adds a custom TOC entry with UUID
+      # AABBCCDD-ABCD-EFEF-ABCD-12345678ABCD for the BL301 image. It turns out
+      # that the firmware blob does not actually care about UUIDs, only the
+      # order the images appear in the file. Because fiptool does not know
+      # about the BL301 UUID, we would have to use the --blob option, which adds
+      # the image to the end of the file, causing the boot to fail. Instead, we
+      # take advantage of the fact that UUIDs are ignored and just put the
+      # images in the right order with the wrong UUIDs. In the command below,
+      # --tb-fw is really --scp-fw and --scp-fw is the BL301 image.
+      #
+      # See https://github.com/afaerber/meson-tools/issues/3 for more
+      # information.
+      '${buildPackages.armTrustedFirmwareTools}/bin/fiptool' create \
+        --align 0x4000 \
+        --tb-fw '${firmwareBlobs}/gxb/bl30.bin' \
+        --scp-fw bl301.padded.bin \
+        --soc-fw '${armTrustedFirmwareS905}/bl31.bin' \
+        --nt-fw u-boot.bin \
+        fip.bin
+      cat '${firmwareBlobs}/gxb/bl2.package' fip.bin > boot_new.bin
+      '${buildPackages.meson-tools}/bin/amlbootsig' boot_new.bin u-boot.img
+      dd if=u-boot.img of=u-boot.gxbb bs=512 skip=96
+    '';
+  };
+
+  ubootOdroidXU3 = buildUBoot {
+    defconfig = "odroid-xu3_defconfig";
+    extraMeta.platforms = ["armv7l-linux"];
+    filesToInstall = ["u-boot-dtb.bin"];
+  };
+
+  ubootOrangePiPc = buildUBoot {
+    defconfig = "orangepi_pc_defconfig";
+    extraMeta.platforms = ["armv7l-linux"];
+    filesToInstall = ["u-boot-sunxi-with-spl.bin"];
+  };
+
+  ubootOrangePiZeroPlus2H5 = buildUBoot {
+    defconfig = "orangepi_zero_plus2_defconfig";
+    extraMeta.platforms = ["aarch64-linux"];
+    BL31 = "${armTrustedFirmwareAllwinner}/bl31.bin";
+    filesToInstall = ["u-boot-sunxi-with-spl.bin"];
+  };
+
+  ubootOrangePiZero = buildUBoot {
+    defconfig = "orangepi_zero_defconfig";
+    extraMeta.platforms = ["armv7l-linux"];
+    filesToInstall = ["u-boot-sunxi-with-spl.bin"];
+  };
+
+  ubootPcduino3Nano = buildUBoot {
+    defconfig = "Linksprite_pcDuino3_Nano_defconfig";
+    extraMeta.platforms = ["armv7l-linux"];
+    filesToInstall = ["u-boot-sunxi-with-spl.bin"];
+  };
+
+  ubootPine64 = buildUBoot {
+    defconfig = "pine64_plus_defconfig";
+    extraMeta.platforms = ["aarch64-linux"];
+    BL31 = "${armTrustedFirmwareAllwinner}/bl31.bin";
+    filesToInstall = ["u-boot-sunxi-with-spl.bin"];
+  };
+
+  ubootPine64LTS = buildUBoot {
+    defconfig = "pine64-lts_defconfig";
+    extraMeta.platforms = ["aarch64-linux"];
+    BL31 = "${armTrustedFirmwareAllwinner}/bl31.bin";
+    filesToInstall = ["u-boot-sunxi-with-spl.bin"];
+  };
+
+  ubootPinebook = buildUBoot {
+    defconfig = "pinebook_defconfig";
+    extraMeta.platforms = ["aarch64-linux"];
+    BL31 = "${armTrustedFirmwareAllwinner}/bl31.bin";
+    filesToInstall = ["u-boot-sunxi-with-spl.bin"];
+  };
+
+  ubootPinebookPro = buildUBoot {
+    defconfig = "pinebook-pro-rk3399_defconfig";
+    extraMeta.platforms = ["aarch64-linux"];
+    BL31 = "${armTrustedFirmwareRK3399}/bl31.elf";
+    filesToInstall = [ "u-boot.itb" "idbloader.img"];
+  };
+
+  ubootQemuAarch64 = buildUBoot {
+    defconfig = "qemu_arm64_defconfig";
+    extraMeta.platforms = ["aarch64-linux"];
+    filesToInstall = ["u-boot.bin"];
+  };
+
+  ubootQemuArm = buildUBoot {
+    defconfig = "qemu_arm_defconfig";
+    extraMeta.platforms = ["armv7l-linux"];
+    filesToInstall = ["u-boot.bin"];
+  };
+
+  ubootRaspberryPi = buildUBoot {
+    defconfig = "rpi_defconfig";
+    extraMeta.platforms = ["armv6l-linux"];
+    filesToInstall = ["u-boot.bin"];
+  };
+
+  ubootRaspberryPi2 = buildUBoot {
+    defconfig = "rpi_2_defconfig";
+    extraMeta.platforms = ["armv7l-linux"];
+    filesToInstall = ["u-boot.bin"];
+  };
+
+  ubootRaspberryPi3_32bit = buildUBoot {
+    defconfig = "rpi_3_32b_defconfig";
+    extraMeta.platforms = ["armv7l-linux"];
+    filesToInstall = ["u-boot.bin"];
+  };
+
+  ubootRaspberryPi3_64bit = buildUBoot {
+    defconfig = "rpi_3_defconfig";
+    extraMeta.platforms = ["aarch64-linux"];
+    filesToInstall = ["u-boot.bin"];
+  };
+
+  ubootRaspberryPi4_32bit = buildUBoot {
+    defconfig = "rpi_4_32b_defconfig";
+    extraMeta.platforms = ["armv7l-linux"];
+    filesToInstall = ["u-boot.bin"];
+  };
+
+  ubootRaspberryPi4_64bit = buildUBoot {
+    defconfig = "rpi_4_defconfig";
+    extraMeta.platforms = ["aarch64-linux"];
+    filesToInstall = ["u-boot.bin"];
+  };
+
+  ubootRaspberryPiZero = buildUBoot {
+    defconfig = "rpi_0_w_defconfig";
+    extraMeta.platforms = ["armv6l-linux"];
+    filesToInstall = ["u-boot.bin"];
+  };
+
+  ubootRock64 = let
+    rkbin = fetchFromGitHub {
+      owner = "ayufan-rock64";
+      repo = "rkbin";
+      rev = "f79a708978232a2b6b06c2e4173c5314559e0d3a";
+      sha256 = "0h7xm4ck3p3380c6bqm5ixrkxwcx6z5vysqdwvfa7gcqx5d6x5zz";
+    };
+  in buildUBoot {
+    extraMakeFlags = [ "all" "u-boot.itb" ];
+    defconfig = "rock64-rk3328_defconfig";
+    extraMeta = {
+      platforms = [ "aarch64-linux" ];
+      license = lib.licenses.unfreeRedistributableFirmware;
+    };
+    BL31="${armTrustedFirmwareRK3328}/bl31.elf";
+    filesToInstall = [ "u-boot.itb" "idbloader.img"];
+    # Derive MAC address from cpuid
+    # Submitted upstream: https://patchwork.ozlabs.org/patch/1203686/
+    extraConfig = ''
+      CONFIG_MISC_INIT_R=y
+    '';
+    # Close to being blob free, but the U-Boot TPL causes random memory
+    # corruption
+    postBuild = ''
+      ./tools/mkimage -n rk3328 -T rksd -d ${rkbin}/rk33/rk3328_ddr_786MHz_v1.13.bin idbloader.img
+      cat spl/u-boot-spl.bin >> idbloader.img
+    '';
+  };
+
+  ubootRockPro64 = buildUBoot {
+    extraMakeFlags = [ "all" "u-boot.itb" ];
+    defconfig = "rockpro64-rk3399_defconfig";
+    extraMeta.platforms = ["aarch64-linux"];
+    BL31="${armTrustedFirmwareRK3399}/bl31.elf";
+    filesToInstall = [ "u-boot.itb" "idbloader.img"];
+  };
+
+  ubootROCPCRK3399 = buildUBoot {
+    defconfig = "roc-pc-rk3399_defconfig";
+    extraMeta.platforms = ["aarch64-linux"];
+    filesToInstall = [ "spl/u-boot-spl.bin" "u-boot.itb" "idbloader.img"];
+    BL31 = "${armTrustedFirmwareRK3399}/bl31.elf";
+  };
+
+  ubootSheevaplug = buildUBoot {
+    defconfig = "sheevaplug_defconfig";
+    extraMeta.platforms = ["armv5tel-linux"];
+    filesToInstall = ["u-boot.kwb"];
+  };
+
+  ubootSopine = buildUBoot {
+    defconfig = "sopine_baseboard_defconfig";
+    extraMeta.platforms = ["aarch64-linux"];
+    BL31 = "${armTrustedFirmwareAllwinner}/bl31.bin";
+    filesToInstall = ["u-boot-sunxi-with-spl.bin"];
+  };
+
+  ubootUtilite = buildUBoot {
+    defconfig = "cm_fx6_defconfig";
+    extraMeta.platforms = ["armv7l-linux"];
+    filesToInstall = ["u-boot-with-nand-spl.imx"];
+    buildFlags = [ "u-boot-with-nand-spl.imx" ];
+    extraConfig = ''
+      CONFIG_CMD_SETEXPR=y
+    '';
+    # sata init; load sata 0 $loadaddr u-boot-with-nand-spl.imx
+    # sf probe; sf update $loadaddr 0 80000
+  };
+
+  ubootWandboard = buildUBoot {
+    defconfig = "wandboard_defconfig";
+    extraMeta.platforms = ["armv7l-linux"];
+    filesToInstall = ["u-boot.img" "SPL"];
+  };
+
+  ubootRockPi4 = buildUBoot {
+    defconfig = "rock-pi-4-rk3399_defconfig";
+    extraMeta.platforms = ["aarch64-linux"];
+    BL31 = "${armTrustedFirmwareRK3399}/bl31.elf";
+    filesToInstall = [ "u-boot.itb" "idbloader.img"];
+  };
+}
diff --git a/nixpkgs/pkgs/misc/uq/default.nix b/nixpkgs/pkgs/misc/uq/default.nix
new file mode 100755
index 000000000000..5c0fb9549100
--- /dev/null
+++ b/nixpkgs/pkgs/misc/uq/default.nix
@@ -0,0 +1,25 @@
+{ lib
+, fetchFromGitHub
+, rustPlatform
+}:
+
+rustPlatform.buildRustPackage rec {
+  pname = "uq";
+  version = "unstable-2018-05-27";
+
+  src = fetchFromGitHub {
+    owner = "lostutils";
+    repo = "uq";
+    rev = "118bc2f3b1cf292afdffbc1cb4415d150b323165";
+    sha256 = "1qqqmdk0v1d3ckasmmw5lbrkvhkv0nws4bzi9cfi1ndhrbvbkbxb";
+  };
+
+  cargoSha256 = "1fv13rbghfw7114h7sda04gpqrjrsgnnki0p9kdd6r6sk5cbhn9x";
+
+  meta = with lib; {
+    description = "A simple, user-friendly alternative to sort | uniq";
+    homepage = "https://github.com/lostutils/uq";
+    license = licenses.mit;
+    maintainers = with maintainers; [ doronbehar ];
+  };
+}
diff --git a/nixpkgs/pkgs/misc/urbit/default.nix b/nixpkgs/pkgs/misc/urbit/default.nix
new file mode 100644
index 000000000000..9ea1fc64c3f3
--- /dev/null
+++ b/nixpkgs/pkgs/misc/urbit/default.nix
@@ -0,0 +1,31 @@
+{ lib, stdenv, fetchFromGitHub, curl, git, gmp, libsigsegv, meson, ncurses, ninja
+, openssl, pkg-config, re2c, zlib
+}:
+
+stdenv.mkDerivation rec {
+  pname = "urbit";
+  version = "0.7.3";
+
+  src = fetchFromGitHub {
+    owner = "urbit";
+    repo = "urbit";
+    rev = "v${version}";
+    sha256 = "192843pjzh8z55fd0x70m3l1vncmixljia3nphgn7j7x4976xkp2";
+    fetchSubmodules = true;
+  };
+
+  nativeBuildInputs = [ pkg-config ninja meson ];
+  buildInputs = [ curl git gmp libsigsegv ncurses openssl re2c zlib ];
+
+  postPatch = ''
+    patchShebangs .
+  '';
+
+  meta = with lib; {
+    description = "An operating function";
+    homepage = "https://urbit.org";
+    license = licenses.mit;
+    maintainers = with maintainers; [ mudri ];
+    platforms = with platforms; linux;
+  };
+}
diff --git a/nixpkgs/pkgs/misc/vim-plugins/aliases.nix b/nixpkgs/pkgs/misc/vim-plugins/aliases.nix
new file mode 100644
index 000000000000..4cfb6ccd372f
--- /dev/null
+++ b/nixpkgs/pkgs/misc/vim-plugins/aliases.nix
@@ -0,0 +1,143 @@
+# Deprecated aliases - for backward compatibility
+
+lib: overriden:
+
+with overriden;
+
+let
+  # Removing recurseForDerivation prevents derivations of aliased attribute
+  # set to appear while listing all the packages available.
+  removeRecurseForDerivations = alias: with lib;
+    if alias.recurseForDerivations or false then
+      removeAttrs alias ["recurseForDerivations"]
+    else alias;
+
+  # Disabling distribution prevents top-level aliases for non-recursed package
+  # sets from building on Hydra.
+  removeDistribute = alias: with lib;
+    if isDerivation alias then
+      dontDistribute alias
+    else alias;
+
+  # Make sure that we are not shadowing something from
+  # all-packages.nix.
+  checkInPkgs = n: alias: if builtins.hasAttr n overriden
+                          then throw "Alias ${n} is still in vim-plugins"
+                          else alias;
+
+  mapAliases = aliases:
+     lib.mapAttrs (n: alias: removeDistribute
+                             (removeRecurseForDerivations
+                              (checkInPkgs n alias)))
+                     aliases;
+
+  deprecations = lib.mapAttrs (old: info:
+    throw "${old} was renamed to ${info.new} on ${info.date}. Please update to ${info.new}."
+  ) (builtins.fromJSON (builtins.readFile ./deprecated.json));
+
+in
+mapAliases ({
+  airline             = vim-airline;
+  alternative         = a-vim; # backwards compat, added 2014-10-21
+  bats                = bats-vim;
+  BufOnly             = BufOnly-vim;
+  calendar            = calendar-vim;
+  coffee-script       = vim-coffee-script;
+  coffeeScript        = vim-coffee-script; # backwards compat, added 2014-10-18
+  Solarized           = vim-colors-solarized;
+  solarized           = vim-colors-solarized;
+  colors-solarized    = vim-colors-solarized;
+  caw                 = caw-vim;
+  colorsamplerpack    = Colour-Sampler-Pack;
+  Colour_Sampler_Pack = Colour-Sampler-Pack;
+  command_T           = command-t; # backwards compat, added 2014-10-18
+  commentary          = vim-commentary;
+  committia           = committia-vim;
+  concealedyank       = concealedyank-vim;
+  context-filetype    = context_filetype-vim;
+  Cosco               = cosco-vim;
+  css_color_5056      = vim-css-color;
+  CSApprox            = csapprox;
+  csv                 = csv-vim;
+  ctrlp               = ctrlp-vim;
+  cute-python         = vim-cute-python;
+  denite              = denite-nvim;
+  easy-align          = vim-easy-align;
+  easygit             = vim-easygit;
+  easymotion          = vim-easymotion;
+  echodoc             = echodoc-vim;
+  eighties            = vim-eighties;
+  extradite           = vim-extradite;
+  fugitive            = vim-fugitive;
+  ghc-mod-vim         = ghcmod-vim;
+  ghcmod              = ghcmod-vim;
+  goyo                = goyo-vim;
+  Gist                = vim-gist;
+  gitgutter           = vim-gitgutter;
+  gundo               = gundo-vim;
+  Gundo               = gundo-vim; # backwards compat, added 2015-10-03
+  haskellConceal      = vim-haskellconceal; # backwards compat, added 2014-10-18
+  haskellConcealPlus  = vim-haskellConcealPlus;
+  haskellconceal      = vim-haskellconceal;
+  hier                = vim-hier;
+  hlint-refactor      = hlint-refactor-vim;
+  hoogle              = vim-hoogle;
+  Hoogle              = vim-hoogle;
+  ipython             = vim-ipython;
+  latex-live-preview  = vim-latex-live-preview;
+  maktaba             = vim-maktaba;
+  multiple-cursors    = vim-multiple-cursors;
+  necoGhc             = neco-ghc; # backwards compat, added 2014-10-18
+  neocomplete         = neocomplete-vim;
+  neoinclude          = neoinclude-vim;
+  neomru              = neomru-vim;
+  neosnippet          = neosnippet-vim;
+  The_NERD_Commenter  = nerdcommenter;
+  The_NERD_tree       = nerdtree;
+  open-browser        = open-browser-vim;
+  pathogen            = vim-pathogen;
+  polyglot            = vim-polyglot;
+  prettyprint         = vim-prettyprint;
+  quickrun            = vim-quickrun;
+  rainbow_parentheses = rainbow_parentheses-vim;
+  repeat              = vim-repeat;
+  riv                 = riv-vim;
+  rhubarb             = vim-rhubarb;
+  sensible            = vim-sensible;
+  signature           = vim-signature;
+  snipmate            = vim-snipmate;
+  sourcemap           = sourcemap-vim;
+  "sourcemap.vim"     = sourcemap-vim;
+  surround            = vim-surround;
+  sleuth              = vim-sleuth;
+  solidity            = vim-solidity;
+  stylish-haskell     = vim-stylish-haskell;
+  stylishHaskell      = vim-stylish-haskell; # backwards compat, added 2014-10-18
+  Supertab            = supertab;
+  Syntastic           = syntastic;
+  SyntaxRange         = vim-SyntaxRange;
+  table-mode          = vim-table-mode;
+  taglist             = taglist-vim;
+  tabpagebuffer       = tabpagebuffer-vim;
+  tabpagecd           = vim-tabpagecd;
+  Tabular             = tabular;
+  Tagbar              = tagbar;
+  thumbnail           = thumbnail-vim;
+  tlib                = tlib_vim;
+  tmux-navigator      = vim-tmux-navigator;
+  tmuxNavigator       = vim-tmux-navigator; # backwards compat, added 2014-10-18
+  tslime              = tslime-vim;
+  unite               = unite-vim;
+  UltiSnips           = ultisnips;
+  vim-addon-vim2nix   = vim2nix;
+  vimproc             = vimproc-vim;
+  vimshell            = vimshell-vim;
+  vinegar             = vim-vinegar;
+  watchdogs           = vim-watchdogs;
+  WebAPI              = webapi-vim;
+  wombat256           = wombat256-vim; # backwards compat, added 2015-7-8
+  yankring            = YankRing-vim;
+  Yankring            = YankRing-vim;
+  xterm-color-table   = xterm-color-table-vim;
+  zeavim              = zeavim-vim;
+} // deprecations)
diff --git a/nixpkgs/pkgs/misc/vim-plugins/build-vim-plugin.nix b/nixpkgs/pkgs/misc/vim-plugins/build-vim-plugin.nix
new file mode 100644
index 000000000000..6960b7905393
--- /dev/null
+++ b/nixpkgs/pkgs/misc/vim-plugins/build-vim-plugin.nix
@@ -0,0 +1,60 @@
+{ lib, stdenv
+, rtpPath ? "share/vim-plugins"
+, vim
+}:
+
+rec {
+  addRtp = path: attrs: derivation:
+    derivation // { rtp = "${derivation}/${path}"; } // {
+      overrideAttrs = f: buildVimPlugin (attrs // f attrs);
+    };
+
+  buildVimPlugin = attrs@{
+    name ? "${attrs.pname}-${attrs.version}",
+    namePrefix ? "vimplugin-",
+    src,
+    unpackPhase ? "",
+    configurePhase ? "",
+    buildPhase ? "",
+    preInstall ? "",
+    postInstall ? "",
+    path ? lib.getName name,
+    addonInfo ? null,
+    ...
+  }:
+    addRtp "${rtpPath}/${path}" attrs (stdenv.mkDerivation (attrs // {
+      name = namePrefix + name;
+
+      inherit unpackPhase configurePhase buildPhase addonInfo preInstall postInstall;
+
+      installPhase = ''
+        runHook preInstall
+
+        target=$out/${rtpPath}/${path}
+        mkdir -p $out/${rtpPath}
+        cp -r . $target
+
+        # build help tags
+        if [ -d "$target/doc" ]; then
+          echo "Building help tags"
+          if ! ${vim}/bin/vim -N -u NONE -i NONE -n -E -s -V1 -c "helptags $target/doc" +quit!; then
+            echo "Failed to build help tags!"
+            exit 1
+          fi
+        else
+          echo "No docs available"
+        fi
+
+        if [ -n "$addonInfo" ]; then
+          echo "$addonInfo" > $target/addon-info.json
+        fi
+
+        runHook postInstall
+      '';
+    }));
+
+  buildVimPluginFrom2Nix = attrs: buildVimPlugin ({
+    buildPhase = ":";
+    configurePhase =":";
+  } // attrs);
+}
diff --git a/nixpkgs/pkgs/misc/vim-plugins/default.nix b/nixpkgs/pkgs/misc/vim-plugins/default.nix
new file mode 100644
index 000000000000..e6bca9484a26
--- /dev/null
+++ b/nixpkgs/pkgs/misc/vim-plugins/default.nix
@@ -0,0 +1,28 @@
+# TODO check that no license information gets lost
+{ callPackage, config, lib, vimUtils, vim, darwin, llvmPackages }:
+
+let
+
+  inherit (vimUtils.override {inherit vim;}) buildVimPluginFrom2Nix;
+
+  plugins = callPackage ./generated.nix {
+    inherit buildVimPluginFrom2Nix overrides;
+  };
+
+  # TL;DR
+  # * Add your plugin to ./vim-plugin-names
+  # * run ./update.py
+  #
+  # If additional modifications to the build process are required,
+  # add to ./overrides.nix.
+  overrides = callPackage ./overrides.nix {
+    inherit (darwin.apple_sdk.frameworks) Cocoa CoreFoundation CoreServices;
+    inherit buildVimPluginFrom2Nix;
+    inherit llvmPackages;
+  };
+
+  aliases = lib.optionalAttrs (config.allowAliases or true) (import ./aliases.nix lib plugins);
+
+in
+
+plugins // aliases
diff --git a/nixpkgs/pkgs/misc/vim-plugins/deprecated.json b/nixpkgs/pkgs/misc/vim-plugins/deprecated.json
new file mode 100644
index 000000000000..b95e91a19b2c
--- /dev/null
+++ b/nixpkgs/pkgs/misc/vim-plugins/deprecated.json
@@ -0,0 +1,22 @@
+{
+    "gist-vim": {
+        "date": "2020-03-27",
+        "new": "vim-gist"
+    },
+    "nvim-lsp": {
+        "date": "2020-08-31",
+        "new": "nvim-lspconfig"
+    },
+    "vim-jade": {
+        "date": "2020-03-27",
+        "new": "vim-pug"
+    },
+    "vundle": {
+        "date": "2020-03-27",
+        "new": "Vundle-vim"
+    },
+    "youcompleteme": {
+        "date": "2020-03-27",
+        "new": "YouCompleteMe"
+    }
+}
\ No newline at end of file
diff --git a/nixpkgs/pkgs/misc/vim-plugins/generated.nix b/nixpkgs/pkgs/misc/vim-plugins/generated.nix
new file mode 100644
index 000000000000..caaeb85388a6
--- /dev/null
+++ b/nixpkgs/pkgs/misc/vim-plugins/generated.nix
@@ -0,0 +1,8905 @@
+# This file has been generated by ./pkgs/misc/vim-plugins/update.py. Do not edit!
+{ lib, buildVimPluginFrom2Nix, fetchFromGitHub, overrides ? (self: super: {}) }:
+let
+  packages = ( self:
+{
+  a-vim = buildVimPluginFrom2Nix {
+    pname = "a-vim";
+    version = "2010-11-06";
+    src = fetchFromGitHub {
+      owner = "vim-scripts";
+      repo = "a.vim";
+      rev = "2cbe946206ec622d9d8cf2c99317f204c4d41885";
+      sha256 = "0h62v9z5bh9xmaq22pqdb3z79i84a5rknqm68mjpy7nq7s3q42fa";
+    };
+    meta.homepage = "https://github.com/vim-scripts/a.vim/";
+  };
+
+  ack-vim = buildVimPluginFrom2Nix {
+    pname = "ack-vim";
+    version = "2018-02-27";
+    src = fetchFromGitHub {
+      owner = "mileszs";
+      repo = "ack.vim";
+      rev = "36e40f9ec91bdbf6f1adf408522a73a6925c3042";
+      sha256 = "0yppr89hd1jyp0pj56hxdjbn32sr7pj3mihd18wxispvl5dqd6fm";
+    };
+    meta.homepage = "https://github.com/mileszs/ack.vim/";
+  };
+
+  acp = buildVimPluginFrom2Nix {
+    pname = "acp";
+    version = "2013-02-05";
+    src = fetchFromGitHub {
+      owner = "eikenb";
+      repo = "acp";
+      rev = "5c627cec37d0d3b1670cb250d84e176e8b0c644e";
+      sha256 = "0h7s4nvxin7m2caka7g1hhlxj1bbiwsvw8s2lqwlh7nq43v23ghg";
+    };
+    meta.homepage = "https://github.com/eikenb/acp/";
+  };
+
+  agda-vim = buildVimPluginFrom2Nix {
+    pname = "agda-vim";
+    version = "2020-11-23";
+    src = fetchFromGitHub {
+      owner = "derekelkins";
+      repo = "agda-vim";
+      rev = "81b0a1a612621f3b8d9ce30c48527cc85a950f1c";
+      sha256 = "1yqvcyw8zaryqy2hbbq4iaf5af0n4wpw07i8508z7dp9ib92w85v";
+    };
+    meta.homepage = "https://github.com/derekelkins/agda-vim/";
+  };
+
+  alchemist-vim = buildVimPluginFrom2Nix {
+    pname = "alchemist-vim";
+    version = "2020-04-27";
+    src = fetchFromGitHub {
+      owner = "slashmili";
+      repo = "alchemist.vim";
+      rev = "3d370d163a48bdeccea4be541686cce67a52b996";
+      sha256 = "0svciz70yccaaifq1ivb7f0cwfjssmrkm7fbpjlylslx6wjjfc1i";
+    };
+    meta.homepage = "https://github.com/slashmili/alchemist.vim/";
+  };
+
+  ale = buildVimPluginFrom2Nix {
+    pname = "ale";
+    version = "2021-03-30";
+    src = fetchFromGitHub {
+      owner = "dense-analysis";
+      repo = "ale";
+      rev = "06f57ca9733aab6e6b67015917fdfd4bf1c70c48";
+      sha256 = "0nsphdv6k5v0qa4p35g4j99pa68fwn7bll4jpvdqs74p82589dhd";
+    };
+    meta.homepage = "https://github.com/dense-analysis/ale/";
+  };
+
+  align = buildVimPluginFrom2Nix {
+    pname = "align";
+    version = "2012-08-08";
+    src = fetchFromGitHub {
+      owner = "vim-scripts";
+      repo = "align";
+      rev = "787662fe90cd057942bc5b682fd70c87e1a9dd77";
+      sha256 = "0acacr572kfh7jvavbw61q5pkwrpi1albgancma063rpax1pddgp";
+    };
+    meta.homepage = "https://github.com/vim-scripts/align/";
+  };
+
+  aniseed = buildVimPluginFrom2Nix {
+    pname = "aniseed";
+    version = "2021-02-27";
+    src = fetchFromGitHub {
+      owner = "Olical";
+      repo = "aniseed";
+      rev = "984d84a1bda7208587feb3d62cfec5bcab404af2";
+      sha256 = "00gf2xm20wg0p1ik55jwhzlbd5sz06k3hk30415xayfa6flgh0n4";
+    };
+    meta.homepage = "https://github.com/Olical/aniseed/";
+  };
+
+  ansible-vim = buildVimPluginFrom2Nix {
+    pname = "ansible-vim";
+    version = "2021-02-20";
+    src = fetchFromGitHub {
+      owner = "pearofducks";
+      repo = "ansible-vim";
+      rev = "de933417e5d37b10d1834095fcd0a1c8c360d34a";
+      sha256 = "1fwjpkzkpwy808949iqbsgi6kxyglfyzr1d5hc1911vbayn8wyjy";
+    };
+    meta.homepage = "https://github.com/pearofducks/ansible-vim/";
+  };
+
+  antonys-macro-repeater = buildVimPluginFrom2Nix {
+    pname = "antonys-macro-repeater";
+    version = "2017-09-10";
+    src = fetchFromGitHub {
+      owner = "ckarnell";
+      repo = "antonys-macro-repeater";
+      rev = "61784d86b2654f3e261b9cc33360c5197704e266";
+      sha256 = "1cq5r091qbxjs9s12f7bb2fdm43gxwpnnh2l8nhj0n69jfk7gblw";
+    };
+    meta.homepage = "https://github.com/ckarnell/antonys-macro-repeater/";
+  };
+
+  arcanist-vim = buildVimPluginFrom2Nix {
+    pname = "arcanist-vim";
+    version = "2016-05-27";
+    src = fetchFromGitHub {
+      owner = "solarnz";
+      repo = "arcanist.vim";
+      rev = "bd59e799e838c8d946d33142104b2db625dc15d6";
+      sha256 = "11v7gqa5rnv28q0i3d02g9sw22gkjn10afvjx7bg352d91knxn9m";
+    };
+    meta.homepage = "https://github.com/solarnz/arcanist.vim/";
+  };
+
+  argtextobj-vim = buildVimPluginFrom2Nix {
+    pname = "argtextobj-vim";
+    version = "2010-10-18";
+    src = fetchFromGitHub {
+      owner = "vim-scripts";
+      repo = "argtextobj.vim";
+      rev = "f3fbe427f7b4ec436416a5816d714dc917dc530b";
+      sha256 = "1l4jh5hdmky1qj5z26jpnk49a6djjcvzyyr6pknrrgb8rzkiln48";
+    };
+    meta.homepage = "https://github.com/vim-scripts/argtextobj.vim/";
+  };
+
+  async-vim = buildVimPluginFrom2Nix {
+    pname = "async-vim";
+    version = "2021-03-21";
+    src = fetchFromGitHub {
+      owner = "prabirshrestha";
+      repo = "async.vim";
+      rev = "0fb846e1eb3c2bf04d52a57f41088afb3395212e";
+      sha256 = "1glzg0i53wkm383y1vbddbyp1ivlsx2hivjchiw60sr9gccn8f8l";
+    };
+    meta.homepage = "https://github.com/prabirshrestha/async.vim/";
+  };
+
+  asyncomplete-vim = buildVimPluginFrom2Nix {
+    pname = "asyncomplete-vim";
+    version = "2021-03-03";
+    src = fetchFromGitHub {
+      owner = "prabirshrestha";
+      repo = "asyncomplete.vim";
+      rev = "8e018dee9c5e2205288bda01be0de196b04b7cf2";
+      sha256 = "1ghv6zp3qajd4n9qv3mnxqhczi77qmds2b2iicbl252slvldr604";
+    };
+    meta.homepage = "https://github.com/prabirshrestha/asyncomplete.vim/";
+  };
+
+  ats-vim = buildVimPluginFrom2Nix {
+    pname = "ats-vim";
+    version = "2020-09-04";
+    src = fetchFromGitHub {
+      owner = "vmchale";
+      repo = "ats-vim";
+      rev = "8e3e722b6d09ed81313573b4e7b108b265628ff1";
+      sha256 = "1jj4q8dmal7rgizqm59dbgjf8by8lxjwnbg39gkbmjiwhdj8q67h";
+    };
+    meta.homepage = "https://github.com/vmchale/ats-vim/";
+  };
+
+  auto-git-diff = buildVimPluginFrom2Nix {
+    pname = "auto-git-diff";
+    version = "2019-09-23";
+    src = fetchFromGitHub {
+      owner = "hotwatermorning";
+      repo = "auto-git-diff";
+      rev = "a14d52b7ed7e7fb69bf1de9d363f3abdd3410b3a";
+      sha256 = "0i0bnlxclh8pzanrxj428728mdx4wdy19fx499kiin87qr4r2hbn";
+    };
+    meta.homepage = "https://github.com/hotwatermorning/auto-git-diff/";
+  };
+
+  auto-pairs = buildVimPluginFrom2Nix {
+    pname = "auto-pairs";
+    version = "2019-02-27";
+    src = fetchFromGitHub {
+      owner = "jiangmiao";
+      repo = "auto-pairs";
+      rev = "39f06b873a8449af8ff6a3eee716d3da14d63a76";
+      sha256 = "1hxf155cmavpxpbsxx6zk23hgl9grl6yrh165kp9bjvld9ng08ng";
+    };
+    meta.homepage = "https://github.com/jiangmiao/auto-pairs/";
+  };
+
+  auto-session = buildVimPluginFrom2Nix {
+    pname = "auto-session";
+    version = "2021-04-06";
+    src = fetchFromGitHub {
+      owner = "rmagatti";
+      repo = "auto-session";
+      rev = "52f7f0c686188ba132dd362fde64f45c30ef431a";
+      sha256 = "1512gd0z8wl8i6pc3gya9qg2pq9k5bfx9b7h2sgp8v356rjx21ks";
+    };
+    meta.homepage = "https://github.com/rmagatti/auto-session/";
+  };
+
+  autoload_cscope-vim = buildVimPluginFrom2Nix {
+    pname = "autoload_cscope-vim";
+    version = "2011-01-28";
+    src = fetchFromGitHub {
+      owner = "vim-scripts";
+      repo = "autoload_cscope.vim";
+      rev = "26f428f400d96d25a9d633e6314f6e1760923db1";
+      sha256 = "150h6k4nd1msa21c0zxl68nwwq3qdmqi0d8h4as98rrz0b0lghn7";
+    };
+    meta.homepage = "https://github.com/vim-scripts/autoload_cscope.vim/";
+  };
+
+  awesome-vim-colorschemes = buildVimPluginFrom2Nix {
+    pname = "awesome-vim-colorschemes";
+    version = "2021-02-26";
+    src = fetchFromGitHub {
+      owner = "rafi";
+      repo = "awesome-vim-colorschemes";
+      rev = "1ed59bff2a84e48e1a243a7e5d336a395f610e2a";
+      sha256 = "1acz9zwb9mwyhfckpzv22dy5c4bq83jrmvvbd22z9k0hm5py2538";
+    };
+    meta.homepage = "https://github.com/rafi/awesome-vim-colorschemes/";
+  };
+
+  ayu-vim = buildVimPluginFrom2Nix {
+    pname = "ayu-vim";
+    version = "2020-05-29";
+    src = fetchFromGitHub {
+      owner = "ayu-theme";
+      repo = "ayu-vim";
+      rev = "0745635421688ce777f663d13531996cb4da6514";
+      sha256 = "0w7ixhz72g3lr1hkn450k6x8sdgv95pp6pxbykka3s01i506rzmj";
+    };
+    meta.homepage = "https://github.com/ayu-theme/ayu-vim/";
+  };
+
+  barbar-nvim = buildVimPluginFrom2Nix {
+    pname = "barbar-nvim";
+    version = "2021-04-02";
+    src = fetchFromGitHub {
+      owner = "romgrk";
+      repo = "barbar.nvim";
+      rev = "9c80bfbce9f9b2bdbb42ad9cebfeba6a3dd9a9a8";
+      sha256 = "10dln43kjafj7vaf7s2yvxvc1vaga7rygnl4819275ardjpgddgs";
+    };
+    meta.homepage = "https://github.com/romgrk/barbar.nvim/";
+  };
+
+  base16-vim = buildVimPluginFrom2Nix {
+    pname = "base16-vim";
+    version = "2019-06-07";
+    src = fetchFromGitHub {
+      owner = "chriskempson";
+      repo = "base16-vim";
+      rev = "6191622d5806d4448fa2285047936bdcee57a098";
+      sha256 = "1qz21jizcy533mqk9wff1wqchhixkcfkysqcqs0x35wwpbri6nz8";
+    };
+    meta.homepage = "https://github.com/chriskempson/base16-vim/";
+  };
+
+  bats-vim = buildVimPluginFrom2Nix {
+    pname = "bats-vim";
+    version = "2013-07-03";
+    src = fetchFromGitHub {
+      owner = "vim-scripts";
+      repo = "bats.vim";
+      rev = "3c283f594ff8bc7fb0c25cd07ebef0f17385f94a";
+      sha256 = "06f3hdf7y5gpwmc6inrhk938qmn7cr6mbk00amrnl1qjvk09givx";
+    };
+    meta.homepage = "https://github.com/vim-scripts/bats.vim/";
+  };
+
+  bclose-vim = buildVimPluginFrom2Nix {
+    pname = "bclose-vim";
+    version = "2018-10-10";
+    src = fetchFromGitHub {
+      owner = "rbgrouleff";
+      repo = "bclose.vim";
+      rev = "99018b4a2dd18aea1cbd3aa23565b01a0f8c5b73";
+      sha256 = "09a7g0nxn8cbnfz6za8q1p46kb5zbvxl80077hrjpnx4xc82xn2h";
+    };
+    meta.homepage = "https://github.com/rbgrouleff/bclose.vim/";
+  };
+
+  BetterLua-vim = buildVimPluginFrom2Nix {
+    pname = "BetterLua-vim";
+    version = "2020-08-14";
+    src = fetchFromGitHub {
+      owner = "euclidianAce";
+      repo = "BetterLua.vim";
+      rev = "d2d6c115575d09258a794a6f20ac60233eee59d5";
+      sha256 = "1rvlx21kw8865dg6q97hx9i2s1n8mn1nyhn0m7dkx625pghsx3js";
+    };
+    meta.homepage = "https://github.com/euclidianAce/BetterLua.vim/";
+  };
+
+  brainfuck-vim = buildVimPluginFrom2Nix {
+    pname = "brainfuck-vim";
+    version = "2021-01-28";
+    src = fetchFromGitHub {
+      owner = "fruit-in";
+      repo = "brainfuck-vim";
+      rev = "721bbe54df26906f79ed481069435596741f67f3";
+      sha256 = "130njfiwbgd6gpy52xm5ayadh9q11ahsin1a60y54a99qd8jz6wi";
+    };
+    meta.homepage = "https://github.com/fruit-in/brainfuck-vim/";
+  };
+
+  bufexplorer = buildVimPluginFrom2Nix {
+    pname = "bufexplorer";
+    version = "2020-02-17";
+    src = fetchFromGitHub {
+      owner = "jlanzarotta";
+      repo = "bufexplorer";
+      rev = "29258f58357acc10c672585a9efe8913d756734d";
+      sha256 = "00wjwk9yzfclrbd4p59b5wpl21s2vjs4ahn30xhpza93bk513wnq";
+    };
+    meta.homepage = "https://github.com/jlanzarotta/bufexplorer/";
+  };
+
+  BufOnly-vim = buildVimPluginFrom2Nix {
+    pname = "BufOnly-vim";
+    version = "2010-10-18";
+    src = fetchFromGitHub {
+      owner = "vim-scripts";
+      repo = "BufOnly.vim";
+      rev = "43dd92303979bdb234a3cb2f5662847f7a3affe7";
+      sha256 = "1gvpaqvvxjma0dl1zai68bpv42608api4054appwkw9pgczkkcdl";
+    };
+    meta.homepage = "https://github.com/vim-scripts/BufOnly.vim/";
+  };
+
+  calendar-vim = buildVimPluginFrom2Nix {
+    pname = "calendar-vim";
+    version = "2021-01-30";
+    src = fetchFromGitHub {
+      owner = "itchyny";
+      repo = "calendar.vim";
+      rev = "4e454c2ca9a489f2631df24845615744bd594b61";
+      sha256 = "12vmysyvavvf1173i0m7jfzh2jsfqx5p7mdm3iafg4iv0209rz66";
+    };
+    meta.homepage = "https://github.com/itchyny/calendar.vim/";
+  };
+
+  camelcasemotion = buildVimPluginFrom2Nix {
+    pname = "camelcasemotion";
+    version = "2019-12-02";
+    src = fetchFromGitHub {
+      owner = "bkad";
+      repo = "camelcasemotion";
+      rev = "de439d7c06cffd0839a29045a103fe4b44b15cdc";
+      sha256 = "0yfsb0d9ly8abmc95nqcmr8r8ylif80zdjppib7g1qj1wapdhc69";
+    };
+    meta.homepage = "https://github.com/bkad/camelcasemotion/";
+  };
+
+  caw-vim = buildVimPluginFrom2Nix {
+    pname = "caw-vim";
+    version = "2021-01-25";
+    src = fetchFromGitHub {
+      owner = "tyru";
+      repo = "caw.vim";
+      rev = "26b91ddfcebaee954a3cd2aec1769a5b16779bdd";
+      sha256 = "0yiic0a1l9ggwh3f5y150j74hxj7v783j4y3wnn5j1n7ljvqvhqc";
+    };
+    meta.homepage = "https://github.com/tyru/caw.vim/";
+  };
+
+  chadtree = buildVimPluginFrom2Nix {
+    pname = "chadtree";
+    version = "2021-04-06";
+    src = fetchFromGitHub {
+      owner = "ms-jpq";
+      repo = "chadtree";
+      rev = "cd20e2323045c7dda2d42af64fa86a7325752a55";
+      sha256 = "1jhxdfvvdvbar9gdzsjvxs8brckww454f2agf2ariwndakcinqqn";
+    };
+    meta.homepage = "https://github.com/ms-jpq/chadtree/";
+  };
+
+  changeColorScheme-vim = buildVimPluginFrom2Nix {
+    pname = "changeColorScheme-vim";
+    version = "2010-10-18";
+    src = fetchFromGitHub {
+      owner = "vim-scripts";
+      repo = "changeColorScheme.vim";
+      rev = "b041d49f828629d72f2232531a230d1ec5de2405";
+      sha256 = "0pybhsg9k9252d4ifdc4gsar8lkmfzbvs6xkzqq1m6f35l9wqk09";
+    };
+    meta.homepage = "https://github.com/vim-scripts/changeColorScheme.vim/";
+  };
+
+  CheckAttach = buildVimPluginFrom2Nix {
+    pname = "CheckAttach";
+    version = "2019-05-08";
+    src = fetchFromGitHub {
+      owner = "chrisbra";
+      repo = "CheckAttach";
+      rev = "8f0b1350431d1d34655a147e6f1cfe6cb5dda5f7";
+      sha256 = "1z9a40nbdjd3pnp28nfsi2bijsbaiphc0ia816f5flkchn07gmmj";
+    };
+    meta.homepage = "https://github.com/chrisbra/CheckAttach/";
+  };
+
+  ci_dark = buildVimPluginFrom2Nix {
+    pname = "ci_dark";
+    version = "2021-03-03";
+    src = fetchFromGitHub {
+      owner = "chuling";
+      repo = "ci_dark";
+      rev = "9063153b05ca47c030a5f656411dbbed33697678";
+      sha256 = "011017ywcgjcflsl21fjcrz7ap68aqvgx5y5z64075qkrk1pqgz1";
+    };
+    meta.homepage = "https://github.com/chuling/ci_dark/";
+  };
+
+  clang_complete = buildVimPluginFrom2Nix {
+    pname = "clang_complete";
+    version = "2020-09-18";
+    src = fetchFromGitHub {
+      owner = "xavierd";
+      repo = "clang_complete";
+      rev = "293a1062274a06be61797612034bd8d87851406e";
+      sha256 = "1whipcrr4pcg1bkivq3l753v3f3glbhkdd6wp6f9czspr7hx2h2d";
+    };
+    meta.homepage = "https://github.com/xavierd/clang_complete/";
+  };
+
+  clighter8 = buildVimPluginFrom2Nix {
+    pname = "clighter8";
+    version = "2018-07-25";
+    src = fetchFromGitHub {
+      owner = "bbchung";
+      repo = "clighter8";
+      rev = "839993b60dc4a19a58e4c7e7db1df04d911bb181";
+      sha256 = "01r92idbym2p1hiqszrprrl1hrqzz2yhzv8n08m8gycd7m227cwg";
+    };
+    meta.homepage = "https://github.com/bbchung/clighter8/";
+  };
+
+  coc-clap = buildVimPluginFrom2Nix {
+    pname = "coc-clap";
+    version = "2021-03-04";
+    src = fetchFromGitHub {
+      owner = "vn-ki";
+      repo = "coc-clap";
+      rev = "57116d2f999dfa025fac579835fd23e1a6341fa2";
+      sha256 = "0m2khf11krkqmbykfx21yq9ydglz6dldw4xml5nkyqm93n37xn1s";
+    };
+    meta.homepage = "https://github.com/vn-ki/coc-clap/";
+  };
+
+  coc-denite = buildVimPluginFrom2Nix {
+    pname = "coc-denite";
+    version = "2021-02-24";
+    src = fetchFromGitHub {
+      owner = "neoclide";
+      repo = "coc-denite";
+      rev = "37016bc170014e36fc8212b2dc7ce7adda48bbe3";
+      sha256 = "0kpw2gfkpdfsi2kwm6rbzmz3diyinc3lcf91rxm8wyw486sp0s10";
+    };
+    meta.homepage = "https://github.com/neoclide/coc-denite/";
+  };
+
+  coc-explorer = buildVimPluginFrom2Nix {
+    pname = "coc-explorer";
+    version = "2021-04-01";
+    src = fetchFromGitHub {
+      owner = "weirongxu";
+      repo = "coc-explorer";
+      rev = "259d681b368dd0ea11e3b62bbb537c4eece2ef6a";
+      sha256 = "1vzfx5ajjd4fq3n9ixj80l7gwq6wmiib899ww27sc5v4fkm5ykf6";
+    };
+    meta.homepage = "https://github.com/weirongxu/coc-explorer/";
+  };
+
+  coc-fzf = buildVimPluginFrom2Nix {
+    pname = "coc-fzf";
+    version = "2021-03-21";
+    src = fetchFromGitHub {
+      owner = "antoinemadec";
+      repo = "coc-fzf";
+      rev = "8f27377229c5d2dcee9ae9cda8dea0fad4a5ac3b";
+      sha256 = "0ri0rlz4fwxli6ssz69zyifrdwhc8yx4p996rw8d2m76nm7hflv0";
+    };
+    meta.homepage = "https://github.com/antoinemadec/coc-fzf/";
+  };
+
+  coc-lua = buildVimPluginFrom2Nix {
+    pname = "coc-lua";
+    version = "2021-03-28";
+    src = fetchFromGitHub {
+      owner = "josa42";
+      repo = "coc-lua";
+      rev = "d826e14db13980f7f1734117ff60f5e3573eb2ce";
+      sha256 = "1b0yi6513n690y2sqlyzsckr15jim9izkjlfpphpw4a8d819hx7l";
+    };
+    meta.homepage = "https://github.com/josa42/coc-lua/";
+  };
+
+  coc-neco = buildVimPluginFrom2Nix {
+    pname = "coc-neco";
+    version = "2020-04-07";
+    src = fetchFromGitHub {
+      owner = "neoclide";
+      repo = "coc-neco";
+      rev = "fe130c2c3b883f8b58f70f15bf36c73923faa3d9";
+      sha256 = "1yzh3p1xx6k6rnr9skdvy5lsb7hz4kh2y537ill8a7770y936vn8";
+    };
+    meta.homepage = "https://github.com/neoclide/coc-neco/";
+  };
+
+  coc-spell-checker = buildVimPluginFrom2Nix {
+    pname = "coc-spell-checker";
+    version = "2020-09-15";
+    src = fetchFromGitHub {
+      owner = "iamcco";
+      repo = "coc-spell-checker";
+      rev = "a76ebbff41fec61bb7a3c2556a670720db3f9ff9";
+      sha256 = "0i2znngg8jyxgns1kqi5168c4899wj2b8h8n14yy6pxgidhgqvzp";
+    };
+    meta.homepage = "https://github.com/iamcco/coc-spell-checker/";
+  };
+
+  coc-nvim = buildVimPluginFrom2Nix {
+    pname = "coc-nvim";
+    version = "2021-04-03";
+    src = fetchFromGitHub {
+      owner = "neoclide";
+      repo = "coc.nvim";
+      rev = "d3e40ceabd76323c07434fc2711521cc8bb2d028";
+      sha256 = "0mppsxzcgxg20kf2zwja8r6gascxa9r9c7zh73i00i7n216f8fxd";
+    };
+    meta.homepage = "https://github.com/neoclide/coc.nvim/";
+  };
+
+  codi-vim = buildVimPluginFrom2Nix {
+    pname = "codi-vim";
+    version = "2021-01-11";
+    src = fetchFromGitHub {
+      owner = "metakirby5";
+      repo = "codi.vim";
+      rev = "cf62681a4962ce1873e4b2a5e0bf401dcd42890f";
+      sha256 = "15j08qa7sklm0pilfn3ljgq75hrv8y9h8xzj8ibrafp29640gkfl";
+    };
+    meta.homepage = "https://github.com/metakirby5/codi.vim/";
+  };
+
+  colorizer = buildVimPluginFrom2Nix {
+    pname = "colorizer";
+    version = "2020-07-23";
+    src = fetchFromGitHub {
+      owner = "lilydjwg";
+      repo = "colorizer";
+      rev = "1ddc68adbf45331158c61507a55fcc918bb61654";
+      sha256 = "16zrpgnlb3v4yvpycq9spivs97vzv18m3jc47rl0hgpjdf6vhkxx";
+    };
+    meta.homepage = "https://github.com/lilydjwg/colorizer/";
+  };
+
+  Colour-Sampler-Pack = buildVimPluginFrom2Nix {
+    pname = "Colour-Sampler-Pack";
+    version = "2012-11-30";
+    src = fetchFromGitHub {
+      owner = "vim-scripts";
+      repo = "Colour-Sampler-Pack";
+      rev = "05cded87b2ef29aaa9e930230bb88e23abff4441";
+      sha256 = "03v2r18sfgs0xbgy9p56pxfdg0lsk6m7wyr5hw63wm1nzpwiipg3";
+    };
+    meta.homepage = "https://github.com/vim-scripts/Colour-Sampler-Pack/";
+  };
+
+  command-t = buildVimPluginFrom2Nix {
+    pname = "command-t";
+    version = "2021-03-14";
+    src = fetchFromGitHub {
+      owner = "wincent";
+      repo = "command-t";
+      rev = "a7ce436b211a7ac1f47cfd440370653e33c2a1d5";
+      sha256 = "1yfcbh9q35w1ckdv8isbwjwlgnjnjmqm8yc7bcbfirkx9pjlsw2z";
+      fetchSubmodules = true;
+    };
+    meta.homepage = "https://github.com/wincent/command-t/";
+  };
+
+  committia-vim = buildVimPluginFrom2Nix {
+    pname = "committia-vim";
+    version = "2020-08-27";
+    src = fetchFromGitHub {
+      owner = "rhysd";
+      repo = "committia.vim";
+      rev = "1d288281586d1e6b52646a4c412df3dd3a2fe231";
+      sha256 = "11ik72qi7fvxkz7fnyisaa0xscy4pksq8l2pvclywzg3lcclhxp1";
+    };
+    meta.homepage = "https://github.com/rhysd/committia.vim/";
+  };
+
+  compe-conjure = buildVimPluginFrom2Nix {
+    pname = "compe-conjure";
+    version = "2021-02-02";
+    src = fetchFromGitHub {
+      owner = "tami5";
+      repo = "compe-conjure";
+      rev = "809853ff8098dffcf8ba5ac89bcf07806eb8f981";
+      sha256 = "0p7p4bgkh05zy0gzmq0g9nn9npykh1l17cvfzjyhcb3n1sczpjzf";
+    };
+    meta.homepage = "https://github.com/tami5/compe-conjure/";
+  };
+
+  compe-tabnine = buildVimPluginFrom2Nix {
+    pname = "compe-tabnine";
+    version = "2021-04-04";
+    src = fetchFromGitHub {
+      owner = "tzachar";
+      repo = "compe-tabnine";
+      rev = "e27296ab377fed567812876bebfd74487062d518";
+      sha256 = "0jmn0s398896109j7k8bni2f5qgd63xjnjsmqkljlpc9zvhy1fbz";
+    };
+    meta.homepage = "https://github.com/tzachar/compe-tabnine/";
+  };
+
+  completion-buffers = buildVimPluginFrom2Nix {
+    pname = "completion-buffers";
+    version = "2021-01-17";
+    src = fetchFromGitHub {
+      owner = "steelsojka";
+      repo = "completion-buffers";
+      rev = "c36871b2a44b59761387f4972c617b44dcec5e75";
+      sha256 = "14rxmy3cjrl7lr4yvrk7nkhc5h8rlpj7xjixzgr0vmnbsl885kyh";
+    };
+    meta.homepage = "https://github.com/steelsojka/completion-buffers/";
+  };
+
+  completion-nvim = buildVimPluginFrom2Nix {
+    pname = "completion-nvim";
+    version = "2021-01-15";
+    src = fetchFromGitHub {
+      owner = "nvim-lua";
+      repo = "completion-nvim";
+      rev = "fc9b2fd2d47bea6a8954de1b1b19f2330545b354";
+      sha256 = "0dip8z6cfhjbz5lvf6f75382lg7d819djrpygbc12lf1s4i66i3z";
+    };
+    meta.homepage = "https://github.com/nvim-lua/completion-nvim/";
+  };
+
+  completion-tabnine = buildVimPluginFrom2Nix {
+    pname = "completion-tabnine";
+    version = "2020-12-08";
+    src = fetchFromGitHub {
+      owner = "aca";
+      repo = "completion-tabnine";
+      rev = "278a6c6ae65fa753f21add8d797572043d8315d5";
+      sha256 = "00a0bpjpnykr625dyavczg5ca4mbbw2j0g7l66v3kjn67r2wr18y";
+    };
+    meta.homepage = "https://github.com/aca/completion-tabnine/";
+  };
+
+  completion-treesitter = buildVimPluginFrom2Nix {
+    pname = "completion-treesitter";
+    version = "2020-06-26";
+    src = fetchFromGitHub {
+      owner = "nvim-treesitter";
+      repo = "completion-treesitter";
+      rev = "45c9b2faff4785539a0d0c655440c2465fed985a";
+      sha256 = "19pgdzzk7zq85b1grfjf0nncvs5vxrd4rj1p90iw2amq4mvqrx3l";
+    };
+    meta.homepage = "https://github.com/nvim-treesitter/completion-treesitter/";
+  };
+
+  concealedyank-vim = buildVimPluginFrom2Nix {
+    pname = "concealedyank-vim";
+    version = "2013-03-24";
+    src = fetchFromGitHub {
+      owner = "chikatoike";
+      repo = "concealedyank.vim";
+      rev = "e7e65a395e0e6a266f3a808bc07441aa7d03ebbd";
+      sha256 = "0z7i8dmwfjh6mcrmgrxv3j86ic867617fas9mv4gqsrhhvrrkzsb";
+    };
+    meta.homepage = "https://github.com/chikatoike/concealedyank.vim/";
+  };
+
+  conjure = buildVimPluginFrom2Nix {
+    pname = "conjure";
+    version = "2021-04-01";
+    src = fetchFromGitHub {
+      owner = "Olical";
+      repo = "conjure";
+      rev = "46b766dee43a97266741087085889751b474fb56";
+      sha256 = "1034n76bg4p4yvqmz9g9clsrrhx0kvqs0z8fy6p9axmxqzi8z9rr";
+    };
+    meta.homepage = "https://github.com/Olical/conjure/";
+  };
+
+  context_filetype-vim = buildVimPluginFrom2Nix {
+    pname = "context_filetype-vim";
+    version = "2021-03-04";
+    src = fetchFromGitHub {
+      owner = "Shougo";
+      repo = "context_filetype.vim";
+      rev = "f5e4ed8f7847cd5474017459c2a0f2dfd2bf971c";
+      sha256 = "039mnsd6k0sgs8l1a8ngl3y817c8g657nv8v9bdw9h8l5a934cb2";
+    };
+    meta.homepage = "https://github.com/Shougo/context_filetype.vim/";
+  };
+
+  coq-vim = buildVimPluginFrom2Nix {
+    pname = "coq-vim";
+    version = "2013-01-16";
+    src = fetchFromGitHub {
+      owner = "jvoorhis";
+      repo = "coq.vim";
+      rev = "9b229f5872854dadfb8ba4b67a6a273f37eca4b8";
+      sha256 = "0hpfwcm8lvv831b7i27lw72nqxfy7jymq6a6g3xmf0ycb0l3pnky";
+    };
+    meta.homepage = "https://github.com/jvoorhis/coq.vim/";
+  };
+
+  Coqtail = buildVimPluginFrom2Nix {
+    pname = "Coqtail";
+    version = "2021-04-05";
+    src = fetchFromGitHub {
+      owner = "whonore";
+      repo = "Coqtail";
+      rev = "54b9cbf9da4a956dc55cd903f3b4f7b211b712a2";
+      sha256 = "0ir10ff5va38ch52fvyl5cfz4mjins3lpklqyh23rrqc0hfd8154";
+    };
+    meta.homepage = "https://github.com/whonore/Coqtail/";
+  };
+
+  cosco-vim = buildVimPluginFrom2Nix {
+    pname = "cosco-vim";
+    version = "2018-08-07";
+    src = fetchFromGitHub {
+      owner = "lfilho";
+      repo = "cosco.vim";
+      rev = "5752622192d9b27b3a5a274a5455613b56df6386";
+      sha256 = "01byd7j4gl7zb1bh61p839ka04x2sm0rgwvbb126az7dr6gpclyf";
+    };
+    meta.homepage = "https://github.com/lfilho/cosco.vim/";
+  };
+
+  cpsm = buildVimPluginFrom2Nix {
+    pname = "cpsm";
+    version = "2020-08-01";
+    src = fetchFromGitHub {
+      owner = "nixprime";
+      repo = "cpsm";
+      rev = "42cfb0f83083b33640619c208341629bff67bd8a";
+      sha256 = "0wcq442wj73ra0agflljjkhcwlma7r703l7l9hn7zd8wfb4iv48s";
+    };
+    meta.homepage = "https://github.com/nixprime/cpsm/";
+  };
+
+  csapprox = buildVimPluginFrom2Nix {
+    pname = "csapprox";
+    version = "2013-07-27";
+    src = fetchFromGitHub {
+      owner = "godlygeek";
+      repo = "csapprox";
+      rev = "7981dac51d8b6776985aa08cb7b5ee98ea7f2ddd";
+      sha256 = "08g4x6nnd6hkgm2daa5ihhz75pcdx3jzzv8rfjls80qajlhx5rf6";
+    };
+    meta.homepage = "https://github.com/godlygeek/csapprox/";
+  };
+
+  csv-vim = buildVimPluginFrom2Nix {
+    pname = "csv-vim";
+    version = "2021-03-15";
+    src = fetchFromGitHub {
+      owner = "chrisbra";
+      repo = "csv.vim";
+      rev = "24da62f64e6025be12ad60b16489b561f228e619";
+      sha256 = "0x5z46rzhwrdr1fzq69c6bpn3dnjjj9a64s97wn220n4xwrz1y54";
+    };
+    meta.homepage = "https://github.com/chrisbra/csv.vim/";
+  };
+
+  ctrlp-cmatcher = buildVimPluginFrom2Nix {
+    pname = "ctrlp-cmatcher";
+    version = "2015-10-15";
+    src = fetchFromGitHub {
+      owner = "JazzCore";
+      repo = "ctrlp-cmatcher";
+      rev = "6c36334f106b6fd981d23e724e9a618734cab43a";
+      sha256 = "1573kd6xf3n8sxlz2j4zadai4rnc7k3s9c54648yfzickwn57d8q";
+    };
+    meta.homepage = "https://github.com/JazzCore/ctrlp-cmatcher/";
+  };
+
+  ctrlp-py-matcher = buildVimPluginFrom2Nix {
+    pname = "ctrlp-py-matcher";
+    version = "2017-11-01";
+    src = fetchFromGitHub {
+      owner = "FelikZ";
+      repo = "ctrlp-py-matcher";
+      rev = "cf63fd546f1e80dd4db3db96afbeaad301d21f13";
+      sha256 = "0hs829x3vxv12y78hz5g4a5qpw05xf42dk0hxxk3ind77mnl1ir1";
+    };
+    meta.homepage = "https://github.com/FelikZ/ctrlp-py-matcher/";
+  };
+
+  ctrlp-z = buildVimPluginFrom2Nix {
+    pname = "ctrlp-z";
+    version = "2015-10-17";
+    src = fetchFromGitHub {
+      owner = "amiorin";
+      repo = "ctrlp-z";
+      rev = "d1a69ec623ce24b9a30fc8fe3cd468c322b03026";
+      sha256 = "16nsj1g8lqmyizlb5ijwhf4dsmh0xv1kwqq6jxvhaf55vfga82yl";
+    };
+    meta.homepage = "https://github.com/amiorin/ctrlp-z/";
+  };
+
+  ctrlp-vim = buildVimPluginFrom2Nix {
+    pname = "ctrlp-vim";
+    version = "2020-11-12";
+    src = fetchFromGitHub {
+      owner = "ctrlpvim";
+      repo = "ctrlp.vim";
+      rev = "971c4d41880b72dbbf1620b3ad91418a6a6f6b9c";
+      sha256 = "0n68hg59h4rjn0ziqbsh5pr03l3kr98zk54659ny6vq107af1w96";
+    };
+    meta.homepage = "https://github.com/ctrlpvim/ctrlp.vim/";
+  };
+
+  dart-vim-plugin = buildVimPluginFrom2Nix {
+    pname = "dart-vim-plugin";
+    version = "2021-04-05";
+    src = fetchFromGitHub {
+      owner = "dart-lang";
+      repo = "dart-vim-plugin";
+      rev = "d874c13dca7300178546de62e1aff7d4812640c7";
+      sha256 = "1i1w9mwmrl6cds83mai1xyqrqmzbgal2whw653g54sz1gvnhab7s";
+    };
+    meta.homepage = "https://github.com/dart-lang/dart-vim-plugin/";
+  };
+
+  dashboard-nvim = buildVimPluginFrom2Nix {
+    pname = "dashboard-nvim";
+    version = "2021-03-28";
+    src = fetchFromGitHub {
+      owner = "glepnir";
+      repo = "dashboard-nvim";
+      rev = "181ca6577101c04dd220b7a25096cbd4325979ec";
+      sha256 = "03zazbnbcsg272zzx4q4n6vkvcwzm8lh1jw1fzbkn2blmffyjld6";
+    };
+    meta.homepage = "https://github.com/glepnir/dashboard-nvim/";
+  };
+
+  defx-git = buildVimPluginFrom2Nix {
+    pname = "defx-git";
+    version = "2021-01-01";
+    src = fetchFromGitHub {
+      owner = "kristijanhusak";
+      repo = "defx-git";
+      rev = "324552fc652ed09e14a45485945b2e52eb04cbdc";
+      sha256 = "1imgzbyrpivk601z35wdr6lk0r9vwriy37l4a0c3cmmb87pxkzcf";
+    };
+    meta.homepage = "https://github.com/kristijanhusak/defx-git/";
+  };
+
+  defx-icons = buildVimPluginFrom2Nix {
+    pname = "defx-icons";
+    version = "2021-03-07";
+    src = fetchFromGitHub {
+      owner = "kristijanhusak";
+      repo = "defx-icons";
+      rev = "563bc2d07d6c369a293ea8cb2fad8afd38bf4a02";
+      sha256 = "0gp65vf7lb00k4pk9iyr2zm6q3lfz16ad70hh3ldnj2azdfz539m";
+    };
+    meta.homepage = "https://github.com/kristijanhusak/defx-icons/";
+  };
+
+  defx-nvim = buildVimPluginFrom2Nix {
+    pname = "defx-nvim";
+    version = "2021-03-24";
+    src = fetchFromGitHub {
+      owner = "Shougo";
+      repo = "defx.nvim";
+      rev = "e5a757e2dc2f3409f5ccc4e4df384df93b0ef09d";
+      sha256 = "1qfwpwb7r94hnjidggn1fwcshikac8j0ckf1qb0fppfx1akyf78q";
+    };
+    meta.homepage = "https://github.com/Shougo/defx.nvim/";
+  };
+
+  delimitMate = buildVimPluginFrom2Nix {
+    pname = "delimitMate";
+    version = "2020-12-14";
+    src = fetchFromGitHub {
+      owner = "Raimondi";
+      repo = "delimitMate";
+      rev = "537a1da0fa5eeb88640425c37e545af933c56e1b";
+      sha256 = "0vjs11bx5zp6xqny5fd3lhqqvqaz6xjgncyga7hb0x5v6zng7gaj";
+    };
+    meta.homepage = "https://github.com/Raimondi/delimitMate/";
+  };
+
+  denite-extra = buildVimPluginFrom2Nix {
+    pname = "denite-extra";
+    version = "2019-03-29";
+    src = fetchFromGitHub {
+      owner = "neoclide";
+      repo = "denite-extra";
+      rev = "af18257544027ce89269dba70c12aba1f5b9e23c";
+      sha256 = "0bmq9yhylfd3v6bfwvakw3pbsz5kk8wlmmql0yllqayp6410w25a";
+    };
+    meta.homepage = "https://github.com/neoclide/denite-extra/";
+  };
+
+  denite-git = buildVimPluginFrom2Nix {
+    pname = "denite-git";
+    version = "2021-01-25";
+    src = fetchFromGitHub {
+      owner = "neoclide";
+      repo = "denite-git";
+      rev = "031c2db8fd7ff68078ba3e4f05d21a7950353433";
+      sha256 = "0h5a0cmrv1w7zvzxj8gdddhyiqi1qa91qsyl2axhcrdishpc0hnn";
+    };
+    meta.homepage = "https://github.com/neoclide/denite-git/";
+  };
+
+  denite-nvim = buildVimPluginFrom2Nix {
+    pname = "denite-nvim";
+    version = "2021-04-03";
+    src = fetchFromGitHub {
+      owner = "Shougo";
+      repo = "denite.nvim";
+      rev = "452b1800ad2f2db96847da857f9a0d67ff6ecc95";
+      sha256 = "0rhqi6rc3iz549g95m6m6s10hzihyg3fjj4v8dhic3iqpxilw8l8";
+    };
+    meta.homepage = "https://github.com/Shougo/denite.nvim/";
+  };
+
+  deol-nvim = buildVimPluginFrom2Nix {
+    pname = "deol-nvim";
+    version = "2021-03-31";
+    src = fetchFromGitHub {
+      owner = "Shougo";
+      repo = "deol.nvim";
+      rev = "09598d454ce12753c562a596b6c6b798537a8e67";
+      sha256 = "0vmkgb6fy9vi2spvgqf242vn37yj6sjs68ddz37948l5nazalhrl";
+    };
+    meta.homepage = "https://github.com/Shougo/deol.nvim/";
+  };
+
+  deoplete-clang = buildVimPluginFrom2Nix {
+    pname = "deoplete-clang";
+    version = "2019-11-10";
+    src = fetchFromGitHub {
+      owner = "deoplete-plugins";
+      repo = "deoplete-clang";
+      rev = "2ea262e98edcb66e828f9077fcc844100320eb63";
+      sha256 = "1wvk61f8ph2vpl6llzmir3qs3zwaw3lrphs16d1j7ljkdl3bk49k";
+      fetchSubmodules = true;
+    };
+    meta.homepage = "https://github.com/deoplete-plugins/deoplete-clang/";
+  };
+
+  deoplete-dictionary = buildVimPluginFrom2Nix {
+    pname = "deoplete-dictionary";
+    version = "2019-04-16";
+    src = fetchFromGitHub {
+      owner = "deoplete-plugins";
+      repo = "deoplete-dictionary";
+      rev = "e0879df5dce25b96d6a2a6f52a1a5e41d12b5992";
+      sha256 = "05p707b15fzhf0laqy3q0hi34vxpljy86cd5qvpjzx5h0ry32p09";
+    };
+    meta.homepage = "https://github.com/deoplete-plugins/deoplete-dictionary/";
+  };
+
+  deoplete-emoji = buildVimPluginFrom2Nix {
+    pname = "deoplete-emoji";
+    version = "2019-01-20";
+    src = fetchFromGitHub {
+      owner = "fszymanski";
+      repo = "deoplete-emoji";
+      rev = "1dfa2da6ae3ee146ddfbfdba48cf45f0c1d57d7d";
+      sha256 = "0drqbdmy8igq6rv7s2qlxsp391pydcynlr9gkaadzrg7pk4nlgsb";
+    };
+    meta.homepage = "https://github.com/fszymanski/deoplete-emoji/";
+  };
+
+  deoplete-fish = buildVimPluginFrom2Nix {
+    pname = "deoplete-fish";
+    version = "2020-04-04";
+    src = fetchFromGitHub {
+      owner = "ponko2";
+      repo = "deoplete-fish";
+      rev = "c4cfb934bb6ec69d7f1aff9d376b7d436bba5c93";
+      sha256 = "19a6j4qsqljz1pmrn4fx8v1bhlfpqdq821fc2ibjd9h98f6dzi5p";
+    };
+    meta.homepage = "https://github.com/ponko2/deoplete-fish/";
+  };
+
+  deoplete-github = buildVimPluginFrom2Nix {
+    pname = "deoplete-github";
+    version = "2018-03-04";
+    src = fetchFromGitHub {
+      owner = "SevereOverfl0w";
+      repo = "deoplete-github";
+      rev = "8e30256e50b3914a7e57ea4d5976b6a499fb936f";
+      sha256 = "11n15nqi417sdcqgb6gkk6z4wrrdd8vdbd7wzqpg41140c73v5gm";
+    };
+    meta.homepage = "https://github.com/SevereOverfl0w/deoplete-github/";
+  };
+
+  deoplete-go = buildVimPluginFrom2Nix {
+    pname = "deoplete-go";
+    version = "2021-03-30";
+    src = fetchFromGitHub {
+      owner = "deoplete-plugins";
+      repo = "deoplete-go";
+      rev = "4eac2e6f127f2e2601dee415db2f826e2c9ef16c";
+      sha256 = "0vwp1vnjf63i7wm3crpwjj9myjdw75ghq20i6nfrfv1szhqnq28m";
+      fetchSubmodules = true;
+    };
+    meta.homepage = "https://github.com/deoplete-plugins/deoplete-go/";
+  };
+
+  deoplete-greek = buildVimPluginFrom2Nix {
+    pname = "deoplete-greek";
+    version = "2019-12-23";
+    src = fetchFromGitHub {
+      owner = "Inazuma110";
+      repo = "deoplete-greek";
+      rev = "aecf3b2f8acfab20c93a6dc88d55260a0df04cbf";
+      sha256 = "086qjbqps05zb2vnyb5q7a67i7al8mxxi86n0h5nsqdd0ws6qqhx";
+    };
+    meta.homepage = "https://github.com/Inazuma110/deoplete-greek/";
+  };
+
+  deoplete-jedi = buildVimPluginFrom2Nix {
+    pname = "deoplete-jedi";
+    version = "2020-12-21";
+    src = fetchFromGitHub {
+      owner = "deoplete-plugins";
+      repo = "deoplete-jedi";
+      rev = "43058915007d92dc167b84dd5b8ada2d2a057a82";
+      sha256 = "0qh43mwzjsn67id6qs96p9lw1fjsgdgqmks0161hfgvbyixx2b3y";
+    };
+    meta.homepage = "https://github.com/deoplete-plugins/deoplete-jedi/";
+  };
+
+  deoplete-julia = buildVimPluginFrom2Nix {
+    pname = "deoplete-julia";
+    version = "2018-06-11";
+    src = fetchFromGitHub {
+      owner = "JuliaEditorSupport";
+      repo = "deoplete-julia";
+      rev = "d60b976910685c99ca773c974e91c44eeda03a19";
+      sha256 = "0x5cc9g1g1w9myr6p1ahb9gpn2abpbggjdk2bc903f62pkrapvjf";
+    };
+    meta.homepage = "https://github.com/JuliaEditorSupport/deoplete-julia/";
+  };
+
+  deoplete-khard = buildVimPluginFrom2Nix {
+    pname = "deoplete-khard";
+    version = "2020-09-18";
+    src = fetchFromGitHub {
+      owner = "nicoe";
+      repo = "deoplete-khard";
+      rev = "dc2b519e8da0df10c3954946285caf484d376497";
+      sha256 = "126mhnn4dqwm3aw6v4c3s3fnz40lki4cbb8xfrmxfbnbnjw1yx4x";
+    };
+    meta.homepage = "https://github.com/nicoe/deoplete-khard/";
+  };
+
+  deoplete-lsp = buildVimPluginFrom2Nix {
+    pname = "deoplete-lsp";
+    version = "2021-02-07";
+    src = fetchFromGitHub {
+      owner = "deoplete-plugins";
+      repo = "deoplete-lsp";
+      rev = "e526dbecda137e37c45492ce72fa92ea32314154";
+      sha256 = "03dwis03zx88j4dan1y39b03rvf7f2q7hykhgqsfcx1zj8lp8s7n";
+    };
+    meta.homepage = "https://github.com/deoplete-plugins/deoplete-lsp/";
+  };
+
+  deoplete-notmuch = buildVimPluginFrom2Nix {
+    pname = "deoplete-notmuch";
+    version = "2018-12-11";
+    src = fetchFromGitHub {
+      owner = "Valodim";
+      repo = "deoplete-notmuch";
+      rev = "828b5acf1924f9869614e93855a0d8cc94f1a74d";
+      sha256 = "1l2pfazhpkz26zwbjdafvhgvjj533kncm7dywlandsf3cibm8mv9";
+    };
+    meta.homepage = "https://github.com/Valodim/deoplete-notmuch/";
+  };
+
+  deoplete-phpactor = buildVimPluginFrom2Nix {
+    pname = "deoplete-phpactor";
+    version = "2020-09-12";
+    src = fetchFromGitHub {
+      owner = "kristijanhusak";
+      repo = "deoplete-phpactor";
+      rev = "3668d35d8ea8177bb70cfb239169d3c12bc54f6a";
+      sha256 = "1cjdr8py7brxz419vf125jkyfjrx3n5z65ranj23z20ifc945g6b";
+    };
+    meta.homepage = "https://github.com/kristijanhusak/deoplete-phpactor/";
+  };
+
+  deoplete-rust = buildVimPluginFrom2Nix {
+    pname = "deoplete-rust";
+    version = "2017-07-18";
+    src = fetchFromGitHub {
+      owner = "sebastianmarkow";
+      repo = "deoplete-rust";
+      rev = "0a86e502113910c33448b337c4d50cabea120d25";
+      sha256 = "0wsck83jns40ny3740vwjhc8g5bh6zl71hkirbjxy6n4xgixa54h";
+    };
+    meta.homepage = "https://github.com/sebastianmarkow/deoplete-rust/";
+  };
+
+  deoplete-tabnine = buildVimPluginFrom2Nix {
+    pname = "deoplete-tabnine";
+    version = "2021-02-28";
+    src = fetchFromGitHub {
+      owner = "tbodt";
+      repo = "deoplete-tabnine";
+      rev = "6997d621f6bd10351041be8e9dfbc6874009bf1b";
+      sha256 = "17xxxk75w852qj89b1283pff1rsv6qd3siy14sxrz4455x4j1sj5";
+    };
+    meta.homepage = "https://github.com/tbodt/deoplete-tabnine/";
+  };
+
+  deoplete-ternjs = buildVimPluginFrom2Nix {
+    pname = "deoplete-ternjs";
+    version = "2019-12-19";
+    src = fetchFromGitHub {
+      owner = "carlitux";
+      repo = "deoplete-ternjs";
+      rev = "5405e84a44fc4ab5234c9a253ad4aa2b161e5897";
+      sha256 = "0684f9ci0y4wihf04z9r8x55cir02al4wp911dz0zg678z8w0yha";
+    };
+    meta.homepage = "https://github.com/carlitux/deoplete-ternjs/";
+  };
+
+  deoplete-vim-lsp = buildVimPluginFrom2Nix {
+    pname = "deoplete-vim-lsp";
+    version = "2021-02-22";
+    src = fetchFromGitHub {
+      owner = "lighttiger2505";
+      repo = "deoplete-vim-lsp";
+      rev = "af5432f1e063fd4c3a5879aa8c2afe82c17dc1c9";
+      sha256 = "1s6fw6vkpl0yiya22g13v4i14w3n1ds2zr8zdlwpkk44bf0225px";
+    };
+    meta.homepage = "https://github.com/lighttiger2505/deoplete-vim-lsp/";
+  };
+
+  deoplete-zsh = buildVimPluginFrom2Nix {
+    pname = "deoplete-zsh";
+    version = "2019-11-10";
+    src = fetchFromGitHub {
+      owner = "deoplete-plugins";
+      repo = "deoplete-zsh";
+      rev = "92b7afc3804dd17a849b207e184359558ab8f444";
+      sha256 = "0zsbkl82kny1vmfv06iz576xsclbik0xr7ndzpb0ddhw5nfnicfx";
+    };
+    meta.homepage = "https://github.com/deoplete-plugins/deoplete-zsh/";
+  };
+
+  deoplete-nvim = buildVimPluginFrom2Nix {
+    pname = "deoplete-nvim";
+    version = "2021-04-05";
+    src = fetchFromGitHub {
+      owner = "Shougo";
+      repo = "deoplete.nvim";
+      rev = "20d181d84c108ea2b13ce227e9dd5ae13df0e13e";
+      sha256 = "058bb2pznmldk8936d69ynqf79apiv0j39sva68qpqmsixnljnz9";
+    };
+    meta.homepage = "https://github.com/Shougo/deoplete.nvim/";
+  };
+
+  devdocs-vim = buildVimPluginFrom2Nix {
+    pname = "devdocs-vim";
+    version = "2018-08-27";
+    src = fetchFromGitHub {
+      owner = "rhysd";
+      repo = "devdocs.vim";
+      rev = "1c91c619874f11f2062f80e6ca4b49456f21ae91";
+      sha256 = "1nxww2mjabl2g2wchxc4h3a58j64acls24zb5jmfi71b8sai8a9b";
+    };
+    meta.homepage = "https://github.com/rhysd/devdocs.vim/";
+  };
+
+  dhall-vim = buildVimPluginFrom2Nix {
+    pname = "dhall-vim";
+    version = "2020-08-19";
+    src = fetchFromGitHub {
+      owner = "vmchale";
+      repo = "dhall-vim";
+      rev = "77d1c165bcbe6bb7f9eedbeafe390c2107d3c52e";
+      sha256 = "03x55x0gvf7n4i8hh6s5453mf5h43pf7kdy817q6w1149bd90vxy";
+    };
+    meta.homepage = "https://github.com/vmchale/dhall-vim/";
+  };
+
+  diagnostic-nvim = buildVimPluginFrom2Nix {
+    pname = "diagnostic-nvim";
+    version = "2020-11-13";
+    src = fetchFromGitHub {
+      owner = "nvim-lua";
+      repo = "diagnostic-nvim";
+      rev = "a8401479822e638fa70472009949e7be8b24e0fd";
+      sha256 = "1dl4b8xhvnb2x9fw220jis7hqmiwfz0969d44l96p41bj68qbbs9";
+    };
+    meta.homepage = "https://github.com/nvim-lua/diagnostic-nvim/";
+  };
+
+  direnv-vim = buildVimPluginFrom2Nix {
+    pname = "direnv-vim";
+    version = "2020-11-20";
+    src = fetchFromGitHub {
+      owner = "direnv";
+      repo = "direnv.vim";
+      rev = "ff37d76da391e1ef299d2f5eb84006cb27a67799";
+      sha256 = "136z8axjd66l4yy6rkjr6gqm86zxnqpbw9pzkvii0lsaz11w9wak";
+    };
+    meta.homepage = "https://github.com/direnv/direnv.vim/";
+  };
+
+  DoxygenToolkit-vim = buildVimPluginFrom2Nix {
+    pname = "DoxygenToolkit-vim";
+    version = "2010-11-06";
+    src = fetchFromGitHub {
+      owner = "vim-scripts";
+      repo = "DoxygenToolkit.vim";
+      rev = "afd8663d36d2ec19d26befdb10e89e912d26bbd3";
+      sha256 = "1za8li02j4nhqjjsyxg4p78638h5af4izim37zc0p1x55zr3i85r";
+    };
+    meta.homepage = "https://github.com/vim-scripts/DoxygenToolkit.vim/";
+  };
+
+  dracula-vim = buildVimPluginFrom2Nix {
+    pname = "dracula-vim";
+    version = "2021-03-18";
+    src = fetchFromGitHub {
+      owner = "dracula";
+      repo = "vim";
+      rev = "ab37ffc5aeb1693002f30254b3b9992965f45d5d";
+      sha256 = "0affiaa2ng43r3rj2yzxs50fiilsk5vqkgjah2zqa159lb2058ra";
+    };
+    meta.homepage = "https://github.com/dracula/vim/";
+  };
+
+  echodoc-vim = buildVimPluginFrom2Nix {
+    pname = "echodoc-vim";
+    version = "2021-02-23";
+    src = fetchFromGitHub {
+      owner = "Shougo";
+      repo = "echodoc.vim";
+      rev = "af235aaaa74f41cd83181a16b9f17c16e56afc47";
+      sha256 = "1jzn7w6rv2bl1m4aqm716flg28jdjsgkikfjjjiz4if5vjsfj0lw";
+    };
+    meta.homepage = "https://github.com/Shougo/echodoc.vim/";
+  };
+
+  editorconfig-vim = buildVimPluginFrom2Nix {
+    pname = "editorconfig-vim";
+    version = "2021-04-04";
+    src = fetchFromGitHub {
+      owner = "editorconfig";
+      repo = "editorconfig-vim";
+      rev = "f305bc77faef4b418aee65682d7d147f64cfd5a9";
+      sha256 = "1yr8jni3z9sf348d8zw532vj4s1ww62yfslfcdgkgwhba1l2vy53";
+      fetchSubmodules = true;
+    };
+    meta.homepage = "https://github.com/editorconfig/editorconfig-vim/";
+  };
+
+  elm-vim = buildVimPluginFrom2Nix {
+    pname = "elm-vim";
+    version = "2020-09-23";
+    src = fetchFromGitHub {
+      owner = "elmcast";
+      repo = "elm-vim";
+      rev = "4b71facd77297cb33bbb3b14894676cff0a9bd1d";
+      sha256 = "1kxkjm6fzmircg5gh7w2bmvjgk8ly5vvq9l31m4p6ql48azg2ilc";
+    };
+    meta.homepage = "https://github.com/elmcast/elm-vim/";
+  };
+
+  elvish-vim = buildVimPluginFrom2Nix {
+    pname = "elvish-vim";
+    version = "2019-06-29";
+    src = fetchFromGitHub {
+      owner = "dmix";
+      repo = "elvish.vim";
+      rev = "67ef8e89bff7cb8ea936f2164c8c268bbb3295f0";
+      sha256 = "133hr3i7zxysf2gnnimhz3gf3nda3fyfxmqq7mhq544v2mki4x9m";
+    };
+    meta.homepage = "https://github.com/dmix/elvish.vim/";
+  };
+
+  embark-vim = buildVimPluginFrom2Nix {
+    pname = "embark-vim";
+    version = "2021-03-12";
+    src = fetchFromGitHub {
+      owner = "embark-theme";
+      repo = "vim";
+      rev = "fda8867d405a93938f154fb9d70e4f4a4e6ef8c8";
+      sha256 = "09kvk3wjmpvssv8j5iba2dngnfkv178gkr620pa3k1imb0m9f0bq";
+    };
+    meta.homepage = "https://github.com/embark-theme/vim/";
+  };
+
+  emmet-vim = buildVimPluginFrom2Nix {
+    pname = "emmet-vim";
+    version = "2021-03-20";
+    src = fetchFromGitHub {
+      owner = "mattn";
+      repo = "emmet-vim";
+      rev = "1f5daf6810d205844c039a4c9efa89317e62259d";
+      sha256 = "0250dp2jcxrhx333i6mk99q7ygwa8ac055id9qafdx331v9wxcil";
+      fetchSubmodules = true;
+    };
+    meta.homepage = "https://github.com/mattn/emmet-vim/";
+  };
+
+  emodeline = buildVimPluginFrom2Nix {
+    pname = "emodeline";
+    version = "2010-10-18";
+    src = fetchFromGitHub {
+      owner = "vim-scripts";
+      repo = "emodeline";
+      rev = "19550795743876c2256021530209d83592f5924a";
+      sha256 = "0x9y7rzbk6g8cq6jkn37wi95wzhq0abban6w10652v4kdmjrxrr0";
+    };
+    meta.homepage = "https://github.com/vim-scripts/emodeline/";
+  };
+
+  ensime-vim = buildVimPluginFrom2Nix {
+    pname = "ensime-vim";
+    version = "2018-10-10";
+    src = fetchFromGitHub {
+      owner = "ensime";
+      repo = "ensime-vim";
+      rev = "caa734e84f002b25446c615706283a74edd4ecfe";
+      sha256 = "190qq8r2zs7xzmsag7ygk6dvpav3cnzlc40lc3fvwmkfwgci5zg0";
+    };
+    meta.homepage = "https://github.com/ensime/ensime-vim/";
+  };
+
+  falcon = buildVimPluginFrom2Nix {
+    pname = "falcon";
+    version = "2021-03-22";
+    src = fetchFromGitHub {
+      owner = "fenetikm";
+      repo = "falcon";
+      rev = "f6be01e8642dc8ccc7ed1f37b23f4b0dfa2c6f8c";
+      sha256 = "1w4ld5dvy0jxgjvp6yf8qibc4x82hn490vfg0hpln67nr6mhq1iw";
+    };
+    meta.homepage = "https://github.com/fenetikm/falcon/";
+  };
+
+  far-vim = buildVimPluginFrom2Nix {
+    pname = "far-vim";
+    version = "2021-02-19";
+    src = fetchFromGitHub {
+      owner = "brooth";
+      repo = "far.vim";
+      rev = "e67b1dbe5842b709687c214fea38ca00f0ffe6c6";
+      sha256 = "1ljvl7p2k3bgl54srf6kvshqq16qwfa34ppj982fp2bzzal819l1";
+    };
+    meta.homepage = "https://github.com/brooth/far.vim/";
+  };
+
+  fastfold = buildVimPluginFrom2Nix {
+    pname = "fastfold";
+    version = "2020-03-23";
+    src = fetchFromGitHub {
+      owner = "konfekt";
+      repo = "fastfold";
+      rev = "5872cbe9d921eb3ec79dce14a1f492f44c1cbaaf";
+      sha256 = "07mls0yczg2cmia2jn0s2rvgwl07yxlm4hyvjd941p1knvn88x8q";
+    };
+    meta.homepage = "https://github.com/konfekt/fastfold/";
+  };
+
+  fennel-vim = buildVimPluginFrom2Nix {
+    pname = "fennel-vim";
+    version = "2020-11-15";
+    src = fetchFromGitHub {
+      owner = "bakpakin";
+      repo = "fennel.vim";
+      rev = "30b9beabad2c4f09b9b284caf5cd5666b6b4dc89";
+      sha256 = "1fvcn4q87d594nzxlj1597bmrixzlfqnl7k8f547skvvywx09kii";
+    };
+    meta.homepage = "https://github.com/bakpakin/fennel.vim/";
+  };
+
+  fern-vim = buildVimPluginFrom2Nix {
+    pname = "fern-vim";
+    version = "2021-03-25";
+    src = fetchFromGitHub {
+      owner = "lambdalisue";
+      repo = "fern.vim";
+      rev = "3f9f1957699346f240a9e71eee83fcb67c8fc0e5";
+      sha256 = "1wkxih5glkpvjy6ka42y0x1di2iqm1y7rc93av4gfqhhskryfv0h";
+    };
+    meta.homepage = "https://github.com/lambdalisue/fern.vim/";
+  };
+
+  ferret = buildVimPluginFrom2Nix {
+    pname = "ferret";
+    version = "2020-12-08";
+    src = fetchFromGitHub {
+      owner = "wincent";
+      repo = "ferret";
+      rev = "fbcd9de1e88391d8a1ab39adb520d6a5ac29792f";
+      sha256 = "068v0gj7vn3halj0mcjfnziklqcssyln61ip5zalnw7x6vm3yblk";
+    };
+    meta.homepage = "https://github.com/wincent/ferret/";
+  };
+
+  file-line = buildVimPluginFrom2Nix {
+    pname = "file-line";
+    version = "2016-10-21";
+    src = fetchFromGitHub {
+      owner = "bogado";
+      repo = "file-line";
+      rev = "559088afaf10124ea663ee0f4f73b1de48fb1632";
+      sha256 = "1w183g0hj8jvzm6m1jw7m6xz3x1dld8n8342vnycsh6hyzdcg3mg";
+    };
+    meta.homepage = "https://github.com/bogado/file-line/";
+  };
+
+  flake8-vim = buildVimPluginFrom2Nix {
+    pname = "flake8-vim";
+    version = "2020-10-20";
+    src = fetchFromGitHub {
+      owner = "andviro";
+      repo = "flake8-vim";
+      rev = "5bc93f7f26ceb18ccbe116830eaf8ff2baa63994";
+      sha256 = "142pgasl0b64a0zxmspdsi636axrgvdx6rh3hwjrb1zlsck19y1a";
+      fetchSubmodules = true;
+    };
+    meta.homepage = "https://github.com/andviro/flake8-vim/";
+  };
+
+  float-preview-nvim = buildVimPluginFrom2Nix {
+    pname = "float-preview-nvim";
+    version = "2020-11-03";
+    src = fetchFromGitHub {
+      owner = "ncm2";
+      repo = "float-preview.nvim";
+      rev = "f9ed1c701d5ea41222509fc822cbdc5613b14b2d";
+      sha256 = "0r1pj80mnsr269d7mnxfagdp988gn3gnf5fix55z4qwim9cakrl8";
+    };
+    meta.homepage = "https://github.com/ncm2/float-preview.nvim/";
+  };
+
+  floobits-neovim = buildVimPluginFrom2Nix {
+    pname = "floobits-neovim";
+    version = "2018-08-01";
+    src = fetchFromGitHub {
+      owner = "floobits";
+      repo = "floobits-neovim";
+      rev = "29ab2ed4bd5c879df0bd6df313a776155eb98ad8";
+      sha256 = "0bnncn3waw9birpd51j27hrzlriz8dk4naxdajmbwznwcnbkkgwx";
+    };
+    meta.homepage = "https://github.com/floobits/floobits-neovim/";
+  };
+
+  forms = buildVimPluginFrom2Nix {
+    pname = "forms";
+    version = "2012-11-28";
+    src = fetchFromGitHub {
+      owner = "megaannum";
+      repo = "forms";
+      rev = "b601e03fe0a3b8a43766231f4a6217e4492b4f75";
+      sha256 = "19kp1i5c6jmnpbsap9giayqbzlv7vh02mp4mjvicqj9n0nfyay74";
+    };
+    meta.homepage = "https://github.com/megaannum/forms/";
+  };
+
+  fruzzy = buildVimPluginFrom2Nix {
+    pname = "fruzzy";
+    version = "2020-08-31";
+    src = fetchFromGitHub {
+      owner = "raghur";
+      repo = "fruzzy";
+      rev = "4cdfee7b828a5cace22bfd93cf23fee0b2b233c4";
+      sha256 = "1dmxz283ypz1klcmdf4jk699aifr3dywkh9y8v8v8vyflampqwwp";
+    };
+    meta.homepage = "https://github.com/raghur/fruzzy/";
+  };
+
+  fugitive-gitlab-vim = buildVimPluginFrom2Nix {
+    pname = "fugitive-gitlab-vim";
+    version = "2019-10-24";
+    src = fetchFromGitHub {
+      owner = "shumphrey";
+      repo = "fugitive-gitlab.vim";
+      rev = "f3e56ff60fe3fb5ebc891cbe5fd12cd8c59ae6ef";
+      sha256 = "0cx3zd7f09prxjfrj201139j00wsw66fx5crw6dhblf4z6mfpgnx";
+    };
+    meta.homepage = "https://github.com/shumphrey/fugitive-gitlab.vim/";
+  };
+
+  fzf-lsp-nvim = buildVimPluginFrom2Nix {
+    pname = "fzf-lsp-nvim";
+    version = "2021-02-04";
+    src = fetchFromGitHub {
+      owner = "gfanto";
+      repo = "fzf-lsp.nvim";
+      rev = "1386cbae761415b9c7b45565d87283fb4d584aed";
+      sha256 = "1ab4si6j6s6fimpr513mqbhc5nnlsqmazw26cl7r89lbq7jswhyv";
+    };
+    meta.homepage = "https://github.com/gfanto/fzf-lsp.nvim/";
+  };
+
+  fzf-vim = buildVimPluginFrom2Nix {
+    pname = "fzf-vim";
+    version = "2021-03-24";
+    src = fetchFromGitHub {
+      owner = "junegunn";
+      repo = "fzf.vim";
+      rev = "caf7754b2636eabdf1bc11d30daccc5de66951ef";
+      sha256 = "1743br19x41rycc1iqh2jiwaa2z80bi2zcd0lr9n17dc733ww5n2";
+    };
+    meta.homepage = "https://github.com/junegunn/fzf.vim/";
+  };
+
+  galaxyline-nvim = buildVimPluginFrom2Nix {
+    pname = "galaxyline-nvim";
+    version = "2021-04-05";
+    src = fetchFromGitHub {
+      owner = "glepnir";
+      repo = "galaxyline.nvim";
+      rev = "505bd8a2912f75b3c9cc439db3bd31ae514230cd";
+      sha256 = "0w2prdcp48z15r9j9z20y6kgasnzjhfk0d3pig560ifk0x33n4ba";
+    };
+    meta.homepage = "https://github.com/glepnir/galaxyline.nvim/";
+  };
+
+  gen_tags-vim = buildVimPluginFrom2Nix {
+    pname = "gen_tags-vim";
+    version = "2020-10-12";
+    src = fetchFromGitHub {
+      owner = "jsfaint";
+      repo = "gen_tags.vim";
+      rev = "f888a2f8732e08d9f2b638b144c5c826a30953a3";
+      sha256 = "16gkczlaani0c0v3hkklriabhkgcs0mg9mrbn8jzfsap15cnkgk5";
+    };
+    meta.homepage = "https://github.com/jsfaint/gen_tags.vim/";
+  };
+
+  gentoo-syntax = buildVimPluginFrom2Nix {
+    pname = "gentoo-syntax";
+    version = "2021-02-07";
+    src = fetchFromGitHub {
+      owner = "gentoo";
+      repo = "gentoo-syntax";
+      rev = "762f31ff620eb822ae4ca43c5dc2a62ca621f5fe";
+      sha256 = "035nj257r2nkwriqq5l4qjn5z1a04l39k4i9s1yz0mgv902kmics";
+    };
+    meta.homepage = "https://github.com/gentoo/gentoo-syntax/";
+  };
+
+  ghcid = buildVimPluginFrom2Nix {
+    pname = "ghcid";
+    version = "2021-02-14";
+    src = fetchFromGitHub {
+      owner = "ndmitchell";
+      repo = "ghcid";
+      rev = "abbb157ac9d06fdfba537f97ab96e197b3bb36cb";
+      sha256 = "008alqgqbrjh9sqgazqq1kk5hnpikd8afnia5lx9rv8c2am1d2fv";
+    };
+    meta.homepage = "https://github.com/ndmitchell/ghcid/";
+  };
+
+  ghcmod-vim = buildVimPluginFrom2Nix {
+    pname = "ghcmod-vim";
+    version = "2016-06-19";
+    src = fetchFromGitHub {
+      owner = "eagletmt";
+      repo = "ghcmod-vim";
+      rev = "1d192d13d68ab59f9f46497a0909bf24a7b7dfff";
+      sha256 = "0bzahgzagnf0a9zv86jhdf8nc3p0yfz9izv5n3lc8gc12cp47d0a";
+    };
+    meta.homepage = "https://github.com/eagletmt/ghcmod-vim/";
+  };
+
+  git-blame-nvim = buildVimPluginFrom2Nix {
+    pname = "git-blame-nvim";
+    version = "2021-03-18";
+    src = fetchFromGitHub {
+      owner = "f-person";
+      repo = "git-blame.nvim";
+      rev = "c6515f6de67f50448a0f865b39c3c459b40856f5";
+      sha256 = "1cm6x58qm5jzgncrpwixcvs7cfdv02gf13zz1v4gxicxlllrh70f";
+    };
+    meta.homepage = "https://github.com/f-person/git-blame.nvim/";
+  };
+
+  git-messenger-vim = buildVimPluginFrom2Nix {
+    pname = "git-messenger-vim";
+    version = "2021-03-21";
+    src = fetchFromGitHub {
+      owner = "rhysd";
+      repo = "git-messenger.vim";
+      rev = "6fe62ce47491953487dac540964a4cfb037be7f3";
+      sha256 = "0g8gaprkrqs69rplmbf6nc03km6qcapipyc13rghb7fyksad51nr";
+    };
+    meta.homepage = "https://github.com/rhysd/git-messenger.vim/";
+  };
+
+  gitignore-vim = buildVimPluginFrom2Nix {
+    pname = "gitignore-vim";
+    version = "2014-03-16";
+    src = fetchFromGitHub {
+      owner = "vim-scripts";
+      repo = "gitignore.vim";
+      rev = "3ad6a15768945fd4fc1b013cec5d8c8e62c7bb87";
+      sha256 = "0fg36hrkwqb3accqm7ihw1cjs64fxf73zk06gickdkzq0zn4yl8x";
+    };
+    meta.homepage = "https://github.com/vim-scripts/gitignore.vim/";
+  };
+
+  gitsigns-nvim = buildVimPluginFrom2Nix {
+    pname = "gitsigns-nvim";
+    version = "2021-04-06";
+    src = fetchFromGitHub {
+      owner = "lewis6991";
+      repo = "gitsigns.nvim";
+      rev = "f66a368efa3cf605673492fd7afde80117aa2103";
+      sha256 = "1lyjdnizif33g3bfrrmrxwgvavyvn260h08c49ai4il5vpgs8ap4";
+    };
+    meta.homepage = "https://github.com/lewis6991/gitsigns.nvim/";
+  };
+
+  gitv = buildVimPluginFrom2Nix {
+    pname = "gitv";
+    version = "2019-08-22";
+    src = fetchFromGitHub {
+      owner = "gregsexton";
+      repo = "gitv";
+      rev = "a73599c34202709eaa7da78f4fe32b97c6ef83f8";
+      sha256 = "0hhamv2q3z8cy4n9yzxq0jvs2x8qx4wx6c2qpsk82jsnghmzipd6";
+    };
+    meta.homepage = "https://github.com/gregsexton/gitv/";
+  };
+
+  glow-nvim = buildVimPluginFrom2Nix {
+    pname = "glow-nvim";
+    version = "2021-03-31";
+    src = fetchFromGitHub {
+      owner = "npxbr";
+      repo = "glow.nvim";
+      rev = "89b4edfcb70529d9c713687aa6fcfa76a2010ae0";
+      sha256 = "0qq6cjzirr4zicy2n259sxi2ypz7w740qaf4a4vhphh4rd6gi18w";
+    };
+    meta.homepage = "https://github.com/npxbr/glow.nvim/";
+  };
+
+  golden-ratio = buildVimPluginFrom2Nix {
+    pname = "golden-ratio";
+    version = "2020-04-03";
+    src = fetchFromGitHub {
+      owner = "roman";
+      repo = "golden-ratio";
+      rev = "8313b6d6723c9e77ef1d3760af2cdd244e8db043";
+      sha256 = "03nm1wr0qsrirg4z4171f4nygnqgb6w06ldr6rbbz4a1f7j8j654";
+    };
+    meta.homepage = "https://github.com/roman/golden-ratio/";
+  };
+
+  gotests-vim = buildVimPluginFrom2Nix {
+    pname = "gotests-vim";
+    version = "2019-04-10";
+    src = fetchFromGitHub {
+      owner = "buoto";
+      repo = "gotests-vim";
+      rev = "e0ad687be26875153ecd43d16db3b93a637394e4";
+      sha256 = "01w981v7rya9fnxwdhlka4vfzlnw87pxmfcqmvxh3p96lmi71xjm";
+    };
+    meta.homepage = "https://github.com/buoto/gotests-vim/";
+  };
+
+  goyo-vim = buildVimPluginFrom2Nix {
+    pname = "goyo-vim";
+    version = "2020-08-29";
+    src = fetchFromGitHub {
+      owner = "junegunn";
+      repo = "goyo.vim";
+      rev = "a865dec7ca7616dbbd69315ad1417b84d0c411f8";
+      sha256 = "09mqmcz79dwcc5mv0p2wc84jc20ipa0vv2yckp4la4xh909ph4hm";
+    };
+    meta.homepage = "https://github.com/junegunn/goyo.vim/";
+  };
+
+  gruvbox = buildVimPluginFrom2Nix {
+    pname = "gruvbox";
+    version = "2020-07-03";
+    src = fetchFromGitHub {
+      owner = "morhetz";
+      repo = "gruvbox";
+      rev = "bf2885a95efdad7bd5e4794dd0213917770d79b7";
+      sha256 = "0576sqzljal3k8rsnbmcvlsk4ywg1vfgkxkvrv2zac2d5wwa9i8z";
+    };
+    meta.homepage = "https://github.com/morhetz/gruvbox/";
+  };
+
+  gruvbox-community = buildVimPluginFrom2Nix {
+    pname = "gruvbox-community";
+    version = "2021-03-17";
+    src = fetchFromGitHub {
+      owner = "gruvbox-community";
+      repo = "gruvbox";
+      rev = "8a36e8dae3e31fa5edfb5ae91fb1c2d36b05979e";
+      sha256 = "0yq8bvpqlnj57pl2j4jwwpihpwmq0lym1q5sigvkp0yghlwliqxx";
+    };
+    meta.homepage = "https://github.com/gruvbox-community/gruvbox/";
+  };
+
+  gundo-vim = buildVimPluginFrom2Nix {
+    pname = "gundo-vim";
+    version = "2021-02-21";
+    src = fetchFromGitHub {
+      owner = "sjl";
+      repo = "gundo.vim";
+      rev = "c5efef192b975b8e7d5fa3c6db932648d3b76323";
+      sha256 = "1smavxh0nmx4la75b1fjh8cs2x8p8ahxls034254vnm05wiwvghh";
+    };
+    meta.homepage = "https://github.com/sjl/gundo.vim/";
+  };
+
+  gv-vim = buildVimPluginFrom2Nix {
+    pname = "gv-vim";
+    version = "2020-10-16";
+    src = fetchFromGitHub {
+      owner = "junegunn";
+      repo = "gv.vim";
+      rev = "486b5c4e960d5ec9e79888939534b7b2fc7453ad";
+      sha256 = "07pj94s5kf8qgwdz73xbb7b2h3w6gkv4sw9faicdb6hla3i19d9b";
+    };
+    meta.homepage = "https://github.com/junegunn/gv.vim/";
+  };
+
+  haskell-vim = buildVimPluginFrom2Nix {
+    pname = "haskell-vim";
+    version = "2021-01-19";
+    src = fetchFromGitHub {
+      owner = "neovimhaskell";
+      repo = "haskell-vim";
+      rev = "f35d02204b4813d1dbe8b0e98cc39701a4b8e15e";
+      sha256 = "1q3hf0vr5gpmymmvm208sl0r8nb69m7f3bdrkqrp7fwc2v1ylnz0";
+    };
+    meta.homepage = "https://github.com/neovimhaskell/haskell-vim/";
+  };
+
+  hasksyn = buildVimPluginFrom2Nix {
+    pname = "hasksyn";
+    version = "2014-09-04";
+    src = fetchFromGitHub {
+      owner = "travitch";
+      repo = "hasksyn";
+      rev = "c434040bf13a17ca20a551223021b3ace7e453b9";
+      sha256 = "09998lnfcshqis5m062wlag6y476imq9jday9gp4ayjjl1cp3cwx";
+    };
+    meta.homepage = "https://github.com/travitch/hasksyn/";
+  };
+
+  hlint-refactor-vim = buildVimPluginFrom2Nix {
+    pname = "hlint-refactor-vim";
+    version = "2015-12-05";
+    src = fetchFromGitHub {
+      owner = "mpickering";
+      repo = "hlint-refactor-vim";
+      rev = "fffb044ecef854a82c5c2efda252e09044ba03e0";
+      sha256 = "0z8d31arfy9aidg1dwj5msnnx799d9r7njkgh51z695w6ayxn6p8";
+    };
+    meta.homepage = "https://github.com/mpickering/hlint-refactor-vim/";
+  };
+
+  hoon-vim = buildVimPluginFrom2Nix {
+    pname = "hoon-vim";
+    version = "2020-11-09";
+    src = fetchFromGitHub {
+      owner = "urbit";
+      repo = "hoon.vim";
+      rev = "91b1922f8627bb0a55341bb088f2526d0f43a6ac";
+      sha256 = "0h87r7r74iljwvfc6mb1maa08cxwnk6k89gc6vnwqm1zx6qxw1js";
+    };
+    meta.homepage = "https://github.com/urbit/hoon.vim/";
+  };
+
+  hop-nvim = buildVimPluginFrom2Nix {
+    pname = "hop-nvim";
+    version = "2021-04-05";
+    src = fetchFromGitHub {
+      owner = "phaazon";
+      repo = "hop.nvim";
+      rev = "414b9aae83d7b13559ed5031995363fa6c4841f3";
+      sha256 = "05cajsdfys608mb5379aj70w4f7pp7x3x3f5c2aryij5fg0mnx5j";
+    };
+    meta.homepage = "https://github.com/phaazon/hop.nvim/";
+  };
+
+  i3config-vim = buildVimPluginFrom2Nix {
+    pname = "i3config-vim";
+    version = "2020-03-28";
+    src = fetchFromGitHub {
+      owner = "mboughaba";
+      repo = "i3config.vim";
+      rev = "c3fe1a901392ee11721e08d2a0d2886a7f8b8e83";
+      sha256 = "1cygyn7p0x2smqsjxly5xbsdnrjnq5kj1a0a8qg356j0l112j7z2";
+    };
+    meta.homepage = "https://github.com/mboughaba/i3config.vim/";
+  };
+
+  iceberg-vim = buildVimPluginFrom2Nix {
+    pname = "iceberg-vim";
+    version = "2020-12-25";
+    src = fetchFromGitHub {
+      owner = "cocopon";
+      repo = "iceberg.vim";
+      rev = "866f9f4ac9ff9a0ae33de96253c359c68ab556b4";
+      sha256 = "1zlj85xg8r8qbnr7dpszkcjqw70xahay7ydwnik0zwhq96mic1pv";
+    };
+    meta.homepage = "https://github.com/cocopon/iceberg.vim/";
+  };
+
+  idris-vim = buildVimPluginFrom2Nix {
+    pname = "idris-vim";
+    version = "2017-12-04";
+    src = fetchFromGitHub {
+      owner = "idris-hackers";
+      repo = "idris-vim";
+      rev = "091ed6b267749927777423160eeab520109dd9c1";
+      sha256 = "1zibar2vxcmai0k37ricwnimfdv1adxfbbvz871rc4l6h3q85if1";
+    };
+    meta.homepage = "https://github.com/idris-hackers/idris-vim/";
+  };
+
+  idris2-vim = buildVimPluginFrom2Nix {
+    pname = "idris2-vim";
+    version = "2020-11-26";
+    src = fetchFromGitHub {
+      owner = "edwinb";
+      repo = "idris2-vim";
+      rev = "964cebee493c85f75796e4f4e6bbb4ac54e2da9e";
+      sha256 = "1hgil24c7zv7m1glzzm3an60pimd3l9dbma26xdxly7bv210ssmz";
+    };
+    meta.homepage = "https://github.com/edwinb/idris2-vim/";
+  };
+
+  Improved-AnsiEsc = buildVimPluginFrom2Nix {
+    pname = "Improved-AnsiEsc";
+    version = "2015-08-26";
+    src = fetchFromGitHub {
+      owner = "vim-scripts";
+      repo = "Improved-AnsiEsc";
+      rev = "e1c59a8e9203fab6b9150721f30548916da73351";
+      sha256 = "1smjs4kz2kmzprzp9az4957675nakb43146hshbby39j5xz4jsbz";
+    };
+    meta.homepage = "https://github.com/vim-scripts/Improved-AnsiEsc/";
+  };
+
+  increment-activator = buildVimPluginFrom2Nix {
+    pname = "increment-activator";
+    version = "2020-03-09";
+    src = fetchFromGitHub {
+      owner = "nishigori";
+      repo = "increment-activator";
+      rev = "bff5516da9103fb093ffc0dc993b8d535eacbceb";
+      sha256 = "1swlv1mrck9s3n7fdg10c2nmlasf2fx8yfk01x3vii7l4aaa9w2y";
+    };
+    meta.homepage = "https://github.com/nishigori/increment-activator/";
+  };
+
+  incsearch-easymotion-vim = buildVimPluginFrom2Nix {
+    pname = "incsearch-easymotion-vim";
+    version = "2016-01-18";
+    src = fetchFromGitHub {
+      owner = "haya14busa";
+      repo = "incsearch-easymotion.vim";
+      rev = "fcdd3aee6f4c0eef1a515727199ece8d6c6041b5";
+      sha256 = "1bscr3xs1zggm9qzk1mb88fkc8qj6yrnkxmqwwyr75sf1xzy74mk";
+    };
+    meta.homepage = "https://github.com/haya14busa/incsearch-easymotion.vim/";
+  };
+
+  incsearch-vim = buildVimPluginFrom2Nix {
+    pname = "incsearch-vim";
+    version = "2017-11-24";
+    src = fetchFromGitHub {
+      owner = "haya14busa";
+      repo = "incsearch.vim";
+      rev = "25e2547fb0566460f5999024f7a0de7b3775201f";
+      sha256 = "05v0d9b5sm4d1bvhb01jk6s7brlli2xc16hvzr6gik1nm1ks6ai1";
+    };
+    meta.homepage = "https://github.com/haya14busa/incsearch.vim/";
+  };
+
+  indent-blankline-nvim = buildVimPluginFrom2Nix {
+    pname = "indent-blankline-nvim";
+    version = "2021-03-06";
+    src = fetchFromGitHub {
+      owner = "lukas-reineke";
+      repo = "indent-blankline.nvim";
+      rev = "47691a67b690ad6ebd9df67574691822d226a5b6";
+      sha256 = "0lkw6mslkd0gax0s280icpa5saq3320kkkmjih04mmnnf1vnwq6a";
+    };
+    meta.homepage = "https://github.com/lukas-reineke/indent-blankline.nvim/";
+  };
+
+  indentLine = buildVimPluginFrom2Nix {
+    pname = "indentLine";
+    version = "2021-01-28";
+    src = fetchFromGitHub {
+      owner = "Yggdroot";
+      repo = "indentLine";
+      rev = "5617a1cf7d315e6e6f84d825c85e3b669d220bfa";
+      sha256 = "1ns3v4r5m6ckchmkaqkpk8dymh7hwj22d7x23hagmk4zv4hc2mhq";
+    };
+    meta.homepage = "https://github.com/Yggdroot/indentLine/";
+  };
+
+  intero-neovim = buildVimPluginFrom2Nix {
+    pname = "intero-neovim";
+    version = "2019-11-15";
+    src = fetchFromGitHub {
+      owner = "parsonsmatt";
+      repo = "intero-neovim";
+      rev = "4ce2d154379f8c95b3819512a9b67ead5204ffd0";
+      sha256 = "1na61qb31z80973jfi7ziw2zv6y73rm0bpfb6iqxjppmg4iqgl3i";
+    };
+    meta.homepage = "https://github.com/parsonsmatt/intero-neovim/";
+  };
+
+  investigate-vim = buildVimPluginFrom2Nix {
+    pname = "investigate-vim";
+    version = "2020-02-29";
+    src = fetchFromGitHub {
+      owner = "keith";
+      repo = "investigate.vim";
+      rev = "aef9332ba3cfc070fb59fd7a4ac82bae2b42cd7b";
+      sha256 = "1jiipch8jr66h1cywwj0zdlx45p70d359s8ljdwcndjwicrqslmk";
+    };
+    meta.homepage = "https://github.com/keith/investigate.vim/";
+  };
+
+  iosvkem = buildVimPluginFrom2Nix {
+    pname = "iosvkem";
+    version = "2021-03-26";
+    src = fetchFromGitHub {
+      owner = "neutaaaaan";
+      repo = "iosvkem";
+      rev = "ba116cae99eaa116f781f4bfef0a20a80bc19e98";
+      sha256 = "1as5xfcc6bgm2sp23qzxjpasbnx9jsdgzc97hhmybhq4115kfmxv";
+    };
+    meta.homepage = "https://github.com/neutaaaaan/iosvkem/";
+  };
+
+  ir_black = buildVimPluginFrom2Nix {
+    pname = "ir_black";
+    version = "2012-03-05";
+    src = fetchFromGitHub {
+      owner = "twerth";
+      repo = "ir_black";
+      rev = "4e45f1cbcc9c04cf32c8681c6b3b4534a33610ed";
+      sha256 = "13g9nqlqsjsxnrq37y33ldh41dw9q9dw07spfi7qwrskiwa0ayk7";
+    };
+    meta.homepage = "https://github.com/twerth/ir_black/";
+  };
+
+  is-vim = buildVimPluginFrom2Nix {
+    pname = "is-vim";
+    version = "2020-10-27";
+    src = fetchFromGitHub {
+      owner = "haya14busa";
+      repo = "is.vim";
+      rev = "d393cb346dcdf733fecd7bbfc45b70b8c05e9eb4";
+      sha256 = "03rvhvqx59c6lp9xh6zry3ynppngqn53swl3v9gmc3ynh3l1jdzq";
+    };
+    meta.homepage = "https://github.com/haya14busa/is.vim/";
+  };
+
+  jdaddy-vim = buildVimPluginFrom2Nix {
+    pname = "jdaddy-vim";
+    version = "2014-02-22";
+    src = fetchFromGitHub {
+      owner = "vim-scripts";
+      repo = "jdaddy.vim";
+      rev = "3e44c2e6d22e2d6fc94863379b5b4f5424537321";
+      sha256 = "1ch12bffrs3gqqzdj9vh0i2azhc5d06i5vwds4rqcx797lqh7pzb";
+    };
+    meta.homepage = "https://github.com/vim-scripts/jdaddy.vim/";
+  };
+
+  jedi-vim = buildVimPluginFrom2Nix {
+    pname = "jedi-vim";
+    version = "2021-03-17";
+    src = fetchFromGitHub {
+      owner = "davidhalter";
+      repo = "jedi-vim";
+      rev = "8763462331600951f2d9e729c4d8e26b6049c804";
+      sha256 = "0rfrqsgpy501k0cy01br2rrlrsxls73yrhfhnsiafdi3dw6x9anj";
+      fetchSubmodules = true;
+    };
+    meta.homepage = "https://github.com/davidhalter/jedi-vim/";
+  };
+
+  jellybeans-nvim = buildVimPluginFrom2Nix {
+    pname = "jellybeans-nvim";
+    version = "2021-04-05";
+    src = fetchFromGitHub {
+      owner = "metalelf0";
+      repo = "jellybeans-nvim";
+      rev = "736aa1024741871aa5902ae5a7d5fb21192b4fa1";
+      sha256 = "13k3hf2y979xk3j4q4pwwhrxv0mw320ri4nyg3q39j3fprkryxs7";
+    };
+    meta.homepage = "https://github.com/metalelf0/jellybeans-nvim/";
+  };
+
+  jellybeans-vim = buildVimPluginFrom2Nix {
+    pname = "jellybeans-vim";
+    version = "2019-06-22";
+    src = fetchFromGitHub {
+      owner = "nanotech";
+      repo = "jellybeans.vim";
+      rev = "ef83bf4dc8b3eacffc97bf5c96ab2581b415c9fa";
+      sha256 = "1zy3gjz5bna3l5a7k2ddqa0w7x8wbndy2vc9gmqfdsxdbhrgpvaz";
+    };
+    meta.homepage = "https://github.com/nanotech/jellybeans.vim/";
+  };
+
+  Jenkinsfile-vim-syntax = buildVimPluginFrom2Nix {
+    pname = "Jenkinsfile-vim-syntax";
+    version = "2021-01-26";
+    src = fetchFromGitHub {
+      owner = "martinda";
+      repo = "Jenkinsfile-vim-syntax";
+      rev = "0d05729168ea44d60862f17cffa80024ab30bcc9";
+      sha256 = "05z30frs4f5z0l4qgxk08r7mb19bzhqs36hi213yin78cz62b9gy";
+    };
+    meta.homepage = "https://github.com/martinda/Jenkinsfile-vim-syntax/";
+  };
+
+  jq-vim = buildVimPluginFrom2Nix {
+    pname = "jq-vim";
+    version = "2019-05-21";
+    src = fetchFromGitHub {
+      owner = "vito-c";
+      repo = "jq.vim";
+      rev = "6e056fa297ce58d45500b0937b8214400e9a50fa";
+      sha256 = "0dfsym34xiza9221bdsr51jykcxmz8bnkzi846bqxxjxiw0p3yk1";
+    };
+    meta.homepage = "https://github.com/vito-c/jq.vim/";
+  };
+
+  julia-vim = buildVimPluginFrom2Nix {
+    pname = "julia-vim";
+    version = "2021-04-06";
+    src = fetchFromGitHub {
+      owner = "JuliaEditorSupport";
+      repo = "julia-vim";
+      rev = "21ab5e899db6ad963b30102e14fb13be8eeb454c";
+      sha256 = "1m3jgj47pq21ra3znccpgkln42h03799fc845zrrsv186fhqmrjr";
+    };
+    meta.homepage = "https://github.com/JuliaEditorSupport/julia-vim/";
+  };
+
+  kotlin-vim = buildVimPluginFrom2Nix {
+    pname = "kotlin-vim";
+    version = "2021-03-11";
+    src = fetchFromGitHub {
+      owner = "udalov";
+      repo = "kotlin-vim";
+      rev = "4e94ec5d3c821daaeac40c4d243cb55d07924fd2";
+      sha256 = "1vj3pcxn1byggbfqv2k5m09cwpbsphivdbzpw8qs111hda0cv61s";
+    };
+    meta.homepage = "https://github.com/udalov/kotlin-vim/";
+  };
+
+  lalrpop-vim = buildVimPluginFrom2Nix {
+    pname = "lalrpop-vim";
+    version = "2017-11-22";
+    src = fetchFromGitHub {
+      owner = "qnighy";
+      repo = "lalrpop.vim";
+      rev = "7073eec8efdeff37cacd4bca378c28dad02c3c14";
+      sha256 = "1xx6hlgrdbnk3d6rsn4jzbaqwankvnnmj4iilakaazddfaa0l6rr";
+    };
+    meta.homepage = "https://github.com/qnighy/lalrpop.vim/";
+  };
+
+  LanguageClient-neovim = buildVimPluginFrom2Nix {
+    pname = "LanguageClient-neovim";
+    version = "2018-08-07";
+    src = fetchFromGitHub {
+      owner = "autozimu";
+      repo = "LanguageClient-neovim";
+      rev = "dd45e31449511152f2127fe862d955237caa130f";
+      sha256 = "1i1c98r9fg1mzyl15b3grk6v7s7frwadh86rr1ggz7aq1gwfy7dq";
+    };
+    meta.homepage = "https://github.com/autozimu/LanguageClient-neovim/";
+  };
+
+  LanguageTool-nvim = buildVimPluginFrom2Nix {
+    pname = "LanguageTool-nvim";
+    version = "2020-10-19";
+    src = fetchFromGitHub {
+      owner = "vigoux";
+      repo = "LanguageTool.nvim";
+      rev = "809e7d77fec834597f495fec737c59292a10025b";
+      sha256 = "1g12dz85xq8qd92dgna0a3w6zgxa74njlvmvly4k20610r63bzrn";
+    };
+    meta.homepage = "https://github.com/vigoux/LanguageTool.nvim/";
+  };
+
+  last256 = buildVimPluginFrom2Nix {
+    pname = "last256";
+    version = "2020-12-09";
+    src = fetchFromGitHub {
+      owner = "sk1418";
+      repo = "last256";
+      rev = "2a00be266db371846e8d666c993d3076c8986438";
+      sha256 = "07z01jqzyfqalahdp0kswyvc3mb8dldc3qv5wpbdm79hh6zyd3f1";
+    };
+    meta.homepage = "https://github.com/sk1418/last256/";
+  };
+
+  latex-box = buildVimPluginFrom2Nix {
+    pname = "latex-box";
+    version = "2015-06-01";
+    src = fetchFromGitHub {
+      owner = "latex-box-team";
+      repo = "latex-box";
+      rev = "3c2901e12cb78bfb2be58ba4c62a488612550fe1";
+      sha256 = "1z4mdy47cpwcdhvy8mr72vhlybxn1y59yd3ixf6ids1bzpkrd7zl";
+    };
+    meta.homepage = "https://github.com/latex-box-team/latex-box/";
+  };
+
+  lean-vim = buildVimPluginFrom2Nix {
+    pname = "lean-vim";
+    version = "2021-01-02";
+    src = fetchFromGitHub {
+      owner = "leanprover";
+      repo = "lean.vim";
+      rev = "313fd1e09e7a14352f87d44c82005b6e6316c9bc";
+      sha256 = "0f6jq0hliy4jignjc1d30bsvfkb4xl4nzj900hphbc7l2aw7scqr";
+    };
+    meta.homepage = "https://github.com/leanprover/lean.vim/";
+  };
+
+  lens-vim = buildVimPluginFrom2Nix {
+    pname = "lens-vim";
+    version = "2020-04-24";
+    src = fetchFromGitHub {
+      owner = "camspiers";
+      repo = "lens.vim";
+      rev = "868b195be3cc3000d1d3f875ee0a52a11972e5b9";
+      sha256 = "0qpx84k52pz29rx6q0zh3qq4g3a1gyvyfcipx3kaw4lxlld6agd5";
+    };
+    meta.homepage = "https://github.com/camspiers/lens.vim/";
+  };
+
+  lessspace-vim = buildVimPluginFrom2Nix {
+    pname = "lessspace-vim";
+    version = "2019-09-12";
+    src = fetchFromGitHub {
+      owner = "thirtythreeforty";
+      repo = "lessspace.vim";
+      rev = "dc05cf6c3b67e3f8c87da2e565c5524872526316";
+      sha256 = "154x6i2ncmcbc3snkzdcggq5m5zvlbjyry5lvr6n4qcvf65z5z44";
+    };
+    meta.homepage = "https://github.com/thirtythreeforty/lessspace.vim/";
+  };
+
+  lexima-vim = buildVimPluginFrom2Nix {
+    pname = "lexima-vim";
+    version = "2020-07-31";
+    src = fetchFromGitHub {
+      owner = "cohama";
+      repo = "lexima.vim";
+      rev = "89bf4dc13539131a29cf938074b3f1ce9d000bfd";
+      sha256 = "19b73r3v4i64kiijihzqlbj6bf6jd1w90qc7d3lg95iwlaczd8v0";
+    };
+    meta.homepage = "https://github.com/cohama/lexima.vim/";
+  };
+
+  lf-vim = buildVimPluginFrom2Nix {
+    pname = "lf-vim";
+    version = "2021-02-18";
+    src = fetchFromGitHub {
+      owner = "ptzz";
+      repo = "lf.vim";
+      rev = "73fb502c6d1470243b1f4d8afa81e289d9edd94b";
+      sha256 = "1whrzpavv46r64l3b7vax4sj23kjdfjiwmhfpssb6bprhc9c4j97";
+    };
+    meta.homepage = "https://github.com/ptzz/lf.vim/";
+  };
+
+  lh-brackets = buildVimPluginFrom2Nix {
+    pname = "lh-brackets";
+    version = "2021-03-09";
+    src = fetchFromGitHub {
+      owner = "LucHermitte";
+      repo = "lh-brackets";
+      rev = "73efae0e97b8c661bf36d3637c3ba1ee02b4fe07";
+      sha256 = "122jhh3vkapxz42sa6l9sdxcdl4fzq4xfrjmaak815nvf3bg249a";
+    };
+    meta.homepage = "https://github.com/LucHermitte/lh-brackets/";
+  };
+
+  lh-vim-lib = buildVimPluginFrom2Nix {
+    pname = "lh-vim-lib";
+    version = "2021-03-20";
+    src = fetchFromGitHub {
+      owner = "LucHermitte";
+      repo = "lh-vim-lib";
+      rev = "4b59e0470c4b9b359a4f6229c420686d6d8ea65f";
+      sha256 = "0fbzkmargimal2xyjsyrc6kmw6gdl61hcf17arqp9wv3yn18k637";
+    };
+    meta.homepage = "https://github.com/LucHermitte/lh-vim-lib/";
+  };
+
+  lightline-ale = buildVimPluginFrom2Nix {
+    pname = "lightline-ale";
+    version = "2021-01-19";
+    src = fetchFromGitHub {
+      owner = "maximbaz";
+      repo = "lightline-ale";
+      rev = "932ea5b9287b8ddfd7b7f0218bb28de52d013140";
+      sha256 = "1b3xbhd32jk43z8baj1djls294whbq2qls01l90k4ihsq97jplb9";
+    };
+    meta.homepage = "https://github.com/maximbaz/lightline-ale/";
+  };
+
+  lightline-bufferline = buildVimPluginFrom2Nix {
+    pname = "lightline-bufferline";
+    version = "2021-03-10";
+    src = fetchFromGitHub {
+      owner = "mengelbrecht";
+      repo = "lightline-bufferline";
+      rev = "f1feb5b3b9d1b13ccedae475e9346392e17895a4";
+      sha256 = "1wki7q6w6ld1lx792f62s8k72ikcdl6il3ybsxxlajmnj5mixvkg";
+    };
+    meta.homepage = "https://github.com/mengelbrecht/lightline-bufferline/";
+  };
+
+  lightline-vim = buildVimPluginFrom2Nix {
+    pname = "lightline-vim";
+    version = "2021-03-21";
+    src = fetchFromGitHub {
+      owner = "itchyny";
+      repo = "lightline.vim";
+      rev = "8a712365f9708044667589d9fffd87a4825d29f6";
+      sha256 = "1622qd5lizfv65m5iy3r0bl3zy8phh4anyx93kj631p836s8y6cq";
+    };
+    meta.homepage = "https://github.com/itchyny/lightline.vim/";
+  };
+
+  limelight-vim = buildVimPluginFrom2Nix {
+    pname = "limelight-vim";
+    version = "2020-10-13";
+    src = fetchFromGitHub {
+      owner = "junegunn";
+      repo = "limelight.vim";
+      rev = "4412a84d7fbfd01281bf23d801e95c45c1eacc09";
+      sha256 = "1qab2pd1pyfrw0llxd5j11imzqxa3lnnfhr1w2fjn3yanbsxvlvd";
+    };
+    meta.homepage = "https://github.com/junegunn/limelight.vim/";
+  };
+
+  lispdocs-nvim = buildVimPluginFrom2Nix {
+    pname = "lispdocs-nvim";
+    version = "2021-03-19";
+    src = fetchFromGitHub {
+      owner = "tami5";
+      repo = "lispdocs.nvim";
+      rev = "ff82d3668497e4520e195748d295cbe9513086b7";
+      sha256 = "03698f1lydnql9xi0a1iggpqv3001yn390z9j1hvpwmra3k7lnpg";
+    };
+    meta.homepage = "https://github.com/tami5/lispdocs.nvim/";
+  };
+
+  lsp-status-nvim = buildVimPluginFrom2Nix {
+    pname = "lsp-status-nvim";
+    version = "2021-04-03";
+    src = fetchFromGitHub {
+      owner = "nvim-lua";
+      repo = "lsp-status.nvim";
+      rev = "60a3ad9dc2f43e0e512c242411541846a86eb7de";
+      sha256 = "08x8k06i6gl802fsp4sgvdcml35n4hnljwwxsgfyzwlcwx9llxlw";
+    };
+    meta.homepage = "https://github.com/nvim-lua/lsp-status.nvim/";
+  };
+
+  lsp_extensions-nvim = buildVimPluginFrom2Nix {
+    pname = "lsp_extensions-nvim";
+    version = "2021-02-17";
+    src = fetchFromGitHub {
+      owner = "nvim-lua";
+      repo = "lsp_extensions.nvim";
+      rev = "ce5d03822fda9ddbdeb2461e5b4c06c1641fe7ea";
+      sha256 = "1gybxaxgbq1s1ijvrl9h9nq443cyrdnhgi1yjqxzrr64wz7nr8v0";
+    };
+    meta.homepage = "https://github.com/nvim-lua/lsp_extensions.nvim/";
+  };
+
+  lspkind-nvim = buildVimPluginFrom2Nix {
+    pname = "lspkind-nvim";
+    version = "2021-02-06";
+    src = fetchFromGitHub {
+      owner = "onsails";
+      repo = "lspkind-nvim";
+      rev = "953ca895203c095e13f97a8ece790bf546c82d1c";
+      sha256 = "15rfzcmfwig7x8pbgc1maimqkqwqr4dbpf7498a0s16vng673bgk";
+    };
+    meta.homepage = "https://github.com/onsails/lspkind-nvim/";
+  };
+
+  lspsaga-nvim = buildVimPluginFrom2Nix {
+    pname = "lspsaga-nvim";
+    version = "2021-03-28";
+    src = fetchFromGitHub {
+      owner = "glepnir";
+      repo = "lspsaga.nvim";
+      rev = "27c7a4796869e155ecec48eb3f8e66694c1708e2";
+      sha256 = "1kdj6b7ph4111spwr55d6a0jjyrr18fbxyl3yi2nb5h75vm2hisj";
+    };
+    meta.homepage = "https://github.com/glepnir/lspsaga.nvim/";
+  };
+
+  lualine-nvim = buildVimPluginFrom2Nix {
+    pname = "lualine-nvim";
+    version = "2021-03-31";
+    src = fetchFromGitHub {
+      owner = "hoob3rt";
+      repo = "lualine.nvim";
+      rev = "7f1d7ba3fbd098d2afd0ee445e5889aca0ffe968";
+      sha256 = "0qbv46byksmbnw068q57v5w4ss3bayxm433kidxdabs80msikhhz";
+    };
+    meta.homepage = "https://github.com/hoob3rt/lualine.nvim/";
+  };
+
+  lushtags = buildVimPluginFrom2Nix {
+    pname = "lushtags";
+    version = "2017-04-19";
+    src = fetchFromGitHub {
+      owner = "mkasa";
+      repo = "lushtags";
+      rev = "fd7fa5a0162d9aa159559880d5ba4731e180eeaf";
+      sha256 = "03saw1w5pybj6yywzi8hinciv18znimm7k0h34k4pqp5gi1jfaql";
+    };
+    meta.homepage = "https://github.com/mkasa/lushtags/";
+  };
+
+  matchit-zip = buildVimPluginFrom2Nix {
+    pname = "matchit-zip";
+    version = "2010-10-18";
+    src = fetchFromGitHub {
+      owner = "vim-scripts";
+      repo = "matchit.zip";
+      rev = "ced6c409c9beeb0b4142d21906606bd194411d1d";
+      sha256 = "1s9c4lnsmbfm97bp22jrmcp5lga5ihx23lzqqncvv7rcizkvr3dm";
+    };
+    meta.homepage = "https://github.com/vim-scripts/matchit.zip/";
+  };
+
+  MatchTagAlways = buildVimPluginFrom2Nix {
+    pname = "MatchTagAlways";
+    version = "2017-05-20";
+    src = fetchFromGitHub {
+      owner = "Valloric";
+      repo = "MatchTagAlways";
+      rev = "352eb479a4ad1608e0880b79ab2357aac2cf4bed";
+      sha256 = "0y8gq4cs0wm2ijagc2frpmm664z355iridxyl5893576v5aqp8z1";
+    };
+    meta.homepage = "https://github.com/Valloric/MatchTagAlways/";
+  };
+
+  mattn-calendar-vim = buildVimPluginFrom2Nix {
+    pname = "mattn-calendar-vim";
+    version = "2020-12-29";
+    src = fetchFromGitHub {
+      owner = "mattn";
+      repo = "calendar-vim";
+      rev = "9a32891101990dd88b86befb50c46575ef8a364e";
+      sha256 = "0i6nxap9fx8z9dx6q33pc9hz8s8vc2ghz5zchyxxmdn2mb5fki53";
+    };
+    meta.homepage = "https://github.com/mattn/calendar-vim/";
+  };
+
+  mayansmoke = buildVimPluginFrom2Nix {
+    pname = "mayansmoke";
+    version = "2010-10-18";
+    src = fetchFromGitHub {
+      owner = "vim-scripts";
+      repo = "mayansmoke";
+      rev = "168883af7aec05f139af251f47eadd5dfb802c9d";
+      sha256 = "1xxcky7i6sx7f1q8xka4gd2xg78w6sqjvqrdwgrdzv93fhf82rpd";
+    };
+    meta.homepage = "https://github.com/vim-scripts/mayansmoke/";
+  };
+
+  minimap-vim = buildVimPluginFrom2Nix {
+    pname = "minimap-vim";
+    version = "2021-03-30";
+    src = fetchFromGitHub {
+      owner = "wfxr";
+      repo = "minimap.vim";
+      rev = "a7af085a6f549875f7721caa7cd3071fba800597";
+      sha256 = "0chzim7i3mq156n8zyay4prvyj306z6lqxdljzrz7j4mmkarcxl1";
+    };
+    meta.homepage = "https://github.com/wfxr/minimap.vim/";
+  };
+
+  mkdx = buildVimPluginFrom2Nix {
+    pname = "mkdx";
+    version = "2021-01-28";
+    src = fetchFromGitHub {
+      owner = "SidOfc";
+      repo = "mkdx";
+      rev = "602a78430aee47881f8c57f73ba96fdded9a3ace";
+      sha256 = "1j4icyp3p20rlb8apyp7ixwxv59q2pdzjg7krh1mc6spr6m779jv";
+    };
+    meta.homepage = "https://github.com/SidOfc/mkdx/";
+  };
+
+  molokai = buildVimPluginFrom2Nix {
+    pname = "molokai";
+    version = "2015-11-11";
+    src = fetchFromGitHub {
+      owner = "tomasr";
+      repo = "molokai";
+      rev = "c67bdfcdb31415aa0ade7f8c003261700a885476";
+      sha256 = "1piszjr5kyw43ac1f0jh9z88g824xknshrkchbys9qxlz7pd831s";
+    };
+    meta.homepage = "https://github.com/tomasr/molokai/";
+  };
+
+  ncm2 = buildVimPluginFrom2Nix {
+    pname = "ncm2";
+    version = "2020-12-19";
+    src = fetchFromGitHub {
+      owner = "ncm2";
+      repo = "ncm2";
+      rev = "3de17695c58f309642c5148b21d47fac61937a96";
+      sha256 = "1415yjxydyamsyx6fmb5wawgcgqqr96cv6vy60f5h5x4dsaqvs24";
+    };
+    meta.homepage = "https://github.com/ncm2/ncm2/";
+  };
+
+  ncm2-bufword = buildVimPluginFrom2Nix {
+    pname = "ncm2-bufword";
+    version = "2019-01-19";
+    src = fetchFromGitHub {
+      owner = "ncm2";
+      repo = "ncm2-bufword";
+      rev = "1d42750114e47a31286268880affcd66c6ae48d5";
+      sha256 = "14q76n5c70wvi48wm1alyckba71rp5300i35091ga197nkgphyaz";
+    };
+    meta.homepage = "https://github.com/ncm2/ncm2-bufword/";
+  };
+
+  ncm2-cssomni = buildVimPluginFrom2Nix {
+    pname = "ncm2-cssomni";
+    version = "2018-07-09";
+    src = fetchFromGitHub {
+      owner = "ncm2";
+      repo = "ncm2-cssomni";
+      rev = "adaf78b921ee4320fd9d7adaa5bff7f3794f373a";
+      sha256 = "0z79n1fivw60whx2fy6239lq8c2xnbzzadijplj51gy34jk4hki0";
+    };
+    meta.homepage = "https://github.com/ncm2/ncm2-cssomni/";
+  };
+
+  ncm2-dictionary = buildVimPluginFrom2Nix {
+    pname = "ncm2-dictionary";
+    version = "2018-11-15";
+    src = fetchFromGitHub {
+      owner = "yuki-yano";
+      repo = "ncm2-dictionary";
+      rev = "c93b52ab0cd1a9ebe5711414c3134f4bba9be6af";
+      sha256 = "096l8prqm7zb2s27j2cpnydggszicaji7xjlmhrav7dzc51avafy";
+    };
+    meta.homepage = "https://github.com/yuki-yano/ncm2-dictionary/";
+  };
+
+  ncm2-github = buildVimPluginFrom2Nix {
+    pname = "ncm2-github";
+    version = "2018-08-01";
+    src = fetchFromGitHub {
+      owner = "ncm2";
+      repo = "ncm2-github";
+      rev = "2d7ed04a8fe5b8c27cfef5781a944d9865eed61f";
+      sha256 = "1dcxknbjm2mxrw1l2i56xrjyxlp0vr6gr5l62x5hcd5wfkzi74a1";
+    };
+    meta.homepage = "https://github.com/ncm2/ncm2-github/";
+  };
+
+  ncm2-html-subscope = buildVimPluginFrom2Nix {
+    pname = "ncm2-html-subscope";
+    version = "2018-07-01";
+    src = fetchFromGitHub {
+      owner = "ncm2";
+      repo = "ncm2-html-subscope";
+      rev = "8294cf1bb55fb805454a9230aeb91dbb0f733a14";
+      sha256 = "19h1jjqv6jwv5fnxxa6gv0qiyc3rbnxf0zibqxzdclmskrdgjacq";
+    };
+    meta.homepage = "https://github.com/ncm2/ncm2-html-subscope/";
+  };
+
+  ncm2-jedi = buildVimPluginFrom2Nix {
+    pname = "ncm2-jedi";
+    version = "2021-01-05";
+    src = fetchFromGitHub {
+      owner = "ncm2";
+      repo = "ncm2-jedi";
+      rev = "f2e9007783b1f543b00d336a94210b4bc76b67e0";
+      sha256 = "1vrrz5zp39xk7c35dz737gfbr8j3yhqmmwmdwrxl5nibjwph4c30";
+    };
+    meta.homepage = "https://github.com/ncm2/ncm2-jedi/";
+  };
+
+  ncm2-markdown-subscope = buildVimPluginFrom2Nix {
+    pname = "ncm2-markdown-subscope";
+    version = "2020-03-09";
+    src = fetchFromGitHub {
+      owner = "ncm2";
+      repo = "ncm2-markdown-subscope";
+      rev = "beeef1e88df29d2718f0fb73cdd4702eaf449f13";
+      sha256 = "0hh5bs76k5jsjzdp5lm53gma517s8ijrdp0acjjvsagz7r7gymq7";
+    };
+    meta.homepage = "https://github.com/ncm2/ncm2-markdown-subscope/";
+  };
+
+  ncm2-neoinclude = buildVimPluginFrom2Nix {
+    pname = "ncm2-neoinclude";
+    version = "2020-07-19";
+    src = fetchFromGitHub {
+      owner = "ncm2";
+      repo = "ncm2-neoinclude";
+      rev = "081f48c735c5f51849ec14e6a266b5400bf94b62";
+      sha256 = "0xsvj8ng9blhwl8fxscm3iflppvf7p7kpl3hxh0z14xhdy3nynyi";
+    };
+    meta.homepage = "https://github.com/ncm2/ncm2-neoinclude/";
+  };
+
+  ncm2-neosnippet = buildVimPluginFrom2Nix {
+    pname = "ncm2-neosnippet";
+    version = "2019-01-26";
+    src = fetchFromGitHub {
+      owner = "ncm2";
+      repo = "ncm2-neosnippet";
+      rev = "650552528a2297179b8bb3afc1d9bb44ea97911b";
+      sha256 = "14ammx1qa72m6mafd64mc9qw3sgnmjqgq5vvcylqzqwy26wwla1b";
+    };
+    meta.homepage = "https://github.com/ncm2/ncm2-neosnippet/";
+  };
+
+  ncm2-path = buildVimPluginFrom2Nix {
+    pname = "ncm2-path";
+    version = "2019-02-20";
+    src = fetchFromGitHub {
+      owner = "ncm2";
+      repo = "ncm2-path";
+      rev = "84b1e6b5f28ced2245ff08e6694101f029fdfca8";
+      sha256 = "0yqga8d423k2j6iknkyx1qs1shddpshi4sx78992sa15dax9d394";
+    };
+    meta.homepage = "https://github.com/ncm2/ncm2-path/";
+  };
+
+  ncm2-syntax = buildVimPluginFrom2Nix {
+    pname = "ncm2-syntax";
+    version = "2020-07-19";
+    src = fetchFromGitHub {
+      owner = "ncm2";
+      repo = "ncm2-syntax";
+      rev = "d41d60b22175822c14f497378a05398e3eca2517";
+      sha256 = "065sflxr6sp491ifvcf7bzvpn5c47qc0mr091v2p2k73lp9jx2s2";
+    };
+    meta.homepage = "https://github.com/ncm2/ncm2-syntax/";
+  };
+
+  ncm2-tagprefix = buildVimPluginFrom2Nix {
+    pname = "ncm2-tagprefix";
+    version = "2018-11-08";
+    src = fetchFromGitHub {
+      owner = "ncm2";
+      repo = "ncm2-tagprefix";
+      rev = "6bff80cbd3edb02a0c91a26820606d0dcbfeb3bd";
+      sha256 = "0a3dgvs3jflhh5015jw7iahlblvnlq7vllh9avwh9pggd7zwc42k";
+    };
+    meta.homepage = "https://github.com/ncm2/ncm2-tagprefix/";
+  };
+
+  ncm2-tmux = buildVimPluginFrom2Nix {
+    pname = "ncm2-tmux";
+    version = "2019-01-11";
+    src = fetchFromGitHub {
+      owner = "ncm2";
+      repo = "ncm2-tmux";
+      rev = "17fa16ac1211af3d8e671f1591939d6f37bdd3bd";
+      sha256 = "1g99vbrdz06i36gpa95crwixj61my7c9miy7mbpfbiy4zykf2wl2";
+    };
+    meta.homepage = "https://github.com/ncm2/ncm2-tmux/";
+  };
+
+  ncm2-ultisnips = buildVimPluginFrom2Nix {
+    pname = "ncm2-ultisnips";
+    version = "2019-01-26";
+    src = fetchFromGitHub {
+      owner = "ncm2";
+      repo = "ncm2-ultisnips";
+      rev = "a7462f3b7036dce045a472d8ec9d8fb9fb090212";
+      sha256 = "0f3qp33s5nh9nha9cgxggcmh7c1a5yrwvyyrszlh0x8nrzm1v1ma";
+    };
+    meta.homepage = "https://github.com/ncm2/ncm2-ultisnips/";
+  };
+
+  ncm2-vim = buildVimPluginFrom2Nix {
+    pname = "ncm2-vim";
+    version = "2020-07-19";
+    src = fetchFromGitHub {
+      owner = "ncm2";
+      repo = "ncm2-vim";
+      rev = "876ad5f30d1e296a4ab425a0e22a8162876ac48b";
+      sha256 = "19b2xl5cvy3pk14r3k02149whdrcgisnqv2rzm5bic4w23532ad2";
+    };
+    meta.homepage = "https://github.com/ncm2/ncm2-vim/";
+  };
+
+  neco-ghc = buildVimPluginFrom2Nix {
+    pname = "neco-ghc";
+    version = "2021-02-22";
+    src = fetchFromGitHub {
+      owner = "eagletmt";
+      repo = "neco-ghc";
+      rev = "699897c2f4ba82c4fd2be6b93c9a2e8e548efe4e";
+      sha256 = "03g2mky83a5zd54wzjhc1cv4pwkzcadskjm1c7b36k85yw35v88a";
+    };
+    meta.homepage = "https://github.com/eagletmt/neco-ghc/";
+  };
+
+  neco-look = buildVimPluginFrom2Nix {
+    pname = "neco-look";
+    version = "2019-11-19";
+    src = fetchFromGitHub {
+      owner = "ujihisa";
+      repo = "neco-look";
+      rev = "4d7f1fd7e406c302fba2a1358017c5a76d0f9fc1";
+      sha256 = "1brvzg15ni5j60wncpvxhs5k36wz83lhvfcnvja2l9yrngcgh6vr";
+    };
+    meta.homepage = "https://github.com/ujihisa/neco-look/";
+  };
+
+  neco-syntax = buildVimPluginFrom2Nix {
+    pname = "neco-syntax";
+    version = "2020-09-13";
+    src = fetchFromGitHub {
+      owner = "Shougo";
+      repo = "neco-syntax";
+      rev = "f8d7b748b022aac8ce73458574da5616f1c5fb65";
+      sha256 = "12h8qm6l40a2dgbimn579bdyar0dq88hk7mdd0vhyj15c1305kda";
+    };
+    meta.homepage = "https://github.com/Shougo/neco-syntax/";
+  };
+
+  neco-vim = buildVimPluginFrom2Nix {
+    pname = "neco-vim";
+    version = "2020-11-10";
+    src = fetchFromGitHub {
+      owner = "Shougo";
+      repo = "neco-vim";
+      rev = "2b1dca6ca16d6f5655748fcd4d54d772fcfd0d81";
+      sha256 = "1prnclm9i7m09v1ip0sgkgddxwclas3x48zc8c800vxmmvjhzd7j";
+    };
+    meta.homepage = "https://github.com/Shougo/neco-vim/";
+  };
+
+  neocomplete-vim = buildVimPluginFrom2Nix {
+    pname = "neocomplete-vim";
+    version = "2021-02-18";
+    src = fetchFromGitHub {
+      owner = "Shougo";
+      repo = "neocomplete.vim";
+      rev = "fc2d22c23962290cc0b32f50bf18add6a4573bdf";
+      sha256 = "04sxri3anr5d8zdqw11fn8nqf86wxin4lza78dp2x52kgrjawpla";
+    };
+    meta.homepage = "https://github.com/Shougo/neocomplete.vim/";
+  };
+
+  neodark-vim = buildVimPluginFrom2Nix {
+    pname = "neodark-vim";
+    version = "2019-12-04";
+    src = fetchFromGitHub {
+      owner = "KeitaNakamura";
+      repo = "neodark.vim";
+      rev = "44919aa0bebfa60e93e653fdd2a81d1c75c2e721";
+      sha256 = "1wz9ygfdg59jwi19l9njcxknf77azlx5nkf5q0ghk6zyv1mqwvc1";
+    };
+    meta.homepage = "https://github.com/KeitaNakamura/neodark.vim/";
+  };
+
+  neoformat = buildVimPluginFrom2Nix {
+    pname = "neoformat";
+    version = "2021-02-06";
+    src = fetchFromGitHub {
+      owner = "sbdchd";
+      repo = "neoformat";
+      rev = "a75d96054618c47fbafef964d4d705525e8e37b9";
+      sha256 = "0c7k1fhw1fjgby4h99r22sbzn639v76r12dl66fhdrnkvrk0709n";
+    };
+    meta.homepage = "https://github.com/sbdchd/neoformat/";
+  };
+
+  neogit = buildVimPluginFrom2Nix {
+    pname = "neogit";
+    version = "2021-04-06";
+    src = fetchFromGitHub {
+      owner = "TimUntersberger";
+      repo = "neogit";
+      rev = "ac8d7e1942a947eb335d77c3e611a526a4e24d4e";
+      sha256 = "1jnyybcj9g26wrwq6i7yq7bpncywfqm957dy4lq0s531yv6m3yly";
+    };
+    meta.homepage = "https://github.com/TimUntersberger/neogit/";
+  };
+
+  neoinclude-vim = buildVimPluginFrom2Nix {
+    pname = "neoinclude-vim";
+    version = "2020-09-13";
+    src = fetchFromGitHub {
+      owner = "Shougo";
+      repo = "neoinclude.vim";
+      rev = "954cfc9dfdb303f2c2fa867b9cf949dd74512628";
+      sha256 = "0slp6mz8ds5raqhbi9gpr1ilgw745lfzjygyd58r6jcg2givsiik";
+    };
+    meta.homepage = "https://github.com/Shougo/neoinclude.vim/";
+  };
+
+  neomake = buildVimPluginFrom2Nix {
+    pname = "neomake";
+    version = "2020-12-20";
+    src = fetchFromGitHub {
+      owner = "neomake";
+      repo = "neomake";
+      rev = "5e140db568eb2f7b88e4110cd4b651562e8878ab";
+      sha256 = "0gvlpv7mfqrac10ccndl58axib42ack92m2simn78ksdap9g7n6n";
+    };
+    meta.homepage = "https://github.com/neomake/neomake/";
+  };
+
+  neomru-vim = buildVimPluginFrom2Nix {
+    pname = "neomru-vim";
+    version = "2020-02-05";
+    src = fetchFromGitHub {
+      owner = "Shougo";
+      repo = "neomru.vim";
+      rev = "d9b92f73f7d9158e803d72f2baeb7da9ea30040e";
+      sha256 = "04fic8s4g19kgml1pb5fd6yzhsscq8yrpwbmg8sb0lqjas2qpakv";
+    };
+    meta.homepage = "https://github.com/Shougo/neomru.vim/";
+  };
+
+  neosnippet-snippets = buildVimPluginFrom2Nix {
+    pname = "neosnippet-snippets";
+    version = "2021-04-05";
+    src = fetchFromGitHub {
+      owner = "Shougo";
+      repo = "neosnippet-snippets";
+      rev = "3ae169d555afb0dd8a3be4b0bb20c38efda62e68";
+      sha256 = "1kjlhlnjf69hnl7aw11d211psi18qyb4l6k49xr868h7nrc2bns2";
+    };
+    meta.homepage = "https://github.com/Shougo/neosnippet-snippets/";
+  };
+
+  neosnippet-vim = buildVimPluginFrom2Nix {
+    pname = "neosnippet-vim";
+    version = "2020-09-10";
+    src = fetchFromGitHub {
+      owner = "Shougo";
+      repo = "neosnippet.vim";
+      rev = "30b6b53b7a86b84371714b4a0f092d5d303c4a35";
+      sha256 = "0q06a0wq2aqgkjc5jndccffibr85hf33w2igcah3x6dl203p4ips";
+    };
+    meta.homepage = "https://github.com/Shougo/neosnippet.vim/";
+  };
+
+  NeoSolarized = buildVimPluginFrom2Nix {
+    pname = "NeoSolarized";
+    version = "2020-08-07";
+    src = fetchFromGitHub {
+      owner = "overcache";
+      repo = "NeoSolarized";
+      rev = "b94b1a9ad51e2de015266f10fdc6e142f97bd617";
+      sha256 = "019nz56yirpg1ahg8adfafrxznalw056qwm3xjm9kzg6da8j6v48";
+    };
+    meta.homepage = "https://github.com/overcache/NeoSolarized/";
+  };
+
+  neoterm = buildVimPluginFrom2Nix {
+    pname = "neoterm";
+    version = "2020-12-01";
+    src = fetchFromGitHub {
+      owner = "kassio";
+      repo = "neoterm";
+      rev = "1283da9f078669593f3828e4345b68b59ee9740f";
+      sha256 = "1262bxgh6mcrm1w6w47hsngsaj2fn4dw8jwp433clxvzsf2myk38";
+    };
+    meta.homepage = "https://github.com/kassio/neoterm/";
+  };
+
+  neovim-fuzzy = buildVimPluginFrom2Nix {
+    pname = "neovim-fuzzy";
+    version = "2020-09-16";
+    src = fetchFromGitHub {
+      owner = "cloudhead";
+      repo = "neovim-fuzzy";
+      rev = "78f4d79f703aff49c9bcee5d527234c2f64425d5";
+      sha256 = "1dq79jabyyyphgigqac9jf7hhadfh336fm8hklh1d64xlzyrfp6s";
+    };
+    meta.homepage = "https://github.com/cloudhead/neovim-fuzzy/";
+  };
+
+  neovim-sensible = buildVimPluginFrom2Nix {
+    pname = "neovim-sensible";
+    version = "2017-09-20";
+    src = fetchFromGitHub {
+      owner = "jeffkreeftmeijer";
+      repo = "neovim-sensible";
+      rev = "e7ab7544f15e59de2d9a1b42f58e590938e496e7";
+      sha256 = "06whnfvmzfdsx9gvkd2nxhx29939gjzibr2xadh54sj8ns646w58";
+    };
+    meta.homepage = "https://github.com/jeffkreeftmeijer/neovim-sensible/";
+  };
+
+  neoyank-vim = buildVimPluginFrom2Nix {
+    pname = "neoyank-vim";
+    version = "2020-12-20";
+    src = fetchFromGitHub {
+      owner = "Shougo";
+      repo = "neoyank.vim";
+      rev = "8b3c9f7d8109744766d13eaf6c17eb195dd61d9d";
+      sha256 = "0fmn92kjgwkfpsh328bvd3nsw32q6wbjjp9vqmfnbs8rbkmpn0vh";
+    };
+    meta.homepage = "https://github.com/Shougo/neoyank.vim/";
+  };
+
+  nerdcommenter = buildVimPluginFrom2Nix {
+    pname = "nerdcommenter";
+    version = "2021-04-06";
+    src = fetchFromGitHub {
+      owner = "preservim";
+      repo = "nerdcommenter";
+      rev = "6d0ab7dec9306fada667ea71edbb3da2b06a40ad";
+      sha256 = "0w5vaz7f8r61rizlgn3x9p3yzxw2aca1a76gb0zpalc2n51bdf9s";
+    };
+    meta.homepage = "https://github.com/preservim/nerdcommenter/";
+  };
+
+  nerdtree = buildVimPluginFrom2Nix {
+    pname = "nerdtree";
+    version = "2021-03-25";
+    src = fetchFromGitHub {
+      owner = "preservim";
+      repo = "nerdtree";
+      rev = "81f3eaba295b3fceb2d032db57e5eae99ae480f8";
+      sha256 = "0zws0b20n8ak2s3hffsb0rrwdjh8sx3sgrilmmmvr0d2ivsfqwlb";
+    };
+    meta.homepage = "https://github.com/preservim/nerdtree/";
+  };
+
+  nerdtree-git-plugin = buildVimPluginFrom2Nix {
+    pname = "nerdtree-git-plugin";
+    version = "2021-04-02";
+    src = fetchFromGitHub {
+      owner = "Xuyuanp";
+      repo = "nerdtree-git-plugin";
+      rev = "73da0283ead8fa2bbce83d219fcab3ba1e8cf0dd";
+      sha256 = "17n79pmpnjnp6nirz4m4wwgfacrg26bdzjn4xj8i6ldkff5n20km";
+    };
+    meta.homepage = "https://github.com/Xuyuanp/nerdtree-git-plugin/";
+  };
+
+  neuron-vim = buildVimPluginFrom2Nix {
+    pname = "neuron-vim";
+    version = "2020-12-06";
+    src = fetchFromGitHub {
+      owner = "fiatjaf";
+      repo = "neuron.vim";
+      rev = "0b820b2191bf239c38e62ffa63501333590d6810";
+      sha256 = "0x00y0a46jwqq9gx741m3j7p78ps7nycp5hl3bjxqmwj289gc12y";
+    };
+    meta.homepage = "https://github.com/fiatjaf/neuron.vim/";
+  };
+
+  nginx-vim = buildVimPluginFrom2Nix {
+    pname = "nginx-vim";
+    version = "2021-02-25";
+    src = fetchFromGitHub {
+      owner = "chr4";
+      repo = "nginx.vim";
+      rev = "7b8e3ef48d8e60fe64bb1a85be52e66dd412c84d";
+      sha256 = "00n3kx4gczryx968n0l7hqdxg6i4vfi3n3m4bdl5d3rwpbwdy6zy";
+    };
+    meta.homepage = "https://github.com/chr4/nginx.vim/";
+  };
+
+  nim-vim = buildVimPluginFrom2Nix {
+    pname = "nim-vim";
+    version = "2020-10-16";
+    src = fetchFromGitHub {
+      owner = "zah";
+      repo = "nim.vim";
+      rev = "7a8737a4532239c06116ebde0329d8156f3d3b55";
+      sha256 = "05xhac416c8zsgqlchc80f7gbjxbyngi6cxziqagdhr6kccc73gi";
+    };
+    meta.homepage = "https://github.com/zah/nim.vim/";
+  };
+
+  nlua-nvim = buildVimPluginFrom2Nix {
+    pname = "nlua-nvim";
+    version = "2021-01-05";
+    src = fetchFromGitHub {
+      owner = "tjdevries";
+      repo = "nlua.nvim";
+      rev = "c0e8fbcaf8bcf5571a9e1d780a72094aad3f3094";
+      sha256 = "0q5aw3n4dsszk5iw7qg01xx1rbrr18jh1wqs6k9dd1kcr6yq22rq";
+    };
+    meta.homepage = "https://github.com/tjdevries/nlua.nvim/";
+  };
+
+  nnn-vim = buildVimPluginFrom2Nix {
+    pname = "nnn-vim";
+    version = "2021-03-22";
+    src = fetchFromGitHub {
+      owner = "mcchrish";
+      repo = "nnn.vim";
+      rev = "6408b859f9fac3880d82109d25874fb6656026d9";
+      sha256 = "0r5s89882hj54qyi5rcwmf8g54jkjmap5c2rd2mhfjs3j4dfny72";
+    };
+    meta.homepage = "https://github.com/mcchrish/nnn.vim/";
+  };
+
+  nord-vim = buildVimPluginFrom2Nix {
+    pname = "nord-vim";
+    version = "2020-07-06";
+    src = fetchFromGitHub {
+      owner = "arcticicestudio";
+      repo = "nord-vim";
+      rev = "57dffa746907e8ce5c4b520146ed0d89d3c29a51";
+      sha256 = "0xpz71rj74514789v6x9wrg95n8bsag8f5ygd7js40qrwpxq6b4j";
+    };
+    meta.homepage = "https://github.com/arcticicestudio/nord-vim/";
+  };
+
+  NrrwRgn = buildVimPluginFrom2Nix {
+    pname = "NrrwRgn";
+    version = "2020-05-29";
+    src = fetchFromGitHub {
+      owner = "chrisbra";
+      repo = "NrrwRgn";
+      rev = "82a0fc6a3415db9a891f9d9f19b512041c865109";
+      sha256 = "00fd466i5860bazd4pj69k8piicgckxj68lkn2l7haawj9chslzs";
+    };
+    meta.homepage = "https://github.com/chrisbra/NrrwRgn/";
+  };
+
+  nvcode-color-schemes-vim = buildVimPluginFrom2Nix {
+    pname = "nvcode-color-schemes-vim";
+    version = "2021-04-05";
+    src = fetchFromGitHub {
+      owner = "ChristianChiarulli";
+      repo = "nvcode-color-schemes.vim";
+      rev = "29d4a787ad847c267ba836c82e71bfc0a8346c47";
+      sha256 = "0id5abls81yy9n8zvailrqljq5gd70x2wg3vbajrman8phpy7m9z";
+    };
+    meta.homepage = "https://github.com/ChristianChiarulli/nvcode-color-schemes.vim/";
+  };
+
+  nvim-ale-diagnostic = buildVimPluginFrom2Nix {
+    pname = "nvim-ale-diagnostic";
+    version = "2021-03-03";
+    src = fetchFromGitHub {
+      owner = "nathunsmitty";
+      repo = "nvim-ale-diagnostic";
+      rev = "894a6790637fdda0df1a2ee1de3f58cd8c276e10";
+      sha256 = "07jfmhac8s27awx9pknxlaqz9x3sbmjx7n90pr4np389b43zgrmp";
+    };
+    meta.homepage = "https://github.com/nathunsmitty/nvim-ale-diagnostic/";
+  };
+
+  nvim-autopairs = buildVimPluginFrom2Nix {
+    pname = "nvim-autopairs";
+    version = "2021-03-24";
+    src = fetchFromGitHub {
+      owner = "windwp";
+      repo = "nvim-autopairs";
+      rev = "b8272f539017ffb6de6a05247e7c333b3721279b";
+      sha256 = "11ng14pb14l0hsv27r24wwkjkw2l77kvd114pij3k5dl8b9zdgv2";
+    };
+    meta.homepage = "https://github.com/windwp/nvim-autopairs/";
+  };
+
+  nvim-bqf = buildVimPluginFrom2Nix {
+    pname = "nvim-bqf";
+    version = "2021-04-02";
+    src = fetchFromGitHub {
+      owner = "kevinhwang91";
+      repo = "nvim-bqf";
+      rev = "cf9b92326411640891360c7bdd784967a8923f43";
+      sha256 = "14jd99i35yl04jhwnccj6bx80xwpn9fl5i3bpd7b7safpd6gfk8m";
+    };
+    meta.homepage = "https://github.com/kevinhwang91/nvim-bqf/";
+  };
+
+  nvim-bufferline-lua = buildVimPluginFrom2Nix {
+    pname = "nvim-bufferline-lua";
+    version = "2021-04-02";
+    src = fetchFromGitHub {
+      owner = "akinsho";
+      repo = "nvim-bufferline.lua";
+      rev = "2043d254017002c4862afefbacd5d1bd7fe94e55";
+      sha256 = "062kg1vq3b09b009n75kijfs9hlfmlj1yfsnd517imm9n5xhvfmr";
+    };
+    meta.homepage = "https://github.com/akinsho/nvim-bufferline.lua/";
+  };
+
+  nvim-cm-racer = buildVimPluginFrom2Nix {
+    pname = "nvim-cm-racer";
+    version = "2017-07-27";
+    src = fetchFromGitHub {
+      owner = "roxma";
+      repo = "nvim-cm-racer";
+      rev = "2a8a4a49fa58c5dac9e0bed9511f6928930cacd2";
+      sha256 = "1yljxwypgn91084yyicbc2qprn31ld7s4drvnddzczyhzq5m2gpx";
+    };
+    meta.homepage = "https://github.com/roxma/nvim-cm-racer/";
+  };
+
+  nvim-colorizer-lua = buildVimPluginFrom2Nix {
+    pname = "nvim-colorizer-lua";
+    version = "2020-06-11";
+    src = fetchFromGitHub {
+      owner = "norcalli";
+      repo = "nvim-colorizer.lua";
+      rev = "36c610a9717cc9ec426a07c8e6bf3b3abcb139d6";
+      sha256 = "0gvqdfkqf6k9q46r0vcc3nqa6w45gsvp8j4kya1bvi24vhifg2p9";
+    };
+    meta.homepage = "https://github.com/norcalli/nvim-colorizer.lua/";
+  };
+
+  nvim-compe = buildVimPluginFrom2Nix {
+    pname = "nvim-compe";
+    version = "2021-04-05";
+    src = fetchFromGitHub {
+      owner = "hrsh7th";
+      repo = "nvim-compe";
+      rev = "9fc416854685a8e05836b70d477d9bbbddefcd3b";
+      sha256 = "1irasadwqdijqixbbbysd50qh1rfhfkhfljz2438hiv3ayvj4aad";
+    };
+    meta.homepage = "https://github.com/hrsh7th/nvim-compe/";
+  };
+
+  nvim-completion-manager = buildVimPluginFrom2Nix {
+    pname = "nvim-completion-manager";
+    version = "2018-07-27";
+    src = fetchFromGitHub {
+      owner = "roxma";
+      repo = "nvim-completion-manager";
+      rev = "45a026afb8b309b3b80f2c1b5910f72a54a9b563";
+      sha256 = "0znwgry4ill0nxm096hc8s9vf20rf9xcq3dz8y8h7xlqzzsycl7a";
+    };
+    meta.homepage = "https://github.com/roxma/nvim-completion-manager/";
+  };
+
+  nvim-dap = buildVimPluginFrom2Nix {
+    pname = "nvim-dap";
+    version = "2021-03-24";
+    src = fetchFromGitHub {
+      owner = "mfussenegger";
+      repo = "nvim-dap";
+      rev = "cd0afafc788f9d4d9df5fef5d348841906b295d6";
+      sha256 = "1zh35qjxmkf37khagn8722byzjq2pns20cbmc821hfqdkj6q3pc8";
+    };
+    meta.homepage = "https://github.com/mfussenegger/nvim-dap/";
+  };
+
+  nvim-dap-virtual-text = buildVimPluginFrom2Nix {
+    pname = "nvim-dap-virtual-text";
+    version = "2021-03-15";
+    src = fetchFromGitHub {
+      owner = "theHamsta";
+      repo = "nvim-dap-virtual-text";
+      rev = "b26acb69a5a4940f9eb3fd6f4bca8e1cc16fa5ce";
+      sha256 = "16dkgmcfdx1n72khlwrcykwwpcjzz2mdh7dc53vb4j0pbmqmnna2";
+    };
+    meta.homepage = "https://github.com/theHamsta/nvim-dap-virtual-text/";
+  };
+
+  nvim-gdb = buildVimPluginFrom2Nix {
+    pname = "nvim-gdb";
+    version = "2021-03-07";
+    src = fetchFromGitHub {
+      owner = "sakhnik";
+      repo = "nvim-gdb";
+      rev = "07aa4b435a832b122154a157ab6892ac4efb81fb";
+      sha256 = "05cgypswm7qdl26jd6nfqahk2bmqvp482k9zjbk0an12kbzlsrz0";
+    };
+    meta.homepage = "https://github.com/sakhnik/nvim-gdb/";
+  };
+
+  nvim-highlite = buildVimPluginFrom2Nix {
+    pname = "nvim-highlite";
+    version = "2021-04-01";
+    src = fetchFromGitHub {
+      owner = "Iron-E";
+      repo = "nvim-highlite";
+      rev = "ff28f2dde464a9e105c7dc041127eb60059d955a";
+      sha256 = "089019br0f3massc2sz3l0r8cjc33i5qqwbm4k7cz50x71g89wrq";
+    };
+    meta.homepage = "https://github.com/Iron-E/nvim-highlite/";
+  };
+
+  nvim-hlslens = buildVimPluginFrom2Nix {
+    pname = "nvim-hlslens";
+    version = "2021-03-25";
+    src = fetchFromGitHub {
+      owner = "kevinhwang91";
+      repo = "nvim-hlslens";
+      rev = "fdce47e0bd9669e2424cc2a0112ecb47ba571d13";
+      sha256 = "1dn9wr23dizhs7byrim9zd3yi22g629jc2aqfx0q1v1i2i9g107v";
+    };
+    meta.homepage = "https://github.com/kevinhwang91/nvim-hlslens/";
+  };
+
+  nvim-hs-vim = buildVimPluginFrom2Nix {
+    pname = "nvim-hs-vim";
+    version = "2020-08-29";
+    src = fetchFromGitHub {
+      owner = "neovimhaskell";
+      repo = "nvim-hs.vim";
+      rev = "30baacd3c7a10625cb2d4dd64ae3bbfc4fe3f8c6";
+      sha256 = "1w6cr6j77nwxszm1d0y4phvjsz9q4aw214xkscw6izakfmk06h1x";
+    };
+    meta.homepage = "https://github.com/neovimhaskell/nvim-hs.vim/";
+  };
+
+  nvim-jdtls = buildVimPluginFrom2Nix {
+    pname = "nvim-jdtls";
+    version = "2021-03-28";
+    src = fetchFromGitHub {
+      owner = "mfussenegger";
+      repo = "nvim-jdtls";
+      rev = "4ebad2d52b7c648a7f6ceb5e62dde49167d07796";
+      sha256 = "0cnh6x49yy6z3f3h7q0q8l90cl7dchxfdgz7c143nv5qd3qkgnmc";
+    };
+    meta.homepage = "https://github.com/mfussenegger/nvim-jdtls/";
+  };
+
+  nvim-lightbulb = buildVimPluginFrom2Nix {
+    pname = "nvim-lightbulb";
+    version = "2021-03-13";
+    src = fetchFromGitHub {
+      owner = "kosayoda";
+      repo = "nvim-lightbulb";
+      rev = "9c3b264ae2da1d984f0482d5a0dfa43f567fa064";
+      sha256 = "0yjxmnn3a7fw0fjwfqk284zshlw8v7wp8pn16d5m40rvbkk2ipzr";
+    };
+    meta.homepage = "https://github.com/kosayoda/nvim-lightbulb/";
+  };
+
+  nvim-lspconfig = buildVimPluginFrom2Nix {
+    pname = "nvim-lspconfig";
+    version = "2021-04-06";
+    src = fetchFromGitHub {
+      owner = "neovim";
+      repo = "nvim-lspconfig";
+      rev = "225859876bb8f9df7417f008ca790e0b2753eeab";
+      sha256 = "0ca67kb4706adihsyk6gdx0rf8wslw1ph82dprszpqla2gf1gqjn";
+    };
+    meta.homepage = "https://github.com/neovim/nvim-lspconfig/";
+  };
+
+  nvim-lsputils = buildVimPluginFrom2Nix {
+    pname = "nvim-lsputils";
+    version = "2021-02-05";
+    src = fetchFromGitHub {
+      owner = "RishabhRD";
+      repo = "nvim-lsputils";
+      rev = "b68862afee6dfb611d866818cafdba41cf51d749";
+      sha256 = "0w4kff5jrg6i55nqjnp52vb2jng4zql9s2r1jz75jfv2khdrw7dm";
+    };
+    meta.homepage = "https://github.com/RishabhRD/nvim-lsputils/";
+  };
+
+  nvim-nonicons = buildVimPluginFrom2Nix {
+    pname = "nvim-nonicons";
+    version = "2021-03-18";
+    src = fetchFromGitHub {
+      owner = "yamatsum";
+      repo = "nvim-nonicons";
+      rev = "f136ab905ac99c9bd20a8bc4c470eb33768c54a0";
+      sha256 = "1590gszcra3pagva6zplib35fqlgj26masjq3i6qgq85kpx5s55j";
+    };
+    meta.homepage = "https://github.com/yamatsum/nvim-nonicons/";
+  };
+
+  nvim-peekup = buildVimPluginFrom2Nix {
+    pname = "nvim-peekup";
+    version = "2021-04-04";
+    src = fetchFromGitHub {
+      owner = "gennaro-tedesco";
+      repo = "nvim-peekup";
+      rev = "2f03df68bced26399b7576818b3cded3ce334ca0";
+      sha256 = "1bap28b9jbaywll50mwjfp91i0h671762ylgy3fxhnayf78py00d";
+    };
+    meta.homepage = "https://github.com/gennaro-tedesco/nvim-peekup/";
+  };
+
+  nvim-scrollview = buildVimPluginFrom2Nix {
+    pname = "nvim-scrollview";
+    version = "2021-03-23";
+    src = fetchFromGitHub {
+      owner = "dstein64";
+      repo = "nvim-scrollview";
+      rev = "902f24503ab7a754be2a1c483de1cd3428bd85ec";
+      sha256 = "0b31lpzdx1z88fm60p7d5gs442h4apm2n9h098n4j0ghcs5ppvnf";
+    };
+    meta.homepage = "https://github.com/dstein64/nvim-scrollview/";
+  };
+
+  nvim-terminal-lua = buildVimPluginFrom2Nix {
+    pname = "nvim-terminal-lua";
+    version = "2019-10-17";
+    src = fetchFromGitHub {
+      owner = "norcalli";
+      repo = "nvim-terminal.lua";
+      rev = "095f98aaa7265628a72cd2706350c091544b5602";
+      sha256 = "09hass19v3wrqgxjcr3b59w462lp2nw533zwb1nnmiz99gx1znpx";
+    };
+    meta.homepage = "https://github.com/norcalli/nvim-terminal.lua/";
+  };
+
+  nvim-toggleterm-lua = buildVimPluginFrom2Nix {
+    pname = "nvim-toggleterm-lua";
+    version = "2021-03-23";
+    src = fetchFromGitHub {
+      owner = "akinsho";
+      repo = "nvim-toggleterm.lua";
+      rev = "84980bd3f549821fe58d1821fdc1e7c54d1ebf3a";
+      sha256 = "09dcajyfbimfzgxj57c988rqr6y6ah4p97j04gyvg1mrvlj95dg4";
+    };
+    meta.homepage = "https://github.com/akinsho/nvim-toggleterm.lua/";
+  };
+
+  nvim-tree-lua = buildVimPluginFrom2Nix {
+    pname = "nvim-tree-lua";
+    version = "2021-04-05";
+    src = fetchFromGitHub {
+      owner = "kyazdani42";
+      repo = "nvim-tree.lua";
+      rev = "3350e4e97e51be10de9aca0617b665c9259d3089";
+      sha256 = "1vp6nsyhnwhnqkpgqll4b2x4pcxc8wsc7xy0nq2i1a5qjrpbb4ss";
+    };
+    meta.homepage = "https://github.com/kyazdani42/nvim-tree.lua/";
+  };
+
+  nvim-treesitter = buildVimPluginFrom2Nix {
+    pname = "nvim-treesitter";
+    version = "2021-04-06";
+    src = fetchFromGitHub {
+      owner = "nvim-treesitter";
+      repo = "nvim-treesitter";
+      rev = "11e1db3ec29abb5711556085766cb6912814c6dc";
+      sha256 = "0fsmbf8hnhcxxp8m738lmm75wg2ijxj8z0755aj0mcs8s735pjxz";
+    };
+    meta.homepage = "https://github.com/nvim-treesitter/nvim-treesitter/";
+  };
+
+  nvim-treesitter-context = buildVimPluginFrom2Nix {
+    pname = "nvim-treesitter-context";
+    version = "2021-04-03";
+    src = fetchFromGitHub {
+      owner = "romgrk";
+      repo = "nvim-treesitter-context";
+      rev = "5bc62fd2b09f4ddaf8d300c63d79140789797020";
+      sha256 = "1p97llbki41mwicsmqdly6lns7vfn9pgd961jpc980pj0df792gq";
+    };
+    meta.homepage = "https://github.com/romgrk/nvim-treesitter-context/";
+  };
+
+  nvim-treesitter-refactor = buildVimPluginFrom2Nix {
+    pname = "nvim-treesitter-refactor";
+    version = "2021-03-17";
+    src = fetchFromGitHub {
+      owner = "nvim-treesitter";
+      repo = "nvim-treesitter-refactor";
+      rev = "edf1790d9cd365785d4f86848c079704aa7e4854";
+      sha256 = "12rp2mj7va5qf55jzca0rgy1xrwkyf7p3zd3xw262m9lqm4hjqqc";
+    };
+    meta.homepage = "https://github.com/nvim-treesitter/nvim-treesitter-refactor/";
+  };
+
+  nvim-treesitter-textobjects = buildVimPluginFrom2Nix {
+    pname = "nvim-treesitter-textobjects";
+    version = "2021-03-31";
+    src = fetchFromGitHub {
+      owner = "nvim-treesitter";
+      repo = "nvim-treesitter-textobjects";
+      rev = "111cf356fd5c6c52d2dfb9299a76d201624be3cc";
+      sha256 = "1dvfwcdj2cbgxlsw09qgsvym8cvg8jval90h4rwmkn7yzh1wyf7a";
+    };
+    meta.homepage = "https://github.com/nvim-treesitter/nvim-treesitter-textobjects/";
+  };
+
+  nvim-ts-rainbow = buildVimPluginFrom2Nix {
+    pname = "nvim-ts-rainbow";
+    version = "2021-04-05";
+    src = fetchFromGitHub {
+      owner = "p00f";
+      repo = "nvim-ts-rainbow";
+      rev = "d463320156e7e3d85a98aca1f5292422fd3b5b12";
+      sha256 = "08sc8vd0arwyw3zpbnkmdp884fksw73yqzbw5fwddr3wn47sdckc";
+    };
+    meta.homepage = "https://github.com/p00f/nvim-ts-rainbow/";
+  };
+
+  nvim-web-devicons = buildVimPluginFrom2Nix {
+    pname = "nvim-web-devicons";
+    version = "2021-04-05";
+    src = fetchFromGitHub {
+      owner = "kyazdani42";
+      repo = "nvim-web-devicons";
+      rev = "95c6d6bc3a9b969578d555b98a7be8619c65908e";
+      sha256 = "15rw8qr52gi169x9cgs68dkm1f4blgqdrdmcqb7frqn8qjzaib9s";
+    };
+    meta.homepage = "https://github.com/kyazdani42/nvim-web-devicons/";
+  };
+
+  nvim-whichkey-setup-lua = buildVimPluginFrom2Nix {
+    pname = "nvim-whichkey-setup-lua";
+    version = "2021-03-26";
+    src = fetchFromGitHub {
+      owner = "AckslD";
+      repo = "nvim-whichkey-setup.lua";
+      rev = "59aa0a4287adf6c2c9faabf912cdc005230e7c98";
+      sha256 = "093yjj28ak1ifbkn1s69wx8ldinj4v2bpf82fhqziw6d58ghwang";
+    };
+    meta.homepage = "https://github.com/AckslD/nvim-whichkey-setup.lua/";
+  };
+
+  nvim-yarp = buildVimPluginFrom2Nix {
+    pname = "nvim-yarp";
+    version = "2020-04-08";
+    src = fetchFromGitHub {
+      owner = "roxma";
+      repo = "nvim-yarp";
+      rev = "b710bf4daccb603a423754794fb446e5fbb59576";
+      sha256 = "16ma42niwsc066s991idfbwvm0dvwqwdr2zfkc3av10hyimxnzbb";
+    };
+    meta.homepage = "https://github.com/roxma/nvim-yarp/";
+  };
+
+  nvimdev-nvim = buildVimPluginFrom2Nix {
+    pname = "nvimdev-nvim";
+    version = "2019-10-09";
+    src = fetchFromGitHub {
+      owner = "neovim";
+      repo = "nvimdev.nvim";
+      rev = "994ff5daf571ad02cc96436002411b4fb235c91f";
+      sha256 = "07dx6qkxqpakl1hrqwhfjgdzcnl4j3j9qih0l20qn8p6askj3b2j";
+    };
+    meta.homepage = "https://github.com/neovim/nvimdev.nvim/";
+  };
+
+  oceanic-material = buildVimPluginFrom2Nix {
+    pname = "oceanic-material";
+    version = "2020-11-02";
+    src = fetchFromGitHub {
+      owner = "glepnir";
+      repo = "oceanic-material";
+      rev = "900f487a1e8229a12f247a0cb7a533fe258945ae";
+      sha256 = "1i6k2p11bsvjrkn9sdkql0im8ys8l9y0l6i850n9hdzvq919cfxv";
+    };
+    meta.homepage = "https://github.com/glepnir/oceanic-material/";
+  };
+
+  oceanic-next = buildVimPluginFrom2Nix {
+    pname = "oceanic-next";
+    version = "2021-02-05";
+    src = fetchFromGitHub {
+      owner = "mhartington";
+      repo = "oceanic-next";
+      rev = "5ef31a34204f84714885ae9036f66a626036c3dc";
+      sha256 = "1wazbyxaq71mlpyvyxrbrpyb9vgkcsj2y2zf1sba9gfjjszph482";
+    };
+    meta.homepage = "https://github.com/mhartington/oceanic-next/";
+  };
+
+  one-nvim = buildVimPluginFrom2Nix {
+    pname = "one-nvim";
+    version = "2021-03-20";
+    src = fetchFromGitHub {
+      owner = "Th3Whit3Wolf";
+      repo = "one-nvim";
+      rev = "b1461ea89c940bdc5ed142327e1cd85ed2c0e877";
+      sha256 = "1w5avzyrcbg60prx3239iazcjvh2mk7lk6k256a1iyxb6dnkpbas";
+    };
+    meta.homepage = "https://github.com/Th3Whit3Wolf/one-nvim/";
+  };
+
+  onedark-vim = buildVimPluginFrom2Nix {
+    pname = "onedark-vim";
+    version = "2021-02-25";
+    src = fetchFromGitHub {
+      owner = "joshdick";
+      repo = "onedark.vim";
+      rev = "b70ed293f3c3adaea23f9fcd84ef942015664756";
+      sha256 = "0wz4kmbgc9rlvbxj8s8xg1sx53w0v94r6qicq3ggs9raca51ywfg";
+    };
+    meta.homepage = "https://github.com/joshdick/onedark.vim/";
+  };
+
+  onehalf = buildVimPluginFrom2Nix {
+    pname = "onehalf";
+    version = "2021-01-31";
+    src = fetchFromGitHub {
+      owner = "sonph";
+      repo = "onehalf";
+      rev = "141c775ace6b71992305f144a8ab68e9a8ca4a25";
+      sha256 = "1p3kxf9abj0xpxwb8hrpy4h0457rvkfkv3zv7czh322vhma4hhd8";
+    };
+    meta.homepage = "https://github.com/sonph/onehalf/";
+  };
+
+  open-browser-github-vim = buildVimPluginFrom2Nix {
+    pname = "open-browser-github-vim";
+    version = "2021-03-21";
+    src = fetchFromGitHub {
+      owner = "tyru";
+      repo = "open-browser-github.vim";
+      rev = "ac7c034e300f36d591ef234dcd5eb5cd5c07c74f";
+      sha256 = "0n62h0gjakdc3bnpysny0rndhqhq7g5c97pgr42wz599wnr1pily";
+    };
+    meta.homepage = "https://github.com/tyru/open-browser-github.vim/";
+  };
+
+  open-browser-vim = buildVimPluginFrom2Nix {
+    pname = "open-browser-vim";
+    version = "2020-05-20";
+    src = fetchFromGitHub {
+      owner = "tyru";
+      repo = "open-browser.vim";
+      rev = "d6f1784685abdd86500fdb5fa2fbaf2aab833f18";
+      sha256 = "1akgsq1v9v5klm995y09zmka0hbfsa0gr44gyp2nvqi9ggfadp0k";
+    };
+    meta.homepage = "https://github.com/tyru/open-browser.vim/";
+  };
+
+  packer-nvim = buildVimPluginFrom2Nix {
+    pname = "packer-nvim";
+    version = "2021-04-06";
+    src = fetchFromGitHub {
+      owner = "wbthomason";
+      repo = "packer.nvim";
+      rev = "b495895dffca9aabfead066a860b87ab3a67cf7e";
+      sha256 = "08anlafdhmxc66yi4h13fkvqpkq1chazmyy8c18nx41af4b0p9bn";
+    };
+    meta.homepage = "https://github.com/wbthomason/packer.nvim/";
+  };
+
+  palenight-vim = buildVimPluginFrom2Nix {
+    pname = "palenight-vim";
+    version = "2020-10-20";
+    src = fetchFromGitHub {
+      owner = "drewtempelmeyer";
+      repo = "palenight.vim";
+      rev = "847fcf5b1de2a1f9c28fdcc369d009996c6bf633";
+      sha256 = "0v7jkg6rpwmyq0wl6lymm2j07r0mzab8lbsnxb0jw34hcpx0rfis";
+    };
+    meta.homepage = "https://github.com/drewtempelmeyer/palenight.vim/";
+  };
+
+  papercolor-theme = buildVimPluginFrom2Nix {
+    pname = "papercolor-theme";
+    version = "2020-12-04";
+    src = fetchFromGitHub {
+      owner = "NLKNguyen";
+      repo = "papercolor-theme";
+      rev = "845cfa94d95d404ff59e0bdc578b299279e1dc07";
+      sha256 = "1r6p9ll3bfblz9sfzg0391zjswvmi8wwcc010w8mjsayjclmpwf8";
+    };
+    meta.homepage = "https://github.com/NLKNguyen/papercolor-theme/";
+  };
+
+  pear-tree = buildVimPluginFrom2Nix {
+    pname = "pear-tree";
+    version = "2019-12-08";
+    src = fetchFromGitHub {
+      owner = "tmsvg";
+      repo = "pear-tree";
+      rev = "3bb209d9637d6bd7506040b2fcd158c9a7917db3";
+      sha256 = "0n70rzw34lsnnprqna90ssqrka33qx3z0n2kj19ps8yp3j6lsxvk";
+    };
+    meta.homepage = "https://github.com/tmsvg/pear-tree/";
+  };
+
+  peskcolor-vim = buildVimPluginFrom2Nix {
+    pname = "peskcolor-vim";
+    version = "2016-06-11";
+    src = fetchFromGitHub {
+      owner = "andsild";
+      repo = "peskcolor.vim";
+      rev = "cba4fc739bbebacd503158f6509d9c226651f363";
+      sha256 = "15hw3casr5y3ckgcn6aq8vhk6g2hym41w51nvgf34hbj9fx1nvkq";
+    };
+    meta.homepage = "https://github.com/andsild/peskcolor.vim/";
+  };
+
+  pig-vim = buildVimPluginFrom2Nix {
+    pname = "pig-vim";
+    version = "2017-06-08";
+    src = fetchFromGitHub {
+      owner = "motus";
+      repo = "pig.vim";
+      rev = "60d8a0883d3e474e61af46b581a5ce3af65e9bb5";
+      sha256 = "0az48a3slpzljb69d60cpahkshmdbss0snc8lmvf4yrc1gx8yncv";
+    };
+    meta.homepage = "https://github.com/motus/pig.vim/";
+  };
+
+  plantuml-syntax = buildVimPluginFrom2Nix {
+    pname = "plantuml-syntax";
+    version = "2020-07-03";
+    src = fetchFromGitHub {
+      owner = "aklt";
+      repo = "plantuml-syntax";
+      rev = "eb3df3092a767c844db3f3ff355da840abd0aa97";
+      sha256 = "02psvyxli5gs2cx2sha33mk98ivllb8zr1jwgv4hgi5bh6qd7wg3";
+    };
+    meta.homepage = "https://github.com/aklt/plantuml-syntax/";
+  };
+
+  playground = buildVimPluginFrom2Nix {
+    pname = "playground";
+    version = "2021-03-22";
+    src = fetchFromGitHub {
+      owner = "nvim-treesitter";
+      repo = "playground";
+      rev = "d96cef521d22afd1a409449a890f20f50b436ee1";
+      sha256 = "1j1iqzi9q8fnl02hvazl8szg84iz8dqy0n52ngh1lvl78s9qa393";
+    };
+    meta.homepage = "https://github.com/nvim-treesitter/playground/";
+  };
+
+  plenary-nvim = buildVimPluginFrom2Nix {
+    pname = "plenary-nvim";
+    version = "2021-04-06";
+    src = fetchFromGitHub {
+      owner = "nvim-lua";
+      repo = "plenary.nvim";
+      rev = "720c304dc41da563857610e737ff281c250681ac";
+      sha256 = "0gcd88v2jykdgp7mqf10n9ydpg8gfb7258mxysjaf67313idh626";
+    };
+    meta.homepage = "https://github.com/nvim-lua/plenary.nvim/";
+  };
+
+  pony-vim-syntax = buildVimPluginFrom2Nix {
+    pname = "pony-vim-syntax";
+    version = "2017-09-26";
+    src = fetchFromGitHub {
+      owner = "dleonard0";
+      repo = "pony-vim-syntax";
+      rev = "caa34b3d7a15d9bfbfbb2f5944c85eb1eddcfafc";
+      sha256 = "0r2lv99hkm95dv8wy9rkrkcwz5wkmwggfwi5vakgw497l3a9jskr";
+    };
+    meta.homepage = "https://github.com/dleonard0/pony-vim-syntax/";
+  };
+
+  popfix = buildVimPluginFrom2Nix {
+    pname = "popfix";
+    version = "2021-03-11";
+    src = fetchFromGitHub {
+      owner = "RishabhRD";
+      repo = "popfix";
+      rev = "f3571e676739208871bd38f9fa0fddf554b6a7a8";
+      sha256 = "19hvwxcqca8l6dvlaccfvqc8755bpr0z0hi7l9qiw6rm458bhchi";
+      fetchSubmodules = true;
+    };
+    meta.homepage = "https://github.com/RishabhRD/popfix/";
+  };
+
+  popup-nvim = buildVimPluginFrom2Nix {
+    pname = "popup-nvim";
+    version = "2021-03-10";
+    src = fetchFromGitHub {
+      owner = "nvim-lua";
+      repo = "popup.nvim";
+      rev = "bc98ca6df9179452c368f0d7bac821a8fd4c01ac";
+      sha256 = "0j1gkaba6z5vb922j47i7sq0d1zwkr5581w0nxd8c31klghg3kyn";
+    };
+    meta.homepage = "https://github.com/nvim-lua/popup.nvim/";
+  };
+
+  PreserveNoEOL = buildVimPluginFrom2Nix {
+    pname = "PreserveNoEOL";
+    version = "2013-06-14";
+    src = fetchFromGitHub {
+      owner = "vim-scripts";
+      repo = "PreserveNoEOL";
+      rev = "940e3ce90e54d8680bec1135a21dcfbd6c9bfb62";
+      sha256 = "1726jpr2zf6jrb00pp082ikbx4mll3a877pnzs6i18f9fgpaqqgd";
+    };
+    meta.homepage = "https://github.com/vim-scripts/PreserveNoEOL/";
+  };
+
+  prev_indent = buildVimPluginFrom2Nix {
+    pname = "prev_indent";
+    version = "2014-03-08";
+    src = fetchFromGitHub {
+      owner = "vim-scripts";
+      repo = "prev_indent";
+      rev = "79e9b1b9a6895bfd15463c45595ca599987a4b23";
+      sha256 = "03xqdwfkc7a84742ldsggi7ix99c7dhpmg6j13gkasyfk487ryh6";
+    };
+    meta.homepage = "https://github.com/vim-scripts/prev_indent/";
+  };
+
+  psc-ide-vim = buildVimPluginFrom2Nix {
+    pname = "psc-ide-vim";
+    version = "2019-09-17";
+    src = fetchFromGitHub {
+      owner = "frigoeu";
+      repo = "psc-ide-vim";
+      rev = "5fb4e329e5c0c7d80f0356ab4028eee9c8bd3465";
+      sha256 = "0gzbxsq6wh8d9z9vyrff4hdpc66yg9y8hnxq4kjrz9qrccc75c1f";
+    };
+    meta.homepage = "https://github.com/frigoeu/psc-ide-vim/";
+  };
+
+  purescript-vim = buildVimPluginFrom2Nix {
+    pname = "purescript-vim";
+    version = "2020-10-08";
+    src = fetchFromGitHub {
+      owner = "purescript-contrib";
+      repo = "purescript-vim";
+      rev = "5b4fa3e2970be1353f7d77735c0c9b42dc9885f3";
+      sha256 = "11d2jfzimdi6idvs61gjhy7d1g8yk90dfvvw5m8rn9620xrypbgn";
+    };
+    meta.homepage = "https://github.com/purescript-contrib/purescript-vim/";
+  };
+
+  python-mode = buildVimPluginFrom2Nix {
+    pname = "python-mode";
+    version = "2018-04-29";
+    src = fetchFromGitHub {
+      owner = "python-mode";
+      repo = "python-mode";
+      rev = "f94b0d7b21714f950f5878b430fbfde21c3b7ad9";
+      sha256 = "0zxsa1agigzb9adrwq54pdyl984drdqzz3kkixaijkq77kkdvj0n";
+    };
+    meta.homepage = "https://github.com/python-mode/python-mode/";
+  };
+
+  quick-scope = buildVimPluginFrom2Nix {
+    pname = "quick-scope";
+    version = "2020-12-28";
+    src = fetchFromGitHub {
+      owner = "unblevable";
+      repo = "quick-scope";
+      rev = "d4c02b85ff168f7749833607536cb02281464c26";
+      sha256 = "16hl1np40p3wrk1q0blmxfaa28lljvca1dv9xpiw1ddm9n7qlr21";
+    };
+    meta.homepage = "https://github.com/unblevable/quick-scope/";
+  };
+
+  quickfix-reflector-vim = buildVimPluginFrom2Nix {
+    pname = "quickfix-reflector-vim";
+    version = "2019-12-11";
+    src = fetchFromGitHub {
+      owner = "stefandtw";
+      repo = "quickfix-reflector.vim";
+      rev = "8e9c05a110b80ab66fc8bc3d5fe9e6fa168aada6";
+      sha256 = "1i8453z3s0xmbmbzk3kpxwvd42ar9v2m2gjqic9k7njpxw87czvs";
+    };
+    meta.homepage = "https://github.com/stefandtw/quickfix-reflector.vim/";
+  };
+
+  quickfixstatus = buildVimPluginFrom2Nix {
+    pname = "quickfixstatus";
+    version = "2011-09-03";
+    src = fetchFromGitHub {
+      owner = "dannyob";
+      repo = "quickfixstatus";
+      rev = "fd3875b914fc51bbefefa8c4995588c088163053";
+      sha256 = "16vxhvyxq51y7wnx0c1fmdi2yb6kfr1pxijq65gxj8qwvbak2s3v";
+    };
+    meta.homepage = "https://github.com/dannyob/quickfixstatus/";
+  };
+
+  rainbow = buildVimPluginFrom2Nix {
+    pname = "rainbow";
+    version = "2020-05-28";
+    src = fetchFromGitHub {
+      owner = "luochen1990";
+      repo = "rainbow";
+      rev = "4d15633cdaf61602e1d9fd216a77fc02e0881b2d";
+      sha256 = "168mbdf2h3zhkqrdyyhh0pbkjdvxwida80rdwk8ml97mxxii8ziw";
+    };
+    meta.homepage = "https://github.com/luochen1990/rainbow/";
+  };
+
+  rainbow_parentheses-vim = buildVimPluginFrom2Nix {
+    pname = "rainbow_parentheses-vim";
+    version = "2013-03-05";
+    src = fetchFromGitHub {
+      owner = "kien";
+      repo = "rainbow_parentheses.vim";
+      rev = "eb8baa5428bde10ecc1cb14eed1d6e16f5f24695";
+      sha256 = "1qw84imlhq4654mxazj7j3sp5g1j3yjxi496i08iix06dm15m5s7";
+    };
+    meta.homepage = "https://github.com/kien/rainbow_parentheses.vim/";
+  };
+
+  random-vim = buildVimPluginFrom2Nix {
+    pname = "random-vim";
+    version = "2010-10-18";
+    src = fetchFromGitHub {
+      owner = "vim-scripts";
+      repo = "random.vim";
+      rev = "b2d85eb24a38074eab37a5acf2a295e1f2ad8989";
+      sha256 = "1lzy2cq4jcrsqyxlnbnd0y6j4mabm09bi7q22lf6vinqlb84w7sp";
+    };
+    meta.homepage = "https://github.com/vim-scripts/random.vim/";
+  };
+
+  ranger-vim = buildVimPluginFrom2Nix {
+    pname = "ranger-vim";
+    version = "2019-02-08";
+    src = fetchFromGitHub {
+      owner = "rafaqz";
+      repo = "ranger.vim";
+      rev = "6def86f4293d170480ce62cc41f15448075d7835";
+      sha256 = "0890rbmdw3p25cww6vsji7xrndcxsisfyv5przahpclk9fc9sxs8";
+    };
+    meta.homepage = "https://github.com/rafaqz/ranger.vim/";
+  };
+
+  readline-vim = buildVimPluginFrom2Nix {
+    pname = "readline-vim";
+    version = "2019-12-28";
+    src = fetchFromGitHub {
+      owner = "ryvnf";
+      repo = "readline.vim";
+      rev = "48f04c651728e8a7a8352eec697801aa32348564";
+      sha256 = "1vs91lkm9gwvp0bahx80ag6lw03r5x6kyih70l4sq8q0kydp5f13";
+    };
+    meta.homepage = "https://github.com/ryvnf/readline.vim/";
+  };
+
+  Recover-vim = buildVimPluginFrom2Nix {
+    pname = "Recover-vim";
+    version = "2021-02-24";
+    src = fetchFromGitHub {
+      owner = "chrisbra";
+      repo = "Recover.vim";
+      rev = "f019bb0bc15093da74ef0bd1a9356dedf13ba885";
+      sha256 = "1v23k4wfiazvkm9iaqw987cs69fwf230a7i15x3rv68azw63fl2b";
+    };
+    meta.homepage = "https://github.com/chrisbra/Recover.vim/";
+  };
+
+  registers-nvim = buildVimPluginFrom2Nix {
+    pname = "registers-nvim";
+    version = "2021-03-31";
+    src = fetchFromGitHub {
+      owner = "tversteeg";
+      repo = "registers.nvim";
+      rev = "b8f6283724d3ccacf2c7add61f3fcb9c02e7d61d";
+      sha256 = "1b1amy9k6j2ilcm79pp30gcqqjhbd2zfwxm5vbcra29p9s4f14y2";
+    };
+    meta.homepage = "https://github.com/tversteeg/registers.nvim/";
+  };
+
+  Rename = buildVimPluginFrom2Nix {
+    pname = "Rename";
+    version = "2011-08-31";
+    src = fetchFromGitHub {
+      owner = "vim-scripts";
+      repo = "Rename";
+      rev = "b240f28d2ede65fa77cd99fe045efe79202f7a34";
+      sha256 = "1d1myg4zyc281zcc1ba9idbgcgxndb4a0jwqr4yqxhhzdgszw46r";
+    };
+    meta.homepage = "https://github.com/vim-scripts/Rename/";
+  };
+
+  ReplaceWithRegister = buildVimPluginFrom2Nix {
+    pname = "ReplaceWithRegister";
+    version = "2014-10-31";
+    src = fetchFromGitHub {
+      owner = "vim-scripts";
+      repo = "ReplaceWithRegister";
+      rev = "832efc23111d19591d495dc72286de2fb0b09345";
+      sha256 = "0mb0sx85j1k59b1zz95r4vkq4kxlb4krhncq70mq7fxrs5bnhq8g";
+    };
+    meta.homepage = "https://github.com/vim-scripts/ReplaceWithRegister/";
+  };
+
+  riv-vim = buildVimPluginFrom2Nix {
+    pname = "riv-vim";
+    version = "2020-04-09";
+    src = fetchFromGitHub {
+      owner = "gu-fan";
+      repo = "riv.vim";
+      rev = "e26c3e8dce4c1332e802cde84f83e61ec8a13986";
+      sha256 = "1da3iwrpy08rayrsf8v0ml4khlp9j5i4cffpv9j3iyalcbhk2m9g";
+    };
+    meta.homepage = "https://github.com/gu-fan/riv.vim/";
+  };
+
+  robotframework-vim = buildVimPluginFrom2Nix {
+    pname = "robotframework-vim";
+    version = "2017-04-14";
+    src = fetchFromGitHub {
+      owner = "mfukar";
+      repo = "robotframework-vim";
+      rev = "75d5b371a4da2a090a2872d55bd0dead013f334e";
+      sha256 = "091ac5rq6f1a7j2q3dy9rc00vckv21m4wd29ijj63jannr02v5ad";
+    };
+    meta.homepage = "https://github.com/mfukar/robotframework-vim/";
+  };
+
+  rspec-vim = buildVimPluginFrom2Nix {
+    pname = "rspec-vim";
+    version = "2020-08-20";
+    src = fetchFromGitHub {
+      owner = "keith";
+      repo = "rspec.vim";
+      rev = "e49d306de952c2195233b83f9ca9fa94e19affe4";
+      sha256 = "0445abk039qlhk5s9jm5hawfksds5dgshb1lspvfkz8slk6m076z";
+    };
+    meta.homepage = "https://github.com/keith/rspec.vim/";
+  };
+
+  rtorrent-syntax-file = buildVimPluginFrom2Nix {
+    pname = "rtorrent-syntax-file";
+    version = "2016-03-19";
+    src = fetchFromGitHub {
+      owner = "ccarpita";
+      repo = "rtorrent-syntax-file";
+      rev = "885ca182c02bbbed4b62a3fcfe6fe62fa5b419ca";
+      sha256 = "1vhvmwnwi6862cckl8dqr8pgy0inrr0c31lic89826yv7mfl9mbz";
+    };
+    meta.homepage = "https://github.com/ccarpita/rtorrent-syntax-file/";
+  };
+
+  rust-tools-nvim = buildVimPluginFrom2Nix {
+    pname = "rust-tools-nvim";
+    version = "2021-04-06";
+    src = fetchFromGitHub {
+      owner = "simrat39";
+      repo = "rust-tools.nvim";
+      rev = "42a9fb0441630ea640b7d3e967d6ad5c7f41b520";
+      sha256 = "0mcjcxhq2ri1galva5xjx4f0z98jyskmwypxc77gizisl2fjplnz";
+    };
+    meta.homepage = "https://github.com/simrat39/rust-tools.nvim/";
+  };
+
+  rust-vim = buildVimPluginFrom2Nix {
+    pname = "rust-vim";
+    version = "2021-02-15";
+    src = fetchFromGitHub {
+      owner = "rust-lang";
+      repo = "rust.vim";
+      rev = "87c745d8d506fc1eecc1d81df15d5bde1658a2fc";
+      sha256 = "0v0ip731lclh9aqrmlqwnnz4skgawaq3invghh1c7lh0zdq22lzb";
+    };
+    meta.homepage = "https://github.com/rust-lang/rust.vim/";
+  };
+
+  salt-vim = buildVimPluginFrom2Nix {
+    pname = "salt-vim";
+    version = "2017-07-01";
+    src = fetchFromGitHub {
+      owner = "saltstack";
+      repo = "salt-vim";
+      rev = "6ca9e3500cc39dd417b411435d58a1b720b331cc";
+      sha256 = "0r79bpl98xcsmkw6dg83cf1ghn89rzsr011zirk3v1wfxclri2c4";
+    };
+    meta.homepage = "https://github.com/saltstack/salt-vim/";
+  };
+
+  self = buildVimPluginFrom2Nix {
+    pname = "self";
+    version = "2014-05-28";
+    src = fetchFromGitHub {
+      owner = "megaannum";
+      repo = "self";
+      rev = "2ed666b547eddee6ae1fcc63babca4ba0b66a59f";
+      sha256 = "1gcwn6i5i3msg7hrlzsnv1bs6pm4jz9cff8ppaz2xdj8xv9qy6fn";
+    };
+    meta.homepage = "https://github.com/megaannum/self/";
+  };
+
+  semantic-highlight-vim = buildVimPluginFrom2Nix {
+    pname = "semantic-highlight-vim";
+    version = "2020-09-11";
+    src = fetchFromGitHub {
+      owner = "jaxbot";
+      repo = "semantic-highlight.vim";
+      rev = "7e141c2b7be0f2600276004fd2e7382a3fa0f690";
+      sha256 = "04975ly6zd58zhs2v07dw6m1dha0gkmfm0pvhlrgcrf2qp8n4m3v";
+    };
+    meta.homepage = "https://github.com/jaxbot/semantic-highlight.vim/";
+  };
+
+  semshi = buildVimPluginFrom2Nix {
+    pname = "semshi";
+    version = "2019-12-01";
+    src = fetchFromGitHub {
+      owner = "numirias";
+      repo = "semshi";
+      rev = "801d0c971d3d7291cf2fc22d74ac69155a71a279";
+      sha256 = "0adq1qxlxd53ps5byjvqmzk266f3wbvqmw74dkx6vd41zqw38wfx";
+    };
+    meta.homepage = "https://github.com/numirias/semshi/";
+  };
+
+  seoul256-vim = buildVimPluginFrom2Nix {
+    pname = "seoul256-vim";
+    version = "2020-06-21";
+    src = fetchFromGitHub {
+      owner = "junegunn";
+      repo = "seoul256.vim";
+      rev = "24ed467ca6ef9ce7ede56c9ffb1c6b30cd0ee906";
+      sha256 = "0ihs5nxdyx3jr1n96l2yx4b5gc48x7qbyxv6dc53ihw2vpn783fx";
+    };
+    meta.homepage = "https://github.com/junegunn/seoul256.vim/";
+  };
+
+  shabadou-vim = buildVimPluginFrom2Nix {
+    pname = "shabadou-vim";
+    version = "2016-07-19";
+    src = fetchFromGitHub {
+      owner = "osyo-manga";
+      repo = "shabadou.vim";
+      rev = "7d4bfed1ea8985ae125df3d1403cc19e252443e1";
+      sha256 = "1kvik1yf7yjg9jdmdw38yhkksxg0n3nry02banwik7wgjnpvg870";
+    };
+    meta.homepage = "https://github.com/osyo-manga/shabadou.vim/";
+  };
+
+  ShowMultiBase = buildVimPluginFrom2Nix {
+    pname = "ShowMultiBase";
+    version = "2010-10-18";
+    src = fetchFromGitHub {
+      owner = "vim-scripts";
+      repo = "ShowMultiBase";
+      rev = "85a39fd12668ce973d3d9282263912b2b8f0d338";
+      sha256 = "0hg5352ahzgh2kwqha5v8ai024fld93xag93hb53wjf5b8nzsz8i";
+    };
+    meta.homepage = "https://github.com/vim-scripts/ShowMultiBase/";
+  };
+
+  sideways-vim = buildVimPluginFrom2Nix {
+    pname = "sideways-vim";
+    version = "2021-03-21";
+    src = fetchFromGitHub {
+      owner = "AndrewRadev";
+      repo = "sideways.vim";
+      rev = "171d6a39eb46973b229aaf1d88691e40d45f64ad";
+      sha256 = "097f0il1dcn2kshsngvklgwlhac86cjwxxagqvcz3yiaa1qpzhlp";
+    };
+    meta.homepage = "https://github.com/AndrewRadev/sideways.vim/";
+  };
+
+  SimpylFold = buildVimPluginFrom2Nix {
+    pname = "SimpylFold";
+    version = "2020-09-09";
+    src = fetchFromGitHub {
+      owner = "tmhedberg";
+      repo = "SimpylFold";
+      rev = "0459df8a0bbfc8ef1bfd88db889e881626f65914";
+      sha256 = "1lydkm86d84fsmbklwcgnlb95vczri9a8d898hrnfvskyx050y2w";
+    };
+    meta.homepage = "https://github.com/tmhedberg/SimpylFold/";
+  };
+
+  skim-vim = buildVimPluginFrom2Nix {
+    pname = "skim-vim";
+    version = "2020-11-11";
+    src = fetchFromGitHub {
+      owner = "lotabout";
+      repo = "skim.vim";
+      rev = "83faea7f2581005d4adc9256ec76e0fe3f8a15e6";
+      sha256 = "0wppb2wgpk085cwh9kmqzv6f30j2hb3brqx2ik371gkrcfbpf4ly";
+    };
+    meta.homepage = "https://github.com/lotabout/skim.vim/";
+  };
+
+  sky-color-clock-vim = buildVimPluginFrom2Nix {
+    pname = "sky-color-clock-vim";
+    version = "2018-11-03";
+    src = fetchFromGitHub {
+      owner = "mopp";
+      repo = "sky-color-clock.vim";
+      rev = "9d4232cc249083f3c5d2eb4e2848e491b52df4ca";
+      sha256 = "1ln50rahb177vilzr4zc7v9znm8xfid1v8gddl83gr9srdbn2bbz";
+    };
+    meta.homepage = "https://github.com/mopp/sky-color-clock.vim/";
+  };
+
+  smartpairs-vim = buildVimPluginFrom2Nix {
+    pname = "smartpairs-vim";
+    version = "2018-01-01";
+    src = fetchFromGitHub {
+      owner = "gorkunov";
+      repo = "smartpairs.vim";
+      rev = "dc754c29509b1a942552b3cfa348e4aae209322c";
+      sha256 = "1pyynwz7wfbgccdxsyggzl0301qjj3wgyymah5spx8b3s42a6slj";
+    };
+    meta.homepage = "https://github.com/gorkunov/smartpairs.vim/";
+  };
+
+  snippets-nvim = buildVimPluginFrom2Nix {
+    pname = "snippets-nvim";
+    version = "2020-09-09";
+    src = fetchFromGitHub {
+      owner = "norcalli";
+      repo = "snippets.nvim";
+      rev = "7b5fd8071d4fb6fa981a899aae56b55897c079fd";
+      sha256 = "1fdsx7d5nyhhklwidgh387ijd485g2836rwd5i1r0di777mp7w80";
+    };
+    meta.homepage = "https://github.com/norcalli/snippets.nvim/";
+  };
+
+  sonokai = buildVimPluginFrom2Nix {
+    pname = "sonokai";
+    version = "2021-03-22";
+    src = fetchFromGitHub {
+      owner = "sainnhe";
+      repo = "sonokai";
+      rev = "78f1b14ad18b043eb888a173f4c431dbf79462d8";
+      sha256 = "0spnpzr874ad9jpawcgydfm242wq55ychcky14f1qa09svsrdiv0";
+    };
+    meta.homepage = "https://github.com/sainnhe/sonokai/";
+  };
+
+  sourcemap-vim = buildVimPluginFrom2Nix {
+    pname = "sourcemap-vim";
+    version = "2012-09-19";
+    src = fetchFromGitHub {
+      owner = "chikatoike";
+      repo = "sourcemap.vim";
+      rev = "0dd82d40faea2fdb0771067f46c01deb41610ba1";
+      sha256 = "1gcgnynallz420911fdfm0ccbv3zs78p69nnh2ls1r4vlfp7g350";
+    };
+    meta.homepage = "https://github.com/chikatoike/sourcemap.vim/";
+  };
+
+  SpaceCamp = buildVimPluginFrom2Nix {
+    pname = "SpaceCamp";
+    version = "2021-03-16";
+    src = fetchFromGitHub {
+      owner = "jaredgorski";
+      repo = "SpaceCamp";
+      rev = "ce034929763903937396cf6b2c9912eb209e6b39";
+      sha256 = "07a1441gccilbhnk99lz66nvaiv14vdn34ink3jjd27d2mkf3skb";
+    };
+    meta.homepage = "https://github.com/jaredgorski/SpaceCamp/";
+  };
+
+  Spacegray-vim = buildVimPluginFrom2Nix {
+    pname = "Spacegray-vim";
+    version = "2021-01-02";
+    src = fetchFromGitHub {
+      owner = "ackyshake";
+      repo = "Spacegray.vim";
+      rev = "012ff0065eac2c149084d59e1272ec0d740051ab";
+      sha256 = "0y0jlycgsc8ll5gnqmjc9blyn9ynnzrgnp280k49h4lh5b689y5m";
+    };
+    meta.homepage = "https://github.com/ackyshake/Spacegray.vim/";
+  };
+
+  spacevim = buildVimPluginFrom2Nix {
+    pname = "spacevim";
+    version = "2018-03-29";
+    src = fetchFromGitHub {
+      owner = "ctjhoa";
+      repo = "spacevim";
+      rev = "30142a518ba77feb22791b5cb2387d88b70c58f2";
+      sha256 = "0m389cnpg17ca8s7vb9yrs40sxb56zg32lcpilnd63zfi7awgscg";
+    };
+    meta.homepage = "https://github.com/ctjhoa/spacevim/";
+  };
+
+  sparkup = buildVimPluginFrom2Nix {
+    pname = "sparkup";
+    version = "2012-06-11";
+    src = fetchFromGitHub {
+      owner = "chrisgeo";
+      repo = "sparkup";
+      rev = "6fbfceef890e705c47b42b27be743ffed6f9296e";
+      sha256 = "17jgpvl879ik53rr3razfnbpfx63mzpp1rlvxxjsvvrk4g45dssm";
+    };
+    meta.homepage = "https://github.com/chrisgeo/sparkup/";
+  };
+
+  splice-vim = buildVimPluginFrom2Nix {
+    pname = "splice-vim";
+    version = "2020-01-15";
+    src = fetchFromGitHub {
+      owner = "sjl";
+      repo = "splice.vim";
+      rev = "815a28e687fdf78b67e9b9cd4c21277bbe658873";
+      sha256 = "0bh1gr2h6w872ql72rdlzpk5znl4lz01x6lgyf330sickizz5mvb";
+    };
+    meta.homepage = "https://github.com/sjl/splice.vim/";
+  };
+
+  split-term-vim = buildVimPluginFrom2Nix {
+    pname = "split-term-vim";
+    version = "2018-09-30";
+    src = fetchFromGitHub {
+      owner = "vimlab";
+      repo = "split-term.vim";
+      rev = "a4e28cab77ad07fc8a0ebb62a982768c02eb287c";
+      sha256 = "12vrmbq1r8d6sgyxjwi0s856n1v4vjhrf8wpwq6l4ydmk1bnvjkb";
+    };
+    meta.homepage = "https://github.com/vimlab/split-term.vim/";
+  };
+
+  splitjoin-vim = buildVimPluginFrom2Nix {
+    pname = "splitjoin-vim";
+    version = "2021-03-02";
+    src = fetchFromGitHub {
+      owner = "AndrewRadev";
+      repo = "splitjoin.vim";
+      rev = "f0d785f7607be60c282b5f5a5d32a2e51560c07c";
+      sha256 = "1gbnhl1w0krlf2ppiz4h4fvnrjf8i0552nckhd67gfba2nqha0z4";
+      fetchSubmodules = true;
+    };
+    meta.homepage = "https://github.com/AndrewRadev/splitjoin.vim/";
+  };
+
+  sql-nvim = buildVimPluginFrom2Nix {
+    pname = "sql-nvim";
+    version = "2021-02-09";
+    src = fetchFromGitHub {
+      owner = "tami5";
+      repo = "sql.nvim";
+      rev = "96d000d9eff0165c7e0496f73787cc56d7c1581c";
+      sha256 = "1n9j3wv5xifs7ppgjnnbvx9p4h4llshbzgrly5b7lx0nnb91yqg0";
+    };
+    meta.homepage = "https://github.com/tami5/sql.nvim/";
+  };
+
+  srcery-vim = buildVimPluginFrom2Nix {
+    pname = "srcery-vim";
+    version = "2020-12-22";
+    src = fetchFromGitHub {
+      owner = "srcery-colors";
+      repo = "srcery-vim";
+      rev = "8cd04af0507635a8368609ede79a332b96a7a245";
+      sha256 = "0gb1mjr2yryrq0p9q17d4ndyi7b6wyba3s8ds72wf5bkl4vzrsbd";
+    };
+    meta.homepage = "https://github.com/srcery-colors/srcery-vim/";
+  };
+
+  stan-vim = buildVimPluginFrom2Nix {
+    pname = "stan-vim";
+    version = "2020-08-05";
+    src = fetchFromGitHub {
+      owner = "eigenfoo";
+      repo = "stan-vim";
+      rev = "9d3b6ec149f9559bd9bd021dfa827c29c5d1dc38";
+      sha256 = "0qv748m1vrp1qcl41y7fj2jm8cac9b01ljq6ydq3z4syxdf7yzcc";
+    };
+    meta.homepage = "https://github.com/eigenfoo/stan-vim/";
+  };
+
+  starsearch-vim = buildVimPluginFrom2Nix {
+    pname = "starsearch-vim";
+    version = "2014-09-21";
+    src = fetchFromGitHub {
+      owner = "darfink";
+      repo = "starsearch.vim";
+      rev = "9b8cda1e628160c83846db5a30899a1a1ba5c1c9";
+      sha256 = "1i1ygdqwhz4jqmz9lzjnx1a7s5chdqjsvgkmnd9x0s8ixqa41bpr";
+    };
+    meta.homepage = "https://github.com/darfink/starsearch.vim/";
+  };
+
+  SudoEdit-vim = buildVimPluginFrom2Nix {
+    pname = "SudoEdit-vim";
+    version = "2020-02-27";
+    src = fetchFromGitHub {
+      owner = "chrisbra";
+      repo = "SudoEdit.vim";
+      rev = "e203eada5b563e9134ce2aae26b09edae0904fd7";
+      sha256 = "0pf9iix50pw3p430ky51rv11ra1hppdpwa5flzcd5kciybr76n0n";
+    };
+    meta.homepage = "https://github.com/chrisbra/SudoEdit.vim/";
+  };
+
+  supertab = buildVimPluginFrom2Nix {
+    pname = "supertab";
+    version = "2020-10-01";
+    src = fetchFromGitHub {
+      owner = "ervandew";
+      repo = "supertab";
+      rev = "d80e8e2c1fa08607fa34c0ca5f1b66d8a906c5ef";
+      sha256 = "0wjaq6k1sb38qmjcp47cr0avvwhphr0wiyl8qvnc8qqyjf8y803k";
+    };
+    meta.homepage = "https://github.com/ervandew/supertab/";
+  };
+
+  sved = buildVimPluginFrom2Nix {
+    pname = "sved";
+    version = "2019-01-25";
+    src = fetchFromGitHub {
+      owner = "peterbjorgensen";
+      repo = "sved";
+      rev = "3362db72447e8ac812c7299c15ecfc9f41341713";
+      sha256 = "1r2nv069d6r2q6gbiz795x94mfjm9hnv05zka085hhq9a3yf1pgx";
+    };
+    meta.homepage = "https://github.com/peterbjorgensen/sved/";
+  };
+
+  swift-vim = buildVimPluginFrom2Nix {
+    pname = "swift-vim";
+    version = "2020-09-04";
+    src = fetchFromGitHub {
+      owner = "keith";
+      repo = "swift.vim";
+      rev = "bfc662d11b3a006815d0b6972c1c0c2ebbc3b16e";
+      sha256 = "1qf5f9p0kfi6bq2qi9izarva6r711vzlbrbdax8nq9g0pxa1bj3f";
+    };
+    meta.homepage = "https://github.com/keith/swift.vim/";
+  };
+
+  syntastic = buildVimPluginFrom2Nix {
+    pname = "syntastic";
+    version = "2021-03-15";
+    src = fetchFromGitHub {
+      owner = "vim-syntastic";
+      repo = "syntastic";
+      rev = "f2ddb480c5afa1c0f155d78e6fc7853fd20f0420";
+      sha256 = "05ca80alkhnxj1klyy729y81g9ng2n841djxgd7zjg8cpkk94kw3";
+    };
+    meta.homepage = "https://github.com/vim-syntastic/syntastic/";
+  };
+
+  tabmerge = buildVimPluginFrom2Nix {
+    pname = "tabmerge";
+    version = "2010-10-18";
+    src = fetchFromGitHub {
+      owner = "vim-scripts";
+      repo = "tabmerge";
+      rev = "074e5f06f26e7108a0570071a0f938a821768c06";
+      sha256 = "0prkyza1n49cdaslcr57w8zv15vw78mlqbzib2xipmawzjq02idq";
+    };
+    meta.homepage = "https://github.com/vim-scripts/tabmerge/";
+  };
+
+  tabpagebuffer-vim = buildVimPluginFrom2Nix {
+    pname = "tabpagebuffer-vim";
+    version = "2014-09-30";
+    src = fetchFromGitHub {
+      owner = "Shougo";
+      repo = "tabpagebuffer.vim";
+      rev = "4d95c3e6fa5ad887498f4cbe486c11e39d4a1fbc";
+      sha256 = "1z6zlpzkhwy1p2pmx9qrwb91dp9v4yi8jrdvm1if2k79ij4sl08f";
+    };
+    meta.homepage = "https://github.com/Shougo/tabpagebuffer.vim/";
+  };
+
+  tabular = buildVimPluginFrom2Nix {
+    pname = "tabular";
+    version = "2019-02-19";
+    src = fetchFromGitHub {
+      owner = "godlygeek";
+      repo = "tabular";
+      rev = "339091ac4dd1f17e225fe7d57b48aff55f99b23a";
+      sha256 = "0jq91770wsp2waw7pywxjqx59v0vg54gfzirgcd85pg61w22bfla";
+    };
+    meta.homepage = "https://github.com/godlygeek/tabular/";
+  };
+
+  tagbar = buildVimPluginFrom2Nix {
+    pname = "tagbar";
+    version = "2021-03-23";
+    src = fetchFromGitHub {
+      owner = "preservim";
+      repo = "tagbar";
+      rev = "f6012cb65da4bda46b0779a36840df36ad01483e";
+      sha256 = "08vb3ffm1f47q5gxyqmmfv75x12001qpkqml7v612wnnfpclcqf5";
+    };
+    meta.homepage = "https://github.com/preservim/tagbar/";
+  };
+
+  taglist-vim = buildVimPluginFrom2Nix {
+    pname = "taglist-vim";
+    version = "2010-10-18";
+    src = fetchFromGitHub {
+      owner = "vim-scripts";
+      repo = "taglist.vim";
+      rev = "53041fbc45398a9af631a20657e109707a455339";
+      sha256 = "07aa2gfc73lznyi7w7cybzanspza3p67cv5hxr21g43zhs5k9izd";
+    };
+    meta.homepage = "https://github.com/vim-scripts/taglist.vim/";
+  };
+
+  targets-vim = buildVimPluginFrom2Nix {
+    pname = "targets-vim";
+    version = "2019-12-08";
+    src = fetchFromGitHub {
+      owner = "wellle";
+      repo = "targets.vim";
+      rev = "8d6ff2984cdfaebe5b7a6eee8f226a6dd1226f2d";
+      sha256 = "192wq3x64x11nm2jhs4yrc627b0lh002dfnj72xrc7jak9vbdps9";
+    };
+    meta.homepage = "https://github.com/wellle/targets.vim/";
+  };
+
+  taskwiki = buildVimPluginFrom2Nix {
+    pname = "taskwiki";
+    version = "2021-04-03";
+    src = fetchFromGitHub {
+      owner = "tools-life";
+      repo = "taskwiki";
+      rev = "23a3c20a7d5185700e1e6504c3808cfa9eff78d4";
+      sha256 = "0jwb4hcyqwpjaxlissvi69d6fx4dwb7ypdigc2w5hnhfw8nv0kb1";
+    };
+    meta.homepage = "https://github.com/tools-life/taskwiki/";
+  };
+
+  tcomment_vim = buildVimPluginFrom2Nix {
+    pname = "tcomment_vim";
+    version = "2021-03-31";
+    src = fetchFromGitHub {
+      owner = "tomtom";
+      repo = "tcomment_vim";
+      rev = "8b69645999fab1933faf4fb53ae930f7c4368e79";
+      sha256 = "1x4mwg8dvfw1plkifawckkdi7brqs9rxpm8irp1q7kfywiwbyw0y";
+    };
+    meta.homepage = "https://github.com/tomtom/tcomment_vim/";
+  };
+
+  telescope-frecency-nvim = buildVimPluginFrom2Nix {
+    pname = "telescope-frecency-nvim";
+    version = "2021-03-10";
+    src = fetchFromGitHub {
+      owner = "nvim-telescope";
+      repo = "telescope-frecency.nvim";
+      rev = "926fbde059d6a7cefcccdd92b40fa866e073ba41";
+      sha256 = "100zi9ncz2b6hb5y9hxcsj5ra81kq8j2b4y8ck56y4yg96yi03pd";
+    };
+    meta.homepage = "https://github.com/nvim-telescope/telescope-frecency.nvim/";
+  };
+
+  telescope-fzf-writer-nvim = buildVimPluginFrom2Nix {
+    pname = "telescope-fzf-writer-nvim";
+    version = "2021-01-10";
+    src = fetchFromGitHub {
+      owner = "nvim-telescope";
+      repo = "telescope-fzf-writer.nvim";
+      rev = "9535863f519be3d5e57fd50916f96594241bfe16";
+      sha256 = "0jmkzjqlcz47hzp44407xwkmirgprzkwrz6x8ax771gpk8cghfrx";
+    };
+    meta.homepage = "https://github.com/nvim-telescope/telescope-fzf-writer.nvim/";
+  };
+
+  telescope-fzy-native-nvim = buildVimPluginFrom2Nix {
+    pname = "telescope-fzy-native-nvim";
+    version = "2020-12-31";
+    src = fetchFromGitHub {
+      owner = "nvim-telescope";
+      repo = "telescope-fzy-native.nvim";
+      rev = "654dffd924b29fb9a9252dcbd63528b1498ac9fb";
+      sha256 = "01x9z3n03qharjw778cxb16gw1dsxzmsxph4xsbfy1avf21c6x9g";
+      fetchSubmodules = true;
+    };
+    meta.homepage = "https://github.com/nvim-telescope/telescope-fzy-native.nvim/";
+  };
+
+  telescope-nvim = buildVimPluginFrom2Nix {
+    pname = "telescope-nvim";
+    version = "2021-04-04";
+    src = fetchFromGitHub {
+      owner = "nvim-telescope";
+      repo = "telescope.nvim";
+      rev = "d0cf646f65746415294f570ec643ffd0101ca3ab";
+      sha256 = "02l65jxd50x4jc7mv1d9bsqasa7m0vkil0b36jamhvp1syzkwhkj";
+    };
+    meta.homepage = "https://github.com/nvim-telescope/telescope.nvim/";
+  };
+
+  tender-vim = buildVimPluginFrom2Nix {
+    pname = "tender-vim";
+    version = "2020-06-29";
+    src = fetchFromGitHub {
+      owner = "jacoborus";
+      repo = "tender.vim";
+      rev = "25924cb8b29a5158e56fb896a2540c70691c7a28";
+      sha256 = "0mm5h5jhb6y0f1zsfhq0frvdm6s93skshi66rfrpn82l93zigw4c";
+    };
+    meta.homepage = "https://github.com/jacoborus/tender.vim/";
+  };
+
+  termwrapper-nvim = buildVimPluginFrom2Nix {
+    pname = "termwrapper-nvim";
+    version = "2021-03-28";
+    src = fetchFromGitHub {
+      owner = "oberblastmeister";
+      repo = "termwrapper.nvim";
+      rev = "e00da3cc137f795470818204fc2e712473481c78";
+      sha256 = "0a61n9dpf94rrkq79pjwn73axa1d2zfpsr2ci7wivg3inq7zsqyc";
+    };
+    meta.homepage = "https://github.com/oberblastmeister/termwrapper.nvim/";
+  };
+
+  tern_for_vim = buildVimPluginFrom2Nix {
+    pname = "tern_for_vim";
+    version = "2019-01-23";
+    src = fetchFromGitHub {
+      owner = "ternjs";
+      repo = "tern_for_vim";
+      rev = "994ffbe783da36d67786b6c66a4bf784c5eab300";
+      sha256 = "0vpi5lqlyf6kcc0ha8hf3ch2h8v3awidgpwbrv9f3bqvyg4yhdcd";
+    };
+    meta.homepage = "https://github.com/ternjs/tern_for_vim/";
+  };
+
+  thesaurus_query-vim = buildVimPluginFrom2Nix {
+    pname = "thesaurus_query-vim";
+    version = "2019-11-09";
+    src = fetchFromGitHub {
+      owner = "ron89";
+      repo = "thesaurus_query.vim";
+      rev = "830a20ec77780ebfe8d2a7e8c740ca4abb079f89";
+      sha256 = "0kfqpjwashwf084cbz6dmhirk42a4n8d1zj17i086by17nx7qn1g";
+    };
+    meta.homepage = "https://github.com/ron89/thesaurus_query.vim/";
+  };
+
+  thumbnail-vim = buildVimPluginFrom2Nix {
+    pname = "thumbnail-vim";
+    version = "2021-01-11";
+    src = fetchFromGitHub {
+      owner = "itchyny";
+      repo = "thumbnail.vim";
+      rev = "bfd408a3210c305aaf51e6ce31ac99497e6ab1ec";
+      sha256 = "1kh12d0dg932j9drby27fhg8vbjm8rwih33rm4yjba0316i8wcyv";
+    };
+    meta.homepage = "https://github.com/itchyny/thumbnail.vim/";
+  };
+
+  tlib_vim = buildVimPluginFrom2Nix {
+    pname = "tlib_vim";
+    version = "2019-09-28";
+    src = fetchFromGitHub {
+      owner = "tomtom";
+      repo = "tlib_vim";
+      rev = "a071b6d41b20069a3520e0d101194a752968973b";
+      sha256 = "05swfvjyai32cbdpg10m3k2frkv017i1avf0nzilqavskvg04vi3";
+    };
+    meta.homepage = "https://github.com/tomtom/tlib_vim/";
+  };
+
+  tmux-complete-vim = buildVimPluginFrom2Nix {
+    pname = "tmux-complete-vim";
+    version = "2021-03-26";
+    src = fetchFromGitHub {
+      owner = "wellle";
+      repo = "tmux-complete.vim";
+      rev = "87f6f96c73b599554d1d7f313413d7f9d0336096";
+      sha256 = "0bqh08q1jv05srd15bp9zrlrdzavxy83v153balvhrrvg3z4lk4x";
+    };
+    meta.homepage = "https://github.com/wellle/tmux-complete.vim/";
+  };
+
+  todo-txt-vim = buildVimPluginFrom2Nix {
+    pname = "todo-txt-vim";
+    version = "2021-03-20";
+    src = fetchFromGitHub {
+      owner = "freitass";
+      repo = "todo.txt-vim";
+      rev = "ed9d639de2e34eafb82f2682010ab361966ee40f";
+      sha256 = "1vw4vhbgxnlkl5m5y55xk81vrknw35s01dw21s815i8clp38zr7i";
+      fetchSubmodules = true;
+    };
+    meta.homepage = "https://github.com/freitass/todo.txt-vim/";
+  };
+
+  traces-vim = buildVimPluginFrom2Nix {
+    pname = "traces-vim";
+    version = "2021-01-23";
+    src = fetchFromGitHub {
+      owner = "markonm";
+      repo = "traces.vim";
+      rev = "0f29f8e53503b8ce0bb43467064b2401cf34acd1";
+      sha256 = "1xx2b59wcnbh5662j7b68maz5ccxj5xpfpnjn2r669aiv0a5snhw";
+    };
+    meta.homepage = "https://github.com/markonm/traces.vim/";
+  };
+
+  train-nvim = buildVimPluginFrom2Nix {
+    pname = "train-nvim";
+    version = "2020-09-10";
+    src = fetchFromGitHub {
+      owner = "tjdevries";
+      repo = "train.nvim";
+      rev = "7b2e9a59af58385d88bf39c5311c08f839e2b1ce";
+      sha256 = "1pbv8c2wb6b2h9czx7c0c8v0q7v0wc4w9s6qgw7hcbqdl3jv1svh";
+    };
+    meta.homepage = "https://github.com/tjdevries/train.nvim/";
+  };
+
+  tremor-vim = buildVimPluginFrom2Nix {
+    pname = "tremor-vim";
+    version = "2020-11-19";
+    src = fetchFromGitHub {
+      owner = "tremor-rs";
+      repo = "tremor-vim";
+      rev = "17e53c33f3b0e825330580034ca60172b8ddaadc";
+      sha256 = "1gy67qjv0iwqza0yx9y8p5yzn5fszrp7szg1527h0ki3q69cfqki";
+    };
+    meta.homepage = "https://github.com/tremor-rs/tremor-vim/";
+  };
+
+  tslime-vim = buildVimPluginFrom2Nix {
+    pname = "tslime-vim";
+    version = "2020-09-09";
+    src = fetchFromGitHub {
+      owner = "jgdavey";
+      repo = "tslime.vim";
+      rev = "9b2b99e409336584103b83c597fdb6234875ae25";
+      sha256 = "048ycam0awcf98zhha6c5n1fk366w559bmjcanik2sqlqw1f74as";
+    };
+    meta.homepage = "https://github.com/jgdavey/tslime.vim/";
+  };
+
+  tsuquyomi = buildVimPluginFrom2Nix {
+    pname = "tsuquyomi";
+    version = "2020-10-16";
+    src = fetchFromGitHub {
+      owner = "Quramy";
+      repo = "tsuquyomi";
+      rev = "144526df5340d3bd0b413e6127c0393de171889a";
+      sha256 = "1amizvbpv4mwpi39x9xn5aj1kjkgl4sgh54irnhs4ga76zn0s09d";
+    };
+    meta.homepage = "https://github.com/Quramy/tsuquyomi/";
+  };
+
+  typescript-vim = buildVimPluginFrom2Nix {
+    pname = "typescript-vim";
+    version = "2020-12-08";
+    src = fetchFromGitHub {
+      owner = "leafgarland";
+      repo = "typescript-vim";
+      rev = "67e81e4292186889a1a519e1bf3a600d671237eb";
+      sha256 = "1mpp4n7qgz3yq4vka8h5sbngc14w5bzd9s9c2csbv9ds8w0lpi0g";
+    };
+    meta.homepage = "https://github.com/leafgarland/typescript-vim/";
+  };
+
+  ultisnips = buildVimPluginFrom2Nix {
+    pname = "ultisnips";
+    version = "2021-04-03";
+    src = fetchFromGitHub {
+      owner = "SirVer";
+      repo = "ultisnips";
+      rev = "b974a13328071de45a85c62ab65c8bfed0142728";
+      sha256 = "1p93dmmprn415y8z44fl697wvh446w7dpskniissxwq4hfyqqgxh";
+    };
+    meta.homepage = "https://github.com/SirVer/ultisnips/";
+  };
+
+  undotree = buildVimPluginFrom2Nix {
+    pname = "undotree";
+    version = "2021-04-02";
+    src = fetchFromGitHub {
+      owner = "mbbill";
+      repo = "undotree";
+      rev = "101edfb795bc17b814efb12e6df6a884507a34f6";
+      sha256 = "0fa2iqgzc85955ixa4hf1mjy7sm7hrbkha5l1scganc9zswd5iv2";
+    };
+    meta.homepage = "https://github.com/mbbill/undotree/";
+  };
+
+  unicode-vim = buildVimPluginFrom2Nix {
+    pname = "unicode-vim";
+    version = "2021-02-01";
+    src = fetchFromGitHub {
+      owner = "chrisbra";
+      repo = "unicode.vim";
+      rev = "afb8db4f81580771c39967e89bc5772e72b9018e";
+      sha256 = "05d15yr5r8265j3yr8yz1dxl8p4p4nack4ldn663rmp29wm1q5pi";
+    };
+    meta.homepage = "https://github.com/chrisbra/unicode.vim/";
+  };
+
+  unite-vim = buildVimPluginFrom2Nix {
+    pname = "unite-vim";
+    version = "2021-02-06";
+    src = fetchFromGitHub {
+      owner = "Shougo";
+      repo = "unite.vim";
+      rev = "b08814362624ded3b462addba4711647879ca308";
+      sha256 = "0hk5xhn9zfas074hgv0y6lbc1jyj5kqjg4zdix8am3s97aqr96ms";
+    };
+    meta.homepage = "https://github.com/Shougo/unite.vim/";
+  };
+
+  utl-vim = buildVimPluginFrom2Nix {
+    pname = "utl-vim";
+    version = "2010-10-18";
+    src = fetchFromGitHub {
+      owner = "vim-scripts";
+      repo = "utl.vim";
+      rev = "67a6506a7a8a3847d00d3af3e2ed9707460d5ce5";
+      sha256 = "0ax68nmzlka9193n2h82qzvhzv4dv6lm7rg3b1vhj2pn1r6ci6p4";
+    };
+    meta.homepage = "https://github.com/vim-scripts/utl.vim/";
+  };
+
+  vader-vim = buildVimPluginFrom2Nix {
+    pname = "vader-vim";
+    version = "2020-02-13";
+    src = fetchFromGitHub {
+      owner = "junegunn";
+      repo = "vader.vim";
+      rev = "6fff477431ac3191c69a3a5e5f187925466e275a";
+      sha256 = "153cr1mrf5w5lyr8374brwx1z5yl9h0cnijxnd3xikh3yi3pbmwk";
+    };
+    meta.homepage = "https://github.com/junegunn/vader.vim/";
+  };
+
+  vCoolor-vim = buildVimPluginFrom2Nix {
+    pname = "vCoolor-vim";
+    version = "2020-10-14";
+    src = fetchFromGitHub {
+      owner = "KabbAmine";
+      repo = "vCoolor.vim";
+      rev = "bc19d684af09b1e146cf72176eea1ecded84882c";
+      sha256 = "03vaghwqr3k0nls365wk4qwzmvdvdvq41q02c3l5qv2vsdikmz5i";
+    };
+    meta.homepage = "https://github.com/KabbAmine/vCoolor.vim/";
+  };
+
+  verilog_systemverilog-vim = buildVimPluginFrom2Nix {
+    pname = "verilog_systemverilog-vim";
+    version = "2021-01-16";
+    src = fetchFromGitHub {
+      owner = "vhda";
+      repo = "verilog_systemverilog.vim";
+      rev = "0b88f2ccf81983944bf00d15ec810dd807053d19";
+      sha256 = "0zaxz1j2v8nvhd9x6bx3sj95i7h7c7029hmccls777ikyp6ynf0r";
+    };
+    meta.homepage = "https://github.com/vhda/verilog_systemverilog.vim/";
+  };
+
+  vim-abolish = buildVimPluginFrom2Nix {
+    pname = "vim-abolish";
+    version = "2021-03-20";
+    src = fetchFromGitHub {
+      owner = "tpope";
+      repo = "vim-abolish";
+      rev = "3f0c8faadf0c5b68bcf40785c1c42e3731bfa522";
+      sha256 = "1w9zim2v1av3f43z8q7zh0ia8dgjxjwnvmzd4j3y25vy25avn0lb";
+    };
+    meta.homepage = "https://github.com/tpope/vim-abolish/";
+  };
+
+  vim-addon-actions = buildVimPluginFrom2Nix {
+    pname = "vim-addon-actions";
+    version = "2020-05-03";
+    src = fetchFromGitHub {
+      owner = "MarcWeber";
+      repo = "vim-addon-actions";
+      rev = "6d350ca6075779af32016f0a0bd3e3521ec4a9eb";
+      sha256 = "1098jc4amwfvcrfjfa5hgmyrjrbl680c3s56h7grvyl3i6n4hj34";
+    };
+    meta.homepage = "https://github.com/MarcWeber/vim-addon-actions/";
+  };
+
+  vim-addon-async = buildVimPluginFrom2Nix {
+    pname = "vim-addon-async";
+    version = "2017-03-20";
+    src = fetchFromGitHub {
+      owner = "MarcWeber";
+      repo = "vim-addon-async";
+      rev = "eca316a4480f68c2cb62128f3187dc7b2002afde";
+      sha256 = "1lk8ma51dd0syi73vq5r4qk9cpy6cq3llizvh94hmxblfjpvrs7q";
+    };
+    meta.homepage = "https://github.com/MarcWeber/vim-addon-async/";
+  };
+
+  vim-addon-background-cmd = buildVimPluginFrom2Nix {
+    pname = "vim-addon-background-cmd";
+    version = "2015-12-11";
+    src = fetchFromGitHub {
+      owner = "MarcWeber";
+      repo = "vim-addon-background-cmd";
+      rev = "abf2abf339652d2bc79da81f9d131edfe2755f5a";
+      sha256 = "0csy68x686l3x5ancidxb5b6prg9k7ikybqzq3klx0gs5rmksfy4";
+    };
+    meta.homepage = "https://github.com/MarcWeber/vim-addon-background-cmd/";
+  };
+
+  vim-addon-commenting = buildVimPluginFrom2Nix {
+    pname = "vim-addon-commenting";
+    version = "2013-06-10";
+    src = fetchFromGitHub {
+      owner = "MarcWeber";
+      repo = "vim-addon-commenting";
+      rev = "b7cf748ac1c9bf555cbd347589e3b7196030d20b";
+      sha256 = "0alak8h33vada2ckb0v06y82qlib5mhyc2yswlv1rqh8ypzhq3mc";
+    };
+    meta.homepage = "https://github.com/MarcWeber/vim-addon-commenting/";
+  };
+
+  vim-addon-completion = buildVimPluginFrom2Nix {
+    pname = "vim-addon-completion";
+    version = "2015-02-10";
+    src = fetchFromGitHub {
+      owner = "MarcWeber";
+      repo = "vim-addon-completion";
+      rev = "021c449a5ce1ce4ac0af5955e05b0279c1cc0e75";
+      sha256 = "1ld059y2qwlc5bdfjm2p314s1qh31lxs54g944pw49r46s5nlslr";
+    };
+    meta.homepage = "https://github.com/MarcWeber/vim-addon-completion/";
+  };
+
+  vim-addon-errorformats = buildVimPluginFrom2Nix {
+    pname = "vim-addon-errorformats";
+    version = "2019-07-16";
+    src = fetchFromGitHub {
+      owner = "MarcWeber";
+      repo = "vim-addon-errorformats";
+      rev = "bb83675cb0b8cc377fb0a79ba492ba2445674ba6";
+      sha256 = "09cds33lb5gm69wv5plgidprm8nf52vvg9qdzpq9mihvinvj5qv7";
+    };
+    meta.homepage = "https://github.com/MarcWeber/vim-addon-errorformats/";
+  };
+
+  vim-addon-goto-thing-at-cursor = buildVimPluginFrom2Nix {
+    pname = "vim-addon-goto-thing-at-cursor";
+    version = "2020-02-07";
+    src = fetchFromGitHub {
+      owner = "MarcWeber";
+      repo = "vim-addon-goto-thing-at-cursor";
+      rev = "44f0cba27013cfc1f4e46697ba6de30b2a128cf7";
+      sha256 = "1s9021qnn95bzl8r7nx818j1kmjfjzg8xg07s071ic96lv40bcqp";
+    };
+    meta.homepage = "https://github.com/MarcWeber/vim-addon-goto-thing-at-cursor/";
+  };
+
+  vim-addon-local-vimrc = buildVimPluginFrom2Nix {
+    pname = "vim-addon-local-vimrc";
+    version = "2015-03-19";
+    src = fetchFromGitHub {
+      owner = "MarcWeber";
+      repo = "vim-addon-local-vimrc";
+      rev = "6a27f95b35befa70cd0d049329cd0920566c764b";
+      sha256 = "0n8lwl1gyak149p7jpgm0qbmfj8hcg8hirx3dxdhizw0yc47ws7h";
+    };
+    meta.homepage = "https://github.com/MarcWeber/vim-addon-local-vimrc/";
+  };
+
+  vim-addon-manager = buildVimPluginFrom2Nix {
+    pname = "vim-addon-manager";
+    version = "2018-07-27";
+    src = fetchFromGitHub {
+      owner = "MarcWeber";
+      repo = "vim-addon-manager";
+      rev = "d9e865f3c2de5d9b7eabbc976f606cf1b89e29ea";
+      sha256 = "0mgm2dqw8js9gajkrvm5n3k9m1grjxcrfc9xdzb3jxw1c0njdhcy";
+    };
+    meta.homepage = "https://github.com/MarcWeber/vim-addon-manager/";
+  };
+
+  vim-addon-mru = buildVimPluginFrom2Nix {
+    pname = "vim-addon-mru";
+    version = "2013-08-08";
+    src = fetchFromGitHub {
+      owner = "MarcWeber";
+      repo = "vim-addon-mru";
+      rev = "e41e39bd9d1bf78ccfd8d5e1bc05ae5e1026c2bb";
+      sha256 = "0q6rxr9nrp63kidr3m3c2z5sda4g813pzshg0scxkjr8dxwhzdqm";
+    };
+    meta.homepage = "https://github.com/MarcWeber/vim-addon-mru/";
+  };
+
+  vim-addon-mw-utils = buildVimPluginFrom2Nix {
+    pname = "vim-addon-mw-utils";
+    version = "2020-02-07";
+    src = fetchFromGitHub {
+      owner = "MarcWeber";
+      repo = "vim-addon-mw-utils";
+      rev = "6aaf4fee472db7cbec6d2c8eea69fdf3a8f8a75d";
+      sha256 = "1w99r6ck6gqg6b0fk9qj07q0b7p2qxav0ar6x294g34wsqij6xj5";
+    };
+    meta.homepage = "https://github.com/MarcWeber/vim-addon-mw-utils/";
+  };
+
+  vim-addon-nix = buildVimPluginFrom2Nix {
+    pname = "vim-addon-nix";
+    version = "2017-09-11";
+    src = fetchFromGitHub {
+      owner = "MarcWeber";
+      repo = "vim-addon-nix";
+      rev = "3001a9db5f816dd7af11384f15415bddd146ef86";
+      sha256 = "195z2yz09wirpqjpsha8x7qcr9is1q8qph4j0svws6qbqrkh8ryy";
+    };
+    meta.homepage = "https://github.com/MarcWeber/vim-addon-nix/";
+  };
+
+  vim-addon-other = buildVimPluginFrom2Nix {
+    pname = "vim-addon-other";
+    version = "2020-02-07";
+    src = fetchFromGitHub {
+      owner = "MarcWeber";
+      repo = "vim-addon-other";
+      rev = "7a395970b8817296c11e1de8310194c4ae6e1f89";
+      sha256 = "0sding7rc11imf5k9ki4h426wjiz8ywxa81v74xj3m23zm6l77sa";
+    };
+    meta.homepage = "https://github.com/MarcWeber/vim-addon-other/";
+  };
+
+  vim-addon-php-manual = buildVimPluginFrom2Nix {
+    pname = "vim-addon-php-manual";
+    version = "2015-01-01";
+    src = fetchFromGitHub {
+      owner = "MarcWeber";
+      repo = "vim-addon-php-manual";
+      rev = "5f9810dd1f6e9f36a45f637ae6260ccff09256ff";
+      sha256 = "1kc67f12wccqdza069b75lpcbqp4kv4r23i4mfz0ihwif5mfnhir";
+    };
+    meta.homepage = "https://github.com/MarcWeber/vim-addon-php-manual/";
+  };
+
+  vim-addon-signs = buildVimPluginFrom2Nix {
+    pname = "vim-addon-signs";
+    version = "2013-04-19";
+    src = fetchFromGitHub {
+      owner = "MarcWeber";
+      repo = "vim-addon-signs";
+      rev = "17a49f293d18174ff09d1bfff5ba86e8eee8e8ae";
+      sha256 = "0i4gfp30hmw1vqjl6zxjrgkca3ikdkcnjmma2mncjmcr6f59kjzy";
+    };
+    meta.homepage = "https://github.com/MarcWeber/vim-addon-signs/";
+  };
+
+  vim-addon-sql = buildVimPluginFrom2Nix {
+    pname = "vim-addon-sql";
+    version = "2017-02-11";
+    src = fetchFromGitHub {
+      owner = "MarcWeber";
+      repo = "vim-addon-sql";
+      rev = "048a139af36829fce670c8ff80d3aad927557ee6";
+      sha256 = "0ihm157sby6csdwsnw2gwh3jmm3prm1mxwgkx2hsfwlmpb1vwwm3";
+    };
+    meta.homepage = "https://github.com/MarcWeber/vim-addon-sql/";
+  };
+
+  vim-addon-syntax-checker = buildVimPluginFrom2Nix {
+    pname = "vim-addon-syntax-checker";
+    version = "2017-06-26";
+    src = fetchFromGitHub {
+      owner = "MarcWeber";
+      repo = "vim-addon-syntax-checker";
+      rev = "739e5719b77c6aea3299c27fc1f4238ac54a8344";
+      sha256 = "1rcn1ps06156nyglvxg6m7pn3vhvmnv5ad6kidp59hggyr5332i9";
+    };
+    meta.homepage = "https://github.com/MarcWeber/vim-addon-syntax-checker/";
+  };
+
+  vim-addon-toggle-buffer = buildVimPluginFrom2Nix {
+    pname = "vim-addon-toggle-buffer";
+    version = "2012-01-13";
+    src = fetchFromGitHub {
+      owner = "MarcWeber";
+      repo = "vim-addon-toggle-buffer";
+      rev = "a1b38b9c5709cba666ed2d84ef06548f675c6b0b";
+      sha256 = "1xq38kfdm36c34ln66znw841q797w5gm8bpq1x64bsf2h6n3ml03";
+    };
+    meta.homepage = "https://github.com/MarcWeber/vim-addon-toggle-buffer/";
+  };
+
+  vim-addon-xdebug = buildVimPluginFrom2Nix {
+    pname = "vim-addon-xdebug";
+    version = "2014-08-29";
+    src = fetchFromGitHub {
+      owner = "MarcWeber";
+      repo = "vim-addon-xdebug";
+      rev = "45f26407305b4ce6f8f5f37d2b5e6e4354104172";
+      sha256 = "1i64ppdfp2qqq7vw1jf160mj4ikc04v39iazdab83xmiqjsh8ixw";
+    };
+    meta.homepage = "https://github.com/MarcWeber/vim-addon-xdebug/";
+  };
+
+  vim-after-object = buildVimPluginFrom2Nix {
+    pname = "vim-after-object";
+    version = "2018-09-17";
+    src = fetchFromGitHub {
+      owner = "junegunn";
+      repo = "vim-after-object";
+      rev = "7f52106df8a05e9bc1c53960c31a55f77e303903";
+      sha256 = "13726m0c73n5pw9gil4ahbg71ibklrwkw9yvbr6qxxvn6qyijpdy";
+    };
+    meta.homepage = "https://github.com/junegunn/vim-after-object/";
+  };
+
+  vim-airline = buildVimPluginFrom2Nix {
+    pname = "vim-airline";
+    version = "2021-03-27";
+    src = fetchFromGitHub {
+      owner = "vim-airline";
+      repo = "vim-airline";
+      rev = "ed60e1d36912f64fdbed5640532b1067e11557ca";
+      sha256 = "0yijan5nknkkxr36rncscm043badn49w6778nwyazi2fx4266jfn";
+    };
+    meta.homepage = "https://github.com/vim-airline/vim-airline/";
+  };
+
+  vim-airline-clock = buildVimPluginFrom2Nix {
+    pname = "vim-airline-clock";
+    version = "2018-05-08";
+    src = fetchFromGitHub {
+      owner = "enricobacis";
+      repo = "vim-airline-clock";
+      rev = "a752ae89d833ce14f87e303f3f479c01065077ca";
+      sha256 = "0wbaxm1k9j4cl5vw1wppsds0afc0h3n2ipp8xhgdh5jswjhr6wlc";
+    };
+    meta.homepage = "https://github.com/enricobacis/vim-airline-clock/";
+  };
+
+  vim-airline-themes = buildVimPluginFrom2Nix {
+    pname = "vim-airline-themes";
+    version = "2021-03-03";
+    src = fetchFromGitHub {
+      owner = "vim-airline";
+      repo = "vim-airline-themes";
+      rev = "fa808d74e0aacf131337b58f01ee45fd3d3588af";
+      sha256 = "02dq887676dq2rm1fxpzf3piyabs6zj0rvc70nxa5vvlv68qp6k7";
+    };
+    meta.homepage = "https://github.com/vim-airline/vim-airline-themes/";
+  };
+
+  vim-android = buildVimPluginFrom2Nix {
+    pname = "vim-android";
+    version = "2021-02-18";
+    src = fetchFromGitHub {
+      owner = "hsanson";
+      repo = "vim-android";
+      rev = "1731cd3865669ebec84e6f32a87ccf16a00690fd";
+      sha256 = "0k6ch5kg8jlqa04apjdi7xr5s85ibdvg4gq4iyxh78xffw1xzafl";
+    };
+    meta.homepage = "https://github.com/hsanson/vim-android/";
+  };
+
+  vim-anzu = buildVimPluginFrom2Nix {
+    pname = "vim-anzu";
+    version = "2020-06-10";
+    src = fetchFromGitHub {
+      owner = "osyo-manga";
+      repo = "vim-anzu";
+      rev = "1b95ec384487e559f0ee70e0f46c33683ff533ac";
+      sha256 = "0q6s9bb1yv7ir2al4gv69vv4c8m09j1ax47qbhchgz23iwka3vmz";
+    };
+    meta.homepage = "https://github.com/osyo-manga/vim-anzu/";
+  };
+
+  vim-apm = buildVimPluginFrom2Nix {
+    pname = "vim-apm";
+    version = "2020-09-28";
+    src = fetchFromGitHub {
+      owner = "ThePrimeagen";
+      repo = "vim-apm";
+      rev = "2da35c35febbe98a6704495cd4e0b9526a0651e3";
+      sha256 = "09amrb7bzrnwga8cm21fm4ylp2l0jd7cyfsf43fcym3f1k0bycwb";
+    };
+    meta.homepage = "https://github.com/ThePrimeagen/vim-apm/";
+  };
+
+  vim-asterisk = buildVimPluginFrom2Nix {
+    pname = "vim-asterisk";
+    version = "2020-02-03";
+    src = fetchFromGitHub {
+      owner = "haya14busa";
+      repo = "vim-asterisk";
+      rev = "77e97061d6691637a034258cc415d98670698459";
+      sha256 = "1bm99j4vskbgzfn09567qi0462dvjrpdkifc4hg24bi02bx9hjrj";
+    };
+    meta.homepage = "https://github.com/haya14busa/vim-asterisk/";
+  };
+
+  vim-auto-save = buildVimPluginFrom2Nix {
+    pname = "vim-auto-save";
+    version = "2019-03-19";
+    src = fetchFromGitHub {
+      owner = "907th";
+      repo = "vim-auto-save";
+      rev = "8c1d5dc919030aa712ad7201074ffb60961e9dda";
+      sha256 = "0dj45g56n0q4advc9sgch11ghb2h5ahk601gndwy02a0937axjh2";
+    };
+    meta.homepage = "https://github.com/907th/vim-auto-save/";
+  };
+
+  vim-autoformat = buildVimPluginFrom2Nix {
+    pname = "vim-autoformat";
+    version = "2021-04-01";
+    src = fetchFromGitHub {
+      owner = "Chiel92";
+      repo = "vim-autoformat";
+      rev = "781c72c0625728eb5677a6952e57f282070666f8";
+      sha256 = "14l7h9h76x7cvvka8djn08dh3rmj34bycm8vqavh20nf2v8n9j2g";
+    };
+    meta.homepage = "https://github.com/Chiel92/vim-autoformat/";
+  };
+
+  vim-automkdir = buildVimPluginFrom2Nix {
+    pname = "vim-automkdir";
+    version = "2016-01-17";
+    src = fetchFromGitHub {
+      owner = "benizi";
+      repo = "vim-automkdir";
+      rev = "dec143a8d9b266f73a42c63ede85bfc26280f79d";
+      sha256 = "00ix0y1ijbis8pj7pf6gv2g5z2s7kxwlr0viybwrs0li5acym6jp";
+    };
+    meta.homepage = "https://github.com/benizi/vim-automkdir/";
+  };
+
+  vim-autoswap = buildVimPluginFrom2Nix {
+    pname = "vim-autoswap";
+    version = "2019-01-09";
+    src = fetchFromGitHub {
+      owner = "gioele";
+      repo = "vim-autoswap";
+      rev = "e587e4b14a605d8921942ba65a37583813289272";
+      sha256 = "0l0ijbdl2s9p5i3cxfkq8jncncz38qprp51whbjcda485d1knk9n";
+    };
+    meta.homepage = "https://github.com/gioele/vim-autoswap/";
+  };
+
+  vim-bazel = buildVimPluginFrom2Nix {
+    pname = "vim-bazel";
+    version = "2021-01-31";
+    src = fetchFromGitHub {
+      owner = "bazelbuild";
+      repo = "vim-bazel";
+      rev = "58c750d13ec2337ba3e5992f96891bbb843a9dbf";
+      sha256 = "0xsgj1j8xamkri75cjnih5xzwp8y7g1i7hgbbbmknz5d8jm3p204";
+    };
+    meta.homepage = "https://github.com/bazelbuild/vim-bazel/";
+  };
+
+  vim-bbye = buildVimPluginFrom2Nix {
+    pname = "vim-bbye";
+    version = "2018-03-03";
+    src = fetchFromGitHub {
+      owner = "moll";
+      repo = "vim-bbye";
+      rev = "25ef93ac5a87526111f43e5110675032dbcacf56";
+      sha256 = "0dlifpbd05fcgndpkgb31ww8p90pwdbizmgkkq00qkmvzm1ik4y4";
+    };
+    meta.homepage = "https://github.com/moll/vim-bbye/";
+  };
+
+  vim-beancount = buildVimPluginFrom2Nix {
+    pname = "vim-beancount";
+    version = "2021-03-07";
+    src = fetchFromGitHub {
+      owner = "nathangrigg";
+      repo = "vim-beancount";
+      rev = "30b55500094325af9e9498b72e75c8c1090df436";
+      sha256 = "0bh7q7s3zb2yrnck3zx1cx0kv8lm8zp4p5fwj6kv35y27v109pfm";
+    };
+    meta.homepage = "https://github.com/nathangrigg/vim-beancount/";
+  };
+
+  vim-better-whitespace = buildVimPluginFrom2Nix {
+    pname = "vim-better-whitespace";
+    version = "2020-03-24";
+    src = fetchFromGitHub {
+      owner = "ntpeters";
+      repo = "vim-better-whitespace";
+      rev = "8cf4b2175dd61416c2fe7d3234324a6c59d678de";
+      sha256 = "1iga1xdzygnr9rhv0kw01nr3vahl2d486p06slmri2vy8ngzym0q";
+    };
+    meta.homepage = "https://github.com/ntpeters/vim-better-whitespace/";
+  };
+
+  vim-bsv = buildVimPluginFrom2Nix {
+    pname = "vim-bsv";
+    version = "2020-11-08";
+    src = fetchFromGitHub {
+      owner = "mtikekar";
+      repo = "vim-bsv";
+      rev = "b03893b98f5b772297e48671a9c5f92f1c7d10eb";
+      sha256 = "1cd0jmxmb30c50a0ssa96a34qm2r3vasnn0x6ah9azx75k4anrcx";
+    };
+    meta.homepage = "https://github.com/mtikekar/vim-bsv/";
+  };
+
+  vim-buffergator = buildVimPluginFrom2Nix {
+    pname = "vim-buffergator";
+    version = "2018-05-02";
+    src = fetchFromGitHub {
+      owner = "jeetsukumaran";
+      repo = "vim-buffergator";
+      rev = "947b60dca4d4fc6a041a6ec84b17ca6736d1b916";
+      sha256 = "0g7ymflzfdsj5793s32gc83bidqys5dxmw455viwpqgmgjxnar5c";
+    };
+    meta.homepage = "https://github.com/jeetsukumaran/vim-buffergator/";
+  };
+
+  vim-bufferline = buildVimPluginFrom2Nix {
+    pname = "vim-bufferline";
+    version = "2016-02-09";
+    src = fetchFromGitHub {
+      owner = "bling";
+      repo = "vim-bufferline";
+      rev = "651fd010aa9613a4b8636a4af8a2db0d22800262";
+      sha256 = "0zls47a3v8dv3h63drbak1mxf3j2x3scvclk7bjwzlk2yp447das";
+    };
+    meta.homepage = "https://github.com/bling/vim-bufferline/";
+  };
+
+  vim-bufkill = buildVimPluginFrom2Nix {
+    pname = "vim-bufkill";
+    version = "2020-08-04";
+    src = fetchFromGitHub {
+      owner = "qpkorr";
+      repo = "vim-bufkill";
+      rev = "2bd6d7e791668ea52bb26be2639406fcf617271f";
+      sha256 = "1cvma03bg9psil67kg1x90lny7a31ljz5shybcl1jrfpzsybcqvg";
+    };
+    meta.homepage = "https://github.com/qpkorr/vim-bufkill/";
+  };
+
+  vim-capslock = buildVimPluginFrom2Nix {
+    pname = "vim-capslock";
+    version = "2019-11-13";
+    src = fetchFromGitHub {
+      owner = "tpope";
+      repo = "vim-capslock";
+      rev = "84c9e467a7b8e5aabf33674ed17c6356cf98777c";
+      sha256 = "1c2fr8s9im3vxrszsrzm6wvad6disbdslmq6lqdp4603ialy4kja";
+    };
+    meta.homepage = "https://github.com/tpope/vim-capslock/";
+  };
+
+  vim-carbon-now-sh = buildVimPluginFrom2Nix {
+    pname = "vim-carbon-now-sh";
+    version = "2020-10-28";
+    src = fetchFromGitHub {
+      owner = "kristijanhusak";
+      repo = "vim-carbon-now-sh";
+      rev = "f4a3e5c9be2e587511f79e46fb0b48d6d646d719";
+      sha256 = "1ldv9l0swh6wk3wpyy0apnmg9gfcdzkgfdv8p0qm7j7pqdz981br";
+    };
+    meta.homepage = "https://github.com/kristijanhusak/vim-carbon-now-sh/";
+  };
+
+  vim-choosewin = buildVimPluginFrom2Nix {
+    pname = "vim-choosewin";
+    version = "2021-04-06";
+    src = fetchFromGitHub {
+      owner = "t9md";
+      repo = "vim-choosewin";
+      rev = "1ca7da94aa1b8761f4212194e3c55e4a080d6525";
+      sha256 = "0nr6k8g0l27g4lczsy30cnh1il547qgbs4xl936v43gp4wvybah4";
+    };
+    meta.homepage = "https://github.com/t9md/vim-choosewin/";
+  };
+
+  vim-clang-format = buildVimPluginFrom2Nix {
+    pname = "vim-clang-format";
+    version = "2019-05-15";
+    src = fetchFromGitHub {
+      owner = "rhysd";
+      repo = "vim-clang-format";
+      rev = "95593b67723f23979cd7344ecfd049f2f917830f";
+      sha256 = "0n0k13k63l8n0ixs4zrhlz923apvdp2mldadxqlhmvsvncmlqmpn";
+    };
+    meta.homepage = "https://github.com/rhysd/vim-clang-format/";
+  };
+
+  vim-clap = buildVimPluginFrom2Nix {
+    pname = "vim-clap";
+    version = "2021-04-03";
+    src = fetchFromGitHub {
+      owner = "liuchengxu";
+      repo = "vim-clap";
+      rev = "97a2649ecb75cbad4081a9f575b2bb7f17582a3c";
+      sha256 = "0jn8iyhw80xasnp7b09yqjxa46jkcrfmy2r8b7ynxan9a37b206i";
+    };
+    meta.homepage = "https://github.com/liuchengxu/vim-clap/";
+  };
+
+  vim-clojure-highlight = buildVimPluginFrom2Nix {
+    pname = "vim-clojure-highlight";
+    version = "2015-07-05";
+    src = fetchFromGitHub {
+      owner = "guns";
+      repo = "vim-clojure-highlight";
+      rev = "9ac6cb8fef04b2c243377adb671324a60952aee0";
+      sha256 = "0fg3faj0fq7b8pqr0i33qdg2xfd5966lrjl1wkq6jcgvdqamhz0y";
+    };
+    meta.homepage = "https://github.com/guns/vim-clojure-highlight/";
+  };
+
+  vim-clojure-static = buildVimPluginFrom2Nix {
+    pname = "vim-clojure-static";
+    version = "2017-10-23";
+    src = fetchFromGitHub {
+      owner = "guns";
+      repo = "vim-clojure-static";
+      rev = "fae5710a0b79555fe3296145be4f85148266771a";
+      sha256 = "0s98qrhv7xh7bvh8bm1vaxpw3n2mcxayay3k90ibgjrv1jpyvzx7";
+    };
+    meta.homepage = "https://github.com/guns/vim-clojure-static/";
+  };
+
+  vim-closer = buildVimPluginFrom2Nix {
+    pname = "vim-closer";
+    version = "2021-03-28";
+    src = fetchFromGitHub {
+      owner = "rstacruz";
+      repo = "vim-closer";
+      rev = "26bba80f4d987f12141da522d69aa1fa4aff4436";
+      sha256 = "1pyi5akzvvkdngm577m1c1210r0yypdwsvp1y7ag6gdfnls75xws";
+    };
+    meta.homepage = "https://github.com/rstacruz/vim-closer/";
+  };
+
+  vim-closetag = buildVimPluginFrom2Nix {
+    pname = "vim-closetag";
+    version = "2021-03-24";
+    src = fetchFromGitHub {
+      owner = "alvan";
+      repo = "vim-closetag";
+      rev = "c0779ef575d5c239162f4ca3506cfb4a95d45a58";
+      sha256 = "1mkn6d7m23ak06pl8i328hd9x6qx5fzrg8ijz32lgd4a56k98n6i";
+    };
+    meta.homepage = "https://github.com/alvan/vim-closetag/";
+  };
+
+  vim-codefmt = buildVimPluginFrom2Nix {
+    pname = "vim-codefmt";
+    version = "2021-03-28";
+    src = fetchFromGitHub {
+      owner = "google";
+      repo = "vim-codefmt";
+      rev = "048baf8361d7ea24bfbaa4427ab4de08c39b0d57";
+      sha256 = "17xnxka4q7fqpl52x5fh2kpqzs7h1ql2lvv6sv7a0apf2qafs0qy";
+    };
+    meta.homepage = "https://github.com/google/vim-codefmt/";
+  };
+
+  vim-coffee-script = buildVimPluginFrom2Nix {
+    pname = "vim-coffee-script";
+    version = "2020-12-20";
+    src = fetchFromGitHub {
+      owner = "kchmck";
+      repo = "vim-coffee-script";
+      rev = "28421258a8dde5a50deafbfc19cd9873cacfaa79";
+      sha256 = "07k7whr32x782jyvzl2vg6c2pdrj5jynf4b4f2my7502rgv03w02";
+    };
+    meta.homepage = "https://github.com/kchmck/vim-coffee-script/";
+  };
+
+  vim-colemak = buildVimPluginFrom2Nix {
+    pname = "vim-colemak";
+    version = "2016-10-16";
+    src = fetchFromGitHub {
+      owner = "kalbasit";
+      repo = "vim-colemak";
+      rev = "6ac1c0bf362845355c65dfeab9a9987c1b4dc7ec";
+      sha256 = "1li7yc5vglrhf7w7i7gs2i7ihdb1bhx85basmpgqlf7790lv1599";
+    };
+    meta.homepage = "https://github.com/kalbasit/vim-colemak/";
+  };
+
+  vim-colors-solarized = buildVimPluginFrom2Nix {
+    pname = "vim-colors-solarized";
+    version = "2011-05-09";
+    src = fetchFromGitHub {
+      owner = "altercation";
+      repo = "vim-colors-solarized";
+      rev = "528a59f26d12278698bb946f8fb82a63711eec21";
+      sha256 = "05d3lmd1shyagvr3jygqghxd3k8a4vp32723fvxdm57fdrlyzcm1";
+    };
+    meta.homepage = "https://github.com/altercation/vim-colors-solarized/";
+  };
+
+  vim-colorschemes = buildVimPluginFrom2Nix {
+    pname = "vim-colorschemes";
+    version = "2020-05-15";
+    src = fetchFromGitHub {
+      owner = "flazz";
+      repo = "vim-colorschemes";
+      rev = "fd8f122cef604330c96a6a6e434682dbdfb878c9";
+      sha256 = "1cg8q7w0vgl73aw1b9zz0zh5vw5d2pm8pm54fhfzva4azg56f416";
+    };
+    meta.homepage = "https://github.com/flazz/vim-colorschemes/";
+  };
+
+  vim-colorstepper = buildVimPluginFrom2Nix {
+    pname = "vim-colorstepper";
+    version = "2016-01-28";
+    src = fetchFromGitHub {
+      owner = "jonbri";
+      repo = "vim-colorstepper";
+      rev = "f23ba0d995d41508a2dc9471cf31d3d01a4b5f05";
+      sha256 = "05ykxn0gmh8liz0zv5hb8df1ajggxp88izq3825m0yb3ma3k1jqs";
+    };
+    meta.homepage = "https://github.com/jonbri/vim-colorstepper/";
+  };
+
+  vim-commentary = buildVimPluginFrom2Nix {
+    pname = "vim-commentary";
+    version = "2021-03-23";
+    src = fetchFromGitHub {
+      owner = "tpope";
+      repo = "vim-commentary";
+      rev = "349340debb34f6302931f0eb7139b2c11dfdf427";
+      sha256 = "01lpfcn2hmvxddcf97f4qx5vksxj1hwrxb0c8ri59z9lb9z2hgjd";
+    };
+    meta.homepage = "https://github.com/tpope/vim-commentary/";
+  };
+
+  vim-concourse = buildVimPluginFrom2Nix {
+    pname = "vim-concourse";
+    version = "2016-11-21";
+    src = fetchFromGitHub {
+      owner = "luan";
+      repo = "vim-concourse";
+      rev = "7f61ca5d291fddd6d7ff04b03bf347f04bfe4344";
+      sha256 = "0ilf7r0lwx8f7shqxbs9av3gsnary8nbh3xhrfzwsivh8psi7qf6";
+    };
+    meta.homepage = "https://github.com/luan/vim-concourse/";
+  };
+
+  vim-cool = buildVimPluginFrom2Nix {
+    pname = "vim-cool";
+    version = "2020-04-18";
+    src = fetchFromGitHub {
+      owner = "romainl";
+      repo = "vim-cool";
+      rev = "27ad4ecf7532b750fadca9f36e1c5498fc225af2";
+      sha256 = "1in44gf7hs978nc9328zh1kj3jh04kcinw0m8spcbgj079782sg8";
+    };
+    meta.homepage = "https://github.com/romainl/vim-cool/";
+  };
+
+  vim-cpp-enhanced-highlight = buildVimPluginFrom2Nix {
+    pname = "vim-cpp-enhanced-highlight";
+    version = "2019-11-14";
+    src = fetchFromGitHub {
+      owner = "octol";
+      repo = "vim-cpp-enhanced-highlight";
+      rev = "27e0ffc215b81fa5aa87eca396acd4421d36c060";
+      sha256 = "15nyd4yssswyi4brkch09rca0qh7p77li4xyrivmiapkr4a60vwb";
+    };
+    meta.homepage = "https://github.com/octol/vim-cpp-enhanced-highlight/";
+  };
+
+  vim-crates = buildVimPluginFrom2Nix {
+    pname = "vim-crates";
+    version = "2021-04-03";
+    src = fetchFromGitHub {
+      owner = "mhinz";
+      repo = "vim-crates";
+      rev = "96a40ee5c976390c142b0074d7a4a7e54b0cfa00";
+      sha256 = "0nd8w4rx1s0fnhxn0ngl3dxj94ar8vjn611684v5pbxdpj6b92fm";
+    };
+    meta.homepage = "https://github.com/mhinz/vim-crates/";
+  };
+
+  vim-csharp = buildVimPluginFrom2Nix {
+    pname = "vim-csharp";
+    version = "2017-03-29";
+    src = fetchFromGitHub {
+      owner = "OrangeT";
+      repo = "vim-csharp";
+      rev = "b5982fc69bba7d507638a308d6875b031054280d";
+      sha256 = "16sf3yqvd36b4rkrh6w7jskvlkrgymwa13xcvh586lmlc7g6ilcx";
+    };
+    meta.homepage = "https://github.com/OrangeT/vim-csharp/";
+  };
+
+  vim-css-color = buildVimPluginFrom2Nix {
+    pname = "vim-css-color";
+    version = "2021-02-02";
+    src = fetchFromGitHub {
+      owner = "ap";
+      repo = "vim-css-color";
+      rev = "8dd7f1bf25acee493a5114e627ea90a9850c5fa8";
+      sha256 = "0pjq14i7w2snlbzsqhfdn0fkribjsyngg6fcmpgacm4jvx3iviql";
+    };
+    meta.homepage = "https://github.com/ap/vim-css-color/";
+  };
+
+  vim-cue = buildVimPluginFrom2Nix {
+    pname = "vim-cue";
+    version = "2020-10-26";
+    src = fetchFromGitHub {
+      owner = "jjo";
+      repo = "vim-cue";
+      rev = "9e8bef1198817b6bae1143fecd965403d65d2466";
+      sha256 = "0rq74znq9mx5p925jd120l5apjqdqp6xy6llzhf2gq5cxpg62hjl";
+    };
+    meta.homepage = "https://github.com/jjo/vim-cue/";
+  };
+
+  vim-cursorword = buildVimPluginFrom2Nix {
+    pname = "vim-cursorword";
+    version = "2020-06-20";
+    src = fetchFromGitHub {
+      owner = "itchyny";
+      repo = "vim-cursorword";
+      rev = "cc8114226ceefb5cafe1890e0900d3efb7dab1fd";
+      sha256 = "1x5ljk82bxc3qhrq5pz0dsab8rg1234syd1xmpkgvif52s9g4mfk";
+    };
+    meta.homepage = "https://github.com/itchyny/vim-cursorword/";
+  };
+
+  vim-cute-python = buildVimPluginFrom2Nix {
+    pname = "vim-cute-python";
+    version = "2020-11-17";
+    src = fetchFromGitHub {
+      owner = "ehamberg";
+      repo = "vim-cute-python";
+      rev = "18cd5e0f63ae5ae74398051c0de9a27d1746e5a5";
+      sha256 = "1svr8r1rva6lq9ypzazrlw5gabnipjyhd2bs43cpfcwx0ms04d2k";
+    };
+    meta.homepage = "https://github.com/ehamberg/vim-cute-python/";
+  };
+
+  vim-dadbod = buildVimPluginFrom2Nix {
+    pname = "vim-dadbod";
+    version = "2021-04-02";
+    src = fetchFromGitHub {
+      owner = "tpope";
+      repo = "vim-dadbod";
+      rev = "33c86149c0aa114a5d14a1a2f2b5cbcc78cc0116";
+      sha256 = "01rqs6hcfd1ih1hr8bbwl1f3g86q41g0jbvrn5fpdfr9ccjy2ip1";
+    };
+    meta.homepage = "https://github.com/tpope/vim-dadbod/";
+  };
+
+  vim-dasht = buildVimPluginFrom2Nix {
+    pname = "vim-dasht";
+    version = "2020-07-11";
+    src = fetchFromGitHub {
+      owner = "sunaku";
+      repo = "vim-dasht";
+      rev = "c1c91ecfd30f0e4e946854a6f7c67eb2d1e21c98";
+      sha256 = "0ldkyzsn4b555pb9qdr0k6w6m3w7ziy7v6bcnx0n8ppq4fl68pz2";
+    };
+    meta.homepage = "https://github.com/sunaku/vim-dasht/";
+  };
+
+  vim-DetectSpellLang = buildVimPluginFrom2Nix {
+    pname = "vim-DetectSpellLang";
+    version = "2020-01-13";
+    src = fetchFromGitHub {
+      owner = "konfekt";
+      repo = "vim-DetectSpellLang";
+      rev = "d8b545ef138a9ff013f8243f85c79b277b26f5e1";
+      sha256 = "0c1bxryw4rg4cyql7vfp2gwhkl2d0b8inc6shmgfy7jg4svhzs0w";
+    };
+    meta.homepage = "https://github.com/konfekt/vim-DetectSpellLang/";
+  };
+
+  vim-devicons = buildVimPluginFrom2Nix {
+    pname = "vim-devicons";
+    version = "2021-02-19";
+    src = fetchFromGitHub {
+      owner = "ryanoasis";
+      repo = "vim-devicons";
+      rev = "4d14cb82cf7381c2f8eca284d1a757faaa73b159";
+      sha256 = "1wwqchf50c19a5d5g037rjjpskn7dpsq9alhzim2x6bgffb5yamd";
+    };
+    meta.homepage = "https://github.com/ryanoasis/vim-devicons/";
+  };
+
+  vim-diminactive = buildVimPluginFrom2Nix {
+    pname = "vim-diminactive";
+    version = "2017-08-27";
+    src = fetchFromGitHub {
+      owner = "blueyed";
+      repo = "vim-diminactive";
+      rev = "6f2e14e6ff6a038285937c378ec3685e6ff7ee36";
+      sha256 = "14jf5hh3v2f5wb10v09ygx15pxbwziv20pwv0fqkakxwf0vqwd50";
+    };
+    meta.homepage = "https://github.com/blueyed/vim-diminactive/";
+  };
+
+  vim-dirdiff = buildVimPluginFrom2Nix {
+    pname = "vim-dirdiff";
+    version = "2020-11-03";
+    src = fetchFromGitHub {
+      owner = "will133";
+      repo = "vim-dirdiff";
+      rev = "0191693f0d3dfc624c61ac95ec951183a50b3b32";
+      sha256 = "0har8iri09nkjsvag4wgsynb9fxan2g8nlvlvd5zsalbnmlmdh9j";
+    };
+    meta.homepage = "https://github.com/will133/vim-dirdiff/";
+  };
+
+  vim-dirvish = buildVimPluginFrom2Nix {
+    pname = "vim-dirvish";
+    version = "2020-09-07";
+    src = fetchFromGitHub {
+      owner = "justinmk";
+      repo = "vim-dirvish";
+      rev = "9c0dc32af9235d42715751b30cf04fa0584c1798";
+      sha256 = "1xl655mnhjn1mbqzvxblsbqyg3yq50ri2a7szvqmpywq8rr0ymq9";
+    };
+    meta.homepage = "https://github.com/justinmk/vim-dirvish/";
+  };
+
+  vim-dirvish-git = buildVimPluginFrom2Nix {
+    pname = "vim-dirvish-git";
+    version = "2020-12-18";
+    src = fetchFromGitHub {
+      owner = "kristijanhusak";
+      repo = "vim-dirvish-git";
+      rev = "0c8c1a2878074abb0ac24054810de427ebff5500";
+      sha256 = "0gan44cyjskzjx5wv20zyvw2jn4cs4537fpwh2m3vi6758s2bmwy";
+    };
+    meta.homepage = "https://github.com/kristijanhusak/vim-dirvish-git/";
+  };
+
+  vim-dispatch = buildVimPluginFrom2Nix {
+    pname = "vim-dispatch";
+    version = "2021-03-26";
+    src = fetchFromGitHub {
+      owner = "tpope";
+      repo = "vim-dispatch";
+      rev = "4313cbb398d8b61b08be09f9b5a9ae4270c86004";
+      sha256 = "154vxj4bd10i70wd0d40g9j2yji6l5y00a0y4xk9402x5yljjmwr";
+    };
+    meta.homepage = "https://github.com/tpope/vim-dispatch/";
+  };
+
+  vim-docbk = buildVimPluginFrom2Nix {
+    pname = "vim-docbk";
+    version = "2015-04-01";
+    src = fetchFromGitHub {
+      owner = "jhradilek";
+      repo = "vim-docbk";
+      rev = "6ac0346ce96dbefe982b9e765a81c072997f2e9e";
+      sha256 = "1jnx39m152hf9j620ygagaydg6h8m8gxkr1fmxj6kgqf71jr0n9d";
+    };
+    meta.homepage = "https://github.com/jhradilek/vim-docbk/";
+  };
+
+  vim-docbk-snippets = buildVimPluginFrom2Nix {
+    pname = "vim-docbk-snippets";
+    version = "2019-09-13";
+    src = fetchFromGitHub {
+      owner = "jhradilek";
+      repo = "vim-snippets";
+      rev = "b8604893f46f6c570a55efff733f0371ac8a805d";
+      sha256 = "1qz3azgzv9718s2a6h8xw5nrvs4j776csmzsn9chvykdpx8rwim1";
+    };
+    meta.homepage = "https://github.com/jhradilek/vim-snippets/";
+  };
+
+  vim-easy-align = buildVimPluginFrom2Nix {
+    pname = "vim-easy-align";
+    version = "2019-04-29";
+    src = fetchFromGitHub {
+      owner = "junegunn";
+      repo = "vim-easy-align";
+      rev = "12dd6316974f71ce333e360c0260b4e1f81169c3";
+      sha256 = "0gpfdla8shaf5ykgakrsf0h0w6ygvwcv3lfpnki24l790xhdi606";
+    };
+    meta.homepage = "https://github.com/junegunn/vim-easy-align/";
+  };
+
+  vim-easygit = buildVimPluginFrom2Nix {
+    pname = "vim-easygit";
+    version = "2018-07-08";
+    src = fetchFromGitHub {
+      owner = "neoclide";
+      repo = "vim-easygit";
+      rev = "9770370a35838f70eda91d0c3006d0563ccc8d2a";
+      sha256 = "1a42s0nymakz20rjrpwmiqpnlndrkdakzbm53aclzcs61i9zq2k8";
+    };
+    meta.homepage = "https://github.com/neoclide/vim-easygit/";
+  };
+
+  vim-easymotion = buildVimPluginFrom2Nix {
+    pname = "vim-easymotion";
+    version = "2020-12-17";
+    src = fetchFromGitHub {
+      owner = "easymotion";
+      repo = "vim-easymotion";
+      rev = "d75d9591e415652b25d9e0a3669355550325263d";
+      sha256 = "1j2kgh1iri0fqkbgbgvfjqgsksfipnmr1xbj554i602pnm0hbg19";
+    };
+    meta.homepage = "https://github.com/easymotion/vim-easymotion/";
+  };
+
+  vim-easytags = buildVimPluginFrom2Nix {
+    pname = "vim-easytags";
+    version = "2015-07-01";
+    src = fetchFromGitHub {
+      owner = "xolox";
+      repo = "vim-easytags";
+      rev = "72a8753b5d0a951e547c51b13633f680a95b5483";
+      sha256 = "0i8ha1fa5d860b1mi0xp8kwsgb0b9vbzcg1bldzv6s5xd9yyi12i";
+    };
+    meta.homepage = "https://github.com/xolox/vim-easytags/";
+  };
+
+  vim-eighties = buildVimPluginFrom2Nix {
+    pname = "vim-eighties";
+    version = "2016-12-15";
+    src = fetchFromGitHub {
+      owner = "justincampbell";
+      repo = "vim-eighties";
+      rev = "1a6ea42ead1e31524ec94cfefb6afc1d8dacd170";
+      sha256 = "1yh1kny28c7f5qm52y7xd5aj4mycksfb0x1zvcb37c73ycdxc1v2";
+    };
+    meta.homepage = "https://github.com/justincampbell/vim-eighties/";
+  };
+
+  vim-elixir = buildVimPluginFrom2Nix {
+    pname = "vim-elixir";
+    version = "2021-03-01";
+    src = fetchFromGitHub {
+      owner = "elixir-editors";
+      repo = "vim-elixir";
+      rev = "527e6fd8798638a79621e0b5c788b67b2b4b4dbc";
+      sha256 = "02ncqbxlncm9gz7dvxv6lv9zsnfhqmqq05m95lh95l3lm0gs44ph";
+    };
+    meta.homepage = "https://github.com/elixir-editors/vim-elixir/";
+  };
+
+  vim-elm-syntax = buildVimPluginFrom2Nix {
+    pname = "vim-elm-syntax";
+    version = "2021-01-09";
+    src = fetchFromGitHub {
+      owner = "andys8";
+      repo = "vim-elm-syntax";
+      rev = "b65370b5292730ef35cbdb969da05b52d77d51dc";
+      sha256 = "0nd3ig7zpx49dmgwyqhs3545x64jxbrrgzd9fch4ihb6bhd4j3fr";
+    };
+    meta.homepage = "https://github.com/andys8/vim-elm-syntax/";
+  };
+
+  vim-endwise = buildVimPluginFrom2Nix {
+    pname = "vim-endwise";
+    version = "2021-03-06";
+    src = fetchFromGitHub {
+      owner = "tpope";
+      repo = "vim-endwise";
+      rev = "4289889a2622f9bc7c594a6dd79763781f63dfb5";
+      sha256 = "0sixr3rpcgqbaiyk7w6ghcrvllh35cb3gq9isdlwkww3dz4jyyxc";
+    };
+    meta.homepage = "https://github.com/tpope/vim-endwise/";
+  };
+
+  vim-erlang-compiler = buildVimPluginFrom2Nix {
+    pname = "vim-erlang-compiler";
+    version = "2021-01-16";
+    src = fetchFromGitHub {
+      owner = "vim-erlang";
+      repo = "vim-erlang-compiler";
+      rev = "a99e75f792650c8dae86d9a44c7af2411ea2ead7";
+      sha256 = "13400kjf90sxlpx1pqs379ihdn65i3gpck3dwkjnf1xiv1p9rzvz";
+    };
+    meta.homepage = "https://github.com/vim-erlang/vim-erlang-compiler/";
+  };
+
+  vim-erlang-omnicomplete = buildVimPluginFrom2Nix {
+    pname = "vim-erlang-omnicomplete";
+    version = "2021-01-16";
+    src = fetchFromGitHub {
+      owner = "vim-erlang";
+      repo = "vim-erlang-omnicomplete";
+      rev = "924a50ed0ad93141063d0f27c9f62b1bea991baf";
+      sha256 = "0zh730wsb0n9nk1x5qdbx78zgzhamd2a6fa5gxl4milvr5ddvdy9";
+    };
+    meta.homepage = "https://github.com/vim-erlang/vim-erlang-omnicomplete/";
+  };
+
+  vim-erlang-runtime = buildVimPluginFrom2Nix {
+    pname = "vim-erlang-runtime";
+    version = "2021-01-08";
+    src = fetchFromGitHub {
+      owner = "vim-erlang";
+      repo = "vim-erlang-runtime";
+      rev = "47c643f51e4480541fc81e352ec5b2a361544d0b";
+      sha256 = "0xlxkdqjq8fp9fpkhqv5nd2ipiq8nw1bdzd7hqibizwcdsisf91s";
+    };
+    meta.homepage = "https://github.com/vim-erlang/vim-erlang-runtime/";
+  };
+
+  vim-erlang-tags = buildVimPluginFrom2Nix {
+    pname = "vim-erlang-tags";
+    version = "2021-02-19";
+    src = fetchFromGitHub {
+      owner = "vim-erlang";
+      repo = "vim-erlang-tags";
+      rev = "d7eaa8f6986de0f266dac48b7dcfbf41d67ce611";
+      sha256 = "03wxy29z0rjnf3hilap7c86di7dkjwb8sdlfh74ch8vhan8h6rv0";
+    };
+    meta.homepage = "https://github.com/vim-erlang/vim-erlang-tags/";
+  };
+
+  vim-eunuch = buildVimPluginFrom2Nix {
+    pname = "vim-eunuch";
+    version = "2021-04-05";
+    src = fetchFromGitHub {
+      owner = "tpope";
+      repo = "vim-eunuch";
+      rev = "dbbbf853fc523d312f61b4bbdf2e13297645dcde";
+      sha256 = "0lwkzxz76pcmash56p14pf54blz9v9kw17qj2i5wa8wdcymia98l";
+    };
+    meta.homepage = "https://github.com/tpope/vim-eunuch/";
+  };
+
+  vim-exchange = buildVimPluginFrom2Nix {
+    pname = "vim-exchange";
+    version = "2020-12-16";
+    src = fetchFromGitHub {
+      owner = "tommcdo";
+      repo = "vim-exchange";
+      rev = "17f1a2cc0d009cfd7f0dcda06dd0f017fcc1c70b";
+      sha256 = "0c4s9cmyx1myqz9k35waply2mv0yr3agpkv64ndhwgqbmlxyifnj";
+    };
+    meta.homepage = "https://github.com/tommcdo/vim-exchange/";
+  };
+
+  vim-expand-region = buildVimPluginFrom2Nix {
+    pname = "vim-expand-region";
+    version = "2013-08-19";
+    src = fetchFromGitHub {
+      owner = "terryma";
+      repo = "vim-expand-region";
+      rev = "966513543de0ddc2d673b5528a056269e7917276";
+      sha256 = "0l30wjlk4vxr16f1njnvf8aw9yg9p9jisvcxbcg3znsq5q8ix6zv";
+    };
+    meta.homepage = "https://github.com/terryma/vim-expand-region/";
+  };
+
+  vim-extradite = buildVimPluginFrom2Nix {
+    pname = "vim-extradite";
+    version = "2019-05-08";
+    src = fetchFromGitHub {
+      owner = "int3";
+      repo = "vim-extradite";
+      rev = "58c77fffbb5d61eb0b87c8b4ef0ad78e9659d621";
+      sha256 = "1mm2icx50q5iyhaz1dypnbqh14s1wsnw8skpxcm1klhqn02zk46f";
+    };
+    meta.homepage = "https://github.com/int3/vim-extradite/";
+  };
+
+  vim-fetch = buildVimPluginFrom2Nix {
+    pname = "vim-fetch";
+    version = "2021-02-12";
+    src = fetchFromGitHub {
+      owner = "wsdjeg";
+      repo = "vim-fetch";
+      rev = "0a6ab17e84c7f4808bf05ec380121bce40b40d21";
+      sha256 = "04srlz3zaiqkv9hz6q3vdkfq02k1wj4p9mg4m8930das4nkl7a05";
+    };
+    meta.homepage = "https://github.com/wsdjeg/vim-fetch/";
+  };
+
+  vim-fireplace = buildVimPluginFrom2Nix {
+    pname = "vim-fireplace";
+    version = "2021-03-20";
+    src = fetchFromGitHub {
+      owner = "tpope";
+      repo = "vim-fireplace";
+      rev = "e04a615e72ec2e216116b5c6514ac4d86b21ffc3";
+      sha256 = "1q17xlwprkvx27fbb9xg1zh5nyx8gif3pp6p8vd3r6zhzqqdl469";
+    };
+    meta.homepage = "https://github.com/tpope/vim-fireplace/";
+  };
+
+  vim-fish = buildVimPluginFrom2Nix {
+    pname = "vim-fish";
+    version = "2017-11-22";
+    src = fetchFromGitHub {
+      owner = "dag";
+      repo = "vim-fish";
+      rev = "50b95cbbcd09c046121367d49039710e9dc9c15f";
+      sha256 = "1yvjlm90alc4zsdsppkmsja33wsgm2q6kkn9dxn6xqwnq4jw5s7h";
+    };
+    meta.homepage = "https://github.com/dag/vim-fish/";
+  };
+
+  vim-flagship = buildVimPluginFrom2Nix {
+    pname = "vim-flagship";
+    version = "2019-12-09";
+    src = fetchFromGitHub {
+      owner = "tpope";
+      repo = "vim-flagship";
+      rev = "e522bd0ffb0e329f695ead7d4288a6245ff22410";
+      sha256 = "0vqkdzd7b204kbinn12jk306kc9bn2f0yaifj49swd0g8hv6dk4b";
+    };
+    meta.homepage = "https://github.com/tpope/vim-flagship/";
+  };
+
+  vim-flake8 = buildVimPluginFrom2Nix {
+    pname = "vim-flake8";
+    version = "2021-03-29";
+    src = fetchFromGitHub {
+      owner = "nvie";
+      repo = "vim-flake8";
+      rev = "719cc31e2d07021906cc6471b7d7b1863d2b6acf";
+      sha256 = "0514gm0r36zclhzjckxnb3v9y8hl85iddjldh0irlagfwa7by773";
+    };
+    meta.homepage = "https://github.com/nvie/vim-flake8/";
+  };
+
+  vim-flatbuffers = buildVimPluginFrom2Nix {
+    pname = "vim-flatbuffers";
+    version = "2018-10-11";
+    src = fetchFromGitHub {
+      owner = "dcharbon";
+      repo = "vim-flatbuffers";
+      rev = "ecd75c33576d982f3c83545dff7b3c9245285e75";
+      sha256 = "1mfi9als56cpfsz3s91hg3lci8zn7pr9s0l690wqh40vh57d1gxm";
+    };
+    meta.homepage = "https://github.com/dcharbon/vim-flatbuffers/";
+  };
+
+  vim-floaterm = buildVimPluginFrom2Nix {
+    pname = "vim-floaterm";
+    version = "2021-03-24";
+    src = fetchFromGitHub {
+      owner = "voldikss";
+      repo = "vim-floaterm";
+      rev = "ae7eea5c5c6c082fe66410e72306b5b1bcb693dd";
+      sha256 = "1lvaww22rj9jnd8b8fjcaclvj8n6vqc390l3z5d7ivm6fc5h1k1j";
+    };
+    meta.homepage = "https://github.com/voldikss/vim-floaterm/";
+  };
+
+  vim-flog = buildVimPluginFrom2Nix {
+    pname = "vim-flog";
+    version = "2021-03-07";
+    src = fetchFromGitHub {
+      owner = "rbong";
+      repo = "vim-flog";
+      rev = "904b964eb0f878e44f47d39898e72fc0b939756b";
+      sha256 = "07x8xafcvpg6dgxlvmf46gh7a9xvnrxj7i326q73g3yfh5xpma6c";
+    };
+    meta.homepage = "https://github.com/rbong/vim-flog/";
+  };
+
+  vim-flutter = buildVimPluginFrom2Nix {
+    pname = "vim-flutter";
+    version = "2020-09-14";
+    src = fetchFromGitHub {
+      owner = "thosakwe";
+      repo = "vim-flutter";
+      rev = "5a6de53adcc72742138b666b305869999fc8066e";
+      sha256 = "1zxa1gz47qpkcrzniax6q1bq9a953rypj1cfbcjb62h5ggx2rr5n";
+    };
+    meta.homepage = "https://github.com/thosakwe/vim-flutter/";
+  };
+
+  vim-fsharp = buildVimPluginFrom2Nix {
+    pname = "vim-fsharp";
+    version = "2018-11-13";
+    src = fetchFromGitHub {
+      owner = "fsharp";
+      repo = "vim-fsharp";
+      rev = "012d98c981139976551a4d9779f5cce7f8d84d5c";
+      sha256 = "0ds300kjhm352ni3fwivsrnc9ls021d2x29f4cdszillamcgs7pw";
+    };
+    meta.homepage = "https://github.com/fsharp/vim-fsharp/";
+  };
+
+  vim-ft-diff_fold = buildVimPluginFrom2Nix {
+    pname = "vim-ft-diff_fold";
+    version = "2013-02-10";
+    src = fetchFromGitHub {
+      owner = "thinca";
+      repo = "vim-ft-diff_fold";
+      rev = "89771dffd3682ef82a4b3b3e9c971b9909f08e87";
+      sha256 = "0bk95cxkfzamlgv1x2jb1bnfas2pmvvqgpn5fvxddf0andm8sfma";
+    };
+    meta.homepage = "https://github.com/thinca/vim-ft-diff_fold/";
+  };
+
+  vim-fugitive = buildVimPluginFrom2Nix {
+    pname = "vim-fugitive";
+    version = "2021-04-04";
+    src = fetchFromGitHub {
+      owner = "tpope";
+      repo = "vim-fugitive";
+      rev = "f29c9e50795cdfcc2b31b1e76ab6bd202e476298";
+      sha256 = "0wn3c4jads0201433kc8f9mnlg1phhgamr218yz1q70waj60ns2n";
+    };
+    meta.homepage = "https://github.com/tpope/vim-fugitive/";
+  };
+
+  vim-ghost = buildVimPluginFrom2Nix {
+    pname = "vim-ghost";
+    version = "2020-06-19";
+    src = fetchFromGitHub {
+      owner = "raghur";
+      repo = "vim-ghost";
+      rev = "77330855a36350e75393cdeefb743da1040627ce";
+      sha256 = "0g3wvp02cv69v7xcsbib35bw9yf36iq6ffny7lmaf0s1pj2kwpzz";
+    };
+    meta.homepage = "https://github.com/raghur/vim-ghost/";
+  };
+
+  vim-gist = buildVimPluginFrom2Nix {
+    pname = "vim-gist";
+    version = "2020-10-04";
+    src = fetchFromGitHub {
+      owner = "mattn";
+      repo = "vim-gist";
+      rev = "4a210316550577c1b6a5cb13b09ce79fba602b9c";
+      sha256 = "1c3k2yfaxijg0c8fvh70jqmrc6zyhh57hid7rm77v2kymvimvazg";
+    };
+    meta.homepage = "https://github.com/mattn/vim-gist/";
+  };
+
+  vim-gista = buildVimPluginFrom2Nix {
+    pname = "vim-gista";
+    version = "2020-09-19";
+    src = fetchFromGitHub {
+      owner = "lambdalisue";
+      repo = "vim-gista";
+      rev = "c046de1b9d4cf97ff6f80cf3bdbb75b1094f2aaf";
+      sha256 = "0q08hs4y9d4c4zdd0lh4k054133y0455fkn47gi7h16m01g92imc";
+    };
+    meta.homepage = "https://github.com/lambdalisue/vim-gista/";
+  };
+
+  vim-git = buildVimPluginFrom2Nix {
+    pname = "vim-git";
+    version = "2021-03-18";
+    src = fetchFromGitHub {
+      owner = "tpope";
+      repo = "vim-git";
+      rev = "e9058ebb9b9563ec77bc96fb19b2138f6512beef";
+      sha256 = "17wpar2ais3cx1jaak9l8fck7fks2yczn7flcvgfcwvjxd9vyxgq";
+    };
+    meta.homepage = "https://github.com/tpope/vim-git/";
+  };
+
+  vim-gitbranch = buildVimPluginFrom2Nix {
+    pname = "vim-gitbranch";
+    version = "2017-05-27";
+    src = fetchFromGitHub {
+      owner = "itchyny";
+      repo = "vim-gitbranch";
+      rev = "8118dc1cdd387bd609852be4bf350360ce881193";
+      sha256 = "01gvd96mnzfc5s0951zzq122birg5svnximkldgb9kv5bmsnmh3j";
+    };
+    meta.homepage = "https://github.com/itchyny/vim-gitbranch/";
+  };
+
+  vim-gitgutter = buildVimPluginFrom2Nix {
+    pname = "vim-gitgutter";
+    version = "2021-03-19";
+    src = fetchFromGitHub {
+      owner = "airblade";
+      repo = "vim-gitgutter";
+      rev = "24cc47789557827209add5881c226243711475ce";
+      sha256 = "0fk8691wkhb7mb5ssmydipb61kh3hjnl31ngqbrbifzsqlkvibid";
+    };
+    meta.homepage = "https://github.com/airblade/vim-gitgutter/";
+  };
+
+  vim-github-dashboard = buildVimPluginFrom2Nix {
+    pname = "vim-github-dashboard";
+    version = "2018-09-03";
+    src = fetchFromGitHub {
+      owner = "junegunn";
+      repo = "vim-github-dashboard";
+      rev = "8012a2016a9e39a50081c9d5db2deb09ae4a6010";
+      sha256 = "0jkr6mz5zcpbyswmiyprcbm8l93lkg5sr46r8kyds1n2vz19cf7x";
+    };
+    meta.homepage = "https://github.com/junegunn/vim-github-dashboard/";
+  };
+
+  vim-glsl = buildVimPluginFrom2Nix {
+    pname = "vim-glsl";
+    version = "2020-04-21";
+    src = fetchFromGitHub {
+      owner = "tikhomirov";
+      repo = "vim-glsl";
+      rev = "36266238d96cd2219769793855a7e915f5e6a32c";
+      sha256 = "0vxjbv5qn7lvvpqv1danmkg423cbf7czxzp208zlx9l82vnr24z8";
+    };
+    meta.homepage = "https://github.com/tikhomirov/vim-glsl/";
+  };
+
+  vim-gnupg = buildVimPluginFrom2Nix {
+    pname = "vim-gnupg";
+    version = "2020-11-11";
+    src = fetchFromGitHub {
+      owner = "jamessan";
+      repo = "vim-gnupg";
+      rev = "96be0be1240a848da56d665b38e1b0fe7ee3f1af";
+      sha256 = "10syaaylyaqn60zhyx008863b5b1349pygg7lnaqchw6bard1135";
+    };
+    meta.homepage = "https://github.com/jamessan/vim-gnupg/";
+  };
+
+  vim-go = buildVimPluginFrom2Nix {
+    pname = "vim-go";
+    version = "2021-04-02";
+    src = fetchFromGitHub {
+      owner = "fatih";
+      repo = "vim-go";
+      rev = "ce95699efa82921f80fdc0984d002ff81584c6e6";
+      sha256 = "0fq6i4arnzq5fmzy50kf2fb8bf5ickrrhs53la04x1jwx3lfzs05";
+    };
+    meta.homepage = "https://github.com/fatih/vim-go/";
+  };
+
+  vim-grammarous = buildVimPluginFrom2Nix {
+    pname = "vim-grammarous";
+    version = "2020-11-30";
+    src = fetchFromGitHub {
+      owner = "rhysd";
+      repo = "vim-grammarous";
+      rev = "db46357465ce587d5325e816235b5e92415f8c05";
+      sha256 = "014g5q3kdqq4w5jvp61h26n0jfq05xz82rhwgcp3bgq0ffhrch7j";
+    };
+    meta.homepage = "https://github.com/rhysd/vim-grammarous/";
+  };
+
+  vim-graphql = buildVimPluginFrom2Nix {
+    pname = "vim-graphql";
+    version = "2021-03-19";
+    src = fetchFromGitHub {
+      owner = "jparise";
+      repo = "vim-graphql";
+      rev = "de5753e3fbd89f2939a43cfc2c6a2313ff129a21";
+      sha256 = "15qy6adhgfwjh6jrw9902hl67qzhdi72kqgzdk5shgfyndzar25g";
+    };
+    meta.homepage = "https://github.com/jparise/vim-graphql/";
+  };
+
+  vim-grepper = buildVimPluginFrom2Nix {
+    pname = "vim-grepper";
+    version = "2020-07-12";
+    src = fetchFromGitHub {
+      owner = "mhinz";
+      repo = "vim-grepper";
+      rev = "e9004ce564891412cfe433cfbb97295cccd06b39";
+      sha256 = "1cs72x3wv4i11x7ch3gna1sxqn5zj3bd34smchfd00g4mf201lhs";
+    };
+    meta.homepage = "https://github.com/mhinz/vim-grepper/";
+  };
+
+  vim-gruvbox8 = buildVimPluginFrom2Nix {
+    pname = "vim-gruvbox8";
+    version = "2021-04-06";
+    src = fetchFromGitHub {
+      owner = "lifepillar";
+      repo = "vim-gruvbox8";
+      rev = "acb2574d85f3878cd5ab82dc3579403c174dafc3";
+      sha256 = "17k3fcidsk26i9nnbk37jcgznypzwh0pzam03yayb6dw4n733mld";
+    };
+    meta.homepage = "https://github.com/lifepillar/vim-gruvbox8/";
+  };
+
+  vim-gui-position = buildVimPluginFrom2Nix {
+    pname = "vim-gui-position";
+    version = "2019-06-06";
+    src = fetchFromGitHub {
+      owner = "brennanfee";
+      repo = "vim-gui-position";
+      rev = "065d0dcf96c28cfc0003d72c1b3c49203632f62a";
+      sha256 = "11kv9kkya9sybslg7lfhhcn2fi3n735zvprg8ch6kd58m82xr4n3";
+    };
+    meta.homepage = "https://github.com/brennanfee/vim-gui-position/";
+  };
+
+  vim-gutentags = buildVimPluginFrom2Nix {
+    pname = "vim-gutentags";
+    version = "2020-05-22";
+    src = fetchFromGitHub {
+      owner = "ludovicchabant";
+      repo = "vim-gutentags";
+      rev = "50705e8ebb7038b31314f416d1bddd9cb9154049";
+      sha256 = "0vm3bp94kbc28azsmm8505hyd9v1a9isrn5dp47njmj8w17l7725";
+    };
+    meta.homepage = "https://github.com/ludovicchabant/vim-gutentags/";
+  };
+
+  vim-hardtime = buildVimPluginFrom2Nix {
+    pname = "vim-hardtime";
+    version = "2020-05-01";
+    src = fetchFromGitHub {
+      owner = "takac";
+      repo = "vim-hardtime";
+      rev = "ef06cf30fd3843e7857fdb79c6868660220b9391";
+      sha256 = "0yhai27zqkdmgck1iy64fw9yy2vghmqvj4g2lbh21h50df1sa8cf";
+    };
+    meta.homepage = "https://github.com/takac/vim-hardtime/";
+  };
+
+  vim-haskellconceal = buildVimPluginFrom2Nix {
+    pname = "vim-haskellconceal";
+    version = "2017-06-15";
+    src = fetchFromGitHub {
+      owner = "twinside";
+      repo = "vim-haskellconceal";
+      rev = "802f82a5afee56e9e1251e6f756104a3bd114234";
+      sha256 = "1kh6853hi4rgl4z1xs8kz9l1q9w7lh0r42y2m0rabfpr6yh3091r";
+    };
+    meta.homepage = "https://github.com/twinside/vim-haskellconceal/";
+  };
+
+  vim-haskellConcealPlus = buildVimPluginFrom2Nix {
+    pname = "vim-haskellConcealPlus";
+    version = "2020-01-21";
+    src = fetchFromGitHub {
+      owner = "enomsg";
+      repo = "vim-haskellConcealPlus";
+      rev = "d59da33c16966f694b2e4f0bfc57515a935da83f";
+      sha256 = "1y2hgcpls21738lhrgimsxnkhxxqczp05nmk68s28xssbn4dqgma";
+    };
+    meta.homepage = "https://github.com/enomsg/vim-haskellConcealPlus/";
+  };
+
+  vim-hcl = buildVimPluginFrom2Nix {
+    pname = "vim-hcl";
+    version = "2021-03-17";
+    src = fetchFromGitHub {
+      owner = "jvirtanen";
+      repo = "vim-hcl";
+      rev = "d50f93204b606b4ff40a9522be0e8dbf6055b815";
+      sha256 = "0sdaldmdrgha5ij02flsqrc77ijjifdvl8b6pdw24xrpd9j5cwhs";
+    };
+    meta.homepage = "https://github.com/jvirtanen/vim-hcl/";
+  };
+
+  vim-hdevtools = buildVimPluginFrom2Nix {
+    pname = "vim-hdevtools";
+    version = "2018-11-19";
+    src = fetchFromGitHub {
+      owner = "bitc";
+      repo = "vim-hdevtools";
+      rev = "ab33578bbdbcbd80050faf43e4adee1653fe34dc";
+      sha256 = "1xvjz6yidcywn1xmdqlxsz68lmkx6rmiqf6q2gfz56pzq1mfmski";
+    };
+    meta.homepage = "https://github.com/bitc/vim-hdevtools/";
+  };
+
+  vim-hexokinase = buildVimPluginFrom2Nix {
+    pname = "vim-hexokinase";
+    version = "2021-03-31";
+    src = fetchFromGitHub {
+      owner = "RRethy";
+      repo = "vim-hexokinase";
+      rev = "6bd30278c7af4c624bf996650d62dac404342dc7";
+      sha256 = "1wimsi6pxhw410dbcgj4sr9q5k21066i762fyaaf424jyf1g8d2i";
+      fetchSubmodules = true;
+    };
+    meta.homepage = "https://github.com/RRethy/vim-hexokinase/";
+  };
+
+  vim-hier = buildVimPluginFrom2Nix {
+    pname = "vim-hier";
+    version = "2011-08-27";
+    src = fetchFromGitHub {
+      owner = "jceb";
+      repo = "vim-hier";
+      rev = "0b8c365263551a67404ebd7e528c55e17c1d3de7";
+      sha256 = "118pd9sx1bl9vfr89xrf536hfx4l162a43a1qpwpkqxzb9a3ca7n";
+    };
+    meta.homepage = "https://github.com/jceb/vim-hier/";
+  };
+
+  vim-highlightedyank = buildVimPluginFrom2Nix {
+    pname = "vim-highlightedyank";
+    version = "2020-03-05";
+    src = fetchFromGitHub {
+      owner = "machakann";
+      repo = "vim-highlightedyank";
+      rev = "931cc6bd53e4a1fdbe592751f0e13c0e401f0a49";
+      sha256 = "091qw0zlc80micn29wb6r8m4f7pplcv8bx1yfvbn3cba77qyj3nb";
+    };
+    meta.homepage = "https://github.com/machakann/vim-highlightedyank/";
+  };
+
+  vim-hindent = buildVimPluginFrom2Nix {
+    pname = "vim-hindent";
+    version = "2018-07-31";
+    src = fetchFromGitHub {
+      owner = "alx741";
+      repo = "vim-hindent";
+      rev = "f8e84c199fd00a3ccaf5bbbc97786bde9a4faa13";
+      sha256 = "1y4nnz38zal1ffs5n751dn9p9apk8q7pq3cw79r5z6fsdp942ai6";
+    };
+    meta.homepage = "https://github.com/alx741/vim-hindent/";
+  };
+
+  vim-hocon = buildVimPluginFrom2Nix {
+    pname = "vim-hocon";
+    version = "2017-09-08";
+    src = fetchFromGitHub {
+      owner = "GEverding";
+      repo = "vim-hocon";
+      rev = "bb8fb14e00f8fc1eec27dd39dcc605aac43328a3";
+      sha256 = "0w6ckm931zpm1k3w02gl58hgfxzfy53sgcc9m8jz3vgi3zz0vki2";
+    };
+    meta.homepage = "https://github.com/GEverding/vim-hocon/";
+  };
+
+  vim-hoogle = buildVimPluginFrom2Nix {
+    pname = "vim-hoogle";
+    version = "2018-03-04";
+    src = fetchFromGitHub {
+      owner = "Twinside";
+      repo = "vim-hoogle";
+      rev = "871d104c92e33cb238506f2805f1652561978cc8";
+      sha256 = "17qvi57g72ijgk7nczczli3kcphvdf625fzqbqcmqpsawgvfd07n";
+    };
+    meta.homepage = "https://github.com/Twinside/vim-hoogle/";
+  };
+
+  vim-html-template-literals = buildVimPluginFrom2Nix {
+    pname = "vim-html-template-literals";
+    version = "2020-09-02";
+    src = fetchFromGitHub {
+      owner = "jonsmithers";
+      repo = "vim-html-template-literals";
+      rev = "602dba70bdcfc2e280e0c0503e74a8a92519db49";
+      sha256 = "0x0sbmcig3r058sg78bfj8dv0lwlgdcwvw9kxviynyhk2qkg9zl9";
+    };
+    meta.homepage = "https://github.com/jonsmithers/vim-html-template-literals/";
+  };
+
+  vim-husk = buildVimPluginFrom2Nix {
+    pname = "vim-husk";
+    version = "2015-11-29";
+    src = fetchFromGitHub {
+      owner = "vim-utils";
+      repo = "vim-husk";
+      rev = "ad89559ff8a6c4b1e94a18b2d494a69a1f701d08";
+      sha256 = "09kqzaqa4jdh31q0a3nxbx9li7zg890qxh68rfzblzyx22xv4mka";
+    };
+    meta.homepage = "https://github.com/vim-utils/vim-husk/";
+  };
+
+  vim-hybrid = buildVimPluginFrom2Nix {
+    pname = "vim-hybrid";
+    version = "2016-01-05";
+    src = fetchFromGitHub {
+      owner = "w0ng";
+      repo = "vim-hybrid";
+      rev = "cc58baabeabc7b83768e25b852bf89c34756bf90";
+      sha256 = "1c3q39121hiw85r9ymiyhz5zsf6bl9pwk4pgj6nh6ckwns4cgcmw";
+    };
+    meta.homepage = "https://github.com/w0ng/vim-hybrid/";
+  };
+
+  vim-hybrid-material = buildVimPluginFrom2Nix {
+    pname = "vim-hybrid-material";
+    version = "2020-06-16";
+    src = fetchFromGitHub {
+      owner = "kristijanhusak";
+      repo = "vim-hybrid-material";
+      rev = "ad031275c63a05b6acb6014a2401d8719a290bd4";
+      sha256 = "0qjg25cfdx9706svw4b527arfdq4ypshay11ak62yswirkvgsc2c";
+    };
+    meta.homepage = "https://github.com/kristijanhusak/vim-hybrid-material/";
+  };
+
+  vim-iced-coffee-script = buildVimPluginFrom2Nix {
+    pname = "vim-iced-coffee-script";
+    version = "2013-12-26";
+    src = fetchFromGitHub {
+      owner = "noc7c9";
+      repo = "vim-iced-coffee-script";
+      rev = "e42e0775fa4b1f8840c55cd36ac3d1cedbc1dea2";
+      sha256 = "14yfirny359rlrr082il2ys3hxiyrbbk794rdxrs2lasjy8rb1f7";
+    };
+    meta.homepage = "https://github.com/noc7c9/vim-iced-coffee-script/";
+  };
+
+  vim-illuminate = buildVimPluginFrom2Nix {
+    pname = "vim-illuminate";
+    version = "2021-03-31";
+    src = fetchFromGitHub {
+      owner = "RRethy";
+      repo = "vim-illuminate";
+      rev = "43bccb5ceb400fd0cb8c2903f9d174d1bc8b64d4";
+      sha256 = "07cg09vzqpyg3ql8vl3gvr1sy0bzw55xwbhhipbpz2127a92pk00";
+    };
+    meta.homepage = "https://github.com/RRethy/vim-illuminate/";
+  };
+
+  vim-indent-guides = buildVimPluginFrom2Nix {
+    pname = "vim-indent-guides";
+    version = "2018-05-14";
+    src = fetchFromGitHub {
+      owner = "nathanaelkane";
+      repo = "vim-indent-guides";
+      rev = "54d889a63716ee2f1818aa2ec5082db47147147b";
+      sha256 = "0ahlbjv2ibhhnf9zqn85b2sh3wf9l0kmg2qmavz3z5fmf8sqljj2";
+    };
+    meta.homepage = "https://github.com/nathanaelkane/vim-indent-guides/";
+  };
+
+  vim-indent-object = buildVimPluginFrom2Nix {
+    pname = "vim-indent-object";
+    version = "2018-04-08";
+    src = fetchFromGitHub {
+      owner = "michaeljsmith";
+      repo = "vim-indent-object";
+      rev = "5c5b24c959478929b54a9e831a8e2e651a465965";
+      sha256 = "1kmwnz0jxjkvfzy06r7r73pcxfcyjp8p8m2d6qrhjfvzidgfhw19";
+    };
+    meta.homepage = "https://github.com/michaeljsmith/vim-indent-object/";
+  };
+
+  vim-indentwise = buildVimPluginFrom2Nix {
+    pname = "vim-indentwise";
+    version = "2015-06-07";
+    src = fetchFromGitHub {
+      owner = "jeetsukumaran";
+      repo = "vim-indentwise";
+      rev = "608bd6876d3b56d469e0e615eb774a6e06095dbf";
+      sha256 = "0bnzk1afi88icq58389nxqz196gkxcj71qrxvw87d72h2zaspvcx";
+    };
+    meta.homepage = "https://github.com/jeetsukumaran/vim-indentwise/";
+  };
+
+  vim-indexed-search = buildVimPluginFrom2Nix {
+    pname = "vim-indexed-search";
+    version = "2019-07-04";
+    src = fetchFromGitHub {
+      owner = "henrik";
+      repo = "vim-indexed-search";
+      rev = "5af020bba084b699d0453f242d7d76711d64b1e3";
+      sha256 = "0cq265yqksh7jqazxn7qxr7bclrk2pq7py4c29wspsvbi0m3m8rc";
+    };
+    meta.homepage = "https://github.com/henrik/vim-indexed-search/";
+  };
+
+  vim-ipython = buildVimPluginFrom2Nix {
+    pname = "vim-ipython";
+    version = "2015-06-23";
+    src = fetchFromGitHub {
+      owner = "ivanov";
+      repo = "vim-ipython";
+      rev = "42499f094b805b90b683afa5009cee99abd0bb75";
+      sha256 = "10wpfvfs8yv1bvzra4d5zy5glp62gbalpayxx7mkalhr2ccppy3x";
+    };
+    meta.homepage = "https://github.com/ivanov/vim-ipython/";
+  };
+
+  vim-isort = buildVimPluginFrom2Nix {
+    pname = "vim-isort";
+    version = "2020-08-14";
+    src = fetchFromGitHub {
+      owner = "fisadev";
+      repo = "vim-isort";
+      rev = "94b1f1202899aa0b6e2cc20e6d1f133eafe24331";
+      sha256 = "16r2nsdapf3r0zjqwwbl0k8g2p81h9zs14b91dhskyvs0hvf7cfy";
+    };
+    meta.homepage = "https://github.com/fisadev/vim-isort/";
+  };
+
+  vim-janah = buildVimPluginFrom2Nix {
+    pname = "vim-janah";
+    version = "2018-10-01";
+    src = fetchFromGitHub {
+      owner = "mhinz";
+      repo = "vim-janah";
+      rev = "3b8ae976987b6ade2abeac25f0208e8bc90d7138";
+      sha256 = "16bygyri9qxyhl8n8md945wwy1i9lss4hwxa7yjl9ms2fzzragv4";
+    };
+    meta.homepage = "https://github.com/mhinz/vim-janah/";
+  };
+
+  vim-javacomplete2 = buildVimPluginFrom2Nix {
+    pname = "vim-javacomplete2";
+    version = "2021-03-18";
+    src = fetchFromGitHub {
+      owner = "artur-shaik";
+      repo = "vim-javacomplete2";
+      rev = "b01e32ec3d005423d5e6043b18b563086a623dc8";
+      sha256 = "0d9a6ynir9hgl9yp0mh0ng935llj4z9jkd9rvpddskcvq7h5590c";
+    };
+    meta.homepage = "https://github.com/artur-shaik/vim-javacomplete2/";
+  };
+
+  vim-javascript = buildVimPluginFrom2Nix {
+    pname = "vim-javascript";
+    version = "2021-04-02";
+    src = fetchFromGitHub {
+      owner = "pangloss";
+      repo = "vim-javascript";
+      rev = "585ad542834fd3d9e47e0ef59abafd69c696c80d";
+      sha256 = "0y0lpx54yfmqbmvrhy95d0gp3qvrqn7ak7mdfsqlddp77gzs7qk2";
+    };
+    meta.homepage = "https://github.com/pangloss/vim-javascript/";
+  };
+
+  vim-javascript-syntax = buildVimPluginFrom2Nix {
+    pname = "vim-javascript-syntax";
+    version = "2020-09-27";
+    src = fetchFromGitHub {
+      owner = "jelera";
+      repo = "vim-javascript-syntax";
+      rev = "7b8e2ee761e5d81f2bff57a728909a7968df098b";
+      sha256 = "1il68nf8zsz1hn5vqmsyjckmh9s8sw4z6lqqqrxwfjqkqm1ji5xq";
+    };
+    meta.homepage = "https://github.com/jelera/vim-javascript-syntax/";
+  };
+
+  vim-jinja = buildVimPluginFrom2Nix {
+    pname = "vim-jinja";
+    version = "2016-11-16";
+    src = fetchFromGitHub {
+      owner = "lepture";
+      repo = "vim-jinja";
+      rev = "8d330a7aaf0763d080dc82204b4aaba6ac0605c6";
+      sha256 = "1n62ga02rcj7jjgzvwr46pckj59dc1zqahjgampjcwdd8vf4mg3q";
+    };
+    meta.homepage = "https://github.com/lepture/vim-jinja/";
+  };
+
+  vim-jsbeautify = buildVimPluginFrom2Nix {
+    pname = "vim-jsbeautify";
+    version = "2020-12-11";
+    src = fetchFromGitHub {
+      owner = "maksimr";
+      repo = "vim-jsbeautify";
+      rev = "e4586884c8e54218a92d66f2ebc3fefc46315057";
+      sha256 = "0l6z6063cddwlsmz8h2ayz3pblfbvn277javi80xfzxg84nfl6ip";
+      fetchSubmodules = true;
+    };
+    meta.homepage = "https://github.com/maksimr/vim-jsbeautify/";
+  };
+
+  vim-jsdoc = buildVimPluginFrom2Nix {
+    pname = "vim-jsdoc";
+    version = "2021-04-01";
+    src = fetchFromGitHub {
+      owner = "heavenshell";
+      repo = "vim-jsdoc";
+      rev = "fc059e80ff0b368a9188d6c16db052da6ac0951f";
+      sha256 = "03x8hhaf5mirk38gb8j7k3fk6jjis64a4r2hnvkgg6hwf9h02f2g";
+    };
+    meta.homepage = "https://github.com/heavenshell/vim-jsdoc/";
+  };
+
+  vim-json = buildVimPluginFrom2Nix {
+    pname = "vim-json";
+    version = "2018-01-10";
+    src = fetchFromGitHub {
+      owner = "elzr";
+      repo = "vim-json";
+      rev = "3727f089410e23ae113be6222e8a08dd2613ecf2";
+      sha256 = "1c19pqrys45pzflj5jyrm4q6hcvs977lv6qsfvbnk7nm4skxrqp1";
+    };
+    meta.homepage = "https://github.com/elzr/vim-json/";
+  };
+
+  vim-jsonnet = buildVimPluginFrom2Nix {
+    pname = "vim-jsonnet";
+    version = "2019-07-29";
+    src = fetchFromGitHub {
+      owner = "google";
+      repo = "vim-jsonnet";
+      rev = "b7459b36e5465515f7cf81d0bb0e66e42a7c2eb5";
+      sha256 = "0fc6xpiyxly3ibs4lzn6dk9yd2cc353qb8lavag7zmims1bncvqf";
+    };
+    meta.homepage = "https://github.com/google/vim-jsonnet/";
+  };
+
+  vim-jsx-pretty = buildVimPluginFrom2Nix {
+    pname = "vim-jsx-pretty";
+    version = "2021-01-12";
+    src = fetchFromGitHub {
+      owner = "MaxMEllon";
+      repo = "vim-jsx-pretty";
+      rev = "6989f1663cc03d7da72b5ef1c03f87e6ddb70b41";
+      sha256 = "16d76jvfb1cq591i06fnmgzv0q16g89zz7cmvgvj24vap2wgkbp8";
+    };
+    meta.homepage = "https://github.com/MaxMEllon/vim-jsx-pretty/";
+  };
+
+  vim-jsx-typescript = buildVimPluginFrom2Nix {
+    pname = "vim-jsx-typescript";
+    version = "2020-12-03";
+    src = fetchFromGitHub {
+      owner = "peitalin";
+      repo = "vim-jsx-typescript";
+      rev = "22df470d92651426f2377e3166488672f7b4b4ef";
+      sha256 = "13w7n8km927v9yvm91c4z8g343bn2mp0k80nwv5y0sz279x4x9n7";
+    };
+    meta.homepage = "https://github.com/peitalin/vim-jsx-typescript/";
+  };
+
+  vim-kitty-navigator = buildVimPluginFrom2Nix {
+    pname = "vim-kitty-navigator";
+    version = "2021-03-31";
+    src = fetchFromGitHub {
+      owner = "knubie";
+      repo = "vim-kitty-navigator";
+      rev = "f09007be7e477a491a478444b302d079104af23d";
+      sha256 = "06m9rf0c9nxmyz9qnri1lmyb7cljv3vz2njxvh3fz8q7hjghh6cd";
+    };
+    meta.homepage = "https://github.com/knubie/vim-kitty-navigator/";
+  };
+
+  vim-LanguageTool = buildVimPluginFrom2Nix {
+    pname = "vim-LanguageTool";
+    version = "2021-02-08";
+    src = fetchFromGitHub {
+      owner = "dpelle";
+      repo = "vim-LanguageTool";
+      rev = "0372ffae78aa3eac3bfa48ba3bf2f4015a86385a";
+      sha256 = "00476l49lczj1rw5gb6vs7s9r0zi1khw0g1v6bsfwl5r32699l7r";
+    };
+    meta.homepage = "https://github.com/dpelle/vim-LanguageTool/";
+  };
+
+  vim-lastplace = buildVimPluginFrom2Nix {
+    pname = "vim-lastplace";
+    version = "2021-03-29";
+    src = fetchFromGitHub {
+      owner = "farmergreg";
+      repo = "vim-lastplace";
+      rev = "8f6c4454eb462776b6ebdc48e3e29a68ddeb726d";
+      sha256 = "04x6y9yp5xlds37bswmrc3xlhhjfln9nzrkippvvhl48b0kfnpj8";
+    };
+    meta.homepage = "https://github.com/farmergreg/vim-lastplace/";
+  };
+
+  vim-latex-live-preview = buildVimPluginFrom2Nix {
+    pname = "vim-latex-live-preview";
+    version = "2020-09-11";
+    src = fetchFromGitHub {
+      owner = "xuhdev";
+      repo = "vim-latex-live-preview";
+      rev = "afdf3f4778119f0bfacb07629d0155d58eb5562a";
+      sha256 = "0zihnphc021alqbn1f84n233r6a31n499046yw1yspkcnpz7mcxm";
+    };
+    meta.homepage = "https://github.com/xuhdev/vim-latex-live-preview/";
+  };
+
+  vim-lawrencium = buildVimPluginFrom2Nix {
+    pname = "vim-lawrencium";
+    version = "2020-10-10";
+    src = fetchFromGitHub {
+      owner = "ludovicchabant";
+      repo = "vim-lawrencium";
+      rev = "4592f24a50386e02870fa8d508cc7ba8454dc102";
+      sha256 = "158hslq4chlqr9mhdpcrbxnygjk4j1pc2caqc3zrwqh9qdk8mvha";
+    };
+    meta.homepage = "https://github.com/ludovicchabant/vim-lawrencium/";
+  };
+
+  vim-leader-guide = buildVimPluginFrom2Nix {
+    pname = "vim-leader-guide";
+    version = "2018-10-06";
+    src = fetchFromGitHub {
+      owner = "hecal3";
+      repo = "vim-leader-guide";
+      rev = "8dff63fcc29811bb30fccb135f31ad488a9a6170";
+      sha256 = "1n1qgvr729r28rprjkam0blh4qscs8bxf6ay7v8x732axg9gpyav";
+    };
+    meta.homepage = "https://github.com/hecal3/vim-leader-guide/";
+  };
+
+  vim-lean = buildVimPluginFrom2Nix {
+    pname = "vim-lean";
+    version = "2017-07-29";
+    src = fetchFromGitHub {
+      owner = "mk12";
+      repo = "vim-lean";
+      rev = "02d678e4346dce35d6b2eed9a03b2b2d3cc84127";
+      sha256 = "1yw13wf7j92gk8fwkhls6bdbz2h7xbyq4qba8zsfm76rbqn7vzfg";
+    };
+    meta.homepage = "https://github.com/mk12/vim-lean/";
+  };
+
+  vim-ledger = buildVimPluginFrom2Nix {
+    pname = "vim-ledger";
+    version = "2021-03-06";
+    src = fetchFromGitHub {
+      owner = "ledger";
+      repo = "vim-ledger";
+      rev = "96ec5f9a14211c3b1b2e4632c07df3a5fb68ef3b";
+      sha256 = "0kawxaxahg7sdpkyp65k7gy6hqbfcs1hy8w8rzvi2h9kw4y8xkr7";
+    };
+    meta.homepage = "https://github.com/ledger/vim-ledger/";
+  };
+
+  vim-lightline-coc = buildVimPluginFrom2Nix {
+    pname = "vim-lightline-coc";
+    version = "2021-03-03";
+    src = fetchFromGitHub {
+      owner = "josa42";
+      repo = "vim-lightline-coc";
+      rev = "53465b2c2ce7b6ae3497ad1cdb751dd3d8084d5c";
+      sha256 = "1r1w4j2ir6lzrlr2jhhy3ai4arswrbvjp46dxb6y9fyl516z5mza";
+    };
+    meta.homepage = "https://github.com/josa42/vim-lightline-coc/";
+  };
+
+  vim-lion = buildVimPluginFrom2Nix {
+    pname = "vim-lion";
+    version = "2020-07-18";
+    src = fetchFromGitHub {
+      owner = "tommcdo";
+      repo = "vim-lion";
+      rev = "ce46593ecd60e6051fb6e4d3986d2fc9f5a618b1";
+      sha256 = "1ci9yi55wcg6388fv3dqhjsyp3nvmf9dz7q2nqsxpyd6yj1szrh7";
+    };
+    meta.homepage = "https://github.com/tommcdo/vim-lion/";
+  };
+
+  vim-liquid = buildVimPluginFrom2Nix {
+    pname = "vim-liquid";
+    version = "2020-07-01";
+    src = fetchFromGitHub {
+      owner = "tpope";
+      repo = "vim-liquid";
+      rev = "94bd2ea1fd45cf0a21edc3433231e7fcb7791323";
+      sha256 = "0r8lisyhbzyw2w9xzbashlhnag98vws78xwmh03dpd8kbpcdiz0w";
+    };
+    meta.homepage = "https://github.com/tpope/vim-liquid/";
+  };
+
+  vim-localvimrc = buildVimPluginFrom2Nix {
+    pname = "vim-localvimrc";
+    version = "2021-02-18";
+    src = fetchFromGitHub {
+      owner = "embear";
+      repo = "vim-localvimrc";
+      rev = "0206f5f5a8721cc8c5c84ebb8ab2886e9afcd0ac";
+      sha256 = "1zin6pk581cnkivm2kgks0wrvpxjcl1y3x46wpkzdqg1hhif2129";
+    };
+    meta.homepage = "https://github.com/embear/vim-localvimrc/";
+  };
+
+  vim-logreview = buildVimPluginFrom2Nix {
+    pname = "vim-logreview";
+    version = "2017-07-08";
+    src = fetchFromGitHub {
+      owner = "andreshazard";
+      repo = "vim-logreview";
+      rev = "b7b66ab338e904127d796af49235b8c29742f18f";
+      sha256 = "09lyymq0f3ybqdzhbpia7b0wcjbcyg5nkqd72qk8jkvc42da2af3";
+    };
+    meta.homepage = "https://github.com/andreshazard/vim-logreview/";
+  };
+
+  vim-lsc = buildVimPluginFrom2Nix {
+    pname = "vim-lsc";
+    version = "2021-03-23";
+    src = fetchFromGitHub {
+      owner = "natebosch";
+      repo = "vim-lsc";
+      rev = "2f0cbbfb8ea8997b408e447a2bc9554a3de33617";
+      sha256 = "1y3r5a5mcjf8dp0pkmhgnbay10hh48w1b3wd795wwbm6nx4izjjq";
+    };
+    meta.homepage = "https://github.com/natebosch/vim-lsc/";
+  };
+
+  vim-lsp = buildVimPluginFrom2Nix {
+    pname = "vim-lsp";
+    version = "2021-04-04";
+    src = fetchFromGitHub {
+      owner = "prabirshrestha";
+      repo = "vim-lsp";
+      rev = "bba0f45c892b3c815c65ce44f93bcbe118a40377";
+      sha256 = "0wsbh8hx9f5jjdpvzbyb664h927jc44sm6rj2j6r9w6l2m8kr860";
+    };
+    meta.homepage = "https://github.com/prabirshrestha/vim-lsp/";
+  };
+
+  vim-lsp-cxx-highlight = buildVimPluginFrom2Nix {
+    pname = "vim-lsp-cxx-highlight";
+    version = "2021-03-14";
+    src = fetchFromGitHub {
+      owner = "jackguo380";
+      repo = "vim-lsp-cxx-highlight";
+      rev = "00818f0d8b7c87d3a1ecd81cc4ff1ab782355c2b";
+      sha256 = "1pjricwcqsbw466anwcndhj97g6qbblk95jaa8yg3a2fs8gdz8iz";
+    };
+    meta.homepage = "https://github.com/jackguo380/vim-lsp-cxx-highlight/";
+  };
+
+  vim-maktaba = buildVimPluginFrom2Nix {
+    pname = "vim-maktaba";
+    version = "2020-12-23";
+    src = fetchFromGitHub {
+      owner = "google";
+      repo = "vim-maktaba";
+      rev = "46730b0d818da2da005e3c8a38ff987a2dd36d7c";
+      sha256 = "1lc4lysv3q7qvivfrwqggrpdgsb3zkhq1clvzfsxfsa2m1y4gr0z";
+    };
+    meta.homepage = "https://github.com/google/vim-maktaba/";
+  };
+
+  vim-manpager = buildVimPluginFrom2Nix {
+    pname = "vim-manpager";
+    version = "2020-10-28";
+    src = fetchFromGitHub {
+      owner = "lambdalisue";
+      repo = "vim-manpager";
+      rev = "c23c02dd79b0a5cabe140d1f10f9aa2591cf55ed";
+      sha256 = "0g61qbp4vl010isigp6j3jjb3vb2kxalcbb56xzfa6c9k5zap5j9";
+    };
+    meta.homepage = "https://github.com/lambdalisue/vim-manpager/";
+  };
+
+  vim-markbar = buildVimPluginFrom2Nix {
+    pname = "vim-markbar";
+    version = "2020-08-31";
+    src = fetchFromGitHub {
+      owner = "Yilin-Yang";
+      repo = "vim-markbar";
+      rev = "df13c3abe88c01a716b1099de953dcfa1679e663";
+      sha256 = "1y5w182d57z1nl8c7ng25m88by88pnxqdsxmcnnygdfjmvbv8jl9";
+    };
+    meta.homepage = "https://github.com/Yilin-Yang/vim-markbar/";
+  };
+
+  vim-markdown = buildVimPluginFrom2Nix {
+    pname = "vim-markdown";
+    version = "2020-07-14";
+    src = fetchFromGitHub {
+      owner = "plasticboy";
+      repo = "vim-markdown";
+      rev = "8e5d86f7b85234d3d1b4207dceebc43a768ed5d4";
+      sha256 = "013vh2rnfifm5j56imar03rvchz68ll4lbgy9y8fbw7s9a0k6yaa";
+    };
+    meta.homepage = "https://github.com/plasticboy/vim-markdown/";
+  };
+
+  vim-markdown-composer = buildVimPluginFrom2Nix {
+    pname = "vim-markdown-composer";
+    version = "2020-08-15";
+    src = fetchFromGitHub {
+      owner = "euclio";
+      repo = "vim-markdown-composer";
+      rev = "c0f98ec3d6c4cb49455c18f2aeb83c0dcbad1bc4";
+      sha256 = "10vb3p8gksjy8zfzlkhirdsjwgvh1yv19plxwr404x87j393rs7n";
+      fetchSubmodules = true;
+    };
+    meta.homepage = "https://github.com/euclio/vim-markdown-composer/";
+  };
+
+  vim-matchup = buildVimPluginFrom2Nix {
+    pname = "vim-matchup";
+    version = "2021-04-03";
+    src = fetchFromGitHub {
+      owner = "andymass";
+      repo = "vim-matchup";
+      rev = "e54d6250d7487f008b9f4712a521144b83d6d4bb";
+      sha256 = "1x0a8hirs9szx4l3lsb79rmsa8d6ial2r8lxhp1r9vf3d0b71zcl";
+    };
+    meta.homepage = "https://github.com/andymass/vim-matchup/";
+  };
+
+  vim-mergetool = buildVimPluginFrom2Nix {
+    pname = "vim-mergetool";
+    version = "2019-06-22";
+    src = fetchFromGitHub {
+      owner = "samoshkin";
+      repo = "vim-mergetool";
+      rev = "0275a85256ad173e3cde586d54f66566c01b607f";
+      sha256 = "1i3zil06zyndm400i2pfn64ykbs29fw8l720229a8ypp9mxcibcp";
+    };
+    meta.homepage = "https://github.com/samoshkin/vim-mergetool/";
+  };
+
+  vim-merginal = buildVimPluginFrom2Nix {
+    pname = "vim-merginal";
+    version = "2020-12-06";
+    src = fetchFromGitHub {
+      owner = "idanarye";
+      repo = "vim-merginal";
+      rev = "7e1446614cdfb3a8eca621e5006631af72cda0f8";
+      sha256 = "133lddbwz63djr6pyg3dqy2pn795b48i3y4ps9ssyy6yjyi3pnrg";
+    };
+    meta.homepage = "https://github.com/idanarye/vim-merginal/";
+  };
+
+  vim-metamath = buildVimPluginFrom2Nix {
+    pname = "vim-metamath";
+    version = "2017-02-10";
+    src = fetchFromGitHub {
+      owner = "david-a-wheeler";
+      repo = "vim-metamath";
+      rev = "50aff63608256909159f1b8fc3f09ba61b2bb9bd";
+      sha256 = "0gwqafhr18wv9ygq47cxwi0k4gj1xll4z8s61w9l9vwaiy5znssh";
+    };
+    meta.homepage = "https://github.com/david-a-wheeler/vim-metamath/";
+  };
+
+  vim-misc = buildVimPluginFrom2Nix {
+    pname = "vim-misc";
+    version = "2015-05-21";
+    src = fetchFromGitHub {
+      owner = "xolox";
+      repo = "vim-misc";
+      rev = "3e6b8fb6f03f13434543ce1f5d24f6a5d3f34f0b";
+      sha256 = "0rd9788dyfc58py50xbiaz5j7nphyvf3rpp3yal7yq2dhf0awwfi";
+    };
+    meta.homepage = "https://github.com/xolox/vim-misc/";
+  };
+
+  vim-monokai = buildVimPluginFrom2Nix {
+    pname = "vim-monokai";
+    version = "2021-02-12";
+    src = fetchFromGitHub {
+      owner = "crusoexia";
+      repo = "vim-monokai";
+      rev = "65fa0678d8426ae2cc7a4c42a8f0d72bde2a7bbe";
+      sha256 = "0r118mxm34kr8yk66x9ddg2yh44gn00iaxljfbhg43nhp8jyzjbn";
+    };
+    meta.homepage = "https://github.com/crusoexia/vim-monokai/";
+  };
+
+  vim-monokai-pro = buildVimPluginFrom2Nix {
+    pname = "vim-monokai-pro";
+    version = "2020-10-02";
+    src = fetchFromGitHub {
+      owner = "phanviet";
+      repo = "vim-monokai-pro";
+      rev = "05e534f9fea9a8e4cbf69a1523c785845deabe4e";
+      sha256 = "0hf3iy2ydr6jpraf5zyqg2hl7ma5hn301jyxf6m9ffdsz7722jwm";
+    };
+    meta.homepage = "https://github.com/phanviet/vim-monokai-pro/";
+  };
+
+  vim-move = buildVimPluginFrom2Nix {
+    pname = "vim-move";
+    version = "2020-07-29";
+    src = fetchFromGitHub {
+      owner = "matze";
+      repo = "vim-move";
+      rev = "1460aa915c521864c926aa51fe20bf6bb8eaa065";
+      sha256 = "0sbdd1z8nlwpac1n4234pnczavxr1kazvj86xp4a8aa7vggdm9xa";
+    };
+    meta.homepage = "https://github.com/matze/vim-move/";
+  };
+
+  vim-mucomplete = buildVimPluginFrom2Nix {
+    pname = "vim-mucomplete";
+    version = "2021-03-14";
+    src = fetchFromGitHub {
+      owner = "lifepillar";
+      repo = "vim-mucomplete";
+      rev = "83cd9b3775438faafc3475f9f9d5fbb8da4dfa5b";
+      sha256 = "1l8rdmy9i81zq2ck0zvlsmqs7hfqpcxa0b8psf5nw72mwhbvv1np";
+    };
+    meta.homepage = "https://github.com/lifepillar/vim-mucomplete/";
+  };
+
+  vim-multiple-cursors = buildVimPluginFrom2Nix {
+    pname = "vim-multiple-cursors";
+    version = "2020-07-30";
+    src = fetchFromGitHub {
+      owner = "terryma";
+      repo = "vim-multiple-cursors";
+      rev = "6456718e1d30b42c04b920c5413ca44f68f08759";
+      sha256 = "0dmap8hjk6a0127fkab1pp5cllmijhqx80ijasngg11kxl0wzl32";
+    };
+    meta.homepage = "https://github.com/terryma/vim-multiple-cursors/";
+  };
+
+  vim-mundo = buildVimPluginFrom2Nix {
+    pname = "vim-mundo";
+    version = "2021-03-25";
+    src = fetchFromGitHub {
+      owner = "simnalamburt";
+      repo = "vim-mundo";
+      rev = "c6dcea90166750bb5ed40321749966b1a8020a1a";
+      sha256 = "1bd9xab96m2j6zcp6bh7k958wj95m8w40hczmn2qzpq3cvpy8nb0";
+    };
+    meta.homepage = "https://github.com/simnalamburt/vim-mundo/";
+  };
+
+  vim-nerdtree-syntax-highlight = buildVimPluginFrom2Nix {
+    pname = "vim-nerdtree-syntax-highlight";
+    version = "2021-01-11";
+    src = fetchFromGitHub {
+      owner = "tiagofumo";
+      repo = "vim-nerdtree-syntax-highlight";
+      rev = "5178ee4d7f4e7761187df30bb709f703d91df18a";
+      sha256 = "0i690a9sd3a9193mdm150q5yx43mihpzkm0k5glllsmnwpngrq1a";
+    };
+    meta.homepage = "https://github.com/tiagofumo/vim-nerdtree-syntax-highlight/";
+  };
+
+  vim-nerdtree-tabs = buildVimPluginFrom2Nix {
+    pname = "vim-nerdtree-tabs";
+    version = "2018-12-21";
+    src = fetchFromGitHub {
+      owner = "jistr";
+      repo = "vim-nerdtree-tabs";
+      rev = "07d19f0299762669c6f93fbadb8249da6ba9de62";
+      sha256 = "16iqhp5l6xvq0k8bq9ngqfhish1fwggpmvd7ni1fh5dqr00iii9x";
+    };
+    meta.homepage = "https://github.com/jistr/vim-nerdtree-tabs/";
+  };
+
+  vim-nftables = buildVimPluginFrom2Nix {
+    pname = "vim-nftables";
+    version = "2020-06-29";
+    src = fetchFromGitHub {
+      owner = "nfnty";
+      repo = "vim-nftables";
+      rev = "26f8a506c6f3e41f1e4a8d6aa94c9a79a666bbff";
+      sha256 = "1z5ffgxdq8niggm18qikrh5hl8zs05gdij4z6dfnzy00xvancc40";
+    };
+    meta.homepage = "https://github.com/nfnty/vim-nftables/";
+  };
+
+  vim-niceblock = buildVimPluginFrom2Nix {
+    pname = "vim-niceblock";
+    version = "2018-09-06";
+    src = fetchFromGitHub {
+      owner = "kana";
+      repo = "vim-niceblock";
+      rev = "9302f527eefc0fde8df983cbb9710ad52c4213b5";
+      sha256 = "1d0rx7s10jl1q9y5s4235imizbyxrgkm4dxh5ankcr8s617l7mz2";
+    };
+    meta.homepage = "https://github.com/kana/vim-niceblock/";
+  };
+
+  vim-ninja-feet = buildVimPluginFrom2Nix {
+    pname = "vim-ninja-feet";
+    version = "2019-05-12";
+    src = fetchFromGitHub {
+      owner = "tommcdo";
+      repo = "vim-ninja-feet";
+      rev = "5b48f97bf4865a25f5f4568c45cdfd08f946ec4f";
+      sha256 = "1i3n5nlwyg65k0f0qrimbfs67l2xx39cqp4gyrycw4vzp6hs0lsc";
+    };
+    meta.homepage = "https://github.com/tommcdo/vim-ninja-feet/";
+  };
+
+  vim-nix = buildVimPluginFrom2Nix {
+    pname = "vim-nix";
+    version = "2020-11-16";
+    src = fetchFromGitHub {
+      owner = "LnL7";
+      repo = "vim-nix";
+      rev = "7542a2bf66d72cb86fc80529867accbc787f744b";
+      sha256 = "1kgziwckdjg3sb1z4anwsn1c72hny60vhimxpb6424bylk1qy22j";
+    };
+    meta.homepage = "https://github.com/LnL7/vim-nix/";
+  };
+
+  vim-nong-theme = buildVimPluginFrom2Nix {
+    pname = "vim-nong-theme";
+    version = "2020-12-16";
+    src = fetchFromGitHub {
+      owner = "fruit-in";
+      repo = "vim-nong-theme";
+      rev = "cf7eacc6140ef67f7fc6b3099a6ef82767af82e0";
+      sha256 = "17lvmszydpgn54n54z4mhcipzrwxggnq7lr69k8vwbwmrr8sk0qa";
+    };
+    meta.homepage = "https://github.com/fruit-in/vim-nong-theme/";
+  };
+
+  vim-numbertoggle = buildVimPluginFrom2Nix {
+    pname = "vim-numbertoggle";
+    version = "2021-01-12";
+    src = fetchFromGitHub {
+      owner = "jeffkreeftmeijer";
+      repo = "vim-numbertoggle";
+      rev = "df9b1fe616507340718716204ba7f434125bdf7a";
+      sha256 = "02zgzkwv2fk4zyg6agvski054nwkrm1m9dw0jpva57ksbf8rvqrg";
+    };
+    meta.homepage = "https://github.com/jeffkreeftmeijer/vim-numbertoggle/";
+  };
+
+  vim-obsession = buildVimPluginFrom2Nix {
+    pname = "vim-obsession";
+    version = "2021-03-22";
+    src = fetchFromGitHub {
+      owner = "tpope";
+      repo = "vim-obsession";
+      rev = "82c9ac5e130c92a46e043dd9cd9e5b48d15e286d";
+      sha256 = "0lfcba8sk25l5yp3agh6pwniddf8jx627ikpr8i2z9ary2fqsj98";
+    };
+    meta.homepage = "https://github.com/tpope/vim-obsession/";
+  };
+
+  vim-ocaml = buildVimPluginFrom2Nix {
+    pname = "vim-ocaml";
+    version = "2021-03-03";
+    src = fetchFromGitHub {
+      owner = "ocaml";
+      repo = "vim-ocaml";
+      rev = "400bee047d116d1cbe72a479943ec69d5b5bba01";
+      sha256 = "0njprv1h38rsagpmp1z68vq90pf9fll3pa8767nhgv2kyadn29jx";
+    };
+    meta.homepage = "https://github.com/ocaml/vim-ocaml/";
+  };
+
+  vim-one = buildVimPluginFrom2Nix {
+    pname = "vim-one";
+    version = "2020-12-14";
+    src = fetchFromGitHub {
+      owner = "rakr";
+      repo = "vim-one";
+      rev = "187f5c85b682c1933f8780d4d419c55d26a82e24";
+      sha256 = "0lnfw15p865hcnnjcaikf2xwfiqwidsqryq67j1bh74215ib8r10";
+    };
+    meta.homepage = "https://github.com/rakr/vim-one/";
+  };
+
+  vim-operator-replace = buildVimPluginFrom2Nix {
+    pname = "vim-operator-replace";
+    version = "2015-02-24";
+    src = fetchFromGitHub {
+      owner = "kana";
+      repo = "vim-operator-replace";
+      rev = "1345a556a321a092716e149d4765a5e17c0e9f0f";
+      sha256 = "07cibp61zwbzpjfxqdc77fzrgnz8jhimmdhhyjr0lvgrjgvsnv6q";
+    };
+    meta.homepage = "https://github.com/kana/vim-operator-replace/";
+  };
+
+  vim-operator-surround = buildVimPluginFrom2Nix {
+    pname = "vim-operator-surround";
+    version = "2018-11-01";
+    src = fetchFromGitHub {
+      owner = "rhysd";
+      repo = "vim-operator-surround";
+      rev = "80337a40a829cfc77b065a71d8a609e2ad7d2c8b";
+      sha256 = "0f9shg81bl39hz67ahbi6k6gbhky7gzp8by16fhiz75hbjgp9lq2";
+    };
+    meta.homepage = "https://github.com/rhysd/vim-operator-surround/";
+  };
+
+  vim-operator-user = buildVimPluginFrom2Nix {
+    pname = "vim-operator-user";
+    version = "2015-02-17";
+    src = fetchFromGitHub {
+      owner = "kana";
+      repo = "vim-operator-user";
+      rev = "c3dfd41c1ed516b4b901c97562e644de62c367aa";
+      sha256 = "16y2fyrmwg4vkcl85i8xg8s6m39ca2jvgi9qm36b3vzbnkcifafb";
+    };
+    meta.homepage = "https://github.com/kana/vim-operator-user/";
+  };
+
+  vim-orgmode = buildVimPluginFrom2Nix {
+    pname = "vim-orgmode";
+    version = "2021-01-20";
+    src = fetchFromGitHub {
+      owner = "jceb";
+      repo = "vim-orgmode";
+      rev = "3aeea0648f485f002cfcaf1b3e6a25ef43a12a66";
+      sha256 = "0jx5vw72p8s5np31g0macwx3iqghfgzvx30akyk5fspfayjivaxl";
+    };
+    meta.homepage = "https://github.com/jceb/vim-orgmode/";
+  };
+
+  vim-osc52 = buildVimPluginFrom2Nix {
+    pname = "vim-osc52";
+    version = "2020-09-19";
+    src = fetchFromGitHub {
+      owner = "fcpg";
+      repo = "vim-osc52";
+      rev = "551f20e62e68684a5b745ae08b0c4236d86e4c2b";
+      sha256 = "0yxjs32ab27l3kmh5lpinj15m11winqsnmykjq7lizs15v7gd2s9";
+    };
+    meta.homepage = "https://github.com/fcpg/vim-osc52/";
+  };
+
+  vim-oscyank = buildVimPluginFrom2Nix {
+    pname = "vim-oscyank";
+    version = "2021-04-01";
+    src = fetchFromGitHub {
+      owner = "ojroques";
+      repo = "vim-oscyank";
+      rev = "5b48c13143e55c234e8bf5bcfa2439b9ffa85241";
+      sha256 = "1njxf2vwd9jfpjybx0f5c7k7fhlzmdwkwsflb9rkgv0pz3l0wkqb";
+    };
+    meta.homepage = "https://github.com/ojroques/vim-oscyank/";
+  };
+
+  vim-over = buildVimPluginFrom2Nix {
+    pname = "vim-over";
+    version = "2020-01-26";
+    src = fetchFromGitHub {
+      owner = "osyo-manga";
+      repo = "vim-over";
+      rev = "878f83bdac0cda308f599d319f45c7877d5274a9";
+      sha256 = "00k29pcn69d9036jhjpd1xqxh59qwl30l37lsfijlv18ks0wwiqn";
+    };
+    meta.homepage = "https://github.com/osyo-manga/vim-over/";
+  };
+
+  vim-packer = buildVimPluginFrom2Nix {
+    pname = "vim-packer";
+    version = "2018-11-11";
+    src = fetchFromGitHub {
+      owner = "hashivim";
+      repo = "vim-packer";
+      rev = "c2561f41e46df8a78a6b51226f60607582052134";
+      sha256 = "070ncbmwh8wxxfzf7phx0hb0dk9krlvsj5mvrn7kr5y3mngdg9v4";
+    };
+    meta.homepage = "https://github.com/hashivim/vim-packer/";
+  };
+
+  vim-pager = buildVimPluginFrom2Nix {
+    pname = "vim-pager";
+    version = "2015-08-26";
+    src = fetchFromGitHub {
+      owner = "lambdalisue";
+      repo = "vim-pager";
+      rev = "a657d508b4d5a23aada7585c9f1e0063914c0c45";
+      sha256 = "10xm77pia916zf9i2llyhs89s653r98l6zq8cswm7cw61bjfxvv6";
+    };
+    meta.homepage = "https://github.com/lambdalisue/vim-pager/";
+  };
+
+  vim-pandoc = buildVimPluginFrom2Nix {
+    pname = "vim-pandoc";
+    version = "2021-03-10";
+    src = fetchFromGitHub {
+      owner = "vim-pandoc";
+      repo = "vim-pandoc";
+      rev = "0d4b68eb7f63e43f963a119d60a3e29c2bb822e0";
+      sha256 = "0p7m75f7vqdm0nvg0p3nbzqnsd7wdvbsf3y2mzirdl7c0pbvphqp";
+    };
+    meta.homepage = "https://github.com/vim-pandoc/vim-pandoc/";
+  };
+
+  vim-pandoc-after = buildVimPluginFrom2Nix {
+    pname = "vim-pandoc-after";
+    version = "2019-04-29";
+    src = fetchFromGitHub {
+      owner = "vim-pandoc";
+      repo = "vim-pandoc-after";
+      rev = "26513a138d5e2ba8c785e0d7dfec0218e983e9dd";
+      sha256 = "07wg4j2kx08s9hvvp8jspwb0v7fgac8m8cjr3y1sbq8ca18bkvgy";
+    };
+    meta.homepage = "https://github.com/vim-pandoc/vim-pandoc-after/";
+  };
+
+  vim-pandoc-syntax = buildVimPluginFrom2Nix {
+    pname = "vim-pandoc-syntax";
+    version = "2021-03-10";
+    src = fetchFromGitHub {
+      owner = "vim-pandoc";
+      repo = "vim-pandoc-syntax";
+      rev = "aba6b5596cf0e879a83a2aa5edc93e5e5753bea8";
+      sha256 = "0hgzmfcyl3qhdmyyxdaynlm7psk164v8xg5j1kvdaxxgj4lwbnig";
+    };
+    meta.homepage = "https://github.com/vim-pandoc/vim-pandoc-syntax/";
+  };
+
+  vim-parinfer = buildVimPluginFrom2Nix {
+    pname = "vim-parinfer";
+    version = "2020-02-04";
+    src = fetchFromGitHub {
+      owner = "bhurlow";
+      repo = "vim-parinfer";
+      rev = "a8c075ce5256bffbf1f62e08aba37dca88d0cf1a";
+      sha256 = "1v2pyjyxvqw2kl9j4pdpdlbl2q3jnndcb8iqgyygs7jn91c4s073";
+    };
+    meta.homepage = "https://github.com/bhurlow/vim-parinfer/";
+  };
+
+  vim-pasta = buildVimPluginFrom2Nix {
+    pname = "vim-pasta";
+    version = "2018-09-08";
+    src = fetchFromGitHub {
+      owner = "sickill";
+      repo = "vim-pasta";
+      rev = "cb4501a123d74fc7d66ac9f10b80c9d393746c66";
+      sha256 = "14rswwx24i75xzgkbx1hywan1msn2ki26353ly2pyvznnqss1pwq";
+    };
+    meta.homepage = "https://github.com/sickill/vim-pasta/";
+  };
+
+  vim-pathogen = buildVimPluginFrom2Nix {
+    pname = "vim-pathogen";
+    version = "2021-01-04";
+    src = fetchFromGitHub {
+      owner = "tpope";
+      repo = "vim-pathogen";
+      rev = "e0a3efbda5ea8e5b181b2b232ef6453c05d07732";
+      sha256 = "1b9v6k0560b7yf2l9v8n23bm27k3akycrv19wfi50havxdjagw1f";
+    };
+    meta.homepage = "https://github.com/tpope/vim-pathogen/";
+  };
+
+  vim-peekaboo = buildVimPluginFrom2Nix {
+    pname = "vim-peekaboo";
+    version = "2019-12-12";
+    src = fetchFromGitHub {
+      owner = "junegunn";
+      repo = "vim-peekaboo";
+      rev = "cc4469c204099c73dd7534531fa8ba271f704831";
+      sha256 = "11lgf60v2kj772d9azkfddypwidcgfps5mvnhmp4gg0fmfx12h99";
+    };
+    meta.homepage = "https://github.com/junegunn/vim-peekaboo/";
+  };
+
+  vim-pencil = buildVimPluginFrom2Nix {
+    pname = "vim-pencil";
+    version = "2021-02-06";
+    src = fetchFromGitHub {
+      owner = "reedes";
+      repo = "vim-pencil";
+      rev = "2135374d48a7cb89efd5e818c12bb0ff450dfbb4";
+      sha256 = "17wgin33fj40brdb3zhm70qls2j2vssc4yrrv36y1qxwi7gdzn0f";
+    };
+    meta.homepage = "https://github.com/reedes/vim-pencil/";
+  };
+
+  vim-phabricator = buildVimPluginFrom2Nix {
+    pname = "vim-phabricator";
+    version = "2020-09-16";
+    src = fetchFromGitHub {
+      owner = "jparise";
+      repo = "vim-phabricator";
+      rev = "d5c0571f44f2c44ba32df2d12e52b4dfcd4921ed";
+      sha256 = "003zi8dvyyhvlb30zz8ah7iai8pmwmsk2jwa38386ff0jfm6dkpq";
+    };
+    meta.homepage = "https://github.com/jparise/vim-phabricator/";
+  };
+
+  vim-pico8-syntax = buildVimPluginFrom2Nix {
+    pname = "vim-pico8-syntax";
+    version = "2016-10-30";
+    src = fetchFromGitHub {
+      owner = "justinj";
+      repo = "vim-pico8-syntax";
+      rev = "dbdd92fad0533eeaeaea844815d4de11e9507ce7";
+      sha256 = "0say0bb74rdbabgsf7rrbm8x841pmgh80fwr6kn94fgphr3vhm0s";
+    };
+    meta.homepage = "https://github.com/justinj/vim-pico8-syntax/";
+  };
+
+  vim-plug = buildVimPluginFrom2Nix {
+    pname = "vim-plug";
+    version = "2021-02-08";
+    src = fetchFromGitHub {
+      owner = "junegunn";
+      repo = "vim-plug";
+      rev = "cffcfe150bda75177920530c5f1911b52f70a065";
+      sha256 = "0sgfnxi1f5mnzcbklcmq6x17r1z1kz8s7h2h94girmd4aga3gcp0";
+    };
+    meta.homepage = "https://github.com/junegunn/vim-plug/";
+  };
+
+  vim-plugin-AnsiEsc = buildVimPluginFrom2Nix {
+    pname = "vim-plugin-AnsiEsc";
+    version = "2019-04-07";
+    src = fetchFromGitHub {
+      owner = "powerman";
+      repo = "vim-plugin-AnsiEsc";
+      rev = "690f820d20b6e3a79ba20499874eb7333aa4ca5c";
+      sha256 = "05sf9xh7zs475kykz1hsp0xp7iiclp7pdiy3bpx7wlfp9z71bd9p";
+    };
+    meta.homepage = "https://github.com/powerman/vim-plugin-AnsiEsc/";
+  };
+
+  vim-polyglot = buildVimPluginFrom2Nix {
+    pname = "vim-polyglot";
+    version = "2021-03-01";
+    src = fetchFromGitHub {
+      owner = "sheerun";
+      repo = "vim-polyglot";
+      rev = "cc63193ce82c1e7b9ee2ad7d0ddd14e8394211ef";
+      sha256 = "0and9148l36m8bhnzlyjirl1bd2ynswwzjc22605if82az9j55m8";
+    };
+    meta.homepage = "https://github.com/sheerun/vim-polyglot/";
+  };
+
+  vim-pony = buildVimPluginFrom2Nix {
+    pname = "vim-pony";
+    version = "2018-07-27";
+    src = fetchFromGitHub {
+      owner = "jakwings";
+      repo = "vim-pony";
+      rev = "b26f01a869000b73b80dceabd725d91bfe175b75";
+      sha256 = "0if8g94m3xmpda80byfxs649w2is9ah1k8v3028nblan73zlc8x8";
+    };
+    meta.homepage = "https://github.com/jakwings/vim-pony/";
+  };
+
+  vim-poweryank = buildVimPluginFrom2Nix {
+    pname = "vim-poweryank";
+    version = "2017-08-13";
+    src = fetchFromGitHub {
+      owner = "haya14busa";
+      repo = "vim-poweryank";
+      rev = "48dff95dbd64423c96fdae5c18eaddb5b5fa3064";
+      sha256 = "016w6nn2qhra9v55sn6g6qf1pj8f072f22r97nzxy4958k7f114a";
+    };
+    meta.homepage = "https://github.com/haya14busa/vim-poweryank/";
+  };
+
+  vim-prettyprint = buildVimPluginFrom2Nix {
+    pname = "vim-prettyprint";
+    version = "2016-07-16";
+    src = fetchFromGitHub {
+      owner = "thinca";
+      repo = "vim-prettyprint";
+      rev = "d6060d2b1ff1cff71714e126addd3b10883ade12";
+      sha256 = "0mb1ylsq4023ik9wd9iwzlynra2c320xp9h2i79bspapglgd5gk9";
+    };
+    meta.homepage = "https://github.com/thinca/vim-prettyprint/";
+  };
+
+  vim-projectionist = buildVimPluginFrom2Nix {
+    pname = "vim-projectionist";
+    version = "2021-04-05";
+    src = fetchFromGitHub {
+      owner = "tpope";
+      repo = "vim-projectionist";
+      rev = "8dda7acb7e24b44ef691ba19b35f585e97e91b30";
+      sha256 = "0laqkgwv6hq1ix3kahvx0sfb8c7ifx61z2n4npqswpn0ri4ckd2j";
+    };
+    meta.homepage = "https://github.com/tpope/vim-projectionist/";
+  };
+
+  vim-prosession = buildVimPluginFrom2Nix {
+    pname = "vim-prosession";
+    version = "2021-03-21";
+    src = fetchFromGitHub {
+      owner = "dhruvasagar";
+      repo = "vim-prosession";
+      rev = "976f3e61c2dd4ab709ea5eccbbab9e42d35d7e8c";
+      sha256 = "01dbiwj1x8rd5yy19cphxysga3fi5l3il2ph8hr1v4adzvw8269z";
+    };
+    meta.homepage = "https://github.com/dhruvasagar/vim-prosession/";
+  };
+
+  vim-protobuf = buildVimPluginFrom2Nix {
+    pname = "vim-protobuf";
+    version = "2017-12-26";
+    src = fetchFromGitHub {
+      owner = "uarun";
+      repo = "vim-protobuf";
+      rev = "0d0f4e4b4087e0e608066aa2ba295e396d039931";
+      sha256 = "1vh9f34rb7pg6dc64xhr102yig6y03is74777av464bhq651z7p5";
+    };
+    meta.homepage = "https://github.com/uarun/vim-protobuf/";
+  };
+
+  vim-ps1 = buildVimPluginFrom2Nix {
+    pname = "vim-ps1";
+    version = "2020-11-25";
+    src = fetchFromGitHub {
+      owner = "PProvost";
+      repo = "vim-ps1";
+      rev = "26a75886caef937bfad4201d5478571a992984c2";
+      sha256 = "1qgwn57hs82a6pjilnqafd4c2za4r3vkys9i9apbxqhcxypx05hl";
+    };
+    meta.homepage = "https://github.com/PProvost/vim-ps1/";
+  };
+
+  vim-pug = buildVimPluginFrom2Nix {
+    pname = "vim-pug";
+    version = "2019-09-23";
+    src = fetchFromGitHub {
+      owner = "digitaltoad";
+      repo = "vim-pug";
+      rev = "ea39cd942cf3194230cf72bfb838901a5344d3b3";
+      sha256 = "07141jkfnaia4ydc6qcg0bc06w720l2lzl7bm4bsjwswqrzmhfam";
+    };
+    meta.homepage = "https://github.com/digitaltoad/vim-pug/";
+  };
+
+  vim-puppet = buildVimPluginFrom2Nix {
+    pname = "vim-puppet";
+    version = "2021-01-30";
+    src = fetchFromGitHub {
+      owner = "rodjek";
+      repo = "vim-puppet";
+      rev = "b282072eb145c7719319bee1963c33ad876b0cea";
+      sha256 = "1m6zbyg5hh3rhwq36836ldwhgcsmh4bl0lz5g4nzpc2ch83crrn8";
+    };
+    meta.homepage = "https://github.com/rodjek/vim-puppet/";
+  };
+
+  vim-python-pep8-indent = buildVimPluginFrom2Nix {
+    pname = "vim-python-pep8-indent";
+    version = "2020-03-20";
+    src = fetchFromGitHub {
+      owner = "Vimjas";
+      repo = "vim-python-pep8-indent";
+      rev = "60ba5e11a61618c0344e2db190210145083c91f8";
+      sha256 = "1blyhkykfnf4pgfq9hn9l8pq0iqdvig9m4zd8qq9aa9rlm8f0kzh";
+    };
+    meta.homepage = "https://github.com/Vimjas/vim-python-pep8-indent/";
+  };
+
+  vim-qf = buildVimPluginFrom2Nix {
+    pname = "vim-qf";
+    version = "2021-03-29";
+    src = fetchFromGitHub {
+      owner = "romainl";
+      repo = "vim-qf";
+      rev = "127257057c4befb8c1026a7ba7e07713af1fb5c8";
+      sha256 = "1ai915kfxq4m8ba304qpcc2qb5rcj2vsrfcdh3blb1slw3a90hiq";
+    };
+    meta.homepage = "https://github.com/romainl/vim-qf/";
+  };
+
+  vim-qml = buildVimPluginFrom2Nix {
+    pname = "vim-qml";
+    version = "2020-11-03";
+    src = fetchFromGitHub {
+      owner = "peterhoeg";
+      repo = "vim-qml";
+      rev = "50d2e737094c146195171b7d52e522384f15afe8";
+      sha256 = "1iz2l51c15ijkpzyk5qwmd8y0yy2z8f1jwxcwk16h63g4nmfm1zr";
+    };
+    meta.homepage = "https://github.com/peterhoeg/vim-qml/";
+  };
+
+  vim-quickrun = buildVimPluginFrom2Nix {
+    pname = "vim-quickrun";
+    version = "2021-01-27";
+    src = fetchFromGitHub {
+      owner = "thinca";
+      repo = "vim-quickrun";
+      rev = "c980977f1d77b3285937b9d7b5baa964fc9ed7f5";
+      sha256 = "00f1slgrjnh8m59sm3xmias3jvjlvw26yigv9fmy6zwcynlivc5x";
+    };
+    meta.homepage = "https://github.com/thinca/vim-quickrun/";
+  };
+
+  vim-racer = buildVimPluginFrom2Nix {
+    pname = "vim-racer";
+    version = "2021-04-04";
+    src = fetchFromGitHub {
+      owner = "racer-rust";
+      repo = "vim-racer";
+      rev = "d1aead98a936cd8165b3329511d7c987226eb3a6";
+      sha256 = "11f6iw9c59kdjcdkzn27szpi0bxhpp42qmlannnqzm49ssl817vv";
+    };
+    meta.homepage = "https://github.com/racer-rust/vim-racer/";
+  };
+
+  vim-racket = buildVimPluginFrom2Nix {
+    pname = "vim-racket";
+    version = "2020-07-24";
+    src = fetchFromGitHub {
+      owner = "wlangstroth";
+      repo = "vim-racket";
+      rev = "bca2643c3d8bd0fcd46ab73bee69023a5da1964b";
+      sha256 = "059a79d66yxhhwq127sjl84ky1153im7mm5ixjcsgg9glgvd39jy";
+    };
+    meta.homepage = "https://github.com/wlangstroth/vim-racket/";
+  };
+
+  vim-ragtag = buildVimPluginFrom2Nix {
+    pname = "vim-ragtag";
+    version = "2021-02-22";
+    src = fetchFromGitHub {
+      owner = "tpope";
+      repo = "vim-ragtag";
+      rev = "b8966c4f6503a8baaec39e17bd0bf38b2aadc9b2";
+      sha256 = "0q4blsgnl4l2bkhgjry6xnszhsswdand52gc6gdjffwlzwa9jczy";
+    };
+    meta.homepage = "https://github.com/tpope/vim-ragtag/";
+  };
+
+  vim-rails = buildVimPluginFrom2Nix {
+    pname = "vim-rails";
+    version = "2021-03-29";
+    src = fetchFromGitHub {
+      owner = "tpope";
+      repo = "vim-rails";
+      rev = "9c3c831a089c7b4dcc4ebd8b8c73f366f754c976";
+      sha256 = "15m7hhqadvpf3ryig5vifp8m0md2mg9apx71z8xrpc7hgwsvy1bi";
+    };
+    meta.homepage = "https://github.com/tpope/vim-rails/";
+  };
+
+  vim-repeat = buildVimPluginFrom2Nix {
+    pname = "vim-repeat";
+    version = "2021-01-25";
+    src = fetchFromGitHub {
+      owner = "tpope";
+      repo = "vim-repeat";
+      rev = "24afe922e6a05891756ecf331f39a1f6743d3d5a";
+      sha256 = "0y18cy5wvkb4pv5qjsfndrpcvz0dg9v0r6ia8k9isp4agdmxkdzj";
+    };
+    meta.homepage = "https://github.com/tpope/vim-repeat/";
+  };
+
+  vim-rhubarb = buildVimPluginFrom2Nix {
+    pname = "vim-rhubarb";
+    version = "2021-04-03";
+    src = fetchFromGitHub {
+      owner = "tpope";
+      repo = "vim-rhubarb";
+      rev = "71d5c3598e0d14af3fbaf2530c061c306db5a962";
+      sha256 = "03izgmaa150159lp43hsn17yqx0w8r8wa04cf1rnk1zw00zr2073";
+    };
+    meta.homepage = "https://github.com/tpope/vim-rhubarb/";
+  };
+
+  vim-rooter = buildVimPluginFrom2Nix {
+    pname = "vim-rooter";
+    version = "2021-03-11";
+    src = fetchFromGitHub {
+      owner = "airblade";
+      repo = "vim-rooter";
+      rev = "544e701066c69bbeb45297d0285c2719e125440b";
+      sha256 = "0mj5zvfsi4n8qi8cq0h99j1zb11xmrpkm31ll4q1bm5mf57kbmxa";
+    };
+    meta.homepage = "https://github.com/airblade/vim-rooter/";
+  };
+
+  vim-rsi = buildVimPluginFrom2Nix {
+    pname = "vim-rsi";
+    version = "2021-01-16";
+    src = fetchFromGitHub {
+      owner = "tpope";
+      repo = "vim-rsi";
+      rev = "e181883a0932d9315cceb96b5fffb5e2ec67068e";
+      sha256 = "1pfg3y1hf840pr7f6vcwldbraj2w4c2pnf7ampbgyric0q3f4708";
+    };
+    meta.homepage = "https://github.com/tpope/vim-rsi/";
+  };
+
+  vim-ruby = buildVimPluginFrom2Nix {
+    pname = "vim-ruby";
+    version = "2021-02-03";
+    src = fetchFromGitHub {
+      owner = "vim-ruby";
+      repo = "vim-ruby";
+      rev = "4788a08433c3c90e131fc7d110d82577e1234a86";
+      sha256 = "1sq1li4s40xgy8ww4krsxqdqlwhcd9l67551iadccvsvjka16ynw";
+    };
+    meta.homepage = "https://github.com/vim-ruby/vim-ruby/";
+  };
+
+  vim-salve = buildVimPluginFrom2Nix {
+    pname = "vim-salve";
+    version = "2020-09-22";
+    src = fetchFromGitHub {
+      owner = "tpope";
+      repo = "vim-salve";
+      rev = "5958a99c4ac783cec668380917ac1f62b27466fe";
+      sha256 = "1vs2rfhcxm9v4ndnsx85b1i29h67qv748k3nvdxc145v1hjcnapm";
+    };
+    meta.homepage = "https://github.com/tpope/vim-salve/";
+  };
+
+  vim-sandwich = buildVimPluginFrom2Nix {
+    pname = "vim-sandwich";
+    version = "2020-12-15";
+    src = fetchFromGitHub {
+      owner = "machakann";
+      repo = "vim-sandwich";
+      rev = "9e6340affe9f53c11a6975a5f50b9bf48adb692c";
+      sha256 = "0ghli93qzr3i8ai90waikylwas3xgy5bdgykng55b9mqgpmc3faf";
+    };
+    meta.homepage = "https://github.com/machakann/vim-sandwich/";
+  };
+
+  vim-sayonara = buildVimPluginFrom2Nix {
+    pname = "vim-sayonara";
+    version = "2017-03-13";
+    src = fetchFromGitHub {
+      owner = "mhinz";
+      repo = "vim-sayonara";
+      rev = "357135ce127581fab2c0caf45d4b3fec4603aa77";
+      sha256 = "0m4pbpqq7m4rbqj1sxzx3r25znm9m5df6z6kndc6x5c1p27a63pi";
+    };
+    meta.homepage = "https://github.com/mhinz/vim-sayonara/";
+  };
+
+  vim-scala = buildVimPluginFrom2Nix {
+    pname = "vim-scala";
+    version = "2019-06-24";
+    src = fetchFromGitHub {
+      owner = "derekwyatt";
+      repo = "vim-scala";
+      rev = "bbdfea4b98fdb8866a8a6060ec1294643cfeb413";
+      sha256 = "14q8j6vwqad2nwia29d0844v2zdcx04xn9dyicv13sdpivzcm4rb";
+    };
+    meta.homepage = "https://github.com/derekwyatt/vim-scala/";
+  };
+
+  vim-scouter = buildVimPluginFrom2Nix {
+    pname = "vim-scouter";
+    version = "2014-08-10";
+    src = fetchFromGitHub {
+      owner = "thinca";
+      repo = "vim-scouter";
+      rev = "5221901d4ad6b2ef8b370b336db2aa7f69f2b6dc";
+      sha256 = "0fx64hj1kzrsxz96195d5lm3x88zyycbcr78819mcbgfzyxis6b8";
+    };
+    meta.homepage = "https://github.com/thinca/vim-scouter/";
+  };
+
+  vim-scriptease = buildVimPluginFrom2Nix {
+    pname = "vim-scriptease";
+    version = "2021-03-25";
+    src = fetchFromGitHub {
+      owner = "tpope";
+      repo = "vim-scriptease";
+      rev = "dbdc88f2ca38613a089354823fb2cec4d87d104d";
+      sha256 = "0i89vrnfphr32qcix9ah9cf68xnw6n8jm03xmgys29gkfim4v7sq";
+    };
+    meta.homepage = "https://github.com/tpope/vim-scriptease/";
+  };
+
+  vim-sensible = buildVimPluginFrom2Nix {
+    pname = "vim-sensible";
+    version = "2019-11-24";
+    src = fetchFromGitHub {
+      owner = "tpope";
+      repo = "vim-sensible";
+      rev = "2d9f34c09f548ed4df213389caa2882bfe56db58";
+      sha256 = "153i3kh44ri046va3qdrbvvsv7gy25fsd9pc2yhrg23lvj169zfp";
+    };
+    meta.homepage = "https://github.com/tpope/vim-sensible/";
+  };
+
+  vim-sexp = buildVimPluginFrom2Nix {
+    pname = "vim-sexp";
+    version = "2021-03-08";
+    src = fetchFromGitHub {
+      owner = "guns";
+      repo = "vim-sexp";
+      rev = "14464d4580af43424ed8f2614d94e62bfa40bb4d";
+      sha256 = "139krxpjhbyypbl6v2jik1rms2fxl3dkqrl4rb7sms6c3p5764qx";
+    };
+    meta.homepage = "https://github.com/guns/vim-sexp/";
+  };
+
+  vim-sexp-mappings-for-regular-people = buildVimPluginFrom2Nix {
+    pname = "vim-sexp-mappings-for-regular-people";
+    version = "2020-01-16";
+    src = fetchFromGitHub {
+      owner = "tpope";
+      repo = "vim-sexp-mappings-for-regular-people";
+      rev = "7c3de2f13422fb4b62b4c34a660532c7b3d240c7";
+      sha256 = "0malswal9hnbq2wf1rx2lp1r69wpwsvyhgi46xbg079x2n857bmj";
+    };
+    meta.homepage = "https://github.com/tpope/vim-sexp-mappings-for-regular-people/";
+  };
+
+  vim-shellcheck = buildVimPluginFrom2Nix {
+    pname = "vim-shellcheck";
+    version = "2019-07-25";
+    src = fetchFromGitHub {
+      owner = "itspriddle";
+      repo = "vim-shellcheck";
+      rev = "4346419ac57ef341a15aa39c827c0848f17c6faf";
+      sha256 = "0j28nqmfjxzhwylp2r1mp5v39fws5jvn7k9maam97mi3j66a9jz5";
+    };
+    meta.homepage = "https://github.com/itspriddle/vim-shellcheck/";
+  };
+
+  vim-signature = buildVimPluginFrom2Nix {
+    pname = "vim-signature";
+    version = "2018-07-06";
+    src = fetchFromGitHub {
+      owner = "kshenoy";
+      repo = "vim-signature";
+      rev = "6bc3dd1294a22e897f0dcf8dd72b85f350e306bc";
+      sha256 = "08m5dg77yavria7n7iajkj4kqaw848763680003j2gbrjlhpprpm";
+    };
+    meta.homepage = "https://github.com/kshenoy/vim-signature/";
+  };
+
+  vim-signify = buildVimPluginFrom2Nix {
+    pname = "vim-signify";
+    version = "2021-03-07";
+    src = fetchFromGitHub {
+      owner = "mhinz";
+      repo = "vim-signify";
+      rev = "2542b6459085f3d1e361e8b5bf406dec6448487e";
+      sha256 = "1m7m1fwn4bpbqfji7fvvgx00fxz1hy5nvfajbpj4vpgaxzqwsf8k";
+    };
+    meta.homepage = "https://github.com/mhinz/vim-signify/";
+  };
+
+  vim-slash = buildVimPluginFrom2Nix {
+    pname = "vim-slash";
+    version = "2019-08-28";
+    src = fetchFromGitHub {
+      owner = "junegunn";
+      repo = "vim-slash";
+      rev = "31aee09b7ea8893a18fa34f65e63e364fc998444";
+      sha256 = "0ifdd3yqbk8hdvdmr4k44967lyvjnv9ig3r2145wn1lab797sbl4";
+    };
+    meta.homepage = "https://github.com/junegunn/vim-slash/";
+  };
+
+  vim-sleuth = buildVimPluginFrom2Nix {
+    pname = "vim-sleuth";
+    version = "2021-04-01";
+    src = fetchFromGitHub {
+      owner = "tpope";
+      repo = "vim-sleuth";
+      rev = "38bd4010110614822cde523ebc5724963312ab63";
+      sha256 = "1qng5ndxsmkjgrdhlbdysr97b6pyz6faiqaayjkwpc69hnv2y79v";
+    };
+    meta.homepage = "https://github.com/tpope/vim-sleuth/";
+  };
+
+  vim-slime = buildVimPluginFrom2Nix {
+    pname = "vim-slime";
+    version = "2021-03-04";
+    src = fetchFromGitHub {
+      owner = "jpalardy";
+      repo = "vim-slime";
+      rev = "a522fed677e50175f52efc5848cc35209af33216";
+      sha256 = "0k4b629jn6xlxyjxdl3cgm06v9dmx967rqnslv5m82c9kscwpyh4";
+    };
+    meta.homepage = "https://github.com/jpalardy/vim-slime/";
+  };
+
+  vim-smalls = buildVimPluginFrom2Nix {
+    pname = "vim-smalls";
+    version = "2015-05-02";
+    src = fetchFromGitHub {
+      owner = "t9md";
+      repo = "vim-smalls";
+      rev = "9619eae81626bd63f88165e0520c467698264e34";
+      sha256 = "0s5z3zv220cg95yky2av6w0jmpc56ysyhsx0596ksvgz5jwhpbad";
+    };
+    meta.homepage = "https://github.com/t9md/vim-smalls/";
+  };
+
+  vim-smoothie = buildVimPluginFrom2Nix {
+    pname = "vim-smoothie";
+    version = "2021-02-07";
+    src = fetchFromGitHub {
+      owner = "psliwka";
+      repo = "vim-smoothie";
+      rev = "10fd0aa57d176718bc2c570f121ab523c4429a25";
+      sha256 = "18zn29mkgdiddn3il393xzg7hpa0x25yvais1l29jq2711sg4rdc";
+    };
+    meta.homepage = "https://github.com/psliwka/vim-smoothie/";
+  };
+
+  vim-smt2 = buildVimPluginFrom2Nix {
+    pname = "vim-smt2";
+    version = "2021-02-16";
+    src = fetchFromGitHub {
+      owner = "bohlender";
+      repo = "vim-smt2";
+      rev = "196d05f7152fb95c4613476368ebae9dd842d470";
+      sha256 = "0lk9clnvrkjbxgszg52zdl28d313vk2fiyh86aa6xx5pr0nr9iw3";
+    };
+    meta.homepage = "https://github.com/bohlender/vim-smt2/";
+  };
+
+  vim-sneak = buildVimPluginFrom2Nix {
+    pname = "vim-sneak";
+    version = "2020-09-01";
+    src = fetchFromGitHub {
+      owner = "justinmk";
+      repo = "vim-sneak";
+      rev = "65e5e4668371152c6ef7a6269c6a6b960cef21b4";
+      sha256 = "0bfibshqqa17n9vbdd2g8kalnc78v1ag3hzws9pdacrcsxhsh0ry";
+    };
+    meta.homepage = "https://github.com/justinmk/vim-sneak/";
+  };
+
+  vim-snipmate = buildVimPluginFrom2Nix {
+    pname = "vim-snipmate";
+    version = "2021-01-22";
+    src = fetchFromGitHub {
+      owner = "garbas";
+      repo = "vim-snipmate";
+      rev = "cbec960ab558b20281c0634b9b1a45fb16aaf638";
+      sha256 = "1k35rh5gq8lv67qx3l31xvl4iz7rlpybls7pwhsbmz4m598w03bm";
+    };
+    meta.homepage = "https://github.com/garbas/vim-snipmate/";
+  };
+
+  vim-snippets = buildVimPluginFrom2Nix {
+    pname = "vim-snippets";
+    version = "2021-04-06";
+    src = fetchFromGitHub {
+      owner = "honza";
+      repo = "vim-snippets";
+      rev = "4600da87a064bf63b37c7135be154b34c40dec20";
+      sha256 = "0vm59wkzxwmpksccv8j9ry6mm0byl75hzb73yn57zdm7s7kv2398";
+    };
+    meta.homepage = "https://github.com/honza/vim-snippets/";
+  };
+
+  vim-solidity = buildVimPluginFrom2Nix {
+    pname = "vim-solidity";
+    version = "2018-04-17";
+    src = fetchFromGitHub {
+      owner = "tomlion";
+      repo = "vim-solidity";
+      rev = "569bbbedc3898236d5912fed0caf114936112ae4";
+      sha256 = "1qpfbbrm4gjgvbkimhpxyl4fsdqkyw4raf17nw0ibqillz2d3pxx";
+    };
+    meta.homepage = "https://github.com/tomlion/vim-solidity/";
+  };
+
+  vim-sort-motion = buildVimPluginFrom2Nix {
+    pname = "vim-sort-motion";
+    version = "2021-03-07";
+    src = fetchFromGitHub {
+      owner = "christoomey";
+      repo = "vim-sort-motion";
+      rev = "c8782be8f7da414c6442b3ba4b6abb0345d392d9";
+      sha256 = "1vq2jrn75g3gd8vfgbnkn0w2qc4gbnrn2lg0wmzsvvxdvj8m9lii";
+    };
+    meta.homepage = "https://github.com/christoomey/vim-sort-motion/";
+  };
+
+  vim-sourcetrail = buildVimPluginFrom2Nix {
+    pname = "vim-sourcetrail";
+    version = "2021-02-16";
+    src = fetchFromGitHub {
+      owner = "CoatiSoftware";
+      repo = "vim-sourcetrail";
+      rev = "c9c621a7ab81c52a661457ccf33a64fd7c56fd9d";
+      sha256 = "192f69yz1hh2k0b2kcvfvv1jirjcvnbxvjkagmlkkqcg8w32nmlg";
+    };
+    meta.homepage = "https://github.com/CoatiSoftware/vim-sourcetrail/";
+  };
+
+  vim-speeddating = buildVimPluginFrom2Nix {
+    pname = "vim-speeddating";
+    version = "2019-11-12";
+    src = fetchFromGitHub {
+      owner = "tpope";
+      repo = "vim-speeddating";
+      rev = "fe98cfaa7ea9c4b838d42a6830437c919eb55b4e";
+      sha256 = "02875qswrmanr7b798ymlc7w60055q0av0qj3fh7fvpqhsqpg52k";
+    };
+    meta.homepage = "https://github.com/tpope/vim-speeddating/";
+  };
+
+  vim-spirv = buildVimPluginFrom2Nix {
+    pname = "vim-spirv";
+    version = "2020-11-24";
+    src = fetchFromGitHub {
+      owner = "kbenzie";
+      repo = "vim-spirv";
+      rev = "50669efc68a0a8b455f12727753b2413dab96f07";
+      sha256 = "19h3pavy65irchpy9xn3kkf3lb531479v6apfa5lg02c18gmxq1f";
+    };
+    meta.homepage = "https://github.com/kbenzie/vim-spirv/";
+  };
+
+  vim-startify = buildVimPluginFrom2Nix {
+    pname = "vim-startify";
+    version = "2021-04-02";
+    src = fetchFromGitHub {
+      owner = "mhinz";
+      repo = "vim-startify";
+      rev = "5ee8914b26e9f0b2d8ec01b3cef8c46e7a3954b5";
+      sha256 = "0zg100sjbn7952ayqligpkfqvrh1qwr2q6pjqs5cnsyl5xs411v2";
+    };
+    meta.homepage = "https://github.com/mhinz/vim-startify/";
+  };
+
+  vim-startuptime = buildVimPluginFrom2Nix {
+    pname = "vim-startuptime";
+    version = "2021-03-22";
+    src = fetchFromGitHub {
+      owner = "dstein64";
+      repo = "vim-startuptime";
+      rev = "cee157ee4f73ddacfe1a70bb833b96f7a47a10c2";
+      sha256 = "1y049vbjhsg80am0hxyrcq0d0p7qfyvb1z38nc7yd7bcgwsqc5ac";
+    };
+    meta.homepage = "https://github.com/dstein64/vim-startuptime/";
+  };
+
+  vim-stylish-haskell = buildVimPluginFrom2Nix {
+    pname = "vim-stylish-haskell";
+    version = "2019-11-28";
+    src = fetchFromGitHub {
+      owner = "nbouscal";
+      repo = "vim-stylish-haskell";
+      rev = "ef12ab024cb3928ae57ce7c4fa519c4751afef99";
+      sha256 = "0ysz68v4c2i4kxchsvxgkpj5kb0jbm5x06ri1ns9cmk5gj01pmd6";
+    };
+    meta.homepage = "https://github.com/nbouscal/vim-stylish-haskell/";
+  };
+
+  vim-stylishask = buildVimPluginFrom2Nix {
+    pname = "vim-stylishask";
+    version = "2020-04-05";
+    src = fetchFromGitHub {
+      owner = "alx741";
+      repo = "vim-stylishask";
+      rev = "dcc12c724cec7f8aee7ad197752710eaa3bfd12c";
+      sha256 = "09k1n6r9gy3jikss84y141dqqsgc1a1ia89jj0367an53pfl6dn2";
+    };
+    meta.homepage = "https://github.com/alx741/vim-stylishask/";
+  };
+
+  vim-subversive = buildVimPluginFrom2Nix {
+    pname = "vim-subversive";
+    version = "2020-05-23";
+    src = fetchFromGitHub {
+      owner = "svermeulen";
+      repo = "vim-subversive";
+      rev = "5695f97fc803767bf657a5e512daec19dd1fd786";
+      sha256 = "0lksvgk3g2yqbm8pw8ba5f8594djh5cj795hwjhnxc8rrhl29qpq";
+    };
+    meta.homepage = "https://github.com/svermeulen/vim-subversive/";
+  };
+
+  vim-surround = buildVimPluginFrom2Nix {
+    pname = "vim-surround";
+    version = "2019-11-28";
+    src = fetchFromGitHub {
+      owner = "tpope";
+      repo = "vim-surround";
+      rev = "f51a26d3710629d031806305b6c8727189cd1935";
+      sha256 = "0aqrqn35xdiy80y7skxfsh3m33n6cdxw6lzz6aspfgzwllx2f0kr";
+    };
+    meta.homepage = "https://github.com/tpope/vim-surround/";
+  };
+
+  vim-swap = buildVimPluginFrom2Nix {
+    pname = "vim-swap";
+    version = "2021-03-18";
+    src = fetchFromGitHub {
+      owner = "machakann";
+      repo = "vim-swap";
+      rev = "f363ea636f4e18b4a3382ff352d3cf2e2ac5840e";
+      sha256 = "1pa5crmamama4v3yzcjfbizvpx03wb67zbjx1mn5rz6dcar903f6";
+    };
+    meta.homepage = "https://github.com/machakann/vim-swap/";
+  };
+
+  vim-SyntaxRange = buildVimPluginFrom2Nix {
+    pname = "vim-SyntaxRange";
+    version = "2021-01-16";
+    src = fetchFromGitHub {
+      owner = "inkarkat";
+      repo = "vim-SyntaxRange";
+      rev = "3a7fd9ff50fabafe61df12522ed2f275c8e2f45e";
+      sha256 = "1b5xyacbn87z8wkacjpnjk82xmxzivlb111427kwb5kxxdh4w7gq";
+    };
+    meta.homepage = "https://github.com/inkarkat/vim-SyntaxRange/";
+  };
+
+  vim-table-mode = buildVimPluginFrom2Nix {
+    pname = "vim-table-mode";
+    version = "2020-10-13";
+    src = fetchFromGitHub {
+      owner = "dhruvasagar";
+      repo = "vim-table-mode";
+      rev = "659ba4f39caa38e6913f88c9f4369c00e852160f";
+      sha256 = "0fqj9l7i052mvw0wlyg30bmihzi937svk3ggsp0rc9wlr30frg2p";
+    };
+    meta.homepage = "https://github.com/dhruvasagar/vim-table-mode/";
+  };
+
+  vim-tabpagecd = buildVimPluginFrom2Nix {
+    pname = "vim-tabpagecd";
+    version = "2013-11-29";
+    src = fetchFromGitHub {
+      owner = "kana";
+      repo = "vim-tabpagecd";
+      rev = "8b71a03a037608fa5918f5096812577cec6355e4";
+      sha256 = "1mr6s2hvsf2a2nkjjvq78c9isfxk2k1ih890w740srbq6ssj0npm";
+    };
+    meta.homepage = "https://github.com/kana/vim-tabpagecd/";
+  };
+
+  vim-tbone = buildVimPluginFrom2Nix {
+    pname = "vim-tbone";
+    version = "2019-11-13";
+    src = fetchFromGitHub {
+      owner = "tpope";
+      repo = "vim-tbone";
+      rev = "82b0118772a87b659a6af49b26b0c4817ec7eccf";
+      sha256 = "0pbj4v6zhlpcxm10jcq50jf2rpqiyp2x0zpxa50s6y6gm834v9wc";
+    };
+    meta.homepage = "https://github.com/tpope/vim-tbone/";
+  };
+
+  vim-terraform = buildVimPluginFrom2Nix {
+    pname = "vim-terraform";
+    version = "2021-03-07";
+    src = fetchFromGitHub {
+      owner = "hashivim";
+      repo = "vim-terraform";
+      rev = "e62cac4d3186209a510f51becd768ee414b2be76";
+      sha256 = "1c93kvlrgzp5fw5rgv053sin0f2f2chydxbvrkprpz71qmxqmq05";
+    };
+    meta.homepage = "https://github.com/hashivim/vim-terraform/";
+  };
+
+  vim-terraform-completion = buildVimPluginFrom2Nix {
+    pname = "vim-terraform-completion";
+    version = "2019-07-28";
+    src = fetchFromGitHub {
+      owner = "juliosueiras";
+      repo = "vim-terraform-completion";
+      rev = "1c8792d1e85154aa6fc05eb746711bf2df2274d9";
+      sha256 = "0j87vhxkrv8sdrlv9w5p2zkiv9ssb3rckbffjcfhn9365d41bhgr";
+      fetchSubmodules = true;
+    };
+    meta.homepage = "https://github.com/juliosueiras/vim-terraform-completion/";
+  };
+
+  vim-test = buildVimPluginFrom2Nix {
+    pname = "vim-test";
+    version = "2021-04-06";
+    src = fetchFromGitHub {
+      owner = "vim-test";
+      repo = "vim-test";
+      rev = "206eb5492b4afa03c31cea529aa917b4a7085d10";
+      sha256 = "084yaqw0zw1bc4y4pk1vdb58vza7dn31phjr53dvwdj0kyl7j088";
+    };
+    meta.homepage = "https://github.com/vim-test/vim-test/";
+  };
+
+  vim-textobj-comment = buildVimPluginFrom2Nix {
+    pname = "vim-textobj-comment";
+    version = "2014-04-11";
+    src = fetchFromGitHub {
+      owner = "glts";
+      repo = "vim-textobj-comment";
+      rev = "58ae4571b76a5bf74850698f23d235eef991dd4b";
+      sha256 = "00wc14chwjfx95gl3yzbxm1ajx88zpzqz0ckl7xvd7gvkrf0mx04";
+    };
+    meta.homepage = "https://github.com/glts/vim-textobj-comment/";
+  };
+
+  vim-textobj-function = buildVimPluginFrom2Nix {
+    pname = "vim-textobj-function";
+    version = "2014-05-03";
+    src = fetchFromGitHub {
+      owner = "kana";
+      repo = "vim-textobj-function";
+      rev = "adb50f38499b1f558cbd58845e3e91117e4538cf";
+      sha256 = "0cwl102si9zhhhpg6c0fjnyq35v6bl5f34p2s7b47isxdn0qvris";
+    };
+    meta.homepage = "https://github.com/kana/vim-textobj-function/";
+  };
+
+  vim-textobj-haskell = buildVimPluginFrom2Nix {
+    pname = "vim-textobj-haskell";
+    version = "2014-10-27";
+    src = fetchFromGitHub {
+      owner = "gibiansky";
+      repo = "vim-textobj-haskell";
+      rev = "ca656e98ea31e201f5bc543909398a6c8bb5d537";
+      sha256 = "096pjjl3ngw0hsh59j2x6pdrpqvp657rcxfyl9kw13ndqyd867xs";
+    };
+    meta.homepage = "https://github.com/gibiansky/vim-textobj-haskell/";
+  };
+
+  vim-textobj-multiblock = buildVimPluginFrom2Nix {
+    pname = "vim-textobj-multiblock";
+    version = "2014-06-02";
+    src = fetchFromGitHub {
+      owner = "osyo-manga";
+      repo = "vim-textobj-multiblock";
+      rev = "670a5ba57d73fcd793f480e262617c6eb0103355";
+      sha256 = "1s71hdr73cl8yg9mrdflvzrdccpiv7qrlainai7gqw30r1hfhfzf";
+    };
+    meta.homepage = "https://github.com/osyo-manga/vim-textobj-multiblock/";
+  };
+
+  vim-textobj-user = buildVimPluginFrom2Nix {
+    pname = "vim-textobj-user";
+    version = "2020-02-21";
+    src = fetchFromGitHub {
+      owner = "kana";
+      repo = "vim-textobj-user";
+      rev = "41a675ddbeefd6a93664a4dc52f302fe3086a933";
+      sha256 = "1y1g3vcm97fqjyigiajbvbck4nlc04vxl3535x4sl40s5jbm5vz3";
+    };
+    meta.homepage = "https://github.com/kana/vim-textobj-user/";
+  };
+
+  vim-textobj-variable-segment = buildVimPluginFrom2Nix {
+    pname = "vim-textobj-variable-segment";
+    version = "2019-12-30";
+    src = fetchFromGitHub {
+      owner = "Julian";
+      repo = "vim-textobj-variable-segment";
+      rev = "78457d4322b44bf89730e708b62b69df48c39aa3";
+      sha256 = "14dcrnk83hj4ixrkdgjrk9cf0193f82wqckdzd4w0b76adf3habj";
+    };
+    meta.homepage = "https://github.com/Julian/vim-textobj-variable-segment/";
+  };
+
+  vim-themis = buildVimPluginFrom2Nix {
+    pname = "vim-themis";
+    version = "2020-11-19";
+    src = fetchFromGitHub {
+      owner = "thinca";
+      repo = "vim-themis";
+      rev = "01960ebe01e3999d2c5fc614cf85c1ec99d1cab1";
+      sha256 = "0z1ypl4ks2wg3mh4fjvhz8984z7js2k9k2bgszd2n6jdma8xp4cw";
+    };
+    meta.homepage = "https://github.com/thinca/vim-themis/";
+  };
+
+  vim-tmux = buildVimPluginFrom2Nix {
+    pname = "vim-tmux";
+    version = "2020-07-25";
+    src = fetchFromGitHub {
+      owner = "tmux-plugins";
+      repo = "vim-tmux";
+      rev = "7e7680fb1bb05bca1c800213b265f45433ed1e33";
+      sha256 = "19al4a4g8wfz43am32ncz8dg58wxhzn30p7r4n1780pv8hzkdrsb";
+    };
+    meta.homepage = "https://github.com/tmux-plugins/vim-tmux/";
+  };
+
+  vim-tmux-clipboard = buildVimPluginFrom2Nix {
+    pname = "vim-tmux-clipboard";
+    version = "2019-04-07";
+    src = fetchFromGitHub {
+      owner = "roxma";
+      repo = "vim-tmux-clipboard";
+      rev = "47187740b88f9dab213f44678800cc797223808e";
+      sha256 = "1a7rpbvb7dgjfnrh95zg2ia6iiz2mz2xps31msb8h14hcj6dsv6y";
+    };
+    meta.homepage = "https://github.com/roxma/vim-tmux-clipboard/";
+  };
+
+  vim-tmux-focus-events = buildVimPluginFrom2Nix {
+    pname = "vim-tmux-focus-events";
+    version = "2021-04-04";
+    src = fetchFromGitHub {
+      owner = "tmux-plugins";
+      repo = "vim-tmux-focus-events";
+      rev = "26237f9284c3853084fbf9e8303efb8fb62e0aa9";
+      sha256 = "0pmkjwpad63gdrp0qykkcsjdavb5kxwqvlcip0ykdm6ivvzi9fy5";
+    };
+    meta.homepage = "https://github.com/tmux-plugins/vim-tmux-focus-events/";
+  };
+
+  vim-tmux-navigator = buildVimPluginFrom2Nix {
+    pname = "vim-tmux-navigator";
+    version = "2020-11-12";
+    src = fetchFromGitHub {
+      owner = "christoomey";
+      repo = "vim-tmux-navigator";
+      rev = "6a1e58c3ca3bc7acca36c90521b3dfae83b2a602";
+      sha256 = "17219h69vd6b994qrywg1rpx80y1rmycbfsmf9wb6c693sx721sn";
+    };
+    meta.homepage = "https://github.com/christoomey/vim-tmux-navigator/";
+  };
+
+  vim-togglelist = buildVimPluginFrom2Nix {
+    pname = "vim-togglelist";
+    version = "2013-04-07";
+    src = fetchFromGitHub {
+      owner = "milkypostman";
+      repo = "vim-togglelist";
+      rev = "cafedc49860950200f28f2e1d95ab6a87b79d113";
+      sha256 = "17y4ply2irz81gjv5hb51dy7wzv3l3sq6qaska31lswd5dgh1ifg";
+    };
+    meta.homepage = "https://github.com/milkypostman/vim-togglelist/";
+  };
+
+  vim-toml = buildVimPluginFrom2Nix {
+    pname = "vim-toml";
+    version = "2020-12-08";
+    src = fetchFromGitHub {
+      owner = "cespare";
+      repo = "vim-toml";
+      rev = "3c5face8e8944a217af45bc5bb708ff7dfcf1a54";
+      sha256 = "0g3hj9lcwd2vzcfkdrydhga2n82144llkvrxcjdn6zl84pjcvgd2";
+    };
+    meta.homepage = "https://github.com/cespare/vim-toml/";
+  };
+
+  vim-tpipeline = buildVimPluginFrom2Nix {
+    pname = "vim-tpipeline";
+    version = "2021-03-24";
+    src = fetchFromGitHub {
+      owner = "vimpostor";
+      repo = "vim-tpipeline";
+      rev = "b36abe2613191912e12b9562b209f157a8b927de";
+      sha256 = "1ly3iy1c05ry7yfsph0rribiagcyw07daj2dbfj0la3pbfmvip24";
+    };
+    meta.homepage = "https://github.com/vimpostor/vim-tpipeline/";
+  };
+
+  vim-trailing-whitespace = buildVimPluginFrom2Nix {
+    pname = "vim-trailing-whitespace";
+    version = "2020-11-18";
+    src = fetchFromGitHub {
+      owner = "bronson";
+      repo = "vim-trailing-whitespace";
+      rev = "05f068ebd9dbdf71d2d334d02abd99deb0311c40";
+      sha256 = "1bh15yw2aysvpn2ndnc0s6jzc0y93x6q1blc5pph67rdix5bm7gy";
+    };
+    meta.homepage = "https://github.com/bronson/vim-trailing-whitespace/";
+  };
+
+  vim-tsx = buildVimPluginFrom2Nix {
+    pname = "vim-tsx";
+    version = "2017-03-16";
+    src = fetchFromGitHub {
+      owner = "ianks";
+      repo = "vim-tsx";
+      rev = "77c89c42e189fefd3c9a632b37b7e3b3b9edf918";
+      sha256 = "0wmd6gql57bxp868sq2dchp9sc3jbisr4vaz4y0lczhmk0prds6n";
+    };
+    meta.homepage = "https://github.com/ianks/vim-tsx/";
+  };
+
+  vim-twig = buildVimPluginFrom2Nix {
+    pname = "vim-twig";
+    version = "2018-05-23";
+    src = fetchFromGitHub {
+      owner = "lumiliet";
+      repo = "vim-twig";
+      rev = "ad115512725bcc156f7f89b72ff563b9fa44933b";
+      sha256 = "1p7sfhk0mwx4xk88b29ijb9nfbjwsf6hf3nab2ybcw291qaa75nj";
+    };
+    meta.homepage = "https://github.com/lumiliet/vim-twig/";
+  };
+
+  vim-twiggy = buildVimPluginFrom2Nix {
+    pname = "vim-twiggy";
+    version = "2021-03-19";
+    src = fetchFromGitHub {
+      owner = "sodapopcan";
+      repo = "vim-twiggy";
+      rev = "cf8aa913329991bfeaa1cabab4bbd8889b0f0790";
+      sha256 = "0j0h95xhb5c59qyx8gc1yrcnsjxffbnycya6wnl7axd71iawwgh8";
+    };
+    meta.homepage = "https://github.com/sodapopcan/vim-twiggy/";
+  };
+
+  vim-unimpaired = buildVimPluginFrom2Nix {
+    pname = "vim-unimpaired";
+    version = "2020-04-26";
+    src = fetchFromGitHub {
+      owner = "tpope";
+      repo = "vim-unimpaired";
+      rev = "4afbe5ebf32ad85341b4c02b0e1d8ca96a64c561";
+      sha256 = "052amdb4bd2qbip3z9xz7h1cv61k4p038j65yijm68vy0hf2724y";
+    };
+    meta.homepage = "https://github.com/tpope/vim-unimpaired/";
+  };
+
+  vim-vagrant = buildVimPluginFrom2Nix {
+    pname = "vim-vagrant";
+    version = "2018-11-11";
+    src = fetchFromGitHub {
+      owner = "hashivim";
+      repo = "vim-vagrant";
+      rev = "7741242ed9617ed53ba7e47e801634b819047ac0";
+      sha256 = "0inpgcrca955h0ic7pgl6bfzs7rssjgssvrvqq3y93j5addmh60m";
+    };
+    meta.homepage = "https://github.com/hashivim/vim-vagrant/";
+  };
+
+  vim-vinegar = buildVimPluginFrom2Nix {
+    pname = "vim-vinegar";
+    version = "2021-03-16";
+    src = fetchFromGitHub {
+      owner = "tpope";
+      repo = "vim-vinegar";
+      rev = "b245f3ab4580eba27616a5ce06a56d5f791e67bd";
+      sha256 = "0lvqfa5drjzk3b877aldnjc9m4jnwlpxlvfvy8s81az92r69f13m";
+    };
+    meta.homepage = "https://github.com/tpope/vim-vinegar/";
+  };
+
+  vim-visual-increment = buildVimPluginFrom2Nix {
+    pname = "vim-visual-increment";
+    version = "2020-05-03";
+    src = fetchFromGitHub {
+      owner = "triglav";
+      repo = "vim-visual-increment";
+      rev = "0e55bb4054cdd5eefc0bb870f3e3c249673817cb";
+      sha256 = "0if3r3ih8f4yxy5s4xsl7384xzf14rmalvg60n9mbhshyljggvc4";
+    };
+    meta.homepage = "https://github.com/triglav/vim-visual-increment/";
+  };
+
+  vim-visual-multi = buildVimPluginFrom2Nix {
+    pname = "vim-visual-multi";
+    version = "2021-03-21";
+    src = fetchFromGitHub {
+      owner = "mg979";
+      repo = "vim-visual-multi";
+      rev = "08e37d47406d7f57e5907af4dc6bd35cff2b04b3";
+      sha256 = "157gvlpb0i3jn9gjcjgz02y843jh03pqnwfkv2bf9qh7bknrnxr5";
+    };
+    meta.homepage = "https://github.com/mg979/vim-visual-multi/";
+  };
+
+  vim-visualstar = buildVimPluginFrom2Nix {
+    pname = "vim-visualstar";
+    version = "2015-08-27";
+    src = fetchFromGitHub {
+      owner = "thinca";
+      repo = "vim-visualstar";
+      rev = "a18cd0e7a03311ac709595c1d261ed44b45c9098";
+      sha256 = "0yz6ci4i84xxrgazjfa5nsj3q8733p0b6vwcljk1l7ghdfiflvy4";
+    };
+    meta.homepage = "https://github.com/thinca/vim-visualstar/";
+  };
+
+  vim-vsnip = buildVimPluginFrom2Nix {
+    pname = "vim-vsnip";
+    version = "2021-04-05";
+    src = fetchFromGitHub {
+      owner = "hrsh7th";
+      repo = "vim-vsnip";
+      rev = "b05641ca8c7ebd396017121219047c480182a743";
+      sha256 = "0184d5498iwi0kqf0gbd5zdqckvmqwaf7bs1dvj8rphp9xzsl72x";
+    };
+    meta.homepage = "https://github.com/hrsh7th/vim-vsnip/";
+  };
+
+  vim-vsnip-integ = buildVimPluginFrom2Nix {
+    pname = "vim-vsnip-integ";
+    version = "2020-12-31";
+    src = fetchFromGitHub {
+      owner = "hrsh7th";
+      repo = "vim-vsnip-integ";
+      rev = "60dfbb0dc73cfc4828e9328251a46ccbd7e9b5fe";
+      sha256 = "0nv8imllzpm5zvg2n3c5mb7lc1v1fn6jmqy8vgmv2fp1050p3dy3";
+    };
+    meta.homepage = "https://github.com/hrsh7th/vim-vsnip-integ/";
+  };
+
+  vim-vue = buildVimPluginFrom2Nix {
+    pname = "vim-vue";
+    version = "2019-08-03";
+    src = fetchFromGitHub {
+      owner = "posva";
+      repo = "vim-vue";
+      rev = "c424294e769b26659176065f9713c395731f7b3a";
+      sha256 = "1ig8qacavr15i6z7whlkf2ivw5smnqsw3jwhh4dg5q6037k1hjh1";
+    };
+    meta.homepage = "https://github.com/posva/vim-vue/";
+  };
+
+  vim-wakatime = buildVimPluginFrom2Nix {
+    pname = "vim-wakatime";
+    version = "2020-12-29";
+    src = fetchFromGitHub {
+      owner = "wakatime";
+      repo = "vim-wakatime";
+      rev = "45dfc28c30b44041183d749cf724e3dba9ac65ef";
+      sha256 = "1ipdynpg9v5mll1zimyiaxw4zzj004myh5xjky32z783lgi0qlxl";
+    };
+    meta.homepage = "https://github.com/wakatime/vim-wakatime/";
+  };
+
+  vim-watchdogs = buildVimPluginFrom2Nix {
+    pname = "vim-watchdogs";
+    version = "2019-09-09";
+    src = fetchFromGitHub {
+      owner = "osyo-manga";
+      repo = "vim-watchdogs";
+      rev = "8ee2af37095af08376ba2409da152c2a36a4ee90";
+      sha256 = "1hvgqdcnnz09afbas5brwls2sifs8y78jmq44ldgsjny9l445df4";
+    };
+    meta.homepage = "https://github.com/osyo-manga/vim-watchdogs/";
+  };
+
+  vim-wayland-clipboard = buildVimPluginFrom2Nix {
+    pname = "vim-wayland-clipboard";
+    version = "2021-03-15";
+    src = fetchFromGitHub {
+      owner = "jasonccox";
+      repo = "vim-wayland-clipboard";
+      rev = "1f7f05039c572fde082043915953a88b77c0ddb0";
+      sha256 = "0ihyfdvgiclmcric66nd54ha7ikf2c1pl1slbn4y6mkbxla02yv9";
+    };
+    meta.homepage = "https://github.com/jasonccox/vim-wayland-clipboard/";
+  };
+
+  vim-which-key = buildVimPluginFrom2Nix {
+    pname = "vim-which-key";
+    version = "2021-04-05";
+    src = fetchFromGitHub {
+      owner = "liuchengxu";
+      repo = "vim-which-key";
+      rev = "fdadbdcf5eda4b1ab381f3a36562005d161a6c4a";
+      sha256 = "1lqqadf6qr4i7sfkjmra9b4rb6wa3sh93dp7lr5jdf365i4b0jfb";
+    };
+    meta.homepage = "https://github.com/liuchengxu/vim-which-key/";
+  };
+
+  vim-wordy = buildVimPluginFrom2Nix {
+    pname = "vim-wordy";
+    version = "2020-10-24";
+    src = fetchFromGitHub {
+      owner = "reedes";
+      repo = "vim-wordy";
+      rev = "667426a0171787b2620dffa5b2d7c01c9040237f";
+      sha256 = "1lcrisv2wcd8iw76prql03wd11jgmknm3rvbcw7vv4v5r2s9rv5z";
+    };
+    meta.homepage = "https://github.com/reedes/vim-wordy/";
+  };
+
+  vim-xdebug = buildVimPluginFrom2Nix {
+    pname = "vim-xdebug";
+    version = "2012-08-15";
+    src = fetchFromGitHub {
+      owner = "joonty";
+      repo = "vim-xdebug";
+      rev = "a4980fa65f7f159780593ee37c178281691ba2c4";
+      sha256 = "1qh18r0sm4gh95sjbi2hnflvxdl4gk00jyy3n7z4i1gnx9ihxjqw";
+    };
+    meta.homepage = "https://github.com/joonty/vim-xdebug/";
+  };
+
+  vim-xkbswitch = buildVimPluginFrom2Nix {
+    pname = "vim-xkbswitch";
+    version = "2020-12-02";
+    src = fetchFromGitHub {
+      owner = "lyokha";
+      repo = "vim-xkbswitch";
+      rev = "f851600045c543f3646c709d7e03e231408eab81";
+      sha256 = "0pi85rzls3g7ilb18idk8xbqya8ygjab5ndk09p4xmmww9z4v711";
+    };
+    meta.homepage = "https://github.com/lyokha/vim-xkbswitch/";
+  };
+
+  vim-yaml = buildVimPluginFrom2Nix {
+    pname = "vim-yaml";
+    version = "2021-01-14";
+    src = fetchFromGitHub {
+      owner = "stephpy";
+      repo = "vim-yaml";
+      rev = "dce19542d5ec1663183b0f6844ec663b5d1f3d24";
+      sha256 = "18xpdl86zsnmrc1w8wccx9acwjvgij2wpsg7f6dpnxx70c07g3ig";
+    };
+    meta.homepage = "https://github.com/stephpy/vim-yaml/";
+  };
+
+  vim-yapf = buildVimPluginFrom2Nix {
+    pname = "vim-yapf";
+    version = "2018-10-04";
+    src = fetchFromGitHub {
+      owner = "mindriot101";
+      repo = "vim-yapf";
+      rev = "b0c31bd73a6d1026765e659bd0a62c625ec057ad";
+      sha256 = "0ncv6kjyywljsq5fz71rkmgmqxm7msyscgndnj055bnx5sh9wk80";
+    };
+    meta.homepage = "https://github.com/mindriot101/vim-yapf/";
+  };
+
+  vim2hs = buildVimPluginFrom2Nix {
+    pname = "vim2hs";
+    version = "2014-04-16";
+    src = fetchFromGitHub {
+      owner = "dag";
+      repo = "vim2hs";
+      rev = "f2afd55704bfe0a2d66e6b270d247e9b8a7b1664";
+      sha256 = "18lqrl3hqb6cmizc04bbnsh8j0g761w2q8wascbzzfw80dmxy36b";
+    };
+    meta.homepage = "https://github.com/dag/vim2hs/";
+  };
+
+  vimacs = buildVimPluginFrom2Nix {
+    pname = "vimacs";
+    version = "2016-03-24";
+    src = fetchFromGitHub {
+      owner = "andrep";
+      repo = "vimacs";
+      rev = "7b8e297722d55089f0f0535fe6422533c98112fb";
+      sha256 = "0x92jcpdlvxhhdpwkv7ig9ya7s96yqjy6ms9xnx8djkf12xql16f";
+    };
+    meta.homepage = "https://github.com/andrep/vimacs/";
+  };
+
+  vimagit = buildVimPluginFrom2Nix {
+    pname = "vimagit";
+    version = "2020-11-18";
+    src = fetchFromGitHub {
+      owner = "jreybert";
+      repo = "vimagit";
+      rev = "aaf1278f03e866f0b978d4b0f0cc7084db251129";
+      sha256 = "1k23q1p6wgjlk1cpmv1ijjggjklz8hgg6s7bx6mrk0aw5j2s1pdh";
+    };
+    meta.homepage = "https://github.com/jreybert/vimagit/";
+  };
+
+  vimelette = buildVimPluginFrom2Nix {
+    pname = "vimelette";
+    version = "2019-05-02";
+    src = fetchFromGitHub {
+      owner = "gotcha";
+      repo = "vimelette";
+      rev = "662f47fe0da2625dc743532832fa39f490388fa7";
+      sha256 = "094xyqba64dndgr5gfcqp6hy3siw90niyrrwz0avs924abss6adg";
+    };
+    meta.homepage = "https://github.com/gotcha/vimelette/";
+  };
+
+  vimfiler-vim = buildVimPluginFrom2Nix {
+    pname = "vimfiler-vim";
+    version = "2020-07-13";
+    src = fetchFromGitHub {
+      owner = "Shougo";
+      repo = "vimfiler.vim";
+      rev = "0fdf9f2f7e6014a49625433058c1665f72a3b86f";
+      sha256 = "028hcmr7xxqmb55m9q2h2x9kr5xq5866ivr0in23jm44s897yr25";
+    };
+    meta.homepage = "https://github.com/Shougo/vimfiler.vim/";
+  };
+
+  VimOrganizer = buildVimPluginFrom2Nix {
+    pname = "VimOrganizer";
+    version = "2020-12-15";
+    src = fetchFromGitHub {
+      owner = "hsitz";
+      repo = "VimOrganizer";
+      rev = "09636aed78441a9de2767fcef6d7c567f322cc40";
+      sha256 = "0phpcxmyz562yyp88rbx9pqg46w8r1lyapb700nvxwvqkcd82pfw";
+    };
+    meta.homepage = "https://github.com/hsitz/VimOrganizer/";
+  };
+
+  vimoutliner = buildVimPluginFrom2Nix {
+    pname = "vimoutliner";
+    version = "2020-10-26";
+    src = fetchFromGitHub {
+      owner = "vimoutliner";
+      repo = "vimoutliner";
+      rev = "d198aa72c70270f1330f4237bbf853efaaa79723";
+      sha256 = "05wcqs36qn8f3vcy9xi2cf0yyp7yzawlxqvpjhbad6lm52vzsabs";
+    };
+    meta.homepage = "https://github.com/vimoutliner/vimoutliner/";
+  };
+
+  vimpreviewpandoc = buildVimPluginFrom2Nix {
+    pname = "vimpreviewpandoc";
+    version = "2019-02-10";
+    src = fetchFromGitHub {
+      owner = "tex";
+      repo = "vimpreviewpandoc";
+      rev = "3b0a589140abf6cc5d19ad678a7f01822bbee34e";
+      sha256 = "15yjr01wfnhaqw1k8bgxk04vvh76y13zfms66irpihw79f9yzxi9";
+    };
+    meta.homepage = "https://github.com/tex/vimpreviewpandoc/";
+  };
+
+  vimproc-vim = buildVimPluginFrom2Nix {
+    pname = "vimproc-vim";
+    version = "2020-06-23";
+    src = fetchFromGitHub {
+      owner = "Shougo";
+      repo = "vimproc.vim";
+      rev = "8f40d86ab938d5df8c1c9824320621ae9f0d5609";
+      sha256 = "11k59lc31056lk9ndkmi9a4459lnv6hdhvw3y4gpin40xchl6d61";
+    };
+    meta.homepage = "https://github.com/Shougo/vimproc.vim/";
+  };
+
+  vimsence = buildVimPluginFrom2Nix {
+    pname = "vimsence";
+    version = "2021-03-17";
+    src = fetchFromGitHub {
+      owner = "vimsence";
+      repo = "vimsence";
+      rev = "ad036250a116472218430aed1817e5b6c204d0b8";
+      sha256 = "0yn3w193h9h1fyaniwdj4y7b744kwj11prxcq8iyg897v8jj25bk";
+    };
+    meta.homepage = "https://github.com/vimsence/vimsence/";
+  };
+
+  vimshell-vim = buildVimPluginFrom2Nix {
+    pname = "vimshell-vim";
+    version = "2019-07-16";
+    src = fetchFromGitHub {
+      owner = "Shougo";
+      repo = "vimshell.vim";
+      rev = "ee683538f57aaf5094db9860f67f4957a763ffb4";
+      sha256 = "0inf9xx6ni1scxkn0b78qq0234r0ybrwpphyzcafw7i8kzisbn26";
+    };
+    meta.homepage = "https://github.com/Shougo/vimshell.vim/";
+  };
+
+  vimspector = buildVimPluginFrom2Nix {
+    pname = "vimspector";
+    version = "2021-03-30";
+    src = fetchFromGitHub {
+      owner = "puremourning";
+      repo = "vimspector";
+      rev = "caeb6610ed9f209490fbfacacc99e720847e6130";
+      sha256 = "014xvr14kxk0js4qwdzv0ljzrz6dji9qrkjyjpr1qfx6r8kz2j1z";
+      fetchSubmodules = true;
+    };
+    meta.homepage = "https://github.com/puremourning/vimspector/";
+  };
+
+  vimtex = buildVimPluginFrom2Nix {
+    pname = "vimtex";
+    version = "2021-04-06";
+    src = fetchFromGitHub {
+      owner = "lervag";
+      repo = "vimtex";
+      rev = "b31d4e3ed3942c98fcb928ca65bf9e9427608439";
+      sha256 = "0vl0a71in04pi3v9h61piny6qrd91z8anmzv724dznqkc4ydp9hx";
+    };
+    meta.homepage = "https://github.com/lervag/vimtex/";
+  };
+
+  vimux = buildVimPluginFrom2Nix {
+    pname = "vimux";
+    version = "2021-03-18";
+    src = fetchFromGitHub {
+      owner = "preservim";
+      repo = "vimux";
+      rev = "708ce200d56d6fc326a8c1acd7f0f4f7c6a9e552";
+      sha256 = "0wkxq1a3phmxskmqcn3067s56k6n9v8k9qqy0mwhxhp2d53asxpf";
+    };
+    meta.homepage = "https://github.com/preservim/vimux/";
+  };
+
+  vimwiki = buildVimPluginFrom2Nix {
+    pname = "vimwiki";
+    version = "2020-05-26";
+    src = fetchFromGitHub {
+      owner = "vimwiki";
+      repo = "vimwiki";
+      rev = "619f04f89861c58e5a6415a4f83847752928252d";
+      sha256 = "03dic4vjl3bwd7s6jj3vrz6xicf3a3bccaqgx635hn01ha6vw1jw";
+    };
+    meta.homepage = "https://github.com/vimwiki/vimwiki/";
+  };
+
+  vissort-vim = buildVimPluginFrom2Nix {
+    pname = "vissort-vim";
+    version = "2014-01-31";
+    src = fetchFromGitHub {
+      owner = "navicore";
+      repo = "vissort.vim";
+      rev = "75a5b08b64d2f762206bffd294066533891fa03c";
+      sha256 = "0a71b22apkhicca9nkd06jlcnqkf583mlpfh2mvl4d474viavqfn";
+    };
+    meta.homepage = "https://github.com/navicore/vissort.vim/";
+  };
+
+  vista-vim = buildVimPluginFrom2Nix {
+    pname = "vista-vim";
+    version = "2021-03-31";
+    src = fetchFromGitHub {
+      owner = "liuchengxu";
+      repo = "vista.vim";
+      rev = "a2236deb0a40d745f38fac4523ed6a0c86639863";
+      sha256 = "14gxwqykm4cql80la3x1x7sxcfmdvpm05r9brxw3xfn9bsqy3qsk";
+    };
+    meta.homepage = "https://github.com/liuchengxu/vista.vim/";
+  };
+
+  Vundle-vim = buildVimPluginFrom2Nix {
+    pname = "Vundle-vim";
+    version = "2019-08-17";
+    src = fetchFromGitHub {
+      owner = "VundleVim";
+      repo = "Vundle.vim";
+      rev = "b255382d6242d7ea3877bf059d2934125e0c4d95";
+      sha256 = "0fkmklcq3fgvd6x6irz9bgyvcdaxafykk3k89gsi9p6b0ikw3rw6";
+    };
+    meta.homepage = "https://github.com/VundleVim/Vundle.vim/";
+  };
+
+  wal-vim = buildVimPluginFrom2Nix {
+    pname = "wal-vim";
+    version = "2020-11-08";
+    src = fetchFromGitHub {
+      owner = "dylanaraps";
+      repo = "wal.vim";
+      rev = "c72ba0d18946f29aab9c95eb6975d321c68b3681";
+      sha256 = "03hrn0d6mqjlrixwx5l270jfgwgkzr6xg00h39i49j7k3f1ql078";
+    };
+    meta.homepage = "https://github.com/dylanaraps/wal.vim/";
+  };
+
+  webapi-vim = buildVimPluginFrom2Nix {
+    pname = "webapi-vim";
+    version = "2020-12-02";
+    src = fetchFromGitHub {
+      owner = "mattn";
+      repo = "webapi-vim";
+      rev = "6f5ffb6f547cda1b6cbc26a06f12d81e6283bd82";
+      sha256 = "1144jk4dfqb8pzblqksc1wjgbraxy6pdgr4q567wzcf93bviv81l";
+    };
+    meta.homepage = "https://github.com/mattn/webapi-vim/";
+  };
+
+  wmgraphviz-vim = buildVimPluginFrom2Nix {
+    pname = "wmgraphviz-vim";
+    version = "2018-04-26";
+    src = fetchFromGitHub {
+      owner = "wannesm";
+      repo = "wmgraphviz.vim";
+      rev = "f08ff5becd1e6e81d681ff2926f2cce29f63cb18";
+      sha256 = "12mb0lbkrzrxyawd9gg6igmsaylvsixcslim0lcgsrd551l9lq2l";
+    };
+    meta.homepage = "https://github.com/wannesm/wmgraphviz.vim/";
+  };
+
+  wombat256-vim = buildVimPluginFrom2Nix {
+    pname = "wombat256-vim";
+    version = "2010-10-18";
+    src = fetchFromGitHub {
+      owner = "vim-scripts";
+      repo = "wombat256.vim";
+      rev = "8734ba45dcf5e38c4d2686b35c94f9fcb30427e2";
+      sha256 = "01fdvfwdfqn5xi88lfanb4lb6jmn1ma6wq6d9jj2x7qamdbpvsrg";
+    };
+    meta.homepage = "https://github.com/vim-scripts/wombat256.vim/";
+  };
+
+  workflowish = buildVimPluginFrom2Nix {
+    pname = "workflowish";
+    version = "2015-12-03";
+    src = fetchFromGitHub {
+      owner = "lukaszkorecki";
+      repo = "workflowish";
+      rev = "65472189814dddd060aaa558103d837c2f9a5ec9";
+      sha256 = "044jxkcbycmmahi98qd0ynpc8baay72i45qymv4mxvl1d96fjbmd";
+    };
+    meta.homepage = "https://github.com/lukaszkorecki/workflowish/";
+  };
+
+  xptemplate = buildVimPluginFrom2Nix {
+    pname = "xptemplate";
+    version = "2020-06-29";
+    src = fetchFromGitHub {
+      owner = "drmingdrmer";
+      repo = "xptemplate";
+      rev = "359ffe4d426bce2e95f5866b682856b25555396f";
+      sha256 = "1rj5k58n1ybcc7qxsxlh09p2v4cps5xyzxmvjfrixy1qm2f85kd5";
+    };
+    meta.homepage = "https://github.com/drmingdrmer/xptemplate/";
+  };
+
+  xterm-color-table-vim = buildVimPluginFrom2Nix {
+    pname = "xterm-color-table-vim";
+    version = "2014-01-01";
+    src = fetchFromGitHub {
+      owner = "guns";
+      repo = "xterm-color-table.vim";
+      rev = "9754e857e5f4fe1f8727106dcc682d21c29a51e4";
+      sha256 = "08a1d9428xwrjp40qgi34cb5fwgc239qf3agxl32k7bqbn08pq19";
+    };
+    meta.homepage = "https://github.com/guns/xterm-color-table.vim/";
+  };
+
+  YankRing-vim = buildVimPluginFrom2Nix {
+    pname = "YankRing-vim";
+    version = "2015-07-29";
+    src = fetchFromGitHub {
+      owner = "vim-scripts";
+      repo = "YankRing.vim";
+      rev = "28854abef8fa4ebd3cb219aefcf22566997d8f65";
+      sha256 = "0zdp8pdsqgrh6lfw8ipjhrig6psvmdxkim9ik801y3r373sk2hxw";
+    };
+    meta.homepage = "https://github.com/vim-scripts/YankRing.vim/";
+  };
+
+  yats-vim = buildVimPluginFrom2Nix {
+    pname = "yats-vim";
+    version = "2021-02-15";
+    src = fetchFromGitHub {
+      owner = "HerringtonDarkholme";
+      repo = "yats.vim";
+      rev = "11112853180a933574f431cf78cd5a462ee3f473";
+      sha256 = "0bnq02dbsqwsizhlldb2pj92gjybr5aaa7a5m786xvb7ljvd82vi";
+      fetchSubmodules = true;
+    };
+    meta.homepage = "https://github.com/HerringtonDarkholme/yats.vim/";
+  };
+
+  YouCompleteMe = buildVimPluginFrom2Nix {
+    pname = "YouCompleteMe";
+    version = "2021-03-22";
+    src = fetchFromGitHub {
+      owner = "ycm-core";
+      repo = "YouCompleteMe";
+      rev = "ed423e8a1d2a5842a126d33b824ad3b65f85f3ba";
+      sha256 = "19c238sdc6i3ky374v52g13csnbmdcm9d97iji6fmklmzsyrq4cr";
+      fetchSubmodules = true;
+    };
+    meta.homepage = "https://github.com/ycm-core/YouCompleteMe/";
+  };
+
+  YUNOcommit-vim = buildVimPluginFrom2Nix {
+    pname = "YUNOcommit-vim";
+    version = "2014-11-26";
+    src = fetchFromGitHub {
+      owner = "esneider";
+      repo = "YUNOcommit.vim";
+      rev = "981082055a73ef076d7e27477874d2303153a448";
+      sha256 = "0mjc7fn405vcx1n7vadl98p5wgm6jxrlbdbkqgjq8f1m1ir81zab";
+    };
+    meta.homepage = "https://github.com/esneider/YUNOcommit.vim/";
+  };
+
+  zeavim-vim = buildVimPluginFrom2Nix {
+    pname = "zeavim-vim";
+    version = "2019-06-07";
+    src = fetchFromGitHub {
+      owner = "KabbAmine";
+      repo = "zeavim.vim";
+      rev = "298e52ad683680b4aa19b53d009cf0e6b9197664";
+      sha256 = "1qj6z0vd7y89wfwh84rndl4iz6cvilncih2fc5xgmljaarg914fs";
+    };
+    meta.homepage = "https://github.com/KabbAmine/zeavim.vim/";
+  };
+
+  zenburn = buildVimPluginFrom2Nix {
+    pname = "zenburn";
+    version = "2020-09-08";
+    src = fetchFromGitHub {
+      owner = "jnurmine";
+      repo = "zenburn";
+      rev = "4ec3795d81fc83b6f43389a6291bfa99394473a8";
+      sha256 = "148s2szjx61rp93nxa95552m87mn4n4ga00dlbvvv7sm607mvxd8";
+    };
+    meta.homepage = "https://github.com/jnurmine/zenburn/";
+  };
+
+  zephyr-nvim = buildVimPluginFrom2Nix {
+    pname = "zephyr-nvim";
+    version = "2021-04-03";
+    src = fetchFromGitHub {
+      owner = "glepnir";
+      repo = "zephyr-nvim";
+      rev = "782b1986adafe4b17ea8a0f9aca375f37029bd2b";
+      sha256 = "0chrbn917yzvc5rcz6ajzp36598c8lwc1wpdp3qwl34k2vp4r1ia";
+    };
+    meta.homepage = "https://github.com/glepnir/zephyr-nvim/";
+  };
+
+  zig-vim = buildVimPluginFrom2Nix {
+    pname = "zig-vim";
+    version = "2021-03-16";
+    src = fetchFromGitHub {
+      owner = "ziglang";
+      repo = "zig.vim";
+      rev = "33b62b688ef4f0b3810c4d3d1b3901f572488691";
+      sha256 = "0dsc1h8ih5jgfni5szm8dby368naxh3igndm80yrciy2glcj1ayn";
+    };
+    meta.homepage = "https://github.com/ziglang/zig.vim/";
+  };
+
+  zoomwintab-vim = buildVimPluginFrom2Nix {
+    pname = "zoomwintab-vim";
+    version = "2020-10-13";
+    src = fetchFromGitHub {
+      owner = "troydm";
+      repo = "zoomwintab.vim";
+      rev = "3b33368ed2ff6138d07f7ee148306cce7d7f6b7c";
+      sha256 = "0jx6860ajw50fn0l5p3dm3fcfwklqs1lf22yyrb09iljavixj777";
+    };
+    meta.homepage = "https://github.com/troydm/zoomwintab.vim/";
+  };
+
+});
+in lib.fix' (lib.extends overrides packages)
diff --git a/nixpkgs/pkgs/misc/vim-plugins/overrides.nix b/nixpkgs/pkgs/misc/vim-plugins/overrides.nix
new file mode 100644
index 000000000000..d52b248697ab
--- /dev/null
+++ b/nixpkgs/pkgs/misc/vim-plugins/overrides.nix
@@ -0,0 +1,844 @@
+{ lib
+, stdenv
+, python
+, cmake
+, meson
+, vim
+, ruby
+, which
+, fetchFromGitHub
+, fetchurl
+, fetchpatch
+, llvmPackages
+, rustPlatform
+, buildGoModule
+, pkg-config
+, curl
+, openssl
+, libgit2
+, libiconv
+, xkb-switch
+, fzf
+, skim
+, stylish-haskell
+, python3
+, boost
+, icu
+, ncurses
+, ycmd
+, rake
+, gobject-introspection
+, glib
+, wrapGAppsHook
+, substituteAll
+, languagetool
+, tabnine
+
+, Cocoa
+, CoreFoundation
+, CoreServices
+
+, buildVimPluginFrom2Nix
+, nodePackages
+, dasht
+, sqlite
+, code-minimap
+
+  # deoplete-khard dependency
+, khard
+
+  # vim-go dependencies
+, asmfmt
+, delve
+, errcheck
+, godef
+, golint
+, gomodifytags
+, gotags
+, gotools
+, go-motion
+, gnused
+, reftools
+, gogetdoc
+, golangci-lint
+, impl
+, iferr
+, gocode
+, gocode-gomod
+, go-tools
+, gopls
+
+  # direnv-vim dependencies
+, direnv
+
+  # vCoolor dependency
+, gnome3
+
+  # fruzzy dependency
+, nim
+}:
+
+self: super: {
+
+  vim2nix = buildVimPluginFrom2Nix {
+    pname = "vim2nix";
+    version = "1.0";
+    src = ./vim2nix;
+    dependencies = with super; [ vim-addon-manager ];
+  };
+
+  # Mainly used as a dependency for fzf-vim. Wraps the fzf program as a vim
+  # plugin, since part of the fzf vim plugin is included in the main fzf
+  # program.
+  fzfWrapper = buildVimPluginFrom2Nix {
+    inherit (fzf) src version;
+    pname = "fzf";
+    postInstall = ''
+      ln -s ${fzf}/bin/fzf $target/bin/fzf
+    '';
+  };
+
+  skim = buildVimPluginFrom2Nix {
+    pname = "skim";
+    version = skim.version;
+    src = skim.vim;
+  };
+
+  LanguageClient-neovim =
+    let
+      version = "0.1.160";
+      LanguageClient-neovim-src = fetchFromGitHub {
+        owner = "autozimu";
+        repo = "LanguageClient-neovim";
+        rev = version;
+        sha256 = "143cifahav1pfmpx3j1ihx433jrwxf6z27s0wxndgjkd2plkks58";
+      };
+      LanguageClient-neovim-bin = rustPlatform.buildRustPackage {
+        pname = "LanguageClient-neovim-bin";
+        inherit version;
+        src = LanguageClient-neovim-src;
+
+        cargoSha256 = "0mf94j85awdcqa6cyb89bipny9xg13ldkznjf002fq747f55my2a";
+        buildInputs = lib.optionals stdenv.isDarwin [ CoreServices ];
+
+        # FIXME: Use impure version of CoreFoundation because of missing symbols.
+        #   Undefined symbols for architecture x86_64: "_CFURLResourceIsReachable"
+        preConfigure = lib.optionalString stdenv.isDarwin ''
+          export NIX_LDFLAGS="-F${CoreFoundation}/Library/Frameworks -framework CoreFoundation $NIX_LDFLAGS"
+        '';
+      };
+    in
+    buildVimPluginFrom2Nix {
+      pname = "LanguageClient-neovim";
+      inherit version;
+      src = LanguageClient-neovim-src;
+
+      propagatedBuildInputs = [ LanguageClient-neovim-bin ];
+
+      preFixup = ''
+        substituteInPlace "$out"/share/vim-plugins/LanguageClient-neovim/autoload/LanguageClient.vim \
+          --replace "let l:path = s:root . '/bin/'" "let l:path = '${LanguageClient-neovim-bin}' . '/bin/'"
+      '';
+    };
+
+  clang_complete = super.clang_complete.overrideAttrs (old: {
+    # In addition to the arguments you pass to your compiler, you also need to
+    # specify the path of the C++ std header (if you are using C++).
+    # These usually implicitly set by cc-wrapper around clang (pkgs/build-support/cc-wrapper).
+    # The linked ruby code shows generates the required '.clang_complete' for cmake based projects
+    # https://gist.github.com/Mic92/135e83803ed29162817fce4098dec144
+    preFixup = ''
+      substituteInPlace "$out"/share/vim-plugins/clang_complete/plugin/clang_complete.vim \
+        --replace "let g:clang_library_path = '' + "''" + ''" "let g:clang_library_path='${llvmPackages.clang.cc.lib}/lib/libclang.so'"
+
+      substituteInPlace "$out"/share/vim-plugins/clang_complete/plugin/libclang.py \
+        --replace "/usr/lib/clang" "${llvmPackages.clang.cc}/lib/clang"
+    '';
+  });
+
+  direnv-vim = super.direnv-vim.overrideAttrs (oa: {
+    preFixup = oa.preFixup or "" + ''
+      substituteInPlace $out/share/vim-plugins/direnv-vim/autoload/direnv.vim \
+        --replace "let s:direnv_cmd = get(g:, 'direnv_cmd', 'direnv')" \
+          "let s:direnv_cmd = get(g:, 'direnv_cmd', '${lib.getBin direnv}/bin/direnv')"
+    '';
+  });
+
+  clighter8 = super.clighter8.overrideAttrs (old: {
+    preFixup = ''
+      sed "/^let g:clighter8_libclang_path/s|')$|${llvmPackages.clang.cc.lib}/lib/libclang.so')|" \
+        -i "$out"/share/vim-plugins/clighter8/plugin/clighter8.vim
+    '';
+  });
+
+  command-t = super.command-t.overrideAttrs (old: {
+    buildInputs = [ ruby rake ];
+    buildPhase = ''
+      rake make
+      rm ruby/command-t/ext/command-t/*.o
+    '';
+  });
+
+  cpsm = super.cpsm.overrideAttrs (old: {
+    buildInputs = [
+      python3
+      stdenv
+      cmake
+      boost
+      icu
+      ncurses
+    ];
+    buildPhase = ''
+      patchShebangs .
+      export PY3=ON
+      ./install.sh
+    '';
+  });
+
+  ctrlp-cmatcher = super.ctrlp-cmatcher.overrideAttrs (old: {
+    buildInputs = [ python ];
+    buildPhase = ''
+      patchShebangs .
+      ./install.sh
+    '';
+  });
+
+  defx-nvim = super.defx-nvim.overrideAttrs (old: {
+    dependencies = with super; [ nvim-yarp ];
+  });
+
+  deoplete-fish = super.deoplete-fish.overrideAttrs (old: {
+    dependencies = with super; [ deoplete-nvim vim-fish ];
+  });
+
+  deoplete-go = super.deoplete-go.overrideAttrs (old: {
+    buildInputs = [ python3 ];
+    buildPhase = ''
+      pushd ./rplugin/python3/deoplete/ujson
+      python3 setup.py build --build-base=$PWD/build --build-lib=$PWD/build
+      popd
+      find ./rplugin/ -name "ujson*.so" -exec mv -v {} ./rplugin/python3/ \;
+    '';
+  });
+
+  deoplete-khard = super.deoplete-khard.overrideAttrs (old: {
+    dependencies = [ self.deoplete-nvim ];
+    passthru.python3Dependencies = ps: [ (ps.toPythonModule khard) ];
+    meta = {
+      description = "Address-completion for khard via deoplete";
+      homepage = "https://github.com/nicoe/deoplete-khard";
+      license = lib.licenses.mit;
+      maintainers = with lib.maintainers; [ jorsn ];
+    };
+  });
+
+  ensime-vim = super.ensime-vim.overrideAttrs (old: {
+    passthru.python3Dependencies = ps: with ps; [ sexpdata websocket_client ];
+    dependencies = with super; [ vimproc-vim vimshell-vim super.self forms ];
+  });
+
+  forms = super.forms.overrideAttrs (old: {
+    dependencies = with super; [ super.self ];
+  });
+
+  fruzzy =
+    let
+      # until https://github.com/NixOS/nixpkgs/pull/67878 is merged, there's no better way to install nim libraries with nix
+      nimpy = fetchFromGitHub {
+        owner = "yglukhov";
+        repo = "nimpy";
+        rev = "4840d1e438985af759ddf0923e7a9250fd8ea0da";
+        sha256 = "0qqklvaajjqnlqm3rkk36pwwnn7x942mbca7nf2cvryh36yg4q5k";
+      };
+      binaryheap = fetchFromGitHub {
+        owner = "bluenote10";
+        repo = "nim-heap";
+        rev = "c38039309cb11391112571aa332df9c55f625b54";
+        sha256 = "05xdy13vm5n8dw2i366ppbznc4cfhq23rdcklisbaklz2jhdx352";
+      };
+    in
+    super.fruzzy.overrideAttrs (old: {
+      buildInputs = [ nim ];
+      patches = [
+        (substituteAll {
+          src = ./patches/fruzzy/get_version.patch;
+          version = old.version;
+        })
+      ];
+      configurePhase = ''
+        substituteInPlace Makefile \
+          --replace \
+            "nim c" \
+            "nim c --nimcache:$TMP --path:${nimpy} --path:${binaryheap}"
+      '';
+      buildPhase = ''
+        make build
+      '';
+    });
+
+  ghcid = super.ghcid.overrideAttrs (old: {
+    configurePhase = "cd plugins/nvim";
+  });
+
+  vimsence = super.vimsence.overrideAttrs (old: {
+    meta = with lib; {
+      description = "Discord rich presence for Vim";
+      homepage = "https://github.com/hugolgst/vimsence";
+      maintainers = with lib.maintainers; [ hugolgst ];
+    };
+  });
+
+  vim-gist = super.vim-gist.overrideAttrs (old: {
+    dependencies = with super; [ webapi-vim ];
+  });
+
+  minimap-vim = super.minimap-vim.overrideAttrs (old: {
+    preFixup = ''
+      substituteInPlace $out/share/vim-plugins/minimap-vim/plugin/minimap.vim \
+        --replace "code-minimap" "${code-minimap}/bin/code-minimap"
+      substituteInPlace $out/share/vim-plugins/minimap-vim/bin/minimap_generator.sh \
+        --replace "code-minimap" "${code-minimap}/bin/code-minimap"
+    '';
+  });
+
+  meson = buildVimPluginFrom2Nix {
+    inherit (meson) pname version src;
+    preInstall = "cd data/syntax-highlighting/vim";
+    meta.maintainers = with lib.maintainers; [ vcunat ];
+  };
+
+  ncm2 = super.ncm2.overrideAttrs (old: {
+    dependencies = with super; [ nvim-yarp ];
+  });
+
+  ncm2-jedi = super.ncm2-jedi.overrideAttrs (old: {
+    dependencies = with super; [ nvim-yarp ncm2 ];
+    passthru.python3Dependencies = ps: with ps; [ jedi ];
+  });
+
+  ncm2-neoinclude = super.ncm2-neoinclude.overrideAttrs (old: {
+    dependencies = with super; [ neoinclude-vim ];
+  });
+
+  ncm2-neosnippet = super.ncm2-neosnippet.overrideAttrs (old: {
+    dependencies = with super; [ neosnippet-vim ];
+  });
+
+  ncm2-syntax = super.ncm2-syntax.overrideAttrs (old: {
+    dependencies = with super; [ neco-syntax ];
+  });
+
+  ncm2-ultisnips = super.ncm2-ultisnips.overrideAttrs (old: {
+    dependencies = with super; [ ultisnips ];
+  });
+
+  nvim-lsputils = super.nvim-lsputils.overrideAttrs (old: {
+    dependencies = with super; [ popfix ];
+  });
+
+  fzf-vim = super.fzf-vim.overrideAttrs (old: {
+    dependencies = [ self.fzfWrapper ];
+  });
+
+  onehalf = super.onehalf.overrideAttrs (old: {
+    configurePhase = "cd vim";
+  });
+
+  skim-vim = super.skim-vim.overrideAttrs (old: {
+    dependencies = [ self.skim ];
+  });
+
+  sql-nvim = super.sql-nvim.overrideAttrs (old: {
+    postPatch = ''
+      substituteInPlace lua/sql/defs.lua \
+        --replace "vim.g.sql_clib_path or" "vim.g.sql_clib_path or '${sqlite.out}/lib/libsqlite3.so' or"
+    '';
+  });
+
+  sved =
+    let
+      # we put the script in its own derivation to benefit the magic of wrapGAppsHook
+      svedbackend = stdenv.mkDerivation {
+        name = "svedbackend-${super.sved.name}";
+        inherit (super.sved) src;
+        nativeBuildInputs = [ wrapGAppsHook ];
+        buildInputs = [
+          gobject-introspection
+          glib
+          (python3.withPackages (ps: with ps; [ pygobject3 pynvim dbus-python ]))
+        ];
+        preferLocalBuild = true;
+        installPhase = ''
+          install -Dt $out/bin ftplugin/evinceSync.py
+        '';
+      };
+    in
+    super.sved.overrideAttrs (old: {
+      preferLocalBuild = true;
+      postPatch = ''
+        rm ftplugin/evinceSync.py
+        ln -s ${svedbackend}/bin/evinceSync.py ftplugin/evinceSync.py
+      '';
+      meta = {
+        description = "synctex support between vim/neovim and evince";
+      };
+    });
+
+  vimacs = super.vimacs.overrideAttrs (old: {
+    buildPhase = ''
+      substituteInPlace bin/vim \
+        --replace '/usr/bin/vim' 'vim' \
+        --replace '/usr/bin/gvim' 'gvim'
+      # remove unnecessary duplicated bin wrapper script
+      rm -r plugin/vimacs
+    '';
+    meta = with lib; {
+      description = "Vim-Improved eMACS: Emacs emulation plugin for Vim";
+      homepage = "http://algorithm.com.au/code/vimacs";
+      license = licenses.gpl2Plus;
+      maintainers = with lib.maintainers; [ millerjason ];
+    };
+  });
+
+  vimshell-vim = super.vimshell-vim.overrideAttrs (old: {
+    dependencies = with super; [ vimproc-vim ];
+  });
+
+  vim-addon-manager = super.vim-addon-manager.overrideAttrs (old: {
+    buildInputs = lib.optional stdenv.isDarwin Cocoa;
+  });
+
+  vim-addon-actions = super.vim-addon-actions.overrideAttrs (old: {
+    dependencies = with super; [ vim-addon-mw-utils tlib_vim ];
+  });
+
+  vim-addon-async = super.vim-addon-async.overrideAttrs (old: {
+    dependencies = with super; [ vim-addon-signs ];
+  });
+
+  vim-addon-background-cmd = super.vim-addon-background-cmd.overrideAttrs (old: {
+    dependencies = with super; [ vim-addon-mw-utils ];
+  });
+
+  vim-addon-completion = super.vim-addon-completion.overrideAttrs (old: {
+    dependencies = with super; [ tlib_vim ];
+  });
+
+  vim-addon-goto-thing-at-cursor = super.vim-addon-goto-thing-at-cursor.overrideAttrs (old: {
+    dependencies = with super; [ tlib_vim ];
+  });
+
+  vim-addon-mru = super.vim-addon-mru.overrideAttrs (old: {
+    dependencies = with super; [ vim-addon-other vim-addon-mw-utils ];
+  });
+
+  vim-addon-nix = super.vim-addon-nix.overrideAttrs (old: {
+    dependencies = with super; [
+      vim-addon-completion
+      vim-addon-goto-thing-at-cursor
+      vim-addon-errorformats
+      vim-addon-actions
+      vim-addon-mw-utils
+      tlib_vim
+    ];
+  });
+
+  vim-addon-sql = super.vim-addon-sql.overrideAttrs (old: {
+    dependencies = with super; [ vim-addon-completion vim-addon-background-cmd tlib_vim ];
+  });
+
+  vim-addon-syntax-checker = super.vim-addon-syntax-checker.overrideAttrs (old: {
+    dependencies = with super; [ vim-addon-mw-utils tlib_vim ];
+  });
+
+  vim-addon-toggle-buffer = super.vim-addon-toggle-buffer.overrideAttrs (old: {
+    dependencies = with super; [ vim-addon-mw-utils tlib_vim ];
+  });
+
+  vim-addon-xdebug = super.vim-addon-xdebug.overrideAttrs (old: {
+    dependencies = with super; [ webapi-vim vim-addon-mw-utils vim-addon-signs vim-addon-async ];
+  });
+
+  vim-bazel = super.vim-bazel.overrideAttrs (old: {
+    dependencies = with super; [ vim-maktaba ];
+  });
+
+  vim-beancount = super.vim-beancount.overrideAttrs (old: {
+    passthru.python3Dependencies = ps: with ps; [ beancount ];
+  });
+
+  vim-closer = super.vim-closer.overrideAttrs (old: {
+    patches = [
+      # Fix duplicate tag in doc
+      (fetchpatch {
+        url = "https://github.com/rstacruz/vim-closer/commit/a504be8c7050e41b7dfc50c2362948e2cf7c5422.patch";
+        sha256 = "065q30d913fm3pc7r5y53wmnb7q7bhv21qxavm65bkb91242d409";
+      })
+    ];
+  });
+
+  vim-codefmt = super.vim-codefmt.overrideAttrs (old: {
+    dependencies = with super; [ vim-maktaba ];
+  });
+
+  vim-dasht = super.vim-dasht.overrideAttrs (old: {
+    preFixup = ''
+      substituteInPlace $out/share/vim-plugins/vim-dasht/autoload/dasht.vim \
+        --replace "['dasht']" "['${dasht}/bin/dasht']"
+    '';
+  });
+
+  vim-easytags = super.vim-easytags.overrideAttrs (old: {
+    dependencies = with super; [ vim-misc ];
+    patches = [
+      (fetchpatch {
+        # https://github.com/xolox/vim-easytags/pull/170 fix version detection for universal-ctags
+        url = "https://github.com/xolox/vim-easytags/commit/46e4709500ba3b8e6cf3e90aeb95736b19e49be9.patch";
+        sha256 = "0x0xabb56xkgdqrg1mpvhbi3yw4d829n73lsnnyj5yrxjffy4ax4";
+      })
+    ];
+  });
+
+  # change the go_bin_path to point to a path in the nix store. See the code in
+  # fatih/vim-go here
+  # https://github.com/fatih/vim-go/blob/155836d47052ea9c9bac81ba3e937f6f22c8e384/autoload/go/path.vim#L154-L159
+  vim-go = super.vim-go.overrideAttrs (old:
+    let
+      binPath = lib.makeBinPath [
+        asmfmt
+        delve
+        errcheck
+        go-motion
+        go-tools
+        gocode
+        gocode-gomod
+        godef
+        gogetdoc
+        golint
+        golangci-lint
+        gomodifytags
+        gopls
+        gotags
+        gotools
+        iferr
+        impl
+        reftools
+      ];
+    in
+    {
+      postPatch = ''
+        ${gnused}/bin/sed \
+          -Ee 's@"go_bin_path", ""@"go_bin_path", "${binPath}"@g' \
+          -i autoload/go/config.vim
+      '';
+    });
+
+  vim-grammarous = super.vim-grammarous.overrideAttrs (old: {
+    # use `:GrammarousCheck` to initialize checking
+    # In neovim, you also want to use set
+    #   let g:grammarous#show_first_error = 1
+    # see https://github.com/rhysd/vim-grammarous/issues/39
+    patches = [
+      (substituteAll {
+        src = ./patches/vim-grammarous/set_default_languagetool.patch;
+        inherit languagetool;
+      })
+    ];
+  });
+
+  lens-vim = super.lens-vim.overrideAttrs (old: {
+    # remove duplicate g:lens#animate in doc/lens.txt
+    # https://github.com/NixOS/nixpkgs/pull/105810#issuecomment-740007985
+    # https://github.com/camspiers/lens.vim/pull/40/files
+    patches = [
+      (substituteAll {
+        src = ./patches/lens-vim/remove_duplicate_g_lens_animate.patch;
+        inherit languagetool;
+      })
+    ];
+  });
+
+  vim-hier = super.vim-hier.overrideAttrs (old: {
+    buildInputs = [ vim ];
+  });
+
+  vim-isort = super.vim-isort.overrideAttrs (old: {
+    postPatch = ''
+      substituteInPlace ftplugin/python_vimisort.vim \
+        --replace 'import vim' 'import vim; import sys; sys.path.append("${python.pkgs.isort}/${python.sitePackages}")'
+    '';
+  });
+
+  vim-markdown-composer =
+    let
+      vim-markdown-composer-bin = rustPlatform.buildRustPackage rec {
+        pname = "vim-markdown-composer-bin";
+        inherit (super.vim-markdown-composer) src version;
+        cargoSha256 = "iuhq2Zhdkib8hw4uvXBjwE5ZiN1kzairlzufaGuVkWc=";
+      };
+    in
+    super.vim-markdown-composer.overrideAttrs (oldAttrs: rec {
+      preFixup = ''
+        substituteInPlace "$out"/share/vim-plugins/vim-markdown-composer/after/ftplugin/markdown/composer.vim \
+          --replace "let l:args = [s:plugin_root . '/target/release/markdown-composer']" \
+          "let l:args = ['${vim-markdown-composer-bin}/bin/markdown-composer']"
+      '';
+    });
+
+  vim-metamath = super.vim-metamath.overrideAttrs (old: {
+    preInstall = "cd vim";
+  });
+
+  vim-snipmate = super.vim-snipmate.overrideAttrs (old: {
+    dependencies = with super; [ vim-addon-mw-utils tlib_vim ];
+  });
+
+
+  vim-wakatime = super.vim-wakatime.overrideAttrs (old: {
+    buildInputs = [ python ];
+  });
+
+  vim-xdebug = super.vim-xdebug.overrideAttrs (old: {
+    postInstall = false;
+  });
+
+  vim-xkbswitch = super.vim-xkbswitch.overrideAttrs (old: {
+    patchPhase = ''
+      substituteInPlace plugin/xkbswitch.vim \
+        --replace /usr/local/lib/libxkbswitch.so ${xkb-switch}/lib/libxkbswitch.so
+    '';
+    buildInputs = [ xkb-switch ];
+  });
+
+  vim-yapf = super.vim-yapf.overrideAttrs (old: {
+    buildPhase = ''
+      substituteInPlace ftplugin/python_yapf.vim \
+        --replace '"yapf"' '"${python3.pkgs.yapf}/bin/yapf"'
+    '';
+  });
+
+  vimproc-vim = super.vimproc-vim.overrideAttrs (old: {
+    buildInputs = [ which ];
+
+    buildPhase = ''
+      substituteInPlace autoload/vimproc.vim \
+        --replace vimproc_mac.so vimproc_unix.so \
+        --replace vimproc_linux64.so vimproc_unix.so \
+        --replace vimproc_linux32.so vimproc_unix.so
+      make -f make_unix.mak
+    '';
+  });
+
+  YankRing-vim = super.YankRing-vim.overrideAttrs (old: {
+    sourceRoot = ".";
+  });
+
+  YouCompleteMe = super.YouCompleteMe.overrideAttrs (old: {
+    buildPhase = ''
+      substituteInPlace plugin/youcompleteme.vim \
+        --replace "'ycm_path_to_python_interpreter', '''" \
+        "'ycm_path_to_python_interpreter', '${python3}/bin/python3'"
+
+      rm -r third_party/ycmd
+      ln -s ${ycmd}/lib/ycmd third_party
+    '';
+
+    meta = with lib; {
+      description = "A code-completion engine for Vim";
+      homepage = "https://github.com/Valloric/YouCompleteMe";
+      license = licenses.gpl3;
+      maintainers = with maintainers; [ marcweber jagajaga ];
+      platforms = platforms.unix;
+    };
+  });
+
+  jedi-vim = super.jedi-vim.overrideAttrs (old: {
+    # checking for python3 support in vim would be neat, too, but nobody else seems to care
+    buildInputs = [ python3.pkgs.jedi ];
+    meta = {
+      description = "code-completion for python using python-jedi";
+      license = lib.licenses.mit;
+    };
+  });
+
+  lf-vim = super.lf-vim.overrideAttrs (old: {
+    dependencies = with super; [ vim-floaterm ];
+  });
+
+  vim-stylish-haskell = super.vim-stylish-haskell.overrideAttrs (old: {
+    postPatch = old.postPatch or "" + ''
+      substituteInPlace ftplugin/haskell/stylish-haskell.vim --replace \
+        'g:stylish_haskell_command = "stylish-haskell"' \
+        'g:stylish_haskell_command = "${stylish-haskell}/bin/stylish-haskell"'
+    '';
+  });
+
+  vCoolor-vim = super.vCoolor-vim.overrideAttrs (old: {
+    # on linux can use either Zenity or Yad.
+    propagatedBuildInputs = [ gnome3.zenity ];
+    meta = {
+      description = "Simple color selector/picker plugin";
+      license = lib.licenses.publicDomain;
+    };
+  });
+
+  unicode-vim =
+    let
+      unicode-data = fetchurl {
+        url = "http://www.unicode.org/Public/UNIDATA/UnicodeData.txt";
+        sha256 = "16b0jzvvzarnlxdvs2izd5ia0ipbd87md143dc6lv6xpdqcs75s9";
+      };
+    in
+    super.unicode-vim.overrideAttrs (old: {
+
+      # redirect to /dev/null else changes terminal color
+      buildPhase = ''
+        cp "${unicode-data}" autoload/unicode/UnicodeData.txt
+        echo "Building unicode cache"
+        ${vim}/bin/vim --cmd ":set rtp^=$PWD" -c 'ru plugin/unicode.vim' -c 'UnicodeCache' -c ':echohl Normal' -c ':q' > /dev/null
+      '';
+    });
+
+  vim-hexokinase = super.vim-hexokinase.overrideAttrs (old: {
+    preFixup =
+      let
+        hexokinase = buildGoModule {
+          name = "hexokinase";
+          src = old.src + "/hexokinase";
+          vendorSha256 = "pQpattmS9VmO3ZIQUFn66az8GSmB4IvYhTTCFn6SUmo=";
+        };
+      in
+      ''
+        ln -s ${hexokinase}/bin/hexokinase $target/hexokinase/hexokinase
+      '';
+
+    meta.platforms = lib.platforms.all;
+  });
+
+  vim-clap = super.vim-clap.overrideAttrs (old: {
+    preFixup =
+      let
+        maple-bin = rustPlatform.buildRustPackage {
+          name = "maple";
+          src = old.src;
+
+          nativeBuildInputs = [
+            pkg-config
+          ];
+
+          buildInputs = [
+            openssl
+          ] ++ lib.optionals stdenv.isDarwin [
+            CoreServices
+            curl
+            libgit2
+            libiconv
+          ];
+
+          cargoSha256 = "25UkYKhlGmlDg4fz1jZHjpQn5s4k5FKlFK0MU8YM5SE=";
+        };
+      in
+      ''
+        ln -s ${maple-bin}/bin/maple $target/bin/maple
+      '';
+
+    meta.platforms = lib.platforms.all;
+  });
+
+  compe-tabnine = super.compe-tabnine.overrideAttrs (old: {
+    buildInputs = [ tabnine ];
+
+    postFixup = ''
+      mkdir $target/binaries
+      ln -s ${tabnine}/bin/TabNine $target/binaries/TabNine_$(uname -s)
+    '';
+  });
+
+  completion-tabnine = super.completion-tabnine.overrideAttrs (old: {
+    buildInputs = [ tabnine ];
+
+    postFixup = ''
+      mkdir $target/binaries
+      ln -s ${tabnine}/bin/TabNine $target/binaries/TabNine_$(uname -s)
+    '';
+  });
+
+  telescope-frecency-nvim = super.telescope-frecency-nvim.overrideAttrs (old: {
+    dependencies = [ self.sql-nvim ];
+  });
+
+  telescope-fzy-native-nvim = super.telescope-fzy-native-nvim.overrideAttrs (old: {
+    preFixup =
+      let
+        fzy-lua-native-path = "deps/fzy-lua-native";
+        fzy-lua-native =
+          stdenv.mkDerivation {
+            name = "fzy-lua-native";
+            src = "${old.src}/${fzy-lua-native-path}";
+            # remove pre-compiled binaries
+            preBuild = "rm -rf static/*";
+            installPhase = ''
+              install -Dm 444 -t $out/static static/*
+              install -Dm 444 -t $out/lua lua/*
+            '';
+          };
+      in
+      ''
+        rm -rf $target/${fzy-lua-native-path}/*
+        ln -s ${fzy-lua-native}/static $target/${fzy-lua-native-path}/static
+        ln -s ${fzy-lua-native}/lua $target/${fzy-lua-native-path}/lua
+      '';
+    meta.platforms = lib.platforms.all;
+  });
+
+} // (
+  let
+    nodePackageNames = [
+      "coc-clangd"
+      "coc-cmake"
+      "coc-css"
+      "coc-diagnostic"
+      "coc-emmet"
+      "coc-eslint"
+      "coc-git"
+      "coc-go"
+      "coc-highlight"
+      "coc-html"
+      "coc-imselect"
+      "coc-java"
+      "coc-jest"
+      "coc-json"
+      "coc-lists"
+      "coc-markdownlint"
+      "coc-metals"
+      "coc-pairs"
+      "coc-prettier"
+      "coc-pyright"
+      "coc-python"
+      "coc-r-lsp"
+      "coc-rls"
+      "coc-rust-analyzer"
+      "coc-smartf"
+      "coc-snippets"
+      "coc-solargraph"
+      "coc-stylelint"
+      "coc-tabnine"
+      "coc-texlab"
+      "coc-tslint"
+      "coc-tslint-plugin"
+      "coc-tsserver"
+      "coc-vetur"
+      "coc-vimlsp"
+      "coc-vimtex"
+      "coc-wxml"
+      "coc-yaml"
+      "coc-yank"
+    ];
+    nodePackage2VimPackage = name: buildVimPluginFrom2Nix {
+      pname = name;
+      inherit (nodePackages.${name}) version meta;
+      src = "${nodePackages.${name}}/lib/node_modules/${name}";
+    };
+  in
+  lib.genAttrs nodePackageNames nodePackage2VimPackage
+)
diff --git a/nixpkgs/pkgs/misc/vim-plugins/patches/fruzzy/get_version.patch b/nixpkgs/pkgs/misc/vim-plugins/patches/fruzzy/get_version.patch
new file mode 100644
index 000000000000..62aaba118f20
--- /dev/null
+++ b/nixpkgs/pkgs/misc/vim-plugins/patches/fruzzy/get_version.patch
@@ -0,0 +1,25 @@
+diff --git a/rplugin/python3/fruzzy_mod.nim b/rplugin/python3/fruzzy_mod.nim
+index dba0689..0109285 100644
+--- a/rplugin/python3/fruzzy_mod.nim
++++ b/rplugin/python3/fruzzy_mod.nim
+@@ -12,9 +12,7 @@ when defined(profile):
+     import nimprof
+
+ proc getVersion(): string {.compileTime.}=
+-    let ver = staticExec("git describe --tags --always --dirty").strip()
+-    # let cTime = format(times.now(), "yyyy-MM-dd hh:mm:ss")
+-    let branch = staticExec("git rev-parse --abbrev-ref HEAD").strip()
++    let ver = "@version@"
+     var options:seq[string] = newSeq[string]()
+     if not defined(removelogger):
+         options.add("info")
+@@ -26,7 +24,7 @@ proc getVersion(): string {.compileTime.}=
+         options.add("release")
+     let optionsStr = options.join(",")
+
+-    return &"rev: {ver} on branch: {branch} with options: {optionsStr}"
++    return &"version: {ver} with options: {optionsStr}"
+
+ let L = newConsoleLogger(levelThreshold = logging.Level.lvlDebug)
+ addHandler(L)
+
diff --git a/nixpkgs/pkgs/misc/vim-plugins/patches/lens-vim/remove_duplicate_g_lens_animate.patch b/nixpkgs/pkgs/misc/vim-plugins/patches/lens-vim/remove_duplicate_g_lens_animate.patch
new file mode 100644
index 000000000000..1cd232654c88
--- /dev/null
+++ b/nixpkgs/pkgs/misc/vim-plugins/patches/lens-vim/remove_duplicate_g_lens_animate.patch
@@ -0,0 +1,12 @@
+diff --git a/doc/lens.txt b/doc/lens.txt
+index 60943ce..2fe43dc 100644
+--- a/doc/lens.txt
++++ b/doc/lens.txt
+@@ -76,7 +76,6 @@ g:lens#disabled_filenames
+ 
+              Default value is [].
+                                                               *g:lens#animate*
+-                                                              *g:lens#animate*
+ g:lens#animate
+              If value is 1 and animate.vim is installed, the window resize
+              will be animated.
diff --git a/nixpkgs/pkgs/misc/vim-plugins/patches/vim-grammarous/set_default_languagetool.patch b/nixpkgs/pkgs/misc/vim-plugins/patches/vim-grammarous/set_default_languagetool.patch
new file mode 100644
index 000000000000..72c928d1a971
--- /dev/null
+++ b/nixpkgs/pkgs/misc/vim-plugins/patches/vim-grammarous/set_default_languagetool.patch
@@ -0,0 +1,11 @@
+--- vim-grammarous-51ef519.org/autoload/grammarous.vim	1970-01-01 01:00:01.000000000 +0100
++++ vim-grammarous-51ef519/autoload/grammarous.vim	2017-11-21 16:33:27.473403322 +0000
+@@ -22,7 +22,7 @@
+ let g:grammarous#enable_spell_check              = get(g:, 'grammarous#enable_spell_check', 0)
+ let g:grammarous#move_to_first_error             = get(g:, 'grammarous#move_to_first_error', 1)
+ let g:grammarous#hooks                           = get(g:, 'grammarous#hooks', {})
+-let g:grammarous#languagetool_cmd                = get(g:, 'grammarous#languagetool_cmd', '')
++let g:grammarous#languagetool_cmd                = get(g:, 'grammarous#languagetool_cmd', '@languagetool@/bin/languagetool-commandline')
+ let g:grammarous#show_first_error                = get(g:, 'grammarous#show_first_error', 0)
+ 
+ highlight default link GrammarousError SpellBad
diff --git a/nixpkgs/pkgs/misc/vim-plugins/readme.md b/nixpkgs/pkgs/misc/vim-plugins/readme.md
new file mode 100644
index 000000000000..0758a3e95981
--- /dev/null
+++ b/nixpkgs/pkgs/misc/vim-plugins/readme.md
@@ -0,0 +1 @@
+Instructions for adding Vim plugins to `nixpkgs` can be found [here](/doc/languages-frameworks/vim.section.md).
diff --git a/nixpkgs/pkgs/misc/vim-plugins/update.py b/nixpkgs/pkgs/misc/vim-plugins/update.py
new file mode 100755
index 000000000000..1180b4572d22
--- /dev/null
+++ b/nixpkgs/pkgs/misc/vim-plugins/update.py
@@ -0,0 +1,91 @@
+#!/usr/bin/env nix-shell
+#!nix-shell -p nix-prefetch-git -p python3 -p python3Packages.GitPython nix -i python3
+
+# format:
+# $ nix run nixpkgs.python3Packages.black -c black update.py
+# type-check:
+# $ nix run nixpkgs.python3Packages.mypy -c mypy update.py
+# linted:
+# $ nix run nixpkgs.python3Packages.flake8 -c flake8 --ignore E501,E265,E402 update.py
+
+import inspect
+import os
+import sys
+from typing import List, Tuple
+from pathlib import Path
+
+# Import plugin update library from maintainers/scripts/pluginupdate.py
+ROOT = Path(os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe()))))
+sys.path.insert(0, os.path.join(ROOT.parent.parent.parent, "maintainers", "scripts"))
+import pluginupdate
+
+GET_PLUGINS = f"""(with import <localpkgs> {{}};
+let
+  inherit (vimUtils.override {{inherit vim;}}) buildVimPluginFrom2Nix;
+  generated = callPackage {ROOT}/generated.nix {{
+    inherit buildVimPluginFrom2Nix;
+  }};
+  hasChecksum = value: lib.isAttrs value && lib.hasAttrByPath ["src" "outputHash"] value;
+  getChecksum = name: value:
+    if hasChecksum value then {{
+      submodules = value.src.fetchSubmodules or false;
+      sha256 = value.src.outputHash;
+      rev = value.src.rev;
+    }} else null;
+  checksums = lib.mapAttrs getChecksum generated;
+in lib.filterAttrs (n: v: v != null) checksums)"""
+
+HEADER = (
+    "# This file has been generated by ./pkgs/misc/vim-plugins/update.py. Do not edit!"
+)
+
+
+def generate_nix(plugins: List[Tuple[str, str, pluginupdate.Plugin]], outfile: str):
+    sorted_plugins = sorted(plugins, key=lambda v: v[2].name.lower())
+
+    with open(outfile, "w+") as f:
+        f.write(HEADER)
+        f.write(
+            """
+{ lib, buildVimPluginFrom2Nix, fetchFromGitHub, overrides ? (self: super: {}) }:
+let
+  packages = ( self:
+{"""
+        )
+        for owner, repo, plugin in sorted_plugins:
+            if plugin.has_submodules:
+                submodule_attr = "\n      fetchSubmodules = true;"
+            else:
+                submodule_attr = ""
+
+            f.write(
+                f"""
+  {plugin.normalized_name} = buildVimPluginFrom2Nix {{
+    pname = "{plugin.normalized_name}";
+    version = "{plugin.version}";
+    src = fetchFromGitHub {{
+      owner = "{owner}";
+      repo = "{repo}";
+      rev = "{plugin.commit}";
+      sha256 = "{plugin.sha256}";{submodule_attr}
+    }};
+    meta.homepage = "https://github.com/{owner}/{repo}/";
+  }};
+"""
+            )
+        f.write(
+            """
+});
+in lib.fix' (lib.extends overrides packages)
+"""
+        )
+    print(f"updated {outfile}")
+
+
+def main():
+    editor = pluginupdate.Editor("vim", ROOT, GET_PLUGINS, generate_nix)
+    pluginupdate.update_plugins(editor)
+
+
+if __name__ == "__main__":
+    main()
diff --git a/nixpkgs/pkgs/misc/vim-plugins/vim-plugin-names b/nixpkgs/pkgs/misc/vim-plugins/vim-plugin-names
new file mode 100644
index 000000000000..0eb035485d31
--- /dev/null
+++ b/nixpkgs/pkgs/misc/vim-plugins/vim-plugin-names
@@ -0,0 +1,740 @@
+907th/vim-auto-save
+aca/completion-tabnine
+AckslD/nvim-whichkey-setup.lua@main
+ackyshake/Spacegray.vim@main
+airblade/vim-gitgutter
+airblade/vim-rooter
+akinsho/nvim-bufferline.lua
+akinsho/nvim-toggleterm.lua
+aklt/plantuml-syntax
+altercation/vim-colors-solarized
+alvan/vim-closetag
+alx741/vim-hindent
+alx741/vim-stylishask
+amiorin/ctrlp-z
+andrep/vimacs
+andreshazard/vim-logreview
+AndrewRadev/sideways.vim@main
+AndrewRadev/splitjoin.vim@main
+andsild/peskcolor.vim
+andviro/flake8-vim
+andymass/vim-matchup
+andys8/vim-elm-syntax
+antoinemadec/coc-fzf
+ap/vim-css-color
+arcticicestudio/nord-vim
+artur-shaik/vim-javacomplete2
+autozimu/LanguageClient-neovim
+ayu-theme/ayu-vim
+bakpakin/fennel.vim
+bazelbuild/vim-bazel
+bbchung/clighter8
+benizi/vim-automkdir
+bhurlow/vim-parinfer
+bitc/vim-hdevtools
+bkad/camelcasemotion
+bling/vim-bufferline
+blueyed/vim-diminactive
+bogado/file-line
+bohlender/vim-smt2
+brennanfee/vim-gui-position@main
+bronson/vim-trailing-whitespace
+brooth/far.vim
+buoto/gotests-vim
+camspiers/lens.vim
+carlitux/deoplete-ternjs
+ccarpita/rtorrent-syntax-file
+cespare/vim-toml
+Chiel92/vim-autoformat
+chikatoike/concealedyank.vim
+chikatoike/sourcemap.vim
+chr4/nginx.vim
+chrisbra/CheckAttach
+chrisbra/csv.vim
+chrisbra/NrrwRgn
+chrisbra/Recover.vim
+chrisbra/SudoEdit.vim
+chrisbra/unicode.vim
+chrisgeo/sparkup
+chriskempson/base16-vim
+ChristianChiarulli/nvcode-color-schemes.vim
+christoomey/vim-sort-motion
+christoomey/vim-tmux-navigator
+chuling/ci_dark
+ckarnell/antonys-macro-repeater
+cloudhead/neovim-fuzzy
+CoatiSoftware/vim-sourcetrail
+cocopon/iceberg.vim
+cohama/lexima.vim
+crusoexia/vim-monokai
+ctjhoa/spacevim
+ctrlpvim/ctrlp.vim
+dag/vim-fish
+dag/vim2hs
+dannyob/quickfixstatus
+darfink/starsearch.vim
+dart-lang/dart-vim-plugin
+david-a-wheeler/vim-metamath
+davidhalter/jedi-vim
+dcharbon/vim-flatbuffers
+dense-analysis/ale
+deoplete-plugins/deoplete-clang
+deoplete-plugins/deoplete-dictionary
+deoplete-plugins/deoplete-go
+deoplete-plugins/deoplete-jedi
+deoplete-plugins/deoplete-lsp
+deoplete-plugins/deoplete-zsh
+derekelkins/agda-vim
+derekwyatt/vim-scala
+dhruvasagar/vim-prosession
+dhruvasagar/vim-table-mode
+digitaltoad/vim-pug
+direnv/direnv.vim
+dleonard0/pony-vim-syntax
+dmix/elvish.vim
+dpelle/vim-LanguageTool
+dracula/vim as dracula-vim
+drewtempelmeyer/palenight.vim
+drmingdrmer/xptemplate
+dstein64/nvim-scrollview@main
+dstein64/vim-startuptime
+dylanaraps/wal.vim
+eagletmt/ghcmod-vim
+eagletmt/neco-ghc
+easymotion/vim-easymotion
+editorconfig/editorconfig-vim
+edwinb/idris2-vim
+ehamberg/vim-cute-python
+eigenfoo/stan-vim
+eikenb/acp
+elixir-editors/vim-elixir
+elmcast/elm-vim
+elzr/vim-json
+embark-theme/vim@main as embark-vim
+embear/vim-localvimrc
+enomsg/vim-haskellConcealPlus
+enricobacis/vim-airline-clock
+ensime/ensime-vim
+ervandew/supertab
+esneider/YUNOcommit.vim
+euclidianAce/BetterLua.vim
+euclio/vim-markdown-composer
+f-person/git-blame.nvim
+farmergreg/vim-lastplace
+fatih/vim-go
+fcpg/vim-osc52
+FelikZ/ctrlp-py-matcher
+fenetikm/falcon
+fiatjaf/neuron.vim
+fisadev/vim-isort
+flazz/vim-colorschemes
+floobits/floobits-neovim
+freitass/todo.txt-vim
+frigoeu/psc-ide-vim
+fruit-in/brainfuck-vim
+fruit-in/vim-nong-theme
+fsharp/vim-fsharp
+fszymanski/deoplete-emoji
+garbas/vim-snipmate
+gennaro-tedesco/nvim-peekup
+gentoo/gentoo-syntax
+GEverding/vim-hocon
+gfanto/fzf-lsp.nvim@main
+gibiansky/vim-textobj-haskell
+gioele/vim-autoswap
+glepnir/dashboard-nvim
+glepnir/galaxyline.nvim@main
+glepnir/lspsaga.nvim@main
+glepnir/oceanic-material
+glepnir/zephyr-nvim@main
+glts/vim-textobj-comment
+godlygeek/csapprox
+godlygeek/tabular
+google/vim-codefmt
+google/vim-jsonnet
+google/vim-maktaba
+gorkunov/smartpairs.vim
+gotcha/vimelette
+gregsexton/gitv
+gruvbox-community/gruvbox as gruvbox-community
+gu-fan/riv.vim
+guns/vim-clojure-highlight
+guns/vim-clojure-static
+guns/vim-sexp
+guns/xterm-color-table.vim
+hashivim/vim-packer
+hashivim/vim-terraform
+hashivim/vim-vagrant
+haya14busa/incsearch-easymotion.vim
+haya14busa/incsearch.vim
+haya14busa/is.vim
+haya14busa/vim-asterisk
+haya14busa/vim-poweryank
+heavenshell/vim-jsdoc
+hecal3/vim-leader-guide
+henrik/vim-indexed-search
+HerringtonDarkholme/yats.vim
+honza/vim-snippets
+hoob3rt/lualine.nvim
+hotwatermorning/auto-git-diff
+hrsh7th/nvim-compe
+hrsh7th/vim-vsnip
+hrsh7th/vim-vsnip-integ
+hsanson/vim-android
+hsitz/VimOrganizer
+iamcco/coc-spell-checker
+ianks/vim-tsx
+idanarye/vim-merginal
+idris-hackers/idris-vim
+Inazuma110/deoplete-greek
+inkarkat/vim-SyntaxRange
+int3/vim-extradite
+Iron-E/nvim-highlite
+itchyny/calendar.vim
+itchyny/lightline.vim
+itchyny/thumbnail.vim
+itchyny/vim-cursorword
+itchyny/vim-gitbranch
+itspriddle/vim-shellcheck
+ivanov/vim-ipython
+jackguo380/vim-lsp-cxx-highlight
+jacoborus/tender.vim
+jakwings/vim-pony
+jamessan/vim-gnupg@main
+jaredgorski/SpaceCamp
+jasonccox/vim-wayland-clipboard
+jaxbot/semantic-highlight.vim
+JazzCore/ctrlp-cmatcher
+jceb/vim-hier
+jceb/vim-orgmode
+jeetsukumaran/vim-buffergator
+jeetsukumaran/vim-indentwise
+jeffkreeftmeijer/neovim-sensible
+jeffkreeftmeijer/vim-numbertoggle
+jelera/vim-javascript-syntax
+jgdavey/tslime.vim@main
+jhradilek/vim-docbk
+jhradilek/vim-snippets as vim-docbk-snippets
+jiangmiao/auto-pairs
+jistr/vim-nerdtree-tabs
+jjo/vim-cue
+jlanzarotta/bufexplorer
+jnurmine/zenburn
+jonbri/vim-colorstepper
+jonsmithers/vim-html-template-literals
+joonty/vim-xdebug
+josa42/coc-lua
+josa42/vim-lightline-coc
+joshdick/onedark.vim
+jpalardy/vim-slime@main
+jparise/vim-graphql
+jparise/vim-phabricator
+jreybert/vimagit
+jsfaint/gen_tags.vim
+JuliaEditorSupport/deoplete-julia
+JuliaEditorSupport/julia-vim
+Julian/vim-textobj-variable-segment
+juliosueiras/vim-terraform-completion
+junegunn/fzf.vim
+junegunn/goyo.vim
+junegunn/gv.vim
+junegunn/limelight.vim
+junegunn/seoul256.vim
+junegunn/vader.vim
+junegunn/vim-after-object
+junegunn/vim-easy-align
+junegunn/vim-github-dashboard
+junegunn/vim-peekaboo
+junegunn/vim-plug
+junegunn/vim-slash
+justincampbell/vim-eighties
+justinj/vim-pico8-syntax
+justinmk/vim-dirvish
+justinmk/vim-sneak
+jvirtanen/vim-hcl
+jvoorhis/coq.vim
+KabbAmine/vCoolor.vim
+KabbAmine/zeavim.vim
+kalbasit/vim-colemak
+kana/vim-niceblock
+kana/vim-operator-replace
+kana/vim-operator-user
+kana/vim-tabpagecd
+kana/vim-textobj-function
+kana/vim-textobj-user
+kassio/neoterm
+kbenzie/vim-spirv
+kchmck/vim-coffee-script
+KeitaNakamura/neodark.vim
+keith/investigate.vim
+keith/rspec.vim
+keith/swift.vim
+kevinhwang91/nvim-bqf@main
+kevinhwang91/nvim-hlslens@main
+kien/rainbow_parentheses.vim
+knubie/vim-kitty-navigator
+konfekt/fastfold
+konfekt/vim-DetectSpellLang
+kosayoda/nvim-lightbulb
+kristijanhusak/defx-git
+kristijanhusak/defx-icons
+kristijanhusak/deoplete-phpactor
+kristijanhusak/vim-carbon-now-sh
+kristijanhusak/vim-dirvish-git
+kristijanhusak/vim-hybrid-material
+kshenoy/vim-signature
+kyazdani42/nvim-tree.lua
+kyazdani42/nvim-web-devicons
+lambdalisue/fern.vim
+lambdalisue/vim-gista
+lambdalisue/vim-manpager
+lambdalisue/vim-pager
+latex-box-team/latex-box
+leafgarland/typescript-vim
+leanprover/lean.vim
+ledger/vim-ledger
+lepture/vim-jinja
+lervag/vimtex
+lewis6991/gitsigns.nvim@main
+lfilho/cosco.vim
+lifepillar/vim-gruvbox8
+lifepillar/vim-mucomplete
+lighttiger2505/deoplete-vim-lsp
+lilydjwg/colorizer
+liuchengxu/vim-clap
+liuchengxu/vim-which-key
+liuchengxu/vista.vim
+LnL7/vim-nix
+lotabout/skim.vim
+luan/vim-concourse
+LucHermitte/lh-brackets
+LucHermitte/lh-vim-lib
+ludovicchabant/vim-gutentags
+ludovicchabant/vim-lawrencium
+lukas-reineke/indent-blankline.nvim
+lukaszkorecki/workflowish
+lumiliet/vim-twig
+luochen1990/rainbow
+lyokha/vim-xkbswitch
+machakann/vim-highlightedyank
+machakann/vim-sandwich
+machakann/vim-swap
+maksimr/vim-jsbeautify
+MarcWeber/vim-addon-actions
+MarcWeber/vim-addon-async
+MarcWeber/vim-addon-background-cmd
+MarcWeber/vim-addon-commenting
+MarcWeber/vim-addon-completion
+MarcWeber/vim-addon-errorformats
+MarcWeber/vim-addon-goto-thing-at-cursor
+MarcWeber/vim-addon-local-vimrc
+MarcWeber/vim-addon-manager
+MarcWeber/vim-addon-mru
+MarcWeber/vim-addon-mw-utils
+MarcWeber/vim-addon-nix
+MarcWeber/vim-addon-other
+MarcWeber/vim-addon-php-manual
+MarcWeber/vim-addon-signs
+MarcWeber/vim-addon-sql
+MarcWeber/vim-addon-syntax-checker
+MarcWeber/vim-addon-toggle-buffer
+MarcWeber/vim-addon-xdebug
+markonm/traces.vim
+martinda/Jenkinsfile-vim-syntax
+mattn/calendar-vim as mattn-calendar-vim
+mattn/emmet-vim
+mattn/vim-gist
+mattn/webapi-vim
+matze/vim-move
+maximbaz/lightline-ale
+MaxMEllon/vim-jsx-pretty
+mbbill/undotree
+mboughaba/i3config.vim
+mcchrish/nnn.vim
+megaannum/forms
+megaannum/self
+mengelbrecht/lightline-bufferline
+metakirby5/codi.vim
+metalelf0/jellybeans-nvim@main
+mfukar/robotframework-vim
+mfussenegger/nvim-dap
+mfussenegger/nvim-jdtls
+mg979/vim-visual-multi
+mhartington/oceanic-next
+mhinz/vim-crates
+mhinz/vim-grepper
+mhinz/vim-janah
+mhinz/vim-sayonara
+mhinz/vim-signify
+mhinz/vim-startify
+michaeljsmith/vim-indent-object
+mileszs/ack.vim
+milkypostman/vim-togglelist
+mindriot101/vim-yapf
+mk12/vim-lean
+mkasa/lushtags
+moll/vim-bbye
+mopp/sky-color-clock.vim
+morhetz/gruvbox
+motus/pig.vim
+mpickering/hlint-refactor-vim
+ms-jpq/chadtree@chad
+mtikekar/vim-bsv
+nanotech/jellybeans.vim
+natebosch/vim-lsc
+nathanaelkane/vim-indent-guides
+nathangrigg/vim-beancount
+nathunsmitty/nvim-ale-diagnostic@main
+navicore/vissort.vim
+nbouscal/vim-stylish-haskell
+ncm2/float-preview.nvim
+ncm2/ncm2
+ncm2/ncm2-bufword
+ncm2/ncm2-cssomni
+ncm2/ncm2-github
+ncm2/ncm2-html-subscope
+ncm2/ncm2-jedi
+ncm2/ncm2-markdown-subscope
+ncm2/ncm2-neoinclude
+ncm2/ncm2-neosnippet
+ncm2/ncm2-path
+ncm2/ncm2-syntax
+ncm2/ncm2-tagprefix
+ncm2/ncm2-tmux
+ncm2/ncm2-ultisnips
+ncm2/ncm2-vim
+ndmitchell/ghcid
+neoclide/coc-denite
+neoclide/coc-neco
+neoclide/coc.nvim@release
+neoclide/denite-extra
+neoclide/denite-git
+neoclide/vim-easygit
+neomake/neomake
+neovim/nvim-lspconfig
+neovim/nvimdev.nvim
+neovimhaskell/haskell-vim
+neovimhaskell/nvim-hs.vim
+neutaaaaan/iosvkem
+nfnty/vim-nftables
+nicoe/deoplete-khard
+nishigori/increment-activator
+nixprime/cpsm
+NLKNguyen/papercolor-theme
+noc7c9/vim-iced-coffee-script
+norcalli/nvim-colorizer.lua
+norcalli/nvim-terminal.lua
+norcalli/snippets.nvim
+npxbr/glow.nvim@main
+ntpeters/vim-better-whitespace
+numirias/semshi
+nvie/vim-flake8
+nvim-lua/completion-nvim
+nvim-lua/diagnostic-nvim
+nvim-lua/lsp-status.nvim
+nvim-lua/lsp_extensions.nvim
+nvim-lua/plenary.nvim
+nvim-lua/popup.nvim
+nvim-telescope/telescope-frecency.nvim
+nvim-telescope/telescope-fzf-writer.nvim
+nvim-telescope/telescope-fzy-native.nvim
+nvim-telescope/telescope.nvim
+nvim-treesitter/completion-treesitter
+nvim-treesitter/nvim-treesitter
+nvim-treesitter/nvim-treesitter-refactor
+nvim-treesitter/nvim-treesitter-textobjects
+nvim-treesitter/playground
+oberblastmeister/termwrapper.nvim
+ocaml/vim-ocaml
+octol/vim-cpp-enhanced-highlight
+ojroques/vim-oscyank@main
+Olical/aniseed
+Olical/conjure
+onsails/lspkind-nvim
+OrangeT/vim-csharp
+osyo-manga/shabadou.vim
+osyo-manga/vim-anzu
+osyo-manga/vim-over
+osyo-manga/vim-textobj-multiblock
+osyo-manga/vim-watchdogs
+overcache/NeoSolarized
+p00f/nvim-ts-rainbow
+pangloss/vim-javascript
+parsonsmatt/intero-neovim
+pearofducks/ansible-vim
+peitalin/vim-jsx-typescript
+peterbjorgensen/sved
+peterhoeg/vim-qml
+phaazon/hop.nvim
+phanviet/vim-monokai-pro
+plasticboy/vim-markdown
+ponko2/deoplete-fish
+posva/vim-vue
+powerman/vim-plugin-AnsiEsc
+PProvost/vim-ps1
+prabirshrestha/async.vim
+prabirshrestha/asyncomplete.vim
+prabirshrestha/vim-lsp
+preservim/nerdcommenter
+preservim/nerdtree
+preservim/tagbar
+preservim/vimux
+psliwka/vim-smoothie
+ptzz/lf.vim
+puremourning/vimspector
+purescript-contrib/purescript-vim
+python-mode/python-mode
+qnighy/lalrpop.vim
+qpkorr/vim-bufkill
+Quramy/tsuquyomi
+racer-rust/vim-racer
+rafaqz/ranger.vim
+rafi/awesome-vim-colorschemes
+raghur/fruzzy
+raghur/vim-ghost
+Raimondi/delimitMate
+rakr/vim-one
+rbgrouleff/bclose.vim
+rbong/vim-flog
+reedes/vim-pencil
+reedes/vim-wordy
+rhysd/committia.vim
+rhysd/devdocs.vim
+rhysd/git-messenger.vim
+rhysd/vim-clang-format
+rhysd/vim-grammarous
+rhysd/vim-operator-surround
+RishabhRD/nvim-lsputils
+RishabhRD/popfix
+rmagatti/auto-session@main
+rodjek/vim-puppet
+romainl/vim-cool
+romainl/vim-qf
+roman/golden-ratio
+romgrk/barbar.nvim
+romgrk/nvim-treesitter-context
+ron89/thesaurus_query.vim
+roxma/nvim-cm-racer
+roxma/nvim-completion-manager
+roxma/nvim-yarp
+roxma/vim-tmux-clipboard
+RRethy/vim-hexokinase
+RRethy/vim-illuminate
+rstacruz/vim-closer
+rust-lang/rust.vim
+ryanoasis/vim-devicons
+ryvnf/readline.vim
+sainnhe/sonokai
+sakhnik/nvim-gdb
+saltstack/salt-vim
+samoshkin/vim-mergetool
+sbdchd/neoformat
+sebastianmarkow/deoplete-rust
+SevereOverfl0w/deoplete-github
+sheerun/vim-polyglot
+Shougo/context_filetype.vim
+Shougo/defx.nvim
+Shougo/denite.nvim
+Shougo/deol.nvim
+Shougo/deoplete.nvim
+Shougo/echodoc.vim
+Shougo/neco-syntax
+Shougo/neco-vim
+Shougo/neocomplete.vim
+Shougo/neoinclude.vim
+Shougo/neomru.vim
+Shougo/neosnippet-snippets
+Shougo/neosnippet.vim
+Shougo/neoyank.vim
+Shougo/tabpagebuffer.vim
+Shougo/unite.vim
+Shougo/vimfiler.vim
+Shougo/vimproc.vim
+Shougo/vimshell.vim
+shumphrey/fugitive-gitlab.vim
+sickill/vim-pasta
+SidOfc/mkdx
+simnalamburt/vim-mundo
+simrat39/rust-tools.nvim
+SirVer/ultisnips
+sjl/gundo.vim
+sjl/splice.vim
+sk1418/last256
+slashmili/alchemist.vim
+sodapopcan/vim-twiggy
+solarnz/arcanist.vim
+sonph/onehalf
+srcery-colors/srcery-vim
+steelsojka/completion-buffers
+stefandtw/quickfix-reflector.vim
+stephpy/vim-yaml
+sunaku/vim-dasht
+svermeulen/vim-subversive
+t9md/vim-choosewin
+t9md/vim-smalls
+takac/vim-hardtime
+tami5/compe-conjure
+tami5/lispdocs.nvim
+tami5/sql.nvim
+tbodt/deoplete-tabnine
+ternjs/tern_for_vim
+terryma/vim-expand-region
+terryma/vim-multiple-cursors
+tex/vimpreviewpandoc
+Th3Whit3Wolf/one-nvim@main
+theHamsta/nvim-dap-virtual-text
+ThePrimeagen/vim-apm
+thinca/vim-ft-diff_fold
+thinca/vim-prettyprint
+thinca/vim-quickrun
+thinca/vim-scouter
+thinca/vim-themis
+thinca/vim-visualstar
+thirtythreeforty/lessspace.vim
+thosakwe/vim-flutter
+tiagofumo/vim-nerdtree-syntax-highlight
+tikhomirov/vim-glsl
+TimUntersberger/neogit
+tjdevries/nlua.nvim
+tjdevries/train.nvim
+tmhedberg/SimpylFold
+tmsvg/pear-tree
+tmux-plugins/vim-tmux
+tmux-plugins/vim-tmux-focus-events
+tomasr/molokai
+tomlion/vim-solidity
+tommcdo/vim-exchange
+tommcdo/vim-lion
+tommcdo/vim-ninja-feet
+tomtom/tcomment_vim
+tomtom/tlib_vim
+tools-life/taskwiki
+tpope/vim-abolish
+tpope/vim-capslock
+tpope/vim-commentary
+tpope/vim-dadbod
+tpope/vim-dispatch
+tpope/vim-endwise
+tpope/vim-eunuch
+tpope/vim-fireplace
+tpope/vim-flagship
+tpope/vim-fugitive
+tpope/vim-git
+tpope/vim-liquid
+tpope/vim-obsession
+tpope/vim-pathogen
+tpope/vim-projectionist
+tpope/vim-ragtag
+tpope/vim-rails
+tpope/vim-repeat
+tpope/vim-rhubarb
+tpope/vim-rsi
+tpope/vim-salve
+tpope/vim-scriptease
+tpope/vim-sensible
+tpope/vim-sexp-mappings-for-regular-people
+tpope/vim-sleuth
+tpope/vim-speeddating
+tpope/vim-surround
+tpope/vim-tbone
+tpope/vim-unimpaired
+tpope/vim-vinegar
+travitch/hasksyn
+tremor-rs/tremor-vim@main
+triglav/vim-visual-increment
+troydm/zoomwintab.vim
+tversteeg/registers.nvim@main
+twerth/ir_black
+twinside/vim-haskellconceal
+Twinside/vim-hoogle
+tyru/caw.vim
+tyru/open-browser-github.vim
+tyru/open-browser.vim
+tzachar/compe-tabnine@main
+uarun/vim-protobuf
+udalov/kotlin-vim
+ujihisa/neco-look
+unblevable/quick-scope
+urbit/hoon.vim
+Valloric/MatchTagAlways
+Valodim/deoplete-notmuch
+vhda/verilog_systemverilog.vim
+vigoux/LanguageTool.nvim
+vim-airline/vim-airline
+vim-airline/vim-airline-themes
+vim-erlang/vim-erlang-compiler
+vim-erlang/vim-erlang-omnicomplete
+vim-erlang/vim-erlang-runtime
+vim-erlang/vim-erlang-tags
+vim-pandoc/vim-pandoc
+vim-pandoc/vim-pandoc-after
+vim-pandoc/vim-pandoc-syntax
+vim-ruby/vim-ruby
+vim-scripts/a.vim
+vim-scripts/align
+vim-scripts/argtextobj.vim
+vim-scripts/autoload_cscope.vim
+vim-scripts/bats.vim
+vim-scripts/BufOnly.vim
+vim-scripts/changeColorScheme.vim
+vim-scripts/Colour-Sampler-Pack
+vim-scripts/DoxygenToolkit.vim
+vim-scripts/emodeline
+vim-scripts/gitignore.vim
+vim-scripts/Improved-AnsiEsc
+vim-scripts/jdaddy.vim
+vim-scripts/matchit.zip
+vim-scripts/mayansmoke
+vim-scripts/PreserveNoEOL
+vim-scripts/prev_indent
+vim-scripts/random.vim
+vim-scripts/Rename
+vim-scripts/ReplaceWithRegister
+vim-scripts/ShowMultiBase
+vim-scripts/tabmerge
+vim-scripts/taglist.vim
+vim-scripts/utl.vim
+vim-scripts/wombat256.vim
+vim-scripts/YankRing.vim
+vim-syntastic/syntastic
+vim-test/vim-test
+vim-utils/vim-husk
+Vimjas/vim-python-pep8-indent
+vimlab/split-term.vim
+vimoutliner/vimoutliner
+vimpostor/vim-tpipeline
+vimsence/vimsence
+vimwiki/vimwiki
+vito-c/jq.vim
+vmchale/ats-vim
+vmchale/dhall-vim
+vn-ki/coc-clap
+voldikss/vim-floaterm
+VundleVim/Vundle.vim
+w0ng/vim-hybrid
+wakatime/vim-wakatime
+wannesm/wmgraphviz.vim
+wbthomason/packer.nvim
+weirongxu/coc-explorer
+wellle/targets.vim
+wellle/tmux-complete.vim
+wfxr/minimap.vim
+whonore/Coqtail
+will133/vim-dirdiff
+wincent/command-t
+wincent/ferret
+windwp/nvim-autopairs
+wlangstroth/vim-racket
+wsdjeg/vim-fetch
+xavierd/clang_complete
+xolox/vim-easytags
+xolox/vim-misc
+xuhdev/vim-latex-live-preview
+Xuyuanp/nerdtree-git-plugin
+yamatsum/nvim-nonicons@main
+ycm-core/YouCompleteMe
+Yggdroot/indentLine
+Yilin-Yang/vim-markbar
+yuki-yano/ncm2-dictionary
+zah/nim.vim
+ziglang/zig.vim
diff --git a/nixpkgs/pkgs/misc/vim-plugins/vim-utils.nix b/nixpkgs/pkgs/misc/vim-plugins/vim-utils.nix
new file mode 100644
index 000000000000..fd66c48ecb2c
--- /dev/null
+++ b/nixpkgs/pkgs/misc/vim-plugins/vim-utils.nix
@@ -0,0 +1,536 @@
+{ lib, stdenv, vim, vimPlugins, vim_configurable, neovim, buildEnv, writeText, writeScriptBin
+, nix-prefetch-hg, nix-prefetch-git
+, fetchFromGitHub, runtimeShell
+}:
+
+/*
+
+USAGE EXAMPLE
+=============
+
+Install Vim like this eg using nixos option environment.systemPackages which will provide
+vim-with-plugins in PATH:
+
+  vim_configurable.customize {
+    name = "vim-with-plugins";
+
+    # add custom .vimrc lines like this:
+    vimrcConfig.customRC = ''
+      set hidden
+    '';
+
+    # store your plugins in Vim packages
+    vimrcConfig.packages.myVimPackage = with pkgs.vimPlugins; {
+      # loaded on launch
+      start = [ youcompleteme fugitive ];
+      # manually loadable by calling `:packadd $plugin-name`
+      opt = [ phpCompletion elm-vim ];
+      # To automatically load a plugin when opening a filetype, add vimrc lines like:
+      # autocmd FileType php :packadd phpCompletion
+    };
+
+    # plugins can also be managed by VAM
+    vimrcConfig.vam.knownPlugins = pkgs.vimPlugins; # optional
+    vimrcConfig.vam.pluginDictionaries = [
+      # load always
+      { name = "youcompleteme"; }
+      { names = ["youcompleteme" "foo"]; }
+
+      # only load when opening a .php file
+      { name = "phpCompletion"; ft_regex = "^php\$"; }
+      { name = "phpCompletion"; filename_regex = "^.php\$"; }
+
+      # provide plugin which can be loaded manually:
+      { name = "phpCompletion"; tag = "lazy"; }
+
+      # full documentation at github.com/MarcWeber/vim-addon-manager
+    ];
+
+    # there is a pathogen implementation as well, but its startup is slower and [VAM] has more feature
+    # vimrcConfig.pathogen.knownPlugins = vimPlugins; # optional
+    # vimrcConfig.pathogen.pluginNames = ["vim-addon-nix"];
+  };
+
+WHAT IS A VIM PLUGIN?
+=====================
+Typical plugin files:
+
+  plugin/P1.vim
+  autoload/P1.vim
+  ftplugin/xyz.vim
+  doc/plugin-documentation.txt (traditional documentation)
+  README(.md) (nowadays thanks to github)
+
+
+Vim offers the :h rtp setting which works for most plugins. Thus adding
+this to your .vimrc should make most plugins work:
+
+  set rtp+=~/.nix-profile/share/vim-plugins/youcompleteme
+  " or for p in ["youcompleteme"] | exec 'set rtp+=~/.nix-profile/share/vim-plugins/'.p | endfor
+
+which is what the [VAM]/pathogen solutions above basically do.
+
+Learn about about plugin Vim plugin mm managers at
+http://vim-wiki.mawercer.de/wiki/topic/vim%20plugin%20managment.html.
+
+The documentation can be accessed by Vim's :help command if it was tagged.
+See vimHelpTags sample code below.
+
+CONTRIBUTING AND CUSTOMIZING
+============================
+The example file pkgs/misc/vim-plugins/default.nix provides both:
+* manually mantained plugins
+* plugins created by VAM's nix#ExportPluginsForNix implementation
+
+I highly recommend to lookup vim plugin attribute names at the [vim-pi] project
+ which is a database containing all plugins from
+vim.org and quite a lot of found at github and similar sources. vim-pi's documented purpose
+is to associate vim.org script ids to human readable names so that dependencies
+can be describe easily.
+
+How to find a name?
+  * http://vam.mawercer.de/ or VAM's
+  * grep vim-pi
+  * use VAM's completion or :AddonsInfo command
+
+It might happen than a plugin is not known by vim-pi yet. We encourage you to
+contribute to vim-pi so that plugins can be updated automatically.
+
+
+CREATING DERVITATIONS AUTOMATICALLY BY PLUGIN NAME
+==================================================
+Most convenient is to use a ~/.vim-scripts file putting a plugin name into each line
+as documented by [VAM]'s README.md
+It is the same format you pass to vimrcConfig.vam.pluginDictionaries from the
+usage example above.
+
+Then create a temp vim file and insert:
+
+  let opts = {}
+  let opts.path_to_nixpkgs = '/etc/nixos/nixpkgs'
+  let opts.cache_file = '/tmp/export-vim-plugin-for-nix-cache-file'
+  let opts.plugin_dictionaries = map(readfile("vim-plugins"), 'eval(v:val)')
+  " add more files
+  " let opts.plugin_dictionaries += map(.. other file )
+  call nix#ExportPluginsForNix(opts)
+
+Then ":source %" it.
+
+nix#ExportPluginsForNix is provided by ./vim2nix
+
+A buffer will open containing the plugin derivation lines as well list
+fitting the vimrcConfig.vam.pluginDictionaries option.
+
+Thus the most simple usage would be:
+
+  vim_with_plugins =
+    let vim = vim_configurable;
+        inherit (vimUtil.override {inherit vim}) rtpPath addRtp buildVimPlugin vimHelpTags;
+        vimPlugins = [
+          # the derivation list from the buffer created by nix#ExportPluginsForNix
+          # don't set which will default to pkgs.vimPlugins
+        ];
+    in vim.customize {
+      name = "vim-with-plugins";
+
+      vimrcConfig.customRC = '' .. '';
+
+      vimrcConfig.vam.knownPlugins = vimPlugins;
+      vimrcConfig.vam.pluginDictionaries = [
+          # the plugin list form ~/.vim-scripts turned into nix format added to
+          # the buffer created by the nix#ExportPluginsForNix
+      ];
+    }
+
+vim_with_plugins can be installed like any other application within Nix.
+
+[VAM]    https://github.com/MarcWeber/vim-addon-manager
+[vim-pi] https://bitbucket.org/vimcommunity/vim-pi
+*/
+
+
+let
+  inherit lib;
+
+  # make sure a plugin is a derivation and its dependencies are derivations. If
+  # plugin already is a derivation, this is a no-op. If it is a string, it is
+  # looked up in knownPlugins.
+  pluginToDrv = knownPlugins: plugin:
+  let
+    drv =
+      if builtins.isString plugin then
+        # make sure `pname` is set to that we are able to convert the derivation
+        # back to a string.
+        ( knownPlugins.${plugin} // { pname = plugin; })
+      else
+        plugin;
+  in
+    # make sure all the dependencies of the plugin are also derivations
+    drv // { dependencies = map (pluginToDrv knownPlugins) (drv.dependencies or []); };
+
+  # transitive closure of plugin dependencies (plugin needs to be a derivation)
+  transitiveClosure = plugin:
+    [ plugin ] ++ (
+      lib.unique (builtins.concatLists (map transitiveClosure plugin.dependencies or []))
+    );
+
+  findDependenciesRecursively = plugins: lib.concatMap transitiveClosure plugins;
+
+  vamDictToNames = x:
+      if builtins.isString x then [x]
+      else (lib.optional (x ? name) x.name)
+            ++ (x.names or []);
+
+  rtpPath = "share/vim-plugins";
+
+  vimrcContent = {
+    packages ? null,
+    vam ? null,
+    pathogen ? null,
+    plug ? null,
+    beforePlugins ? "",
+    customRC ? ""
+  }:
+
+    let
+      /* pathogen mostly can set &rtp at startup time. Its used very commonly.
+      */
+      pathogenImpl = lib.optionalString (pathogen != null)
+      (let
+        knownPlugins = pathogen.knownPlugins or vimPlugins;
+
+        plugins = findDependenciesRecursively (map (pluginToDrv knownPlugins) pathogen.pluginNames);
+
+        pluginsEnv = buildEnv {
+          name = "pathogen-plugin-env";
+          paths = map (x: "${x}/${rtpPath}") plugins;
+        };
+      in
+      ''
+        let &rtp.=(empty(&rtp)?"":',')."${vimPlugins.pathogen.rtp}"
+        execute pathogen#infect('${pluginsEnv}/{}')
+
+        filetype indent plugin on | syn on
+      '');
+
+      /* vim-plug is an extremely popular vim plugin manager.
+      */
+      plugImpl = lib.optionalString (plug != null)
+      (''
+        source ${vimPlugins.vim-plug.rtp}/plug.vim
+        call plug#begin('/dev/null')
+
+        '' + (lib.concatMapStringsSep "\n" (pkg: "Plug '${pkg.rtp}'") plug.plugins) + ''
+
+        call plug#end()
+      '');
+
+      /*
+       vim-addon-manager = VAM
+
+       * maps names to plugin location
+
+       * manipulates &rtp at startup time
+         or when Vim has been running for a while
+
+       * can activate plugins laziy (eg when loading a specific filetype)
+
+       * knows about vim plugin dependencies (addon-info.json files)
+
+       * still is minimalistic (only loads one file), the "check out" code it also
+         has only gets loaded when a plugin is requested which is not found on disk
+         yet
+
+      */
+      vamImpl = lib.optionalString (vam != null)
+      (let
+        knownPlugins = vam.knownPlugins or vimPlugins;
+
+        # plugins specified by the user
+        specifiedPlugins = map (pluginToDrv knownPlugins) (lib.concatMap vamDictToNames vam.pluginDictionaries);
+        # plugins with dependencies
+        plugins = findDependenciesRecursively specifiedPlugins;
+
+        # Convert scalars, lists, and attrs, to VimL equivalents
+        toVimL = x:
+          if builtins.isString x then "'${lib.replaceStrings [ "\n" "'" ] [ "\n\\ " "''" ] x}'"
+          else if builtins.isAttrs x && builtins ? out then toVimL x # a derivation
+          else if builtins.isAttrs x then "{${lib.concatStringsSep ", " (lib.mapAttrsToList (n: v: "${toVimL n}: ${toVimL v}") x)}}"
+          else if builtins.isList x then "[${lib.concatMapStringsSep ", " toVimL x}]"
+          else if builtins.isInt x || builtins.isFloat x then builtins.toString x
+          else if builtins.isBool x then (if x then "1" else "0")
+          else throw "turning ${lib.generators.toPretty {} x} into a VimL thing not implemented yet";
+
+      in assert builtins.hasAttr "vim-addon-manager" knownPlugins;
+      ''
+        filetype indent plugin on | syn on
+
+        let g:nix_plugin_locations = {}
+        ${lib.concatMapStrings (plugin: ''
+          let g:nix_plugin_locations['${plugin.pname}'] = "${plugin.rtp}"
+        '') plugins}
+        let g:nix_plugin_locations['vim-addon-manager'] = "${knownPlugins.vim-addon-manager.rtp}"
+
+        let g:vim_addon_manager = {}
+
+        if exists('g:nix_plugin_locations')
+          " nix managed config
+
+          " override default function making VAM aware of plugin locations:
+          fun! NixPluginLocation(name)
+            let path = get(g:nix_plugin_locations, a:name, "")
+            return path == "" ? vam#DefaultPluginDirFromName(a:name) : path
+          endfun
+          let g:vim_addon_manager.plugin_dir_by_name = 'NixPluginLocation'
+          " tell Vim about VAM:
+          let &rtp.=(empty(&rtp)?"":','). g:nix_plugin_locations['vim-addon-manager']
+        else
+          " standalone config
+
+          let &rtp.=(empty(&rtp)?"":',').c.plugin_root_dir.'/vim-addon-manager'
+          if !isdirectory(c.plugin_root_dir.'/vim-addon-manager/autoload')
+            " checkout VAM
+            execute '!git clone --depth=1 https://github.com/MarcWeber/vim-addon-manager '
+                \       shellescape(c.plugin_root_dir.'/vim-addon-manager', 1)
+          endif
+        endif
+
+        " tell vam which plugins to load, and when:
+        let l = []
+        ${lib.concatMapStrings (p: "call add(l, ${toVimL p})\n") vam.pluginDictionaries}
+        call vam#Scripts(l, {})
+      '');
+
+      nativeImpl = lib.optionalString (packages != null)
+      (let
+        link = (packageName: dir: pluginPath: "ln -sf ${pluginPath}/share/vim-plugins/* $out/pack/${packageName}/${dir}");
+        packageLinks = (packageName: {start ? [], opt ? []}:
+        let
+          # `nativeImpl` expects packages to be derivations, not strings (as
+          # opposed to older implementations that have to maintain backwards
+          # compatibility). Therefore we don't need to deal with "knownPlugins"
+          # and can simply pass `null`.
+          depsOfOptionalPlugins = lib.subtractLists opt (findDependenciesRecursively opt);
+          startWithDeps = findDependenciesRecursively start;
+        in
+          ["mkdir -p $out/pack/${packageName}/start"]
+          # To avoid confusion, even dependencies of optional plugins are added
+          # to `start` (except if they are explicitly listed as optional plugins).
+          ++ (builtins.map (link packageName "start") (lib.unique (startWithDeps ++ depsOfOptionalPlugins)))
+          ++ ["mkdir -p $out/pack/${packageName}/opt"]
+          ++ (builtins.map (link packageName "opt") opt)
+        );
+        packDir = (packages:
+          stdenv.mkDerivation {
+            name = "vim-pack-dir";
+            src = ./.;
+            installPhase = lib.concatStringsSep
+                             "\n"
+                             (lib.flatten (lib.mapAttrsToList packageLinks packages));
+            preferLocalBuild = true;
+          }
+        );
+      in
+      ''
+        set packpath^=${packDir packages}
+        set runtimepath^=${packDir packages}
+
+        filetype indent plugin on | syn on
+      '');
+
+  in ''
+  " configuration generated by NIX
+  set nocompatible
+
+  ${beforePlugins}
+
+  ${vamImpl}
+  ${pathogenImpl}
+  ${plugImpl}
+  ${nativeImpl}
+
+  ${customRC}
+  '';
+  vimrcFile = settings: writeText "vimrc" (vimrcContent settings);
+
+in
+
+rec {
+  inherit vimrcFile;
+  inherit vimrcContent;
+
+  # shell script with custom name passing [-u vimrc] [-U gvimrc] to vim
+  vimWithRC = {
+    vimExecutable,
+    gvimExecutable,
+    vimManPages,
+    wrapManual,
+    wrapGui,
+    name ? "vim",
+    vimrcFile ? null,
+    gvimrcFile ? null,
+    vimExecutableName,
+    gvimExecutableName,
+  }:
+    let
+      rcOption = o: file: lib.optionalString (file != null) "-${o} ${file}";
+      vimWrapperScript = writeScriptBin vimExecutableName ''
+        #!${runtimeShell}
+        exec ${vimExecutable} ${rcOption "u" vimrcFile} ${rcOption "U" gvimrcFile} "$@"
+      '';
+      gvimWrapperScript = writeScriptBin gvimExecutableName ''
+        #!${stdenv.shell}
+        exec ${gvimExecutable} ${rcOption "u" vimrcFile} ${rcOption "U" gvimrcFile} "$@"
+      '';
+    in
+      buildEnv {
+        inherit name;
+        paths = [
+          vimWrapperScript
+        ] ++ lib.optional wrapGui gvimWrapperScript
+          ++ lib.optional wrapManual vimManPages
+        ;
+      };
+
+  # add a customize option to a vim derivation
+  makeCustomizable = vim: vim // {
+    customize = {
+      name,
+      vimrcConfig,
+      wrapManual ? true,
+      wrapGui ? false,
+      vimExecutableName ? name,
+      gvimExecutableName ? (lib.concatStrings [ "g" name ]),
+    }: vimWithRC {
+      vimExecutable = "${vim}/bin/vim";
+      gvimExecutable = "${vim}/bin/gvim";
+      inherit name wrapManual wrapGui vimExecutableName gvimExecutableName;
+      vimrcFile = vimrcFile vimrcConfig;
+      vimManPages = buildEnv {
+        name = "vim-doc";
+        paths = [ vim ];
+        pathsToLink = [ "/share/man" ];
+      };
+    };
+
+    override = f: makeCustomizable (vim.override f);
+    overrideAttrs = f: makeCustomizable (vim.overrideAttrs f);
+  };
+
+  pluginnames2Nix = {name, namefiles} : vim_configurable.customize {
+    inherit name;
+    vimrcConfig.vam.knownPlugins = vimPlugins;
+    vimrcConfig.vam.pluginDictionaries = ["vim2nix"];
+    vimrcConfig.customRC = ''
+      " Yes - this is impure and will create the cache file and checkout vim-pi
+      " into ~/.vim/vim-addons
+      let g:vim_addon_manager.plugin_root_dir = "/tmp/vim2nix-".$USER
+      if !isdirectory(g:vim_addon_manager.plugin_root_dir)
+        call mkdir(g:vim_addon_manager.plugin_root_dir)
+      else
+        echom repeat("=", 80)
+        echom "WARNING: reusing cache directory :".g:vim_addon_manager.plugin_root_dir
+        echom repeat("=", 80)
+      endif
+      let opts = {}
+      let opts.nix_prefetch_git = "${nix-prefetch-git}/bin/nix-prefetch-git"
+      let opts.nix_prefetch_hg  = "${nix-prefetch-hg}/bin/nix-prefetch-hg"
+      let opts.cache_file = g:vim_addon_manager.plugin_root_dir.'/cache'
+      let opts.plugin_dictionaries = []
+      ${lib.concatMapStrings (file: "let opts.plugin_dictionaries += map(readfile(\"${file}\"), 'eval(v:val)')\n") namefiles }
+
+      " uncomment for debugging failures
+      " let opts.try_catch = 0
+
+      " add more files
+      " let opts.plugin_dictionaries += map(.. other file )
+      call nix#ExportPluginsForNix(opts)
+    '';
+  };
+
+  vim_with_vim2nix = vim_configurable.customize { name = "vim"; vimrcConfig.vam.pluginDictionaries = [ "vim-addon-vim2nix" ]; };
+
+  inherit (import ./build-vim-plugin.nix { inherit lib stdenv rtpPath vim; }) buildVimPlugin buildVimPluginFrom2Nix;
+
+  # used to figure out which python dependencies etc. neovim needs
+  requiredPlugins = {
+    packages ? {},
+    givenKnownPlugins ? null,
+    vam ? null,
+    pathogen ? null,
+    plug ? null, ...
+  }:
+    let
+      # This is probably overcomplicated, but I don't understand this well enough to know what's necessary.
+      knownPlugins = if givenKnownPlugins != null then givenKnownPlugins else
+                     if vam != null && vam ? knownPlugins then vam.knownPlugins else
+                     if pathogen != null && pathogen ? knownPlugins then pathogen.knownPlugins else
+                     vimPlugins;
+      pathogenPlugins = findDependenciesRecursively (map (pluginToDrv knownPlugins) pathogen.pluginNames);
+      vamPlugins = findDependenciesRecursively (map (pluginToDrv knownPlugins) (lib.concatMap vamDictToNames vam.pluginDictionaries));
+      nonNativePlugins = (lib.optionals (pathogen != null) pathogenPlugins)
+                      ++ (lib.optionals (vam != null) vamPlugins)
+                      ++ (lib.optionals (plug != null) plug.plugins);
+      nativePluginsConfigs = lib.attrsets.attrValues packages;
+      nativePlugins = lib.concatMap ({start?[], opt?[], knownPlugins?vimPlugins}: start++opt) nativePluginsConfigs;
+    in
+      nativePlugins ++ nonNativePlugins;
+
+
+  # test cases:
+  test_vim_with_vim_nix_using_vam = vim_configurable.customize {
+   name = "vim-with-vim-addon-nix-using-vam";
+    vimrcConfig.vam.pluginDictionaries = [{name = "vim-nix"; }];
+  };
+
+  test_vim_with_vim_nix_using_pathogen = vim_configurable.customize {
+    name = "vim-with-vim-addon-nix-using-pathogen";
+    vimrcConfig.pathogen.pluginNames = [ "vim-nix" ];
+  };
+
+  test_vim_with_vim_nix_using_plug = vim_configurable.customize {
+    name = "vim-with-vim-addon-nix-using-plug";
+    vimrcConfig.plug.plugins = with vimPlugins; [ vim-nix ];
+  };
+
+  test_vim_with_vim_nix = vim_configurable.customize {
+    name = "vim-with-vim-addon-nix";
+    vimrcConfig.packages.myVimPackage.start = with vimPlugins; [ vim-nix ];
+  };
+
+  # only neovim makes use of `requiredPlugins`, test this here
+  test_nvim_with_vim_nix_using_pathogen = neovim.override {
+    configure.pathogen.pluginNames = [ "vim-nix" ];
+  };
+
+  # regression test for https://github.com/NixOS/nixpkgs/issues/53112
+  # The user may have specified their own plugins which may not be formatted
+  # exactly as the generated ones. In particular, they may not have the `pname`
+  # attribute.
+  test_vim_with_custom_plugin = vim_configurable.customize {
+    name = "vim_with_custom_plugin";
+    vimrcConfig.vam.knownPlugins =
+      vimPlugins // ({
+        vim-trailing-whitespace = buildVimPluginFrom2Nix {
+          name = "vim-trailing-whitespace";
+          src = fetchFromGitHub {
+            owner = "bronson";
+            repo = "vim-trailing-whitespace";
+            rev = "4c596548216b7c19971f8fc94e38ef1a2b55fee6";
+            sha256 = "0f1cpnp1nxb4i5hgymjn2yn3k1jwkqmlgw1g02sq270lavp2dzs9";
+          };
+          # make sure string dependencies are handled
+          dependencies = [ "vim-nix" ];
+        };
+      });
+    vimrcConfig.vam.pluginDictionaries = [ { names = [ "vim-trailing-whitespace" ]; } ];
+  };
+
+  # system remote plugin manifest should be generated, deoplete should be usable
+  # without the user having to do `UpdateRemotePlugins`. To test, launch neovim
+  # and do `:call deoplete#enable()`. It will print an error if the remote
+  # plugin is not registered.
+  test_nvim_with_remote_plugin = neovim.override {
+    configure.pathogen.pluginNames = with vimPlugins; [ deoplete-nvim ];
+  };
+}
diff --git a/nixpkgs/pkgs/misc/vim-plugins/vim2nix/README.txt b/nixpkgs/pkgs/misc/vim-plugins/vim2nix/README.txt
new file mode 100644
index 000000000000..4263481461f1
--- /dev/null
+++ b/nixpkgs/pkgs/misc/vim-plugins/vim2nix/README.txt
@@ -0,0 +1,3 @@
+Usage see vim-utils.nix in nixpkgs
+
+This code depends on vim-addon-manager
diff --git a/nixpkgs/pkgs/misc/vim-plugins/vim2nix/addon-info.json b/nixpkgs/pkgs/misc/vim-plugins/vim2nix/addon-info.json
new file mode 100644
index 000000000000..93ca9bc129b5
--- /dev/null
+++ b/nixpkgs/pkgs/misc/vim-plugins/vim2nix/addon-info.json
@@ -0,0 +1 @@
+{'dependencies': {'vim-addon-manager': {}}}
diff --git a/nixpkgs/pkgs/misc/vim-plugins/vim2nix/autoload/nix.vim b/nixpkgs/pkgs/misc/vim-plugins/vim2nix/autoload/nix.vim
new file mode 100644
index 000000000000..0ddbeaae6be1
--- /dev/null
+++ b/nixpkgs/pkgs/misc/vim-plugins/vim2nix/autoload/nix.vim
@@ -0,0 +1,307 @@
+" usage example:
+"
+" call nix#ExportPluginsForNix({'path_to_nixpkgs': '/etc/nixos/nixpkgs', 'names': ["vim-addon-manager", "vim-addon-nix"], 'cache_file': 'cache'})
+let s:plugin_root = expand('<sfile>:h:h')
+
+fun! nix#ToNixAttrName(s) abort
+    return nix#ToNixName(a:s)
+endf
+
+fun! nix#ToNixName(s) abort
+  return substitute(substitute(a:s, '[:/.]', '-', 'g'), 'github-', '', 'g')
+endf
+
+fun! s:System(...)
+  let args = a:000
+  let r = call('vam#utils#System', args)
+  if r is 0
+    throw "command ".join(args, '').' failed'
+  else
+    return r
+  endif
+endf
+
+fun! nix#DependenciesFromCheckout(opts, name, repository, dir)
+  " check for dependencies
+  " vam#PluginDirFromName(a:name)
+  let info = vam#ReadAddonInfo(vam#AddonInfoFile(a:dir, a:name))
+  return keys(get(info, 'dependencies', {}))
+endf
+
+
+" without deps
+fun! nix#NixDerivation(opts, name, repository) abort
+  let n_a_name = nix#ToNixAttrName(a:name)
+  let n_n_name = nix#ToNixName(a:name)
+  let type = get(a:repository, 'type', '')
+  let created_notice = " # created by nix#NixDerivation"
+
+  let ancf = s:plugin_root.'/additional-nix-code/'.a:name
+  let additional_nix_code = file_readable(ancf) ? join(readfile(ancf), "\n") : ""
+
+  if type == 'git'
+    " should be using shell abstraction ..
+    echo 'fetching '. a:repository.url
+    let s = s:System('$ --fetch-submodules $ 2>&1',a:opts.nix_prefetch_git, a:repository.url)
+    let rev = matchstr(s, 'git revision is \zs[^\n\r]\+\ze')
+    let sha256 = matchstr(s, 'hash is \zs[^\n\r]\+\ze')
+    let dir = matchstr(s, 'path is \zs[^\n\r]\+\ze')
+    let date = matchstr(s, 'Commit date is \zs[0-9-]\+\ze')
+
+    let dependencies = nix#DependenciesFromCheckout(a:opts, a:name, a:repository, dir)
+    return {'n_a_name': n_a_name, 'n_n_name': n_n_name, 'dependencies': dependencies, 'derivation': join([
+          \ '  '.n_a_name.' = buildVimPluginFrom2Nix {'.created_notice,
+          \ '    name = "'.n_n_name.'-'.date.'";',
+          \ '    src = fetchgit {',
+          \ '      url = "'. a:repository.url .'";',
+          \ '      rev = "'.rev.'";',
+          \ '      sha256 = "'.sha256.'";',
+          \ '    };',
+          \ '    dependencies = ['.join(map(copy(dependencies), "'\"'.nix#ToNixAttrName(v:val).'\"'")).'];',
+          \ additional_nix_code,
+          \ '  };',
+          \ '',
+          \ '',
+          \ ], "\n")}
+
+  elseif type == 'hg'
+    " should be using shell abstraction ..
+    echo 'fetching '. a:repository.url
+    let s = s:System('$ $ 2>&1',a:opts.nix_prefetch_hg, a:repository.url)
+    let rev = matchstr(s, 'hg revision is \zs[^\n\r]\+\ze')
+    let sha256 = matchstr(s, 'hash is \zs[^\n\r]\+\ze')
+    let dir = matchstr(s, 'path is \zs[^\n\r]\+\ze')
+
+    let dependencies = nix#DependenciesFromCheckout(a:opts, a:name, a:repository, dir)
+    return {'n_a_name': n_a_name, 'n_n_name': n_n_name, 'dependencies': dependencies, 'derivation':  join([
+          \ '  '.n_a_name.' = buildVimPluginFrom2Nix {'.created_notice,
+          \ '    name = "'.n_n_name.'";',
+          \ '    src = fetchhg {',
+          \ '      url = "'. a:repository.url .'";',
+          \ '      rev = "'.rev.'";',
+          \ '      sha256 = "'.sha256.'";',
+          \ '    };',
+          \ '    dependencies = ['.join(map(copy(dependencies), "'\"'.nix#ToNixAttrName(v:val).'\"'")).'];',
+          \ additional_nix_code,
+          \ '  };',
+          \ '',
+          \ '',
+          \ ], "\n")}
+
+  elseif type == 'archive'
+    let sha256 = split(s:System('nix-prefetch-url $ 2>/dev/null', a:repository.url), "\n")[0]
+    " we should unpack the sources, look for the addon-info.json file ..
+    " however most packages who have the addon-info.json file also are on
+    " github thus will be of type "git" instead. The dependency information
+    " from vim-pi is encoded in the reposiotry. Thus this is likely to do the
+    " right thing most of the time.
+    let addon_info = get(a:repository, 'addon-info', {})
+    let dependencies = keys(get(addon_info, 'dependencies', {}))
+
+    return {'n_a_name': n_a_name, 'n_n_name': n_n_name, 'dependencies': dependencies, 'derivation':  join([
+          \ '  '.n_a_name.' = buildVimPluginFrom2Nix {'.created_notice,
+          \ '    name = "'.n_n_name.'";',
+          \ '    src = fetchurl {',
+          \ '      url = "'. a:repository.url .'";',
+          \ '      name = "'. a:repository.archive_name .'";',
+          \ '      sha256 = "'.sha256.'";',
+          \ '    };',
+          \ '    buildInputs = [ unzip ];',
+          \ '    dependencies = ['.join(map(copy(dependencies), "'\"'.nix#ToNixAttrName(v:val).'\"'")).'];',
+          \ '    meta = {',
+          \ '       homepage = "http://www.vim.org/scripts/script.php?script_id='.a:repository.vim_script_nr.'";',
+          \ '    };',
+          \ addon_info == {} ? '' : ('    addon_info = '.nix#ToNix(string(addon_info), [], "").';'),
+          \ additional_nix_code,
+          \ '  };',
+          \ '',
+          \ '',
+          \ ], "\n")}
+  else
+    throw a:name.' TODO: implement source '.string(a:repository)
+  endif
+endf
+
+" also tries to handle dependencies
+fun! nix#AddNixDerivation(opts, cache, name, ...) abort
+  if has_key(a:cache, a:name) | return | endif
+  let repository = a:0 > 0 ? a:1 : {}
+  let name = a:name
+
+  if repository == {}
+    call vam#install#LoadPool()
+    let list = matchlist(a:name, 'github:\([^/]*\)\%(\/\(.*\)\)\?$')
+    if len(list) > 0
+      if '' != list[2]
+        let name = list[2]
+        let repository = { 'type': 'git', 'owner': list[1], 'repo': list[2], 'url': 'https://github.com/'.list[1].'/'.list[2] }
+      else
+        let name = list[1]
+        let repository = { 'type': 'git', 'owner': list[1], 'repo': 'vim-addon-'.list[1], 'url': 'https://github.com/'.list[1].'/vim-addon-'.list[1] }
+      endif
+    else
+      let repository = get(g:vim_addon_manager.plugin_sources, a:name, {})
+      if repository == {}
+        throw "repository ".a:name." unkown!"
+      else
+          if repository.url =~ 'github'
+            let owner = matchstr(repository.url, 'github.com/\zs.\+\ze/')
+            let repo = matchstr(repository.url, '\/\zs[^\/]\+\ze$')
+            let url = repository.url
+            let repository = { 'type': 'git', 'owner': owner, 'repo': repo, 'url': url }
+          endif
+      endif
+    endif
+  endif
+
+  let a:cache[a:name] = nix#NixDerivation(a:opts, name, repository)
+
+  " take known dependencies into account:
+  let deps = get(a:cache[a:name], 'dependencies', [])
+  call extend(a:opts.names_to_process, deps)
+  call extend(a:opts.names_to_export,  deps)
+endfun
+
+fun! nix#TopNixOptsByParent(parents)
+  if (a:parents == [])
+    return {'ind': '  ', 'next_ind': '    ', 'sep': "\n"}
+  else
+    return {'ind': '', 'next_ind': '', 'sep': ' '}
+  endif
+endf
+
+fun! nix#ToNix(x, parents, opts_fun) abort
+  let opts = a:opts_fun == "" ? "" : call(a:opts_fun, [a:parents])
+  let next_parents = [a:x] + a:parents
+  let seps = a:0 > 1 ? a:2 : []
+
+  let ind = get(opts, 'ind', '')
+  let next_ind = get(opts, 'next_ind', ind.'  ')
+  let sep = get(opts, 'sep', ind.'  ')
+
+  if type(a:x) == type("")
+    return "''". substitute(a:x, '[$]', '$$', 'g')."''"
+  elseif type(a:x) == type({})
+    let s = ind."{".sep
+    for [k,v] in items(a:x)
+      let s .= '"'.k.'" = '.nix#ToNix(v, next_parents, a:opts_fun).";".sep
+      unlet k v
+    endfor
+    return  s.ind."}"
+
+    " let s = ind."{\n"
+    " for [k,v] in items(a:x)
+    "   let s .= next_ind . nix#ToNix(k).' = '.nix#ToNix(v, next_ind)."\n"
+    "   unlet k v
+    " endfor
+    " return  s.ind."}\n"
+  elseif type(a:x) == type([])
+    let s = ind."[".sep
+    for v in a:x
+      let s .= next_ind . nix#ToNix(v, next_parents, a:opts_fun)."".sep
+      unlet v
+    endfor
+    return s.ind."]"
+  endif
+endf
+
+
+" with dependencies
+" opts.cache_file (caches the checkout and dependency information
+" opts.path_to_nixpkgs or  opts.nix_prefetch_{git,hg}
+" opts.plugin_dictionaries: list of any
+"     - string
+"     - dictionary having key name or names
+" This is so that plugin script files can be loaded/ merged
+fun! nix#ExportPluginsForNix(opts) abort
+  let cache_file = get(a:opts, 'cache_file', '')
+
+  let opts = a:opts
+
+  " set nix_prefetch_* scripts
+  for scm in ['git', 'hg']
+    if !has_key(opts, 'nix_prefetch_'.scm)
+      let opts['nix_prefetch_'.scm] = a:opts.path_to_nixpkgs.'/pkgs/build-support/fetch'.scm.'/nix-prefetch-'.scm
+    endif
+  endfor
+
+  " create list of names from dictionaries
+  let a:opts.names_to_process = []
+  for x in a:opts.plugin_dictionaries
+    if type(x) == type('')
+      call add(opts.names_to_process, x)
+    elseif type(x) == type({}) && has_key(x, 'name')
+      call add(opts.names_to_process, x.name)
+    elseif type(x) == type({}) && has_key(x, 'names')
+      call extend(opts.names_to_process, x.names)
+    else
+      throw "unexpected"
+    endif
+    unlet x
+  endfor
+  let a:opts.names_to_export = a:opts.names_to_process
+
+  let cache = (cache_file == '' || !filereadable(cache_file)) ? {} : eval(readfile(cache_file)[0])
+  let failed = {}
+  while len(opts.names_to_process) > 0
+    let name = opts.names_to_process[0]
+    if get(opts, 'try_catch', 1)
+      try
+        call nix#AddNixDerivation(opts, cache, name)
+      catch /.*/
+        echom 'failed : '.name.' '.v:exception
+        let failed[name] = v:exception
+      endtry
+    else
+      call nix#AddNixDerivation(opts, cache, name)
+    endif
+    let opts.names_to_process = opts.names_to_process[1:]
+  endwhile
+  echom join(keys(failed), ", ")
+  echom string(failed)
+
+  if cache_file != ''
+    call writefile([string(cache)], cache_file)
+  endif
+
+  enew
+
+  let uniq = {}
+  for x in a:opts.names_to_export
+    let uniq[x] = 1
+  endfor
+
+  for k in sort(keys(uniq))
+    call append('$', split(cache[k].derivation,"\n"))
+  endfor
+
+  " for VAM users output vam.pluginDictionaries which can be fed to
+  " vim_customizable.customize.vimrc.vam.pluginDictionaries
+  call append('$', ["", "", "", '# vam.pluginDictionaries'])
+
+  let ns = []
+  for x in a:opts.plugin_dictionaries
+    if type(x) == type("")
+      call add(ns, nix#ToNixAttrName(x))
+    elseif type(x) == type({})
+      if has_key(x, 'name')
+        call add(ns, extend({'name': nix#ToNixAttrName(x.name)}, x, "keep"))
+      elseif has_key(x, 'names')
+        call add(ns, extend({'names': map(copy(x.names), 'nix#ToNixAttrName(v:val)')}, x, "keep"))
+      else
+        throw "unexpected"
+      endif
+    else
+      throw "unexpected"
+    endif
+    unlet x
+  endfor
+
+  call append('$', split(nix#ToNix(ns, [], 'nix#TopNixOptsByParent'), "\n"))
+
+  " failures:
+  for [k,v] in items(failed)
+    call append('$', ['# '.k.', failure: '.v])
+    unlet k v
+  endfor
+endf
diff --git a/nixpkgs/pkgs/misc/vscode-extensions/cpptools/default.nix b/nixpkgs/pkgs/misc/vscode-extensions/cpptools/default.nix
new file mode 100644
index 000000000000..188da860530a
--- /dev/null
+++ b/nixpkgs/pkgs/misc/vscode-extensions/cpptools/default.nix
@@ -0,0 +1,102 @@
+{ lib, vscode-utils
+, fetchurl, unzip
+, mono, writeScript, runtimeShell
+, jq, clang-tools
+, gdbUseFixed ? true, gdb # The gdb default setting will be fixed to specified. Use version from `PATH` otherwise.
+}:
+
+assert gdbUseFixed -> null != gdb;
+
+/*
+  Note that this version of the extension still has some nix specific issues
+  which could not be fixed merely by patching (inside a C# dll).
+
+  In particular, the debugger requires either gnome-terminal or xterm. However
+  instead of looking for the terminal executable in `PATH`, for any linux platform
+  the dll uses an hardcoded path to one of these.
+
+  So, in order for debugging to work properly, you merely need to create symlinks
+  to one of these terminals at the appropriate location.
+
+  The good news is the the utility library is open source and with some effort
+  we could build a patched version ourselves. See:
+
+  <https://github.com/Microsoft/MIEngine/blob/2885386dc7f35e0f1e44827269341e786361f28e/src/MICore/TerminalLauncher.cs#L156>
+
+  Also, the extension should eventually no longer require an external terminal. See:
+
+  <https://github.com/Microsoft/vscode-cpptools/issues/35>
+
+  Once the symbolic link temporary solution taken, everything shoud run smootly.
+*/
+
+let
+  gdbDefaultsTo = if gdbUseFixed then "${gdb}/bin/gdb" else "gdb";
+
+
+  openDebugAD7Script = writeScript "OpenDebugAD7" ''
+    #!${runtimeShell}
+    BIN_DIR="$(cd "$(dirname "$0")" && pwd -P)"
+    ${if gdbUseFixed
+        then ''
+          export PATH=''${PATH}''${PATH:+:}${gdb}/bin
+        ''
+        else ""}
+    ${mono}/bin/mono $BIN_DIR/bin/OpenDebugAD7.exe $*
+  '';
+in
+
+vscode-utils.buildVscodeMarketplaceExtension rec {
+  mktplcRef = {
+    name = "cpptools";
+    publisher = "ms-vscode";
+    version = "1.0.1";
+  };
+
+  vsix = fetchurl {
+    name = "${mktplcRef.publisher}-${mktplcRef.name}.zip";
+    url = "https://github.com/microsoft/vscode-cpptools/releases/download/${mktplcRef.version}/cpptools-linux.vsix";
+    sha256 = "1lb5pza2ny1ydan19596amabs1np10nq08yqsfbvvfw7zbg4gnyc";
+  };
+
+  buildInputs = [
+    jq
+  ];
+
+  postPatch = ''
+    mv ./package.json ./package_orig.json
+
+    # 1. Add activation events so that the extension is functional. This listing is empty when unpacking the extension but is filled at runtime.
+    # 2. Patch `package.json` so that nix's *gdb* is used as default value for `miDebuggerPath`.
+    cat ./package_orig.json | \
+      jq --slurpfile actEvts ${./package-activation-events.json} '(.activationEvents) = $actEvts[0]' | \
+      jq '(.contributes.debuggers[].configurationAttributes | .attach , .launch | .properties.miDebuggerPath | select(. != null) | select(.default == "/usr/bin/gdb") | .default) = "${gdbDefaultsTo}"' > \
+      ./package.json
+
+    # Prevent download/install of extensions
+    touch "./install.lock"
+
+    # Mono runtimes from nix package (used by generated `OpenDebugAD7`).
+    mv ./debugAdapters/OpenDebugAD7 ./debugAdapters/OpenDebugAD7_orig
+    cp -p "${openDebugAD7Script}" "./debugAdapters/OpenDebugAD7"
+
+    # Clang-format from nix package.
+    mv  ./LLVM/ ./LLVM_orig
+    mkdir "./LLVM/"
+    find "${clang-tools}" -mindepth 1 -maxdepth 1 | xargs ln -s -t "./LLVM"
+
+    # Patching  cpptools and cpptools-srv
+    elfInterpreter="$(cat $NIX_CC/nix-support/dynamic-linker)"
+    patchelf --set-interpreter "$elfInterpreter" ./bin/cpptools
+    patchelf --set-interpreter "$elfInterpreter" ./bin/cpptools-srv
+    chmod a+x ./bin/cpptools{-srv,}
+  '';
+
+    meta = with lib; {
+      license = licenses.unfree;
+      maintainers = [ maintainers.jraygauthier ];
+      # A 32 bit linux would also be possible with some effort (specific download of binaries +
+      # patching of the elf files with 32 bit interpreter).
+      platforms = [ "x86_64-linux" ];
+    };
+}
diff --git a/nixpkgs/pkgs/misc/vscode-extensions/cpptools/missing_elf_deps.sh b/nixpkgs/pkgs/misc/vscode-extensions/cpptools/missing_elf_deps.sh
new file mode 100755
index 000000000000..f5eb08d78a5d
--- /dev/null
+++ b/nixpkgs/pkgs/misc/vscode-extensions/cpptools/missing_elf_deps.sh
@@ -0,0 +1,52 @@
+#!/usr/bin/env nix-shell
+#! nix-shell -p coreutils -i bash
+
+scriptDir=$(cd "`dirname "$0"`"; pwd)
+echo "scriptDir='$scriptDir'"
+
+function get_pkg_out() {
+  local pkg="$1"
+  local suffix="${2:-}"
+  local nixExp="with (import <nixpkgs> {}); ${pkg}"
+  echo "$(nix-build -E "$nixExp" --no-out-link)${suffix}"
+}
+
+interpreter="$(get_pkg_out "stdenv.glibc" "/lib/ld-linux-x86-64.so.2")"
+echo "interpreter='$interpreter'"
+
+# For clangformat dep on 'libtinfo.so.5'.
+ncursesLibDir="$(get_pkg_out "ncurses5.out" "/lib")"
+echo "ncursesLibDir='$ncursesLibDir'"
+
+# For clanformat dep on 'libstdc++.so.6'.
+stdcppLibDir="$(get_pkg_out "stdenv.cc.cc.lib" "/lib")"
+echo "stdcppLibDir='$stdcppLibDir'"
+
+# For clangformat dep on 'libz.so.1'.
+zlibLibDir="$(get_pkg_out "zlib.out" "/lib")"
+echo "zlibLibDir='$zlibLibDir'"
+
+function patchelf_mono() {
+  local exe="$1"
+  patchelf --set-interpreter "$interpreter" "$exe"
+}
+
+function patchelf_clangformat() {
+  local exe="$1"
+  patchelf --set-interpreter "$interpreter" "$exe"
+  local rpath="$ncursesLibDir:$stdcppLibDir:$zlibLibDir"
+  patchelf --set-rpath "$rpath" "$exe"
+}
+
+function print_nix_version_clangtools() {
+  nixClangToolsBin="$(get_pkg_out "clang-tools" "/bin")"
+  echo "nixClangToolsBin='$nixClangToolsBin'"
+  $nixClangToolsBin/clang-format --version
+}
+
+function print_nix_version_mono() {
+  nixMonoBin="$(get_pkg_out "mono" "/bin")"
+  echo "nixMonoBin='$nixMonoBin'"
+  $nixMonoBin/mono --version
+}
+
diff --git a/nixpkgs/pkgs/misc/vscode-extensions/cpptools/package-activation-events.json b/nixpkgs/pkgs/misc/vscode-extensions/cpptools/package-activation-events.json
new file mode 100644
index 000000000000..c2d8a10f340a
--- /dev/null
+++ b/nixpkgs/pkgs/misc/vscode-extensions/cpptools/package-activation-events.json
@@ -0,0 +1,25 @@
+[
+  "onLanguage:cpp",
+  "onLanguage:c",
+  "onCommand:extension.pickNativeProcess",
+  "onCommand:extension.pickRemoteNativeProcess",
+  "onCommand:C_Cpp.ConfigurationEdit",
+  "onCommand:C_Cpp.ConfigurationSelect",
+  "onCommand:C_Cpp.ConfigurationProviderSelect",
+  "onCommand:C_Cpp.SwitchHeaderSource",
+  "onCommand:C_Cpp.Navigate",
+  "onCommand:C_Cpp.GoToDeclaration",
+  "onCommand:C_Cpp.PeekDeclaration",
+  "onCommand:C_Cpp.ToggleErrorSquiggles",
+  "onCommand:C_Cpp.ToggleIncludeFallback",
+  "onCommand:C_Cpp.ToggleDimInactiveRegions",
+  "onCommand:C_Cpp.ToggleSnippets",
+  "onCommand:C_Cpp.ShowReleaseNotes",
+  "onCommand:C_Cpp.ResetDatabase",
+  "onCommand:C_Cpp.PauseParsing",
+  "onCommand:C_Cpp.ResumeParsing",
+  "onCommand:C_Cpp.ShowParsingCommands",
+  "onCommand:C_Cpp.TakeSurvey",
+  "onDebug",
+  "workspaceContains:/.vscode/c_cpp_properties.json"
+]
diff --git a/nixpkgs/pkgs/misc/vscode-extensions/cpptools/update_helper.sh b/nixpkgs/pkgs/misc/vscode-extensions/cpptools/update_helper.sh
new file mode 100755
index 000000000000..00ef77553242
--- /dev/null
+++ b/nixpkgs/pkgs/misc/vscode-extensions/cpptools/update_helper.sh
@@ -0,0 +1,168 @@
+#!/usr/bin/env nix-shell
+#! nix-shell -p coreutils -p jq -p unzip -i bash
+set -euo pipefail
+
+#
+# A little script to help maintaining this package. It will:
+#
+#  -  download the specified version of the extension to the store and print its url, packed store path and hash
+#  -  unpack the extension, bring it to the store and print its store path and hash
+#  -  fetch its runtimes dependencies from the 'package.json' file using the 'jq' utility, unpack those to the store
+#     and print its url store path and hash
+#  -  patch elf of the binaries that got a nix replacement
+#  -  bring the patched version to the store
+#  -  run their '--version' and call 'ldd'
+#  -  print the version of the runtime deps nix replacements.
+#
+# TODO: Print to a properly formated nix file all the required information to fetch everything (extension + runtime deps).
+# TODO: Print x86 and maybe darwin runtime dependencies.
+#
+
+scriptDir=$(cd "`dirname "$0"`"; pwd)
+echo "scriptDir='$scriptDir'"
+
+extPublisher="vscode"
+extName="cpptools"
+defaultExtVersion="0.16.1"
+extVersion="${1:-$defaultExtVersion}"
+
+echo
+echo "------------- Downloading extension ---------------"
+
+extZipStoreName="${extPublisher}-${extName}.zip"
+extUrl="https://ms-vscode.gallery.vsassets.io/_apis/public/gallery/publisher/ms-vscode/extension/cpptools/${extVersion}/assetbyname/Microsoft.VisualStudio.Services.VSIXPackage"
+echo "extUrl='$extUrl'"
+storePathWithSha=$(nix-prefetch-url --name "$extZipStoreName" --print-path "$extUrl" 2> /dev/null)
+
+cpptoolsZipStorePath="$(echo "$storePathWithSha" | tail -n1)"
+cpptoolsZipSha256="$(echo "$storePathWithSha" | head -n1)"
+echo "cpptoolsZipStorePath='$cpptoolsZipStorePath'"
+echo "cpptoolsZipSha256='$cpptoolsZipSha256'"
+
+
+extStoreName="${extPublisher}-${extName}"
+
+
+function rm_tmpdir() {
+  #echo "Removing \`tmpDir='$tmpDir'\`"
+  rm -rf -- "$tmpDir"
+  unset tmpDir
+  trap - INT TERM HUP EXIT
+}
+function make_trapped_tmpdir() {
+  tmpDir=$(mktemp -d)
+  trap rm_tmpdir INT TERM HUP EXIT
+}
+
+echo
+echo "------------- Unpacked extension ---------------"
+
+make_trapped_tmpdir
+unzip -q -d "$tmpDir" "$cpptoolsZipStorePath"
+
+cpptoolsStorePath="$(nix add-to-store -n "$extStoreName" "$tmpDir")"
+cpptoolsSha256="$(nix hash-path --base32 --type sha512 "$cpptoolsStorePath")"
+echo "cpptoolsStorePath='$cpptoolsStorePath'"
+echo "cpptoolsSha256='$cpptoolsSha256'"
+
+rm_tmpdir
+
+storePathWithSha=$(nix-prefetch-url --print-path "file://${cpptoolsStorePath}/extension/package.json" 2> /dev/null)
+
+extPackageJSONStorePath="$(echo "$storePathWithSha" | tail -n1)"
+extPackageJSONSha256="$(echo "$storePathWithSha" | head -n1)"
+echo "extPackageJSONStorePath='$extPackageJSONStorePath'"
+echo "extPackageJSONSha256='$extPackageJSONSha256'"
+
+print_runtime_dep() {
+
+  local outName="$1"
+  local extPackageJSONStorePath="$2"
+  local depDesc="$3"
+
+  local urlRaw=$(cat "$extPackageJSONStorePath" | jq -r --arg desc "$depDesc" '.runtimeDependencies[] | select(.description == $desc) | .url')
+  local url=$(echo $urlRaw | xargs curl -Ls -o /dev/null -w %{url_effective})
+
+  local urlRawVarStr="${outName}_urlRaw='$urlRaw'"
+  local urlVarStr="${outName}_url='$url'"
+  echo "$urlRawVarStr"
+  echo "$urlVarStr"
+
+  local storePathWithSha="$(nix-prefetch-url --unpack --print-path "$url" 2> /dev/null)"
+
+  local storePath="$(echo "$storePathWithSha" | tail -n1)"
+  local sha256="$(echo "$storePathWithSha" | head -n1)"
+
+  local sha256VarStr="${outName}_sha256='$sha256'"
+  local storePathVarStr="${outName}_storePath='$storePath'"
+  echo "$sha256VarStr"
+  echo "$storePathVarStr"
+
+  eval "$urlRawVarStr"
+  eval "$urlVarStr"
+  eval "$sha256VarStr"
+  eval "$storePathVarStr"
+}
+
+echo
+echo "------------- Runtime dependencies ---------------"
+
+print_runtime_dep "langComponentBinaries" "$extPackageJSONStorePath" "C/C++ language components (Linux / x86_64)"
+print_runtime_dep "monoRuntimeBinaries" "$extPackageJSONStorePath" "Mono Runtime (Linux / x86_64)"
+print_runtime_dep "clanFormatBinaries" "$extPackageJSONStorePath" "ClangFormat (Linux / x86_64)"
+
+
+echo
+echo "------------- Runtime deps missing elf deps ---------------"
+
+source "$scriptDir/missing_elf_deps.sh"
+
+echo
+echo "------------- Runtime dep mono ---------------"
+
+make_trapped_tmpdir
+find "$monoRuntimeBinaries_storePath" -mindepth 1 -maxdepth 1 | xargs -d '\n' cp -rp -t "$tmpDir"
+chmod -R a+rwx "$tmpDir"
+
+ls -la "$tmpDir/debugAdapters"
+
+patchelf_mono "$tmpDir/debugAdapters/mono.linux-x86_64"
+
+chmod a+x "$tmpDir/debugAdapters/mono.linux-x86_64"
+ldd "$tmpDir/debugAdapters/mono.linux-x86_64"
+"$tmpDir/debugAdapters/mono.linux-x86_64" --version
+
+monoRuntimeBinariesPatched_storePath="$(nix add-to-store -n "monoRuntimeBinariesPatched" "$tmpDir")"
+echo "monoRuntimeBinariesPatched_storePath='$monoRuntimeBinariesPatched_storePath'"
+
+rm_tmpdir
+
+
+echo
+echo "------------- Runtime dep clang ---------------"
+make_trapped_tmpdir
+find "$clanFormatBinaries_storePath" -mindepth 1 -maxdepth 1 | xargs -d '\n' cp -rp -t "$tmpDir"
+chmod -R a+rwx "$tmpDir"
+
+ls -la "$tmpDir/bin"
+
+patchelf_clangformat "$tmpDir/bin/clang-format"
+
+chmod a+x "$tmpDir/bin/clang-format"
+ldd "$tmpDir/bin/clang-format"
+"$tmpDir/bin/clang-format" --version
+
+
+clanFormatBinariesPatched_storePath="$(nix add-to-store -n "clanFormatBinariesPatched" "$tmpDir")"
+echo "clanFormatBinariesPatched_storePath='$clanFormatBinariesPatched_storePath'"
+
+rm_tmpdir
+
+echo
+echo "------------- Nix mono ---------------"
+print_nix_version_clangtools
+
+echo
+echo "------------- Nix mono ---------------"
+print_nix_version_mono
+
diff --git a/nixpkgs/pkgs/misc/vscode-extensions/default.nix b/nixpkgs/pkgs/misc/vscode-extensions/default.nix
new file mode 100644
index 000000000000..6d6ca873d280
--- /dev/null
+++ b/nixpkgs/pkgs/misc/vscode-extensions/default.nix
@@ -0,0 +1,1042 @@
+{ config, lib, callPackage, vscode-utils, nodePackages, jdk, llvmPackages_8 }:
+
+let
+  inherit (vscode-utils) buildVscodeMarketplaceExtension;
+
+  #
+  # Unless there is a good reason not to, we attempt to use the same name as the
+  # extension's unique identifier (the name the extension gets when installed
+  # from vscode under `~/.vscode`) and found on the marketplace extension page.
+  # So an extension's attribute name should be of the form:
+  # "${mktplcRef.publisher}.${mktplcRef.name}".
+  #
+  baseExtensions = self: lib.mapAttrs (_n: lib.recurseIntoAttrs)
+    {
+      a5huynh.vscode-ron = buildVscodeMarketplaceExtension {
+        mktplcRef = {
+          name = "vscode-ron";
+          publisher = "a5huynh";
+          version = "0.9.0";
+          sha256 = "0d3p50mhqp550fmj662d3xklj14gvzvhszm2hlqvx4h28v222z97";
+        };
+        meta = {
+          license = lib.licenses.mit;
+        };
+      };
+
+      alanz.vscode-hie-server = buildVscodeMarketplaceExtension {
+        mktplcRef = {
+          name = "vscode-hie-server";
+          publisher = "alanz";
+          version = "0.0.27"; # see the note above
+          sha256 = "1mz0h5zd295i73hbji9ivla8hx02i4yhqcv6l4r23w3f07ql3i8h";
+        };
+        meta = {
+          license = lib.licenses.mit;
+        };
+      };
+
+      alexdima.copy-relative-path = buildVscodeMarketplaceExtension {
+        mktplcRef = {
+          name = "copy-relative-path";
+          publisher = "alexdima";
+          version = "0.0.2";
+          sha256 = "06g601n9d6wyyiz659w60phgm011gn9jj5fy0gf5wpi2bljk3vcn";
+        };
+        meta = {
+          license = lib.licenses.mit;
+        };
+      };
+
+      alygin.vscode-tlaplus = buildVscodeMarketplaceExtension {
+        mktplcRef = {
+          name = "vscode-tlaplus";
+          publisher = "alygin";
+          version = "1.5.3";
+          sha256 = "1cy0qn8iyjrinscn9p5ckpsa2hyryapxfi7is6s2zk2mpligbb1d";
+        };
+        meta = {
+          license = lib.licenses.mit;
+        };
+      };
+
+      antfu.icons-carbon = buildVscodeMarketplaceExtension {
+        mktplcRef = {
+          name = "icons-carbon";
+          publisher = "antfu";
+          version = "0.2.2";
+          sha256 = "0mfap16la09mn0jhvy8s3dainrmjz64vra7d0d4fbcpgg420kv3f";
+        };
+        meta = with lib; {
+          license = licenses.mit;
+        };
+      };
+
+      ms-python.vscode-pylance = buildVscodeMarketplaceExtension {
+        mktplcRef = {
+          name = "vscode-pylance";
+          publisher = "MS-python";
+          version = "2020.11.2";
+          sha256 = "0n2dm21vgzir3hx1m3pmx7jq4zy3hdxfsandd2wv5da4fs9b5g50";
+        };
+
+        buildInputs = [ nodePackages.pyright ];
+
+        meta = {
+          license = lib.licenses.unfree;
+        };
+      };
+
+      baccata.scaladex-search = buildVscodeMarketplaceExtension {
+        mktplcRef = {
+          name = "scaladex-search";
+          publisher = "baccata";
+          version = "0.0.1";
+          sha256 = "1y8p4rr8qq5ng52g4pbx8ayq04gi2869wrx68k69rl7ga7bzcyp9";
+        };
+        meta = {
+          license = lib.licenses.asl20;
+        };
+      };
+
+      bbenoist.Nix = buildVscodeMarketplaceExtension {
+        mktplcRef = {
+          name = "Nix";
+          publisher = "bbenoist";
+          version = "1.0.1";
+          sha256 = "0zd0n9f5z1f0ckzfjr38xw2zzmcxg1gjrava7yahg5cvdcw6l35b";
+        };
+        meta = with lib; {
+          license = licenses.mit;
+        };
+      };
+
+      brettm12345.nixfmt-vscode = buildVscodeMarketplaceExtension {
+        mktplcRef = {
+          name = "nixfmt-vscode";
+          publisher = "brettm12345";
+          version = "0.0.1";
+          sha256 = "07w35c69vk1l6vipnq3qfack36qcszqxn8j3v332bl0w6m02aa7k";
+        };
+        meta = with lib; {
+          license = licenses.mpl20;
+        };
+      };
+
+      cmschuetz12.wal = buildVscodeMarketplaceExtension {
+        mktplcRef = {
+          name = "wal";
+          publisher = "cmschuetz12";
+          version = "0.1.0";
+          sha256 = "0q089jnzqzhjfnv0vlb5kf747s3mgz64r7q3zscl66zb2pz5q4zd";
+        };
+        meta = with lib; {
+          license = licenses.mit;
+        };
+      };
+
+      codezombiech.gitignore = buildVscodeMarketplaceExtension {
+        mktplcRef = {
+          name = "gitignore";
+          publisher = "codezombiech";
+          version = "0.6.0";
+          sha256 = "0gnc0691pwkd9s8ldqabmpfvj0236rw7bxvkf0bvmww32kv1ia0b";
+        };
+        meta = with lib; {
+          license = licenses.mit;
+        };
+      };
+
+      CoenraadS.bracket-pair-colorizer = buildVscodeMarketplaceExtension {
+        meta = with lib; {
+          changelog = "https://marketplace.visualstudio.com/items/CoenraadS.bracket-pair-colorizer/changelog";
+          description = "A customizable extension for colorizing matching brackets";
+          downloadPage = "https://marketplace.visualstudio.com/items?itemName=CoenraadS.bracket-pair-colorizer";
+          homepage = "https://github.com/CoenraadS/BracketPair";
+          license = licenses.mit;
+          maintainers = with maintainers; [ superherointj ];
+        };
+        mktplcRef = {
+          name = "bracket-pair-colorizer";
+          publisher = "CoenraadS";
+          version = "1.0.61";
+          sha256 = "0r3bfp8kvhf9zpbiil7acx7zain26grk133f0r0syxqgml12i652";
+        };
+      };
+
+      coenraads.bracket-pair-colorizer-2 = buildVscodeMarketplaceExtension {
+        mktplcRef = {
+          name = "bracket-pair-colorizer-2";
+          publisher = "CoenraadS";
+          version = "0.2.0";
+          sha256 = "0nppgfbmw0d089rka9cqs3sbd5260dhhiipmjfga3nar9vp87slh";
+        };
+        meta = with lib; {
+          license = licenses.mit;
+        };
+      };
+
+      dbaeumer.vscode-eslint = buildVscodeMarketplaceExtension {
+        mktplcRef = {
+          name = "vscode-eslint";
+          publisher = "dbaeumer";
+          version = "2.1.14";
+          sha256 = "sha256-bVGmp871yu1Llr3uJ+CCosDsrxJtD4b1+CR+omMUfIQ=";
+        };
+        meta = {
+          license = lib.licenses.mit;
+        };
+      };
+
+      davidanson.vscode-markdownlint = buildVscodeMarketplaceExtension {
+        mktplcRef = {
+          name = "vscode-markdownlint";
+          publisher = "DavidAnson";
+          version = "0.38.0";
+          sha256 = "0d6hbsjrx1j8wrmfnvdwsa7sci1brplgxwkmy6sp74va7zxfjnqv";
+        };
+        meta = with lib; {
+          license = licenses.mit;
+        };
+      };
+
+      dhall.dhall-lang = buildVscodeMarketplaceExtension {
+        mktplcRef = {
+          name = "dhall-lang";
+          publisher = "dhall";
+          version = "0.0.4";
+          sha256 = "0sa04srhqmngmw71slnrapi2xay0arj42j4gkan8i11n7bfi1xpf";
+        };
+        meta = { license = lib.licenses.mit; };
+      };
+
+      dhall.vscode-dhall-lsp-server = buildVscodeMarketplaceExtension {
+        mktplcRef = {
+          name = "vscode-dhall-lsp-server";
+          publisher = "dhall";
+          version = "0.0.4";
+          sha256 = "1zin7s827bpf9yvzpxpr5n6mv0b5rhh3civsqzmj52mdq365d2js";
+        };
+        meta = { license = lib.licenses.mit; };
+      };
+
+      donjayamanne.githistory = buildVscodeMarketplaceExtension {
+        meta = with lib; {
+          changelog = "https://marketplace.visualstudio.com/items/donjayamanne.githistory/changelog";
+          description = "View git log, file history, compare branches or commits";
+          downloadPage = "https://marketplace.visualstudio.com/items?itemName=donjayamanne.githistory";
+          homepage = "https://github.com/DonJayamanne/gitHistoryVSCode/";
+          license = licenses.mit;
+          maintainers = with maintainers; [ superherointj ];
+        };
+        mktplcRef = {
+          name = "githistory";
+          publisher = "donjayamanne";
+          version = "0.6.14";
+          sha256 = "11x116hzqnhgbryp2kqpki1z5mlnwxb0ly9r1513m5vgbisrsn0i";
+        };
+      };
+
+      dotjoshjohnson.xml = buildVscodeMarketplaceExtension {
+        mktplcRef = {
+          name = "xml";
+          publisher = "dotjoshjohnson";
+          version = "2.5.1";
+          sha256 = "1v4x6yhzny1f8f4jzm4g7vqmqg5bqchyx4n25mkgvw2xp6yls037";
+        };
+        meta = {
+          description = "XML Tools";
+          homepage = "https://github.com/DotJoshJohnson/vscode-xml";
+          license = lib.licenses.mit;
+        };
+      };
+
+      dracula-theme.theme-dracula = buildVscodeMarketplaceExtension {
+        mktplcRef = {
+          name = "theme-dracula";
+          publisher = "dracula-theme";
+          version = "2.22.3";
+          sha256 = "0wni9sriin54ci8rly2s68lkfx8rj1cys6mgcizvps9sam6377w6";
+        };
+        meta = with lib; {
+          changelog = "https://marketplace.visualstudio.com/items/dracula-theme.theme-dracula/changelog";
+          description = "Dark theme for many editors, shells, and more";
+          downloadPage = "https://marketplace.visualstudio.com/items?itemName=dracula-theme.theme-dracula";
+          homepage = "https://draculatheme.com/";
+          license = licenses.mit;
+        };
+      };
+
+      eamodio.gitlens = buildVscodeMarketplaceExtension {
+        mktplcRef = {
+          name = "gitlens";
+          publisher = "eamodio";
+          version = "11.1.3";
+          sha256 = "sha256-hqJg3jP4bbXU4qSJOjeKfjkPx61yPDMsQdSUVZObK/U=";
+        };
+        meta = {
+          license = lib.licenses.mit;
+        };
+      };
+
+      edonet.vscode-command-runner = buildVscodeMarketplaceExtension {
+        mktplcRef = {
+          name = "vscode-command-runner";
+          publisher = "edonet";
+          version = "0.0.116";
+          sha256 = "0fxvplyk080m0cdsvzynp6wjillrd4flr5qz7af7fibb2jbmfdkn";
+        };
+        meta = {
+          license = lib.licenses.mit;
+        };
+      };
+
+      elmtooling.elm-ls-vscode = buildVscodeMarketplaceExtension {
+        mktplcRef = {
+          name = "elm-ls-vscode";
+          publisher = "Elmtooling";
+          version = "2.0.1";
+          sha256 = "06x5ld2r1hzns2s052mvhmfiaawjzcn0jf5lkfprhmrkxnmfdd43";
+        };
+        meta = with lib; {
+          changelog = "https://marketplace.visualstudio.com/items/Elmtooling.elm-ls-vscode/changelog";
+          description = "Elm language server";
+          downloadPage = "https://marketplace.visualstudio.com/items?itemName=Elmtooling.elm-ls-vscode";
+          homepage = "https://github.com/elm-tooling/elm-language-client-vscode";
+          license = licenses.mit;
+          maintainers = with maintainers; [ mcwitt ];
+        };
+      };
+
+      emmanuelbeziat.vscode-great-icons = buildVscodeMarketplaceExtension {
+        mktplcRef = {
+          name = "vscode-great-icons";
+          publisher = "emmanuelbeziat";
+          version = "2.1.64";
+          sha256 = "sha256-qsL1vWiEAYeWkMDNSrr1yzg0QxroEQQeznoDL3Ujy/o=";
+        };
+        meta = with lib; {
+          license = licenses.mit;
+        };
+      };
+
+      esbenp.prettier-vscode = buildVscodeMarketplaceExtension {
+        meta = with lib; {
+          changelog = "https://marketplace.visualstudio.com/items/esbenp.prettier-vscode/changelog";
+          description = "Code formatter using prettier";
+          downloadPage = "https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode";
+          homepage = "https://github.com/prettier/prettier-vscode";
+          license = licenses.mit;
+          maintainers = with maintainers; [ superherointj ];
+        };
+        mktplcRef = {
+          name = "prettier-vscode";
+          publisher = "esbenp";
+          version = "5.8.0";
+          sha256 = "0h7wc4pffyq1i8vpj4a5az02g2x04y7y1chilmcfmzg2w42xpby7";
+        };
+      };
+
+      file-icons.file-icons = buildVscodeMarketplaceExtension {
+        meta = with lib; {
+          changelog = "https://marketplace.visualstudio.com/items/file-icons.file-icons/changelog";
+          description = "File-specific icons in VSCode for improved visual grepping.";
+          downloadPage = "https://marketplace.visualstudio.com/items?itemName=file-icons.file-icons";
+          homepage = "https://github.com/file-icons/vscode";
+          license = licenses.mit;
+          maintainers = with maintainers; [ superherointj ];
+        };
+        mktplcRef = {
+          name = "file-icons";
+          publisher = "file-icons";
+          version = "1.0.28";
+          sha256 = "1lyx0l42xhi2f3rdnjddc3mw7m913kjnchawi98i6vqsx3dv7091";
+        };
+      };
+
+      formulahendry.auto-close-tag = buildVscodeMarketplaceExtension {
+        mktplcRef = {
+          name = "auto-close-tag";
+          publisher = "formulahendry";
+          version = "0.5.6";
+          sha256 = "058jgmllqb0j6gg5anghdp35nkykii28igfcwqgh4bp10pyvspg0";
+        };
+        meta = {
+          license = lib.licenses.mit;
+        };
+      };
+
+      formulahendry.auto-rename-tag = buildVscodeMarketplaceExtension {
+        mktplcRef = {
+          name = "auto-rename-tag";
+          publisher = "formulahendry";
+          version = "0.1.6";
+          sha256 = "0cqg9mxkyf41brjq2c764w42lzyn6ffphw6ciw7xnqk1h1x8wwbs";
+        };
+        meta = {
+          license = lib.licenses.mit;
+        };
+      };
+
+      formulahendry.code-runner = buildVscodeMarketplaceExtension {
+        mktplcRef = {
+          name = "code-runner";
+          publisher = "formulahendry";
+          version = "0.11.2";
+          sha256 = "0qwcxr6m1xwhqmdl4pccjgpikpq1hgi2hgrva5abn8ixa2510hcy";
+        };
+        meta = {
+          license = lib.licenses.mit;
+        };
+      };
+
+      freebroccolo.reasonml = buildVscodeMarketplaceExtension {
+        meta = with lib; {
+          changelog = "https://marketplace.visualstudio.com/items/freebroccolo.reasonml/changelog";
+          description = "Reason support for Visual Studio Code";
+          downloadPage = "https://marketplace.visualstudio.com/items?itemName=freebroccolo.reasonml";
+          homepage = "https://github.com/reasonml-editor/vscode-reasonml";
+          license = licenses.asl20;
+          maintainers = with maintainers; [ superherointj ];
+        };
+        mktplcRef = {
+          name = "reasonml";
+          publisher = "freebroccolo";
+          version = "1.0.38";
+          sha256 = "1nay6qs9vcxd85ra4bv93gg3aqg3r2wmcnqmcsy9n8pg1ds1vngd";
+        };
+      };
+
+      github = {
+        github-vscode-theme = buildVscodeMarketplaceExtension {
+          mktplcRef = {
+            name = "github-vscode-theme";
+            publisher = "github";
+            version = "1.1.5";
+            sha256 =
+              "10f0098cce026d1f0c855fb7a66ea60b5d8acd2b76126ea94fe7361e49cd9ed2";
+          };
+          meta = with lib; {
+            description = "GitHub theme for VS Code";
+            downloadPage =
+              "https://marketplace.visualstudio.com/items?itemName=GitHub.github-vscode-theme";
+            homepage = "https://github.com/primer/github-vscode-theme";
+            license = licenses.mit;
+            maintainers = with maintainers; [ hugolgst ];
+          };
+        };
+
+        vscode-pull-request-github = buildVscodeMarketplaceExtension {
+          mktplcRef = {
+            name = "vscode-pull-request-github";
+            publisher = "github";
+            version = "0.22.0";
+            sha256 = "13p3z86vkra26npp5a78pxdwa4z6jqjzsd38arhgdnjgwmi6bnrw";
+          };
+          meta = { license = lib.licenses.mit; };
+        };
+      };
+
+      golang.Go = buildVscodeMarketplaceExtension {
+        mktplcRef = {
+          name = "Go";
+          publisher = "golang";
+          version = "0.18.1";
+          sha256 = "sha256-b2Wa3TULQQnBm1/xnDCB9SZjE+Wxz5wBttjDEtf8qlE=";
+        };
+        meta = {
+          license = lib.licenses.mit;
+        };
+      };
+
+      graphql.vscode-graphql = buildVscodeMarketplaceExtension {
+        mktplcRef = {
+          name = "vscode-graphql";
+          publisher = "GraphQL";
+          version = "0.3.13";
+          sha256 = "sha256-JjEefVHQUYidUsr8Ce/dh7hLDm21WkyS+2RwsXHoY04=";
+        };
+        meta = {
+          license = lib.licenses.mit;
+        };
+      };
+
+      gruntfuggly.todo-tree = buildVscodeMarketplaceExtension {
+        mktplcRef = {
+          name = "todo-tree";
+          publisher = "Gruntfuggly";
+          version = "0.0.209";
+          sha256 = "1i0wq8zwax4kmy69hh0hclx9a47ycm3qp3gspjq8xpmcq3nmbfaq";
+        };
+        meta = with lib; {
+          license = licenses.mit;
+        };
+      };
+
+      haskell.haskell = buildVscodeMarketplaceExtension {
+        mktplcRef = {
+          name = "haskell";
+          publisher = "haskell";
+          version = "1.1.0";
+          sha256 = "1wg06lyk0qn9jd6gi007sg7v0z9z8gwq7x2449d4ihs9n3w5l0gb";
+        };
+        meta = with lib; {
+          license = licenses.mit;
+        };
+      };
+
+      hashicorp.terraform = callPackage ./terraform {};
+
+      hookyqr.beautify = buildVscodeMarketplaceExtension {
+        mktplcRef = {
+          name = "beautify";
+          publisher = "HookyQR";
+          version = "1.5.0";
+          sha256 = "1c0kfavdwgwham92xrh0gnyxkrl9qlkpv39l1yhrldn8vd10fj5i";
+        };
+        meta = with lib; {
+          license = licenses.mit;
+        };
+      };
+
+      ibm.output-colorizer = buildVscodeMarketplaceExtension {
+        mktplcRef = {
+          name = "output-colorizer";
+          publisher = "IBM";
+          version = "0.1.2";
+          sha256 = "0i9kpnlk3naycc7k8gmcxas3s06d67wxr3nnyv5hxmsnsx5sfvb7";
+        };
+        meta = with lib; {
+          license = licenses.mit;
+        };
+      };
+
+      james-yu.latex-workshop = buildVscodeMarketplaceExtension {
+        mktplcRef = {
+          name = "latex-workshop";
+          publisher = "James-Yu";
+          version = "8.2.0";
+          sha256 = "1ai16aam4v5jzhxgms589q0l24kyk1a9in6z4i7g05b3sahyxab2";
+        };
+        meta = with lib; {
+          license = licenses.mit;
+        };
+      };
+
+      jnoortheen.nix-ide = buildVscodeMarketplaceExtension {
+        meta = with lib; {
+          changelog = "https://marketplace.visualstudio.com/items/jnoortheen.nix-ide/changelog";
+          description = "Nix language support with formatting and error report";
+          downloadPage = "https://marketplace.visualstudio.com/items?itemName=jnoortheen.nix-ide";
+          homepage = "https://github.com/jnoortheen/vscode-nix-ide";
+          license = licenses.mit;
+          maintainers = with maintainers; [ superherointj ];
+        };
+        mktplcRef = {
+          name = "nix-ide";
+          publisher = "jnoortheen";
+          version = "0.1.7";
+          sha256 = "1bw4wyq9abimxbhl7q9g8grvj2ax9qqq6mmqbiqlbsi2arvk0wrm";
+        };
+      };
+
+      jock.svg = buildVscodeMarketplaceExtension {
+        mktplcRef = {
+          name = "svg";
+          publisher = "jock";
+          version = "1.4.4";
+          sha256 = "0kn2ic7pgbd4rbvzpsxfwyiwxa1iy92l0h3jsppxc8gk8xbqm2nc";
+        };
+        meta = with lib; {
+          license = licenses.mit;
+        };
+      };
+
+      jpoissonnier.vscode-styled-components = buildVscodeMarketplaceExtension {
+        mktplcRef = {
+          name = "vscode-styled-components";
+          publisher = "jpoissonnier";
+          version = "1.4.1";
+          sha256 = "sha256-ojbeuYBCS+DjF5R0aLuBImzoSOb8mXw1s0Uh0CzggzE=";
+        };
+        meta = {
+          license = lib.licenses.mit;
+        };
+      };
+
+      justusadam.language-haskell = buildVscodeMarketplaceExtension {
+        mktplcRef = {
+          name = "language-haskell";
+          publisher = "justusadam";
+          version = "3.2.1";
+          sha256 = "0lxp8xz17ciy93nj4lzxqvz71vw1zdyamrnh2n792yair8890rr6";
+        };
+        meta = {
+          license = lib.licenses.bsd3;
+        };
+      };
+
+      mikestead.dotenv = buildVscodeMarketplaceExtension {
+        mktplcRef = {
+          name = "dotenv";
+          publisher = "mikestead";
+          version = "1.0.1";
+          sha256 = "sha256-dieCzNOIcZiTGu4Mv5zYlG7jLhaEsJR05qbzzzQ7RWc=";
+        };
+        meta = {
+          license = lib.licenses.mit;
+        };
+      };
+
+      mishkinf.goto-next-previous-member = buildVscodeMarketplaceExtension {
+        mktplcRef = {
+          name = "goto-next-previous-member";
+          publisher = "mishkinf";
+          version = "0.0.5";
+          sha256 = "0kgzap1k924i95al0a63hxcsv8skhaapgfpi9d7vvaxm0fc10l1i";
+        };
+        meta = {
+          license = lib.licenses.mit;
+        };
+      };
+
+      mskelton.one-dark-theme = buildVscodeMarketplaceExtension {
+        mktplcRef = {
+          name = "one-dark-theme";
+          publisher = "mskelton";
+          version = "1.7.2";
+          sha256 = "1ks6z8wsxmlfhiwa51f7d6digvw11dlxc7mja3hankgxcf5dyj31";
+        };
+        meta = {
+          license = lib.licenses.mit;
+        };
+      };
+
+      mechatroner.rainbow-csv = buildVscodeMarketplaceExtension {
+        mktplcRef = {
+          name = "rainbow-csv";
+          publisher = "mechatroner";
+          version = "1.7.1";
+          sha256 = "0w5mijs4ll5qjkpyw7qpn1k40pq8spm0b3q72x150ydbcini5hxw";
+        };
+        meta = {
+          license = lib.licenses.mit;
+        };
+      };
+
+      ms-azuretools.vscode-docker = buildVscodeMarketplaceExtension {
+        mktplcRef = {
+          name = "vscode-docker";
+          publisher = "ms-azuretools";
+          version = "1.9.1";
+          sha256 = "1l7pm3s5kbf2vark164ykz4qbpa1ac9ls691hham36f6v91dmff9";
+        };
+        meta = {
+          license = lib.licenses.mit;
+        };
+      };
+
+      ms-dotnettools.csharp = callPackage ./ms-dotnettools-csharp { };
+
+      ms-kubernetes-tools.vscode-kubernetes-tools = buildVscodeMarketplaceExtension {
+        mktplcRef = {
+          name = "vscode-kubernetes-tools";
+          publisher = "ms-kubernetes-tools";
+          version = "1.0.6";
+          sha256 = "12a4phl1pddsajy3n0ld6rp607iy0pif6pqrs6ljbg2x97fyra28";
+        };
+        meta = {
+          license = lib.licenses.mit;
+        };
+      };
+
+      ms-vscode.cpptools = callPackage ./cpptools {};
+
+      ms-vscode-remote.remote-ssh = callPackage ./remote-ssh {};
+
+      ms-python.python = callPackage ./python {
+        extractNuGet = callPackage ./python/extract-nuget.nix { };
+      };
+
+      msjsdiag.debugger-for-chrome = buildVscodeMarketplaceExtension {
+        mktplcRef = {
+          name = "debugger-for-chrome";
+          publisher = "msjsdiag";
+          version = "4.12.11";
+          sha256 = "sha256-9i3TgCFThnFF5ccwzS4ATj5c2Xoe/4tDFGv75jJxeQ4=";
+        };
+        meta = {
+          license = lib.licenses.mit;
+        };
+      };
+
+      naumovs.color-highlight = buildVscodeMarketplaceExtension {
+        mktplcRef = {
+          name = "color-highlight";
+          publisher = "naumovs";
+          version = "2.3.0";
+          sha256 = "1syzf43ws343z911fnhrlbzbx70gdn930q67yqkf6g0mj8lf2za2";
+        };
+        meta = {
+          license = lib.licenses.mit;
+        };
+      };
+
+      redhat.java = buildVscodeMarketplaceExtension {
+        mktplcRef = {
+          name = "java";
+          publisher = "redhat";
+          version = "0.76.0";
+          sha256 = "0xb9brki4s00piv4kqgz6idm16nk6x1j6502jljz7y9pif38z32y";
+        };
+        buildInputs = [ jdk ];
+        meta = {
+          license = lib.licenses.epl20;
+          broken = lib.versionOlder jdk.version "11";
+        };
+      };
+
+      redhat.vscode-yaml = buildVscodeMarketplaceExtension {
+        mktplcRef = {
+          name = "vscode-yaml";
+          publisher = "redhat";
+          version = "0.13.0";
+          sha256 = "046kdk73a5xbrwq16ff0l64271c6q6ygjvxaph58z29gyiszfkig";
+        };
+        meta = {
+          license = lib.licenses.mit;
+        };
+      };
+
+      rubymaniac.vscode-paste-and-indent = buildVscodeMarketplaceExtension {
+        mktplcRef = {
+          name = "vscode-paste-and-indent";
+          publisher = "Rubymaniac";
+          version = "0.0.8";
+          sha256 = "0fqwcvwq37ndms6vky8jjv0zliy6fpfkh8d9raq8hkinfxq6klgl";
+        };
+        meta = with lib; {
+          license = licenses.mit;
+        };
+      };
+
+      matklad.rust-analyzer = callPackage ./rust-analyzer {};
+
+      ocamllabs.ocaml-platform = buildVscodeMarketplaceExtension {
+        meta = with lib; {
+          changelog = "https://marketplace.visualstudio.com/items/ocamllabs.ocaml-platform/changelog";
+          description = "Official OCaml Support from OCamlLabs";
+          downloadPage = "https://marketplace.visualstudio.com/items?itemName=ocamllabs.ocaml-platform";
+          homepage = "https://github.com/ocamllabs/vscode-ocaml-platform";
+          license = licenses.isc;
+          maintainers = with maintainers; [ superherointj ];
+        };
+        mktplcRef = {
+          name = "ocaml-platform";
+          publisher = "ocamllabs";
+          version = "1.5.1";
+          sha256 = "0jkxpcrbr8xmwfl8jphmarjz2jk54hvmc24ww89d4bgx1awayqfh";
+        };
+      };
+
+      pkief.material-icon-theme = buildVscodeMarketplaceExtension {
+        mktplcRef = {
+          name = "material-icon-theme";
+          publisher = "pkief";
+          version = "4.4.0";
+          sha256 = "1m9mis59j9xnf1zvh67p5rhayaa9qxjiw9iw847nyl9vsy73w8ya";
+        };
+        meta = {
+          license = lib.licenses.mit;
+        };
+      };
+
+      rubbersheep.gi = buildVscodeMarketplaceExtension {
+        mktplcRef = {
+          name = "gi";
+          publisher = "rubbersheep";
+          version = "0.2.11";
+          sha256 = "0j9k6wm959sziky7fh55awspzidxrrxsdbpz1d79s5lr5r19rs6j";
+        };
+        meta = {
+          license = lib.licenses.mit;
+        };
+      };
+
+      ryu1kn.partial-diff = buildVscodeMarketplaceExtension {
+        mktplcRef = {
+          name = "partial-diff";
+          publisher = "ryu1kn";
+          version = "1.4.1";
+          sha256 = "1r4kg4slgxncdppr4fn7i5vfhvzcg26ljia2r97n6wvwn8534vs9";
+        };
+        meta = {
+          license = lib.licenses.mit;
+        };
+      };
+
+      scala-lang.scala = buildVscodeMarketplaceExtension {
+        mktplcRef = {
+          name = "scala";
+          publisher = "scala-lang";
+          version = "0.5.1";
+          sha256 = "0p9nhds2xn08xz8x822q15jdrdlqkg2wa1y7mk9k89n8n2kfh91g";
+        };
+        meta = {
+          license = lib.licenses.mit;
+        };
+      };
+
+      scalameta.metals = buildVscodeMarketplaceExtension {
+        mktplcRef = {
+          name = "metals";
+          publisher = "scalameta";
+          version = "1.9.13";
+          sha256 = "0vrg25ygmyjx1lwif2ypyv688b290ycfn1qf0izxbmgi2z3f0wf9";
+        };
+        meta = {
+          license = lib.licenses.asl20;
+        };
+      };
+
+      serayuzgur.crates = buildVscodeMarketplaceExtension {
+        mktplcRef = {
+          name = "crates";
+          publisher = "serayuzgur";
+          version = "0.5.3";
+          sha256 = "1xk7ayv590hsm3scqpyh6962kvgdlinnpkx0vapr7vs4y08dx72f";
+        };
+        meta = {
+          license = lib.licenses.mit;
+        };
+      };
+
+
+      shyykoserhiy.vscode-spotify = buildVscodeMarketplaceExtension {
+        mktplcRef = {
+          name = "vscode-spotify";
+          publisher = "shyykoserhiy";
+          version = "3.2.1";
+          sha256 = "14d68rcnjx4a20r0ps9g2aycv5myyhks5lpfz0syr2rxr4kd1vh6";
+        };
+        meta = {
+          license = lib.licenses.mit;
+        };
+      };
+
+      skyapps.fish-vscode = buildVscodeMarketplaceExtension {
+        mktplcRef = {
+          name = "fish-vscode";
+          publisher = "skyapps";
+          version = "0.2.1";
+          sha256 = "0y1ivymn81ranmir25zk83kdjpjwcqpnc9r3jwfykjd9x0jib2hl";
+        };
+        meta = {
+          license = lib.licenses.mit;
+        };
+      };
+
+      slevesque.vscode-multiclip = buildVscodeMarketplaceExtension {
+        mktplcRef = {
+          name = "vscode-multiclip";
+          publisher = "slevesque";
+          version = "0.1.5";
+          sha256 = "1cg8dqj7f10fj9i0g6mi3jbyk61rs6rvg9aq28575rr52yfjc9f9";
+        };
+        meta = {
+          license = lib.licenses.mit;
+        };
+      };
+
+      spywhere.guides = buildVscodeMarketplaceExtension {
+        mktplcRef = {
+          name = "guides";
+          publisher = "spywhere";
+          version = "0.9.3";
+          sha256 = "1kvsj085w1xax6fg0kvsj1cizqh86i0pkzpwi0sbfvmcq21i6ghn";
+        };
+        meta = with lib; {
+          license = licenses.mit;
+        };
+      };
+
+      streetsidesoftware.code-spell-checker = buildVscodeMarketplaceExtension {
+        mktplcRef = {
+          name = "code-spell-checker";
+          publisher = "streetsidesoftware";
+          version = "1.10.2";
+          sha256 = "1ll046rf5dyc7294nbxqk5ya56g2bzqnmxyciqpz2w5x7j75rjib";
+        };
+        meta = with lib; {
+          license = licenses.mit;
+        };
+      };
+
+      tamasfe.even-better-toml = buildVscodeMarketplaceExtension {
+        mktplcRef = {
+          name = "even-better-toml";
+          publisher = "tamasfe";
+          version = "0.9.3";
+          sha256 = "16x2y58hkankazpwm93j8lqdn3mala7iayck548kki9zx4qrhhck";
+        };
+        meta = {
+          license = lib.licenses.mit;
+        };
+      };
+
+      timonwong.shellcheck = buildVscodeMarketplaceExtension {
+        mktplcRef = {
+          name = "shellcheck";
+          publisher = "timonwong";
+          version = "0.12.3";
+          sha256 = "1i9rszgnac2z1kyahmgxmz05ib7z14s458fvvjlzmvl64fa1fdvf";
+        };
+        meta = {
+          license = lib.licenses.mit;
+        };
+      };
+
+      tomoki1207.pdf = buildVscodeMarketplaceExtension {
+        mktplcRef = {
+          name = "pdf";
+          publisher = "tomoki1207";
+          version = "1.1.0";
+          sha256 = "0pcs4iy77v4f04f8m9w2rpdzfq7sqbspr7f2sm1fv7bm515qgsvb";
+        };
+        meta = {
+          license = lib.licenses.mit;
+        };
+      };
+
+      tyriar.sort-lines = buildVscodeMarketplaceExtension {
+        mktplcRef = {
+          name = "sort-lines";
+          publisher = "Tyriar";
+          version = "1.9.0";
+          sha256 = "0l4wibsjnlbzbrl1wcj18vnm1q4ygvxmh347jvzziv8f1l790qjl";
+        };
+        meta = {
+          license = lib.licenses.mit;
+        };
+      };
+
+      usernamehw.errorlens = buildVscodeMarketplaceExtension {
+        mktplcRef = {
+          name = "errorlens";
+          publisher = "usernamehw";
+          version = "3.2.4";
+          sha256 = "0caxmf6v0s5kgp6cp3j1kk7slhspjv5kzhn4sq3miyl5jkrn95kx";
+        };
+        meta = {
+          license = lib.licenses.mit;
+        };
+      };
+
+      vadimcn.vscode-lldb = callPackage ./vscode-lldb { };
+
+      vincaslt.highlight-matching-tag = buildVscodeMarketplaceExtension {
+        mktplcRef = {
+          name = "highlight-matching-tag";
+          publisher = "vincaslt";
+          version = "0.10.0";
+          sha256 = "1albwz3lc9i20if77inm1ipwws8apigvx24rbag3d1h3p4vwda49";
+        };
+        meta = {
+          license = lib.licenses.mit;
+        };
+      };
+
+      ms-vsliveshare.vsliveshare = callPackage ./ms-vsliveshare-vsliveshare {};
+
+      vscodevim.vim = buildVscodeMarketplaceExtension {
+        mktplcRef = {
+          name = "vim";
+          publisher = "vscodevim";
+          version = "1.11.3";
+          sha256 = "1smzsgcrkhghbnpy51gp28kh74l7y4s2m8pfxabb4ffb751254j0";
+        };
+        meta = {
+          license = lib.licenses.mit;
+        };
+      };
+
+      xaver.clang-format = buildVscodeMarketplaceExtension {
+        mktplcRef = {
+          name = "clang-format";
+          publisher = "xaver";
+          version = "1.9.0";
+          sha256 = "abd0ef9176eff864f278c548c944032b8f4d8ec97d9ac6e7383d60c92e258c2f";
+        };
+        meta = with lib; {
+          license = licenses.mit;
+          maintainers = [ maintainers.zeratax ];
+        };
+      };
+
+      xyz.local-history = buildVscodeMarketplaceExtension {
+        mktplcRef = {
+          name = "local-history";
+          publisher = "xyz";
+          version = "1.8.1";
+          sha256 = "1mfmnbdv76nvwg4xs3rgsqbxk8hw9zr1b61har9c3pbk9r4cay7v";
+        };
+        meta = {
+          license = lib.licenses.mit;
+        };
+      };
+
+      yzhang.markdown-all-in-one = buildVscodeMarketplaceExtension {
+        mktplcRef = {
+          name = "markdown-all-in-one";
+          publisher = "yzhang";
+          version = "3.4.0";
+          sha256 = "0ihfrsg2sc8d441a2lkc453zbw1jcpadmmkbkaf42x9b9cipd5qb";
+        };
+        meta = {
+          license = lib.licenses.mit;
+        };
+      };
+
+      zhuangtongfa.material-theme = buildVscodeMarketplaceExtension {
+        mktplcRef = {
+          name = "material-theme";
+          publisher = "zhuangtongfa";
+          version = "3.9.12";
+          sha256 = "017h9hxplf2rhmlhn3vag0wypcx6gxi7p9fgllj5jzwrl2wsjl0g";
+        };
+        meta = {
+          license = lib.licenses.mit;
+        };
+      };
+
+      llvm-org.lldb-vscode = llvmPackages_8.lldb;
+
+      WakaTime.vscode-wakatime = callPackage ./wakatime {};
+
+      wholroyd.jinja = buildVscodeMarketplaceExtension {
+        mktplcRef = {
+          name = "jinja";
+          publisher = "wholroyd";
+          version = "0.0.8";
+          sha256 = "1ln9gly5bb7nvbziilnay4q448h9npdh7sd9xy277122h0qawkci";
+        };
+        meta = {
+          license = lib.licenses.mit;
+        };
+      };
+    };
+
+    aliases = self: super: {
+      # aliases
+      ms-vscode = lib.recursiveUpdate super.ms-vscode { inherit (super.golang) Go; };
+    };
+
+    # TODO: add overrides overlay, so that we can have a generated.nix
+    # then apply extension specific modifcations to packages.
+
+    # overlays will be applied left to right, overrides should come after aliases.
+    overlays = lib.optionals (config.allowAliases or true) [ aliases ];
+
+    toFix = lib.foldl' (lib.flip lib.extends) baseExtensions overlays;
+in
+  lib.fix toFix
diff --git a/nixpkgs/pkgs/misc/vscode-extensions/mktplcExtRefToFetchArgs.nix b/nixpkgs/pkgs/misc/vscode-extensions/mktplcExtRefToFetchArgs.nix
new file mode 100644
index 000000000000..a781250fc18b
--- /dev/null
+++ b/nixpkgs/pkgs/misc/vscode-extensions/mktplcExtRefToFetchArgs.nix
@@ -0,0 +1,8 @@
+{ publisher, name, version, sha256 ? "" }:
+{
+  url = "https://${publisher}.gallery.vsassets.io/_apis/public/gallery/publisher/${publisher}/extension/${name}/${version}/assetbyname/Microsoft.VisualStudio.Services.VSIXPackage";
+  sha256 = sha256;
+  # The `*.vsix` file is in the end a simple zip file. Change the extension
+  # so that existing `unzip` hooks takes care of the unpacking.
+  name = "${publisher}-${name}.zip";
+}
diff --git a/nixpkgs/pkgs/misc/vscode-extensions/ms-dotnettools-csharp/default.nix b/nixpkgs/pkgs/misc/vscode-extensions/ms-dotnettools-csharp/default.nix
new file mode 100644
index 000000000000..a7b0e17ecbfb
--- /dev/null
+++ b/nixpkgs/pkgs/misc/vscode-extensions/ms-dotnettools-csharp/default.nix
@@ -0,0 +1,143 @@
+{ lib
+, fetchurl
+, vscode-utils
+, unzip
+, patchelf
+, makeWrapper
+, icu
+, stdenv
+, openssl
+, mono6
+}:
+
+let
+  # Get as close as possible as the `package.json` required version.
+  # This is what drives omnisharp.
+  mono = mono6;
+
+  rtDepsSrcsFromJson = builtins.fromJSON (builtins.readFile ./rt-deps-bin-srcs.json);
+
+  rtDepsBinSrcs = builtins.mapAttrs (k: v:
+      let
+        # E.g: "OmniSharp-x86_64-linux"
+        kSplit = builtins.split "(-)" k;
+        name = builtins.elemAt kSplit 0;
+        arch = builtins.elemAt kSplit 2;
+        platform = builtins.elemAt kSplit 4;
+      in
+      {
+        inherit name arch platform;
+        installPath = v.installPath;
+        binaries = v.binaries;
+        bin-src = fetchurl {
+          urls = v.urls;
+          inherit (v) sha256;
+        };
+      }
+    )
+    rtDepsSrcsFromJson;
+
+  arch = "x86_64";
+  platform = "linux";
+
+  rtDepBinSrcByName = bSrcName:
+    rtDepsBinSrcs."${bSrcName}-${arch}-${platform}";
+
+  omnisharp = rtDepBinSrcByName "OmniSharp";
+  vsdbg = rtDepBinSrcByName "Debugger";
+  razor = rtDepBinSrcByName "Razor";
+in
+
+vscode-utils.buildVscodeMarketplaceExtension {
+  mktplcRef = {
+    name = "csharp";
+    publisher = "ms-dotnettools";
+    version = "1.23.2";
+    sha256 = "0ydaiy8jfd1bj50bqiaz5wbl7r6qwmbz9b29bydimq0rdjgapaar";
+  };
+
+  nativeBuildInputs = [
+    unzip
+    patchelf
+    makeWrapper
+  ];
+
+  postPatch = ''
+    declare ext_unique_id
+    # See below as to why we cannot take the whole basename.
+    ext_unique_id="$(basename "$out" | head -c 32)"
+
+    # Fix 'Unable to connect to debuggerEventsPipeName .. exceeds the maximum length 107.' when
+    # attempting to launch a specific test in debug mode. The extension attemps to open
+    # a pipe in extension dir which would fail anyway. We change to target file path
+    # to a path in tmp dir with a short name based on the unique part of the nix store path.
+    # This is however a brittle patch as we're working on minified code.
+    # Hence the attempt to only hold on stable names.
+    # However, this really would better be fixed upstream.
+    sed -i \
+      -E -e 's/(this\._pipePath=[a-zA-Z0-9_]+\.join\()([a-zA-Z0-9_]+\.getExtensionPath\(\)[^,]*,)/\1require("os").tmpdir(), "'"$ext_unique_id"'"\+/g' \
+      "$PWD/dist/extension.js"
+
+    unzip_to() {
+      declare src_zip="''${1?}"
+      declare target_dir="''${2?}"
+      mkdir -p "$target_dir"
+      if unzip "$src_zip" -d "$target_dir"; then
+        true
+      elif [[ "1" -eq "$?" ]]; then
+        1>&2 echo "WARNING: unzip('$?' -> skipped files)."
+      else
+        1>&2 echo "ERROR: unzip('$?')."
+      fi
+    }
+
+    patchelf_add_icu_as_needed() {
+      declare elf="''${1?}"
+      declare icu_major_v="${
+        with builtins; head (splitVersion (parseDrvName icu.name).version)}"
+
+      for icu_lib in icui18n icuuc icudata; do
+        patchelf --add-needed "lib''${icu_lib}.so.$icu_major_v" "$elf"
+      done
+    }
+
+    patchelf_common() {
+      declare elf="''${1?}"
+
+      patchelf_add_icu_as_needed "$elf"
+      patchelf --add-needed "libssl.so" "$elf"
+      patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
+        --set-rpath "${lib.makeLibraryPath [ stdenv.cc.cc openssl.out icu.out ]}:\$ORIGIN" \
+        "$elf"
+    }
+
+    declare omnisharp_dir="$PWD/${omnisharp.installPath}"
+    unzip_to "${omnisharp.bin-src}" "$omnisharp_dir"
+    rm "$omnisharp_dir/bin/mono"
+    ln -s -T "${mono6}/bin/mono" "$omnisharp_dir/bin/mono"
+    chmod a+x "$omnisharp_dir/run"
+    touch "$omnisharp_dir/install.Lock"
+
+    declare vsdbg_dir="$PWD/${vsdbg.installPath}"
+    unzip_to "${vsdbg.bin-src}" "$vsdbg_dir"
+    chmod a+x "$vsdbg_dir/vsdbg-ui"
+    chmod a+x "$vsdbg_dir/vsdbg"
+    touch "$vsdbg_dir/install.complete"
+    touch "$vsdbg_dir/install.Lock"
+    patchelf_common "$vsdbg_dir/vsdbg"
+    patchelf_common "$vsdbg_dir/vsdbg-ui"
+
+    declare razor_dir="$PWD/${razor.installPath}"
+    unzip_to "${razor.bin-src}" "$razor_dir"
+    chmod a+x "$razor_dir/rzls"
+    touch "$razor_dir/install.Lock"
+    patchelf_common "$razor_dir/rzls"
+  '';
+
+  meta = with lib; {
+    description = "C# for Visual Studio Code (powered by OmniSharp)";
+    license = licenses.mit;
+    maintainers = [ maintainers.jraygauthier ];
+    platforms = [ "x86_64-linux" ];
+  };
+}
diff --git a/nixpkgs/pkgs/misc/vscode-extensions/ms-dotnettools-csharp/rt-deps-bin-srcs.json b/nixpkgs/pkgs/misc/vscode-extensions/ms-dotnettools-csharp/rt-deps-bin-srcs.json
new file mode 100644
index 000000000000..91ee056efc1f
--- /dev/null
+++ b/nixpkgs/pkgs/misc/vscode-extensions/ms-dotnettools-csharp/rt-deps-bin-srcs.json
@@ -0,0 +1,37 @@
+{
+  "OmniSharp-x86_64-linux": {
+    "installPath": ".omnisharp/1.37.1",
+    "binaries": [
+      "./mono.linux-x86_64",
+      "./run"
+    ],
+    "urls": [
+      "https://download.visualstudio.microsoft.com/download/pr/46933d64-075c-4f9f-b205-da4a839e2e3c/4bba2c3f40106056b53721c164ff86fa/omnisharp-linux-x64-1.37.1.zip",
+      "https://roslynomnisharp.blob.core.windows.net/releases/1.37.1/omnisharp-linux-x64-1.37.1.zip"
+    ],
+    "sha256": "0yzxkbq0fyq2bv0s7qmycxl0w54lla0vykg1a5lpv9j38k062vvz"
+  },
+  "Debugger-x86_64-linux": {
+    "installPath": ".debugger",
+    "binaries": [
+      "./vsdbg-ui",
+      "./vsdbg"
+    ],
+    "urls": [
+      "https://download.visualstudio.microsoft.com/download/pr/292d2e01-fb93-455f-a6b3-76cddad4f1ef/2e9b8bc5431d8f6c56025e76eaabbdff/coreclr-debug-linux-x64.zip",
+      "https://vsdebugger.blob.core.windows.net/coreclr-debug-1-22-2/coreclr-debug-linux-x64.zip"
+    ],
+    "sha256": "1lhyjq6g6lc1b4n4z57g0ssr5msqgsmrl8yli8j9ah5s3jq1lrda"
+  },
+  "Razor-x86_64-linux": {
+    "installPath": ".razor",
+    "binaries": [
+      "./rzls"
+    ],
+    "urls": [
+      "https://download.visualstudio.microsoft.com/download/pr/757f5246-2b09-43fe-9a8d-840cfd15092b/2b6d8eee0470acf725c1c7a09f8b6475/razorlanguageserver-linux-x64-6.0.0-alpha.1.20418.9.zip",
+      "https://razorvscodetest.blob.core.windows.net/languageserver/RazorLanguageServer-linux-x64-6.0.0-alpha.1.20418.9.zip"
+    ],
+    "sha256": "1hksxq867anb9h040497phszq64f6krg4a46w0xqrm6crj8znqr5"
+  }
+}
diff --git a/nixpkgs/pkgs/misc/vscode-extensions/ms-dotnettools-csharp/update-bin-srcs b/nixpkgs/pkgs/misc/vscode-extensions/ms-dotnettools-csharp/update-bin-srcs
new file mode 100755
index 000000000000..ecd7efba05d8
--- /dev/null
+++ b/nixpkgs/pkgs/misc/vscode-extensions/ms-dotnettools-csharp/update-bin-srcs
@@ -0,0 +1,25 @@
+#!/usr/bin/env nix-shell
+#!nix-shell -I nixpkgs=../../../.. -i bash -p curl jq unzip
+set -euf -o pipefail
+
+declare scriptDir
+scriptDir=$(cd "$(dirname "$0")"; pwd)
+1>&2 echo "scriptDir='$scriptDir'"
+
+. "$scriptDir/update-bin-srcs-lib.sh"
+
+declare extPublisher="ms-dotnettools"
+declare extName="csharp"
+declare defaultExtVersion="1.23.2"
+declare extVersion="${1:-$defaultExtVersion}"
+
+formatExtRuntimeDeps \
+  "$extPublisher" "$extName" "$extVersion" \
+  | computeAndAttachExtRtDepsChecksums \
+  | jqStreamToJson \
+  | tee "$scriptDir/rt-deps-bin-srcs.json" \
+  | jq '.'
+
+# TODO: Unfortunatly no simple json to nix implementation available.
+# This would allow us to dump to './rt-deps-bin-srcs.nix' instead.
+# jsonToNix
diff --git a/nixpkgs/pkgs/misc/vscode-extensions/ms-dotnettools-csharp/update-bin-srcs-lib.sh b/nixpkgs/pkgs/misc/vscode-extensions/ms-dotnettools-csharp/update-bin-srcs-lib.sh
new file mode 100755
index 000000000000..ad494a37908a
--- /dev/null
+++ b/nixpkgs/pkgs/misc/vscode-extensions/ms-dotnettools-csharp/update-bin-srcs-lib.sh
@@ -0,0 +1,154 @@
+#!/usr/bin/env bash
+
+prefetchExtensionZip() {
+  declare publisher="${1?}"
+  declare name="${2?}"
+  declare version="${3?}"
+
+  1>&2 echo
+  1>&2 echo "------------- Downloading extension ---------------"
+
+  declare extZipStoreName="${publisher}-${name}.zip"
+  declare extUrl="https://${publisher}.gallery.vsassets.io/_apis/public/gallery/publisher/${publisher}/extension/${name}/${version}/assetbyname/Microsoft.VisualStudio.Services.VSIXPackage";
+  1>&2 echo "extUrl='$extUrl'"
+  declare nixPrefetchArgs=( --name "$extZipStoreName" --print-path "$extUrl" )
+
+  1>&2 printf "$ nix-prefetch-url"
+  1>&2 printf " %q" "${nixPrefetchArgs[@]}"
+  1>&2 printf " 2> /dev/null\n"
+  declare zipShaWStorePath
+  zipShaWStorePath=$(nix-prefetch-url "${nixPrefetchArgs[@]}" 2> /dev/null)
+
+  1>&2 echo "zipShaWStorePath='$zipShaWStorePath'"
+  echo "$zipShaWStorePath"
+}
+
+
+prefetchExtensionUnpacked() {
+  declare publisher="${1?}"
+  declare name="${2?}"
+  declare version="${3?}"
+
+  declare zipShaWStorePath
+  zipShaWStorePath="$(prefetchExtensionZip "$publisher" "$name" "$version")"
+
+  declare zipStorePath
+  zipStorePath="$(echo "$zipShaWStorePath" | tail -n1)"
+  1>&2 echo "zipStorePath='$zipStorePath'"
+
+  function rm_tmpdir() {
+    1>&2 printf "rm -rf -- %q\n" "$tmpDir"
+    rm -rf -- "$tmpDir"
+    unset tmpDir
+    trap - INT TERM HUP EXIT
+  }
+  function make_trapped_tmpdir() {
+    tmpDir=$(mktemp -d)
+    trap rm_tmpdir INT TERM HUP EXIT
+  }
+
+  1>&2 echo
+  1>&2 echo "------------- Unpacking extension ---------------"
+
+  make_trapped_tmpdir
+  declare unzipArgs=( -q -d "$tmpDir" "$zipStorePath" )
+  1>&2 printf "$ unzip"
+  1>&2 printf " %q" "${unzipArgs[@]}"
+  1>&2 printf "\n"
+  unzip "${unzipArgs[@]}"
+
+  declare unpackedStoreName="${publisher}-${name}"
+
+  declare unpackedStorePath
+  unpackedStorePath="$(nix add-to-store -n "$unpackedStoreName" "$tmpDir")"
+  declare unpackedSha256
+  unpackedSha256="$(nix hash-path --base32 --type sha256 "$unpackedStorePath")"
+  1>&2 echo "unpackedStorePath='$unpackedStorePath'"
+  1>&2 echo "unpackedSha256='$unpackedSha256'"
+
+  rm_tmpdir
+
+  echo "$unpackedSha256"
+  echo "$unpackedStorePath"
+}
+
+
+prefetchExtensionJson() {
+  declare publisher="${1?}"
+  declare name="${2?}"
+  declare version="${3?}"
+
+  declare unpackedShaWStorePath
+  unpackedShaWStorePath="$(prefetchExtensionUnpacked "$publisher" "$name" "$version")"
+
+  declare unpackedStorePath
+  unpackedStorePath="$(echo "$unpackedShaWStorePath" | tail -n1)"
+  1>&2 echo "unpackedStorePath='$unpackedStorePath'"
+
+  declare jsonShaWStorePath
+  jsonShaWStorePath=$(nix-prefetch-url --print-path "file://${unpackedStorePath}/extension/package.json" 2> /dev/null)
+
+  1>&2 echo "jsonShaWStorePath='$jsonShaWStorePath'"
+  echo "$jsonShaWStorePath"
+}
+
+
+formatExtRuntimeDeps() {
+  declare publisher="${1?}"
+  declare name="${2?}"
+  declare version="${3?}"
+
+  declare jsonShaWStorePath
+  jsonShaWStorePath="$(prefetchExtensionJson "$publisher" "$name" "$version")"
+
+  declare jsonStorePath
+  jsonStorePath="$(echo "$jsonShaWStorePath" | tail -n1)"
+  1>&2 echo "jsonStorePath='$jsonStorePath'"
+
+  declare jqQuery
+  jqQuery=$(cat <<'EOF'
+.runtimeDependencies \
+| map(select(.platforms[] | in({"linux": null}))) \
+| map(select(.architectures[] | in({"x86_64": null}))) \
+| .[] | {(.id + "-" + (.architectures[0]) + "-" + (.platforms[0])): \
+{installPath, binaries, urls: [.url, .fallbackUrl]}}
+EOF
+)
+
+  1>&2 printf "$ cat %q | jq '%s'\n" "$jsonStorePath" "$jqQuery"
+  cat "$jsonStorePath" | jq "$jqQuery"
+}
+
+
+computeExtRtDepChecksum() {
+  declare rtDepJsonObject="${1?}"
+  declare url
+  url="$(echo "$rtDepJsonObject" | jq -j '.[].urls[0]')"
+  declare sha256
+  1>&2 printf "$ nix-prefetch-url '%s'\n" "$url"
+  sha256="$(nix-prefetch-url "$url")"
+  1>&2 echo "$sha256"
+  echo "$sha256"
+}
+
+
+computeAndAttachExtRtDepsChecksums() {
+  while read -r rtDepJsonObject; do
+    declare sha256
+    sha256="$(computeExtRtDepChecksum "$rtDepJsonObject")"
+    echo "$rtDepJsonObject" | jq --arg sha256 "$sha256" '.[].sha256 = $sha256'
+  done < <(cat - | jq  -c '.')
+}
+
+
+jqStreamToJson() {
+  cat - | jq --slurp '. | add'
+}
+
+
+jsonToNix() {
+  # TODO: Replacing this non functional stuff with a proper json to nix
+  # implementation would allow us to produce a 'rt-deps-bin-srcs.nix' file instead.
+  false
+  cat - | sed -E -e 's/": /" = /g' -e 's/,$/;/g' -e 's/  }$/  };/g'  -e 's/  ]$/  ];/g'
+}
diff --git a/nixpkgs/pkgs/misc/vscode-extensions/ms-vsliveshare-vsliveshare/default.nix b/nixpkgs/pkgs/misc/vscode-extensions/ms-vsliveshare-vsliveshare/default.nix
new file mode 100644
index 000000000000..a307ed57019d
--- /dev/null
+++ b/nixpkgs/pkgs/misc/vscode-extensions/ms-vsliveshare-vsliveshare/default.nix
@@ -0,0 +1,134 @@
+# Based on previous attempts:
+#  -  <https://github.com/msteen/nixos-vsliveshare/blob/master/pkgs/vsliveshare/default.nix>
+#  -  <https://github.com/NixOS/nixpkgs/issues/41189>
+{ lib, gccStdenv, vscode-utils
+, jq, autoPatchelfHook, bash, makeWrapper
+, dotnet-sdk_3, curl, gcc, icu, libkrb5, libsecret, libunwind, libX11, lttng-ust, openssl, util-linux, zlib
+, desktop-file-utils, xprop, xsel
+}:
+
+with lib;
+
+let
+  # https://docs.microsoft.com/en-us/visualstudio/liveshare/reference/linux#install-prerequisites-manually
+  libs = [
+    # .NET Core
+    openssl
+    libkrb5
+    zlib
+    icu
+
+    # Credential Storage
+    libsecret
+
+    # NodeJS
+    libX11
+
+    # https://github.com/flathub/com.visualstudio.code.oss/issues/11#issuecomment-392709170
+    libunwind
+    lttng-ust
+    curl
+
+    # General
+    gcc.cc.lib
+    util-linux # libuuid
+  ];
+
+in ((vscode-utils.override { stdenv = gccStdenv; }).buildVscodeMarketplaceExtension {
+  mktplcRef = {
+    name = "vsliveshare";
+    publisher = "ms-vsliveshare";
+    version = "1.0.4070";
+    sha256 = "18dddaz5g0kbrmj9l9k0fivdj6p6y5a6iw24ikvzmypz8zql7gd5";
+  };
+}).overrideAttrs({ nativeBuildInputs ? [], buildInputs ? [], ... }: {
+  nativeBuildInputs = nativeBuildInputs ++ [
+    bash
+    jq
+    autoPatchelfHook
+    makeWrapper
+  ];
+  buildInputs = buildInputs ++ libs;
+
+  # Using a patch file won't work, because the file changes too often, causing the patch to fail on most updates.
+  # Rather than patching the calls to functions, we modify the functions to return what we want,
+  # which is less likely to break in the future.
+  postPatch = ''
+    sed -i \
+      -e 's/updateExecutablePermissionsAsync() {/& return;/' \
+      -e 's/isInstallCorrupt(traceSource, manifest) {/& return false;/' \
+      out/prod/extension-prod.js
+
+    declare ext_unique_id
+    ext_unique_id="$(basename "$out")"
+
+    # Fix extension attempting to write to 'modifiedInternalSettings.json'.
+    # Move this write to the tmp directory indexed by the nix store basename.
+    substituteInPlace out/prod/extension-prod.js \
+      --replace "path.resolve(constants_1.EXTENSION_ROOT_PATH, './modifiedInternalSettings.json')" \
+                "path.join(os.tmpdir(), '$ext_unique_id-modifiedInternalSettings.json')"
+
+    # Fix extension attempting to write to 'vsls-agent.lock'.
+    # Move this write to the tmp directory indexed by the nix store basename.
+    substituteInPlace out/prod/extension-prod.js \
+      --replace "path + '.lock'" \
+                "__webpack_require__('path').join(__webpack_require__('os').tmpdir(), '$ext_unique_id-vsls-agent.lock')"
+
+    # Hardcode executable paths
+    echo '#!/bin/sh' >node_modules/@vsliveshare/vscode-launcher-linux/check-reqs.sh
+    substituteInPlace node_modules/@vsliveshare/vscode-launcher-linux/install.sh \
+      --replace desktop-file-install ${desktop-file-utils}/bin/desktop-file-install
+    substituteInPlace node_modules/@vsliveshare/vscode-launcher-linux/uninstall.sh \
+      --replace update-desktop-database ${desktop-file-utils}/bin/update-desktop-database
+    substituteInPlace node_modules/@vsliveshare/vscode-launcher-linux/vsls-launcher \
+      --replace /bin/bash ${bash}/bin/bash
+    substituteInPlace out/prod/extension-prod.js \
+      --replace xprop ${xprop}/bin/xprop \
+      --replace "'xsel'" "'${xsel}/bin/xsel'"
+  '';
+
+  postInstall = ''
+    cd $out/share/vscode/extensions/ms-vsliveshare.vsliveshare
+
+    bash -s <<ENDSUBSHELL
+    shopt -s extglob
+
+    # A workaround to prevent the journal filling up due to diagnostic logging.
+    # See: https://github.com/MicrosoftDocs/live-share/issues/1272
+    # See: https://unix.stackexchange.com/questions/481799/how-to-prevent-a-process-from-writing-to-the-systemd-journal
+    gcc -fPIC -shared -ldl -o dotnet_modules/noop-syslog.so ${./noop-syslog.c}
+
+    # Normally the copying of the right executables is done externally at a later time,
+    # but we want it done at installation time.
+    cp dotnet_modules/exes/linux-x64/* dotnet_modules
+
+    # The required executables are already copied over,
+    # and the other runtimes won't be used and thus are just a waste of space.
+    rm -r dotnet_modules/exes dotnet_modules/runtimes/!(linux-x64|unix)
+
+    # Not all executables and libraries are executable, so make sure that they are.
+    jq <package.json '.executables.linux[]' -r | xargs chmod +x
+
+    # Lock the extension downloader.
+    touch install-linux.Lock externalDeps-linux.Lock
+    ENDSUBSHELL
+  '';
+
+  postFixup = ''
+    # We cannot use `wrapProgram`, because it will generate a relative path,
+    # which will break when copying over the files.
+    mv dotnet_modules/vsls-agent{,-wrapped}
+    makeWrapper $PWD/dotnet_modules/vsls-agent{-wrapped,} \
+      --prefix LD_LIBRARY_PATH : "${makeLibraryPath libs}" \
+      --set LD_PRELOAD $PWD/dotnet_modules/noop-syslog.so \
+      --set DOTNET_ROOT ${dotnet-sdk_3}
+  '';
+
+  meta = {
+    description = "Live Share lets you achieve greater confidence at speed by streamlining collaborative editing, debugging, and more in real-time during development";
+    homepage = "https://aka.ms/vsls-docs";
+    license = licenses.unfree;
+    maintainers = with maintainers; [ jraygauthier ];
+    platforms = [ "x86_64-linux" ];
+  };
+})
diff --git a/nixpkgs/pkgs/misc/vscode-extensions/ms-vsliveshare-vsliveshare/noop-syslog.c b/nixpkgs/pkgs/misc/vscode-extensions/ms-vsliveshare-vsliveshare/noop-syslog.c
new file mode 100644
index 000000000000..c76ec57a3820
--- /dev/null
+++ b/nixpkgs/pkgs/misc/vscode-extensions/ms-vsliveshare-vsliveshare/noop-syslog.c
@@ -0,0 +1 @@
+void syslog(int priority, const char *format, ...) { }
diff --git a/nixpkgs/pkgs/misc/vscode-extensions/python/default.nix b/nixpkgs/pkgs/misc/vscode-extensions/python/default.nix
new file mode 100644
index 000000000000..1d86f82d278f
--- /dev/null
+++ b/nixpkgs/pkgs/misc/vscode-extensions/python/default.nix
@@ -0,0 +1,93 @@
+{ lib, stdenv, fetchurl, vscode-utils, extractNuGet
+, icu, curl, openssl, lttng-ust, autoPatchelfHook
+, python3, musl
+, pythonUseFixed ? false       # When `true`, the python default setting will be fixed to specified.
+                               # Use version from `PATH` for default setting otherwise.
+                               # Defaults to `false` as we expect it to be project specific most of the time.
+, ctagsUseFixed ? true, ctags  # When `true`, the ctags default setting will be fixed to specified.
+                               # Use version from `PATH` for default setting otherwise.
+                               # Defaults to `true` as usually not defined on a per projet basis.
+}:
+
+assert ctagsUseFixed -> null != ctags;
+
+let
+  pythonDefaultsTo = if pythonUseFixed then "${python3}/bin/python" else "python";
+  ctagsDefaultsTo = if ctagsUseFixed then "${ctags}/bin/ctags" else "ctags";
+
+  # The arch tag comes from 'PlatformName' defined here:
+  # https://github.com/Microsoft/vscode-python/blob/master/src/client/activation/types.ts
+  arch =
+    if stdenv.isLinux && stdenv.isx86_64 then "linux-x64"
+    else if stdenv.isDarwin then "osx-x64"
+    else throw "Only x86_64 Linux and Darwin are supported.";
+
+  languageServerSha256 = {
+    linux-x64 = "1pmj5pb4xylx4gdx4zgmisn0si59qx51n2m1bh7clv29q6biw05n";
+    osx-x64 = "0ishiy1z9dghj4ryh95vy8rw0v7q4birdga2zdb4a8am31wmp94b";
+  }.${arch};
+
+  # version is languageServerVersion in the package.json
+  languageServer = extractNuGet rec {
+    name = "Python-Language-Server";
+    version = "0.5.30";
+
+    src = fetchurl {
+      url = "https://pvsc.azureedge.net/python-language-server-stable/${name}-${arch}.${version}.nupkg";
+      sha256 = languageServerSha256;
+    };
+  };
+in vscode-utils.buildVscodeMarketplaceExtension rec {
+  mktplcRef = {
+    name = "python";
+    publisher = "ms-python";
+    version = "2020.9.114305";
+  };
+
+  vsix = fetchurl {
+    name = "${mktplcRef.publisher}-${mktplcRef.name}.zip";
+    url = "https://github.com/microsoft/vscode-python/releases/download/${mktplcRef.version}/ms-python-release.vsix";
+    sha256 = "1vh0wvfvzszc58lw7dbl60knpm5l6rrsghfchhn5dvwyadx4a33h";
+  };
+
+  buildInputs = [
+    icu
+    curl
+    openssl
+    lttng-ust
+    musl
+  ];
+
+  nativeBuildInputs = [
+    autoPatchelfHook
+    python3.pkgs.wrapPython
+  ];
+
+  pythonPath = with python3.pkgs; [
+    setuptools
+  ];
+
+  postPatch = ''
+    # Patch `packages.json` so that nix's *python* is used as default value for `python.pythonPath`.
+    substituteInPlace "./package.json" \
+      --replace "\"default\": \"python\"" "\"default\": \"${pythonDefaultsTo}\""
+
+    # Patch `packages.json` so that nix's *ctags* is used as default value for `python.workspaceSymbols.ctagsPath`.
+    substituteInPlace "./package.json" \
+      --replace "\"default\": \"ctags\"" "\"default\": \"${ctagsDefaultsTo}\""
+  '';
+
+  postInstall = ''
+    mkdir -p "$out/$installPrefix/languageServer.${languageServer.version}"
+    cp -R --no-preserve=ownership ${languageServer}/* "$out/$installPrefix/languageServer.${languageServer.version}"
+    chmod -R +wx "$out/$installPrefix/languageServer.${languageServer.version}"
+
+    patchPythonScript "$out/$installPrefix/pythonFiles/lib/python/isort/main.py"
+  '';
+
+  meta = with lib; {
+    license = licenses.mit;
+    platforms = [ "x86_64-linux" ];
+    maintainers = [ maintainers.jraygauthier ];
+  };
+}
diff --git a/nixpkgs/pkgs/misc/vscode-extensions/python/extract-nuget.nix b/nixpkgs/pkgs/misc/vscode-extensions/python/extract-nuget.nix
new file mode 100644
index 000000000000..1e70cabe0358
--- /dev/null
+++ b/nixpkgs/pkgs/misc/vscode-extensions/python/extract-nuget.nix
@@ -0,0 +1,15 @@
+{ stdenv, unzip }:
+{ name, version, src, ... }:
+
+stdenv.mkDerivation {
+  inherit name version src;
+
+  nativeBuildInputs = [ unzip ];
+  dontBuild = true;
+  unpackPhase = "unzip $src";
+  installPhase = ''
+    mkdir -p "$out"
+    chmod -R +w .
+    find . -mindepth 1 -maxdepth 1 | xargs cp -a -t "$out"
+  '';
+}
diff --git a/nixpkgs/pkgs/misc/vscode-extensions/remote-ssh/default.nix b/nixpkgs/pkgs/misc/vscode-extensions/remote-ssh/default.nix
new file mode 100644
index 000000000000..746bb4608ab8
--- /dev/null
+++ b/nixpkgs/pkgs/misc/vscode-extensions/remote-ssh/default.nix
@@ -0,0 +1,55 @@
+{ lib
+, vscode-utils
+, useLocalExtensions ? false}:
+# Note that useLocalExtensions requires that vscode-server is not running
+# on host. If it is, you'll need to remove ~/.vscode-server,
+# and redo the install by running "Connect to host" on client
+
+let
+  inherit (vscode-utils) buildVscodeMarketplaceExtension;
+
+  # patch runs on remote machine hence use of which
+  # links to local node if version is 12
+  patch = ''
+    f="/home/''$USER/.vscode-server/bin/''$COMMIT_ID/node"
+    localNodePath=''$(which node)
+    if [ -x "''$localNodePath" ]; then
+      localNodeVersion=''$(node -v)
+      if [ "\''${localNodeVersion:1:2}" = "12" ]; then
+        echo PATCH: replacing ''$f with ''$localNodePath
+        rm ''$f
+        ln -s ''$localNodePath ''$f
+      fi
+    fi
+    ${lib.optionalString useLocalExtensions ''
+      # Use local extensions
+      if [ -d ~/.vscode/extensions ]; then
+        if ! test -L "~/.vscode-server/extensions"; then
+          mkdir -p ~/.vscode-server
+          ln -s ~/.vscode/extensions ~/.vscode-server/
+        fi
+      fi
+    ''}
+  '';
+in
+  buildVscodeMarketplaceExtension {
+    mktplcRef = {
+      name = "remote-ssh";
+      publisher = "ms-vscode-remote";
+      version = "0.50.0";
+      sha256 = "01pyd6759p5nkjhjy3iplrl748xblr54l1jphk2g02s1n5ds2qb9";
+    };
+
+    postPatch = ''
+      substituteInPlace "out/extension.js" \
+        --replace "# install extensions" '${patch}'
+    '';
+
+    meta = with lib; {
+      description ="Use any remote machine with a SSH server as your development environment.";
+      license = licenses.unfree;
+      maintainers = with maintainers; [
+        tbenst
+      ];
+    };
+  }
diff --git a/nixpkgs/pkgs/misc/vscode-extensions/rust-analyzer/build-deps/package.json b/nixpkgs/pkgs/misc/vscode-extensions/rust-analyzer/build-deps/package.json
new file mode 100644
index 000000000000..ece623b53c36
--- /dev/null
+++ b/nixpkgs/pkgs/misc/vscode-extensions/rust-analyzer/build-deps/package.json
@@ -0,0 +1,27 @@
+{
+  "name": "rust-analyzer",
+  "version": "0.4.0-dev",
+  "dependencies": {
+    "https-proxy-agent": "^5.0.0",
+    "node-fetch": "^2.6.1",
+    "vscode-languageclient": "^7.1.0-next.4",
+    "@rollup/plugin-commonjs": "^17.0.0",
+    "@rollup/plugin-node-resolve": "^11.0.0",
+    "@types/glob": "^7.1.3",
+    "@types/mocha": "^8.0.4",
+    "@types/node": "~12.12.6",
+    "@types/node-fetch": "^2.5.7",
+    "@types/vscode": "^1.53.0",
+    "@typescript-eslint/eslint-plugin": "^4.9.0",
+    "@typescript-eslint/parser": "^4.9.0",
+    "eslint": "^7.15.0",
+    "glob": "^7.1.6",
+    "mocha": "^8.2.1",
+    "rollup": "^2.34.2",
+    "tslib": "^2.0.3",
+    "typescript": "^4.1.2",
+    "typescript-formatter": "^7.2.2",
+    "vsce": "^1.85.0",
+    "vscode-test": "^1.5.1"
+  }
+}
diff --git a/nixpkgs/pkgs/misc/vscode-extensions/rust-analyzer/default.nix b/nixpkgs/pkgs/misc/vscode-extensions/rust-analyzer/default.nix
new file mode 100644
index 000000000000..0136bf4e5b1b
--- /dev/null
+++ b/nixpkgs/pkgs/misc/vscode-extensions/rust-analyzer/default.nix
@@ -0,0 +1,49 @@
+# Update script: pkgs/development/tools/rust/rust-analyzer/update.sh
+{ lib, vscode-utils, jq, rust-analyzer, nodePackages
+, setDefaultServerPath ? true
+}:
+
+let
+  pname = "rust-analyzer";
+  publisher = "matklad";
+
+  # Follow the unstable version of rust-analyzer, since the extension is not stable yet.
+  inherit (rust-analyzer) version;
+
+  build-deps = nodePackages."rust-analyzer-build-deps-../../misc/vscode-extensions/rust-analyzer/build-deps";
+  # FIXME: Making a new derivation to link `node_modules` and run `npm run package`
+  # will cause a build failure.
+  vsix = build-deps.override {
+    src = "${rust-analyzer.src}/editors/code";
+    outputs = [ "vsix" "out" ];
+
+    postInstall = ''
+      npm run package
+      mkdir $vsix
+      cp ${pname}.vsix $vsix/${pname}.zip
+    '';
+  };
+
+in vscode-utils.buildVscodeExtension {
+  inherit version vsix;
+  name = "${pname}-${version}";
+  src = "${vsix}/${pname}.zip";
+  vscodeExtUniqueId = "${publisher}.${pname}";
+
+  nativeBuildInputs = lib.optional setDefaultServerPath jq;
+
+  preInstall = lib.optionalString setDefaultServerPath ''
+    jq '.contributes.configuration.properties."rust-analyzer.serverPath".default = $s' \
+      --arg s "${rust-analyzer}/bin/rust-analyzer" \
+      package.json >package.json.new
+    mv package.json.new package.json
+  '';
+
+  meta = with lib; {
+    description = "An alternative rust language server to the RLS";
+    homepage = "https://github.com/rust-analyzer/rust-analyzer";
+    license = with licenses; [ mit asl20 ];
+    maintainers = with maintainers; [ oxalica ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/misc/vscode-extensions/terraform/default.nix b/nixpkgs/pkgs/misc/vscode-extensions/terraform/default.nix
new file mode 100644
index 000000000000..fbfb7c06dc5e
--- /dev/null
+++ b/nixpkgs/pkgs/misc/vscode-extensions/terraform/default.nix
@@ -0,0 +1,25 @@
+{ lib, fetchurl, vscode-utils, terraform-ls }:
+vscode-utils.buildVscodeMarketplaceExtension rec {
+  mktplcRef = {
+    name = "terraform";
+    publisher = "hashicorp";
+    version = "2.9.1";
+  };
+
+  vsix = fetchurl {
+    name = "${mktplcRef.publisher}-${mktplcRef.name}.zip";
+    url = "https://github.com/hashicorp/vscode-terraform/releases/download/v${mktplcRef.version}/terraform-${mktplcRef.version}.vsix";
+    sha256 = "1i4pzxw57hf2g7x62hfsb588b1lz3zjjh8ny96qqrif2bj2h887z";
+  };
+
+  patches = [ ./fix-terraform-ls.patch ];
+
+  postPatch = ''
+    substituteInPlace out/extension.js --replace TERRAFORM-LS-PATH ${terraform-ls}/bin/terraform-ls
+  '';
+
+  meta = with lib; {
+    license = licenses.mit;
+    maintainers = with maintainers; [ rhoriguchi ];
+  };
+}
diff --git a/nixpkgs/pkgs/misc/vscode-extensions/terraform/fix-terraform-ls.patch b/nixpkgs/pkgs/misc/vscode-extensions/terraform/fix-terraform-ls.patch
new file mode 100644
index 000000000000..d91ffcc17ab4
--- /dev/null
+++ b/nixpkgs/pkgs/misc/vscode-extensions/terraform/fix-terraform-ls.patch
@@ -0,0 +1,38 @@
+diff --git a/out/extension.js b/out/extension.js
+index e44cef2..fba0899 100644
+--- a/out/extension.js
++++ b/out/extension.js
+@@ -141,24 +141,6 @@ function updateLanguageServer() {
+     return __awaiter(this, void 0, void 0, function* () {
+         const delay = 1000 * 60 * 24;
+         setTimeout(updateLanguageServer, delay); // check for new updates every 24hrs
+-        // skip install if a language server binary path is set
+-        if (!vscodeUtils_1.config('terraform').get('languageServer.pathToBinary')) {
+-            const installer = new languageServerInstaller_1.LanguageServerInstaller(installPath, reporter);
+-            const install = yield installer.needsInstall();
+-            if (install) {
+-                yield stopClients();
+-                try {
+-                    yield installer.install();
+-                }
+-                catch (err) {
+-                    reporter.sendTelemetryException(err);
+-                    throw err;
+-                }
+-                finally {
+-                    yield installer.cleanupZips();
+-                }
+-            }
+-        }
+         return startClients(); // on repeat runs with no install, this will be a no-op
+     });
+ }
+@@ -256,7 +238,7 @@ function pathToBinary() {
+                 reporter.sendTelemetryEvent('usePathToBinary');
+             }
+             else {
+-                command = path.join(installPath, 'terraform-ls');
++                command = 'TERRAFORM-LS-PATH';
+             }
+             _pathToBinaryPromise = Promise.resolve(command);
+         }
diff --git a/nixpkgs/pkgs/misc/vscode-extensions/updateSettings.nix b/nixpkgs/pkgs/misc/vscode-extensions/updateSettings.nix
new file mode 100644
index 000000000000..c7fecf080720
--- /dev/null
+++ b/nixpkgs/pkgs/misc/vscode-extensions/updateSettings.nix
@@ -0,0 +1,39 @@
+# Updates the vscode setting file base on a nix expression
+# should run from the workspace root.
+{ writeShellScriptBin
+, lib
+, jq
+}:
+##User Input
+{ settings      ? {}
+# if marked as true will create an empty json file if does not exists
+, createIfDoesNotExists ? true
+, vscodeSettingsFile ? ".vscode/settings.json"
+, userSettingsFolder ? ""
+, symlinkFromUserSetting ? false
+}:
+let
+
+  updateVSCodeSettingsCmd = ''
+  (
+    echo 'updateSettings.nix: Updating ${vscodeSettingsFile}...'
+    oldSettings=$(cat ${vscodeSettingsFile})
+    echo $oldSettings' ${builtins.toJSON settings}' | ${jq}/bin/jq -s add > ${vscodeSettingsFile}
+  )'';
+
+  createEmptySettingsCmd = ''mkdir -p .vscode && echo "{}" > ${vscodeSettingsFile}'';
+  fileName = builtins.baseNameOf vscodeSettingsFile;
+  symlinkFromUserSettingCmd = lib.optionalString symlinkFromUserSetting
+    '' && mkdir -p "${userSettingsFolder}" && ln -sfv "$(pwd)/${vscodeSettingsFile}" "${userSettingsFolder}/" '';
+in
+
+  writeShellScriptBin ''vscodeNixUpdate-${lib.removeSuffix ".json" (fileName)}''
+  (lib.optionalString (settings != {})
+    (if createIfDoesNotExists then ''
+      [ ! -f "${vscodeSettingsFile}" ] && ${createEmptySettingsCmd}
+      ${updateVSCodeSettingsCmd} ${symlinkFromUserSettingCmd}
+    ''
+    else ''[ -f "${vscodeSettingsFile}" ] && ${updateVSCodeSettingsCmd} ${symlinkFromUserSettingCmd}
+    ''
+    )
+  )
diff --git a/nixpkgs/pkgs/misc/vscode-extensions/updateSettingsTest.nix b/nixpkgs/pkgs/misc/vscode-extensions/updateSettingsTest.nix
new file mode 100644
index 000000000000..097b9cad1661
--- /dev/null
+++ b/nixpkgs/pkgs/misc/vscode-extensions/updateSettingsTest.nix
@@ -0,0 +1,6 @@
+with import <nixpkgs>{};
+callPackage (import ./updateSettings.nix) {} {
+  settings = {
+    a = "fdsdf";
+  };
+}
diff --git a/nixpkgs/pkgs/misc/vscode-extensions/update_installed_exts.sh b/nixpkgs/pkgs/misc/vscode-extensions/update_installed_exts.sh
new file mode 100755
index 000000000000..659ed8da791e
--- /dev/null
+++ b/nixpkgs/pkgs/misc/vscode-extensions/update_installed_exts.sh
@@ -0,0 +1,74 @@
+#! /usr/bin/env nix-shell
+#! nix-shell -i bash -p curl jq unzip
+set -eu -o pipefail
+
+# Helper to just fail with a message and non-zero exit code.
+function fail() {
+    echo "$1" >&2
+    exit 1
+}
+
+# Helper to clean up after ourselves if we're killed by SIGINT.
+function clean_up() {
+    TDIR="${TMPDIR:-/tmp}"
+    echo "Script killed, cleaning up tmpdirs: $TDIR/vscode_exts_*" >&2
+    rm -Rf "$TDIR/vscode_exts_*"
+}
+
+function get_vsixpkg() {
+    N="$1.$2"
+
+    # Create a tempdir for the extension download.
+    EXTTMP=$(mktemp -d -t vscode_exts_XXXXXXXX)
+
+    URL="https://$1.gallery.vsassets.io/_apis/public/gallery/publisher/$1/extension/$2/latest/assetbyname/Microsoft.VisualStudio.Services.VSIXPackage"
+
+    # Quietly but delicately curl down the file, blowing up at the first sign of trouble.
+    curl --silent --show-error --fail -X GET -o "$EXTTMP/$N.zip" "$URL"
+    # Unpack the file we need to stdout then pull out the version
+    VER=$(jq -r '.version' <(unzip -qc "$EXTTMP/$N.zip" "extension/package.json"))
+    # Calculate the SHA
+    SHA=$(nix-hash --flat --base32 --type sha256 "$EXTTMP/$N.zip")
+
+    # Clean up.
+    rm -Rf "$EXTTMP"
+    # I don't like 'rm -Rf' lurking in my scripts but this seems appropriate.
+
+    cat <<-EOF
+  {
+    name = "$2";
+    publisher = "$1";
+    version = "$VER";
+    sha256 = "$SHA";
+  }
+EOF
+}
+
+# See if we can find our `code` binary somewhere.
+if [ $# -ne 0 ]; then
+    CODE=$1
+else
+    CODE=$(command -v code)
+fi
+
+if [ -z "$CODE" ]; then
+    # Not much point continuing.
+    fail "VSCode executable not found"
+fi
+
+# Try to be a good citizen and clean up after ourselves if we're killed.
+trap clean_up SIGINT
+
+# Begin the printing of the nix expression that will house the list of extensions.
+printf '{ extensions = [\n'
+
+# Note that we are only looking to update extensions that are already installed.
+for i in $($CODE --list-extensions)
+do
+    OWNER=$(echo "$i" | cut -d. -f1)
+    EXT=$(echo "$i" | cut -d. -f2)
+
+    get_vsixpkg "$OWNER" "$EXT"
+done
+# Close off the nix expression.
+printf '];\n}'
diff --git a/nixpkgs/pkgs/misc/vscode-extensions/vscode-lldb/build-deps/package.json b/nixpkgs/pkgs/misc/vscode-extensions/vscode-lldb/build-deps/package.json
new file mode 100644
index 000000000000..188fa67ede59
--- /dev/null
+++ b/nixpkgs/pkgs/misc/vscode-extensions/vscode-lldb/build-deps/package.json
@@ -0,0 +1,24 @@
+{
+  "name": "vscode-lldb",
+  "version": "1.6.1",
+  "dependencies": {
+    "string-argv": "^0.3.1",
+    "yaml": "^1.10.0",
+    "yauzl": "^2.10.0",
+    "@types/vscode": "^1.31.0",
+    "@types/node": "^8.10.50",
+    "@types/mocha": "^7.0.1",
+    "@types/yauzl": "^2.9.0",
+    "@types/json5": "^0.0.30",
+    "typescript": "^3.7.0",
+    "mocha": "^7.0.1",
+    "source-map-support": "^0.5.12",
+    "memory-streams": "^0.1.3",
+    "vscode-debugprotocol": "^1.35.0",
+    "vscode-debugadapter-testsupport": "^1.35.0",
+    "vsce": "^1.73.0",
+    "webpack": "^4.39.1",
+    "webpack-cli": "^3.3.7",
+    "ts-loader": "^6.2.1"
+  }
+}
diff --git a/nixpkgs/pkgs/misc/vscode-extensions/vscode-lldb/cmake-build-extension-only.patch b/nixpkgs/pkgs/misc/vscode-extensions/vscode-lldb/cmake-build-extension-only.patch
new file mode 100644
index 000000000000..30ab3f9b21c2
--- /dev/null
+++ b/nixpkgs/pkgs/misc/vscode-extensions/vscode-lldb/cmake-build-extension-only.patch
@@ -0,0 +1,34 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 890abd4..157a8a1 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -16,13 +16,6 @@ endif()
+ set(VERSION "${VERSION}${VERSION_SUFFIX}")
+ message("Version ${VERSION}")
+
+-set(LLDB_PACKAGE $ENV{LLDB_PACKAGE} CACHE PATH "Zip archive containing LLDB files")
+-if (LLDB_PACKAGE)
+-    message("Using LLDB_PACKAGE=${LLDB_PACKAGE}")
+-else()
+-    message(FATAL_ERROR "LLDB_PACKAGE not set." )
+-endif()
+-
+ set(TEST_TIMEOUT 5000 CACHE STRING "Test timeout [ms]")
+
+ # General OS-specific definitions
+@@ -87,16 +80,6 @@ configure_file(package.json ${CMAKE_CURRENT_BINARY_DIR}/package.json @ONLY)
+ configure_file(webpack.config.js ${CMAKE_CURRENT_BINARY_DIR}/webpack.config.js @ONLY)
+ file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/package-lock.json DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
+
+-# Run 'npm install'
+-execute_process(
+-    COMMAND ${NPM} install
+-    WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
+-    RESULT_VARIABLE Result
+-)
+-if (NOT ${Result} EQUAL 0)
+-    message(FATAL_ERROR "npm intall failed: ${Result}")
+-endif()
+-
+ # Copy it back, so we can commit the lock file.
+ file(COPY ${CMAKE_CURRENT_BINARY_DIR}/package-lock.json DESTINATION ${CMAKE_CURRENT_SOURCE_DIR})
diff --git a/nixpkgs/pkgs/misc/vscode-extensions/vscode-lldb/default.nix b/nixpkgs/pkgs/misc/vscode-extensions/vscode-lldb/default.nix
new file mode 100644
index 000000000000..c4d228281038
--- /dev/null
+++ b/nixpkgs/pkgs/misc/vscode-extensions/vscode-lldb/default.nix
@@ -0,0 +1,101 @@
+{ lib, stdenv, fetchFromGitHub, rustPlatform, makeWrapper, jq, callPackage
+, nodePackages, cmake, nodejs, unzip, python3
+}:
+assert lib.versionAtLeast python3.version "3.5";
+let
+  publisher = "vadimcn";
+  pname = "vscode-lldb";
+  version = "1.6.1";
+
+  src = fetchFromGitHub {
+    owner = "vadimcn";
+    repo = "vscode-lldb";
+    rev = "v${version}";
+    sha256 = "sha256-mi+AeHg9zO0vjF0OZCufPkliInqxTvDGV350wqAwe90=";
+    fetchSubmodules = true;
+  };
+
+  lldb = callPackage ./lldb.nix {};
+
+  adapter = rustPlatform.buildRustPackage {
+    pname = "${pname}-adapter";
+    inherit version src;
+
+    # It will pollute the build environment of `buildRustPackage`.
+    cargoPatches = [ ./reset-cargo-config.patch ];
+
+    cargoSha256 = "sha256-HPVbqYsst/iFrHn5wvmWtqeVHOHR7JT8lu+/xZq1lK0=";
+
+    nativeBuildInputs = [ makeWrapper ];
+
+    buildAndTestSubdir = "adapter";
+
+    cargoFlags = [
+      "--lib"
+      "--bin=codelldb"
+      "--features=weak-linkage"
+    ];
+
+    # Tests are linked to liblldb but it is not available here.
+    doCheck = false;
+  };
+
+  nodeDeps = nodePackages."vscode-lldb-build-deps-../../misc/vscode-extensions/vscode-lldb/build-deps";
+
+in stdenv.mkDerivation rec {
+  name = "vscode-extension-${pname}";
+  inherit src;
+  vscodeExtUniqueId = "${publisher}.${pname}";
+  installPrefix = "share/vscode/extensions/${vscodeExtUniqueId}";
+
+  nativeBuildInputs = [ cmake nodejs unzip makeWrapper ];
+
+  patches = [ ./cmake-build-extension-only.patch ];
+
+  postConfigure = ''
+    cp -r ${nodeDeps}/lib/node_modules/vscode-lldb/{node_modules,package-lock.json} .
+  '';
+
+  cmakeFlags = [
+    # Do not append timestamp to version.
+    "-DVERSION_SUFFIX="
+  ];
+  makeFlags = [ "vsix_bootstrap" ];
+
+  installPhase = ''
+    ext=$out/$installPrefix
+    runHook preInstall
+
+    unzip ./codelldb-bootstrap.vsix 'extension/*' -d ./vsix-extracted
+
+    mkdir -p $ext/{adapter,formatters}
+    mv -t $ext vsix-extracted/extension/*
+    cp -t $ext/adapter ${adapter}/{bin,lib}/* ../adapter/*.py
+    cp -t $ext/formatters ../formatters/*.py
+    ln -s ${lldb} $ext/lldb
+    # Mark that all components are installed.
+    touch $ext/platform.ok
+
+    runHook postInstall
+  '';
+
+  # `adapter` will find python binary and libraries at runtime.
+  fixupPhase = ''
+    wrapProgram $out/$installPrefix/adapter/codelldb \
+      --prefix PATH : "${python3}/bin" \
+      --prefix LD_LIBRARY_PATH : "${python3}/lib"
+  '';
+
+  passthru = {
+    inherit lldb adapter;
+  };
+
+  meta = with lib; {
+    description = "A native debugger extension for VSCode based on LLDB";
+    homepage = "https://github.com/vadimcn/vscode-lldb";
+    license = with licenses; [ mit ];
+    maintainers = with maintainers; [ oxalica ];
+    platforms = platforms.all;
+    broken = stdenv.isDarwin; # Build failed on x86_64-darwin currently.
+  };
+}
diff --git a/nixpkgs/pkgs/misc/vscode-extensions/vscode-lldb/lldb.nix b/nixpkgs/pkgs/misc/vscode-extensions/vscode-lldb/lldb.nix
new file mode 100644
index 000000000000..2ec90b1931e8
--- /dev/null
+++ b/nixpkgs/pkgs/misc/vscode-extensions/vscode-lldb/lldb.nix
@@ -0,0 +1,23 @@
+# Patched lldb for Rust language support.
+{ lldb_11, fetchFromGitHub }:
+let
+  llvmSrc = fetchFromGitHub {
+    owner = "vadimcn";
+    repo = "llvm-project";
+    rev = "dd7efd9ea2d38e3227bc2e83a99772aceeb44242";
+    sha256 = "sha256-XY8J8Ie1cWb6ok72Gju/KUxZ4fIFQVitYVnuCezGRKQ=";
+  };
+in lldb_11.overrideAttrs (oldAttrs: {
+  src = "${llvmSrc}/lldb";
+
+  passthru = (oldAttrs.passthru or {}) // {
+    inherit llvmSrc;
+  };
+
+  doInstallCheck = true;
+  postInstallCheck = (oldAttrs.postInstallCheck or "") + ''
+    versionOutput="$($out/bin/lldb --version)"
+    echo "'lldb --version' returns: $versionOutput"
+    echo "$versionOutput" | grep -q 'rust-enabled'
+  '';
+})
diff --git a/nixpkgs/pkgs/misc/vscode-extensions/vscode-lldb/reset-cargo-config.patch b/nixpkgs/pkgs/misc/vscode-extensions/vscode-lldb/reset-cargo-config.patch
new file mode 100644
index 000000000000..300f8cd96ef9
--- /dev/null
+++ b/nixpkgs/pkgs/misc/vscode-extensions/vscode-lldb/reset-cargo-config.patch
@@ -0,0 +1,11 @@
+--- a/.cargo/config
++++ b/.cargo/config
+@@ -1,8 +0,0 @@
+-[build]
+-target-dir = "build/target"
+-
+-[target.armv7-unknown-linux-gnueabihf]
+-linker = "arm-linux-gnueabihf-gcc"
+-
+-[target.aarch64-unknown-linux-gnu]
+-linker = "aarch64-linux-gnu-gcc"
diff --git a/nixpkgs/pkgs/misc/vscode-extensions/vscode-lldb/update.sh b/nixpkgs/pkgs/misc/vscode-extensions/vscode-lldb/update.sh
new file mode 100755
index 000000000000..0f3e407ddde4
--- /dev/null
+++ b/nixpkgs/pkgs/misc/vscode-extensions/vscode-lldb/update.sh
@@ -0,0 +1,35 @@
+#!/usr/bin/env nix-shell
+#!nix-shell -i bash -p jq nix-prefetch
+set -eo pipefail
+cd "$(dirname "${BASH_SOURCE[0]}")"
+if [[ $# -ne 1 ]]; then
+    echo "Usage: ./update.sh <version>"
+    exit 1
+fi
+
+echo "
+FIXME: This script doesn't update patched lldb. Please manually check branches
+of https://github.com/vadimcn/llvm-project and update lldb with correct version of LLVM.
+"
+
+nixpkgs=../../../..
+nixFile=./default.nix
+owner=vadimcn
+repo=vscode-lldb
+version="$1"
+
+sed -E 's/\bversion = ".*?"/version = "'$version'"/' --in-place "$nixFile"
+srcHash=$(nix-prefetch fetchFromGitHub --owner vadimcn --repo vscode-lldb --rev "v$version" --fetchSubmodules)
+sed -E 's/\bsha256 = ".*?"/sha256 = "'$srcHash'"/' --in-place "$nixFile"
+cargoHash=$(nix-prefetch "{ sha256 }: (import $nixpkgs {}).vscode-extensions.vadimcn.vscode-lldb.adapter.cargoDeps.overrideAttrs (_: { outputHash = sha256; })")
+sed -E 's#\bcargoSha256 = ".*?"#cargoSha256 = "'$cargoHash'"#' --in-place "$nixFile"
+
+src="$(nix-build $nixpkgs -A vscode-extensions.vadimcn.vscode-lldb.src --no-out-link)"
+jq '{ name, version: $version, dependencies: (.dependencies + .devDependencies) }' \
+    --arg version "$version" \
+    "$src/package.json" \
+    > build-deps/package.json
+
+# Regenerate nodePackages.
+cd "$nixpkgs/pkgs/development/node-packages"
+exec ./generate.sh
diff --git a/nixpkgs/pkgs/misc/vscode-extensions/vscode-utils.nix b/nixpkgs/pkgs/misc/vscode-extensions/vscode-utils.nix
new file mode 100644
index 000000000000..1de3bce3d0db
--- /dev/null
+++ b/nixpkgs/pkgs/misc/vscode-extensions/vscode-utils.nix
@@ -0,0 +1,94 @@
+{ stdenv, lib, buildEnv, writeShellScriptBin, fetchurl, vscode, unzip, jq }:
+let
+  buildVscodeExtension = a@{
+    name,
+    src,
+    # Same as "Unique Identifier" on the extension's web page.
+    # For the moment, only serve as unique extension dir.
+    vscodeExtUniqueId,
+    configurePhase ? ":",
+    buildPhase ? ":",
+    dontPatchELF ? true,
+    dontStrip ? true,
+    buildInputs ? [],
+    ...
+  }:
+  stdenv.mkDerivation ((removeAttrs a [ "vscodeExtUniqueId" ]) // {
+
+    name = "vscode-extension-${name}";
+
+    inherit vscodeExtUniqueId;
+    inherit configurePhase buildPhase dontPatchELF dontStrip;
+
+    installPrefix = "share/vscode/extensions/${vscodeExtUniqueId}";
+
+    buildInputs = [ unzip ] ++ buildInputs;
+
+    installPhase = ''
+
+      runHook preInstall
+
+      mkdir -p "$out/$installPrefix"
+      find . -mindepth 1 -maxdepth 1 | xargs -d'\n' mv -t "$out/$installPrefix/"
+
+      runHook postInstall
+    '';
+
+  });
+
+  fetchVsixFromVscodeMarketplace = mktplcExtRef:
+    fetchurl((import ./mktplcExtRefToFetchArgs.nix mktplcExtRef));
+
+  buildVscodeMarketplaceExtension = a@{
+    name ? "",
+    src ? null,
+    vsix ? null,
+    mktplcRef,
+    ...
+  }: assert "" == name; assert null == src;
+  buildVscodeExtension ((removeAttrs a [ "mktplcRef" "vsix" ]) // {
+    name = "${mktplcRef.publisher}-${mktplcRef.name}-${mktplcRef.version}";
+    src = if (vsix != null)
+      then vsix
+      else fetchVsixFromVscodeMarketplace mktplcRef;
+    vscodeExtUniqueId = "${mktplcRef.publisher}.${mktplcRef.name}";
+  });
+
+  mktplcRefAttrList = [
+    "name"
+    "publisher"
+    "version"
+    "sha256"
+  ];
+
+  mktplcExtRefToExtDrv = ext:
+    buildVscodeMarketplaceExtension ((removeAttrs ext mktplcRefAttrList) // {
+      mktplcRef = ext;
+    });
+
+  extensionFromVscodeMarketplace = mktplcExtRefToExtDrv;
+  extensionsFromVscodeMarketplace = mktplcExtRefList:
+    builtins.map extensionFromVscodeMarketplace mktplcExtRefList;
+
+  vscodeWithConfiguration = import ./vscodeWithConfiguration.nix {
+   inherit lib extensionsFromVscodeMarketplace writeShellScriptBin;
+   vscodeDefault = vscode;
+  };
+
+
+  vscodeExts2nix = import ./vscodeExts2nix.nix {
+    inherit lib writeShellScriptBin;
+    vscodeDefault = vscode;
+  };
+
+  vscodeEnv = import ./vscodeEnv.nix {
+    inherit lib buildEnv writeShellScriptBin extensionsFromVscodeMarketplace jq;
+    vscodeDefault = vscode;
+  };
+in
+{
+  inherit fetchVsixFromVscodeMarketplace buildVscodeExtension
+          buildVscodeMarketplaceExtension extensionFromVscodeMarketplace
+          extensionsFromVscodeMarketplace
+          vscodeWithConfiguration vscodeExts2nix vscodeEnv;
+}
diff --git a/nixpkgs/pkgs/misc/vscode-extensions/vscodeEnv.nix b/nixpkgs/pkgs/misc/vscode-extensions/vscodeEnv.nix
new file mode 100644
index 000000000000..7c58a4bdfb34
--- /dev/null
+++ b/nixpkgs/pkgs/misc/vscode-extensions/vscodeEnv.nix
@@ -0,0 +1,86 @@
+#Use vscodeWithConfiguration and vscodeExts2nix to create a vscode executable. When the executable exits, it updates the mutable extension file, which is imported when evaluated by Nix later.
+{ lib
+, buildEnv
+, writeShellScriptBin
+, extensionsFromVscodeMarketplace
+, vscodeDefault
+, jq
+}:
+##User input
+{ vscode                           ? vscodeDefault
+, nixExtensions                    ? []
+, vscodeExtsFolderName             ? ".vscode-exts"
+# will add to the command updateSettings (which will run on executing vscode) settings to override in settings.json file
+, settings                         ? {}
+, createSettingsIfDoesNotExists    ? true
+, launch                           ? {}
+, createLaunchIfDoesNotExists      ? true
+# will add to the command updateKeybindings(which will run on executing vscode) keybindings to override in keybinding.json file
+, keybindings                      ? {}
+, createKeybindingsIfDoesNotExists ? true
+, user-data-dir ? ''"''${TMP}''${name}"/vscode-data-dir''
+# if file exists will use it and import the extensions in it into this dervation else will use empty extensions list
+# this file will be created/updated by vscodeExts2nix when vscode exists
+, mutableExtensionsFile
+}:
+let
+  mutableExtensionsFilePath = toString mutableExtensionsFile;
+  mutableExtensions = if builtins.pathExists mutableExtensionsFile
+                      then import mutableExtensionsFilePath else [];
+  vscodeWithConfiguration = import ./vscodeWithConfiguration.nix {
+    inherit lib writeShellScriptBin extensionsFromVscodeMarketplace;
+    vscodeDefault = vscode;
+  }
+  {
+    inherit nixExtensions mutableExtensions vscodeExtsFolderName user-data-dir;
+  };
+
+  updateSettings = import ./updateSettings.nix { inherit lib writeShellScriptBin jq; };
+  userSettingsFolder = "${ user-data-dir }/User";
+
+  updateSettingsCmd = updateSettings {
+    settings = {
+        "extensions.autoCheckUpdates" = false;
+        "extensions.autoUpdate" = false;
+        "update.mode" = "none";
+    } // settings;
+    inherit userSettingsFolder;
+    createIfDoesNotExists = createSettingsIfDoesNotExists;
+    symlinkFromUserSetting = (user-data-dir != "");
+  };
+
+  updateLaunchCmd = updateSettings {
+    settings = launch;
+    createIfDoesNotExists = createLaunchIfDoesNotExists;
+    vscodeSettingsFile = ".vscode/launch.json";
+  };
+
+  updateKeybindingsCmd = updateSettings {
+    settings = keybindings;
+    createIfDoesNotExists = createKeybindingsIfDoesNotExists;
+    vscodeSettingsFile = ".vscode/keybindings.json";
+    inherit userSettingsFolder;
+    symlinkFromUserSetting = (user-data-dir != "");
+  };
+
+  vscodeExts2nix = import ./vscodeExts2nix.nix {
+    inherit lib writeShellScriptBin;
+    vscodeDefault = vscodeWithConfiguration;
+  }
+  {
+    extensionsToIgnore = nixExtensions;
+    extensions = mutableExtensions;
+  };
+  code = writeShellScriptBin "code" ''
+    ${updateSettingsCmd}/bin/vscodeNixUpdate-settings
+    ${updateLaunchCmd}/bin/vscodeNixUpdate-launch
+    ${updateKeybindingsCmd}/bin/vscodeNixUpdate-keybindings
+    ${vscodeWithConfiguration}/bin/code --wait "$@"
+    echo 'running vscodeExts2nix to update ${mutableExtensionsFilePath}...'
+    ${vscodeExts2nix}/bin/vscodeExts2nix > ${mutableExtensionsFilePath}
+  '';
+in
+buildEnv {
+  name = "vscodeEnv";
+  paths = [ code vscodeExts2nix updateSettingsCmd updateLaunchCmd updateKeybindingsCmd ];
+}
diff --git a/nixpkgs/pkgs/misc/vscode-extensions/vscodeEnvTest.nix b/nixpkgs/pkgs/misc/vscode-extensions/vscodeEnvTest.nix
new file mode 100644
index 000000000000..19a9edbf1afe
--- /dev/null
+++ b/nixpkgs/pkgs/misc/vscode-extensions/vscodeEnvTest.nix
@@ -0,0 +1,11 @@
+with import <nixpkgs>{};
+callPackage (import ./vscodeEnv.nix) {
+  extensionsFromVscodeMarketplace = vscode-utils.extensionsFromVscodeMarketplace;
+  vscodeDefault = vscode;
+} {
+  mutableExtensionsFile = ./extensions.nix;
+  settings = {
+    a = "fdsdf";
+    t = "test";
+  };
+}
diff --git a/nixpkgs/pkgs/misc/vscode-extensions/vscodeExts2nix.nix b/nixpkgs/pkgs/misc/vscode-extensions/vscodeExts2nix.nix
new file mode 100644
index 000000000000..58cbe663c901
--- /dev/null
+++ b/nixpkgs/pkgs/misc/vscode-extensions/vscodeExts2nix.nix
@@ -0,0 +1,44 @@
+# based on the passed vscode will stdout a nix expression with the installed vscode extensions
+{ lib
+, vscodeDefault
+, writeShellScriptBin
+}:
+
+##User input
+{ vscode             ? vscodeDefault
+, extensionsToIgnore ? []
+# will use those extensions to get sha256 if still exists when executed.
+, extensions         ? []
+}:
+let
+  mktplcExtRefToFetchArgs = import ./mktplcExtRefToFetchArgs.nix;
+in
+writeShellScriptBin "vscodeExts2nix" ''
+  echo '['
+
+  for line in $(${vscode}/bin/code --list-extensions --show-versions \
+    ${lib.optionalString (extensionsToIgnore != []) ''
+      | grep -v -i '^\(${lib.concatMapStringsSep "\\|" (e : "${e.publisher}.${e.name}") extensionsToIgnore}\)'
+    ''}
+  ) ; do
+    [[ $line =~ ([^.]*)\.([^@]*)@(.*) ]]
+    name=''${BASH_REMATCH[2]}
+    publisher=''${BASH_REMATCH[1]}
+    version=''${BASH_REMATCH[3]}
+
+    extensions="${lib.concatMapStringsSep "." (e : "${e.publisher}${e.name}@${e.sha256}") extensions}"
+    reCurrentExt=$publisher$name"@([^.]*)"
+    if [[ $extensions =~ $reCurrentExt ]]; then
+      sha256=''${BASH_REMATCH[1]}
+    else
+      sha256=$(
+        nix-prefetch-url "${(mktplcExtRefToFetchArgs {publisher = ''"$publisher"''; name = ''"$name"''; version = ''"$version"'';}).url}" 2> /dev/null
+      )
+    fi
+
+    echo "{ name = \"''${name}\"; publisher = \"''${publisher}\"; version = \"''${version}\"; sha256 = \"''${sha256}\";  }"
+  done
+
+
+  echo ']'
+''
diff --git a/nixpkgs/pkgs/misc/vscode-extensions/vscodeWithConfiguration.nix b/nixpkgs/pkgs/misc/vscode-extensions/vscodeWithConfiguration.nix
new file mode 100644
index 000000000000..39479d7c2f2c
--- /dev/null
+++ b/nixpkgs/pkgs/misc/vscode-extensions/vscodeWithConfiguration.nix
@@ -0,0 +1,54 @@
+# wrapper over vscode to control extensions per project (extensions folder will be created in execution path)
+{ lib
+, writeShellScriptBin
+, extensionsFromVscodeMarketplace
+, vscodeDefault
+}:
+## User input
+{ vscode ? vscodeDefault
+# extensions to be symlinked into the project's extensions folder
+, nixExtensions        ? []
+# extensions to be copied into the project's extensions folder
+, mutableExtensions    ? []
+, vscodeExtsFolderName ? ".vscode-exts"
+, user-data-dir ? ''"''${TMP}vscodeWithConfiguration/vscode-data-dir"''
+}:
+let
+  nixExtsDrvs = extensionsFromVscodeMarketplace nixExtensions;
+  mutExtsDrvs = extensionsFromVscodeMarketplace mutableExtensions;
+  mutableExtsPaths = lib.forEach mutExtsDrvs ( e:
+  {
+    origin = "${e}/share/vscode/extensions/${e.vscodeExtUniqueId}";
+    target = ''${vscodeExtsFolderName}/${e.vscodeExtUniqueId}-${(lib.findSingle (ext: "${ext.publisher}.${ext.name}" == e.vscodeExtUniqueId) "" "m" mutableExtensions ).version}'';
+  }
+  );
+
+  #removed not defined extensions
+  rmExtensions =  lib.optionalString (nixExtensions++mutableExtensions != []) ''
+    find ${vscodeExtsFolderName} -mindepth 1 -maxdepth 1 ${
+        lib.concatMapStringsSep " " (e : "! -iname ${e.publisher}.${e.name} ") nixExtensions
+        +
+        lib.concatMapStringsSep " " (e : "! -iname ${e.publisher}.${e.name}-${e.version} ") mutableExtensions
+      } -exec rm -rf {} \;
+  '';
+  #copy mutable extension out of the nix store
+  cpExtensions = ''
+    ${lib.concatMapStringsSep "\n" (e : "ln -sfn ${e}/share/vscode/extensions/* ${vscodeExtsFolderName}/") nixExtsDrvs}
+    ${lib.concatMapStringsSep "\n" (ePath : ''
+      if [ ! -d ${ePath.target} ]; then
+        cp -a ${ePath.origin} ${ePath.target}
+        chmod -R u+rwx ${ePath.target}
+      fi
+      '') mutableExtsPaths}
+  '';
+in
+  writeShellScriptBin "code" ''
+    if ! [[ "$@" =~ "--list-extension" ]]; then
+      mkdir -p "${vscodeExtsFolderName}"
+      ${rmExtensions}
+      ${cpExtensions}
+    fi
+    ${vscode}/bin/code --extensions-dir "${vscodeExtsFolderName}" ${
+      lib.optionalString (user-data-dir != "") "--user-data-dir ${user-data-dir}"
+      } "$@"
+  ''
diff --git a/nixpkgs/pkgs/misc/vscode-extensions/wakatime/default.nix b/nixpkgs/pkgs/misc/vscode-extensions/wakatime/default.nix
new file mode 100644
index 000000000000..86453b960cba
--- /dev/null
+++ b/nixpkgs/pkgs/misc/vscode-extensions/wakatime/default.nix
@@ -0,0 +1,30 @@
+{ lib
+, wakatime, vscode-utils }:
+
+let
+  inherit (vscode-utils) buildVscodeMarketplaceExtension;
+in
+  buildVscodeMarketplaceExtension {
+    mktplcRef = {
+      name = "vscode-wakatime";
+      publisher = "WakaTime";
+      version = "4.0.9";
+      sha256 = "0sm2fr9zbk1759r52dpnz9r7xbvxladlpinlf2i0hyaa06bhp3b1";
+    };
+
+    postPatch = ''
+      mkdir -p wakatime-master
+      cp -rt wakatime-master --no-preserve=all ${wakatime}/lib/python*/site-packages/wakatime
+    '';
+
+    meta = with lib; {
+      description = ''
+        Visual Studio Code plugin for automatic time tracking and metrics generated
+        from your programming activity
+      '';
+      license = licenses.bsd3;
+      maintainers = with maintainers; [
+        eadwu
+      ];
+    };
+  }
diff --git a/nixpkgs/pkgs/misc/xosd/default.nix b/nixpkgs/pkgs/misc/xosd/default.nix
new file mode 100644
index 000000000000..3190cfb380d8
--- /dev/null
+++ b/nixpkgs/pkgs/misc/xosd/default.nix
@@ -0,0 +1,21 @@
+{ lib, stdenv, fetchurl, libX11, libXext, libXt, xorgproto }:
+
+stdenv.mkDerivation rec {
+  pname = "xosd";
+  version = "2.2.14";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/libxosd/${pname}-${version}.tar.gz";
+    sha256 = "025m7ha89q29swkc7s38knnbn8ysl24g2h5s7imfxflm91psj7sg";
+  };
+
+  buildInputs = [ libX11 libXext libXt xorgproto ];
+
+  meta = with lib; {
+    description = "Displays text on your screen";
+    homepage = "https://sourceforge.net/projects/libxosd";
+    license = licenses.gpl2;
+    platforms = platforms.linux ++ platforms.darwin;
+    maintainers = with maintainers; [ pSub ];
+  };
+}