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.nix35
-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/base16-builder/default.nix8
-rwxr-xr-xnixpkgs/pkgs/misc/base16-builder/generate.sh8
-rw-r--r--nixpkgs/pkgs/misc/base16-builder/node-packages-generated.nix1637
-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.nix693
-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/cups/cups-pk-helper.nix30
-rw-r--r--nixpkgs/pkgs/misc/cups/default.nix160
-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.nix225
-rw-r--r--nixpkgs/pkgs/misc/cups/drivers/canon/preload.c81
-rw-r--r--nixpkgs/pkgs/misc/cups/drivers/cnijfilter2/default.nix123
-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.nix26
-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/googlecloudprint/default.nix64
-rw-r--r--nixpkgs/pkgs/misc/cups/drivers/hl1110/default.nix73
-rw-r--r--nixpkgs/pkgs/misc/cups/drivers/hl3140cw/default.nix78
-rw-r--r--nixpkgs/pkgs/misc/cups/drivers/hll2340dw/default.nix68
-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.nix316
-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.nix64
-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.nix224
-rw-r--r--nixpkgs/pkgs/misc/drivers/hplip/default.nix231
-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/postscript-lexmark/default.nix38
-rw-r--r--nixpkgs/pkgs/misc/drivers/sc-controller/default.nix63
-rw-r--r--nixpkgs/pkgs/misc/drivers/steamcontroller/default.nix35
-rw-r--r--nixpkgs/pkgs/misc/drivers/sundtek/default.nix51
-rw-r--r--nixpkgs/pkgs/misc/drivers/utsushi/default.nix138
-rw-r--r--nixpkgs/pkgs/misc/drivers/xboxdrv/default.nix28
-rw-r--r--nixpkgs/pkgs/misc/drivers/xow/default.nix33
-rw-r--r--nixpkgs/pkgs/misc/drivers/xp-pen-g430/default.nix37
-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.nix50
-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/citra/default.nix32
-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/dlx/default.nix31
-rw-r--r--nixpkgs/pkgs/misc/emulators/dolphin-emu/default.nix120
-rw-r--r--nixpkgs/pkgs/misc/emulators/dolphin-emu/master.nix87
-rw-r--r--nixpkgs/pkgs/misc/emulators/dosbox/default.nix46
-rw-r--r--nixpkgs/pkgs/misc/emulators/emulationstation/default.nix39
-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.nix37
-rw-r--r--nixpkgs/pkgs/misc/emulators/hatari/default.nix23
-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/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.nix73
-rw-r--r--nixpkgs/pkgs/misc/emulators/mednafen/server.nix21
-rw-r--r--nixpkgs/pkgs/misc/emulators/mednaffe/default.nix30
-rw-r--r--nixpkgs/pkgs/misc/emulators/mgba/default.nix63
-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/openmsx/custom-nixos.mk9
-rw-r--r--nixpkgs/pkgs/misc/emulators/openmsx/default.nix49
-rw-r--r--nixpkgs/pkgs/misc/emulators/pcsx2/default.nix83
-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.nix69
-rw-r--r--nixpkgs/pkgs/misc/emulators/qmc2/default.nix41
-rw-r--r--nixpkgs/pkgs/misc/emulators/resim/default.nix18
-rw-r--r--nixpkgs/pkgs/misc/emulators/retroarch/cores.nix1074
-rw-r--r--nixpkgs/pkgs/misc/emulators/retroarch/default.nix60
-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.nix53
-rw-r--r--nixpkgs/pkgs/misc/emulators/snes9x-gtk/default.nix39
-rw-r--r--nixpkgs/pkgs/misc/emulators/stella/default.nix35
-rw-r--r--nixpkgs/pkgs/misc/emulators/termtekst/default.nix36
-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.nix149
-rw-r--r--nixpkgs/pkgs/misc/emulators/wine/builder-wow.sh30
-rw-r--r--nixpkgs/pkgs/misc/emulators/wine/cert-path.patch24
-rw-r--r--nixpkgs/pkgs/misc/emulators/wine/default.nix68
-rw-r--r--nixpkgs/pkgs/misc/emulators/wine/fonts.nix22
-rw-r--r--nixpkgs/pkgs/misc/emulators/wine/packages.nix35
-rw-r--r--nixpkgs/pkgs/misc/emulators/wine/sources.nix65
-rw-r--r--nixpkgs/pkgs/misc/emulators/wine/staging.nix24
-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/zsnes/default.nix63
-rw-r--r--nixpkgs/pkgs/misc/frescobaldi/default.nix49
-rw-r--r--nixpkgs/pkgs/misc/ghostscript/default.nix138
-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/jackaudio/default.nix72
-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.nix37
-rw-r--r--nixpkgs/pkgs/misc/lilypond/default.nix62
-rw-r--r--nixpkgs/pkgs/misc/lilypond/findlib.patch24
-rw-r--r--nixpkgs/pkgs/misc/lilypond/fonts.nix136
-rw-r--r--nixpkgs/pkgs/misc/lilypond/unstable.nix21
-rw-r--r--nixpkgs/pkgs/misc/lilypond/with-fonts.nix17
-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/riscv-pk/default.nix42
-rw-r--r--nixpkgs/pkgs/misc/rkdeveloptool/default.nix24
-rw-r--r--nixpkgs/pkgs/misc/sailsd/default.nix48
-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.nix43
-rw-r--r--nixpkgs/pkgs/misc/screensavers/i3lock-pixeled/default.nix40
-rw-r--r--nixpkgs/pkgs/misc/screensavers/light-locker/default.nix89
-rw-r--r--nixpkgs/pkgs/misc/screensavers/physlock/default.nix27
-rw-r--r--nixpkgs/pkgs/misc/screensavers/pipes/default.nix26
-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.nix63
-rw-r--r--nixpkgs/pkgs/misc/screensavers/xss-lock/default.nix24
-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.nix51
-rw-r--r--nixpkgs/pkgs/misc/sndio/default.nix28
-rw-r--r--nixpkgs/pkgs/misc/solfege/default.nix40
-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.nix349
-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/default.nix371
-rw-r--r--nixpkgs/pkgs/misc/uboot/nanonote.nix59
-rwxr-xr-xnixpkgs/pkgs/misc/uq/default.nix26
-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.json18
-rw-r--r--nixpkgs/pkgs/misc/vim-plugins/generated.nix6333
-rw-r--r--nixpkgs/pkgs/misc/vim-plugins/overrides.nix704
-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.py562
-rw-r--r--nixpkgs/pkgs/misc/vim-plugins/vim-plugin-names574
-rw-r--r--nixpkgs/pkgs/misc/vim-plugins/vim-utils.nix531
-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.nix129
-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.nix196
-rw-r--r--nixpkgs/pkgs/misc/vscode-extensions/python/default.nix86
-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.json22
-rw-r--r--nixpkgs/pkgs/misc/vscode-extensions/rust-analyzer/default.nix50
-rwxr-xr-xnixpkgs/pkgs/misc/vscode-extensions/update_installed_exts.sh74
-rw-r--r--nixpkgs/pkgs/misc/vscode-extensions/vscode-utils.nix88
-rw-r--r--nixpkgs/pkgs/misc/vscode-extensions/wakatime/default.nix30
-rw-r--r--nixpkgs/pkgs/misc/xosd/default.nix21
288 files changed, 27829 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..1975e2d37907
--- /dev/null
+++ b/nixpkgs/pkgs/misc/acpilight/default.nix
@@ -0,0 +1,33 @@
+{ 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 stdenv.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..273e358184d3
--- /dev/null
+++ b/nixpkgs/pkgs/misc/apulse/default.nix
@@ -0,0 +1,35 @@
+{ stdenv, fetchFromGitHub, alsaLib, cmake, pkgconfig, glib
+, tracingSupport ? true, logToStderr ? true }:
+
+let oz = x: if x then "1" else "0"; in
+
+stdenv.mkDerivation rec {
+  pname = "apulse";
+  version = "0.1.12";
+
+  src = fetchFromGitHub {
+    owner = "i-rinat";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "0yk9vgb4aws8xnkhdhgpxp5c0rri8yq61yxk85j99j8ax806i3r8";
+  };
+
+  enableParallelBuilding = true;
+
+  nativeBuildInputs = [ cmake pkgconfig ];
+
+  buildInputs = [ alsaLib glib ];
+
+  cmakeFlags = [
+    "-DWITH_TRACE=${oz tracingSupport}"
+    "-DLOG_TO_STDERR=${oz logToStderr}"
+  ];
+
+  meta = with stdenv.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..710712fe5084
--- /dev/null
+++ b/nixpkgs/pkgs/misc/apulse/pressureaudio.nix
@@ -0,0 +1,82 @@
+{ stdenv, apulse, libpulseaudio, pkgconfig, intltool, autoreconfHook }:
+
+stdenv.mkDerivation {
+  name = "libpressureaudio-${apulse.version}";
+
+  src = libpulseaudio.src;
+
+  nativeBuildInputs = [ pkgconfig 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..664fa8fcb88d
--- /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.2"
+            , ... } @ 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 = "refs/tags/v${version}";
+      sha256 = "03fjl5hy1bqlya6fg553bqz7jrvilzrzpbs87cv6jd04v8qrvry8";
+    };
+
+    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 = [ 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/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..bbbe6e3b20a6
--- /dev/null
+++ b/nixpkgs/pkgs/misc/base16-builder/node-packages-generated.nix
@@ -0,0 +1,1637 @@
+# This file has been generated by node2nix 1.8.0. Do not edit!
+
+{nodeEnv, fetchurl, fetchgit, 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.6" = {
+      name = "debug";
+      packageName = "debug";
+      version = "3.2.6";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz";
+        sha512 = "mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==";
+      };
+    };
+    "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";
+      };
+    };
+    "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.3" = {
+      name = "graceful-fs";
+      packageName = "graceful-fs";
+      version = "4.2.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.3.tgz";
+        sha512 = "a30VEBm4PEdx1dRB7MFK7BejejvCvBronbLjht+sHuGYj8PHs7M/5Z+rt5lw551vZ7yfTCj4Vuyy3mSJytDWRQ==";
+      };
+    };
+    "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.1.1" = {
+      name = "hepburn";
+      packageName = "hepburn";
+      version = "1.1.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/hepburn/-/hepburn-1.1.1.tgz";
+        sha512 = "Ok3ZmMJN3ek4WFAL4f5t8k+BmrDRlS5qGjI4um+3cHH0SrYVzJgUTYwIfGvU8s/eWqOEY+gsINwjJSoaBG3A9g==";
+      };
+    };
+    "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.5" = {
+      name = "ini";
+      packageName = "ini";
+      version = "1.3.5";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz";
+        sha512 = "RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==";
+      };
+    };
+    "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-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.13.1" = {
+      name = "js-yaml";
+      packageName = "js-yaml";
+      version = "3.13.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz";
+        sha512 = "YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==";
+      };
+    };
+    "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-0.0.8" = {
+      name = "minimist";
+      packageName = "minimist";
+      version = "0.0.8";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz";
+        sha1 = "857fcabfc3397d2625b8228262e86aa7a011b05d";
+      };
+    };
+    "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.1" = {
+      name = "mkdirp";
+      packageName = "mkdirp";
+      version = "0.5.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz";
+        sha1 = "30057438eac6cf7f8c4767f38648d6697d75c903";
+      };
+    };
+    "ms-2.1.2" = {
+      name = "ms";
+      packageName = "ms";
+      version = "2.1.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz";
+        sha512 = "sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==";
+      };
+    };
+    "nan-2.14.0" = {
+      name = "nan";
+      packageName = "nan";
+      version = "2.14.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/nan/-/nan-2.14.0.tgz";
+        sha512 = "INOFj37C7k3AfaNTtX8RhsTw7qRy7eLET14cROi9+5HAVbbHuIWUHEauBv5qT4Av2tWasiTY1Jw6puUNqRJXQg==";
+      };
+    };
+    "needle-2.4.0" = {
+      name = "needle";
+      packageName = "needle";
+      version = "2.4.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/needle/-/needle-2.4.0.tgz";
+        sha512 = "4Hnwzr3mi5L97hMYeNl8wRW/Onhy4nUKR/lVemJ8gJedxxUyBLm9kkrDColJvoSfwi0jCNhD+xCdOtiGDQiRZg==";
+      };
+    };
+    "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.4.1" = {
+      name = "nodejieba";
+      packageName = "nodejieba";
+      version = "2.4.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/nodejieba/-/nodejieba-2.4.1.tgz";
+        sha512 = "fxlVloaO5baDBmpnQ2egDCe6FT9SJdfbFak7tK7dKH16d7SxA5bLdv47EdTwtKS9DRbnXnMlyX5Wc33XAnaQuA==";
+      };
+    };
+    "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.0" = {
+      name = "pinyin";
+      packageName = "pinyin";
+      version = "2.9.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/pinyin/-/pinyin-2.9.0.tgz";
+        sha512 = "TZYQ+2uE12arC1EfCeDmN5KgwIOuNMIweOotKvBZdhVOUuQc5RJsGEGf+BaSvxfVtu9ViYEFJmH0xTaj9t4n3Q==";
+      };
+    };
+    "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.15.1" = {
+      name = "resolve";
+      packageName = "resolve";
+      version = "1.15.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/resolve/-/resolve-1.15.1.tgz";
+        sha512 = "84oo6ZTtoTUpjgNEr5SJyzQhzL72gaRodsSfyxC/AXRvwu0Yse9H8eF9IpGo7b8YetZhlI6v7ZQ6bKBFV/6S7w==";
+      };
+    };
+    "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.2" = {
+      name = "signal-exit";
+      packageName = "signal-exit";
+      version = "3.0.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz";
+        sha1 = "b5fdc08f1287ea1178628e415e25132b73646c6d";
+      };
+    };
+    "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.0" = {
+      name = "spdx-correct";
+      packageName = "spdx-correct";
+      version = "3.1.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.0.tgz";
+        sha512 = "lr2EZCctC2BNR7j7WzJ2FpDznxky1sjfxvvYEyzxNyb6lZXHODmEoJeFu4JupYlkfha1KZpJyoqiJ7pgA1qq8Q==";
+      };
+    };
+    "spdx-exceptions-2.2.0" = {
+      name = "spdx-exceptions";
+      packageName = "spdx-exceptions";
+      version = "2.2.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.2.0.tgz";
+        sha512 = "2XQACfElKi9SlVb1CYadKDXvoajPgBVPn/gOQLrTvHdElaVhr7ZEbqJaRnJLVNeaI4cMEAgVCeBMKF6MWRDCRA==";
+      };
+    };
+    "spdx-expression-parse-3.0.0" = {
+      name = "spdx-expression-parse";
+      packageName = "spdx-expression-parse";
+      version = "3.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz";
+        sha512 = "Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg==";
+      };
+    };
+    "spdx-license-ids-3.0.5" = {
+      name = "spdx-license-ids";
+      packageName = "spdx-license-ids";
+      version = "3.0.5";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.5.tgz";
+        sha512 = "J+FWzZoynJEXGphVIS+XEh3kFSjZX/1i9gFBaWQcB+/tmpe2qUsSBABpcxqxnAxFdiUFEgAX1bjYGQvIZmoz9Q==";
+      };
+    };
+    "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.6"
+      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."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.3"
+      sources."has-ansi-2.0.0"
+      sources."has-unicode-2.0.1"
+      sources."hepburn-1.1.1"
+      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.5"
+      sources."is-arrayish-0.2.1"
+      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.13.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" // {
+        dependencies = [
+          sources."minimist-1.2.5"
+        ];
+      })
+      sources."minimatch-3.0.4"
+      sources."minimist-0.0.8"
+      sources."minipass-2.9.0"
+      sources."minizlib-1.3.3"
+      sources."mkdirp-0.5.1"
+      sources."ms-2.1.2"
+      sources."nan-2.14.0"
+      sources."needle-2.4.0"
+      sources."node-pre-gyp-0.14.0"
+      sources."node-status-codes-1.0.0"
+      sources."nodejieba-2.4.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.0"
+      sources."prepend-http-1.0.4"
+      sources."process-nextick-args-2.0.1"
+      (sources."rc-1.2.8" // {
+        dependencies = [
+          sources."minimist-1.2.5"
+        ];
+      })
+      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.15.1"
+      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.2"
+      sources."slide-1.1.6"
+      sources."spdx-correct-3.1.0"
+      sources."spdx-exceptions-2.2.0"
+      sources."spdx-expression-parse-3.0.0"
+      sources."spdx-license-ids-3.0.5"
+      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;
+  };
+}
\ No newline at end of file
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..052339d11ea0
--- /dev/null
+++ b/nixpkgs/pkgs/misc/base16-builder/node-packages.nix
@@ -0,0 +1,21 @@
+# This file has been generated by node2nix 1.8.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) fetchurl fetchgit;
+  });
+  nodeEnv = import ../../development/node-packages/node-env.nix {
+    inherit (pkgs) stdenv python2 utillinux runCommand writeTextFile;
+    inherit nodejs;
+    libtool = if pkgs.stdenv.isDarwin then pkgs.darwin.cctools else null;
+  };
+in
+import ./node-packages-generated.nix {
+  inherit (pkgs) fetchurl fetchgit;
+  inherit nodeEnv globalBuildInputs;
+}
\ No newline at end of file
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..05fd5e70207f
--- /dev/null
+++ b/nixpkgs/pkgs/misc/base16-builder/supplement.nix
@@ -0,0 +1,693 @@
+# This file has been generated by node2nix 1.8.0. Do not edit!
+
+{nodeEnv, fetchurl, fetchgit, 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.6" = {
+      name = "debug";
+      packageName = "debug";
+      version = "3.2.6";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz";
+        sha512 = "mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==";
+      };
+    };
+    "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.5" = {
+      name = "ini";
+      packageName = "ini";
+      version = "1.3.5";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz";
+        sha512 = "RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==";
+      };
+    };
+    "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-0.0.8" = {
+      name = "minimist";
+      packageName = "minimist";
+      version = "0.0.8";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz";
+        sha1 = "857fcabfc3397d2625b8228262e86aa7a011b05d";
+      };
+    };
+    "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.1" = {
+      name = "mkdirp";
+      packageName = "mkdirp";
+      version = "0.5.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz";
+        sha1 = "30057438eac6cf7f8c4767f38648d6697d75c903";
+      };
+    };
+    "ms-2.1.2" = {
+      name = "ms";
+      packageName = "ms";
+      version = "2.1.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz";
+        sha512 = "sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==";
+      };
+    };
+    "needle-2.4.0" = {
+      name = "needle";
+      packageName = "needle";
+      version = "2.4.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/needle/-/needle-2.4.0.tgz";
+        sha512 = "4Hnwzr3mi5L97hMYeNl8wRW/Onhy4nUKR/lVemJ8gJedxxUyBLm9kkrDColJvoSfwi0jCNhD+xCdOtiGDQiRZg==";
+      };
+    };
+    "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.2" = {
+      name = "signal-exit";
+      packageName = "signal-exit";
+      version = "3.0.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz";
+        sha1 = "b5fdc08f1287ea1178628e415e25132b73646c6d";
+      };
+    };
+    "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.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==";
+    };
+    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.6"
+      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.5"
+      sources."is-fullwidth-code-point-1.0.0"
+      sources."isarray-1.0.0"
+      sources."minimatch-3.0.4"
+      sources."minimist-0.0.8"
+      sources."minipass-2.9.0"
+      sources."minizlib-1.3.3"
+      sources."mkdirp-0.5.1"
+      sources."ms-2.1.2"
+      sources."needle-2.4.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" // {
+        dependencies = [
+          sources."minimist-1.2.5"
+        ];
+      })
+      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.2"
+      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;
+  };
+}
\ No newline at end of file
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..40a8849ba3f1
--- /dev/null
+++ b/nixpkgs/pkgs/misc/beep/default.nix
@@ -0,0 +1,25 @@
+{ stdenv, fetchurl }:
+
+# 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 {
+  name = "beep-1.3";
+  src = fetchurl {
+    url = "http://www.johnath.com/beep/beep-1.3.tar.gz";
+    sha256 = "0bgch6jq5cahakk3kbr9549iysf2dik09afixxy5brbxk1xfzb2r";
+  };
+
+  makeFlags = [ "INSTALL_DIR=\${out}/bin/" "MAN_DIR=\${out}/man/man1/" ];
+
+  preInstall = ''
+    mkdir -p $out/bin
+    mkdir -p $out/man/man1
+  '';
+  meta = {
+    description = "The advanced PC speaker beeper";
+    homepage = "http://www.johnath.com/beep/";
+    license = stdenv.lib.licenses.gpl2;
+    platforms = stdenv.lib.platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/misc/brightnessctl/default.nix b/nixpkgs/pkgs/misc/brightnessctl/default.nix
new file mode 100644
index 000000000000..37956785a5bb
--- /dev/null
+++ b/nixpkgs/pkgs/misc/brightnessctl/default.nix
@@ -0,0 +1,27 @@
+{ 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 stdenv.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..81f00d59f698
--- /dev/null
+++ b/nixpkgs/pkgs/misc/calaos/installer/default.nix
@@ -0,0 +1,34 @@
+{ stdenv, fetchFromGitHub, qmake, qttools, qtbase }:
+
+stdenv.mkDerivation rec {
+  name = "calaos_installer-3.1";
+  version = "3.1";
+
+  src = fetchFromGitHub {
+    owner = "calaos";
+    repo = "calaos_installer";
+    rev = "v${version}";
+    sha256 = "0g8igj5sax5vjqzrpbil7i6329708lqqwvg5mwiqd0zzzha9sawd";
+  };
+
+  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 stdenv.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/cups/cups-pk-helper.nix b/nixpkgs/pkgs/misc/cups/cups-pk-helper.nix
new file mode 100644
index 000000000000..3151bace5587
--- /dev/null
+++ b/nixpkgs/pkgs/misc/cups/cups-pk-helper.nix
@@ -0,0 +1,30 @@
+{ stdenv, fetchurl, intltool, pkgconfig, 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 = [ pkgconfig 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 stdenv.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..f229ced8936d
--- /dev/null
+++ b/nixpkgs/pkgs/misc/cups/default.nix
@@ -0,0 +1,160 @@
+{ stdenv
+, fetchurl
+, pkgconfig
+, removeReferencesTo
+, zlib
+, libjpeg
+, libpng
+, libtiff
+, pam
+, dbus
+, enableSystemd ? stdenv.isLinux && !stdenv.hostPlatform.isMusl
+, systemd ? null
+, acl
+, gmp
+, darwin
+, libusb ? null
+, gnutls ? null
+, avahi ? null
+, libpaper ? null
+, coreutils
+}:
+
+assert enableSystemd -> systemd != null;
+
+### IMPORTANT: before updating cups, make sure the nixos/tests/printing.nix test
+### works at least for your platform.
+
+with stdenv.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.1";
+
+  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 "1kkpmj17205j8w9hdff2bfpk6lwdmr3gx0j4r35nhgvya24rvjhv";
+  };
+
+  outputs = [ "out" "lib" "dev" "man" ];
+
+  postPatch = ''
+    substituteInPlace cups/testfile.c \
+      --replace 'cupsFileFind("cat", "/bin' 'cupsFileFind("cat", "${coreutils}/bin'
+  '';
+
+  nativeBuildInputs = [ pkgconfig removeReferencesTo ];
+
+  buildInputs = [ zlib libjpeg libpng libtiff libusb 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 (libusb != 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..5faf6a2198b6
--- /dev/null
+++ b/nixpkgs/pkgs/misc/cups/drivers/brgenml1cupswrapper/default.nix
@@ -0,0 +1,124 @@
+{ 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 = stdenv.lib.platforms.linux;
+    license = stdenv.lib.licenses.gpl2Plus;
+    maintainers = with stdenv.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..985de63637c6
--- /dev/null
+++ b/nixpkgs/pkgs/misc/cups/drivers/brgenml1lpr/default.nix
@@ -0,0 +1,93 @@
+{ 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 stdenv.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 = stdenv.lib.platforms.linux;
+    license = stdenv.lib.licenses.unfreeRedistributable;
+    maintainers = with stdenv.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..141e3f9e6123
--- /dev/null
+++ b/nixpkgs/pkgs/misc/cups/drivers/brlaser/default.nix
@@ -0,0 +1,63 @@
+{ 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 stdenv.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..de93a5a7f8bb
--- /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 : ${stdenv.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 = stdenv.lib.licenses.unfree;
+      platforms = [ "x86_64-linux" "i686-linux" ];
+      maintainers = [ stdenv.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 : ${stdenv.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 = stdenv.lib.licenses.gpl2;
+      platforms = [ "x86_64-linux" "i686-linux" ];
+      maintainers = [ stdenv.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..dbc6390ef498
--- /dev/null
+++ b/nixpkgs/pkgs/misc/cups/drivers/canon/default.nix
@@ -0,0 +1,225 @@
+{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";
+  version = 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 stdenv.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/cnijfilter2/default.nix b/nixpkgs/pkgs/misc/cups/drivers/cnijfilter2/default.nix
new file mode 100644
index 000000000000..323163bed331
--- /dev/null
+++ b/nixpkgs/pkgs/misc/cups/drivers/cnijfilter2/default.nix
@@ -0,0 +1,123 @@
+{ stdenv, lib, fetchzip, autoconf, automake, cups, glib, libxml2, libusb, libtool
+, withDebug ? false }:
+
+stdenv.mkDerivation {
+  pname = "cnijfilter2";
+
+  version = "5.70";
+
+  src = fetchzip {
+    url = "http://gdlp01.c-wss.com/gds/0/0100009930/01/cnijfilter2-source-5.70-1.tar.gz";
+    sha256 = "045zjsmaidn1m44ki6m1018gjzbj77gm234n5i2lshxpbzpyh0is";
+  };
+
+  buildInputs = [
+    cups automake autoconf glib libxml2 libusb 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 \
+                  ${libusb.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 the MG7500, MG6700, MG6600, MG5600, MG2900, MB2000, MB2300, iB4000, MB5000, MB5300, iP110, E450, MX490, E480, MG7700, MG6900, MG6800, MG5700, MG3600, and G3000 series.";
+    homepage = "http://support-th.canon-asia.com/contents/TH/EN/0100712901.html";
+    license = licenses.unfree;
+    platforms = platforms.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..679d89069948
--- /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, libusb, 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 libusb 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 \
+                  ${libusb.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..e9fac1c73e2f
--- /dev/null
+++ b/nixpkgs/pkgs/misc/cups/drivers/cups-bjnp/default.nix
@@ -0,0 +1,26 @@
+{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" ];
+
+  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 = stdenv.lib.platforms.linux;
+  };
+}
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..eccbae601043
--- /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 = "http://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..9aaae31488d3
--- /dev/null
+++ b/nixpkgs/pkgs/misc/cups/drivers/estudio/default.nix
@@ -0,0 +1,54 @@
+{ 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 stdenv.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..30d737871047
--- /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 stdenv.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/googlecloudprint/default.nix b/nixpkgs/pkgs/misc/cups/drivers/googlecloudprint/default.nix
new file mode 100644
index 000000000000..9b612c43a000
--- /dev/null
+++ b/nixpkgs/pkgs/misc/cups/drivers/googlecloudprint/default.nix
@@ -0,0 +1,64 @@
+{ stdenv, lib, fetchFromGitHub, python2, python2Packages, file, makeWrapper, cups }:
+
+# Setup instructions can be found at https://github.com/simoncadman/CUPS-Cloud-Print#configuration
+# So the nix version is something like:
+# nix run nixpkgs.cups-googlecloudprint -c sudo setupcloudprint
+# nix run nixpkgs.cups-googlecloudprint -c sudo listcloudprinters
+
+let pythonEnv = python2.buildEnv.override {
+  extraLibs = with python2Packages; [
+    six
+    httplib2
+    pycups
+  ];
+};
+
+in stdenv.mkDerivation rec {
+  pname = "cups-googlecloudprint";
+  version = "20160502";
+
+  src = fetchFromGitHub {
+    owner  = "simoncadman";
+    repo   = "CUPS-Cloud-Print";
+    rev    = version;
+    sha256 = "0760i12w7jrhq7fsgyz3yqla5cvpjb45n6m2jz96wsy3p3xf6dzz";
+  };
+
+  buildInputs = [ cups makeWrapper ];
+
+  cupsgroup = "nonexistantgroup";
+  NOPERMS = 1;
+
+  postConfigure = ''
+    substituteInPlace Makefile --replace "${cups}" "$out"
+  '';
+
+  postInstall = ''
+    pushd "$out"
+    for s in lib/cups/backend/gcp lib/cups/driver/cupscloudprint
+    do
+      echo "Wrapping $s..."
+      wrapProgram "$out/$s" --set PATH "${lib.makeBinPath [pythonEnv file]}" --prefix PYTHONPATH : "$out/share/cloudprint-cups"
+    done
+
+    mkdir bin
+
+    for s in share/cloudprint-cups/*.py
+    do
+      if [ -x "$s" ] # Only wrapping those Python scripts marked as executable
+      then
+        o="bin/$(echo $s | sed 's,share/cloudprint-cups/\(.*\).py,\1,')"
+        echo "Wrapping $o -> $s..."
+        makeWrapper "$out/$s" "$o" --set PATH "${lib.makeBinPath [pythonEnv file]}" --prefix PYTHONPATH : "$out/share/cloudprint-cups"
+      fi
+    done
+    popd
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Google Cloud Print driver for CUPS, allows printing to printers hosted on Google Cloud Print";
+    homepage    = "http://ccp.niftiestsoftware.com";
+    platforms   = platforms.linux;
+    license     = licenses.gpl3;
+  };
+}
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..194ef6cc3272
--- /dev/null
+++ b/nixpkgs/pkgs/misc/cups/drivers/hl1110/default.nix
@@ -0,0 +1,73 @@
+{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 ":" ${ stdenv.lib.makeBinPath [ gnused coreutils gawk ] }
+
+    wrapProgram $out/opt/brother/Printers/HL1110/lpd/filter_HL1110 \
+    --prefix PATH ":" ${ stdenv.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 ":" ${ stdenv.lib.makeBinPath [ gnused coreutils gawk ] }
+
+    '';
+
+  meta = {
+    homepage = "http://www.brother.com/";
+    description = "Brother HL1110 printer driver";
+    license = stdenv.lib.licenses.unfree;
+    platforms = stdenv.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/hl3140cw/default.nix b/nixpkgs/pkgs/misc/cups/drivers/hl3140cw/default.nix
new file mode 100644
index 000000000000..9dabf053fd66
--- /dev/null
+++ b/nixpkgs/pkgs/misc/cups/drivers/hl3140cw/default.nix
@@ -0,0 +1,78 @@
+{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 ":" ${ stdenv.lib.makeBinPath [ gnused coreutils gawk ] }
+
+    wrapProgram $out/opt/brother/Printers/hl3140cw/lpd/filterhl3140cw \
+      --prefix PATH ":" ${ stdenv.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 ":" ${ stdenv.lib.makeBinPath [ gnused coreutils gawk ] }
+  '';
+
+  meta = {
+    homepage = "http://www.brother.com/";
+    description = "Brother hl3140cw printer driver";
+    license = stdenv.lib.licenses.unfree;
+    platforms = stdenv.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..a291f1662883
--- /dev/null
+++ b/nixpkgs/pkgs/misc/cups/drivers/hll2340dw/default.nix
@@ -0,0 +1,68 @@
+{stdenv, fetchurl, cups, dpkg, gnused, makeWrapper, ghostscript, file, a2ps, coreutils, gawk, 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 : ${stdenv.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 ":" ${ stdenv.lib.makeBinPath [ ghostscript a2ps file gnused gnugrep coreutils which ] }
+    '';
+
+  meta = with stdenv.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..0a55ee0c8bbf
--- /dev/null
+++ b/nixpkgs/pkgs/misc/cups/drivers/hll2390dw-cups/default.nix
@@ -0,0 +1,71 @@
+{ 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 : ${stdenv.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 ":" ${ stdenv.lib.makeBinPath [ ghostscript a2ps file gnused gnugrep coreutils which ] }
+    '';
+
+  meta = with stdenv.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..fa16a136f977
--- /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://usa.kyoceradocumentsolutions.com/content/dam/kdc/kdag/downloads/technical/executables/drivers/kyoceradocumentsolutions/us/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..23ee927a3bfc
--- /dev/null
+++ b/nixpkgs/pkgs/misc/cups/drivers/mfcj470dwcupswrapper/default.nix
@@ -0,0 +1,56 @@
+{ 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 = stdenv.lib.licenses.gpl2;
+    platforms = stdenv.lib.platforms.linux;
+    downloadPage = "http://support.brother.com/g/b/downloadlist.aspx?c=us&lang=en&prod=mfcj470dw_us_eu_as&os=128";
+    maintainers = [ stdenv.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..31b5c1dbd370
--- /dev/null
+++ b/nixpkgs/pkgs/misc/cups/drivers/mfcj470dwlpr/default.nix
@@ -0,0 +1,45 @@
+{ 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 ":" ${ stdenv.lib.makeBinPath [ gnused coreutils gawk ] }
+
+    wrapProgram $out/opt/brother/Printers/mfcj470dw/lpd/filtermfcj470dw \
+    --prefix PATH ":" ${ stdenv.lib.makeBinPath [ ghostscript a2ps file gnused coreutils ] }
+    '';
+
+  meta = {
+    homepage = "http://www.brother.com/";
+    description = "Brother MFC-J470DW LPR driver";
+    license = stdenv.lib.licenses.unfree;
+    platforms = stdenv.lib.platforms.linux;
+    downloadPage = "http://support.brother.com/g/b/downloadlist.aspx?c=us&lang=en&prod=mfcj470dw_us_eu_as&os=128";
+    maintainers = [ stdenv.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..8a5c9644512e
--- /dev/null
+++ b/nixpkgs/pkgs/misc/cups/drivers/mfcj6510dwcupswrapper/default.nix
@@ -0,0 +1,65 @@
+{ 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 stdenv.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..46ce7abb28e6
--- /dev/null
+++ b/nixpkgs/pkgs/misc/cups/drivers/mfcj6510dwlpr/default.nix
@@ -0,0 +1,89 @@
+{ stdenv, fetchurl, pkgsi686Linux, dpkg, makeWrapper, coreutils, gnused, gawk, file, cups, utillinux, 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.
+    ${utillinux}/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 ":" ${ stdenv.lib.makeBinPath [ coreutils gnused gawk ] }
+    wrapProgram $out/opt/brother/Printers/mfcj6510dw/lpd/filtermfcj6510dw \
+      --prefix PATH ":" ${ stdenv.lib.makeBinPath [ coreutils gnused file ghostscript a2ps ] }
+    '';
+
+  meta = with stdenv.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..27cb40a9e4fc
--- /dev/null
+++ b/nixpkgs/pkgs/misc/cups/drivers/mfcl2700dncupswrapper/default.nix
@@ -0,0 +1,44 @@
+{ coreutils, dpkg, fetchurl, gnugrep, gnused, makeWrapper, mfcl2700dnlpr, perl, 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 : ${stdenv.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 = stdenv.lib.licenses.gpl2Plus;
+    maintainers = [ stdenv.lib.maintainers.tv ];
+    platforms = stdenv.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..24d3e5cab7fd
--- /dev/null
+++ b/nixpkgs/pkgs/misc/cups/drivers/mfcl2700dnlpr/default.nix
@@ -0,0 +1,44 @@
+{ coreutils, dpkg, fetchurl, ghostscript, gnugrep, gnused, makeWrapper, perl, stdenv, 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 : ${stdenv.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 = stdenv.lib.licenses.unfree;
+    maintainers = [ stdenv.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..8a2ce7edf26b
--- /dev/null
+++ b/nixpkgs/pkgs/misc/cups/drivers/mfcl2720dwcupswrapper/default.nix
@@ -0,0 +1,47 @@
+{ 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 : ${stdenv.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 = stdenv.lib.licenses.gpl2;
+    platforms = [ "x86_64-linux" "i686-linux" ];
+    maintainers = [ stdenv.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..0dc9eed2ac00
--- /dev/null
+++ b/nixpkgs/pkgs/misc/cups/drivers/mfcl2720dwlpr/default.nix
@@ -0,0 +1,45 @@
+{ pkgs, 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 : ${stdenv.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 = stdenv.lib.licenses.unfree;
+    platforms = [ "x86_64-linux" "i686-linux" ];
+    maintainers = [ stdenv.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..f2143df321cf
--- /dev/null
+++ b/nixpkgs/pkgs/misc/cups/drivers/mfcl2740dwcupswrapper/default.nix
@@ -0,0 +1,45 @@
+{ 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 : ${stdenv.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 = stdenv.lib.licenses.gpl2;
+    platforms = [ "x86_64-linux" "i686-linux" ];
+    maintainers = [ stdenv.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..74571611b441
--- /dev/null
+++ b/nixpkgs/pkgs/misc/cups/drivers/mfcl2740dwlpr/default.nix
@@ -0,0 +1,43 @@
+{ pkgsi686Linux, 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 : ${stdenv.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 = stdenv.lib.licenses.unfree;
+    platforms = [ "x86_64-linux" "i686-linux" ];
+    maintainers = [ stdenv.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..d82c0ad9a86a
--- /dev/null
+++ b/nixpkgs/pkgs/misc/cups/drivers/mfcl8690cdwcupswrapper/default.nix
@@ -0,0 +1,45 @@
+{ coreutils, dpkg, fetchurl, gnugrep, gnused, makeWrapper,
+mfcl8690cdwlpr, perl, 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 : ${stdenv.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 = stdenv.lib.licenses.unfree;
+    platforms = stdenv.lib.platforms.linux;
+    maintainers = [ stdenv.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..9e3c529e8988
--- /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, 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 : ${stdenv.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 = stdenv.lib.licenses.unfree;
+    maintainers = [ stdenv.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..308be5337d09
--- /dev/null
+++ b/nixpkgs/pkgs/misc/cups/drivers/samsung/1.00.36/default.nix
@@ -0,0 +1,116 @@
+{ stdenv, fetchurl, cups, libusb, 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
+    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:${stdenv.lib.getLib cups}/lib" "$bin"
+    done
+
+    patchelf --set-rpath "$out/lib:${stdenv.lib.getLib cups}/lib" "$out/lib/libscmssc.so"
+    patchelf --set-rpath "$out/lib:${libxml2.out}/lib:${libusb.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 stdenv.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..b7e75c2a16a9
--- /dev/null
+++ b/nixpkgs/pkgs/misc/cups/drivers/samsung/1.00.37.nix
@@ -0,0 +1,98 @@
+{ stdenv, fetchurl, cups, libusb, 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
+    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:${stdenv.lib.getLib cups}/lib" "$bin"
+    done
+
+    patchelf --set-rpath "$out/lib:${stdenv.lib.getLib cups}/lib" "$out/lib/libscmssc.so"
+    patchelf --set-rpath "$out/lib:${libxml2.out}/lib:${libusb.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 stdenv.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..c3c3613bbda8
--- /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.)
+
+{ 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' = stdenv.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 stdenv.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..755003e4d300
--- /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.)
+
+{ stdenv, fetchurl, cups, libusb }:
+
+# 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 = stdenv.lib.makeLibraryPath [ cups libusb ] + ":$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 stdenv.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..c65ca401d60f
--- /dev/null
+++ b/nixpkgs/pkgs/misc/cups/drivers/splix/default.nix
@@ -0,0 +1,55 @@
+{ 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 stdenv.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..67df20df4911
--- /dev/null
+++ b/nixpkgs/pkgs/misc/cups/drivers/zj-58/default.nix
@@ -0,0 +1,28 @@
+{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 stdenv.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..217f0c7f0da3
--- /dev/null
+++ b/nixpkgs/pkgs/misc/cups/filters.nix
@@ -0,0 +1,71 @@
+{ stdenv, fetchurl, pkgconfig, cups, poppler, poppler_utils, fontconfig
+, libjpeg, libpng, perl, ijs, qpdf, dbus, avahi
+, makeWrapper, coreutils, gnused, bc, gawk, gnugrep, which, ghostscript
+, mupdf
+}:
+
+let
+  binPath = stdenv.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 = [ pkgconfig 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 = stdenv.lib.licenses.gpl2;
+    platforms = stdenv.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..72f1da6b0de5
--- /dev/null
+++ b/nixpkgs/pkgs/misc/documentation-highlighter/default.nix
@@ -0,0 +1,12 @@
+{ stdenv, runCommand }:
+runCommand "documentation-highlighter" {
+  meta = {
+    description = "Highlight.js sources for the Nix Ecosystem's documentation.";
+    homepage = "https://highlightjs.org";
+    license = stdenv.lib.licenses.bsd3;
+    platforms = stdenv.lib.platforms.all;
+    maintainers = [ stdenv.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..37a3b4be7063
--- /dev/null
+++ b/nixpkgs/pkgs/misc/doge/default.nix
@@ -0,0 +1,18 @@
+{ stdenv , python3Packages }:
+
+python3Packages.buildPythonPackage rec {
+  pname = "doge";
+  version = "3.5.0";
+
+  src = python3Packages.fetchPypi {
+    inherit pname version;
+    sha256 = "0lwdl06lbpnaqqjk8ap9dsags3bzma30z17v0zc7spng1gz8m6xj";
+  };
+
+  meta = with stdenv.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..ecf79a953fe3
--- /dev/null
+++ b/nixpkgs/pkgs/misc/drivers/epkowa/default.nix
@@ -0,0 +1,316 @@
+{stdenv, fetchurl, fetchpatch, makeWrapper, symlinkJoin,
+pkgconfig, libtool,
+gtk2,
+libxml2,
+libxslt,
+libusb,
+sane-backends,
+rpm, cpio,
+getopt,
+patchelf, autoPatchelfHook, gcc
+}:
+
+let common_meta = {
+    homepage = "http://download.ebz.epson.net/dsc/search/01/search/?OSC=LX";
+    license = with stdenv.lib.licenses; epson;
+    platforms = with stdenv.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 = "16iq5gmfcgkvcx5hixggxgb8lwin5gjdhnq0zabgpfqg11n2w21q";
+    };
+
+    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."; };
+  };
+  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 = "1cz4z3wz216s77z185m665jcgdslil5gn4dsi118nv1fm17z3jik";
+    };
+    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 = "12rivh00n9mhagy5yjl1m0bv7ypbig6brqkxm0a12xy0mjq7yv8y";
+    };
+    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 = "1ran75zsxcdci00jakngkz6p9lj4q483hjapmf80p68rzhpmdr5y";
+    };
+    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 = "1ffddf488c5fc1eb39452499951bd13a2dc1971980c0551176076c81af363038";
+    };
+
+    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 = "1l0y4dy88y91jdq66pxrxqmiwsxwy0rd7x4bh0cw08r4iyhjqprz";
+    };
+    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 = stdenv.lib.mapAttrsToList (name: value: value + /share/esci) plugins;
+};
+in
+let iscan-data = stdenv.mkDerivation rec {
+  pname = "iscan-data";
+  version = "1.39.1-2";
+
+  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 = "04zrvbnxf1k6zinrd13hwnbzscc3qhmwlvx3k2jhjys2lginw7w4";
+  };
+
+  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 = [ pkgconfig ];
+  buildInputs = [
+    gtk2
+    libxml2
+    libtool
+    libusb
+    sane-backends
+    makeWrapper
+  ];
+
+  patches = [
+    (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";
+    })
+    ./firmware_location.patch
+    ./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;
+    '' +
+    stdenv.lib.concatStrings (stdenv.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 :
+    '' +
+    stdenv.lib.concatStringsSep ", " (stdenv.lib.mapAttrsToList (name: value: value.passthru.hw) plugins);
+    maintainers = with stdenv.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..95eb59f7167c
--- /dev/null
+++ b/nixpkgs/pkgs/misc/drivers/epson-201106w/default.nix
@@ -0,0 +1,77 @@
+{ 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 stdenv.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..fe52b104a528
--- /dev/null
+++ b/nixpkgs/pkgs/misc/drivers/epson-alc1100/default.nix
@@ -0,0 +1,71 @@
+{ 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 "${stdenv.lib.makeLibraryPath [
+          pkgsi686Linux.glibc
+          "$out"
+        ]}" $out/bin/alc1100
+
+      patchelf --set-rpath "${stdenv.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 stdenv.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..d90ef2c91f64
--- /dev/null
+++ b/nixpkgs/pkgs/misc/drivers/epson-escpr/default.nix
@@ -0,0 +1,49 @@
+{ 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 stdenv.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..4edc08a3571b
--- /dev/null
+++ b/nixpkgs/pkgs/misc/drivers/epson-escpr2/default.nix
@@ -0,0 +1,44 @@
+{ stdenv, fetchurl, cups, busybox }:
+
+stdenv.mkDerivation rec {
+  pname = "epson-inkjet-printer-escpr2";
+  version = "1.1.1";
+
+  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/09/72/04/c6d928e83e558c4ba1e7e8bcb5c1fe080b8095eb/epson-inkjet-printer-escpr2-1.1.1-1lsb3.2.src.rpm"
+      "https://web.archive.org/web/https://download3.ebz.epson.net/dsc/f/03/00/09/72/04/c6d928e83e558c4ba1e7e8bcb5c1fe080b8095eb/epson-inkjet-printer-escpr2-1.1.1-1lsb3.2.src.rpm"
+    ];
+    sha256 = "02vdlhvinsx6vsjq172b2c1vrfzkg0w9j5lbsnjvj6yq3yqz5b5q";
+  };
+
+  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 stdenv.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 ];
+    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..6a9782715d21
--- /dev/null
+++ b/nixpkgs/pkgs/misc/drivers/epson_201207w/default.nix
@@ -0,0 +1,77 @@
+{ 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 stdenv.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..7e1ff01bda05
--- /dev/null
+++ b/nixpkgs/pkgs/misc/drivers/foo2zjs/default.nix
@@ -0,0 +1,64 @@
+{ stdenv, fetchurl, foomatic-filters, bc, unzip, ghostscript, systemd, vim, time }:
+
+stdenv.mkDerivation rec {
+  name = "foo2zjs-20180519";
+
+  src = fetchurl {
+    url = "http://www.loegria.net/mirrors/foo2zjs/${name}.tar.gz";
+    sha256 = "1rmw4jmxn2lqp124mapvnic0ma8ipyvisx2vj848mvad5g5w9x3z";
+  };
+
+  buildInputs = [ foomatic-filters bc unzip 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 stdenv.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..9bee05bfb254
--- /dev/null
+++ b/nixpkgs/pkgs/misc/drivers/foomatic-filters/default.nix
@@ -0,0 +1,40 @@
+{ stdenv, fetchpatch, fetchurl, pkgconfig, 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 = [ pkgconfig ];
+  buildInputs = [ perl cups dbus enscript ];
+
+  patches = [
+    # for CVE-2015-8327 & CVE-2015-8560
+    (fetchpatch {
+      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 = [ stdenv.lib.maintainers.raskin ];
+    platforms = stdenv.lib.platforms.linux;
+    license = stdenv.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..4adb96e1299e
--- /dev/null
+++ b/nixpkgs/pkgs/misc/drivers/gutenprint/bin.nix
@@ -0,0 +1,66 @@
+{ 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 = stdenv.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..96c0968882d3
--- /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, pkgconfig
+, ijs, zlib
+, gimp2Support ? false, gimp
+, cupsSupport ? true, cups, libusb, perl
+}:
+
+stdenv.mkDerivation rec {
+  name = "gutenprint-5.2.14";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/gimp-print/${name}.tar.bz2";
+    sha256 = "1293x19gw1b742id7c7bz5giv3vlxaqpmbdz2g0n99wny5k0ggs5";
+  };
+
+  nativeBuildInputs = [ makeWrapper pkgconfig ];
+  buildInputs =
+    [ ijs zlib ]
+    ++ lib.optionals gimp2Support [ gimp.gtk gimp ]
+    ++ lib.optionals cupsSupport [ cups libusb 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 stdenv.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..452c2c425c1d
--- /dev/null
+++ b/nixpkgs/pkgs/misc/drivers/hplip/3.16.11.nix
@@ -0,0 +1,192 @@
+{ stdenv, fetchurl, substituteAll
+, pkgconfig
+, cups, libjpeg, libusb1, python2Packages, sane-backends, dbus, usbutils
+, net-snmp, openssl, nettools
+, bash, coreutils, utillinux
+, 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 = [
+    pkgconfig
+  ];
+
+  pythonPath = with python2Packages; [
+    dbus
+    pillow
+    pygobject2
+    reportlab
+    usbutils
+  ] ++ stdenv.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 = stdenv.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 {,${utillinux}/bin/}logger \
+      --replace {/usr,$out}/bin
+  '';
+
+  meta = with stdenv.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..80cd39b92334
--- /dev/null
+++ b/nixpkgs/pkgs/misc/drivers/hplip/3.18.5.nix
@@ -0,0 +1,224 @@
+{ stdenv, fetchurl, substituteAll
+, pkgconfig
+, cups, zlib, libjpeg, libusb1, python2Packages, sane-backends
+, dbus, file, ghostscript, usbutils
+, net-snmp, openssl, perl, nettools
+, bash, coreutils, utillinux
+, 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 = [
+    pkgconfig
+  ];
+
+  pythonPath = with python2Packages; [
+    dbus
+    pillow
+    pygobject2
+    reportlab
+    usbutils
+    sip
+  ] ++ stdenv.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
+      ${stdenv.lib.optionalString withStaticPPDInstall "--enable-cups-ppd-install"}
+      --disable-qt4
+      ${stdenv.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 = stdenv.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 {,${utillinux}/bin/}logger \
+      --replace {/usr,$out}/bin
+  '';
+
+  meta = with stdenv.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..b1853e28589c
--- /dev/null
+++ b/nixpkgs/pkgs/misc/drivers/hplip/default.nix
@@ -0,0 +1,231 @@
+{ stdenv, fetchurl, substituteAll
+, pkgconfig
+, cups, zlib, libjpeg, libusb1, python3Packages, sane-backends
+, dbus, file, ghostscript, usbutils
+, net-snmp, openssl, perl, nettools
+, bash, coreutils, utillinux
+, withQt5 ? true
+, withPlugin ? false
+, withStaticPPDInstall ? false
+}:
+
+let
+
+  name = "hplip-${version}";
+  version = "3.20.3";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/hplip/${name}.tar.gz";
+    sha256 = "0sh6cg7yjc11x1cm4477iaslj9n8ksghs85hqwgfbk7m5b2pw2a1";
+  };
+
+  plugin = fetchurl {
+    url = "https://developers.hp.com/sites/default/files/${name}-plugin.run";
+    sha256 = "13xyv30jqjysfk7gh0gyn7qj0pb0qvk2rlbhm85a3lw7bjycal8g";
+  };
+
+  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 name src;
+  format = "other";
+
+  buildInputs = [
+    libjpeg
+    cups
+    libusb1
+    sane-backends
+    dbus
+    file
+    ghostscript
+    net-snmp
+    openssl
+    perl
+    zlib
+  ];
+
+  nativeBuildInputs = [ pkgconfig ];
+
+  pythonPath = with python3Packages; [
+    dbus
+    pillow
+    pygobject2
+    reportlab
+    usbutils
+    sip
+    dbus-python
+  ] ++ stdenv.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
+  ];
+
+  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
+      ${stdenv.lib.optionalString withStaticPPDInstall "--enable-cups-ppd-install"}
+      --disable-qt4
+      ${stdenv.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 = stdenv.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 {,${utillinux}/bin/}logger \
+      --replace {/usr,$out}/bin
+  '';
+
+  meta = with stdenv.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.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..cb78bd3498a9
--- /dev/null
+++ b/nixpkgs/pkgs/misc/drivers/m33-linux/default.nix
@@ -0,0 +1,25 @@
+{ 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 stdenv.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..e5b3b5bab228
--- /dev/null
+++ b/nixpkgs/pkgs/misc/drivers/moltengamepad/default.nix
@@ -0,0 +1,39 @@
+{ 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 stdenv.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/postscript-lexmark/default.nix b/nixpkgs/pkgs/misc/drivers/postscript-lexmark/default.nix
new file mode 100644
index 000000000000..74b7c68d38e7
--- /dev/null
+++ b/nixpkgs/pkgs/misc/drivers/postscript-lexmark/default.nix
@@ -0,0 +1,38 @@
+{ 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 stdenv.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..4de6e54cd5fb
--- /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";
+  };
+
+  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")
+    # gdk-pixbuf setup hook can not choose between propagated librsvg
+    # and our librsvg with GObject introspection.
+    GDK_PIXBUF_MODULE_FILE=$(echo ${librsvg}/lib/gdk-pixbuf-2.0/*/loaders.cache)
+  '';
+
+  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/steamcontroller/default.nix b/nixpkgs/pkgs/misc/drivers/steamcontroller/default.nix
new file mode 100644
index 000000000000..ca5607b53072
--- /dev/null
+++ b/nixpkgs/pkgs/misc/drivers/steamcontroller/default.nix
@@ -0,0 +1,35 @@
+{ stdenv, 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 ];
+
+  meta = with stdenv.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..b94a09782845
--- /dev/null
+++ b/nixpkgs/pkgs/misc/drivers/sundtek/default.nix
@@ -0,0 +1,51 @@
+{ fetchurl, stdenv }:
+
+with stdenv.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..294bb8a0203e
--- /dev/null
+++ b/nixpkgs/pkgs/misc/drivers/utsushi/default.nix
@@ -0,0 +1,138 @@
+{ stdenv, fetchFromGitLab, autoreconfHook, pkg-config, boost, gtkmm2
+, imagemagick, sane-backends, tesseract4, udev, libusb1}:
+
+stdenv.mkDerivation rec {
+  pname = "utsushi";
+  version = "3.59.2";
+
+  src = fetchFromGitLab{
+    owner = pname;
+    repo = "imagescan";
+    rev = version;
+    sha256 = "06gp97dfnf43l6kb988scmm66q9n5rc7ndwv3rykrdpyhy8rbi05";
+  };
+
+  nativeBuildInputs = [
+    autoreconfHook
+    pkg-config
+  ];
+
+  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 = ''
+    # remove vendored dependencies
+    rm -r upstream/boost
+
+    # 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 conver & tesseract
+    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 = true;
+
+  meta = with stdenv.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 ];
+    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..eb0511b0c4ec
--- /dev/null
+++ b/nixpkgs/pkgs/misc/drivers/xboxdrv/default.nix
@@ -0,0 +1,28 @@
+{ stdenv, fetchurl, scons, libX11, pkgconfig
+, 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 = [ pkgconfig scons.py2 ];
+  buildInputs = [ libX11 libusb1 boost glib dbus-glib ];
+  dontUseSconsInstall = true;
+
+  meta = with stdenv.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..8702c480457d
--- /dev/null
+++ b/nixpkgs/pkgs/misc/drivers/xow/default.nix
@@ -0,0 +1,33 @@
+{ stdenv, fetchFromGitHub, libusb1 }:
+
+stdenv.mkDerivation rec {
+  pname = "xow";
+  version = "0.4";
+
+  src = fetchFromGitHub {
+    owner = "medusalix";
+    repo = "xow";
+    rev = "v${version}";
+    sha256 = "1xkwcx2gqip9v2h3zjmrn7sgcck3midl5alhsmr3zivgdipamynv";
+  };
+
+  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"
+  ];
+  enableParallelBuilding = true;
+  buildInputs = [ libusb1 ];
+
+  meta = with stdenv.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/xp-pen-g430/default.nix b/nixpkgs/pkgs/misc/drivers/xp-pen-g430/default.nix
new file mode 100644
index 000000000000..c382239f26a6
--- /dev/null
+++ b/nixpkgs/pkgs/misc/drivers/xp-pen-g430/default.nix
@@ -0,0 +1,37 @@
+{ stdenv, fetchzip, autoPatchelfHook, libusb1, libX11, libXtst, qtbase, wrapQtAppsHook, libglvnd }:
+stdenv.mkDerivation rec {
+  pname = "xp-pen-G430";
+  version = "20190820";
+
+  src = fetchzip {
+    url = "https://download01.xp-pen.com/file/2019/08/Linux%20Beta%20Driver(${version}).zip";
+    sha256 = "091kfqxxj90pdmwncgfl8ldi70pdhwryh3cls30654983m8cgnby";
+  } + /Linux_Pentablet_V1.3.0.0.tar.gz;
+
+  nativeBuildInputs = [
+    autoPatchelfHook
+    wrapQtAppsHook
+  ];
+
+  buildInputs = [
+    libusb1
+    libX11
+    libXtst
+    qtbase
+    libglvnd
+    stdenv.cc.cc.lib
+  ];
+
+  installPhase = ''
+    mkdir -p $out/bin
+    cp {Pentablet_Driver,config.xml} "$out"/bin
+  '';
+
+  meta = with stdenv.lib; {
+    homepage = "https://www.xp-pen.com/download-46.html";
+    description = "Driver for the XP-PEN G430 drawing tablet";
+    license = licenses.unfree;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ ivar ];
+  };
+}
diff --git a/nixpkgs/pkgs/misc/drivers/xwiimote/default.nix b/nixpkgs/pkgs/misc/drivers/xwiimote/default.nix
new file mode 100644
index 000000000000..3b7b42990af4
--- /dev/null
+++ b/nixpkgs/pkgs/misc/drivers/xwiimote/default.nix
@@ -0,0 +1,26 @@
+{ stdenv, udev, ncurses, pkgconfig, 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 = [ pkgconfig ];
+  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 = stdenv.lib.platforms.linux;
+    license = stdenv.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..829367aa3299
--- /dev/null
+++ b/nixpkgs/pkgs/misc/dumb/default.nix
@@ -0,0 +1,29 @@
+{ stdenv, fetchFromGitHub, cmake, allegro, SDL2 }:
+
+stdenv.mkDerivation rec {
+  pname = "dumb";
+  version = "2.0.3";
+  enableParallelBuilding = true;
+  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 stdenv.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..80765f458f80
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/atari++/default.nix
@@ -0,0 +1,32 @@
+{ 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 ${stdenv.lib.makeLibraryPath buildInputs} "$out/bin/atari++"
+  '';
+
+  meta = with stdenv.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 = stdenv.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..bb6323d18e01
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/atari800/default.nix
@@ -0,0 +1,43 @@
+{ stdenv, fetchFromGitHub, autoreconfHook
+, unzip, zlib, SDL, readline, libGLU, libGL, libX11 }:
+
+with stdenv.lib;
+stdenv.mkDerivation rec{
+  pname = "atari800";
+  version = "4.2.0";
+
+  src = fetchFromGitHub {
+    owner = "atari800";
+    repo = "atari800";
+    rev = "ATARI800_${replaceChars ["."] ["_"] version}";
+    sha256 = "15l08clqqayi9izrgsz9achan6gl4x57wqsc8mad3yn0xayzz3qy";
+  };
+
+  nativeBuildInputs = [ autoreconfHook ];
+
+  buildInputs = [ unzip 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 = stdenv.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..18c78c84d6cf
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/attract-mode/default.nix
@@ -0,0 +1,33 @@
+{ expat, fetchFromGitHub, ffmpeg, fontconfig, freetype, libarchive, libjpeg
+, libGLU, libGL, openal, pkgconfig, sfml, stdenv, zlib
+}:
+
+stdenv.mkDerivation rec {
+  pname = "attract-mode";
+  version = "2.6.1";
+
+  src = fetchFromGitHub {
+    owner = "mickelson";
+    repo = "attract";
+    rev = "v${version}";
+    sha256 = "16p369j0hanm0l2fiy6h9d9pn0f3qblcy9l39all6h7rfxnhp9ii";
+  };
+
+  nativeBuildInputs = [ pkgconfig ];
+
+  patchPhase = ''
+    sed -i "s|prefix=/usr/local|prefix=$out|" Makefile
+  '';
+
+  buildInputs = [
+    expat ffmpeg fontconfig freetype libarchive libjpeg libGLU libGL openal sfml zlib
+  ];
+
+  meta = with stdenv.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..f4cef93141da
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/blastem/default.nix
@@ -0,0 +1,50 @@
+{ stdenv, fetchurl, fetchFromGitHub, pkgconfig, 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";
+  };
+  buildInputs = [ pkgconfig SDL2 glew xcftools python pillow vasm makeWrapper ];
+  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 stdenv.lib.maintainers; [ puffnfresh ];
+    license = stdenv.lib.licenses.gpl3;
+    platforms = stdenv.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..56b85227cda4
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/bsod/default.nix
@@ -0,0 +1,31 @@
+{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 = stdenv.lib.licenses.gpl2;
+    platforms = stdenv.lib.platforms.unix;
+    maintainers = [ stdenv.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..8694d4d2d5ae
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/caprice32/default.nix
@@ -0,0 +1,47 @@
+{ stdenv, fetchFromGitHub, desktop-file-utils, libpng
+, pkgconfig, 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 pkgconfig ];
+  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 stdenv.lib; {
+    description = "A complete emulation of CPC464, CPC664 and CPC6128";
+    homepage = "https://github.com/ColinPitrat/caprice32";
+    license = licenses.gpl2;
+    maintainers = [ maintainers.genesis ];
+    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..fc5d4c813882
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/ccemux/default.nix
@@ -0,0 +1,67 @@
+{ stdenv, fetchurl, makeDesktopItem, makeWrapper, jre
+, useCCTweaked ? true
+}:
+
+let
+  version = "1.1.1";
+  rev = "af12e2e4da586275ba931eae8f40a2201251bf59";
+
+  baseUrl = "https://emux.cc/versions/${stdenv.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 = "Application;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 stdenv.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..f493faaac54f
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/cdemu/base.nix
@@ -0,0 +1,37 @@
+{ pkgName, version, pkgSha256 }:
+{ stdenv, fetchurl, cmake, pkgconfig, buildInputs, drvParams ? {} }:
+let name = "${pkgName}-${version}";
+in stdenv.mkDerivation ({
+  inherit name buildInputs;
+  src = fetchurl {
+    url = "mirror://sourceforge/cdemu/${name}.tar.bz2";
+    sha256 = pkgSha256;
+  };
+  nativeBuildInputs = [ pkgconfig 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 stdenv.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 stdenv.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..cc3118ace151
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/cdemu/libmirage.nix
@@ -0,0 +1,18 @@
+{ callPackage, gobject-introspection, cmake, pkgconfig
+, glib, libsndfile, zlib, bzip2, lzma, libsamplerate, intltool
+, pcre, utillinux, libselinux, libsepol }:
+
+let pkg = import ./base.nix {
+  version = "3.2.3";
+  pkgName = "libmirage";
+  pkgSha256 = "08mfvqyk3833ksfd47i4j3ppmrw5ry219km6h7lywdh9hm9x14yf";
+};
+in callPackage pkg {
+  buildInputs = [ glib libsndfile zlib bzip2 lzma 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 pkgconfig ];
+    propagatedBuildInputs = [ pcre utillinux 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..9723e53a8fdb
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/cdemu/vhba.nix
@@ -0,0 +1,24 @@
+{ 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 stdenv.lib; {
+    description = "Provides a Virtual (SCSI) HBA";
+    homepage = "http://cdemu.sourceforge.net/about/vhba/";
+    platforms = platforms.linux;
+    license = licenses.gpl2Plus;
+    maintainers = with stdenv.lib.maintainers; [ bendlas ];
+  };
+}
diff --git a/nixpkgs/pkgs/misc/emulators/citra/default.nix b/nixpkgs/pkgs/misc/emulators/citra/default.nix
new file mode 100644
index 000000000000..efe4770a7b00
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/citra/default.nix
@@ -0,0 +1,32 @@
+{ stdenv, mkDerivation, lib, fetchgit, cmake, SDL2, qtbase, qtmultimedia, boost }:
+
+mkDerivation {
+  pname = "citra";
+  version = "2020-03-21";
+
+  # Submodules
+  src = fetchgit {
+    url = "https://github.com/citra-emu/citra";
+    rev = "8722b970c52f2c0d8e82561477edb62a53ae9dbb";
+    sha256 = "0c1zn1f84h4f6n6p0aqz905yvv5qpdmkj2z58yla6bfgbzabfyrj";
+  };
+
+  enableParallelBuilding = true;
+  nativeBuildInputs = [ cmake ];
+  buildInputs = [ SDL2 qtbase qtmultimedia boost ];
+
+  preConfigure = ''
+    # Trick configure system.
+    sed -n 's,^ *path = \(.*\),\1,p' .gitmodules | while read path; do
+      mkdir "$path/.git"
+    done
+  '';
+
+  meta = with stdenv.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/darcnes/default.nix b/nixpkgs/pkgs/misc/emulators/darcnes/default.nix
new file mode 100644
index 000000000000..3ea98c571e8d
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/darcnes/default.nix
@@ -0,0 +1,24 @@
+{ 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 = stdenv.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..27c1a2cb9c31
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/desmume/default.nix
@@ -0,0 +1,57 @@
+{ stdenv, fetchurl, fetchpatch
+, pkgconfig, libtool, intltool
+, libXmu
+, lua
+, tinyxml
+, agg, alsaLib, soundtouch, openal
+, desktop-file-utils
+, gtk2, gtkglext, libglade
+, libGLU, libpcap, SDL, zziplib }:
+
+with stdenv.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 =
+  [ pkgconfig 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/dlx/default.nix b/nixpkgs/pkgs/misc/emulators/dlx/default.nix
new file mode 100644
index 000000000000..215f2ee46f9c
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/dlx/default.nix
@@ -0,0 +1,31 @@
+{ stdenv, fetchurl, unzip }:
+
+stdenv.mkDerivation {
+  name = "dlx-2012.07.08";
+
+  src = fetchurl {
+    url = "https://www.davidviner.com/zip/dlx/dlx.zip";
+    sha256 = "0q5hildq2xcig7yrqi26n7fqlanyssjirm7swy2a9icfxpppfpkn";
+  };
+
+  buildInputs = [ unzip ];
+
+  makeFlags = [ "LINK=gcc" "CFLAGS=-O2" ];
+
+  hardeningDisable = [ "format" ];
+
+  installPhase = ''
+    mkdir -p $out/include/dlx $out/share/dlx/{examples,doc} $out/bin
+    mv -v masm mon dasm $out/bin/
+    mv -v *.i auto.a $out/include/dlx/
+    mv -v *.a *.m $out/share/dlx/examples/
+    mv -v README.txt MANUAL.TXT $out/share/dlx/doc/
+  '';
+
+  meta = {
+    homepage = "http://www.davidviner.com/dlx.php";
+    description = "DLX Simulator";
+    license = stdenv.lib.licenses.gpl2;
+    platforms = stdenv.lib.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..b460aa7a485b
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/dolphin-emu/default.nix
@@ -0,0 +1,120 @@
+{ stdenv
+, lib
+, fetchpatch
+, pkgconfig
+, 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"
+  ];
+
+  enableParallelBuilding = true;
+
+  nativeBuildInputs = [
+    pkgconfig
+    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
+  ];
+
+  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..aa77356600be
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/dolphin-emu/master.nix
@@ -0,0 +1,87 @@
+{ lib, stdenv, fetchFromGitHub, makeDesktopItem, pkgconfig, 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-11824";
+
+  src = fetchFromGitHub {
+    owner = "dolphin-emu";
+    repo = "dolphin";
+    rev = "1b97f081b8eff9012132a4124537968bdb0e03e0";
+    sha256 = "1v96hcn34040vjsw83k8p0r0nb8rrdcz80h4ngirxzm36b3l7w6m";
+  };
+
+  enableParallelBuilding = true;
+  nativeBuildInputs = [ cmake pkgconfig ]
+  ++ 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
+  '';
+
+  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..b70f0e058c07
--- /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 = "Application;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/emulationstation/default.nix b/nixpkgs/pkgs/misc/emulators/emulationstation/default.nix
new file mode 100644
index 000000000000..af83d4b9f34b
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/emulationstation/default.nix
@@ -0,0 +1,39 @@
+{ stdenv, fetchFromGitHub, pkgconfig, 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 = [ pkgconfig cmake ];
+  buildInputs = [ alsaLib boost curl eigen freeimage freetype libarchive libGLU libGL SDL2 ];
+
+  installPhase = ''
+    install -D ../emulationstation $out/bin/emulationstation
+  '';
+
+  enableParallelBuilding = true;
+
+  meta = {
+    description = "A flexible emulator front-end supporting keyboardless navigation and custom system themes";
+    homepage = "https://emulationstation.org";
+    maintainers = [ stdenv.lib.maintainers.edwtjo ];
+    license = stdenv.lib.licenses.mit;
+    platforms = stdenv.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..493cf4c26287
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/epsxe/default.nix
@@ -0,0 +1,52 @@
+{ stdenv, fetchurl, alsaLib, curl, gdk-pixbuf, glib, gtk3, libGLU, libGL,
+  libX11, openssl_1_0_2, ncurses5, SDL, SDL_ttf, unzip, zlib, wrapGAppsHook, autoPatchelfHook }:
+
+with stdenv.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..d7c8a185a090
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/fakenes/default.nix
@@ -0,0 +1,32 @@
+{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 = stdenv.lib.licenses.gpl2Plus;
+    description = "Portable Open Source NES Emulator";
+    platforms = stdenv.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..0d4b4cd35762
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/fceux/default.nix
@@ -0,0 +1,40 @@
+{stdenv, fetchFromGitHub, scons, zlib, SDL, lua5_1, pkgconfig}:
+
+stdenv.mkDerivation {
+  pname = "fceux-unstable";
+  version = "2020-01-29";
+
+  src = fetchFromGitHub {
+    owner = "TASVideos";
+    repo = "fceux";
+    rev = "fb8d46d9697cb24b0ebe79d84eedf282f69ab337";
+    sha256 = "0gpz411dzfwx9mr34yi4zb1hphd5hha1nvwgzxki0sviwafca992";
+  };
+
+  nativeBuildInputs = [ pkgconfig 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 = stdenv.lib.licenses.gpl2;
+    maintainers = [ stdenv.lib.maintainers.scubed2 ];
+    homepage = "http://www.fceux.com/";
+    platforms = stdenv.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..583e692e1336
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/firebird-emu/default.nix
@@ -0,0 +1,38 @@
+{ stdenv, fetchFromGitHub, qmake, qtbase, qtdeclarative }:
+
+stdenv.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 = stdenv.lib.licenses.gpl3;
+    maintainers = with stdenv.lib.maintainers; [ pneumaticat ];
+    # Only tested on Linux, but likely possible to build on, e.g. macOS
+    platforms = stdenv.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..38730ec752ba
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/fs-uae/default.nix
@@ -0,0 +1,32 @@
+{ stdenv, fetchurl, pkgconfig
+, gettext, gtk2, SDL2, zlib, glib, openal, libGLU, libGL, lua, freetype, libmpeg2, zip }:
+
+with stdenv.lib;
+stdenv.mkDerivation rec {
+
+  pname = "fs-uae";
+  version = "3.0.3";
+
+  src = fetchurl {
+    url = "https://fs-uae.net/stable/${version}/${pname}-${version}.tar.gz";
+    sha256 = "0v5c8ns00bam4myj7454hpkrnm9i81jwdzrp5nl7gaa18qb60hjq";
+  };
+
+  nativeBuildInputs = [ pkgconfig ];
+  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 stdenv.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..e2334a62a134
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/fuse-emulator/default.nix
@@ -0,0 +1,29 @@
+{ lib, stdenv, fetchurl, perl, pkgconfig, 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 pkgconfig 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..a9449808d527
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/gens-gs/default.nix
@@ -0,0 +1,25 @@
+{ stdenv, fetchurl, pkgconfig, 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 = [ pkgconfig ];
+  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 stdenv.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..e742fde90ac9
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/gxemul/default.nix
@@ -0,0 +1,37 @@
+{ stdenv, fetchurl }:
+
+stdenv.mkDerivation rec {
+  pname = "gxemul";
+  version = "0.6.0.1";
+
+  src = fetchurl {
+    url = "http://gxemul.sourceforge.net/src/${pname}-${version}.tar.gz";
+    sha256 = "1afd9l0igyv7qgc0pn3rkdgrl5d0ywlyib0qhg4li23zilyq5407";
+  };
+
+  configurePhase = "./configure";
+
+  installPhase = ''
+    mkdir -p $out/bin;
+    mkdir -p $out/share/${pname}-${version};
+    cp gxemul $out/bin;
+    cp -r doc $out/share/${pname}-${version};
+    cp -r demos $out/share/${pname}-${version};
+    cp -r ./man $out/;
+  '';
+
+  meta = {
+    license = stdenv.lib.licenses.bsd3;
+    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.
+    '';
+    homepage = "http://gxemul.sourceforge.net/";
+  };
+}
diff --git a/nixpkgs/pkgs/misc/emulators/hatari/default.nix b/nixpkgs/pkgs/misc/emulators/hatari/default.nix
new file mode 100644
index 000000000000..db1a6664c542
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/hatari/default.nix
@@ -0,0 +1,23 @@
+{ stdenv, fetchurl, zlib, SDL, cmake }:
+
+stdenv.mkDerivation rec {
+  name = "hatari-2.2.1";
+
+  src = fetchurl {
+    url = "https://download.tuxfamily.org/hatari/2.2.1/${name}.tar.bz2";
+    sha256 = "0q3g23vnx58w666723v76ilh9j353md3sn48cmlq9gkll8qfzbqi";
+  };
+
+  # For pthread_cancel
+  cmakeFlags = [ "-DCMAKE_EXE_LINKER_FLAGS=-lgcc_s" ];
+
+  buildInputs = [ zlib SDL cmake ];
+
+  meta = {
+    homepage = "http://hatari.tuxfamily.org/";
+    description = "Atari ST/STE/TT/Falcon emulator";
+    license = stdenv.lib.licenses.gpl2Plus;
+    platforms = stdenv.lib.platforms.linux;
+    maintainers = with stdenv.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..e735bdb38eed
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/higan/default.nix
@@ -0,0 +1,135 @@
+{ stdenv, fetchFromGitHub
+, pkgconfig
+, libX11, libXv
+, udev
+, libGLU, libGL, SDL2
+, libao, openal, libpulseaudio
+, alsaLib
+, gtk2, gtksourceview
+, runtimeShell
+# Darwin dependencies
+, libicns, Carbon, Cocoa, OpenGL, OpenAL}:
+
+let
+  inherit (stdenv.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 = [ pkgconfig ]
+    ++ 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 stdenv.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..0b6fb0dea54d
--- /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 stdenv.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/libdsk/default.nix b/nixpkgs/pkgs/misc/emulators/libdsk/default.nix
new file mode 100644
index 000000000000..6a2f94e77e6c
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/libdsk/default.nix
@@ -0,0 +1,19 @@
+{ stdenv, fetchurl }:
+
+stdenv.mkDerivation rec {
+  pname = "libdsk";
+  version = "1.5.12";
+
+  src = fetchurl {
+    url = "https://www.seasip.info/Unix/LibDsk/${pname}-${version}.tar.gz";
+    sha256 = "0s2k9vkrf95pf4ydc6vazb29ysrnhdpcfjnf17lpk4nmlv1j3vyv";
+  };
+
+  meta = with stdenv.lib; {
+    description = "A library for accessing discs and disc image files";
+    homepage = "http://www.seasip.info/Unix/LibDsk/";
+    license = licenses.gpl2Plus;
+    maintainers = [ maintainers.genesis ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/misc/emulators/mame/default.nix b/nixpkgs/pkgs/misc/emulators/mame/default.nix
new file mode 100644
index 000000000000..695937606128
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/mame/default.nix
@@ -0,0 +1,87 @@
+{ stdenv, mkDerivation, fetchFromGitHub, makeDesktopItem, makeWrapper
+, python, pkgconfig, SDL2, SDL2_ttf, alsaLib, which, qtbase, libXinerama
+, libpcap, CoreAudioKit, ForceFeedback
+, installShellFiles }:
+
+with stdenv;
+
+let
+  majorVersion = "0";
+  minorVersion = "220";
+
+  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 = "0ddmq3lagk7f1wkgybckcci4sigcqn1gzafggnnqjzq2q8viww0c";
+  };
+
+  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 pkgconfig 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=${stdenv.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..feedfc2603e7
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/mednafen/default.nix
@@ -0,0 +1,73 @@
+{ stdenv, fetchurl, pkgconfig, freeglut, libGLU, libGL, libcdio, libjack2
+, libsamplerate, libsndfile, libX11, SDL2, SDL2_net, zlib }:
+
+stdenv.mkDerivation rec {
+  pname = "mednafen";
+  version = "1.24.1";
+
+  src = fetchurl {
+    url = "https://mednafen.github.io/releases/files/${pname}-${version}.tar.xz";
+    sha256 = "1rszcy5lgfrw0f9b62sd69kgz1xziki3d55vpqh6k9jdmwzxyym4";
+  };
+
+  nativeBuildInputs = [ pkgconfig ];
+
+  buildInputs = [
+    freeglut
+    libGLU libGL
+    libcdio
+    libjack2
+    libsamplerate
+    libsndfile
+    libX11
+    SDL2
+    SDL2_net
+    zlib
+  ];
+
+  hardeningDisable = [ "pic" ];
+
+  postInstall = ''
+    mkdir -p $out/share/doc
+    mv Documentation $out/share/doc/mednafen
+  '';
+
+  meta = with stdenv.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..9a1edc00452d
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/mednafen/server.nix
@@ -0,0 +1,21 @@
+{ 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 stdenv.lib; {
+    description = "Netplay server for Mednafen";
+    homepage = "https://mednafen.github.io/";
+    license = licenses.gpl2;
+    maintainers = with maintainers; [ AndersonTorres ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/misc/emulators/mednaffe/default.nix b/nixpkgs/pkgs/misc/emulators/mednaffe/default.nix
new file mode 100644
index 000000000000..7e231c5edd3a
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/mednaffe/default.nix
@@ -0,0 +1,30 @@
+{ stdenv, fetchFromGitHub, makeWrapper, autoreconfHook, pkgconfig, wrapGAppsHook
+, gtk2 ? null, gtk3 ? null, mednafen }:
+
+with stdenv.lib;
+
+stdenv.mkDerivation rec {
+  pname = "mednaffe";
+  version = "0.8.8";
+
+  src = fetchFromGitHub {
+    owner = "AmatCoder";
+    repo = "mednaffe";
+    rev = "${version}";
+    sha256 = "15qk3a3l1phr8bap2ayh3c0vyvw2jwhny1iz1ajq2adyjpm9fhr7";
+  };
+
+  nativeBuildInputs = [ autoreconfHook makeWrapper pkgconfig wrapGAppsHook ];
+  buildInputs = [ gtk2 gtk3 mednafen ];
+
+  configureFlags = [ (enableFeature (gtk3 != null) "gtk3") ];
+  postInstall = "wrapProgram $out/bin/mednaffe --set PATH ${mednafen}/bin";
+
+  meta = {
+    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/mgba/default.nix b/nixpkgs/pkgs/misc/emulators/mgba/default.nix
new file mode 100644
index 000000000000..5611b344cb1c
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/mgba/default.nix
@@ -0,0 +1,63 @@
+{ stdenv, fetchFromGitHub, makeDesktopItem, wrapQtAppsHook, pkgconfig
+, cmake, epoxy, libzip, libelf, libedit, ffmpeg, 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.8.1";
+
+  src = fetchFromGitHub {
+    owner = "mgba-emu";
+    repo = "mgba";
+    rev = version;
+    sha256 = "1if82mfaak3696w5d5yshynpzywrxgvg3ifdfi2rwlpvq1gpd429";
+  };
+
+  enableParallelBuilding = true;
+  nativeBuildInputs = [ wrapQtAppsHook pkgconfig cmake ];
+
+  buildInputs = [
+    epoxy libzip libelf libedit ffmpeg SDL2 imagemagick
+    qtbase qtmultimedia qttools minizip
+  ];
+
+  postInstall = ''
+    cp -r ${desktopItem}/share/applications $out/share
+  '';
+
+  meta = with stdenv.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..621559627a75
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/mupen64plus/default.nix
@@ -0,0 +1,29 @@
+{stdenv, fetchurl, boost, dash, freetype, libpng, pkgconfig, 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 = [ pkgconfig 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 stdenv.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..5050df007f6a
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/nestopia/default.nix
@@ -0,0 +1,72 @@
+{ stdenv, fetchFromGitHub, pkgconfig, 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
+    unzip
+    xdg_utils
+    gnome3.adwaita-icon-theme
+  ];
+
+  nativeBuildInputs = [
+    pkgconfig
+    makeWrapper
+    wrapGAppsHook
+  ];
+
+  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 = stdenv.lib.licenses.gpl2;
+    platforms = stdenv.lib.platforms.linux;
+    maintainers = with stdenv.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/openmsx/custom-nixos.mk b/nixpkgs/pkgs/misc/emulators/openmsx/custom-nixos.mk
new file mode 100644
index 000000000000..9098762e40d5
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/openmsx/custom-nixos.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..68b464f4d358
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/openmsx/default.nix
@@ -0,0 +1,49 @@
+{ stdenv, fetchFromGitHub, pkgconfig
+, python
+, alsaLib, glew, libGL, libpng
+, libogg, libtheora, libvorbis
+, SDL, SDL_image, SDL_ttf
+, freetype, tcl, zlib
+}:
+
+with stdenv.lib;
+stdenv.mkDerivation rec {
+
+  pname = "openmsx";
+  version = "0.15.0";
+
+  src = fetchFromGitHub {
+    owner = "openMSX";
+    repo = "openMSX";
+    rev = "RELEASE_0_15_0";
+    sha256 = "1lv5kdw0812mkf7k20z2djzk0pbs792xq2mibbnz9rfjf02whi7l";
+    fetchSubmodules = true;
+  };
+
+  nativeBuildInputs = [ pkgconfig python ];
+
+  buildInputs = [ alsaLib glew libGL libpng
+    libogg libtheora libvorbis freetype
+    SDL SDL_image SDL_ttf tcl zlib ];
+
+  postPatch = ''
+    cp ${./custom-nixos.mk} build/custom.mk
+  '';
+
+  dontAddPrefix = true;
+
+  # Many thanks @mthuurne from OpenMSX project
+  # for providing support to Nixpkgs :)
+  TCL_CONFIG="${tcl}/lib/";
+
+  meta = {
+    description = "A MSX emulator";
+    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;
+  };
+}
diff --git a/nixpkgs/pkgs/misc/emulators/pcsx2/default.nix b/nixpkgs/pkgs/misc/emulators/pcsx2/default.nix
new file mode 100644
index 000000000000..6f28c5777ca1
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/pcsx2/default.nix
@@ -0,0 +1,83 @@
+{ alsaLib, cmake, fetchFromGitHub, glib, gettext, gtk2, harfbuzz, lib, libaio
+, libpng, libpcap, libxml2, makeWrapper, perl, pkgconfig, portaudio
+, SDL2, soundtouch, stdenv, udev, wxGTK, zlib
+}:
+
+stdenv.mkDerivation rec {
+  pname = "pcsx2";
+  version = "unstable-2020-01-05";
+
+  src = fetchFromGitHub {
+    owner = "PCSX2";
+    repo = "pcsx2";
+    rev = "9c12937351c51b921e1f28d44b019bc52e747c51";
+    sha256 = "0y1f5v99a6njmf6hyvl4z5xnrm7351rkyw2fn4f09hqn92r7zmi5";
+  };
+
+  postPatch = "sed '1i#include \"x86intrin.h\"' -i common/src/x86emitter/cpudetect.cpp";
+
+  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"
+    "-DwxWidgets_LIBRARIES=${wxGTK}/lib"
+    "-DwxWidgets_INCLUDE_DIRS=${wxGTK}/include"
+    "-DwxWidgets_CONFIG_EXECUTABLE=${wxGTK}/bin/wx-config"
+    "-DPACKAGE_MODE=TRUE"
+    "-DPLUGIN_DIR=${placeholder "out"}/lib/pcsx2"
+    "-DREBUILD_SHADER=TRUE"
+    "-DXDG_STD=TRUE"
+    "-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"
+    "-DGTK3_API=FALSE"
+  ];
+
+  postFixup = ''
+    wrapProgram $out/bin/PCSX2 \
+      --set __GL_THREADED_OPTIMIZATIONS 1
+  '';
+
+  nativeBuildInputs = [ cmake makeWrapper perl pkgconfig ];
+
+  buildInputs = [
+    alsaLib
+    glib
+    gettext
+    gtk2
+    harfbuzz
+    libaio
+    libpcap
+    libpng
+    libxml2
+    portaudio
+    SDL2
+    soundtouch
+    udev
+    wxGTK
+    zlib
+  ];
+
+  meta = with stdenv.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 ];
+
+    # 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.i686;
+  };
+}
diff --git a/nixpkgs/pkgs/misc/emulators/pcsxr/default.nix b/nixpkgs/pkgs/misc/emulators/pcsxr/default.nix
new file mode 100644
index 000000000000..ae608f563128
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/pcsxr/default.nix
@@ -0,0 +1,87 @@
+{ stdenv, fetchurl, autoreconfHook, intltool, pkgconfig, 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 pkgconfig 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 stdenv.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..b2aa81124dae
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/ppsspp/default.nix
@@ -0,0 +1,69 @@
+{ SDL2
+, cmake
+, fetchFromGitHub
+, ffmpeg
+, glew
+, lib
+, libzip
+, mkDerivation
+, pkgconfig
+, python3
+, qtbase
+, qtmultimedia
+, snappy
+, zlib
+}:
+
+mkDerivation rec {
+  pname = "ppsspp";
+  version = "1.9.4";
+
+  src = fetchFromGitHub {
+    owner = "hrydgard";
+    repo = "ppsspp";
+    rev = "v${version}";
+    fetchSubmodules = true;
+    sha256 = "0ivi0dcfxwa4nz19amki80qacnjhqr42f0ihyby1scxafl3nq55c";
+  };
+
+  postPatch = ''
+    substituteInPlace git-version.cmake \
+      --replace unknown ${src.rev}
+    substituteInPlace UI/NativeApp.cpp \
+      --replace /usr/share $out/share
+  '';
+
+  nativeBuildInputs = [ cmake pkgconfig python3 ];
+
+  buildInputs = [
+    SDL2
+    ffmpeg
+    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"
+  ];
+
+  installPhase = ''
+    mkdir -p $out/share/ppsspp
+    install -Dm555 PPSSPPQt $out/bin/ppsspp
+    mv assets $out/share/ppsspp
+  '';
+
+  meta = with lib; {
+    description = "A PSP emulator for Android, Windows, Mac and Linux, written in C++";
+    homepage = "https://www.ppsspp.org/";
+    license = licenses.gpl2Plus;
+    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..1242a1ef11ac
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/qmc2/default.nix
@@ -0,0 +1,41 @@
+{ stdenv
+, fetchurl, qttools, pkgconfig
+, minizip, zlib
+, qtbase, qtsvg, qtmultimedia, qtwebkit, qttranslations, qtxmlpatterns
+, rsync, SDL2, xwininfo
+, utillinux
+, 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 pkgconfig ];
+  buildInputs = [ minizip qtbase qtsvg qtmultimedia qtwebkit
+                  qttranslations qtxmlpatterns rsync SDL2
+                  xwininfo zlib utillinux xorg.libxcb ];
+
+  makeFlags = [ "DESTDIR=$(out)"
+                "PREFIX=/"
+                "DATADIR=/share/"
+                "SYSCONFDIR=/etc" ];
+
+  meta = with stdenv.lib; {
+    description = "A Qt frontend for MAME/MESS";
+    homepage = "https://qmc2.batcom-it.net";
+    license = licenses.gpl2;
+    maintainers = [ maintainers.genesis ];
+    platforms = platforms.linux;
+    broken = true;
+  };
+}
diff --git a/nixpkgs/pkgs/misc/emulators/resim/default.nix b/nixpkgs/pkgs/misc/emulators/resim/default.nix
new file mode 100644
index 000000000000..81acdf81f2ec
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/resim/default.nix
@@ -0,0 +1,18 @@
+{ fetchFromGitHub, 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
+  '';
+}
diff --git a/nixpkgs/pkgs/misc/emulators/retroarch/cores.nix b/nixpkgs/pkgs/misc/emulators/retroarch/cores.nix
new file mode 100644
index 000000000000..0ebd2b82a9a9
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/retroarch/cores.nix
@@ -0,0 +1,1074 @@
+{ stdenv, fetchgit, fetchFromGitHub, fetchFromGitLab, cmake, pkgconfig, makeWrapper, python27, python37, retroarch
+, alsaLib, fluidsynth, curl, hidapi, libGLU, gettext, glib, gtk2, portaudio, SDL, SDL_net, SDL2, SDL2_image, libGL
+, ffmpeg, pcre, libevdev, libpng, libjpeg, libzip, udev, libvorbis, snappy, which, hexdump
+, miniupnpc, sfml, xorg, zlib, nasm, libpcap, boost, icu, openssl
+, buildPackages }:
+
+let
+
+  d2u = stdenv.lib.replaceChars ["-"] ["_"];
+
+  mkLibRetroCore = { core, src, description, license, broken ? false, ... }@a:
+  stdenv.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} $@"
+    '';
+
+    enableParallelBuilding = true;
+
+    passthru = {
+      inherit (a) core;
+      libretroCore = "/lib/retroarch/cores";
+    };
+
+    meta = with stdenv.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 stdenv.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 pkgconfig ];
+    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 = stdenv.lib.optional stdenv.hostPlatform.isAarch32 "platform=armv-unix"
+             ++ stdenv.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 = stdenv.lib.optional stdenv.hostPlatform.isAarch32 "platform=armv-unix"
+             ++ stdenv.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 pkgconfig ];
+    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 = stdenv.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 = stdenv.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 = stdenv.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 = stdenv.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";
+    };
+    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";
+  };
+
+  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 = stdenv.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 = stdenv.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 pkgconfig ];
+    extraBuildInputs = [ libGLU libGL libzip ffmpeg 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 = "6db918cfe32b157239da44096091c212fdfb3b60";
+      sha256 = "0y3jhy50qdhhfglybys9m0fgk9r24ksdcgv5iqpyxy5a4cjvhv8j";
+    };
+    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 pkgconfig 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 pkgconfig ];
+    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 = stdenv.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..a91e2de85934
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/retroarch/default.nix
@@ -0,0 +1,60 @@
+{ stdenv, fetchFromGitHub, which, pkgconfig, makeWrapper
+, ffmpeg, 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
+}:
+
+with stdenv.lib;
+
+stdenv.mkDerivation rec {
+  pname = "retroarch-bare";
+  version = "1.8.5";
+
+  src = fetchFromGitHub {
+    owner = "libretro";
+    repo = "RetroArch";
+    sha256 = "1pg8j9wvwgrzsv4xdai6i6jgdcc922v0m42rbqxvbghbksrc8la3";
+    rev = "v${version}";
+  };
+
+  nativeBuildInputs = [ pkgconfig ]
+                      ++ optional withVulkan makeWrapper;
+
+  buildInputs = [ ffmpeg 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 ];
+
+  enableParallelBuilding = true;
+
+  configureFlags = stdenv.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..d751c4f7fc43
--- /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
+    ${stdenv.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 = stdenv.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..08ebf8ea8544
--- /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;
+
+  buildInputs = [ 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..d2c904723b1e
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/retrofe/default.nix
@@ -0,0 +1,78 @@
+{ stdenv, fetchhg, cmake, glib, gst_all_1, makeWrapper, pkgconfig
+, 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 pkgconfig 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 stdenv.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..4e022b2868fa
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/rpcs3/default.nix
@@ -0,0 +1,53 @@
+{ mkDerivation, lib, fetchgit, cmake, pkgconfig, git
+, qtbase, qtquickcontrols, openal, glew, vulkan-loader, libpng, ffmpeg, libevdev, python3
+, pulseaudioSupport ? true, libpulseaudio
+, waylandSupport ? true, wayland
+, alsaSupport ? true, alsaLib
+}:
+
+let
+  majorVersion = "0.0.8";
+  gitVersion = "9300-341fdf7eb"; # 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 = "341fdf7eb14763fd06e2eab9a4b2b8f1adf9fdbd";
+    sha256 = "1qx97zkkjl6bmv5rhfyjqynbz0v8h40b2wxqnl59g287wj0yk3y1";
+  };
+
+  preConfigure = ''
+    cat > ./rpcs3/git-version.h <<EOF
+    #define RPCS3_GIT_VERSION "${gitVersion}"
+    #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 pkgconfig git ];
+
+  buildInputs = [
+    qtbase qtquickcontrols openal glew vulkan-loader libpng ffmpeg libevdev python3
+  ] ++ lib.optional pulseaudioSupport libpulseaudio
+    ++ lib.optional alsaSupport alsaLib
+    ++ lib.optional waylandSupport wayland;
+
+  enableParallelBuilding = true;
+
+  meta = with lib; {
+    description = "PS3 emulator/debugger";
+    homepage = "https://rpcs3.net/";
+    maintainers = with maintainers; [ abbradar nocent ];
+    license = licenses.gpl2;
+    platforms = [ "x86_64-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..0ae92121cab1
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/snes9x-gtk/default.nix
@@ -0,0 +1,39 @@
+{ stdenv, fetchFromGitHub, autoreconfHook, wrapGAppsHook, intltool, pkgconfig
+, SDL2, zlib, gtk3, libxml2, libXv, epoxy, minizip, portaudio }:
+
+stdenv.mkDerivation rec {
+  pname = "snes9x-gtk";
+  version = "1.57";
+
+  src = fetchFromGitHub {
+    owner = "snes9xgit";
+    repo = "snes9x";
+    rev = version;
+    sha256 = "1jcvj2l03b98iz6aq4x747vfz7i6h6j339z4brj4vz71s11vn31a";
+  };
+
+  enableParallelBuilding = true;
+  nativeBuildInputs = [ autoreconfHook wrapGAppsHook intltool pkgconfig ];
+  buildInputs = [ SDL2 zlib gtk3 libxml2 libXv epoxy minizip portaudio ];
+
+  preAutoreconf = ''
+    cd gtk
+    intltoolize
+  '';
+
+  meta = with stdenv.lib; {
+    homepage = "http://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.
+    '';
+
+    license = licenses.lgpl2;
+    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..72dc48c1f4d0
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/stella/default.nix
@@ -0,0 +1,35 @@
+{ stdenv, fetchFromGitHub, pkgconfig, SDL2 }:
+
+with stdenv.lib;
+stdenv.mkDerivation rec {
+
+  pname = "stella";
+  version = "6.1.1";
+
+  src = fetchFromGitHub {
+    owner = "stella-emu";
+    repo = "stella";
+    rev = version;
+    sha256 = "1iwhslrkq887v035j68lhblybww8r792515rp2m5qzmdgnjzsvbb";
+  };
+
+  nativeBuildInputs = [ pkgconfig ];
+  buildInputs = [ SDL2 ];
+  
+  enableParallelBuilding = true;
+
+  meta = {
+    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.
+    As of its 3.5 release, Stella is officially donationware. 
+    '';
+    homepage = "http://stella-emu.github.io/";
+    license = licenses.gpl2;
+    maintainers = [ maintainers.AndersonTorres ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/misc/emulators/termtekst/default.nix b/nixpkgs/pkgs/misc/emulators/termtekst/default.nix
new file mode 100644
index 000000000000..8186aba1ee56
--- /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/uae/default.nix b/nixpkgs/pkgs/misc/emulators/uae/default.nix
new file mode 100644
index 000000000000..7b52430aa015
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/uae/default.nix
@@ -0,0 +1,26 @@
+{stdenv, fetchurl, pkgconfig, 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 = [ pkgconfig ];
+  buildInputs = [ gtk2 alsaLib SDL ];
+
+  hardeningDisable = [ "format" ];
+  LDFLAGS = [ "-lm" ];
+
+  meta = {
+    description = "Ultimate/Unix/Unusable Amiga Emulator";
+    license = stdenv.lib.licenses.gpl2Plus;
+    homepage = "http://web.archive.org/web/20130901222855/http://www.amigaemulator.org/";
+    maintainers = [ stdenv.lib.maintainers.sander ];
+    platforms = stdenv.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..2aae72b3e206
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/vbam/default.nix
@@ -0,0 +1,57 @@
+{ stdenv
+, cairo
+, cmake
+, fetchFromGitHub
+, ffmpeg
+, gettext
+, libGLU, libGL
+, openal
+, pkgconfig
+, 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 pkgconfig ];
+
+  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 stdenv.lib; {
+    description = "A merge of the original Visual Boy Advance forks";
+    license = licenses.gpl2;
+    maintainers = with maintainers; [ lassulus ];
+    homepage = "https://vba-m.com/";
+    platforms = stdenv.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..ca3149785a4d
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/vice/default.nix
@@ -0,0 +1,53 @@
+{ stdenv, fetchurl, bison, flex, perl, libpng, giflib, libjpeg, alsaLib, readline, libGLU, libGL, libXaw
+, pkgconfig, 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
+    pkgconfig 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 = "Application;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 = stdenv.lib.licenses.gpl2Plus;
+    maintainers = [ stdenv.lib.maintainers.sander ];
+    platforms = stdenv.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..025158b07173
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/wine/base.nix
@@ -0,0 +1,149 @@
+{ stdenv, lib, pkgArches, callPackage,
+  name, version, src, monos, geckos, platforms,
+  pkgconfig, fontforge, makeWrapper, flex, bison,
+  supportFlags,
+  buildScript ? null, configureFlags ? []
+}:
+
+with import ./util.nix { inherit lib; };
+
+let
+  vkd3d = callPackage ./vkd3d.nix {};
+in
+stdenv.mkDerivation ((lib.optionalAttrs (buildScript != null) {
+  builder = buildScript;
+}) // rec {
+  inherit name src configureFlags;
+
+  nativeBuildInputs = [
+    pkgconfig fontforge makeWrapper flex bison
+  ];
+
+  buildInputs = toBuildInputs pkgArches (with supportFlags; (pkgs:
+  [ pkgs.freetype ]
+  ++ 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
+  ])
+  ++ [ pkgs.xorg.libX11 pkgs.perl ]));
+
+  patches = [
+    # Also look for root certificates at $NIX_SSL_CERT_FILE
+    ./cert-path.patch
+  ];
+
+  # 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;
+
+  # Disable stripping to avoid breaking placeholder DLLs/EXEs.
+  # Symptoms of broken placeholders are: when the wineprefix is created
+  # drive_c/windows/system32 will only contain a few files instead of
+  # hundreds, there will be an error about winemenubuilder and MountMgr
+  # on startup of Wine, and the Drives tab in winecfg will show an error.
+  dontStrip = 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";
+
+  passthru = { inherit pkgArches; };
+  meta = {
+    inherit version platforms;
+    homepage = "https://www.winehq.org/";
+    license = with stdenv.lib.licenses; [ lgpl21Plus ];
+    description = "An Open Source implementation of the Windows API on top of X, OpenGL, and Unix";
+    maintainers = with stdenv.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..da01a4778102
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/wine/cert-path.patch
@@ -0,0 +1,24 @@
+diff --git a/dlls/crypt32/rootstore.c b/dlls/crypt32/rootstore.c
+index f795181..fb4926a 100644
+--- a/dlls/crypt32/rootstore.c
++++ b/dlls/crypt32/rootstore.c
+@@ -18,6 +18,7 @@
+ #include "config.h"
+ #include <stdarg.h>
+ #include <stdio.h>
++#include <stdlib.h> /* getenv */
+ #include <sys/types.h>
+ #ifdef HAVE_SYS_STAT_H
+ #include <sys/stat.h>
+@@ -916,6 +917,11 @@ static void read_trusted_roots_from_known_locations(HCERTSTORE store)
+ 
+         for (i = 0; !ret && i < ARRAY_SIZE(CRYPT_knownLocations); i++)
+             ret = import_certs_from_path(CRYPT_knownLocations[i], from, TRUE);
++
++        char *nix_cert_file = getenv("NIX_SSL_CERT_FILE");
++        if (nix_cert_file != NULL)
++            ret = import_certs_from_path(nix_cert_file, from, TRUE);
++
+         check_and_store_certs(from, store);
+     }
+     CertCloseStore(from, 0);
diff --git a/nixpkgs/pkgs/misc/emulators/wine/default.nix b/nixpkgs/pkgs/misc/emulators/wine/default.nix
new file mode 100644
index 000000000000..368e2845ca40
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/wine/default.nix
@@ -0,0 +1,68 @@
+## 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,
+}:
+
+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;
+        };
+      });
+
+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..3ea60e62c665
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/wine/packages.nix
@@ -0,0 +1,35 @@
+{ stdenv_32bit, lib, pkgs, pkgsi686Linux, 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;
+    pkgArches = [ pkgsi686Linux ];
+    geckos = [ gecko32 ];
+    monos =  [ mono ];
+    platforms = [ "i686-linux" "x86_64-linux" ];
+  };
+  wine64 = callPackage ./base.nix {
+    name = "wine64-${version}";
+    inherit src version supportFlags;
+    pkgArches = [ pkgs ];
+    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;
+    stdenv = stdenv_32bit;
+    pkgArches = [ pkgs pkgsi686Linux ];
+    geckos = [ gecko32 gecko64 ];
+    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..0e3eb2ce6986
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/wine/sources.nix
@@ -0,0 +1,65 @@
+{ 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 = "5.0";
+    url = "https://dl.winehq.org/wine/source/5.0/wine-${version}.tar.xz";
+    sha256 = "1d0kcy338radq07hrnzcpc9lc9j2fvzjh37q673002x8d6x5058q";
+
+    ## 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 = "4.9.4";
+      url = "https://dl.winehq.org/wine/wine-mono/${version}/wine-mono-${version}.msi";
+      sha256 = "1p8g45xphxnns7dkg9rbaknarbjy5cjhrngaf0fsgk9z68wgz9ji";
+    };
+  };
+
+  unstable = fetchurl rec {
+    # NOTE: Don't forget to change the SHA256 for staging as well.
+    version = "5.5";
+    url = "https://dl.winehq.org/wine/source/5.x/wine-${version}.tar.xz";
+    sha256 = "1z7mvl6fgk7cg8vmy157r8azcz89srnckbzvsc6cva7a1fdi7qx0";
+    inherit (stable) mono gecko32 gecko64;
+  };
+
+  staging = fetchFromGitHub rec {
+    # https://github.com/wine-staging/wine-staging/releases
+    inherit (unstable) version;
+    sha256 = "0wcj73xcxsk5897m5fg14cjir2md167m09jjjv9z9n6157bfr9fw";
+    owner = "wine-staging";
+    repo = "wine-staging";
+    rev = "v${version}";
+  };
+
+  winetricks = fetchFromGitHub rec {
+    # https://github.com/Winetricks/winetricks/releases
+    version = "20191224";
+    sha256 = "07q3zh2i3xqzpg46ljarhq3a4ha9zwpc6jqzvly0kfglkh3b3v66";
+    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..5c2469f8f44e
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/wine/staging.nix
@@ -0,0 +1,24 @@
+{ stdenv, callPackage, wineUnstable }:
+
+with callPackage ./util.nix {};
+
+let patch = (callPackage ./sources.nix {}).staging;
+    build-inputs = pkgNames: extra:
+      (mkBuildInputs wineUnstable.pkgArches pkgNames) ++ extra;
+in assert stdenv.lib.getVersion wineUnstable == patch.version;
+
+stdenv.lib.overrideDerivation wineUnstable (self: {
+  buildInputs = build-inputs [ "perl" "utillinux" "autoconf" ] 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
+    cd ..
+  '';
+})
diff --git a/nixpkgs/pkgs/misc/emulators/wine/util.nix b/nixpkgs/pkgs/misc/emulators/wine/util.nix
new file mode 100644
index 000000000000..b90a68e72df5
--- /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..082eb0b90c67
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/wine/vkd3d.nix
@@ -0,0 +1,26 @@
+{ stdenv, fetchurl, vulkan-headers, spirv-headers, vulkan-loader }:
+
+#TODO: MoltenVK
+#TODO: unstable
+
+stdenv.mkDerivation rec {
+  pname = "vkd3d";
+  version = "1.1";
+
+  src = fetchurl {
+    url = "https://dl.winehq.org/vkd3d/source/vkd3d-${version}.tar.xz";
+    sha256 = "1dkayp95g1691w7n2yn1q9y7klq5xa921dgmn9a5vil0rihxqnj9";
+  };
+
+  buildInputs = [ vulkan-headers spirv-headers vulkan-loader ];
+
+  enableParallelBuilding = true;
+
+  meta = with stdenv.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..444ef29b7843
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/wine/winetricks.nix
@@ -0,0 +1,32 @@
+{ 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 = stdenv.lib.concatMapStringsSep ":" (x: x + "/bin")
+    [ 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 = stdenv.lib.licenses.lgpl21;
+    homepage = "https://github.com/Winetricks/winetricks";
+    maintainers = with stdenv.lib.maintainers; [ the-kenny ];
+    platforms = with stdenv.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..4e90a524aa7a
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/wxmupen64plus/default.nix
@@ -0,0 +1,30 @@
+{ 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 = stdenv.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..3806d25e5d00
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/xcpc/default.nix
@@ -0,0 +1,29 @@
+{ stdenv, fetchurl, pkgconfig, glib, libXaw, libX11, libXext
+  , libDSKSupport ? true, libdsk
+  , motifSupport ? false, lesstif
+}:
+
+with stdenv.lib;
+stdenv.mkDerivation rec {
+  version = "20070122";
+  pname = "xcpc";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/xcpc/${pname}-${version}.tar.gz";
+    sha256 = "0hxsbhmyzyyrlidgg0q8izw55q0z40xrynw5a1c3frdnihj9jf7n";
+  };
+
+  nativeBuildInputs = [ pkgconfig ];
+
+  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 = [ maintainers.genesis ];
+    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..d29d7b1e7b8e
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/yabause/default.nix
@@ -0,0 +1,36 @@
+{ stdenv, fetchurl, cmake, pkgconfig, qtbase, qt5, libGLU, libGL
+, freeglut ? null, openal ? null, SDL2 ? null }:
+
+stdenv.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 pkgconfig ];
+  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 stdenv.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/zsnes/default.nix b/nixpkgs/pkgs/misc/emulators/zsnes/default.nix
new file mode 100644
index 000000000000..142a49b8d181
--- /dev/null
+++ b/nixpkgs/pkgs/misc/emulators/zsnes/default.nix
@@ -0,0 +1,63 @@
+{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 = stdenv.lib.licenses.gpl2Plus;
+    maintainers = [ stdenv.lib.maintainers.sander ];
+    homepage = "http://www.zsnes.com";
+    platforms = [ "i686-linux" "x86_64-linux" ];
+  };
+}
diff --git a/nixpkgs/pkgs/misc/frescobaldi/default.nix b/nixpkgs/pkgs/misc/frescobaldi/default.nix
new file mode 100644
index 000000000000..830d5bea36a0
--- /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 = ''Frescobaldi is 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..161ee8471bc9
--- /dev/null
+++ b/nixpkgs/pkgs/misc/ghostscript/default.nix
@@ -0,0 +1,138 @@
+{ config, stdenv, lib, fetchurl, pkgconfig, 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
+  version = "9.${ver_min}";
+  ver_min = "50";
+  sha512 = "3p46kzn6kh7z4qqnqydmmvdlgzy5730z3yyvyxv6i4yb22mgihzrwqmhmvfn3b7lypwf6fdkkndarzv7ly3zndqpyvg89x436sms7iw";
+
+  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";
+  inherit version;
+
+  src = fetchurl {
+    url = "https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs9${ver_min}/${pname}-${version}.tar.xz";
+    inherit sha512;
+  };
+
+  patches = [
+    ./urw-font-files.patch
+    ./doc-no-ref.diff
+    (fetchpatch {
+      name = "CVE-2019-14869.patch";
+      url = "https://git.ghostscript.com/?p=ghostpdl.git;a=patch;h=485904772c5f0aa1140032746e5a0abfc40f4cef";
+      sha256 = "0z5gnvgpp0dlzgvpw9a1yan7qyycv3mf88l93fvb1kyay893rshp";
+    })
+  ];
+
+  outputs = [ "out" "man" "doc" ];
+
+  enableParallelBuilding = true;
+
+  nativeBuildInputs = [ pkgconfig 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}"
+
+    mkdir -p "$doc/share/doc/ghostscript"
+    mv "$doc/share/doc/${version}" "$doc/share/doc/ghostscript/"
+
+    ln -s "${fonts}" "$out/share/ghostscript/fonts"
+  '' + stdenv.lib.optionalString stdenv.isDarwin ''
+    for file in $out/lib/*.dylib* ; do
+      install_name_tool -id "$file" $file
+    done
+  '';
+
+  preFixup = lib.optionalString stdenv.isDarwin ''
+    install_name_tool -change libgs.dylib.${version} $out/lib/libgs.dylib.${version} $out/bin/gs
+  '';
+
+  passthru = { inherit version; };
+
+  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 = stdenv.lib.licenses.agpl3;
+
+    platforms = stdenv.lib.platforms.all;
+    maintainers = [ stdenv.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..5a4eb1e7f331
--- /dev/null
+++ b/nixpkgs/pkgs/misc/gnash/default.nix
@@ -0,0 +1,130 @@
+{ stdenv, fetchgit, fetchpatch, autoreconfHook
+, pkgconfig, 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 stdenv.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 pkgconfig 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 stdenv.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..c7bbb3b530d7
--- /dev/null
+++ b/nixpkgs/pkgs/misc/gnuk/generic.nix
@@ -0,0 +1,52 @@
+{ stdenv, gcc-arm-embedded, binutils-arm-embedded, makeWrapper
+, python, pythonPackages
+
+# 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 = [ python ] ++ (with pythonPackages; [ 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 stdenv.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/jackaudio/default.nix b/nixpkgs/pkgs/misc/jackaudio/default.nix
new file mode 100644
index 000000000000..d50075607627
--- /dev/null
+++ b/nixpkgs/pkgs/misc/jackaudio/default.nix
@@ -0,0 +1,72 @@
+{ stdenv, fetchFromGitHub, pkgconfig, 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 stdenv.lib;
+let
+  inherit (python3Packages) python dbus-python;
+  shouldUsePkg = pkg: if pkg != null && stdenv.lib.any (stdenv.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.14";
+
+  src = fetchFromGitHub {
+    owner = "jackaudio";
+    repo = "jack2";
+    rev = "v${version}";
+    sha256 = "1prxg1l8wrxfp2mh7l4mvjvmml6816fciq1la88ylhwm1qnfvnax";
+  };
+
+  nativeBuildInputs = [ pkgconfig 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
+  '';
+
+  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..2b5d0d960caf
--- /dev/null
+++ b/nixpkgs/pkgs/misc/jackaudio/jack1.nix
@@ -0,0 +1,39 @@
+{ stdenv, fetchurl, pkgconfig
+
+# Optional Dependencies
+, alsaLib ? null, db ? null, libuuid ? null, libffado ? null, celt ? null
+}:
+
+let
+  shouldUsePkg = pkg: if pkg != null && stdenv.lib.any (stdenv.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 = [
+    (stdenv.lib.enableFeature (optLibffado != null) "firewire")
+  ];
+
+  nativeBuildInputs = [ pkgconfig ];
+  buildInputs = [ optAlsaLib optDb optLibffado optCelt ];
+  propagatedBuildInputs = [ optLibuuid ];
+
+  meta = with stdenv.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..02ce011c59df
--- /dev/null
+++ b/nixpkgs/pkgs/misc/lguf-brightness/default.nix
@@ -0,0 +1,30 @@
+{ 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 stdenv.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..0c3370814bc3
--- /dev/null
+++ b/nixpkgs/pkgs/misc/libcardiacarrest/default.nix
@@ -0,0 +1,48 @@
+{ stdenv, fetchFromGitHub, pkgconfig, glib, libpulseaudio }:
+
+with stdenv.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 = [ pkgconfig ];
+
+  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..a821d430f6c6
--- /dev/null
+++ b/nixpkgs/pkgs/misc/lightspark/default.nix
@@ -0,0 +1,37 @@
+{ stdenv, fetchFromGitHub, pkgconfig, cmake, curl, zlib, ffmpeg, glew, pcre
+, rtmpdump, cairo, boost, SDL2, SDL2_mixer, libjpeg, gnome2, lzma, nasm
+, llvm, glibmm
+}:
+
+stdenv.mkDerivation rec {
+  pname = "lightspark";
+  version = "0.8.2";
+
+  src = fetchFromGitHub {
+    owner = "lightspark";
+    repo = "lightspark";
+    rev = version;
+    sha256 = "04wn6d6gmpf848x0yghw26m9syv0hm6q5dwqiw3fxhs155jjqfgv";
+  };
+
+  patchPhase = ''
+    sed -i 's/SET(ETCDIR "\/etc")/SET(ETCDIR "etc")/g' CMakeLists.txt
+  '';
+
+  nativeBuildInputs = [ pkgconfig cmake ];
+
+  buildInputs = [
+    curl zlib ffmpeg glew pcre rtmpdump cairo boost SDL2 SDL2_mixer libjpeg
+    gnome2.pango lzma nasm llvm glibmm
+  ];
+
+  enableParallelBuilding = true;
+
+  meta = with stdenv.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..9e76693ce8fd
--- /dev/null
+++ b/nixpkgs/pkgs/misc/lilypond/default.nix
@@ -0,0 +1,62 @@
+{ stdenv, lib, fetchurl, ghostscript, gyre-fonts, texinfo, imagemagick, texi2html, guile
+, python2, gettext, flex, perl, bison, pkgconfig, 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.20.0";
+
+  src = fetchurl {
+    url = "http://lilypond.org/download/sources/v${lib.versions.majorMinor version}/lilypond-${version}.tar.gz";
+    sha256 = "0qd6pd4siss016ffmcyw5qc6pr2wihnvrgd4kh1x725w7wr02nar";
+  };
+
+  patches = [ ./findlib.patch ];
+
+  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 pkgconfig ];
+
+  buildInputs =
+    [ ghostscript texinfo imagemagick texi2html guile dblatex tex zip netpbm
+      python2 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/findlib.patch b/nixpkgs/pkgs/misc/lilypond/findlib.patch
new file mode 100644
index 000000000000..30e130bc8ad8
--- /dev/null
+++ b/nixpkgs/pkgs/misc/lilypond/findlib.patch
@@ -0,0 +1,24 @@
+diff --git a/stepmake/stepmake/executable-vars.make b/stepmake/stepmake/executable-vars.make
+index 3825101..bf37d16 100644
+--- a/stepmake/stepmake/executable-vars.make
++++ b/stepmake/stepmake/executable-vars.make
+@@ -1,4 +1,4 @@
+-MODULE_LIBES =$(addprefix $(outdir)/../, $(addsuffix /$(outbase)/library.a, $(MODULE_LIBS)))
++MODULE_LIBES =$(addprefix , $(addsuffix /$(outbase)/library.a, $(MODULE_LIBS)))
+ LOADLIBES = $(MODULE_LIBES) $($(PACKAGE)_LIBES) $(CONFIG_LIBS)
+ 
+ EXECUTABLE = $(outdir)/$(NAME)
+
+diff --git a/make/stepmake.make b/make/stepmake.make
+index 604341b..7f0d9d8 100644
+--- a/make/stepmake.make
++++ b/make/stepmake.make
+@@ -87,7 +87,7 @@ outdir=$(outroot)/$(outbase)
+ config_h=$(top-build-dir)/config$(CONFIGSUFFIX).hh
+ 
+ # The outdir that was configured for: best guess to find binaries
+-outconfbase=out$(CONFIGSUFFIX)
++outconfbase=$(outdir)
+ outconfdir=$(outroot)/$(outconfbase)
+ 
+ # user package
diff --git a/nixpkgs/pkgs/misc/lilypond/fonts.nix b/nixpkgs/pkgs/misc/lilypond/fonts.nix
new file mode 100644
index 000000000000..deeedf679954
--- /dev/null
+++ b/nixpkgs/pkgs/misc/lilypond/fonts.nix
@@ -0,0 +1,136 @@
+{ 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 stdenv.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/unstable.nix b/nixpkgs/pkgs/misc/lilypond/unstable.nix
new file mode 100644
index 000000000000..68f48a2db64f
--- /dev/null
+++ b/nixpkgs/pkgs/misc/lilypond/unstable.nix
@@ -0,0 +1,21 @@
+{ stdenv, fetchgit, lilypond, ghostscript, gyre-fonts }:
+
+let
+
+  version = "2.19.83";
+
+in
+
+lilypond.overrideAttrs (oldAttrs: {
+  inherit version;
+
+  src = fetchgit {
+    url = "https://git.savannah.gnu.org/r/lilypond.git";
+    rev = "release/${version}-1";
+    sha256 = "1ycyx9x76d79jh7wlwyyhdjkyrwnhzqpw006xn2fk35s0jrm2iz0";
+  };
+
+  meta = oldAttrs.meta // {
+    broken = stdenv.isDarwin;
+  };
+})
diff --git a/nixpkgs/pkgs/misc/lilypond/with-fonts.nix b/nixpkgs/pkgs/misc/lilypond/with-fonts.nix
new file mode 100644
index 000000000000..1036f474b14d
--- /dev/null
+++ b/nixpkgs/pkgs/misc/lilypond/with-fonts.nix
@@ -0,0 +1,17 @@
+{ stdenv, lndir, symlinkJoin, makeWrapper
+, lilypond, openlilylib-fonts
+}:
+
+stdenv.lib.appendToName "with-fonts" (symlinkJoin {
+  inherit (lilypond) meta name version ;
+
+  paths = [ lilypond ] ++ openlilylib-fonts.all;
+
+  buildInputs = [ makeWrapper 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..d3f284a2ddbb
--- /dev/null
+++ b/nixpkgs/pkgs/misc/logging/beats/6.x.nix
@@ -0,0 +1,53 @@
+{ stdenv, 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 stdenv.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 = stdenv.lib.makeLibraryPath [ systemd.lib ]; in ''
+      patchelf --set-rpath ${libPath} "$bin/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..cdc8417a9c14
--- /dev/null
+++ b/nixpkgs/pkgs/misc/logging/beats/7.x.nix
@@ -0,0 +1,52 @@
+{ stdenv, 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 stdenv.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 = stdenv.lib.makeLibraryPath [ systemd.lib ]; in ''
+      patchelf --set-rpath ${libPath} "$bin/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..753e1f490bb4
--- /dev/null
+++ b/nixpkgs/pkgs/misc/long-shebang/default.nix
@@ -0,0 +1,21 @@
+{ 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 = stdenv.lib.licenses.mit;
+
+    platforms = stdenv.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..ec0dd0b1fd52
--- /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.linux;
+    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..a5a621435ee3
--- /dev/null
+++ b/nixpkgs/pkgs/misc/mxt-app/default.nix
@@ -0,0 +1,26 @@
+{ stdenv, fetchFromGitHub, autoreconfHook, libtool }:
+
+stdenv.mkDerivation rec{
+  version="1.28";
+  pname = "mxt-app";
+
+  src = fetchFromGitHub {
+    owner = "atmel-maxtouch";
+    repo = "mxt-app";
+    rev = "v${version}";
+    sha256 = "1z2mir4ib9xzxmy0daazzvlga41n80zch1xyp1iz98rrdsnvd1la";
+  };
+
+  nativeBuildInputs = [ autoreconfHook ];
+  buildInputs = [ libtool ];
+ 
+  hardeningDisable = [ "fortify" ];
+
+  meta = with stdenv.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..fb8de9b6a71f
--- /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 = [ pkgconfig ];
+          buildInputs = [ stdenv SDL SDL_image SDL_ttf SDL_gfx cmake 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/riscv-pk/default.nix b/nixpkgs/pkgs/misc/riscv-pk/default.nix
new file mode 100644
index 000000000000..3e1f63e5e300
--- /dev/null
+++ b/nixpkgs/pkgs/misc/riscv-pk/default.nix
@@ -0,0 +1,42 @@
+{ stdenv, fetchFromGitHub, autoreconfHook, payload ? null }: let
+  rev = "e5846a2bc707eaa58dc8ab6a8d20a090c6ee8570";
+  sha256 = "1clynpp70fnbgsjgxx7xi0vrdrj1v0h8zpv0x26i324kp2gwylf4";
+  revCount = "438";
+  shortRev = "e5846a2";
+in stdenv.mkDerivation {
+  name = "riscv-pk-0.1pre${revCount}_${shortRev}";
+
+  src = fetchFromGitHub {
+    owner = "riscv";
+    repo = "riscv-pk";
+    inherit rev sha256;
+  };
+
+  nativeBuildInputs = [ autoreconfHook ];
+
+  preConfigure = ''
+    mkdir build
+    cd build
+  '';
+
+  configureScript = "../configure";
+
+  configureFlags = stdenv.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 = stdenv.lib.licenses.bsd3;
+    platforms = stdenv.lib.platforms.riscv;
+    maintainers = [ stdenv.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..8ce4fd8e14c7
--- /dev/null
+++ b/nixpkgs/pkgs/misc/rkdeveloptool/default.nix
@@ -0,0 +1,24 @@
+{ stdenv, fetchFromGitHub, autoreconfHook, pkgconfig, libusb1 }:
+
+stdenv.mkDerivation {
+  pname = "rkdeveloptool";
+  version = "unstable-2019-07-01";
+
+  src = fetchFromGitHub {
+    owner = "rockchip-linux";
+    repo = "rkdeveloptool";
+    rev = "6e92ebcf8b1812da02663494a68972f956e490d3";
+    sha256 = "0zwrkqfxd671iy69v3q0844gfdpm1yk51i9qh2rqc969bd8glxga";
+  };
+
+  nativeBuildInputs = [ autoreconfHook pkgconfig ];
+
+  buildInputs = [ libusb1 ];
+
+  meta = with stdenv.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..0dca07010980
--- /dev/null
+++ b/nixpkgs/pkgs/misc/sailsd/default.nix
@@ -0,0 +1,48 @@
+{ stdenv, fetchFromGitHub, pkgconfig, 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 = [ pkgconfig ];
+  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 stdenv.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/scrcpy/default.nix b/nixpkgs/pkgs/misc/scrcpy/default.nix
new file mode 100644
index 000000000000..c47825f90108
--- /dev/null
+++ b/nixpkgs/pkgs/misc/scrcpy/default.nix
@@ -0,0 +1,64 @@
+{ stdenv, fetchurl, fetchFromGitHub, makeWrapper
+, meson
+, ninja
+, pkgconfig
+, fetchpatch
+
+, platform-tools
+, ffmpeg
+, SDL2
+}:
+
+let
+  version = "1.12.1";
+  prebuilt_server = fetchurl {
+    url = "https://github.com/Genymobile/scrcpy/releases/download/v${version}/scrcpy-server-v${version}";
+    sha256 = "1sk6hbbnf4g6q58fspwlh8bn16j73j3i8hlcshqxzhfhl746krb3";
+  };
+in
+stdenv.mkDerivation rec {
+  pname = "scrcpy";
+  inherit version;
+
+  src = fetchFromGitHub {
+    owner = "Genymobile";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "16zi0d2jjm2nlrwkwvsxzfpgy45ami45wfh67wq7na2h2ywfmgcp";
+  };
+
+  # 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 pkgconfig ];
+
+  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 stdenv.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..c9340b2503e8
--- /dev/null
+++ b/nixpkgs/pkgs/misc/screensavers/alock/default.nix
@@ -0,0 +1,45 @@
+{ stdenv, fetchgit, pkgconfig, 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 = [ pkgconfig ];
+  buildInputs = [
+    autoreconfHook libX11
+    pam libgcrypt libXrender imlib2
+  ];
+
+  meta = with stdenv.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..36f898195703
--- /dev/null
+++ b/nixpkgs/pkgs/misc/screensavers/betterlockscreen/default.nix
@@ -0,0 +1,39 @@
+{
+  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 =
+        stdenv.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 stdenv.lib; {
+    description = "Betterlockscreen is 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..71a248bcfa12
--- /dev/null
+++ b/nixpkgs/pkgs/misc/screensavers/electricsheep/default.nix
@@ -0,0 +1,43 @@
+{ stdenv, fetchFromGitHub, autoreconfHook, wxGTK30, libav, lua5_1, curl
+, libpng, xorg, pkgconfig, flam3, libgtop, boost, tinyxml, freeglut, libGLU, libGL
+, glee }:
+
+stdenv.mkDerivation rec {
+  pname = "electricsheep";
+  version = "2.7b33-2017-10-20";
+
+  src = fetchFromGitHub {
+    owner = "scottdraves";
+    repo = pname;
+    rev = "c02c19b9364733fc73826e105fc983a89a8b4f40";
+    sha256 = "1z49l53j1lhk7ahdy96lm9r0pklwpf2i5s6y2l2rn6l4z8dxkjmk";
+  };
+
+  nativeBuildInputs = [ autoreconfHook pkgconfig ];
+
+  buildInputs = [
+    wxGTK30 libav 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"
+  ];
+
+  preBuild = ''
+    sed -i "s|/usr|$out|" Makefile
+  '';
+
+  meta = with stdenv.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..5ffe5f722651
--- /dev/null
+++ b/nixpkgs/pkgs/misc/screensavers/i3lock-pixeled/default.nix
@@ -0,0 +1,40 @@
+{ 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 stdenv.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..4d257650338c
--- /dev/null
+++ b/nixpkgs/pkgs/misc/screensavers/light-locker/default.nix
@@ -0,0 +1,89 @@
+{ stdenv
+, fetchFromGitHub
+, meson
+, ninja
+, pkgconfig
+, 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
+    pkgconfig
+    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 = pantheon.updateScript {
+      attrPath = pname;
+    };
+  };
+
+  meta = with stdenv.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/physlock/default.nix b/nixpkgs/pkgs/misc/screensavers/physlock/default.nix
new file mode 100644
index 000000000000..c27ac344e055
--- /dev/null
+++ b/nixpkgs/pkgs/misc/screensavers/physlock/default.nix
@@ -0,0 +1,27 @@
+{ 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 stdenv.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..211b7614f3b8
--- /dev/null
+++ b/nixpkgs/pkgs/misc/screensavers/pipes/default.nix
@@ -0,0 +1,26 @@
+{ stdenv, fetchurl, pkgs }:
+
+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";
+  };
+
+  buildInputs = with pkgs; [ bash ];
+
+  installPhase = ''
+    mkdir $out -p
+    make PREFIX=$out/ install
+  '';
+
+  meta = with stdenv.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..467f762de86c
--- /dev/null
+++ b/nixpkgs/pkgs/misc/screensavers/rss-glx/default.nix
@@ -0,0 +1,27 @@
+{stdenv, fetchurl, pkgconfig, xlibsWrapper, libXext, libGLU, libGL, imagemagick, 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 = [ pkgconfig ];
+  buildInputs = [ libGLU libGL xlibsWrapper imagemagick libtiff bzip2 ];
+
+  NIX_CFLAGS_COMPILE = "-I${imagemagick.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 = stdenv.lib.licenses.gpl2;
+    platforms = stdenv.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..7df635c10c7a
--- /dev/null
+++ b/nixpkgs/pkgs/misc/screensavers/slock/default.nix
@@ -0,0 +1,36 @@
+{ 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 stdenv.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..83d82e2b3b34
--- /dev/null
+++ b/nixpkgs/pkgs/misc/screensavers/vlock/default.nix
@@ -0,0 +1,29 @@
+{ 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 stdenv.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..cefcdbc75a37
--- /dev/null
+++ b/nixpkgs/pkgs/misc/screensavers/xautolock/default.nix
@@ -0,0 +1,35 @@
+{ 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 stdenv.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..2c39ed599e28
--- /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.62";
+
+  src = fetchurl {
+    url = "http://sillycycle.com/xlock/${name}.tar.xz";
+    sha256 = "0b05wgj4mpssy4hd7km5c48i454dfg45p11mfmsr7xjd2gnz5gqi";
+    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..1dd09852d27c
--- /dev/null
+++ b/nixpkgs/pkgs/misc/screensavers/xscreensaver/default.nix
@@ -0,0 +1,63 @@
+{ stdenv, fetchurl, pkgconfig, bc, perl, perlPackages, pam, libXext, libXScrnSaver, libX11
+, libXrandr, libXmu, libXxf86vm, libXrender, libXxf86misc, libjpeg, libGLU, libGL, gtk2
+, libxml2, libglade, intltool, xorg, makeWrapper, gle
+, 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 =
+    [ pkgconfig bc perl libjpeg libGLU libGL gtk2 libxml2 libglade pam
+      libXext libXScrnSaver libX11 libXrandr libXmu libXxf86vm libXrender
+      libXxf86misc intltool xorg.appres makeWrapper gle
+    ];
+
+  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 : ${stdenv.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
+              ]}"
+  ''
+  + stdenv.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 stdenv.lib.maintainers; [ raskin ];
+    platforms = stdenv.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..b7b0e27ad46b
--- /dev/null
+++ b/nixpkgs/pkgs/misc/screensavers/xss-lock/default.nix
@@ -0,0 +1,24 @@
+{ stdenv, fetchFromGitHub, cmake, docutils, pkgconfig, 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 = [ pkgconfig ];
+  buildInputs = [ cmake docutils glib libpthreadstubs libXau
+                  libXdmcp xcbutil ];
+
+  meta = with stdenv.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..cff03f3bed04
--- /dev/null
+++ b/nixpkgs/pkgs/misc/screensavers/xssproxy/default.nix
@@ -0,0 +1,30 @@
+{ stdenv, fetchFromGitHub, glib, pkgconfig, 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 = [ pkgconfig ];
+  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 = stdenv.lib.licenses.gpl3;
+    maintainers = with stdenv.lib.maintainers; [ benley ];
+    platforms = stdenv.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..ca4623e30687
--- /dev/null
+++ b/nixpkgs/pkgs/misc/screensavers/xtrlock-pam/default.nix
@@ -0,0 +1,28 @@
+{ stdenv, fetchgit, python, pkgconfig, 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 = [ pkgconfig ];
+  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 stdenv.lib.maintainers; [ tstrobel ];
+    platforms = with stdenv.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..3277abbb77b9
--- /dev/null
+++ b/nixpkgs/pkgs/misc/seafile-shared/default.nix
@@ -0,0 +1,51 @@
+{stdenv, fetchFromGitHub, which, autoreconfHook, pkgconfig, vala, python2, curl, libevent, glib, libsearpc, sqlite, intltool, fuse, ccnet, libuuid }:
+
+stdenv.mkDerivation rec {
+  pname = "seafile-shared";
+  version = "7.0.6";
+
+  src = fetchFromGitHub {
+    owner = "haiwen";
+    repo = "seafile";
+    rev = "v${version}";
+    sha256 = "0pc6xbwxljpj7h37za63kspdi90ap58x6x5b7hsmlhahblvlw0b8";
+  };
+
+  nativeBuildInputs = [
+    autoreconfHook
+    vala
+    pkgconfig
+    python2
+    python2.pkgs.wrapPython
+  ];
+
+  buildInputs = [
+    libuuid
+    sqlite
+    libsearpc
+    libevent
+    curl
+  ];
+
+  configureFlags = [
+    "--disable-server"
+    "--disable-console"
+  ];
+
+  pythonPath = with python2.pkgs; [
+    future
+    libsearpc
+  ];
+
+  postFixup = ''
+    wrapPythonPrograms
+  '';
+
+  meta = with stdenv.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..c415714f573c
--- /dev/null
+++ b/nixpkgs/pkgs/misc/sndio/default.nix
@@ -0,0 +1,28 @@
+{ stdenv, fetchurl, alsaLib }:
+
+stdenv.mkDerivation rec {
+  pname = "sndio";
+  version = "1.6.0";
+  enableParallelBuilding = true;
+  buildInputs = stdenv.lib.optionals stdenv.isLinux [ alsaLib ];
+
+  src = fetchurl {
+    url = "http://www.sndio.org/sndio-${version}.tar.gz";
+    sha256 = "1havdx3q4mipgddmd2bnygr1yh6y64567m1yqwjapkhsq550dq4r";
+  };
+
+  postFixup = stdenv.lib.optionalString stdenv.isDarwin ''
+    install_name_tool -id $out/lib/libsndio.7.0.dylib $out/lib/libsndio.7.0.dylib
+    for file in $out/bin/*; do
+      install_name_tool -change libsndio.7.0.dylib $out/lib/libsndio.dylib $file
+    done
+  '';
+
+  meta = with stdenv.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/default.nix b/nixpkgs/pkgs/misc/solfege/default.nix
new file mode 100644
index 000000000000..aea4da3eaeb8
--- /dev/null
+++ b/nixpkgs/pkgs/misc/solfege/default.nix
@@ -0,0 +1,40 @@
+{ stdenv, fetchurl, pkgconfig, pythonPackages, gettext, texinfo
+, ghostscript, librsvg, gdk-pixbuf, txt2man, timidity, mpg123
+, alsaUtils, vorbis-tools, csound, lilypond
+, wrapGAppsHook
+}:
+
+pythonPackages.buildPythonApplication rec {
+  name = "solfege-3.22.2";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/solfege/${name}.tar.gz";
+    sha256 = "1r4g93ka7i8jh5glii5nza0zq0wy4sw0gfzpvkcrhj9yr1h0jsp4";
+  };
+
+  nativeBuildInputs = [ gettext texinfo pkgconfig wrapGAppsHook ];
+  buildInputs = [ librsvg ];
+  propagatedBuildInputs = [ pythonPackages.pygtk ];
+
+  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 stdenv.lib; {
+    description = "Ear training program";
+    homepage = "http://www.solfege.org/";
+    license = licenses.gpl3;
+    platforms = platforms.linux;
+    maintainers = [ maintainers.bjornfor ];
+  };
+}
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..07e50c8379e5
--- /dev/null
+++ b/nixpkgs/pkgs/misc/sound-of-sorting/default.nix
@@ -0,0 +1,28 @@
+{ 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 stdenv.lib; {
+    description = "Audibilization and Visualization of Sorting Algorithms";
+    homepage = "http://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..7c082cbbbb0f
--- /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";
+    buildInputs = [ 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..17ef047ede73
--- /dev/null
+++ b/nixpkgs/pkgs/misc/stabber/default.nix
@@ -0,0 +1,31 @@
+{ stdenv, fetchFromGitHub, autoreconfHook, pkgconfig, glib, expat
+, libmicrohttpd
+}:
+
+with stdenv.lib;
+
+stdenv.mkDerivation {
+  pname = "stabber-unstable";
+  version = "2016-11-09";
+
+  src = fetchFromGitHub {
+    owner = "boothj5";
+    repo = "stabber";
+    rev = "ed75087e4483233eb2cc5472dbd85ddfb7a1d4d4";
+    sha256 = "1l6cibggi9rx6d26j1g92r1m8zm1g899f6z7n4pfqp84mrfqgz0p";
+  };
+
+  preAutoreconf = ''
+    mkdir m4
+  '';
+
+  buildInputs = [ autoreconfHook pkgconfig glib expat libmicrohttpd ];
+
+  meta = {
+    description = "Stubbed XMPP Server";
+    homepage = "https://github.com/boothj5/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..a622eca7795b
--- /dev/null
+++ b/nixpkgs/pkgs/misc/talkfilters/default.nix
@@ -0,0 +1,26 @@
+{ 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 = stdenv.lib.licenses.gpl2;
+    maintainers = with stdenv.lib.maintainers; [ ikervagyok ];
+    platforms = with stdenv.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..23c513ea175c
--- /dev/null
+++ b/nixpkgs/pkgs/misc/tmux-plugins/default.nix
@@ -0,0 +1,349 @@
+{ lib
+, fetchFromGitHub
+, pkgs
+, reattach-to-user-namespace
+, stdenv
+}:
+
+let
+  rtpPath = "share/tmux-plugins";
+
+  addRtp = path: rtpFilePath: attrs: derivation:
+    derivation // { rtp = "${derivation}/${path}/${rtpFilePath}"; } // {
+      overrideAttrs = f: mkDerivation (attrs // f attrs);
+    };
+
+  mkDerivation = a@{
+    pluginName,
+    rtpFilePath ? (builtins.replaceStrings ["-"] ["_"] pluginName) + ".tmux",
+    namePrefix ? "tmuxplugin-",
+    src,
+    unpackPhase ? "",
+    configurePhase ? ":",
+    buildPhase ? ":",
+    addonInfo ? null,
+    preInstall ? "",
+    postInstall ? "",
+    path ? lib.getName pluginName,
+    dependencies ? [],
+    ...
+  }:
+    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
+      '';
+
+      dependencies = [ pkgs.bash ] ++ dependencies;
+    }));
+
+in rec {
+
+  inherit mkDerivation;
+
+  battery = mkDerivation {
+    pluginName = "battery";
+    version = "unstable-2019-07-04";
+    src = fetchFromGitHub {
+      owner = "tmux-plugins";
+      repo = "tmux-battery";
+      rev = "f8b8e8451990365e0c98c38c184962e4f83b793b";
+      sha256 = "1bhdzsx3kdjqjmm1q4j8937lrpkzf71irr3fqhdbddsghwrrmwim";
+    };
+  };
+
+  continuum = mkDerivation {
+    pluginName = "continuum";
+    version = "unstable-2018-02-23";
+    src = fetchFromGitHub {
+      owner = "tmux-plugins";
+      repo = "tmux-continuum";
+      rev = "1531b3770a7cf7373d15fedd239c5331b99342d1";
+      sha256 = "1w3f7gzvv1k25yfr6d1snr2z88p8f87cahrbaslmyphdxpy0fa4m";
+    };
+    dependencies = [ resurrect ];
+  };
+
+  copycat = mkDerivation {
+    pluginName = "copycat";
+    version = "unstable-2020-01-09";
+    src = fetchFromGitHub {
+      owner = "tmux-plugins";
+      repo = "tmux-copycat";
+      rev = "77ca3aab2aed8ede3e2b941079b1c92dd221cf5f";
+      sha256 = "1bchwzhai8k5rk32n4lrmh56rw944jqxr8imjk74hyaa7bbn81ds";
+    };
+  };
+
+  cpu = mkDerivation {
+    pluginName = "cpu";
+    version = "unstable-2020-04-05";
+    src = fetchFromGitHub {
+      owner = "tmux-plugins";
+      repo = "tmux-cpu";
+      rev = "8858050756e1fc3c081d37894b441f05ea893a67";
+      sha256 = "1bydzrnd9y5y46hjr844p4ylx2dpijn6pv3w94yyvwbyswmirhff";
+    };
+  };
+
+  ctrlw = mkDerivation rec {
+    pluginName = "ctrlw";
+    version = "0.1.1";
+    src = fetchFromGitHub {
+      owner = "eraserhd";
+      repo = "tmux-ctrlw";
+      rev = "v${version}";
+      sha256 = "1kv5pqfjczd6z7i9jf6j5xmcai50l9bn5p2p1w1l5fi6cj8cz1k1";
+    };
+  };
+
+  fpp = mkDerivation {
+    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
+    '';
+    dependencies = [ pkgs.fpp ];
+  };
+
+  fzf-tmux-url = mkDerivation {
+    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 = mkDerivation {
+    pluginName = "gruvbox";
+    rtpFilePath = "gruvbox-tpm.tmux";
+    version = "unstable-2019-05-05";
+    src = fetchFromGitHub {
+      owner = "egel";
+      repo = "tmux-gruvbox";
+      rev = "6149fd8b5d6924925b4d5aa6935039780e94f3d6";
+      sha256 = "1ykr4yardavd0x7yfrnshd4b0gi8p31pji7i79ib0nss134zncpb";
+    };
+  };
+
+  logging = mkDerivation {
+    pluginName = "logging";
+    version = "unstable-2019-04-19";
+    src = fetchFromGitHub {
+      owner = "tmux-plugins";
+      repo = "tmux-logging";
+      rev = "b085ad423b5d59a2c8b8d71772352e7028b8e1d0";
+      sha256 = "0p0sawysalhi8k2a5hdxniqx6kb24kd8rnvfzkjqigzid5ik37js";
+    };
+  };
+
+  net-speed = mkDerivation {
+    pluginName = "net-speed";
+    version = "unstable-2018-12-02";
+    src = fetchFromGitHub {
+      owner = "tmux-plugins";
+      repo = "tmux-net-speed";
+      rev = "58abb615971cb617821e2e7e41c660334f55a92d";
+      sha256 = "1aj06gdhzcxsydjzf21n9kyxigwf38kh2rg8hh7gnjk260ydqlrc";
+    };
+  };
+
+  maildir-counter = mkDerivation {
+    pluginName = "maildir-counter";
+    version = "unstable-2016-11-25";
+    src = fetchFromGitHub {
+      owner = "tmux-plugins";
+      repo = "tmux-maildir-counter";
+      rev = "9415f0207e71e37cbd870c9443426dbea6da78b9";
+      sha256 = "0dwvqhiv9bjwr01hsi5c57n55jyv5ha5m5q1aqgglf4wyhbnfms4";
+    };
+  };
+
+  online-status = mkDerivation {
+    pluginName = "online-status";
+    version = "unstable-2018-11-30";
+    src = fetchFromGitHub {
+      owner = "tmux-plugins";
+      repo = "tmux-online-status";
+      rev = "ea86704ced8a20f4a431116aa43f57edcf5a6312";
+      sha256 = "1hy3vg8v2sir865ylpm2r4ip1zgd4wlrf24jbwh16m23qdcvc19r";
+    };
+  };
+
+  open = mkDerivation {
+    pluginName = "open";
+    version = "unstable-2019-12-02";
+    src = fetchFromGitHub {
+      owner = "tmux-plugins";
+      repo = "tmux-open";
+      rev = "cedb4584908bd8458fadc8d3e64101d3cbb48d46";
+      sha256 = "10s0xdhmg0dhpj13ybcq72pw3xgb2dq5v5h2mwidzqyh9g17wndh";
+    };
+  };
+
+  pain-control = mkDerivation {
+    pluginName = "pain-control";
+    version = "unstable-2020-02-18";
+    src = fetchFromGitHub {
+      owner = "tmux-plugins";
+      repo = "tmux-pain-control";
+      rev = "2db63de3b08fc64831d833240749133cecb67d92";
+      sha256 = "0w7a6n4n86ysiqcqj12j2hg9r5fznvbp3dz8pzas9q1k3avlk0zk";
+    };
+  };
+
+  plumb = mkDerivation 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
+    '';
+  };
+
+  prefix-highlight = mkDerivation {
+    pluginName = "prefix-highlight";
+    version = "unstable-2020-03-26";
+    src = fetchFromGitHub {
+      owner = "tmux-plugins";
+      repo = "tmux-prefix-highlight";
+      rev = "1db6e735aad54503b076391d791c56e1af213917";
+      sha256 = "0ws9blzg00zhz548m51cm6zbrkqlz7jazkr5029vka1f6qk36x0g";
+    };
+  };
+
+  resurrect = mkDerivation {
+    pluginName = "resurrect";
+    version = "unstable-2020-03-21";
+    src = fetchFromGitHub {
+      owner = "tmux-plugins";
+      repo = "tmux-resurrect";
+      rev = "327c0481ad20c429b4e692e092659f8b3346b08f";
+      sha256 = "0nxfqazww36wwv49dzd39kq4jfls20834hf1458sf5pvmv5cmbyw";
+    };
+  };
+
+  sensible = mkDerivation {
+    pluginName = "sensible";
+    version = "unstable-2017-09-05";
+    src = fetchFromGitHub {
+      owner = "tmux-plugins";
+      repo = "tmux-sensible";
+      rev = "e91b178ff832b7bcbbf4d99d9f467f63fd1b76b5";
+      sha256 = "1z8dfbwblrbmb8sgb0k8h1q0dvfdz7gw57las8nwd5gj6ss1jyvx";
+    };
+    postInstall = lib.optionalString pkgs.stdenv.isDarwin ''
+      sed -e 's:reattach-to-user-namespace:${reattach-to-user-namespace}/bin/reattach-to-user-namespace:g' -i $target/sensible.tmux
+    '';
+  };
+
+  sessionist = mkDerivation {
+    pluginName = "sessionist";
+    version = "unstable-2017-12-03";
+    src = fetchFromGitHub {
+      owner = "tmux-plugins";
+      repo = "tmux-sessionist";
+      rev = "09ec86be38eae98ffc27bd0dde605ed10ae0dc89";
+      sha256 = "030q2mmj8akbc26jnqn8n7fckg1025p0ildx4wr401b6p1snnlw4";
+    };
+  };
+
+  sidebar = mkDerivation {
+    pluginName = "sidebar";
+    version = "unstable-2018-11-30";
+    src = fetchFromGitHub {
+      owner = "tmux-plugins";
+      repo = "tmux-sidebar";
+      rev = "aacbdb45bc5ab69db448a72de4155d0b8dbac677";
+      sha256 = "1bp90zbv19kbbiik0bgb893ybss1jqsnk3353a631993xjwsih7c";
+    };
+  };
+
+  sysstat = mkDerivation {
+    pluginName = "sysstat";
+    version = "unstable-2017-12-12";
+    src = fetchFromGitHub {
+      owner = "samoshkin";
+      repo = "tmux-plugin-sysstat";
+      rev = "29e150f403151f2341f3abcb2b2487a5f011dd23";
+      sha256 = "013mv9p6r2r0ls3p60l8hdad4hm8niv3wr27vgm925gxmibi4hyq";
+    };
+  };
+
+  tmux-colors-solarized = mkDerivation {
+    pluginName = "tmuxcolors";
+    version = "unstable-2019-07-14";
+    src = fetchFromGitHub {
+      owner = "seebi";
+      repo = "tmux-colors-solarized";
+      rev = "e5e7b4f1af37f8f3fc81ca17eadee5ae5d82cd09";
+      sha256 = "1l3i82abzi4b395cgdsjg7lcfaq15kyyhijwvrgchzxi95z3hl4x";
+    };
+  };
+
+  urlview = mkDerivation {
+    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
+    '';
+    dependencies = [ pkgs.urlview ];
+  };
+
+  vim-tmux-navigator = mkDerivation {
+    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 = mkDerivation {
+    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..a089488b0e02
--- /dev/null
+++ b/nixpkgs/pkgs/misc/tpm2-pkcs11/default.nix
@@ -0,0 +1,79 @@
+{ stdenv, lib, fetchFromGitHub, substituteAll
+, pkgconfig, 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.2.0";
+
+  src = fetchFromGitHub {
+    owner = "tpm2-software";
+    repo = pname;
+    rev = version;
+    sha256 = "0ydd88jc4pyf1v7008h2gf0napv6xpw4jn5w87slj9fphjdkwjiz";
+  };
+
+  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 = [
+    pkgconfig 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; [ lschuermann ];
+  };
+}
diff --git a/nixpkgs/pkgs/misc/uboot/default.nix b/nixpkgs/pkgs/misc/uboot/default.nix
new file mode 100644
index 000000000000..06da268ff533
--- /dev/null
+++ b/nixpkgs/pkgs/misc/uboot/default.nix
@@ -0,0 +1,371 @@
+{ stdenv, lib, fetchurl, fetchpatch, fetchFromGitHub, bc, bison, dtc, flex
+, openssl, swig, meson-tools, armTrustedFirmwareAllwinner
+, armTrustedFirmwareRK3328, armTrustedFirmwareRK3399
+, armTrustedFirmwareS905
+, buildPackages
+}:
+
+let
+  defaultVersion = "2020.01";
+  defaultSrc = fetchurl {
+    url = "ftp://ftp.denx.de/pub/u-boot/u-boot-${defaultVersion}.tar.bz2";
+    sha256 = "1w9ml4jl15q6ixpdqzspxjnl7d3rgxd7f99ms1xv5c8869h3qida";
+  };
+  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 = extraPatches;
+
+    postPatch = ''
+      patchShebangs tools
+      patchShebangs arch/arm/mach-rockchip
+    '';
+
+    nativeBuildInputs = [
+      bc
+      bison
+      dtc
+      flex
+      openssl
+      (buildPackages.python3.withPackages (p: [ p.libfdt ]))
+      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/
+    '';
+  };
+
+  ubootNovena = buildUBoot {
+    defconfig = "novena_defconfig";
+    extraMeta.platforms = ["armv7l-linux"];
+    filesToInstall = ["u-boot.bin" "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"];
+  };
+
+  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"];
+  };
+
+  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"];
+  };
+
+  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"];
+  };
+
+  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"];
+  };
+}
diff --git a/nixpkgs/pkgs/misc/uboot/nanonote.nix b/nixpkgs/pkgs/misc/uboot/nanonote.nix
new file mode 100644
index 000000000000..fb3b98f478e6
--- /dev/null
+++ b/nixpkgs/pkgs/misc/uboot/nanonote.nix
@@ -0,0 +1,59 @@
+{stdenv, fetchurl, fetchgit}:
+
+# All this file is made for the Marvell Sheevaplug
+   
+stdenv.mkDerivation {
+  name = "uboot-qb-2010.06";
+   
+  src = fetchurl {
+    url = "ftp://ftp.denx.de/pub/u-boot/u-boot-2010.06.tar.bz2";
+    sha256 = "1j0bl8x5i5m1pn62z450gbw30pbrj7sgs3fjp2l2giczv49cn33r";
+  };
+
+  srcPatches = fetchgit {
+    url = "git://projects.qi-hardware.com/openwrt-xburst.git";
+    rev = "3244d5ef9f93802f9b9b6f4405636424abf6fa83";
+    sha256 = "0mg87s10hpz41dr1zbd3bcl8i64gwvh3f1nrz8cb8c49099miqla";
+  };
+
+  patchPhase = ''
+    cp -R $srcPatches/package/uboot-xburst/files/* .
+    for a in $srcPatches/package/uboot-xburst/patches/*; do
+        patch -p1 < $a
+    done
+    chmod +w -R *
+    sed -i -e 's/console=ttyS0,57600n8//' include/configs/qi_lb60.h
+    # Load more than 2MiB for the kernel
+    sed -i -e 's/0x200000;bootm/0x400000;bootm/' include/configs/qi_lb60.h
+  '';
+
+  makeFlags = [
+    "CROSS_COMPILE=${stdenv.cc.targetPrefix}"
+  ];
+
+  # Add reiserfs support
+  configurePhase = ''
+    make mrproper
+    make qi_lb60_config
+  '';
+
+  preBuild= ''
+    # A variable named 'src' used to affect the build in some uboot...
+    unset -v src
+  '';
+
+  dontStrip = true;
+
+  installPhase = ''
+    mkdir -p $out
+    cp u-boot-nand.bin $out
+    cp u-boot u-boot.map $out
+
+    mkdir -p $out/bin
+    cp tools/{envcrc,mkimage} $out/bin
+  '';
+
+  meta = {
+    platforms = stdenv.lib.platforms.mips;
+  };
+}
diff --git a/nixpkgs/pkgs/misc/uq/default.nix b/nixpkgs/pkgs/misc/uq/default.nix
new file mode 100755
index 000000000000..fe3a1e2a5d15
--- /dev/null
+++ b/nixpkgs/pkgs/misc/uq/default.nix
@@ -0,0 +1,26 @@
+{ 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 ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/misc/urbit/default.nix b/nixpkgs/pkgs/misc/urbit/default.nix
new file mode 100644
index 000000000000..031b65a1ef61
--- /dev/null
+++ b/nixpkgs/pkgs/misc/urbit/default.nix
@@ -0,0 +1,31 @@
+{ stdenv, fetchFromGitHub, curl, git, gmp, libsigsegv, meson, ncurses, ninja
+, openssl, pkgconfig, 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 = [ pkgconfig ninja meson ];
+  buildInputs = [ curl git gmp libsigsegv ncurses openssl re2c zlib ];
+
+  postPatch = ''
+    patchShebangs .
+  '';
+
+  meta = with stdenv.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..4ca99b09af50
--- /dev/null
+++ b/nixpkgs/pkgs/misc/vim-plugins/build-vim-plugin.nix
@@ -0,0 +1,60 @@
+{ 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 ? stdenv.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..218a1ab622fd
--- /dev/null
+++ b/nixpkgs/pkgs/misc/vim-plugins/deprecated.json
@@ -0,0 +1,18 @@
+{
+    "gist-vim": {
+        "date": "2020-03-27",
+        "new": "vim-gist"
+    },
+    "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..f506efda449c
--- /dev/null
+++ b/nixpkgs/pkgs/misc/vim-plugins/generated.nix
@@ -0,0 +1,6333 @@
+# 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";
+    };
+  };
+
+  ack-vim = buildVimPluginFrom2Nix {
+    pname = "ack-vim";
+    version = "2018-02-27";
+    src = fetchFromGitHub {
+      owner = "mileszs";
+      repo = "ack.vim";
+      rev = "36e40f9ec91bdbf6f1adf408522a73a6925c3042";
+      sha256 = "0yppr89hd1jyp0pj56hxdjbn32sr7pj3mihd18wxispvl5dqd6fm";
+    };
+  };
+
+  acp = buildVimPluginFrom2Nix {
+    pname = "acp";
+    version = "2013-02-05";
+    src = fetchFromGitHub {
+      owner = "eikenb";
+      repo = "acp";
+      rev = "5c627cec37d0d3b1670cb250d84e176e8b0c644e";
+      sha256 = "0h7s4nvxin7m2caka7g1hhlxj1bbiwsvw8s2lqwlh7nq43v23ghg";
+    };
+  };
+
+  agda-vim = buildVimPluginFrom2Nix {
+    pname = "agda-vim";
+    version = "2020-04-06";
+    src = fetchFromGitHub {
+      owner = "derekelkins";
+      repo = "agda-vim";
+      rev = "3643fa185ebe3bf35cf690a4b3b90d36e36405b0";
+      sha256 = "09lpg223l1s8zpsmbg1r18cnr7r3np32nsv185qgcv889mlildqn";
+    };
+  };
+
+  alchemist-vim = buildVimPluginFrom2Nix {
+    pname = "alchemist-vim";
+    version = "2020-04-08";
+    src = fetchFromGitHub {
+      owner = "slashmili";
+      repo = "alchemist.vim";
+      rev = "9fc2594deea196897997c31e68056b7977f13495";
+      sha256 = "1mnghdw3yhqh1lzjqfrmwrvnx391dkayfzkgcpx7sx01hnvqc9ib";
+    };
+  };
+
+  ale = buildVimPluginFrom2Nix {
+    pname = "ale";
+    version = "2020-03-11";
+    src = fetchFromGitHub {
+      owner = "dense-analysis";
+      repo = "ale";
+      rev = "bbe5153fcb36dec9860ced33ae8ff0b5d76ac02a";
+      sha256 = "1xvmh66lgii98z6f4lk1mjs73ysrvs55xdlcmf224k3as822jmw0";
+    };
+  };
+
+  align = buildVimPluginFrom2Nix {
+    pname = "align";
+    version = "2012-08-08";
+    src = fetchFromGitHub {
+      owner = "vim-scripts";
+      repo = "align";
+      rev = "787662fe90cd057942bc5b682fd70c87e1a9dd77";
+      sha256 = "0acacr572kfh7jvavbw61q5pkwrpi1albgancma063rpax1pddgp";
+    };
+  };
+
+  ansible-vim = buildVimPluginFrom2Nix {
+    pname = "ansible-vim";
+    version = "2020-04-08";
+    src = fetchFromGitHub {
+      owner = "pearofducks";
+      repo = "ansible-vim";
+      rev = "ad76abd6bccfa1a5195d20f7964c6393fe1a9524";
+      sha256 = "098jnybc11cxv2q8396hx9r814i5793y7a9kdl4ambpbvhm86vad";
+    };
+  };
+
+  antonys-macro-repeater = buildVimPluginFrom2Nix {
+    pname = "antonys-macro-repeater";
+    version = "2017-09-10";
+    src = fetchFromGitHub {
+      owner = "ckarnell";
+      repo = "antonys-macro-repeater";
+      rev = "61784d86b2654f3e261b9cc33360c5197704e266";
+      sha256 = "1cq5r091qbxjs9s12f7bb2fdm43gxwpnnh2l8nhj0n69jfk7gblw";
+    };
+  };
+
+  arcanist-vim = buildVimPluginFrom2Nix {
+    pname = "arcanist-vim";
+    version = "2016-05-27";
+    src = fetchFromGitHub {
+      owner = "solarnz";
+      repo = "arcanist.vim";
+      rev = "bd59e799e838c8d946d33142104b2db625dc15d6";
+      sha256 = "11v7gqa5rnv28q0i3d02g9sw22gkjn10afvjx7bg352d91knxn9m";
+    };
+  };
+
+  argtextobj-vim = buildVimPluginFrom2Nix {
+    pname = "argtextobj-vim";
+    version = "2010-10-18";
+    src = fetchFromGitHub {
+      owner = "vim-scripts";
+      repo = "argtextobj.vim";
+      rev = "f3fbe427f7b4ec436416a5816d714dc917dc530b";
+      sha256 = "1l4jh5hdmky1qj5z26jpnk49a6djjcvzyyr6pknrrgb8rzkiln48";
+    };
+  };
+
+  ats-vim = buildVimPluginFrom2Nix {
+    pname = "ats-vim";
+    version = "2020-03-24";
+    src = fetchFromGitHub {
+      owner = "vmchale";
+      repo = "ats-vim";
+      rev = "a17576687217a2e8066356cc211afb99b5de65e8";
+      sha256 = "0dv60za39v2w5d9mbk1r263fqpv11bdfyqp39b0snw40f0kh92z0";
+    };
+  };
+
+  auto-git-diff = buildVimPluginFrom2Nix {
+    pname = "auto-git-diff";
+    version = "2019-09-23";
+    src = fetchFromGitHub {
+      owner = "hotwatermorning";
+      repo = "auto-git-diff";
+      rev = "a14d52b7ed7e7fb69bf1de9d363f3abdd3410b3a";
+      sha256 = "0i0bnlxclh8pzanrxj428728mdx4wdy19fx499kiin87qr4r2hbn";
+    };
+  };
+
+  auto-pairs = buildVimPluginFrom2Nix {
+    pname = "auto-pairs";
+    version = "2019-02-27";
+    src = fetchFromGitHub {
+      owner = "jiangmiao";
+      repo = "auto-pairs";
+      rev = "39f06b873a8449af8ff6a3eee716d3da14d63a76";
+      sha256 = "1hxf155cmavpxpbsxx6zk23hgl9grl6yrh165kp9bjvld9ng08ng";
+    };
+  };
+
+  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";
+    };
+  };
+
+  awesome-vim-colorschemes = buildVimPluginFrom2Nix {
+    pname = "awesome-vim-colorschemes";
+    version = "2020-03-26";
+    src = fetchFromGitHub {
+      owner = "rafi";
+      repo = "awesome-vim-colorschemes";
+      rev = "4ad0ce02b8efa3c6e014e224a34b67b927d31c88";
+      sha256 = "0crg0gph8wmb412yvknh6ic42i3p5hd8c736rv61v52b2g0dgwxm";
+    };
+  };
+
+  ayu-vim = buildVimPluginFrom2Nix {
+    pname = "ayu-vim";
+    version = "2019-09-21";
+    src = fetchFromGitHub {
+      owner = "ayu-theme";
+      repo = "ayu-vim";
+      rev = "9dab20b38335ed06738f251e92e3817182063759";
+      sha256 = "0m914bnrnv7gy49qzfdp1zl3a1h7zpicvh2xqdfqhp7h96psxwmx";
+    };
+  };
+
+  base16-vim = buildVimPluginFrom2Nix {
+    pname = "base16-vim";
+    version = "2019-06-07";
+    src = fetchFromGitHub {
+      owner = "chriskempson";
+      repo = "base16-vim";
+      rev = "6191622d5806d4448fa2285047936bdcee57a098";
+      sha256 = "1qz21jizcy533mqk9wff1wqchhixkcfkysqcqs0x35wwpbri6nz8";
+    };
+  };
+
+  bats-vim = buildVimPluginFrom2Nix {
+    pname = "bats-vim";
+    version = "2013-07-03";
+    src = fetchFromGitHub {
+      owner = "vim-scripts";
+      repo = "bats.vim";
+      rev = "3c283f594ff8bc7fb0c25cd07ebef0f17385f94a";
+      sha256 = "06f3hdf7y5gpwmc6inrhk938qmn7cr6mbk00amrnl1qjvk09givx";
+    };
+  };
+
+  bclose-vim = buildVimPluginFrom2Nix {
+    pname = "bclose-vim";
+    version = "2018-10-10";
+    src = fetchFromGitHub {
+      owner = "rbgrouleff";
+      repo = "bclose.vim";
+      rev = "99018b4a2dd18aea1cbd3aa23565b01a0f8c5b73";
+      sha256 = "09a7g0nxn8cbnfz6za8q1p46kb5zbvxl80077hrjpnx4xc82xn2h";
+    };
+  };
+
+  bufexplorer = buildVimPluginFrom2Nix {
+    pname = "bufexplorer";
+    version = "2020-02-17";
+    src = fetchFromGitHub {
+      owner = "jlanzarotta";
+      repo = "bufexplorer";
+      rev = "29258f58357acc10c672585a9efe8913d756734d";
+      sha256 = "00wjwk9yzfclrbd4p59b5wpl21s2vjs4ahn30xhpza93bk513wnq";
+    };
+  };
+
+  BufOnly-vim = buildVimPluginFrom2Nix {
+    pname = "BufOnly-vim";
+    version = "2010-10-18";
+    src = fetchFromGitHub {
+      owner = "vim-scripts";
+      repo = "BufOnly.vim";
+      rev = "43dd92303979bdb234a3cb2f5662847f7a3affe7";
+      sha256 = "1gvpaqvvxjma0dl1zai68bpv42608api4054appwkw9pgczkkcdl";
+    };
+  };
+
+  calendar-vim = buildVimPluginFrom2Nix {
+    pname = "calendar-vim";
+    version = "2020-02-14";
+    src = fetchFromGitHub {
+      owner = "itchyny";
+      repo = "calendar.vim";
+      rev = "55d0495ff03260d82a5c80365cb754871ce35460";
+      sha256 = "0xi2g6x5lf8r36c5ld8pvz5c7n7jx3d6whwbk4gibmz6hlfrslwr";
+    };
+  };
+
+  camelcasemotion = buildVimPluginFrom2Nix {
+    pname = "camelcasemotion";
+    version = "2019-12-02";
+    src = fetchFromGitHub {
+      owner = "bkad";
+      repo = "camelcasemotion";
+      rev = "de439d7c06cffd0839a29045a103fe4b44b15cdc";
+      sha256 = "0yfsb0d9ly8abmc95nqcmr8r8ylif80zdjppib7g1qj1wapdhc69";
+    };
+  };
+
+  caw-vim = buildVimPluginFrom2Nix {
+    pname = "caw-vim";
+    version = "2020-03-24";
+    src = fetchFromGitHub {
+      owner = "tyru";
+      repo = "caw.vim";
+      rev = "00ba51adaa5c2e6100a57e452fb6f5b6f1548f7a";
+      sha256 = "0jmy81l726in57l89874lmfbgqz2gir81xa0np9c7rqypwrwg5r1";
+    };
+  };
+
+  changeColorScheme-vim = buildVimPluginFrom2Nix {
+    pname = "changeColorScheme-vim";
+    version = "2010-10-18";
+    src = fetchFromGitHub {
+      owner = "vim-scripts";
+      repo = "changeColorScheme.vim";
+      rev = "b041d49f828629d72f2232531a230d1ec5de2405";
+      sha256 = "0pybhsg9k9252d4ifdc4gsar8lkmfzbvs6xkzqq1m6f35l9wqk09";
+    };
+  };
+
+  CheckAttach = buildVimPluginFrom2Nix {
+    pname = "CheckAttach";
+    version = "2019-05-08";
+    src = fetchFromGitHub {
+      owner = "chrisbra";
+      repo = "CheckAttach";
+      rev = "8f0b1350431d1d34655a147e6f1cfe6cb5dda5f7";
+      sha256 = "1z9a40nbdjd3pnp28nfsi2bijsbaiphc0ia816f5flkchn07gmmj";
+    };
+  };
+
+  clang_complete = buildVimPluginFrom2Nix {
+    pname = "clang_complete";
+    version = "2018-09-19";
+    src = fetchFromGitHub {
+      owner = "xavierd";
+      repo = "clang_complete";
+      rev = "0b98d7533ad967aac3fc4c1a5b0508dafa8a676f";
+      sha256 = "04mdhc1kbv66blkn6qn98iyj659dac4z49nmpf3anglz8dgcxjgc";
+    };
+  };
+
+  clighter8 = buildVimPluginFrom2Nix {
+    pname = "clighter8";
+    version = "2018-07-25";
+    src = fetchFromGitHub {
+      owner = "bbchung";
+      repo = "clighter8";
+      rev = "839993b60dc4a19a58e4c7e7db1df04d911bb181";
+      sha256 = "01r92idbym2p1hiqszrprrl1hrqzz2yhzv8n08m8gycd7m227cwg";
+    };
+  };
+
+  coc-css = buildVimPluginFrom2Nix {
+    pname = "coc-css";
+    version = "2019-06-25";
+    src = fetchFromGitHub {
+      owner = "neoclide";
+      repo = "coc-css";
+      rev = "235009ac2a92172cdae66987b172264230c04f74";
+      sha256 = "1i7bhiibcr2k5c0l79ddsfxirkhxs3cp9x83b4ys1zy2yaxljlw6";
+    };
+  };
+
+  coc-denite = buildVimPluginFrom2Nix {
+    pname = "coc-denite";
+    version = "2019-10-13";
+    src = fetchFromGitHub {
+      owner = "neoclide";
+      repo = "coc-denite";
+      rev = "803f8a2388fcf90881c13ff17da4eec01184401d";
+      sha256 = "1gxj2jdii6icgdmkhhsxshi02xbsad0697cixklf3wsqlxrj3px5";
+    };
+  };
+
+  coc-emmet = buildVimPluginFrom2Nix {
+    pname = "coc-emmet";
+    version = "2019-12-03";
+    src = fetchFromGitHub {
+      owner = "neoclide";
+      repo = "coc-emmet";
+      rev = "1e65237f65b94bd5f9376023f557a26c14c9d35a";
+      sha256 = "16f3gdnprxw939zwdy7lzksj1qwlwfs174vk0nzf1d8yb04a7y2g";
+    };
+  };
+
+  coc-eslint = buildVimPluginFrom2Nix {
+    pname = "coc-eslint";
+    version = "2020-02-10";
+    src = fetchFromGitHub {
+      owner = "neoclide";
+      repo = "coc-eslint";
+      rev = "2f9de5cf232223f886b5e9711b0e9a5260f65db9";
+      sha256 = "0q1sizzj6ac6gzfp4s7ka600pa9f2dhr17v14j98cdlmyp6pyfhz";
+    };
+  };
+
+  coc-fzf = buildVimPluginFrom2Nix {
+    pname = "coc-fzf";
+    version = "2020-04-04";
+    src = fetchFromGitHub {
+      owner = "antoinemadec";
+      repo = "coc-fzf";
+      rev = "e4f640215a55f1e3447aa872de7a4d83d003964c";
+      sha256 = "1q78qw6nagd0wis6ixg7y290692a9fsrjmrv9cdiv7l8q4whqync";
+    };
+  };
+
+  coc-git = buildVimPluginFrom2Nix {
+    pname = "coc-git";
+    version = "2020-04-03";
+    src = fetchFromGitHub {
+      owner = "neoclide";
+      repo = "coc-git";
+      rev = "54dba825875c6bd9e5a77121662d40c96bcedd99";
+      sha256 = "007j7kkhp8j7l65frkbmvldfjq2jirpz60n6ascjsy5vq471i7n4";
+    };
+  };
+
+  coc-go = buildVimPluginFrom2Nix {
+    pname = "coc-go";
+    version = "2020-03-10";
+    src = fetchFromGitHub {
+      owner = "josa42";
+      repo = "coc-go";
+      rev = "587501a4445c1edb5d5e10927c5f8274f0e0ea52";
+      sha256 = "16cgdxn93zf0q5d80xb9c6khzgx02qvsjdaw3kf07qqsmdjvy4gj";
+    };
+  };
+
+  coc-highlight = buildVimPluginFrom2Nix {
+    pname = "coc-highlight";
+    version = "2019-10-18";
+    src = fetchFromGitHub {
+      owner = "neoclide";
+      repo = "coc-highlight";
+      rev = "b4e82ebd5fe855d004dd481e2ecf2fa88faed284";
+      sha256 = "06h64jq8cgj5hc19inidns046kkb76750179jsw7xv5zbp93ygap";
+    };
+  };
+
+  coc-html = buildVimPluginFrom2Nix {
+    pname = "coc-html";
+    version = "2020-03-30";
+    src = fetchFromGitHub {
+      owner = "neoclide";
+      repo = "coc-html";
+      rev = "8ae5d2832761b5868f69c67f33ce26f9edb26c65";
+      sha256 = "1rf9qfimnbxjr5s55pzm8npixan5cz2v17g4j34f18i9ky6yyk0b";
+    };
+  };
+
+  coc-imselect = buildVimPluginFrom2Nix {
+    pname = "coc-imselect";
+    version = "2020-02-18";
+    src = fetchFromGitHub {
+      owner = "neoclide";
+      repo = "coc-imselect";
+      rev = "01442d2fb7d344122e59755f59782a0e1bf7d294";
+      sha256 = "1vqx9yna66njdw1my15ac6djr3yvnb6das96nx12mpingnw85kky";
+    };
+  };
+
+  coc-java = buildVimPluginFrom2Nix {
+    pname = "coc-java";
+    version = "2020-04-10";
+    src = fetchFromGitHub {
+      owner = "neoclide";
+      repo = "coc-java";
+      rev = "e4dd6b744f7eb356afa8db7b958bdf5910b5ec6f";
+      sha256 = "0fndkbmi84qgqfj6ny04wm05mnrvrg36bb04vk7zj90k8a51xrrr";
+    };
+  };
+
+  coc-jest = buildVimPluginFrom2Nix {
+    pname = "coc-jest";
+    version = "2020-04-09";
+    src = fetchFromGitHub {
+      owner = "neoclide";
+      repo = "coc-jest";
+      rev = "3fac1864ef1af87ee096f0ab6514a4b890363231";
+      sha256 = "1z2sbzr84gh935553g6bfkpx7s4i37s200a1s9dqay9cq92jh7hy";
+    };
+  };
+
+  coc-json = buildVimPluginFrom2Nix {
+    pname = "coc-json";
+    version = "2020-03-13";
+    src = fetchFromGitHub {
+      owner = "neoclide";
+      repo = "coc-json";
+      rev = "33ca64c00ee5c0d759a6f537b23971476b85f8e3";
+      sha256 = "07mblxxvl95kfy0wwm5r75j6y3v8fvyh6cwiza5rg1z9dlw1xddw";
+    };
+  };
+
+  coc-lists = buildVimPluginFrom2Nix {
+    pname = "coc-lists";
+    version = "2020-03-03";
+    src = fetchFromGitHub {
+      owner = "neoclide";
+      repo = "coc-lists";
+      rev = "21761f5e9a48baf3dbb6540ff180f6071c1ed8c6";
+      sha256 = "101n3cmhvm4hxznk5w4n7lbk552cwsyf28axa1d5rr838r3zg5wi";
+    };
+  };
+
+  coc-metals = buildVimPluginFrom2Nix {
+    pname = "coc-metals";
+    version = "2020-04-10";
+    src = fetchFromGitHub {
+      owner = "ckipp01";
+      repo = "coc-metals";
+      rev = "675477fc9c95d87000eee343e7e478db5519654b";
+      sha256 = "1x66hp1hxlyacijj1gbffa6cqv8lg6mralxa6rkqyby6wgiydswy";
+    };
+  };
+
+  coc-neco = buildVimPluginFrom2Nix {
+    pname = "coc-neco";
+    version = "2020-04-07";
+    src = fetchFromGitHub {
+      owner = "neoclide";
+      repo = "coc-neco";
+      rev = "fe130c2c3b883f8b58f70f15bf36c73923faa3d9";
+      sha256 = "1yzh3p1xx6k6rnr9skdvy5lsb7hz4kh2y537ill8a7770y936vn8";
+    };
+  };
+
+  coc-pairs = buildVimPluginFrom2Nix {
+    pname = "coc-pairs";
+    version = "2020-03-09";
+    src = fetchFromGitHub {
+      owner = "neoclide";
+      repo = "coc-pairs";
+      rev = "79deeaabdc4f091c22f3dd67d439a0a336e8aa7e";
+      sha256 = "1w6p2dk7yj8ldxg1qxh9zpn9ypm6gn66gi0vbax33wf5c0dmp0v9";
+    };
+  };
+
+  coc-prettier = buildVimPluginFrom2Nix {
+    pname = "coc-prettier";
+    version = "2020-04-03";
+    src = fetchFromGitHub {
+      owner = "neoclide";
+      repo = "coc-prettier";
+      rev = "77e32b628e9b5fc6732f8b43ba6aca36a2e3f305";
+      sha256 = "13hfmdy0r4mlsvzvj0n0ik2dsxwkn58fkfqv6dgfxdc55nxwgkv0";
+    };
+  };
+
+  coc-python = buildVimPluginFrom2Nix {
+    pname = "coc-python";
+    version = "2020-02-21";
+    src = fetchFromGitHub {
+      owner = "neoclide";
+      repo = "coc-python";
+      rev = "6a5104d18ae5ebf7d9b84af7c4a34c6ced62aee8";
+      sha256 = "0l8zrb2bhv1apx2vp8gswqh7v64dxfd8124cggxfkkzdqyxr10w0";
+    };
+  };
+
+  coc-r-lsp = buildVimPluginFrom2Nix {
+    pname = "coc-r-lsp";
+    version = "2019-12-07";
+    src = fetchFromGitHub {
+      owner = "neoclide";
+      repo = "coc-r-lsp";
+      rev = "a1b97e36c601975a8d730b6965f25592b1ecd1e7";
+      sha256 = "04g1kbgm8p0asrsibmg4w6wj8i2xzwc70g7rkcs2bj3pakbkvws6";
+    };
+  };
+
+  coc-rls = buildVimPluginFrom2Nix {
+    pname = "coc-rls";
+    version = "2019-12-07";
+    src = fetchFromGitHub {
+      owner = "neoclide";
+      repo = "coc-rls";
+      rev = "c899418e8fae4a8c3eb15fee48513ae050b11d60";
+      sha256 = "0sipvs8r8i239l2334k4qnhwpaijwd524q598rp4ma34ry42c2xl";
+    };
+  };
+
+  coc-smartf = buildVimPluginFrom2Nix {
+    pname = "coc-smartf";
+    version = "2019-07-26";
+    src = fetchFromGitHub {
+      owner = "neoclide";
+      repo = "coc-smartf";
+      rev = "d40714eab8e5fe26fac492ffd30e98cd1bfbdec5";
+      sha256 = "0kfrq5hk8zn24cl7fiy48nyvd30a2dva93c61079axkdg9912yd7";
+    };
+  };
+
+  coc-snippets = buildVimPluginFrom2Nix {
+    pname = "coc-snippets";
+    version = "2020-04-09";
+    src = fetchFromGitHub {
+      owner = "neoclide";
+      repo = "coc-snippets";
+      rev = "62aa65069c92bf7753bb122559e8807ec304a6f4";
+      sha256 = "1fb884c841hpzhzv26fsq5yli3k5vk8yjq0l55zvlg3a2mxfpj6z";
+    };
+  };
+
+  coc-solargraph = buildVimPluginFrom2Nix {
+    pname = "coc-solargraph";
+    version = "2020-02-14";
+    src = fetchFromGitHub {
+      owner = "neoclide";
+      repo = "coc-solargraph";
+      rev = "231447aae26a0e88aa6d9e207a7354c4ca37d564";
+      sha256 = "0amcx519r9j8jr6ckglywsjlyph3m5jq4qvbfwyir8ihxhxa4b0d";
+    };
+  };
+
+  coc-spell-checker = buildVimPluginFrom2Nix {
+    pname = "coc-spell-checker";
+    version = "2020-03-16";
+    src = fetchFromGitHub {
+      owner = "iamcco";
+      repo = "coc-spell-checker";
+      rev = "4a8195f5f22d9d7b42998b7e3b846aa2aef7de52";
+      sha256 = "1w8b9icwdam8ljprc8avs5pwdiwmx3j1jxsg03d1lvis9w5xm0cd";
+    };
+  };
+
+  coc-stylelint = buildVimPluginFrom2Nix {
+    pname = "coc-stylelint";
+    version = "2019-08-20";
+    src = fetchFromGitHub {
+      owner = "neoclide";
+      repo = "coc-stylelint";
+      rev = "288a372261cbc23ae4a6e26b1621c6e3218d00ad";
+      sha256 = "1qir8diqnv1a78lzw9p3jsbni52gdg38rx1lj5i4iyff9282ir2x";
+    };
+  };
+
+  coc-tabnine = buildVimPluginFrom2Nix {
+    pname = "coc-tabnine";
+    version = "2020-01-06";
+    src = fetchFromGitHub {
+      owner = "neoclide";
+      repo = "coc-tabnine";
+      rev = "442c829185ecab2268d1b9fd076c5286bbd39562";
+      sha256 = "0as4b33nnp7anqbxkkja8lp37y4a74b3507zyk3gmmna0my1ca3r";
+    };
+  };
+
+  coc-tslint = buildVimPluginFrom2Nix {
+    pname = "coc-tslint";
+    version = "2019-07-03";
+    src = fetchFromGitHub {
+      owner = "neoclide";
+      repo = "coc-tslint";
+      rev = "6128761577806d7047fa05d1a527945490d6316c";
+      sha256 = "1vi4vrawknkd5wjyb0j143jbfis9vaanl219a7argirwjs057vpd";
+    };
+  };
+
+  coc-tslint-plugin = buildVimPluginFrom2Nix {
+    pname = "coc-tslint-plugin";
+    version = "2019-07-18";
+    src = fetchFromGitHub {
+      owner = "neoclide";
+      repo = "coc-tslint-plugin";
+      rev = "acc1356253a5088f630d9910b5fc13dc5d108bbc";
+      sha256 = "1cjgimqgd70x5zhw641z6g4hc54vrkg3r4sscg092gkrdpkq3969";
+    };
+  };
+
+  coc-tsserver = buildVimPluginFrom2Nix {
+    pname = "coc-tsserver";
+    version = "2020-04-10";
+    src = fetchFromGitHub {
+      owner = "neoclide";
+      repo = "coc-tsserver";
+      rev = "17fdfd9462bdc6780ab3087ca9293411ca147490";
+      sha256 = "1rwpjj24v1px8pkj21g36cl1nir6c4lhrsslf3i6hk41xa8jw64z";
+    };
+  };
+
+  coc-vetur = buildVimPluginFrom2Nix {
+    pname = "coc-vetur";
+    version = "2020-03-27";
+    src = fetchFromGitHub {
+      owner = "neoclide";
+      repo = "coc-vetur";
+      rev = "314df846b6bc2be9b7c808ed949a1fd693bba402";
+      sha256 = "14fmyrfmyk66wbfnbb2iwy7azjk10d8gyrv5p950aagmv8shif52";
+    };
+  };
+
+  coc-vimtex = buildVimPluginFrom2Nix {
+    pname = "coc-vimtex";
+    version = "2020-03-27";
+    src = fetchFromGitHub {
+      owner = "neoclide";
+      repo = "coc-vimtex";
+      rev = "0a4f8ee29afc4e1dcfdc8846f116a1db32fa9867";
+      sha256 = "0z9kxm40kr8a5sa06vkg7xaai2n54y21xfkrsx774zzdkcrrkizk";
+    };
+  };
+
+  coc-wxml = buildVimPluginFrom2Nix {
+    pname = "coc-wxml";
+    version = "2019-06-20";
+    src = fetchFromGitHub {
+      owner = "neoclide";
+      repo = "coc-wxml";
+      rev = "f02550939d33a0175c34186904c376bbae878e60";
+      sha256 = "1448019dzdy55j4plhzlnp2qkfzk0zkqqs7kn94ndn60hn1x889m";
+    };
+  };
+
+  coc-yaml = buildVimPluginFrom2Nix {
+    pname = "coc-yaml";
+    version = "2020-03-06";
+    src = fetchFromGitHub {
+      owner = "neoclide";
+      repo = "coc-yaml";
+      rev = "338192a2434b96b139fb8c07d260da00b3100997";
+      sha256 = "020jpsm9ss2v3x1g43m920w2yamv8khl7mg7wm4sx6qsl3rlfq4g";
+    };
+  };
+
+  coc-yank = buildVimPluginFrom2Nix {
+    pname = "coc-yank";
+    version = "2020-03-17";
+    src = fetchFromGitHub {
+      owner = "neoclide";
+      repo = "coc-yank";
+      rev = "6cb8bc7f2d41b9fb75c797c5805444badeff3dd9";
+      sha256 = "0s28684531ihczg5nf2m3f8z1vx9fw4yllfq7jz8g7ifw922ddxb";
+    };
+  };
+
+  coc-nvim = buildVimPluginFrom2Nix {
+    pname = "coc-nvim";
+    version = "2020-04-10";
+    src = fetchFromGitHub {
+      owner = "neoclide";
+      repo = "coc.nvim";
+      rev = "09853cf2808904ed6eb93b207b5cec8dd69bfa34";
+      sha256 = "0i5jciwparwx1zgisa6l40xmamafl6syykb2hc953q1hfl24z9a5";
+    };
+  };
+
+  colorizer = buildVimPluginFrom2Nix {
+    pname = "colorizer";
+    version = "2018-06-16";
+    src = fetchFromGitHub {
+      owner = "lilydjwg";
+      repo = "colorizer";
+      rev = "afc1491e5b9c36305ce710bdad2b48f069141183";
+      sha256 = "1dpiv9z8h6196acncyjhzd1qa56y17468fpxbfzrx5q2266sajc7";
+    };
+  };
+
+  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";
+    };
+  };
+
+  command-t = buildVimPluginFrom2Nix {
+    pname = "command-t";
+    version = "2019-12-01";
+    src = fetchFromGitHub {
+      owner = "wincent";
+      repo = "command-t";
+      rev = "9bdc2e1585419640129a48c646bbf8459f96951b";
+      sha256 = "0iim0lhib6fiainyb48ibl2qzgv8cmn9yinmd1k6i2y5y26wlhfy";
+      fetchSubmodules = true;
+    };
+  };
+
+  committia-vim = buildVimPluginFrom2Nix {
+    pname = "committia-vim";
+    version = "2018-10-23";
+    src = fetchFromGitHub {
+      owner = "rhysd";
+      repo = "committia.vim";
+      rev = "d367190c7ffe95f4ac5d30b2e9da4cd9898579b9";
+      sha256 = "1yqsdy1mxc775qcrcl1yi930m2q6364mgjdj06vwnph1rg98w0ql";
+    };
+  };
+
+  concealedyank-vim = buildVimPluginFrom2Nix {
+    pname = "concealedyank-vim";
+    version = "2013-03-24";
+    src = fetchFromGitHub {
+      owner = "chikatoike";
+      repo = "concealedyank.vim";
+      rev = "e7e65a395e0e6a266f3a808bc07441aa7d03ebbd";
+      sha256 = "0z7i8dmwfjh6mcrmgrxv3j86ic867617fas9mv4gqsrhhvrrkzsb";
+    };
+  };
+
+  context_filetype-vim = buildVimPluginFrom2Nix {
+    pname = "context_filetype-vim";
+    version = "2020-03-13";
+    src = fetchFromGitHub {
+      owner = "Shougo";
+      repo = "context_filetype.vim";
+      rev = "f200fe69939089da9e61bd9a3ff75b4ef7adc708";
+      sha256 = "06pclan83yww5qf26fmqhby8iks0rzlxgpk254vxmkihbypvpa51";
+    };
+  };
+
+  cosco-vim = buildVimPluginFrom2Nix {
+    pname = "cosco-vim";
+    version = "2018-08-07";
+    src = fetchFromGitHub {
+      owner = "lfilho";
+      repo = "cosco.vim";
+      rev = "5752622192d9b27b3a5a274a5455613b56df6386";
+      sha256 = "01byd7j4gl7zb1bh61p839ka04x2sm0rgwvbb126az7dr6gpclyf";
+    };
+  };
+
+  cpsm = buildVimPluginFrom2Nix {
+    pname = "cpsm";
+    version = "2018-09-08";
+    src = fetchFromGitHub {
+      owner = "nixprime";
+      repo = "cpsm";
+      rev = "900023c56dfdd200841d5c2f2f7000f332d2614f";
+      sha256 = "1p1ry11f39fcz32i3b3p0p8n99qrnvrx4d7p0123123dj7wbxk3p";
+    };
+  };
+
+  csapprox = buildVimPluginFrom2Nix {
+    pname = "csapprox";
+    version = "2013-07-27";
+    src = fetchFromGitHub {
+      owner = "godlygeek";
+      repo = "csapprox";
+      rev = "7981dac51d8b6776985aa08cb7b5ee98ea7f2ddd";
+      sha256 = "08g4x6nnd6hkgm2daa5ihhz75pcdx3jzzv8rfjls80qajlhx5rf6";
+    };
+  };
+
+  csv-vim = buildVimPluginFrom2Nix {
+    pname = "csv-vim";
+    version = "2020-03-10";
+    src = fetchFromGitHub {
+      owner = "chrisbra";
+      repo = "csv.vim";
+      rev = "e7fb581122df54fe9770cc5e565bef450e7d2478";
+      sha256 = "1h15n1pdci34idks218r4kpwna1zb25hk8prsqzvjkj8mc6ch67y";
+    };
+  };
+
+  ctrlp-cmatcher = buildVimPluginFrom2Nix {
+    pname = "ctrlp-cmatcher";
+    version = "2015-10-15";
+    src = fetchFromGitHub {
+      owner = "JazzCore";
+      repo = "ctrlp-cmatcher";
+      rev = "6c36334f106b6fd981d23e724e9a618734cab43a";
+      sha256 = "1573kd6xf3n8sxlz2j4zadai4rnc7k3s9c54648yfzickwn57d8q";
+    };
+  };
+
+  ctrlp-py-matcher = buildVimPluginFrom2Nix {
+    pname = "ctrlp-py-matcher";
+    version = "2017-11-01";
+    src = fetchFromGitHub {
+      owner = "FelikZ";
+      repo = "ctrlp-py-matcher";
+      rev = "cf63fd546f1e80dd4db3db96afbeaad301d21f13";
+      sha256 = "0hs829x3vxv12y78hz5g4a5qpw05xf42dk0hxxk3ind77mnl1ir1";
+    };
+  };
+
+  ctrlp-z = buildVimPluginFrom2Nix {
+    pname = "ctrlp-z";
+    version = "2015-10-17";
+    src = fetchFromGitHub {
+      owner = "amiorin";
+      repo = "ctrlp-z";
+      rev = "d1a69ec623ce24b9a30fc8fe3cd468c322b03026";
+      sha256 = "16nsj1g8lqmyizlb5ijwhf4dsmh0xv1kwqq6jxvhaf55vfga82yl";
+    };
+  };
+
+  ctrlp-vim = buildVimPluginFrom2Nix {
+    pname = "ctrlp-vim";
+    version = "2020-02-08";
+    src = fetchFromGitHub {
+      owner = "ctrlpvim";
+      repo = "ctrlp.vim";
+      rev = "585143acbe15f362852d78bd050baff3c12902d7";
+      sha256 = "0ijkzlb08sc47cax4f328hlk68nscx5wdzhihpj106vrnfyrpyx3";
+    };
+  };
+
+  dart-vim-plugin = buildVimPluginFrom2Nix {
+    pname = "dart-vim-plugin";
+    version = "2020-03-31";
+    src = fetchFromGitHub {
+      owner = "dart-lang";
+      repo = "dart-vim-plugin";
+      rev = "4375ab9cc1fe0077c36a9aba5dd7145ce4a2fa6f";
+      sha256 = "03cl55s4f2qa8hwag2w38gfc7mpp6jhy0vx7qsmkn24cqk1jvv2k";
+    };
+  };
+
+  defx-git = buildVimPluginFrom2Nix {
+    pname = "defx-git";
+    version = "2020-01-18";
+    src = fetchFromGitHub {
+      owner = "kristijanhusak";
+      repo = "defx-git";
+      rev = "b5d0b842064ddb7a7af0e790f4648cb1909ed43f";
+      sha256 = "0i8vi6zhnv088qc3f3wa5h4b17xnpvmr603srhg44zx2clcjblnr";
+    };
+  };
+
+  defx-icons = buildVimPluginFrom2Nix {
+    pname = "defx-icons";
+    version = "2020-02-10";
+    src = fetchFromGitHub {
+      owner = "kristijanhusak";
+      repo = "defx-icons";
+      rev = "2e4df3b6302da537ac7df28fbc0e0991c6c1aa0e";
+      sha256 = "0wkn02z75pvfl0xrhgq80sw0qfidjg5s0zm5mij632pq3dm7axiq";
+    };
+  };
+
+  defx-nvim = buildVimPluginFrom2Nix {
+    pname = "defx-nvim";
+    version = "2020-04-03";
+    src = fetchFromGitHub {
+      owner = "Shougo";
+      repo = "defx.nvim";
+      rev = "ceea32bb05ec33512c556054b91aff9c1d89f1cb";
+      sha256 = "0jfp9xvsin2p9zdd5hsrhkm6rjwdmf130xmis3zpm3n53nh88xh8";
+    };
+  };
+
+  delimitMate = buildVimPluginFrom2Nix {
+    pname = "delimitMate";
+    version = "2017-06-19";
+    src = fetchFromGitHub {
+      owner = "Raimondi";
+      repo = "delimitMate";
+      rev = "728b57a6564c1d2bdfb9b9e0f2f8c5ba3d7e0c5c";
+      sha256 = "0fskm9gz81dk8arcidrm71mv72a7isng1clssqkqn5wnygbiimsn";
+    };
+  };
+
+  denite-extra = buildVimPluginFrom2Nix {
+    pname = "denite-extra";
+    version = "2019-03-29";
+    src = fetchFromGitHub {
+      owner = "neoclide";
+      repo = "denite-extra";
+      rev = "af18257544027ce89269dba70c12aba1f5b9e23c";
+      sha256 = "0bmq9yhylfd3v6bfwvakw3pbsz5kk8wlmmql0yllqayp6410w25a";
+    };
+  };
+
+  denite-git = buildVimPluginFrom2Nix {
+    pname = "denite-git";
+    version = "2020-03-02";
+    src = fetchFromGitHub {
+      owner = "neoclide";
+      repo = "denite-git";
+      rev = "88b5323a6fc0ace197eed5205215d80f3b613f91";
+      sha256 = "0b687i64hr8hll7pv7r1xz906b46cl2q62zm18ipikhkpva6iv13";
+    };
+  };
+
+  denite-nvim = buildVimPluginFrom2Nix {
+    pname = "denite-nvim";
+    version = "2020-04-05";
+    src = fetchFromGitHub {
+      owner = "Shougo";
+      repo = "denite.nvim";
+      rev = "7a71d54b725344dad92939901f319223411dc102";
+      sha256 = "01wk4id1gffp7d88r5znwsay0wqkssdbw1rc3wjaax9a604j0v1j";
+    };
+  };
+
+  deol-nvim = buildVimPluginFrom2Nix {
+    pname = "deol-nvim";
+    version = "2020-04-12";
+    src = fetchFromGitHub {
+      owner = "Shougo";
+      repo = "deol.nvim";
+      rev = "1c240e64703b67e0c7fcfb51b59d2bc276b668f5";
+      sha256 = "049xx1al44yj3r3wsqwi4z861dkcw06cgfw1czaiiy696dah5fn2";
+    };
+  };
+
+  deoplete-clang = buildVimPluginFrom2Nix {
+    pname = "deoplete-clang";
+    version = "2019-11-10";
+    src = fetchFromGitHub {
+      owner = "deoplete-plugins";
+      repo = "deoplete-clang";
+      rev = "2ea262e98edcb66e828f9077fcc844100320eb63";
+      sha256 = "1wvk61f8ph2vpl6llzmir3qs3zwaw3lrphs16d1j7ljkdl3bk49k";
+      fetchSubmodules = true;
+    };
+  };
+
+  deoplete-dictionary = buildVimPluginFrom2Nix {
+    pname = "deoplete-dictionary";
+    version = "2019-04-16";
+    src = fetchFromGitHub {
+      owner = "deoplete-plugins";
+      repo = "deoplete-dictionary";
+      rev = "e0879df5dce25b96d6a2a6f52a1a5e41d12b5992";
+      sha256 = "05p707b15fzhf0laqy3q0hi34vxpljy86cd5qvpjzx5h0ry32p09";
+    };
+  };
+
+  deoplete-emoji = buildVimPluginFrom2Nix {
+    pname = "deoplete-emoji";
+    version = "2019-01-20";
+    src = fetchFromGitHub {
+      owner = "fszymanski";
+      repo = "deoplete-emoji";
+      rev = "1dfa2da6ae3ee146ddfbfdba48cf45f0c1d57d7d";
+      sha256 = "0drqbdmy8igq6rv7s2qlxsp391pydcynlr9gkaadzrg7pk4nlgsb";
+    };
+  };
+
+  deoplete-fish = buildVimPluginFrom2Nix {
+    pname = "deoplete-fish";
+    version = "2020-04-04";
+    src = fetchFromGitHub {
+      owner = "ponko2";
+      repo = "deoplete-fish";
+      rev = "c4cfb934bb6ec69d7f1aff9d376b7d436bba5c93";
+      sha256 = "19a6j4qsqljz1pmrn4fx8v1bhlfpqdq821fc2ibjd9h98f6dzi5p";
+    };
+  };
+
+  deoplete-github = buildVimPluginFrom2Nix {
+    pname = "deoplete-github";
+    version = "2018-03-04";
+    src = fetchFromGitHub {
+      owner = "SevereOverfl0w";
+      repo = "deoplete-github";
+      rev = "8e30256e50b3914a7e57ea4d5976b6a499fb936f";
+      sha256 = "11n15nqi417sdcqgb6gkk6z4wrrdd8vdbd7wzqpg41140c73v5gm";
+    };
+  };
+
+  deoplete-go = buildVimPluginFrom2Nix {
+    pname = "deoplete-go";
+    version = "2020-01-01";
+    src = fetchFromGitHub {
+      owner = "deoplete-plugins";
+      repo = "deoplete-go";
+      rev = "4f1ccd2ed70211fd025d052ec725c0b835bea487";
+      sha256 = "0zmx98kz6pxfpakizr8xm1nrv1rjr0frz19pkik29mk6aj2b2l08";
+      fetchSubmodules = true;
+    };
+  };
+
+  deoplete-greek = buildVimPluginFrom2Nix {
+    pname = "deoplete-greek";
+    version = "2019-12-23";
+    src = fetchFromGitHub {
+      owner = "Inazuma110";
+      repo = "deoplete-greek";
+      rev = "aecf3b2f8acfab20c93a6dc88d55260a0df04cbf";
+      sha256 = "086qjbqps05zb2vnyb5q7a67i7al8mxxi86n0h5nsqdd0ws6qqhx";
+    };
+  };
+
+  deoplete-jedi = buildVimPluginFrom2Nix {
+    pname = "deoplete-jedi";
+    version = "2020-03-27";
+    src = fetchFromGitHub {
+      owner = "deoplete-plugins";
+      repo = "deoplete-jedi";
+      rev = "34e48ef9569536bee335d4e36849e739e31b8aeb";
+      sha256 = "1xlgfngaahbnwk6bfnmzv63jdz70w0lvqzpa5zbsyb5p52p4a58i";
+      fetchSubmodules = true;
+    };
+  };
+
+  deoplete-julia = buildVimPluginFrom2Nix {
+    pname = "deoplete-julia";
+    version = "2018-06-11";
+    src = fetchFromGitHub {
+      owner = "JuliaEditorSupport";
+      repo = "deoplete-julia";
+      rev = "d60b976910685c99ca773c974e91c44eeda03a19";
+      sha256 = "0x5cc9g1g1w9myr6p1ahb9gpn2abpbggjdk2bc903f62pkrapvjf";
+    };
+  };
+
+  deoplete-khard = buildVimPluginFrom2Nix {
+    pname = "deoplete-khard";
+    version = "2019-09-02";
+    src = fetchFromGitHub {
+      owner = "nicoe";
+      repo = "deoplete-khard";
+      rev = "27221723a3bb8e480ff8cbe7f4be9ff38c076bf7";
+      sha256 = "0g7sysm5lb8fpgagfg4565fz4rn16djdc4m2213ryq1s3crx40gw";
+    };
+  };
+
+  deoplete-lsp = buildVimPluginFrom2Nix {
+    pname = "deoplete-lsp";
+    version = "2020-03-07";
+    src = fetchFromGitHub {
+      owner = "Shougo";
+      repo = "deoplete-lsp";
+      rev = "6aa2bfd73a181fa6b55021264c4a8a83237ce558";
+      sha256 = "1bcvfbv046fk34vnc1ly8civ3sibqlzli8vm2548dfxc55wcwsys";
+    };
+  };
+
+  deoplete-notmuch = buildVimPluginFrom2Nix {
+    pname = "deoplete-notmuch";
+    version = "2018-12-11";
+    src = fetchFromGitHub {
+      owner = "Valodim";
+      repo = "deoplete-notmuch";
+      rev = "828b5acf1924f9869614e93855a0d8cc94f1a74d";
+      sha256 = "1l2pfazhpkz26zwbjdafvhgvjj533kncm7dywlandsf3cibm8mv9";
+    };
+  };
+
+  deoplete-phpactor = buildVimPluginFrom2Nix {
+    pname = "deoplete-phpactor";
+    version = "2019-02-22";
+    src = fetchFromGitHub {
+      owner = "kristijanhusak";
+      repo = "deoplete-phpactor";
+      rev = "53e239effb8ff20fc0a192206e96d98d4f9001ad";
+      sha256 = "14097r9fmyp9zxfgv0fj2s52qd1v5cxdckfg4zph7lg3yri1hx9p";
+    };
+  };
+
+  deoplete-rust = buildVimPluginFrom2Nix {
+    pname = "deoplete-rust";
+    version = "2017-07-18";
+    src = fetchFromGitHub {
+      owner = "sebastianmarkow";
+      repo = "deoplete-rust";
+      rev = "0a86e502113910c33448b337c4d50cabea120d25";
+      sha256 = "0wsck83jns40ny3740vwjhc8g5bh6zl71hkirbjxy6n4xgixa54h";
+    };
+  };
+
+  deoplete-tabnine = buildVimPluginFrom2Nix {
+    pname = "deoplete-tabnine";
+    version = "2020-03-29";
+    src = fetchFromGitHub {
+      owner = "tbodt";
+      repo = "deoplete-tabnine";
+      rev = "eef0e2340e19aea05fe5759b7da3b13cadd375c4";
+      sha256 = "0q10zcjhjgak3w365pagd4ym5mmj3yd1lfsxv0d4wr4lp9a51sd7";
+    };
+  };
+
+  deoplete-ternjs = buildVimPluginFrom2Nix {
+    pname = "deoplete-ternjs";
+    version = "2019-12-19";
+    src = fetchFromGitHub {
+      owner = "carlitux";
+      repo = "deoplete-ternjs";
+      rev = "5405e84a44fc4ab5234c9a253ad4aa2b161e5897";
+      sha256 = "0684f9ci0y4wihf04z9r8x55cir02al4wp911dz0zg678z8w0yha";
+    };
+  };
+
+  deoplete-zsh = buildVimPluginFrom2Nix {
+    pname = "deoplete-zsh";
+    version = "2019-11-10";
+    src = fetchFromGitHub {
+      owner = "deoplete-plugins";
+      repo = "deoplete-zsh";
+      rev = "92b7afc3804dd17a849b207e184359558ab8f444";
+      sha256 = "0zsbkl82kny1vmfv06iz576xsclbik0xr7ndzpb0ddhw5nfnicfx";
+    };
+  };
+
+  deoplete-nvim = buildVimPluginFrom2Nix {
+    pname = "deoplete-nvim";
+    version = "2020-04-10";
+    src = fetchFromGitHub {
+      owner = "Shougo";
+      repo = "deoplete.nvim";
+      rev = "eb2307cfa84280041bc294e2091cee40a9183db8";
+      sha256 = "1zhz2d37gsbc2v2pz4k5m58r9d70x3ngbzcm6kxarm0farismxqg";
+    };
+  };
+
+  dhall-vim = buildVimPluginFrom2Nix {
+    pname = "dhall-vim";
+    version = "2020-01-02";
+    src = fetchFromGitHub {
+      owner = "vmchale";
+      repo = "dhall-vim";
+      rev = "607958520f8bd4308fe52937e211f6db4ad84cf3";
+      sha256 = "0rnkmfrzsm4hg6ln8g8qj9ff8z2sk7cnf4gqrswychqhhkg1f817";
+    };
+  };
+
+  direnv-vim = buildVimPluginFrom2Nix {
+    pname = "direnv-vim";
+    version = "2019-04-30";
+    src = fetchFromGitHub {
+      owner = "direnv";
+      repo = "direnv.vim";
+      rev = "5e75084465ad37dd0a4d4b1198b5ffa8978ae4e1";
+      sha256 = "0vabsv98vwdjns3dliplg7x8ssyrin44af9jl248kdzkqw5fx445";
+    };
+  };
+
+  DoxygenToolkit-vim = buildVimPluginFrom2Nix {
+    pname = "DoxygenToolkit-vim";
+    version = "2010-11-06";
+    src = fetchFromGitHub {
+      owner = "vim-scripts";
+      repo = "DoxygenToolkit.vim";
+      rev = "afd8663d36d2ec19d26befdb10e89e912d26bbd3";
+      sha256 = "1za8li02j4nhqjjsyxg4p78638h5af4izim37zc0p1x55zr3i85r";
+    };
+  };
+
+  echodoc-vim = buildVimPluginFrom2Nix {
+    pname = "echodoc-vim";
+    version = "2020-04-08";
+    src = fetchFromGitHub {
+      owner = "Shougo";
+      repo = "echodoc.vim";
+      rev = "31533d9c6c2723dfb4cf5691c83f330a3a0ccddd";
+      sha256 = "1ygm4g90zv009iqv8k8n4930a7gpij5jxbz7dqq2dfyj4jn37rkf";
+    };
+  };
+
+  editorconfig-vim = buildVimPluginFrom2Nix {
+    pname = "editorconfig-vim";
+    version = "2020-04-07";
+    src = fetchFromGitHub {
+      owner = "editorconfig";
+      repo = "editorconfig-vim";
+      rev = "8aff78a03357bf573abcec407a543762f281b7d3";
+      sha256 = "015sfz2j0mfnfpm6zf8jnh0lm8943cpccjlbj7ks1dsvs36m056i";
+      fetchSubmodules = true;
+    };
+  };
+
+  elm-vim = buildVimPluginFrom2Nix {
+    pname = "elm-vim";
+    version = "2019-04-05";
+    src = fetchFromGitHub {
+      owner = "elmcast";
+      repo = "elm-vim";
+      rev = "165107a9fd2b20c8f050fc4f977b4e41c790b1e7";
+      sha256 = "0gf7b49by0ybx3ndz7sz5dwcfnps4sz6wsr02lyarj8f8116ysy5";
+    };
+  };
+
+  emmet-vim = buildVimPluginFrom2Nix {
+    pname = "emmet-vim";
+    version = "2020-03-07";
+    src = fetchFromGitHub {
+      owner = "mattn";
+      repo = "emmet-vim";
+      rev = "c7643e5b616430f766528b225528a5228adb43df";
+      sha256 = "0wjxx648lp11nqzgrdcbqikjs85knpvk594b9l25hadhd5awgahv";
+      fetchSubmodules = true;
+    };
+  };
+
+  emodeline = buildVimPluginFrom2Nix {
+    pname = "emodeline";
+    version = "2010-10-18";
+    src = fetchFromGitHub {
+      owner = "vim-scripts";
+      repo = "emodeline";
+      rev = "19550795743876c2256021530209d83592f5924a";
+      sha256 = "0x9y7rzbk6g8cq6jkn37wi95wzhq0abban6w10652v4kdmjrxrr0";
+    };
+  };
+
+  ensime-vim = buildVimPluginFrom2Nix {
+    pname = "ensime-vim";
+    version = "2018-10-10";
+    src = fetchFromGitHub {
+      owner = "ensime";
+      repo = "ensime-vim";
+      rev = "caa734e84f002b25446c615706283a74edd4ecfe";
+      sha256 = "190qq8r2zs7xzmsag7ygk6dvpav3cnzlc40lc3fvwmkfwgci5zg0";
+    };
+  };
+
+  falcon = buildVimPluginFrom2Nix {
+    pname = "falcon";
+    version = "2020-03-02";
+    src = fetchFromGitHub {
+      owner = "fenetikm";
+      repo = "falcon";
+      rev = "b7ef5d0e1b15ce007ecf6adb94270c0d3468d90e";
+      sha256 = "1dcf6ic74r1lg0a3zqhfp1wk2f7j8nsykfvrk2d0j7waj2xsni4v";
+    };
+  };
+
+  far-vim = buildVimPluginFrom2Nix {
+    pname = "far-vim";
+    version = "2020-03-09";
+    src = fetchFromGitHub {
+      owner = "brooth";
+      repo = "far.vim";
+      rev = "2a8a9c22237d224f2c24680901b61b6f9bffb061";
+      sha256 = "0hk2p10cx36dz6vf22v4hx3shkkhqhkmxp6s1l517kkchh98m4bg";
+    };
+  };
+
+  fastfold = buildVimPluginFrom2Nix {
+    pname = "fastfold";
+    version = "2020-03-23";
+    src = fetchFromGitHub {
+      owner = "konfekt";
+      repo = "fastfold";
+      rev = "5872cbe9d921eb3ec79dce14a1f492f44c1cbaaf";
+      sha256 = "07mls0yczg2cmia2jn0s2rvgwl07yxlm4hyvjd941p1knvn88x8q";
+    };
+  };
+
+  ferret = buildVimPluginFrom2Nix {
+    pname = "ferret";
+    version = "2020-02-09";
+    src = fetchFromGitHub {
+      owner = "wincent";
+      repo = "ferret";
+      rev = "24633d3047eb93013743b28b0ea735783c7850d9";
+      sha256 = "06c3x3fqks30rzkj7z28qsgx9fcghz86ajc0cx3aai69xhgdipb5";
+    };
+  };
+
+  file-line = buildVimPluginFrom2Nix {
+    pname = "file-line";
+    version = "2016-10-21";
+    src = fetchFromGitHub {
+      owner = "bogado";
+      repo = "file-line";
+      rev = "559088afaf10124ea663ee0f4f73b1de48fb1632";
+      sha256 = "1w183g0hj8jvzm6m1jw7m6xz3x1dld8n8342vnycsh6hyzdcg3mg";
+    };
+  };
+
+  flake8-vim = buildVimPluginFrom2Nix {
+    pname = "flake8-vim";
+    version = "2017-02-17";
+    src = fetchFromGitHub {
+      owner = "andviro";
+      repo = "flake8-vim";
+      rev = "01c4af4c68f33b2b3785314bfbf5b3d8d1451795";
+      sha256 = "14rv0p1vx4njlplkc72gz7r8sy9vc6n8x9l00zc777x5zzrhgz3g";
+      fetchSubmodules = true;
+    };
+  };
+
+  float-preview-nvim = buildVimPluginFrom2Nix {
+    pname = "float-preview-nvim";
+    version = "2020-02-29";
+    src = fetchFromGitHub {
+      owner = "ncm2";
+      repo = "float-preview.nvim";
+      rev = "cbc23a28e8ea92d7c8dc22e727a62d42ef65086a";
+      sha256 = "1qv05qv89sbh1cafl2597lj95yv8yxpxm3sxbbclrls1962f7hgy";
+    };
+  };
+
+  floobits-neovim = buildVimPluginFrom2Nix {
+    pname = "floobits-neovim";
+    version = "2018-08-01";
+    src = fetchFromGitHub {
+      owner = "floobits";
+      repo = "floobits-neovim";
+      rev = "29ab2ed4bd5c879df0bd6df313a776155eb98ad8";
+      sha256 = "0bnncn3waw9birpd51j27hrzlriz8dk4naxdajmbwznwcnbkkgwx";
+    };
+  };
+
+  forms = buildVimPluginFrom2Nix {
+    pname = "forms";
+    version = "2012-11-28";
+    src = fetchFromGitHub {
+      owner = "megaannum";
+      repo = "forms";
+      rev = "b601e03fe0a3b8a43766231f4a6217e4492b4f75";
+      sha256 = "19kp1i5c6jmnpbsap9giayqbzlv7vh02mp4mjvicqj9n0nfyay74";
+    };
+  };
+
+  fugitive-gitlab-vim = buildVimPluginFrom2Nix {
+    pname = "fugitive-gitlab-vim";
+    version = "2019-10-24";
+    src = fetchFromGitHub {
+      owner = "shumphrey";
+      repo = "fugitive-gitlab.vim";
+      rev = "f3e56ff60fe3fb5ebc891cbe5fd12cd8c59ae6ef";
+      sha256 = "0cx3zd7f09prxjfrj201139j00wsw66fx5crw6dhblf4z6mfpgnx";
+    };
+  };
+
+  fzf-vim = buildVimPluginFrom2Nix {
+    pname = "fzf-vim";
+    version = "2020-04-09";
+    src = fetchFromGitHub {
+      owner = "junegunn";
+      repo = "fzf.vim";
+      rev = "f86ef1bce602713fe0b5b68f4bdca8c6943ecb59";
+      sha256 = "0h3mlc4lvnlzg7pfrr09vrfn93lglzfp5ca6bl4jhsi63xw7x3ad";
+    };
+  };
+
+  gen_tags-vim = buildVimPluginFrom2Nix {
+    pname = "gen_tags-vim";
+    version = "2019-06-28";
+    src = fetchFromGitHub {
+      owner = "jsfaint";
+      repo = "gen_tags.vim";
+      rev = "208cd0490547bc8f7615eea1b26e4635d2e60a96";
+      sha256 = "00s1kxi1bsvz06z7x78kls0k6ncnbqdyz14fvdxxq82f6s1kdvdw";
+    };
+  };
+
+  gentoo-syntax = buildVimPluginFrom2Nix {
+    pname = "gentoo-syntax";
+    version = "2020-03-08";
+    src = fetchFromGitHub {
+      owner = "gentoo";
+      repo = "gentoo-syntax";
+      rev = "42163237b57c56de9a24fe6549e46c805fab2bb3";
+      sha256 = "1bg3ismjlp99drsfyrkjb137ypxmp0qpy8pp9ry9i8ljmnffbgal";
+    };
+  };
+
+  ghcid = buildVimPluginFrom2Nix {
+    pname = "ghcid";
+    version = "2020-04-12";
+    src = fetchFromGitHub {
+      owner = "ndmitchell";
+      repo = "ghcid";
+      rev = "54553c5c915856d389a071aae5a2dba827727b7d";
+      sha256 = "0dpwvyf3vrrdiy0w2hplf656c8b1yqlcv495r7bz9ksbyqhsp70f";
+    };
+  };
+
+  ghcmod-vim = buildVimPluginFrom2Nix {
+    pname = "ghcmod-vim";
+    version = "2016-06-19";
+    src = fetchFromGitHub {
+      owner = "eagletmt";
+      repo = "ghcmod-vim";
+      rev = "1d192d13d68ab59f9f46497a0909bf24a7b7dfff";
+      sha256 = "0bzahgzagnf0a9zv86jhdf8nc3p0yfz9izv5n3lc8gc12cp47d0a";
+    };
+  };
+
+  gitignore-vim = buildVimPluginFrom2Nix {
+    pname = "gitignore-vim";
+    version = "2014-03-16";
+    src = fetchFromGitHub {
+      owner = "vim-scripts";
+      repo = "gitignore.vim";
+      rev = "3ad6a15768945fd4fc1b013cec5d8c8e62c7bb87";
+      sha256 = "0fg36hrkwqb3accqm7ihw1cjs64fxf73zk06gickdkzq0zn4yl8x";
+    };
+  };
+
+  gitv = buildVimPluginFrom2Nix {
+    pname = "gitv";
+    version = "2019-08-22";
+    src = fetchFromGitHub {
+      owner = "gregsexton";
+      repo = "gitv";
+      rev = "a73599c34202709eaa7da78f4fe32b97c6ef83f8";
+      sha256 = "0hhamv2q3z8cy4n9yzxq0jvs2x8qx4wx6c2qpsk82jsnghmzipd6";
+    };
+  };
+
+  goyo-vim = buildVimPluginFrom2Nix {
+    pname = "goyo-vim";
+    version = "2019-06-13";
+    src = fetchFromGitHub {
+      owner = "junegunn";
+      repo = "goyo.vim";
+      rev = "6b6ed2734084fdbb6315357ddcaecf9c8e6f143d";
+      sha256 = "1ywlz1hn54kxyp5q0angriaarimq7ys7m6sk6l4x8jr1g2yh0afz";
+    };
+  };
+
+  gruvbox = buildVimPluginFrom2Nix {
+    pname = "gruvbox";
+    version = "2020-02-23";
+    src = fetchFromGitHub {
+      owner = "morhetz";
+      repo = "gruvbox";
+      rev = "040138616bec342d5ea94d4db296f8ddca17007a";
+      sha256 = "0qk2mqs04qlxkc1ldgjbiv1yisi2xl2b8svmjz0hdp9y2l5vfccw";
+    };
+  };
+
+  gruvbox-community = buildVimPluginFrom2Nix {
+    pname = "gruvbox-community";
+    version = "2020-02-24";
+    src = fetchFromGitHub {
+      owner = "gruvbox-community";
+      repo = "gruvbox";
+      rev = "f5711c15480b83378bde13306fa997057c0c81cd";
+      sha256 = "0vx289a7av31dxm58c6kmfdnsrwnq1rzj5rwci2pqjdac8ds2qm0";
+    };
+  };
+
+  gundo-vim = buildVimPluginFrom2Nix {
+    pname = "gundo-vim";
+    version = "2020-01-15";
+    src = fetchFromGitHub {
+      owner = "sjl";
+      repo = "gundo.vim";
+      rev = "99e6240340d9ba07b66c544daf44fa7caffbf7e7";
+      sha256 = "0py35mmwnfl581isnbh33j3bjgghq17jnamdi1bg3akwyn1jyhqb";
+    };
+  };
+
+  gv-vim = buildVimPluginFrom2Nix {
+    pname = "gv-vim";
+    version = "2020-01-27";
+    src = fetchFromGitHub {
+      owner = "junegunn";
+      repo = "gv.vim";
+      rev = "72dc64df998355b41a75ebfa32adfd08ed5c5819";
+      sha256 = "01g4rnsh2n691n9a6gqhyzivr4mzlgz3i2mwb7vxpkp61yf755bb";
+    };
+  };
+
+  haskell-vim = buildVimPluginFrom2Nix {
+    pname = "haskell-vim";
+    version = "2018-05-22";
+    src = fetchFromGitHub {
+      owner = "neovimhaskell";
+      repo = "haskell-vim";
+      rev = "b1ac46807835423c4a4dd063df6d5b613d89c731";
+      sha256 = "1vqj3r2v8skffywwgv4093ww7fm540437j5qz7n8q8787bs5w0br";
+    };
+  };
+
+  hasksyn = buildVimPluginFrom2Nix {
+    pname = "hasksyn";
+    version = "2014-09-04";
+    src = fetchFromGitHub {
+      owner = "travitch";
+      repo = "hasksyn";
+      rev = "c434040bf13a17ca20a551223021b3ace7e453b9";
+      sha256 = "09998lnfcshqis5m062wlag6y476imq9jday9gp4ayjjl1cp3cwx";
+    };
+  };
+
+  hlint-refactor-vim = buildVimPluginFrom2Nix {
+    pname = "hlint-refactor-vim";
+    version = "2015-12-05";
+    src = fetchFromGitHub {
+      owner = "mpickering";
+      repo = "hlint-refactor-vim";
+      rev = "fffb044ecef854a82c5c2efda252e09044ba03e0";
+      sha256 = "0z8d31arfy9aidg1dwj5msnnx799d9r7njkgh51z695w6ayxn6p8";
+    };
+  };
+
+  iceberg-vim = buildVimPluginFrom2Nix {
+    pname = "iceberg-vim";
+    version = "2020-03-06";
+    src = fetchFromGitHub {
+      owner = "cocopon";
+      repo = "iceberg.vim";
+      rev = "1740235846c92666fe521e550a27fa47ebe5f5a3";
+      sha256 = "13zf899kgwjhrksznz2212ywml7nnqwq2dyam39nzywf8msg8va6";
+    };
+  };
+
+  idris-vim = buildVimPluginFrom2Nix {
+    pname = "idris-vim";
+    version = "2017-12-04";
+    src = fetchFromGitHub {
+      owner = "idris-hackers";
+      repo = "idris-vim";
+      rev = "091ed6b267749927777423160eeab520109dd9c1";
+      sha256 = "1zibar2vxcmai0k37ricwnimfdv1adxfbbvz871rc4l6h3q85if1";
+    };
+  };
+
+  Improved-AnsiEsc = buildVimPluginFrom2Nix {
+    pname = "Improved-AnsiEsc";
+    version = "2015-08-26";
+    src = fetchFromGitHub {
+      owner = "vim-scripts";
+      repo = "Improved-AnsiEsc";
+      rev = "e1c59a8e9203fab6b9150721f30548916da73351";
+      sha256 = "1smjs4kz2kmzprzp9az4957675nakb43146hshbby39j5xz4jsbz";
+    };
+  };
+
+  increment-activator = buildVimPluginFrom2Nix {
+    pname = "increment-activator";
+    version = "2020-03-09";
+    src = fetchFromGitHub {
+      owner = "nishigori";
+      repo = "increment-activator";
+      rev = "bff5516da9103fb093ffc0dc993b8d535eacbceb";
+      sha256 = "1swlv1mrck9s3n7fdg10c2nmlasf2fx8yfk01x3vii7l4aaa9w2y";
+    };
+  };
+
+  incsearch-easymotion-vim = buildVimPluginFrom2Nix {
+    pname = "incsearch-easymotion-vim";
+    version = "2016-01-18";
+    src = fetchFromGitHub {
+      owner = "haya14busa";
+      repo = "incsearch-easymotion.vim";
+      rev = "fcdd3aee6f4c0eef1a515727199ece8d6c6041b5";
+      sha256 = "1bscr3xs1zggm9qzk1mb88fkc8qj6yrnkxmqwwyr75sf1xzy74mk";
+    };
+  };
+
+  incsearch-vim = buildVimPluginFrom2Nix {
+    pname = "incsearch-vim";
+    version = "2017-11-24";
+    src = fetchFromGitHub {
+      owner = "haya14busa";
+      repo = "incsearch.vim";
+      rev = "25e2547fb0566460f5999024f7a0de7b3775201f";
+      sha256 = "05v0d9b5sm4d1bvhb01jk6s7brlli2xc16hvzr6gik1nm1ks6ai1";
+    };
+  };
+
+  indentLine = buildVimPluginFrom2Nix {
+    pname = "indentLine";
+    version = "2020-03-06";
+    src = fetchFromGitHub {
+      owner = "Yggdroot";
+      repo = "indentLine";
+      rev = "15aceda8c4eea621b66faa8673fca0b9fbe2f457";
+      sha256 = "1icb1h811lp86hg4w8y8mmmsfm4c80n7m8r1wi58lnm60mjasas4";
+    };
+  };
+
+  intero-neovim = buildVimPluginFrom2Nix {
+    pname = "intero-neovim";
+    version = "2019-11-15";
+    src = fetchFromGitHub {
+      owner = "parsonsmatt";
+      repo = "intero-neovim";
+      rev = "4ce2d154379f8c95b3819512a9b67ead5204ffd0";
+      sha256 = "1na61qb31z80973jfi7ziw2zv6y73rm0bpfb6iqxjppmg4iqgl3i";
+    };
+  };
+
+  iosvkem = buildVimPluginFrom2Nix {
+    pname = "iosvkem";
+    version = "2020-01-18";
+    src = fetchFromGitHub {
+      owner = "neutaaaaan";
+      repo = "iosvkem";
+      rev = "08e36b649c83eece7edbd2e04e42e077aebc78eb";
+      sha256 = "0jawl7fs6wl3ny9vsmzqv5pnkv5nn6wj1nx7hzgdl41183958pni";
+    };
+  };
+
+  ir_black = buildVimPluginFrom2Nix {
+    pname = "ir_black";
+    version = "2012-03-05";
+    src = fetchFromGitHub {
+      owner = "twerth";
+      repo = "ir_black";
+      rev = "4e45f1cbcc9c04cf32c8681c6b3b4534a33610ed";
+      sha256 = "13g9nqlqsjsxnrq37y33ldh41dw9q9dw07spfi7qwrskiwa0ayk7";
+    };
+  };
+
+  jdaddy-vim = buildVimPluginFrom2Nix {
+    pname = "jdaddy-vim";
+    version = "2014-02-22";
+    src = fetchFromGitHub {
+      owner = "vim-scripts";
+      repo = "jdaddy.vim";
+      rev = "3e44c2e6d22e2d6fc94863379b5b4f5424537321";
+      sha256 = "1ch12bffrs3gqqzdj9vh0i2azhc5d06i5vwds4rqcx797lqh7pzb";
+    };
+  };
+
+  jedi-vim = buildVimPluginFrom2Nix {
+    pname = "jedi-vim";
+    version = "2020-03-07";
+    src = fetchFromGitHub {
+      owner = "davidhalter";
+      repo = "jedi-vim";
+      rev = "e83112f9aab147ab485ee7af72e01d047c5206d3";
+      sha256 = "0yj1bsfn43crmfn0ylyzyz41z0vmvapl5cgm7k1rnbj96i7vifx7";
+      fetchSubmodules = true;
+    };
+  };
+
+  jellybeans-vim = buildVimPluginFrom2Nix {
+    pname = "jellybeans-vim";
+    version = "2019-06-22";
+    src = fetchFromGitHub {
+      owner = "nanotech";
+      repo = "jellybeans.vim";
+      rev = "ef83bf4dc8b3eacffc97bf5c96ab2581b415c9fa";
+      sha256 = "1zy3gjz5bna3l5a7k2ddqa0w7x8wbndy2vc9gmqfdsxdbhrgpvaz";
+    };
+  };
+
+  Jenkinsfile-vim-syntax = buildVimPluginFrom2Nix {
+    pname = "Jenkinsfile-vim-syntax";
+    version = "2019-12-31";
+    src = fetchFromGitHub {
+      owner = "martinda";
+      repo = "Jenkinsfile-vim-syntax";
+      rev = "164b457d87b65c6ca9e5998b69c6cd24248f62ac";
+      sha256 = "14s26hlsdqys7br84l9wiyvhcy17s6966mhgr9n6sdqmhz6lc4nm";
+    };
+  };
+
+  jq-vim = buildVimPluginFrom2Nix {
+    pname = "jq-vim";
+    version = "2019-05-21";
+    src = fetchFromGitHub {
+      owner = "vito-c";
+      repo = "jq.vim";
+      rev = "6e056fa297ce58d45500b0937b8214400e9a50fa";
+      sha256 = "0dfsym34xiza9221bdsr51jykcxmz8bnkzi846bqxxjxiw0p3yk1";
+    };
+  };
+
+  julia-vim = buildVimPluginFrom2Nix {
+    pname = "julia-vim";
+    version = "2020-03-11";
+    src = fetchFromGitHub {
+      owner = "JuliaEditorSupport";
+      repo = "julia-vim";
+      rev = "8ea33c2e5c3dd5cc82b2a86a9f7c97b8219aeb9c";
+      sha256 = "0i7n5fs0a717il71yny8dsrvyyskj9cahg1wnx8nrkyn3x06myhh";
+    };
+  };
+
+  kotlin-vim = buildVimPluginFrom2Nix {
+    pname = "kotlin-vim";
+    version = "2019-05-26";
+    src = fetchFromGitHub {
+      owner = "udalov";
+      repo = "kotlin-vim";
+      rev = "b9fa728701a0aa0b9a2ffe92f10880348fc27a8f";
+      sha256 = "1yqzxabhpc4jbdlzhsysp0vi1ayqg0vnpysvx4ynd9961q2fk3sz";
+    };
+  };
+
+  lalrpop-vim = buildVimPluginFrom2Nix {
+    pname = "lalrpop-vim";
+    version = "2017-11-22";
+    src = fetchFromGitHub {
+      owner = "qnighy";
+      repo = "lalrpop.vim";
+      rev = "7073eec8efdeff37cacd4bca378c28dad02c3c14";
+      sha256 = "1xx6hlgrdbnk3d6rsn4jzbaqwankvnnmj4iilakaazddfaa0l6rr";
+    };
+  };
+
+  LanguageClient-neovim = buildVimPluginFrom2Nix {
+    pname = "LanguageClient-neovim";
+    version = "2018-08-07";
+    src = fetchFromGitHub {
+      owner = "autozimu";
+      repo = "LanguageClient-neovim";
+      rev = "dd45e31449511152f2127fe862d955237caa130f";
+      sha256 = "1i1c98r9fg1mzyl15b3grk6v7s7frwadh86rr1ggz7aq1gwfy7dq";
+    };
+  };
+
+  last256 = buildVimPluginFrom2Nix {
+    pname = "last256";
+    version = "2017-06-10";
+    src = fetchFromGitHub {
+      owner = "sk1418";
+      repo = "last256";
+      rev = "d29320c1fe715b47edaa1be068201ea5a54ab0c0";
+      sha256 = "16njh0p1j166dnf92110vlrj7gmrbsfkbkd8k6s9gfqjzbgd25jv";
+    };
+  };
+
+  latex-box = buildVimPluginFrom2Nix {
+    pname = "latex-box";
+    version = "2015-06-01";
+    src = fetchFromGitHub {
+      owner = "latex-box-team";
+      repo = "latex-box";
+      rev = "3c2901e12cb78bfb2be58ba4c62a488612550fe1";
+      sha256 = "1z4mdy47cpwcdhvy8mr72vhlybxn1y59yd3ixf6ids1bzpkrd7zl";
+    };
+  };
+
+  lean-vim = buildVimPluginFrom2Nix {
+    pname = "lean-vim";
+    version = "2019-10-04";
+    src = fetchFromGitHub {
+      owner = "leanprover";
+      repo = "lean.vim";
+      rev = "2ace010eb32603a65af7921954a0594a02523c6b";
+      sha256 = "0wq2lw4xx2qhz1xii9g7i6wz0y43b2icqrm6ypr9jmaac1rhiq7c";
+    };
+  };
+
+  lessspace-vim = buildVimPluginFrom2Nix {
+    pname = "lessspace-vim";
+    version = "2019-09-12";
+    src = fetchFromGitHub {
+      owner = "thirtythreeforty";
+      repo = "lessspace.vim";
+      rev = "dc05cf6c3b67e3f8c87da2e565c5524872526316";
+      sha256 = "154x6i2ncmcbc3snkzdcggq5m5zvlbjyry5lvr6n4qcvf65z5z44";
+    };
+  };
+
+  lexima-vim = buildVimPluginFrom2Nix {
+    pname = "lexima-vim";
+    version = "2019-07-22";
+    src = fetchFromGitHub {
+      owner = "cohama";
+      repo = "lexima.vim";
+      rev = "aa32e972b69230625989daa09ee5fd74a2d877ef";
+      sha256 = "15cc09vb0yrasz76qkcqxhj95y1m6yrsx3wsn6khx39kp1bas0jd";
+    };
+  };
+
+  lf-vim = buildVimPluginFrom2Nix {
+    pname = "lf-vim";
+    version = "2019-10-11";
+    src = fetchFromGitHub {
+      owner = "ptzz";
+      repo = "lf.vim";
+      rev = "8ffbae128b8887283b2d4b3a660e5be0de58ea0c";
+      sha256 = "0gzj9h31f4synjqfv8dhqihr6fgi3ar06xqjjl5fb4269p9964lb";
+    };
+  };
+
+  lh-brackets = buildVimPluginFrom2Nix {
+    pname = "lh-brackets";
+    version = "2020-03-02";
+    src = fetchFromGitHub {
+      owner = "LucHermitte";
+      repo = "lh-brackets";
+      rev = "dc91bb1e8ef45a0810d9c1ad412863977c8c4baf";
+      sha256 = "1yjmykn92i54cajr5wrj7m0wvaigy106c3hm8ks30xn4zm970x03";
+    };
+  };
+
+  lh-vim-lib = buildVimPluginFrom2Nix {
+    pname = "lh-vim-lib";
+    version = "2020-03-06";
+    src = fetchFromGitHub {
+      owner = "LucHermitte";
+      repo = "lh-vim-lib";
+      rev = "3a8383f2efbd7496c17a70bf4593773f6149435f";
+      sha256 = "0c6gnksyjyvsxqbp13q8bp9j4cg9x9m0kzrkx01p9k6wq297kpd9";
+    };
+  };
+
+  lightline-ale = buildVimPluginFrom2Nix {
+    pname = "lightline-ale";
+    version = "2020-01-18";
+    src = fetchFromGitHub {
+      owner = "maximbaz";
+      repo = "lightline-ale";
+      rev = "a1931d473d6600ccf7e426158b79c9df29463dda";
+      sha256 = "1zmwi4b8sbl3zpzp8hlz7j3gg4p9628s0174pcd2n6mdkfh235g5";
+    };
+  };
+
+  lightline-bufferline = buildVimPluginFrom2Nix {
+    pname = "lightline-bufferline";
+    version = "2020-02-14";
+    src = fetchFromGitHub {
+      owner = "mengelbrecht";
+      repo = "lightline-bufferline";
+      rev = "17683bc5802de7f295f2583a15461e2bc662f98b";
+      sha256 = "1rlamxwk2gm9pyxl9vym9w6rhgimzqa2hjghy3qdqwvif6w8ir6l";
+    };
+  };
+
+  lightline-vim = buildVimPluginFrom2Nix {
+    pname = "lightline-vim";
+    version = "2020-04-06";
+    src = fetchFromGitHub {
+      owner = "itchyny";
+      repo = "lightline.vim";
+      rev = "b8976d2e549b417e5d1c1594fb9034b749976cc0";
+      sha256 = "1w86bg63qvigdva1g8w4lba63ghlsxfbjb0rqsxyxg6w7m9k6lhd";
+    };
+  };
+
+  limelight-vim = buildVimPluginFrom2Nix {
+    pname = "limelight-vim";
+    version = "2019-07-09";
+    src = fetchFromGitHub {
+      owner = "junegunn";
+      repo = "limelight.vim";
+      rev = "26e913a2e061195245bc62d24009ab67143a3c32";
+      sha256 = "0bxmihv9i96k6pl37pzgri03vbvjwlp34rl4gkj8w2ajhhi6nsnn";
+    };
+  };
+
+  lushtags = buildVimPluginFrom2Nix {
+    pname = "lushtags";
+    version = "2017-04-19";
+    src = fetchFromGitHub {
+      owner = "mkasa";
+      repo = "lushtags";
+      rev = "fd7fa5a0162d9aa159559880d5ba4731e180eeaf";
+      sha256 = "03saw1w5pybj6yywzi8hinciv18znimm7k0h34k4pqp5gi1jfaql";
+    };
+  };
+
+  matchit-zip = buildVimPluginFrom2Nix {
+    pname = "matchit-zip";
+    version = "2010-10-18";
+    src = fetchFromGitHub {
+      owner = "vim-scripts";
+      repo = "matchit.zip";
+      rev = "ced6c409c9beeb0b4142d21906606bd194411d1d";
+      sha256 = "1s9c4lnsmbfm97bp22jrmcp5lga5ihx23lzqqncvv7rcizkvr3dm";
+    };
+  };
+
+  mattn-calendar-vim = buildVimPluginFrom2Nix {
+    pname = "mattn-calendar-vim";
+    version = "2019-11-24";
+    src = fetchFromGitHub {
+      owner = "mattn";
+      repo = "calendar-vim";
+      rev = "de499b9525490b10edbd28fb8f0c4e81c6a6f20c";
+      sha256 = "0xvvkq9zckmv9pnzvxg71fblly8lksfi736brbcwcvnszqif4b69";
+    };
+  };
+
+  mayansmoke = buildVimPluginFrom2Nix {
+    pname = "mayansmoke";
+    version = "2010-10-18";
+    src = fetchFromGitHub {
+      owner = "vim-scripts";
+      repo = "mayansmoke";
+      rev = "168883af7aec05f139af251f47eadd5dfb802c9d";
+      sha256 = "1xxcky7i6sx7f1q8xka4gd2xg78w6sqjvqrdwgrdzv93fhf82rpd";
+    };
+  };
+
+  molokai = buildVimPluginFrom2Nix {
+    pname = "molokai";
+    version = "2015-11-11";
+    src = fetchFromGitHub {
+      owner = "tomasr";
+      repo = "molokai";
+      rev = "c67bdfcdb31415aa0ade7f8c003261700a885476";
+      sha256 = "1piszjr5kyw43ac1f0jh9z88g824xknshrkchbys9qxlz7pd831s";
+    };
+  };
+
+  ncm2 = buildVimPluginFrom2Nix {
+    pname = "ncm2";
+    version = "2020-03-05";
+    src = fetchFromGitHub {
+      owner = "ncm2";
+      repo = "ncm2";
+      rev = "6596df4631ee1ee17351a78f382d4efd0b82c05e";
+      sha256 = "16276cjviij92ypqj9148828k4dhiywam0dz07v3rikknak11cra";
+    };
+  };
+
+  ncm2-bufword = buildVimPluginFrom2Nix {
+    pname = "ncm2-bufword";
+    version = "2019-01-19";
+    src = fetchFromGitHub {
+      owner = "ncm2";
+      repo = "ncm2-bufword";
+      rev = "1d42750114e47a31286268880affcd66c6ae48d5";
+      sha256 = "14q76n5c70wvi48wm1alyckba71rp5300i35091ga197nkgphyaz";
+    };
+  };
+
+  ncm2-jedi = buildVimPluginFrom2Nix {
+    pname = "ncm2-jedi";
+    version = "2019-11-19";
+    src = fetchFromGitHub {
+      owner = "ncm2";
+      repo = "ncm2-jedi";
+      rev = "b28bf6d054051cc1c7a6b148323d3adb9baa4ed5";
+      sha256 = "07pq8akzvlb8hzksgxx1c50j09ia0xnszq1f83x75kqsjg5f6nhy";
+    };
+  };
+
+  ncm2-path = buildVimPluginFrom2Nix {
+    pname = "ncm2-path";
+    version = "2019-02-20";
+    src = fetchFromGitHub {
+      owner = "ncm2";
+      repo = "ncm2-path";
+      rev = "84b1e6b5f28ced2245ff08e6694101f029fdfca8";
+      sha256 = "0yqga8d423k2j6iknkyx1qs1shddpshi4sx78992sa15dax9d394";
+    };
+  };
+
+  ncm2-tmux = buildVimPluginFrom2Nix {
+    pname = "ncm2-tmux";
+    version = "2019-01-11";
+    src = fetchFromGitHub {
+      owner = "ncm2";
+      repo = "ncm2-tmux";
+      rev = "17fa16ac1211af3d8e671f1591939d6f37bdd3bd";
+      sha256 = "1g99vbrdz06i36gpa95crwixj61my7c9miy7mbpfbiy4zykf2wl2";
+    };
+  };
+
+  ncm2-ultisnips = buildVimPluginFrom2Nix {
+    pname = "ncm2-ultisnips";
+    version = "2019-01-26";
+    src = fetchFromGitHub {
+      owner = "ncm2";
+      repo = "ncm2-ultisnips";
+      rev = "a7462f3b7036dce045a472d8ec9d8fb9fb090212";
+      sha256 = "0f3qp33s5nh9nha9cgxggcmh7c1a5yrwvyyrszlh0x8nrzm1v1ma";
+    };
+  };
+
+  neco-ghc = buildVimPluginFrom2Nix {
+    pname = "neco-ghc";
+    version = "2018-05-13";
+    src = fetchFromGitHub {
+      owner = "eagletmt";
+      repo = "neco-ghc";
+      rev = "682869aca5dd0bde71a09ba952acb59c543adf7d";
+      sha256 = "1v7ibi4fp99s4lswz3v0gf4i0h5i5gpj05xpsf4cixwj2zgh206h";
+    };
+  };
+
+  neco-look = buildVimPluginFrom2Nix {
+    pname = "neco-look";
+    version = "2019-11-19";
+    src = fetchFromGitHub {
+      owner = "ujihisa";
+      repo = "neco-look";
+      rev = "4d7f1fd7e406c302fba2a1358017c5a76d0f9fc1";
+      sha256 = "1brvzg15ni5j60wncpvxhs5k36wz83lhvfcnvja2l9yrngcgh6vr";
+    };
+  };
+
+  neco-syntax = buildVimPluginFrom2Nix {
+    pname = "neco-syntax";
+    version = "2019-11-10";
+    src = fetchFromGitHub {
+      owner = "Shougo";
+      repo = "neco-syntax";
+      rev = "6c3862ac82d2c917fa8b4126832de7d3a909f1fe";
+      sha256 = "1kmzlz6c5bs7f4dxgrdn4azwh55k6ghhyzy8jjdgj0wsb309y92k";
+    };
+  };
+
+  neco-vim = buildVimPluginFrom2Nix {
+    pname = "neco-vim";
+    version = "2020-04-08";
+    src = fetchFromGitHub {
+      owner = "Shougo";
+      repo = "neco-vim";
+      rev = "4fbc3f5f3a2b2d5299c388e2f1ffef04fcaf87ba";
+      sha256 = "0lk5p2aihalcarsjnvn1yidgv0xqp1bk29wywsbp8ni964s0si39";
+    };
+  };
+
+  neocomplete-vim = buildVimPluginFrom2Nix {
+    pname = "neocomplete-vim";
+    version = "2020-01-23";
+    src = fetchFromGitHub {
+      owner = "Shougo";
+      repo = "neocomplete.vim";
+      rev = "0f83788cb67e0743a3a9c8d3a3a6e52a01bdc6c2";
+      sha256 = "1ydnb576qbdbij7ipciw0m46wbj45gj7xirpmqxazgp9y6b13isf";
+    };
+  };
+
+  neodark-vim = buildVimPluginFrom2Nix {
+    pname = "neodark-vim";
+    version = "2019-12-04";
+    src = fetchFromGitHub {
+      owner = "KeitaNakamura";
+      repo = "neodark.vim";
+      rev = "44919aa0bebfa60e93e653fdd2a81d1c75c2e721";
+      sha256 = "1wz9ygfdg59jwi19l9njcxknf77azlx5nkf5q0ghk6zyv1mqwvc1";
+    };
+  };
+
+  neoformat = buildVimPluginFrom2Nix {
+    pname = "neoformat";
+    version = "2020-03-20";
+    src = fetchFromGitHub {
+      owner = "sbdchd";
+      repo = "neoformat";
+      rev = "d02b169e70bd6d2b2365bf6cda721967616a30bf";
+      sha256 = "1cya26wfqc7l7dqy854m4kwrq3w66knmn2cgviqh9cnsjzhwxs0d";
+    };
+  };
+
+  neoinclude-vim = buildVimPluginFrom2Nix {
+    pname = "neoinclude-vim";
+    version = "2019-05-11";
+    src = fetchFromGitHub {
+      owner = "Shougo";
+      repo = "neoinclude.vim";
+      rev = "5125e73de0a8b4f2c399e4896e21be1b8f7b3d39";
+      sha256 = "0qw63xyvrxvdzx01k5nnsv3p8zmnd77cwbkk24pikqrscxw3ypsz";
+    };
+  };
+
+  neomake = buildVimPluginFrom2Nix {
+    pname = "neomake";
+    version = "2020-04-09";
+    src = fetchFromGitHub {
+      owner = "neomake";
+      repo = "neomake";
+      rev = "d10e53956161176c7f8a1ef2899880d5384f47b0";
+      sha256 = "0zv27bln0n687s0xm19nrk16i58hmxdhy26jmjh335zji0ydx27v";
+    };
+  };
+
+  neomru-vim = buildVimPluginFrom2Nix {
+    pname = "neomru-vim";
+    version = "2020-02-05";
+    src = fetchFromGitHub {
+      owner = "Shougo";
+      repo = "neomru.vim";
+      rev = "d9b92f73f7d9158e803d72f2baeb7da9ea30040e";
+      sha256 = "04fic8s4g19kgml1pb5fd6yzhsscq8yrpwbmg8sb0lqjas2qpakv";
+    };
+  };
+
+  neosnippet-snippets = buildVimPluginFrom2Nix {
+    pname = "neosnippet-snippets";
+    version = "2020-03-25";
+    src = fetchFromGitHub {
+      owner = "Shougo";
+      repo = "neosnippet-snippets";
+      rev = "2e72985f712f0d5cb707beba151555a1f0003630";
+      sha256 = "1lvm37q9zq4a077f2zm9dfp8zfg5d3853bmlih6sc8d6i477kcmb";
+    };
+  };
+
+  neosnippet-vim = buildVimPluginFrom2Nix {
+    pname = "neosnippet-vim";
+    version = "2020-04-02";
+    src = fetchFromGitHub {
+      owner = "Shougo";
+      repo = "neosnippet.vim";
+      rev = "3aaf5e763410f57916227da407fd90726e19a612";
+      sha256 = "0zkw2q2s7756p4xgf49v4lj8lrzw35x81h1wzia7d9k92d7ivwca";
+    };
+  };
+
+  NeoSolarized = buildVimPluginFrom2Nix {
+    pname = "NeoSolarized";
+    version = "2020-03-10";
+    src = fetchFromGitHub {
+      owner = "icymind";
+      repo = "NeoSolarized";
+      rev = "70609c44215c8d2c43ad8c631296caae08a9c8d4";
+      sha256 = "0bxrm2vm3z1y37sm6m2hdn72g2sw31dx1xhmjvd0ng72cnp84d9k";
+    };
+  };
+
+  neoterm = buildVimPluginFrom2Nix {
+    pname = "neoterm";
+    version = "2020-04-12";
+    src = fetchFromGitHub {
+      owner = "kassio";
+      repo = "neoterm";
+      rev = "964745a9a8c2a61b876f3082fedcb321c415ab5e";
+      sha256 = "0pmim51nj2c4njp5b9wihmg208chwc1vrq83ccff0hbmdc1djr60";
+    };
+  };
+
+  neovim-fuzzy = buildVimPluginFrom2Nix {
+    pname = "neovim-fuzzy";
+    version = "2019-11-14";
+    src = fetchFromGitHub {
+      owner = "cloudhead";
+      repo = "neovim-fuzzy";
+      rev = "53383395befafce802c902c21b54847074454491";
+      sha256 = "064qi6zv2hrzn91pvr31b9zj2q0k9vbkk5csdhw5y52q26p1gakq";
+    };
+  };
+
+  neovim-sensible = buildVimPluginFrom2Nix {
+    pname = "neovim-sensible";
+    version = "2017-09-20";
+    src = fetchFromGitHub {
+      owner = "jeffkreeftmeijer";
+      repo = "neovim-sensible";
+      rev = "e7ab7544f15e59de2d9a1b42f58e590938e496e7";
+      sha256 = "06whnfvmzfdsx9gvkd2nxhx29939gjzibr2xadh54sj8ns646w58";
+    };
+  };
+
+  neoyank-vim = buildVimPluginFrom2Nix {
+    pname = "neoyank-vim";
+    version = "2019-12-11";
+    src = fetchFromGitHub {
+      owner = "Shougo";
+      repo = "neoyank.vim";
+      rev = "1829c6e426f829edea46660d0db08d4488010fcd";
+      sha256 = "1y6fvxqpj3rwf1fmjib177lqzh3z7syp7bccn79g1j8177m515w6";
+    };
+  };
+
+  nerdcommenter = buildVimPluginFrom2Nix {
+    pname = "nerdcommenter";
+    version = "2020-02-19";
+    src = fetchFromGitHub {
+      owner = "preservim";
+      repo = "nerdcommenter";
+      rev = "c62e618a1ab5a50a4028e3296500ba29d9b033d8";
+      sha256 = "0w4bxj423dxxkcxnfmipf8x5jfm058rq4g3m98wzcz5zbambv3qs";
+    };
+  };
+
+  nerdtree = buildVimPluginFrom2Nix {
+    pname = "nerdtree";
+    version = "2020-04-10";
+    src = fetchFromGitHub {
+      owner = "preservim";
+      repo = "nerdtree";
+      rev = "f767dd34a0bda0a6db8efa43257c90981947f0ab";
+      sha256 = "0m02yxs235jznf2y1hr6zj04fb3igra4lb8crgl3slsvdw3zndb1";
+    };
+  };
+
+  nerdtree-git-plugin = buildVimPluginFrom2Nix {
+    pname = "nerdtree-git-plugin";
+    version = "2019-01-09";
+    src = fetchFromGitHub {
+      owner = "albfan";
+      repo = "nerdtree-git-plugin";
+      rev = "95e20577cd442ad6256aff9bb2e9c80db05c13f0";
+      sha256 = "15i66mxvygs6xa2jvk7bqdagxx1lcvynmyb9g75whgbv7is80qn7";
+    };
+  };
+
+  nim-vim = buildVimPluginFrom2Nix {
+    pname = "nim-vim";
+    version = "2019-04-26";
+    src = fetchFromGitHub {
+      owner = "zah";
+      repo = "nim.vim";
+      rev = "88f5e708a739fb26be6364ab2fabadf9fffb8d7b";
+      sha256 = "0ja8qx9c5g7k4phllvk3vz6s62iwpwsn40w6c32sybjs98jkrw7y";
+    };
+  };
+
+  nord-vim = buildVimPluginFrom2Nix {
+    pname = "nord-vim";
+    version = "2019-12-17";
+    src = fetchFromGitHub {
+      owner = "arcticicestudio";
+      repo = "nord-vim";
+      rev = "f06189a4c054fe8c22e46aca4d451e03456f2283";
+      sha256 = "0gk4zq0gz3nnwfkldswg9bjpk0gf6d6mgfzcgvj0pnlbja6ass81";
+    };
+  };
+
+  NrrwRgn = buildVimPluginFrom2Nix {
+    pname = "NrrwRgn";
+    version = "2020-03-27";
+    src = fetchFromGitHub {
+      owner = "chrisbra";
+      repo = "NrrwRgn";
+      rev = "f8b5c3c649fc12dd1181564f29ebc6c51e231126";
+      sha256 = "1xh2ds1y5gj07ycw3b5lw7av92q39wwrq13mz8j37jmnhw0ppbl4";
+    };
+  };
+
+  nvim-cm-racer = buildVimPluginFrom2Nix {
+    pname = "nvim-cm-racer";
+    version = "2017-07-27";
+    src = fetchFromGitHub {
+      owner = "roxma";
+      repo = "nvim-cm-racer";
+      rev = "2a8a4a49fa58c5dac9e0bed9511f6928930cacd2";
+      sha256 = "1yljxwypgn91084yyicbc2qprn31ld7s4drvnddzczyhzq5m2gpx";
+    };
+  };
+
+  nvim-completion-manager = buildVimPluginFrom2Nix {
+    pname = "nvim-completion-manager";
+    version = "2018-07-27";
+    src = fetchFromGitHub {
+      owner = "roxma";
+      repo = "nvim-completion-manager";
+      rev = "45a026afb8b309b3b80f2c1b5910f72a54a9b563";
+      sha256 = "0znwgry4ill0nxm096hc8s9vf20rf9xcq3dz8y8h7xlqzzsycl7a";
+    };
+  };
+
+  nvim-gdb = buildVimPluginFrom2Nix {
+    pname = "nvim-gdb";
+    version = "2020-03-17";
+    src = fetchFromGitHub {
+      owner = "sakhnik";
+      repo = "nvim-gdb";
+      rev = "9ea1cd2cd110a8efa40dc893036596b39f979a7a";
+      sha256 = "10qcs59r27fkzk0pg90gywbrz7y7b4hvavbws5kx6fjx3h2mbfsh";
+    };
+  };
+
+  nvim-hs-vim = buildVimPluginFrom2Nix {
+    pname = "nvim-hs-vim";
+    version = "2019-04-14";
+    src = fetchFromGitHub {
+      owner = "neovimhaskell";
+      repo = "nvim-hs.vim";
+      rev = "5bc177a87c9575c4995df90a098d330fe6e02f75";
+      sha256 = "14jgvkvakpy36md5si2a3rf2w869snb65inriq68xbk32bg5pg8q";
+    };
+  };
+
+  nvim-lsp = buildVimPluginFrom2Nix {
+    pname = "nvim-lsp";
+    version = "2020-04-10";
+    src = fetchFromGitHub {
+      owner = "neovim";
+      repo = "nvim-lsp";
+      rev = "b6dc2ae6a95051e93486224481b80cb5b446dcc3";
+      sha256 = "0nc47nig0bvbp3m246gjv06a32ysz20nmxs6pzga1klzm4mim5vl";
+    };
+  };
+
+  nvim-terminal-lua = buildVimPluginFrom2Nix {
+    pname = "nvim-terminal-lua";
+    version = "2019-10-17";
+    src = fetchFromGitHub {
+      owner = "norcalli";
+      repo = "nvim-terminal.lua";
+      rev = "095f98aaa7265628a72cd2706350c091544b5602";
+      sha256 = "09hass19v3wrqgxjcr3b59w462lp2nw533zwb1nnmiz99gx1znpx";
+    };
+  };
+
+  nvim-yarp = buildVimPluginFrom2Nix {
+    pname = "nvim-yarp";
+    version = "2020-04-08";
+    src = fetchFromGitHub {
+      owner = "roxma";
+      repo = "nvim-yarp";
+      rev = "b710bf4daccb603a423754794fb446e5fbb59576";
+      sha256 = "16ma42niwsc066s991idfbwvm0dvwqwdr2zfkc3av10hyimxnzbb";
+    };
+  };
+
+  nvimdev-nvim = buildVimPluginFrom2Nix {
+    pname = "nvimdev-nvim";
+    version = "2019-10-09";
+    src = fetchFromGitHub {
+      owner = "neovim";
+      repo = "nvimdev.nvim";
+      rev = "994ff5daf571ad02cc96436002411b4fb235c91f";
+      sha256 = "07dx6qkxqpakl1hrqwhfjgdzcnl4j3j9qih0l20qn8p6askj3b2j";
+    };
+  };
+
+  onehalf = buildVimPluginFrom2Nix {
+    pname = "onehalf";
+    version = "2019-08-17";
+    src = fetchFromGitHub {
+      owner = "sonph";
+      repo = "onehalf";
+      rev = "fdcbffe3175c29bb78d19dcaf9b2a456482fcf1e";
+      sha256 = "0zbmh3cf2lnn3mcqbz4s992v6kaddq9nj4xb1wxvgyqp7kjkpwql";
+    };
+  };
+
+  open-browser-github-vim = buildVimPluginFrom2Nix {
+    pname = "open-browser-github-vim";
+    version = "2020-03-16";
+    src = fetchFromGitHub {
+      owner = "tyru";
+      repo = "open-browser-github.vim";
+      rev = "db483ae17f02a8561e85b2071b90359a9a3bd18d";
+      sha256 = "09x9lfyi9gfhy4m1vp6z1kxpvi31rr8dnlqhh6fgskkziiqch3jw";
+    };
+  };
+
+  open-browser-vim = buildVimPluginFrom2Nix {
+    pname = "open-browser-vim";
+    version = "2020-03-06";
+    src = fetchFromGitHub {
+      owner = "tyru";
+      repo = "open-browser.vim";
+      rev = "57b894d0aa5f800220d25fdeeccf28d8a7f6ac89";
+      sha256 = "0q87hna0irl431kmd4knblzkahrmw3mrnvw1cq19indfky85516v";
+    };
+  };
+
+  palenight-vim = buildVimPluginFrom2Nix {
+    pname = "palenight-vim";
+    version = "2020-01-17";
+    src = fetchFromGitHub {
+      owner = "drewtempelmeyer";
+      repo = "palenight.vim";
+      rev = "f332f9efe73227a47c18bade892ac55682641733";
+      sha256 = "0nd2hqvxnjnbsp17x666nwyy0s9j9b6igyfhl44p7lkci6560gwp";
+    };
+  };
+
+  papercolor-theme = buildVimPluginFrom2Nix {
+    pname = "papercolor-theme";
+    version = "2019-11-06";
+    src = fetchFromGitHub {
+      owner = "NLKNguyen";
+      repo = "papercolor-theme";
+      rev = "ddd09867ed4e020b3ba2eb47dc3ef365da5b0fed";
+      sha256 = "1dhbnd99xs6l5alqhn9m1nynmr9sbvrqj2137l23ysisprl3rgmr";
+    };
+  };
+
+  pear-tree = buildVimPluginFrom2Nix {
+    pname = "pear-tree";
+    version = "2019-12-08";
+    src = fetchFromGitHub {
+      owner = "tmsvg";
+      repo = "pear-tree";
+      rev = "3bb209d9637d6bd7506040b2fcd158c9a7917db3";
+      sha256 = "0n70rzw34lsnnprqna90ssqrka33qx3z0n2kj19ps8yp3j6lsxvk";
+    };
+  };
+
+  peskcolor-vim = buildVimPluginFrom2Nix {
+    pname = "peskcolor-vim";
+    version = "2016-06-11";
+    src = fetchFromGitHub {
+      owner = "andsild";
+      repo = "peskcolor.vim";
+      rev = "cba4fc739bbebacd503158f6509d9c226651f363";
+      sha256 = "15hw3casr5y3ckgcn6aq8vhk6g2hym41w51nvgf34hbj9fx1nvkq";
+    };
+  };
+
+  pig-vim = buildVimPluginFrom2Nix {
+    pname = "pig-vim";
+    version = "2017-06-08";
+    src = fetchFromGitHub {
+      owner = "motus";
+      repo = "pig.vim";
+      rev = "60d8a0883d3e474e61af46b581a5ce3af65e9bb5";
+      sha256 = "0az48a3slpzljb69d60cpahkshmdbss0snc8lmvf4yrc1gx8yncv";
+    };
+  };
+
+  plantuml-syntax = buildVimPluginFrom2Nix {
+    pname = "plantuml-syntax";
+    version = "2020-03-30";
+    src = fetchFromGitHub {
+      owner = "aklt";
+      repo = "plantuml-syntax";
+      rev = "25070c47cae8c7a9d62c8c09a1339e761448fbc4";
+      sha256 = "1x2a1wnxs2qmv2zqgq2bmwskdp1i4ga0yjxjyziyr96p48m7dcjp";
+    };
+  };
+
+  pony-vim-syntax = buildVimPluginFrom2Nix {
+    pname = "pony-vim-syntax";
+    version = "2017-09-26";
+    src = fetchFromGitHub {
+      owner = "dleonard0";
+      repo = "pony-vim-syntax";
+      rev = "caa34b3d7a15d9bfbfbb2f5944c85eb1eddcfafc";
+      sha256 = "0r2lv99hkm95dv8wy9rkrkcwz5wkmwggfwi5vakgw497l3a9jskr";
+    };
+  };
+
+  PreserveNoEOL = buildVimPluginFrom2Nix {
+    pname = "PreserveNoEOL";
+    version = "2013-06-14";
+    src = fetchFromGitHub {
+      owner = "vim-scripts";
+      repo = "PreserveNoEOL";
+      rev = "940e3ce90e54d8680bec1135a21dcfbd6c9bfb62";
+      sha256 = "1726jpr2zf6jrb00pp082ikbx4mll3a877pnzs6i18f9fgpaqqgd";
+    };
+  };
+
+  prev_indent = buildVimPluginFrom2Nix {
+    pname = "prev_indent";
+    version = "2014-03-08";
+    src = fetchFromGitHub {
+      owner = "vim-scripts";
+      repo = "prev_indent";
+      rev = "79e9b1b9a6895bfd15463c45595ca599987a4b23";
+      sha256 = "03xqdwfkc7a84742ldsggi7ix99c7dhpmg6j13gkasyfk487ryh6";
+    };
+  };
+
+  psc-ide-vim = buildVimPluginFrom2Nix {
+    pname = "psc-ide-vim";
+    version = "2019-09-17";
+    src = fetchFromGitHub {
+      owner = "frigoeu";
+      repo = "psc-ide-vim";
+      rev = "5fb4e329e5c0c7d80f0356ab4028eee9c8bd3465";
+      sha256 = "0gzbxsq6wh8d9z9vyrff4hdpc66yg9y8hnxq4kjrz9qrccc75c1f";
+    };
+  };
+
+  purescript-vim = buildVimPluginFrom2Nix {
+    pname = "purescript-vim";
+    version = "2018-12-10";
+    src = fetchFromGitHub {
+      owner = "purescript-contrib";
+      repo = "purescript-vim";
+      rev = "67ca4dc4a0291e5d8c8da48bffc0f3d2c9739e7f";
+      sha256 = "1insh39hzbynr6qxb215qxhpifl5m8i5i0d09a3b6v679i7s11i8";
+    };
+  };
+
+  python-mode = buildVimPluginFrom2Nix {
+    pname = "python-mode";
+    version = "2018-04-29";
+    src = fetchFromGitHub {
+      owner = "python-mode";
+      repo = "python-mode";
+      rev = "f94b0d7b21714f950f5878b430fbfde21c3b7ad9";
+      sha256 = "0zxsa1agigzb9adrwq54pdyl984drdqzz3kkixaijkq77kkdvj0n";
+    };
+  };
+
+  quick-scope = buildVimPluginFrom2Nix {
+    pname = "quick-scope";
+    version = "2020-04-04";
+    src = fetchFromGitHub {
+      owner = "unblevable";
+      repo = "quick-scope";
+      rev = "ac80025b868bb6e52b9dda893246ee5f992612de";
+      sha256 = "1pvw8d53dgm580r9n2qcx0w56g4kanvd00ny6c6l71hxw9lixnlb";
+    };
+  };
+
+  quickfix-reflector-vim = buildVimPluginFrom2Nix {
+    pname = "quickfix-reflector-vim";
+    version = "2019-12-11";
+    src = fetchFromGitHub {
+      owner = "stefandtw";
+      repo = "quickfix-reflector.vim";
+      rev = "8e9c05a110b80ab66fc8bc3d5fe9e6fa168aada6";
+      sha256 = "1i8453z3s0xmbmbzk3kpxwvd42ar9v2m2gjqic9k7njpxw87czvs";
+    };
+  };
+
+  quickfixstatus = buildVimPluginFrom2Nix {
+    pname = "quickfixstatus";
+    version = "2011-09-03";
+    src = fetchFromGitHub {
+      owner = "dannyob";
+      repo = "quickfixstatus";
+      rev = "fd3875b914fc51bbefefa8c4995588c088163053";
+      sha256 = "16vxhvyxq51y7wnx0c1fmdi2yb6kfr1pxijq65gxj8qwvbak2s3v";
+    };
+  };
+
+  rainbow = buildVimPluginFrom2Nix {
+    pname = "rainbow";
+    version = "2019-10-09";
+    src = fetchFromGitHub {
+      owner = "luochen1990";
+      repo = "rainbow";
+      rev = "c876f4bc6e737241d53669415f88cb5f2afd8ad9";
+      sha256 = "1kmgm91q507qv9bvg37dn0lddzb8gwkmslajampnfjyfhbs0shgz";
+    };
+  };
+
+  rainbow_parentheses-vim = buildVimPluginFrom2Nix {
+    pname = "rainbow_parentheses-vim";
+    version = "2013-03-05";
+    src = fetchFromGitHub {
+      owner = "kien";
+      repo = "rainbow_parentheses.vim";
+      rev = "eb8baa5428bde10ecc1cb14eed1d6e16f5f24695";
+      sha256 = "1qw84imlhq4654mxazj7j3sp5g1j3yjxi496i08iix06dm15m5s7";
+    };
+  };
+
+  random-vim = buildVimPluginFrom2Nix {
+    pname = "random-vim";
+    version = "2010-10-18";
+    src = fetchFromGitHub {
+      owner = "vim-scripts";
+      repo = "random.vim";
+      rev = "b2d85eb24a38074eab37a5acf2a295e1f2ad8989";
+      sha256 = "1lzy2cq4jcrsqyxlnbnd0y6j4mabm09bi7q22lf6vinqlb84w7sp";
+    };
+  };
+
+  ranger-vim = buildVimPluginFrom2Nix {
+    pname = "ranger-vim";
+    version = "2019-02-08";
+    src = fetchFromGitHub {
+      owner = "rafaqz";
+      repo = "ranger.vim";
+      rev = "6def86f4293d170480ce62cc41f15448075d7835";
+      sha256 = "0890rbmdw3p25cww6vsji7xrndcxsisfyv5przahpclk9fc9sxs8";
+    };
+  };
+
+  readline-vim = buildVimPluginFrom2Nix {
+    pname = "readline-vim";
+    version = "2019-12-28";
+    src = fetchFromGitHub {
+      owner = "ryvnf";
+      repo = "readline.vim";
+      rev = "48f04c651728e8a7a8352eec697801aa32348564";
+      sha256 = "1vs91lkm9gwvp0bahx80ag6lw03r5x6kyih70l4sq8q0kydp5f13";
+    };
+  };
+
+  Recover-vim = buildVimPluginFrom2Nix {
+    pname = "Recover-vim";
+    version = "2019-06-04";
+    src = fetchFromGitHub {
+      owner = "chrisbra";
+      repo = "Recover.vim";
+      rev = "491c7bab1632029318d682df927d62b298856db5";
+      sha256 = "18bdsa6y9cdf92qafp4mlc2f6ny3qx8wl8p3i9x7q46i89bn7cxc";
+    };
+  };
+
+  Rename = buildVimPluginFrom2Nix {
+    pname = "Rename";
+    version = "2011-08-31";
+    src = fetchFromGitHub {
+      owner = "vim-scripts";
+      repo = "Rename";
+      rev = "b240f28d2ede65fa77cd99fe045efe79202f7a34";
+      sha256 = "1d1myg4zyc281zcc1ba9idbgcgxndb4a0jwqr4yqxhhzdgszw46r";
+    };
+  };
+
+  ReplaceWithRegister = buildVimPluginFrom2Nix {
+    pname = "ReplaceWithRegister";
+    version = "2014-10-31";
+    src = fetchFromGitHub {
+      owner = "vim-scripts";
+      repo = "ReplaceWithRegister";
+      rev = "832efc23111d19591d495dc72286de2fb0b09345";
+      sha256 = "0mb0sx85j1k59b1zz95r4vkq4kxlb4krhncq70mq7fxrs5bnhq8g";
+    };
+  };
+
+  riv-vim = buildVimPluginFrom2Nix {
+    pname = "riv-vim";
+    version = "2020-04-09";
+    src = fetchFromGitHub {
+      owner = "gu-fan";
+      repo = "riv.vim";
+      rev = "e26c3e8dce4c1332e802cde84f83e61ec8a13986";
+      sha256 = "1da3iwrpy08rayrsf8v0ml4khlp9j5i4cffpv9j3iyalcbhk2m9g";
+    };
+  };
+
+  robotframework-vim = buildVimPluginFrom2Nix {
+    pname = "robotframework-vim";
+    version = "2017-04-14";
+    src = fetchFromGitHub {
+      owner = "mfukar";
+      repo = "robotframework-vim";
+      rev = "75d5b371a4da2a090a2872d55bd0dead013f334e";
+      sha256 = "091ac5rq6f1a7j2q3dy9rc00vckv21m4wd29ijj63jannr02v5ad";
+    };
+  };
+
+  rtorrent-syntax-file = buildVimPluginFrom2Nix {
+    pname = "rtorrent-syntax-file";
+    version = "2016-03-19";
+    src = fetchFromGitHub {
+      owner = "ccarpita";
+      repo = "rtorrent-syntax-file";
+      rev = "885ca182c02bbbed4b62a3fcfe6fe62fa5b419ca";
+      sha256 = "1vhvmwnwi6862cckl8dqr8pgy0inrr0c31lic89826yv7mfl9mbz";
+    };
+  };
+
+  rust-vim = buildVimPluginFrom2Nix {
+    pname = "rust-vim";
+    version = "2020-03-31";
+    src = fetchFromGitHub {
+      owner = "rust-lang";
+      repo = "rust.vim";
+      rev = "ce5f2b1c881de1b2101924dc5a19046399d74db2";
+      sha256 = "0zjzn091js0i76klk9al4gw1l2ads132mjl0nrdhbvl7ilypdajh";
+    };
+  };
+
+  salt-vim = buildVimPluginFrom2Nix {
+    pname = "salt-vim";
+    version = "2017-07-01";
+    src = fetchFromGitHub {
+      owner = "saltstack";
+      repo = "salt-vim";
+      rev = "6ca9e3500cc39dd417b411435d58a1b720b331cc";
+      sha256 = "0r79bpl98xcsmkw6dg83cf1ghn89rzsr011zirk3v1wfxclri2c4";
+    };
+  };
+
+  self = buildVimPluginFrom2Nix {
+    pname = "self";
+    version = "2014-05-28";
+    src = fetchFromGitHub {
+      owner = "megaannum";
+      repo = "self";
+      rev = "2ed666b547eddee6ae1fcc63babca4ba0b66a59f";
+      sha256 = "1gcwn6i5i3msg7hrlzsnv1bs6pm4jz9cff8ppaz2xdj8xv9qy6fn";
+    };
+  };
+
+  semshi = buildVimPluginFrom2Nix {
+    pname = "semshi";
+    version = "2019-12-01";
+    src = fetchFromGitHub {
+      owner = "numirias";
+      repo = "semshi";
+      rev = "801d0c971d3d7291cf2fc22d74ac69155a71a279";
+      sha256 = "0adq1qxlxd53ps5byjvqmzk266f3wbvqmw74dkx6vd41zqw38wfx";
+    };
+  };
+
+  seoul256-vim = buildVimPluginFrom2Nix {
+    pname = "seoul256-vim";
+    version = "2020-03-14";
+    src = fetchFromGitHub {
+      owner = "junegunn";
+      repo = "seoul256.vim";
+      rev = "cfc0167e546a40eb26ec2a0a0f1c141a8c1bcaf1";
+      sha256 = "1z980hsmf6gcvd16ja67az131mrgv5fv6v0ivsh0ga8hwc4f9l6q";
+    };
+  };
+
+  shabadou-vim = buildVimPluginFrom2Nix {
+    pname = "shabadou-vim";
+    version = "2016-07-19";
+    src = fetchFromGitHub {
+      owner = "osyo-manga";
+      repo = "shabadou.vim";
+      rev = "7d4bfed1ea8985ae125df3d1403cc19e252443e1";
+      sha256 = "1kvik1yf7yjg9jdmdw38yhkksxg0n3nry02banwik7wgjnpvg870";
+    };
+  };
+
+  ShowMultiBase = buildVimPluginFrom2Nix {
+    pname = "ShowMultiBase";
+    version = "2010-10-18";
+    src = fetchFromGitHub {
+      owner = "vim-scripts";
+      repo = "ShowMultiBase";
+      rev = "85a39fd12668ce973d3d9282263912b2b8f0d338";
+      sha256 = "0hg5352ahzgh2kwqha5v8ai024fld93xag93hb53wjf5b8nzsz8i";
+    };
+  };
+
+  SimpylFold = buildVimPluginFrom2Nix {
+    pname = "SimpylFold";
+    version = "2017-06-13";
+    src = fetchFromGitHub {
+      owner = "tmhedberg";
+      repo = "SimpylFold";
+      rev = "aa0371d9d708388f3ba385ccc67a7504586a20d9";
+      sha256 = "1gjv78x2cgh79a04l411kdhkm53f93czs54p07kadpa9659z93ss";
+    };
+  };
+
+  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";
+    };
+  };
+
+  smartpairs-vim = buildVimPluginFrom2Nix {
+    pname = "smartpairs-vim";
+    version = "2018-01-01";
+    src = fetchFromGitHub {
+      owner = "gorkunov";
+      repo = "smartpairs.vim";
+      rev = "dc754c29509b1a942552b3cfa348e4aae209322c";
+      sha256 = "1pyynwz7wfbgccdxsyggzl0301qjj3wgyymah5spx8b3s42a6slj";
+    };
+  };
+
+  sourcemap-vim = buildVimPluginFrom2Nix {
+    pname = "sourcemap-vim";
+    version = "2012-09-19";
+    src = fetchFromGitHub {
+      owner = "chikatoike";
+      repo = "sourcemap.vim";
+      rev = "0dd82d40faea2fdb0771067f46c01deb41610ba1";
+      sha256 = "1gcgnynallz420911fdfm0ccbv3zs78p69nnh2ls1r4vlfp7g350";
+    };
+  };
+
+  SpaceCamp = buildVimPluginFrom2Nix {
+    pname = "SpaceCamp";
+    version = "2020-03-31";
+    src = fetchFromGitHub {
+      owner = "jaredgorski";
+      repo = "SpaceCamp";
+      rev = "58fc865f83b600ee8906fe35d02749dec6659607";
+      sha256 = "0rv9a6gzn5q2ajsyfvsrybn7hyskckfa7wad4jr8xaylccn5r7x7";
+    };
+  };
+
+  Spacegray-vim = buildVimPluginFrom2Nix {
+    pname = "Spacegray-vim";
+    version = "2019-02-23";
+    src = fetchFromGitHub {
+      owner = "ajh17";
+      repo = "Spacegray.vim";
+      rev = "69e8fefce04e2aff6a01cc4c295493359b0e4fa1";
+      sha256 = "0ks5yd1vmpjw8ml7hqd2zz2d8mqkqhfw2ya73y1igf6as70za896";
+    };
+  };
+
+  spacevim = buildVimPluginFrom2Nix {
+    pname = "spacevim";
+    version = "2018-03-29";
+    src = fetchFromGitHub {
+      owner = "ctjhoa";
+      repo = "spacevim";
+      rev = "30142a518ba77feb22791b5cb2387d88b70c58f2";
+      sha256 = "0m389cnpg17ca8s7vb9yrs40sxb56zg32lcpilnd63zfi7awgscg";
+    };
+  };
+
+  sparkup = buildVimPluginFrom2Nix {
+    pname = "sparkup";
+    version = "2012-06-11";
+    src = fetchFromGitHub {
+      owner = "chrisgeo";
+      repo = "sparkup";
+      rev = "6fbfceef890e705c47b42b27be743ffed6f9296e";
+      sha256 = "17jgpvl879ik53rr3razfnbpfx63mzpp1rlvxxjsvvrk4g45dssm";
+    };
+  };
+
+  splice-vim = buildVimPluginFrom2Nix {
+    pname = "splice-vim";
+    version = "2020-01-15";
+    src = fetchFromGitHub {
+      owner = "sjl";
+      repo = "splice.vim";
+      rev = "815a28e687fdf78b67e9b9cd4c21277bbe658873";
+      sha256 = "0bh1gr2h6w872ql72rdlzpk5znl4lz01x6lgyf330sickizz5mvb";
+    };
+  };
+
+  split-term-vim = buildVimPluginFrom2Nix {
+    pname = "split-term-vim";
+    version = "2018-09-30";
+    src = fetchFromGitHub {
+      owner = "vimlab";
+      repo = "split-term.vim";
+      rev = "a4e28cab77ad07fc8a0ebb62a982768c02eb287c";
+      sha256 = "12vrmbq1r8d6sgyxjwi0s856n1v4vjhrf8wpwq6l4ydmk1bnvjkb";
+    };
+  };
+
+  splitjoin-vim = buildVimPluginFrom2Nix {
+    pname = "splitjoin-vim";
+    version = "2020-04-08";
+    src = fetchFromGitHub {
+      owner = "AndrewRadev";
+      repo = "splitjoin.vim";
+      rev = "4aeb3b59c8a2d080960d17318498652e93e33776";
+      sha256 = "0gvchss74q4z54008hs8nylsr8xgz02wqshh7fqx3jbyhwb0zzms";
+    };
+  };
+
+  starsearch-vim = buildVimPluginFrom2Nix {
+    pname = "starsearch-vim";
+    version = "2014-09-21";
+    src = fetchFromGitHub {
+      owner = "darfink";
+      repo = "starsearch.vim";
+      rev = "9b8cda1e628160c83846db5a30899a1a1ba5c1c9";
+      sha256 = "1i1ygdqwhz4jqmz9lzjnx1a7s5chdqjsvgkmnd9x0s8ixqa41bpr";
+    };
+  };
+
+  supertab = buildVimPluginFrom2Nix {
+    pname = "supertab";
+    version = "2017-11-14";
+    src = fetchFromGitHub {
+      owner = "ervandew";
+      repo = "supertab";
+      rev = "40fe711e088e2ab346738233dd5adbb1be355172";
+      sha256 = "0l5labq68kyprv63k1q35hz5ly0dd06mf2z202mccnix4mlxf0db";
+    };
+  };
+
+  sved = buildVimPluginFrom2Nix {
+    pname = "sved";
+    version = "2019-01-25";
+    src = fetchFromGitHub {
+      owner = "peterbjorgensen";
+      repo = "sved";
+      rev = "3362db72447e8ac812c7299c15ecfc9f41341713";
+      sha256 = "1r2nv069d6r2q6gbiz795x94mfjm9hnv05zka085hhq9a3yf1pgx";
+    };
+  };
+
+  swift-vim = buildVimPluginFrom2Nix {
+    pname = "swift-vim";
+    version = "2020-02-21";
+    src = fetchFromGitHub {
+      owner = "keith";
+      repo = "swift.vim";
+      rev = "c4053da88208cef5a32a5862694d36b73f6ce310";
+      sha256 = "0awz0pf3awrwhay40wngfllpmmh24zwm02ra530x4n1hk74iwf2v";
+    };
+  };
+
+  syntastic = buildVimPluginFrom2Nix {
+    pname = "syntastic";
+    version = "2020-01-29";
+    src = fetchFromGitHub {
+      owner = "vim-syntastic";
+      repo = "syntastic";
+      rev = "f3766538720116f099a8b1517f76ae2f094afd20";
+      sha256 = "1bzjav87fcibwlp8siqnx6x8wv8w3mwrrqrd5w19ny9scr5x2a65";
+    };
+  };
+
+  tabmerge = buildVimPluginFrom2Nix {
+    pname = "tabmerge";
+    version = "2010-10-18";
+    src = fetchFromGitHub {
+      owner = "vim-scripts";
+      repo = "tabmerge";
+      rev = "074e5f06f26e7108a0570071a0f938a821768c06";
+      sha256 = "0prkyza1n49cdaslcr57w8zv15vw78mlqbzib2xipmawzjq02idq";
+    };
+  };
+
+  tabpagebuffer-vim = buildVimPluginFrom2Nix {
+    pname = "tabpagebuffer-vim";
+    version = "2014-09-30";
+    src = fetchFromGitHub {
+      owner = "Shougo";
+      repo = "tabpagebuffer.vim";
+      rev = "4d95c3e6fa5ad887498f4cbe486c11e39d4a1fbc";
+      sha256 = "1z6zlpzkhwy1p2pmx9qrwb91dp9v4yi8jrdvm1if2k79ij4sl08f";
+    };
+  };
+
+  tabular = buildVimPluginFrom2Nix {
+    pname = "tabular";
+    version = "2019-02-19";
+    src = fetchFromGitHub {
+      owner = "godlygeek";
+      repo = "tabular";
+      rev = "339091ac4dd1f17e225fe7d57b48aff55f99b23a";
+      sha256 = "0jq91770wsp2waw7pywxjqx59v0vg54gfzirgcd85pg61w22bfla";
+    };
+  };
+
+  tagbar = buildVimPluginFrom2Nix {
+    pname = "tagbar";
+    version = "2020-01-23";
+    src = fetchFromGitHub {
+      owner = "majutsushi";
+      repo = "tagbar";
+      rev = "679a9d9ac9579bd18225409d85ed4870fb6c9c62";
+      sha256 = "1s4736104vfaj7rfcdzcnmgbnxxi0ngs07km0p2fi1m2zc68602l";
+    };
+  };
+
+  taglist-vim = buildVimPluginFrom2Nix {
+    pname = "taglist-vim";
+    version = "2010-10-18";
+    src = fetchFromGitHub {
+      owner = "vim-scripts";
+      repo = "taglist.vim";
+      rev = "53041fbc45398a9af631a20657e109707a455339";
+      sha256 = "07aa2gfc73lznyi7w7cybzanspza3p67cv5hxr21g43zhs5k9izd";
+    };
+  };
+
+  targets-vim = buildVimPluginFrom2Nix {
+    pname = "targets-vim";
+    version = "2019-12-08";
+    src = fetchFromGitHub {
+      owner = "wellle";
+      repo = "targets.vim";
+      rev = "8d6ff2984cdfaebe5b7a6eee8f226a6dd1226f2d";
+      sha256 = "192wq3x64x11nm2jhs4yrc627b0lh002dfnj72xrc7jak9vbdps9";
+    };
+  };
+
+  tcomment_vim = buildVimPluginFrom2Nix {
+    pname = "tcomment_vim";
+    version = "2020-03-15";
+    src = fetchFromGitHub {
+      owner = "tomtom";
+      repo = "tcomment_vim";
+      rev = "b9a075e36e9d8817b15e2edcdb8b6bf51a8d479c";
+      sha256 = "1vyg2n7s8981km05zpfhzcvb1adwc26l034w9w1bjil72fywdad0";
+    };
+  };
+
+  tender-vim = buildVimPluginFrom2Nix {
+    pname = "tender-vim";
+    version = "2020-02-18";
+    src = fetchFromGitHub {
+      owner = "jacoborus";
+      repo = "tender.vim";
+      rev = "f93b2f373cc21826524c94fbd1f3b3a4c55173d2";
+      sha256 = "0bfns5vsbyh1s01s295hbf8h04n21cfkfp8b2r3cfr8mcvazpmpq";
+    };
+  };
+
+  tern_for_vim = buildVimPluginFrom2Nix {
+    pname = "tern_for_vim";
+    version = "2019-01-23";
+    src = fetchFromGitHub {
+      owner = "ternjs";
+      repo = "tern_for_vim";
+      rev = "994ffbe783da36d67786b6c66a4bf784c5eab300";
+      sha256 = "0vpi5lqlyf6kcc0ha8hf3ch2h8v3awidgpwbrv9f3bqvyg4yhdcd";
+    };
+  };
+
+  thesaurus_query-vim = buildVimPluginFrom2Nix {
+    pname = "thesaurus_query-vim";
+    version = "2019-11-09";
+    src = fetchFromGitHub {
+      owner = "ron89";
+      repo = "thesaurus_query.vim";
+      rev = "830a20ec77780ebfe8d2a7e8c740ca4abb079f89";
+      sha256 = "0kfqpjwashwf084cbz6dmhirk42a4n8d1zj17i086by17nx7qn1g";
+    };
+  };
+
+  thumbnail-vim = buildVimPluginFrom2Nix {
+    pname = "thumbnail-vim";
+    version = "2020-01-31";
+    src = fetchFromGitHub {
+      owner = "itchyny";
+      repo = "thumbnail.vim";
+      rev = "7d65524dddaeed5629e6b9c8926c56ef8dd0c553";
+      sha256 = "02707pl5dqfgkxx2i4wcfxx2zdpm86g5l4n4wn1dms35bcn2c8l8";
+    };
+  };
+
+  tlib_vim = buildVimPluginFrom2Nix {
+    pname = "tlib_vim";
+    version = "2019-09-28";
+    src = fetchFromGitHub {
+      owner = "tomtom";
+      repo = "tlib_vim";
+      rev = "a071b6d41b20069a3520e0d101194a752968973b";
+      sha256 = "05swfvjyai32cbdpg10m3k2frkv017i1avf0nzilqavskvg04vi3";
+    };
+  };
+
+  tmux-complete-vim = buildVimPluginFrom2Nix {
+    pname = "tmux-complete-vim";
+    version = "2019-11-10";
+    src = fetchFromGitHub {
+      owner = "wellle";
+      repo = "tmux-complete.vim";
+      rev = "7237d8d8d60af7916e3b546a9f4f396df95a1b21";
+      sha256 = "05ypjahaf7gk4vjc8hhglmw7y8vyjxyhxq8sm0s3np05aw0gdbsc";
+    };
+  };
+
+  todo-txt-vim = buildVimPluginFrom2Nix {
+    pname = "todo-txt-vim";
+    version = "2016-11-10";
+    src = fetchFromGitHub {
+      owner = "freitass";
+      repo = "todo.txt-vim";
+      rev = "6845221d45bd62e604c2024bc511a56e79d1118b";
+      sha256 = "08m9q5f2pz6gjp0vkmm7glfsrbnldxi1j59dm5d7any6y96xxd6v";
+      fetchSubmodules = true;
+    };
+  };
+
+  traces-vim = buildVimPluginFrom2Nix {
+    pname = "traces-vim";
+    version = "2020-01-22";
+    src = fetchFromGitHub {
+      owner = "markonm";
+      repo = "traces.vim";
+      rev = "4d3858eb060a1fd2213b075a707d39cbb118ae3e";
+      sha256 = "0qny9z459x7hp5y43iivws2m312clacysdy1nnb3cr1fyhw9pflx";
+    };
+  };
+
+  tslime-vim = buildVimPluginFrom2Nix {
+    pname = "tslime-vim";
+    version = "2018-07-23";
+    src = fetchFromGitHub {
+      owner = "jgdavey";
+      repo = "tslime.vim";
+      rev = "28e9eba642a791c6a6b044433dce8e5451b26fb0";
+      sha256 = "1y5xikryv6851d0rjk9c64agawshp5208mwym6ma9ngs7s3s1l4x";
+    };
+  };
+
+  tsuquyomi = buildVimPluginFrom2Nix {
+    pname = "tsuquyomi";
+    version = "2020-03-10";
+    src = fetchFromGitHub {
+      owner = "Quramy";
+      repo = "tsuquyomi";
+      rev = "85fffd5939c8fc5750b35a937b965af2ad5b0b15";
+      sha256 = "1j5wdh0xa5yld4fy2msyjf1qvj8zx0iccc1bw63zzbrcl6rs30gx";
+    };
+  };
+
+  typescript-vim = buildVimPluginFrom2Nix {
+    pname = "typescript-vim";
+    version = "2020-02-13";
+    src = fetchFromGitHub {
+      owner = "leafgarland";
+      repo = "typescript-vim";
+      rev = "17d85d8051ba21283e62a9101734981e10b732fd";
+      sha256 = "17z8ygns97wlnm4vq7kgkx3ymnbb2f6imxn02fc0iywkrhdqv7mj";
+    };
+  };
+
+  ultisnips = buildVimPluginFrom2Nix {
+    pname = "ultisnips";
+    version = "2020-03-19";
+    src = fetchFromGitHub {
+      owner = "SirVer";
+      repo = "ultisnips";
+      rev = "ee31ea1c7d08ced8577120b4c1d55c5a05351a75";
+      sha256 = "01nm3d95qjd2v3j9ln7w52i8bn2fgi5zms9078832w1x4iyb1mwn";
+    };
+  };
+
+  undotree = buildVimPluginFrom2Nix {
+    pname = "undotree";
+    version = "2019-03-13";
+    src = fetchFromGitHub {
+      owner = "mbbill";
+      repo = "undotree";
+      rev = "be23eacb2a63380bd79e207a738c728214ecc9d3";
+      sha256 = "00zyvff32zp7pyjzkq8da9xhr378mlpi8gj717yfr9wbwwarwfd7";
+    };
+  };
+
+  unicode-vim = buildVimPluginFrom2Nix {
+    pname = "unicode-vim";
+    version = "2020-04-05";
+    src = fetchFromGitHub {
+      owner = "chrisbra";
+      repo = "unicode.vim";
+      rev = "5a43fa177d6650cfb3224a3989f15e83999afa7f";
+      sha256 = "187hznxcrvb1j8dj2rrdlk3f1cfx0d0l3fnfabh1da0m9cjg4xbh";
+    };
+  };
+
+  unite-vim = buildVimPluginFrom2Nix {
+    pname = "unite-vim";
+    version = "2019-08-27";
+    src = fetchFromGitHub {
+      owner = "Shougo";
+      repo = "unite.vim";
+      rev = "5addeca429f64130d74d2f7cb8255afdb9e309d2";
+      sha256 = "03bqljjc1h43qimm81mv8ywkx5388kd6clm2f7887diiww0fgvfi";
+    };
+  };
+
+  utl-vim = buildVimPluginFrom2Nix {
+    pname = "utl-vim";
+    version = "2010-10-18";
+    src = fetchFromGitHub {
+      owner = "vim-scripts";
+      repo = "utl.vim";
+      rev = "67a6506a7a8a3847d00d3af3e2ed9707460d5ce5";
+      sha256 = "0ax68nmzlka9193n2h82qzvhzv4dv6lm7rg3b1vhj2pn1r6ci6p4";
+    };
+  };
+
+  vader-vim = buildVimPluginFrom2Nix {
+    pname = "vader-vim";
+    version = "2020-02-13";
+    src = fetchFromGitHub {
+      owner = "junegunn";
+      repo = "vader.vim";
+      rev = "6fff477431ac3191c69a3a5e5f187925466e275a";
+      sha256 = "153cr1mrf5w5lyr8374brwx1z5yl9h0cnijxnd3xikh3yi3pbmwk";
+    };
+  };
+
+  vCoolor-vim = buildVimPluginFrom2Nix {
+    pname = "vCoolor-vim";
+    version = "2018-10-06";
+    src = fetchFromGitHub {
+      owner = "KabbAmine";
+      repo = "vCoolor.vim";
+      rev = "8fc037e453f4c2274f590bde4f9fb56167b14e57";
+      sha256 = "193cjxfha5xcpfjqqpyfa6xidys1zmmmwlcj7w2cxbr5j5bdnybm";
+    };
+  };
+
+  verilog_systemverilog-vim = buildVimPluginFrom2Nix {
+    pname = "verilog_systemverilog-vim";
+    version = "2020-04-01";
+    src = fetchFromGitHub {
+      owner = "vhda";
+      repo = "verilog_systemverilog.vim";
+      rev = "c6f7ca14554196ae15a5fef9e568d69f04b9ff56";
+      sha256 = "1hx9rgx44dhc449r0j6azkp1bm20n9c3fyb112w277a2jvf0a2c5";
+    };
+  };
+
+  vim = buildVimPluginFrom2Nix {
+    pname = "vim";
+    version = "2020-03-03";
+    src = fetchFromGitHub {
+      owner = "dracula";
+      repo = "vim";
+      rev = "ed490ae07168ecd1636b9fe0998baeb770b87cd9";
+      sha256 = "0b23r37az36kzlzr3k483r1yy142nmz09hc9wkwchs2zns30bqky";
+    };
+  };
+
+  vim-abolish = buildVimPluginFrom2Nix {
+    pname = "vim-abolish";
+    version = "2019-11-13";
+    src = fetchFromGitHub {
+      owner = "tpope";
+      repo = "vim-abolish";
+      rev = "7e4da6e78002344d499af9b6d8d5d6fcd7c92125";
+      sha256 = "1n35igng3a6d5y4nh5pyb09s6khgcwbr3v0lnh33qb51cv4cnjh4";
+    };
+  };
+
+  vim-addon-actions = buildVimPluginFrom2Nix {
+    pname = "vim-addon-actions";
+    version = "2018-01-18";
+    src = fetchFromGitHub {
+      owner = "MarcWeber";
+      repo = "vim-addon-actions";
+      rev = "540cae09832ba6abf9fc63c55781bf86584c33ac";
+      sha256 = "011w5k09i01r9x64j20qj0f7d057m9wki2m8l2wds47l57hr3vz6";
+    };
+  };
+
+  vim-addon-async = buildVimPluginFrom2Nix {
+    pname = "vim-addon-async";
+    version = "2017-03-20";
+    src = fetchFromGitHub {
+      owner = "MarcWeber";
+      repo = "vim-addon-async";
+      rev = "eca316a4480f68c2cb62128f3187dc7b2002afde";
+      sha256 = "1lk8ma51dd0syi73vq5r4qk9cpy6cq3llizvh94hmxblfjpvrs7q";
+    };
+  };
+
+  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";
+    };
+  };
+
+  vim-addon-commenting = buildVimPluginFrom2Nix {
+    pname = "vim-addon-commenting";
+    version = "2013-06-10";
+    src = fetchFromGitHub {
+      owner = "MarcWeber";
+      repo = "vim-addon-commenting";
+      rev = "b7cf748ac1c9bf555cbd347589e3b7196030d20b";
+      sha256 = "0alak8h33vada2ckb0v06y82qlib5mhyc2yswlv1rqh8ypzhq3mc";
+    };
+  };
+
+  vim-addon-completion = buildVimPluginFrom2Nix {
+    pname = "vim-addon-completion";
+    version = "2015-02-10";
+    src = fetchFromGitHub {
+      owner = "MarcWeber";
+      repo = "vim-addon-completion";
+      rev = "021c449a5ce1ce4ac0af5955e05b0279c1cc0e75";
+      sha256 = "1ld059y2qwlc5bdfjm2p314s1qh31lxs54g944pw49r46s5nlslr";
+    };
+  };
+
+  vim-addon-errorformats = buildVimPluginFrom2Nix {
+    pname = "vim-addon-errorformats";
+    version = "2019-07-16";
+    src = fetchFromGitHub {
+      owner = "MarcWeber";
+      repo = "vim-addon-errorformats";
+      rev = "bb83675cb0b8cc377fb0a79ba492ba2445674ba6";
+      sha256 = "09cds33lb5gm69wv5plgidprm8nf52vvg9qdzpq9mihvinvj5qv7";
+    };
+  };
+
+  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";
+    };
+  };
+
+  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";
+    };
+  };
+
+  vim-addon-manager = buildVimPluginFrom2Nix {
+    pname = "vim-addon-manager";
+    version = "2018-07-27";
+    src = fetchFromGitHub {
+      owner = "MarcWeber";
+      repo = "vim-addon-manager";
+      rev = "d9e865f3c2de5d9b7eabbc976f606cf1b89e29ea";
+      sha256 = "0mgm2dqw8js9gajkrvm5n3k9m1grjxcrfc9xdzb3jxw1c0njdhcy";
+    };
+  };
+
+  vim-addon-mru = buildVimPluginFrom2Nix {
+    pname = "vim-addon-mru";
+    version = "2013-08-08";
+    src = fetchFromGitHub {
+      owner = "MarcWeber";
+      repo = "vim-addon-mru";
+      rev = "e41e39bd9d1bf78ccfd8d5e1bc05ae5e1026c2bb";
+      sha256 = "0q6rxr9nrp63kidr3m3c2z5sda4g813pzshg0scxkjr8dxwhzdqm";
+    };
+  };
+
+  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";
+    };
+  };
+
+  vim-addon-nix = buildVimPluginFrom2Nix {
+    pname = "vim-addon-nix";
+    version = "2017-09-11";
+    src = fetchFromGitHub {
+      owner = "MarcWeber";
+      repo = "vim-addon-nix";
+      rev = "3001a9db5f816dd7af11384f15415bddd146ef86";
+      sha256 = "195z2yz09wirpqjpsha8x7qcr9is1q8qph4j0svws6qbqrkh8ryy";
+    };
+  };
+
+  vim-addon-other = buildVimPluginFrom2Nix {
+    pname = "vim-addon-other";
+    version = "2020-02-07";
+    src = fetchFromGitHub {
+      owner = "MarcWeber";
+      repo = "vim-addon-other";
+      rev = "7a395970b8817296c11e1de8310194c4ae6e1f89";
+      sha256 = "0sding7rc11imf5k9ki4h426wjiz8ywxa81v74xj3m23zm6l77sa";
+    };
+  };
+
+  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";
+    };
+  };
+
+  vim-addon-signs = buildVimPluginFrom2Nix {
+    pname = "vim-addon-signs";
+    version = "2013-04-19";
+    src = fetchFromGitHub {
+      owner = "MarcWeber";
+      repo = "vim-addon-signs";
+      rev = "17a49f293d18174ff09d1bfff5ba86e8eee8e8ae";
+      sha256 = "0i4gfp30hmw1vqjl6zxjrgkca3ikdkcnjmma2mncjmcr6f59kjzy";
+    };
+  };
+
+  vim-addon-sql = buildVimPluginFrom2Nix {
+    pname = "vim-addon-sql";
+    version = "2017-02-11";
+    src = fetchFromGitHub {
+      owner = "MarcWeber";
+      repo = "vim-addon-sql";
+      rev = "048a139af36829fce670c8ff80d3aad927557ee6";
+      sha256 = "0ihm157sby6csdwsnw2gwh3jmm3prm1mxwgkx2hsfwlmpb1vwwm3";
+    };
+  };
+
+  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";
+    };
+  };
+
+  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";
+    };
+  };
+
+  vim-addon-xdebug = buildVimPluginFrom2Nix {
+    pname = "vim-addon-xdebug";
+    version = "2014-08-29";
+    src = fetchFromGitHub {
+      owner = "MarcWeber";
+      repo = "vim-addon-xdebug";
+      rev = "45f26407305b4ce6f8f5f37d2b5e6e4354104172";
+      sha256 = "1i64ppdfp2qqq7vw1jf160mj4ikc04v39iazdab83xmiqjsh8ixw";
+    };
+  };
+
+  vim-airline = buildVimPluginFrom2Nix {
+    pname = "vim-airline";
+    version = "2020-04-10";
+    src = fetchFromGitHub {
+      owner = "vim-airline";
+      repo = "vim-airline";
+      rev = "a100e8967163d36ed624a71a313ce31cdd2b1151";
+      sha256 = "0nissvkwxqncwaw73kwk4fjnr0l43c7vj98l398pn3bkj8kgpns9";
+    };
+  };
+
+  vim-airline-themes = buildVimPluginFrom2Nix {
+    pname = "vim-airline-themes";
+    version = "2020-04-01";
+    src = fetchFromGitHub {
+      owner = "vim-airline";
+      repo = "vim-airline-themes";
+      rev = "3fb676b8729a98817f561ef1554c0ad1a514c96a";
+      sha256 = "18bfw09ywmw10jiv37iw2ijf46jhj2yw5wndqdgn7k42gy1wk7p6";
+    };
+  };
+
+  vim-android = buildVimPluginFrom2Nix {
+    pname = "vim-android";
+    version = "2019-12-17";
+    src = fetchFromGitHub {
+      owner = "hsanson";
+      repo = "vim-android";
+      rev = "0849bcb6523d17a753fcaff8d40cbeed2d09cf65";
+      sha256 = "1z3x72aprp950chk754h0qpf5lxh2svzk39flks5fanxaggkpkng";
+    };
+  };
+
+  vim-anzu = buildVimPluginFrom2Nix {
+    pname = "vim-anzu";
+    version = "2018-02-28";
+    src = fetchFromGitHub {
+      owner = "osyo-manga";
+      repo = "vim-anzu";
+      rev = "45b60d37cb9de90f6c89f7ddeacb7ae430ebcae2";
+      sha256 = "1p5lh4xsv9xsl8kx0h1bg6iy0if4a69hvairq69p50ffka83pv00";
+    };
+  };
+
+  vim-asterisk = buildVimPluginFrom2Nix {
+    pname = "vim-asterisk";
+    version = "2020-02-03";
+    src = fetchFromGitHub {
+      owner = "haya14busa";
+      repo = "vim-asterisk";
+      rev = "77e97061d6691637a034258cc415d98670698459";
+      sha256 = "1bm99j4vskbgzfn09567qi0462dvjrpdkifc4hg24bi02bx9hjrj";
+    };
+  };
+
+  vim-auto-save = buildVimPluginFrom2Nix {
+    pname = "vim-auto-save";
+    version = "2019-03-19";
+    src = fetchFromGitHub {
+      owner = "907th";
+      repo = "vim-auto-save";
+      rev = "8c1d5dc919030aa712ad7201074ffb60961e9dda";
+      sha256 = "0dj45g56n0q4advc9sgch11ghb2h5ahk601gndwy02a0937axjh2";
+    };
+  };
+
+  vim-autoformat = buildVimPluginFrom2Nix {
+    pname = "vim-autoformat";
+    version = "2020-04-03";
+    src = fetchFromGitHub {
+      owner = "Chiel92";
+      repo = "vim-autoformat";
+      rev = "555c956db3bdd8ae6f1aa5af1c5fd37eac749e6a";
+      sha256 = "0dhxa9jrhahqs1wh41115w8r3xcczbjpvnj65ldzs7q9vc4n12xq";
+    };
+  };
+
+  vim-automkdir = buildVimPluginFrom2Nix {
+    pname = "vim-automkdir";
+    version = "2016-01-17";
+    src = fetchFromGitHub {
+      owner = "benizi";
+      repo = "vim-automkdir";
+      rev = "dec143a8d9b266f73a42c63ede85bfc26280f79d";
+      sha256 = "00ix0y1ijbis8pj7pf6gv2g5z2s7kxwlr0viybwrs0li5acym6jp";
+    };
+  };
+
+  vim-bazel = buildVimPluginFrom2Nix {
+    pname = "vim-bazel";
+    version = "2019-08-14";
+    src = fetchFromGitHub {
+      owner = "bazelbuild";
+      repo = "vim-bazel";
+      rev = "7c4987b4266d117a9f1d4c7fe7f4dfba33dfc8c8";
+      sha256 = "182w8ibr34z86nmx6byabkah0q9fgrzml8m2ardaqzqjqr2ya5yg";
+    };
+  };
+
+  vim-beancount = buildVimPluginFrom2Nix {
+    pname = "vim-beancount";
+    version = "2017-10-28";
+    src = fetchFromGitHub {
+      owner = "nathangrigg";
+      repo = "vim-beancount";
+      rev = "8054352c43168ece62094dfc8ec510e347e19e3c";
+      sha256 = "0fd4fbdmhapdhjr3f9bhd4lqxzpdwwvpf64vyqwahkqn8hrrbc4m";
+    };
+  };
+
+  vim-better-whitespace = buildVimPluginFrom2Nix {
+    pname = "vim-better-whitespace";
+    version = "2020-03-24";
+    src = fetchFromGitHub {
+      owner = "ntpeters";
+      repo = "vim-better-whitespace";
+      rev = "8cf4b2175dd61416c2fe7d3234324a6c59d678de";
+      sha256 = "1iga1xdzygnr9rhv0kw01nr3vahl2d486p06slmri2vy8ngzym0q";
+    };
+  };
+
+  vim-buffergator = buildVimPluginFrom2Nix {
+    pname = "vim-buffergator";
+    version = "2018-05-02";
+    src = fetchFromGitHub {
+      owner = "jeetsukumaran";
+      repo = "vim-buffergator";
+      rev = "947b60dca4d4fc6a041a6ec84b17ca6736d1b916";
+      sha256 = "0g7ymflzfdsj5793s32gc83bidqys5dxmw455viwpqgmgjxnar5c";
+    };
+  };
+
+  vim-bufferline = buildVimPluginFrom2Nix {
+    pname = "vim-bufferline";
+    version = "2016-02-09";
+    src = fetchFromGitHub {
+      owner = "bling";
+      repo = "vim-bufferline";
+      rev = "651fd010aa9613a4b8636a4af8a2db0d22800262";
+      sha256 = "0zls47a3v8dv3h63drbak1mxf3j2x3scvclk7bjwzlk2yp447das";
+    };
+  };
+
+  vim-bufkill = buildVimPluginFrom2Nix {
+    pname = "vim-bufkill";
+    version = "2018-03-20";
+    src = fetchFromGitHub {
+      owner = "qpkorr";
+      repo = "vim-bufkill";
+      rev = "795dd38f3cff69d0d8fe9e71847907e200860959";
+      sha256 = "1nji86vjjbfjw4xy52yazq53hrlsr7v30xkx2awgiakz7ih0bdxa";
+    };
+  };
+
+  vim-choosewin = buildVimPluginFrom2Nix {
+    pname = "vim-choosewin";
+    version = "2019-09-17";
+    src = fetchFromGitHub {
+      owner = "t9md";
+      repo = "vim-choosewin";
+      rev = "f91cdb9be92ce3bb9bccba16e8c659d5e8d7454f";
+      sha256 = "1nq1vpwv6h5sc849y26nzkrmr9w3aj6w32apyih9kx0jh4ybv0xs";
+    };
+  };
+
+  vim-clojure-highlight = buildVimPluginFrom2Nix {
+    pname = "vim-clojure-highlight";
+    version = "2015-07-05";
+    src = fetchFromGitHub {
+      owner = "guns";
+      repo = "vim-clojure-highlight";
+      rev = "9ac6cb8fef04b2c243377adb671324a60952aee0";
+      sha256 = "0fg3faj0fq7b8pqr0i33qdg2xfd5966lrjl1wkq6jcgvdqamhz0y";
+    };
+  };
+
+  vim-clojure-static = buildVimPluginFrom2Nix {
+    pname = "vim-clojure-static";
+    version = "2017-10-23";
+    src = fetchFromGitHub {
+      owner = "guns";
+      repo = "vim-clojure-static";
+      rev = "fae5710a0b79555fe3296145be4f85148266771a";
+      sha256 = "0s98qrhv7xh7bvh8bm1vaxpw3n2mcxayay3k90ibgjrv1jpyvzx7";
+    };
+  };
+
+  vim-closetag = buildVimPluginFrom2Nix {
+    pname = "vim-closetag";
+    version = "2020-04-09";
+    src = fetchFromGitHub {
+      owner = "alvan";
+      repo = "vim-closetag";
+      rev = "90cf416c03ed841ad7f3d44f4d6f3192f216176a";
+      sha256 = "0kxba7s0s66m2k4j1v8iwq6m5j9843ha67br03dg7d9ya4qiyyw9";
+    };
+  };
+
+  vim-codefmt = buildVimPluginFrom2Nix {
+    pname = "vim-codefmt";
+    version = "2020-04-01";
+    src = fetchFromGitHub {
+      owner = "google";
+      repo = "vim-codefmt";
+      rev = "d3d8b8b6d73da3e1b19089f98a85901f0b652e2f";
+      sha256 = "0r20cl6i4k7r2y5d8i3dbrxmn01mlnww2qgvjgmafa8nqd16gl57";
+    };
+  };
+
+  vim-coffee-script = buildVimPluginFrom2Nix {
+    pname = "vim-coffee-script";
+    version = "2018-02-27";
+    src = fetchFromGitHub {
+      owner = "kchmck";
+      repo = "vim-coffee-script";
+      rev = "9e3b4de2a476caeb6ff21b5da20966d7c67a98bb";
+      sha256 = "1yzhyi12r508r2yjkzbcnddv3q4whjf3kchp23xs0snhwd9b981x";
+    };
+  };
+
+  vim-colemak = buildVimPluginFrom2Nix {
+    pname = "vim-colemak";
+    version = "2016-10-16";
+    src = fetchFromGitHub {
+      owner = "kalbasit";
+      repo = "vim-colemak";
+      rev = "6ac1c0bf362845355c65dfeab9a9987c1b4dc7ec";
+      sha256 = "1li7yc5vglrhf7w7i7gs2i7ihdb1bhx85basmpgqlf7790lv1599";
+    };
+  };
+
+  vim-colors-solarized = buildVimPluginFrom2Nix {
+    pname = "vim-colors-solarized";
+    version = "2011-05-09";
+    src = fetchFromGitHub {
+      owner = "altercation";
+      repo = "vim-colors-solarized";
+      rev = "528a59f26d12278698bb946f8fb82a63711eec21";
+      sha256 = "05d3lmd1shyagvr3jygqghxd3k8a4vp32723fvxdm57fdrlyzcm1";
+    };
+  };
+
+  vim-colorschemes = buildVimPluginFrom2Nix {
+    pname = "vim-colorschemes";
+    version = "2019-02-24";
+    src = fetchFromGitHub {
+      owner = "flazz";
+      repo = "vim-colorschemes";
+      rev = "9e7ab1cfec5d3db85aa1c4e87329fd869ecf94e9";
+      sha256 = "0w9q41rl9g319xw2xs2yf34h3pdkq8a2pmh4gf9gb72v2k5z0dbm";
+    };
+  };
+
+  vim-colorstepper = buildVimPluginFrom2Nix {
+    pname = "vim-colorstepper";
+    version = "2016-01-28";
+    src = fetchFromGitHub {
+      owner = "jonbri";
+      repo = "vim-colorstepper";
+      rev = "f23ba0d995d41508a2dc9471cf31d3d01a4b5f05";
+      sha256 = "05ykxn0gmh8liz0zv5hb8df1ajggxp88izq3825m0yb3ma3k1jqs";
+    };
+  };
+
+  vim-commentary = buildVimPluginFrom2Nix {
+    pname = "vim-commentary";
+    version = "2019-11-18";
+    src = fetchFromGitHub {
+      owner = "tpope";
+      repo = "vim-commentary";
+      rev = "f8238d70f873969fb41bf6a6b07ca63a4c0b82b1";
+      sha256 = "09d81q9na7pvvrmxxqy09ffdzsx5v5dikinb704c9wm4ys2bidr9";
+    };
+  };
+
+  vim-cool = buildVimPluginFrom2Nix {
+    pname = "vim-cool";
+    version = "2018-01-11";
+    src = fetchFromGitHub {
+      owner = "romainl";
+      repo = "vim-cool";
+      rev = "06918c36b3396af0bec1e87e748a5dba55be87b9";
+      sha256 = "099sbjdk944bnivqgqgbjplczfm3k84583ryrmpqf3lgrq6pl8wr";
+    };
+  };
+
+  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";
+    };
+  };
+
+  vim-csharp = buildVimPluginFrom2Nix {
+    pname = "vim-csharp";
+    version = "2017-03-29";
+    src = fetchFromGitHub {
+      owner = "OrangeT";
+      repo = "vim-csharp";
+      rev = "b5982fc69bba7d507638a308d6875b031054280d";
+      sha256 = "16sf3yqvd36b4rkrh6w7jskvlkrgymwa13xcvh586lmlc7g6ilcx";
+    };
+  };
+
+  vim-css-color = buildVimPluginFrom2Nix {
+    pname = "vim-css-color";
+    version = "2019-08-28";
+    src = fetchFromGitHub {
+      owner = "ap";
+      repo = "vim-css-color";
+      rev = "1f9fe5c1f9e0a6bfc41b14d070f4d878d445ae96";
+      sha256 = "0h0hdv492kw0gs8kn62gyvs29pjwvvg8gbsisx4wpw6qa6w457hn";
+    };
+  };
+
+  vim-cue = buildVimPluginFrom2Nix {
+    pname = "vim-cue";
+    version = "2020-02-06";
+    src = fetchFromGitHub {
+      owner = "jjo";
+      repo = "vim-cue";
+      rev = "482f0b1df03f59bbd1bf4bca99314770289a7f35";
+      sha256 = "05c9amxpn4zyb8hvcnzrzq43r70hzs32rhn5rjaf5jflgmwaph0q";
+    };
+  };
+
+  vim-cursorword = buildVimPluginFrom2Nix {
+    pname = "vim-cursorword";
+    version = "2020-03-19";
+    src = fetchFromGitHub {
+      owner = "itchyny";
+      repo = "vim-cursorword";
+      rev = "b5f8a4b148b566626210d0c1f6b63036b62322bb";
+      sha256 = "0a4gznfxmg7a62xwk4mmjcxykcgmm7mh5vv7n5hskxjczdrvl400";
+    };
+  };
+
+  vim-cute-python = buildVimPluginFrom2Nix {
+    pname = "vim-cute-python";
+    version = "2016-04-04";
+    src = fetchFromGitHub {
+      owner = "ehamberg";
+      repo = "vim-cute-python";
+      rev = "d7a6163f794500447242df2bedbe20bd751b92da";
+      sha256 = "1jrfd6z84cdzn3yxdfp0xfxygscq7s8kbzxk37hf9cf5pl9ln0qf";
+    };
+  };
+
+  vim-dadbod = buildVimPluginFrom2Nix {
+    pname = "vim-dadbod";
+    version = "2020-04-09";
+    src = fetchFromGitHub {
+      owner = "tpope";
+      repo = "vim-dadbod";
+      rev = "62646c502fac1455318933b9ea13ec5899ba7c84";
+      sha256 = "0qpgx81xpwr3ab3ardp820aqifvxh2jsk1qw94p26q6iiab7kdcv";
+    };
+  };
+
+  vim-dasht = buildVimPluginFrom2Nix {
+    pname = "vim-dasht";
+    version = "2019-09-29";
+    src = fetchFromGitHub {
+      owner = "sunaku";
+      repo = "vim-dasht";
+      rev = "9c7484eaea26b8dd1edd8af21a38cee6c4ef4f49";
+      sha256 = "1rjckipy7b4ygwvc1hbc24da1x3pwklbkfljrz16znlcm2y5q72k";
+    };
+  };
+
+  vim-devicons = buildVimPluginFrom2Nix {
+    pname = "vim-devicons";
+    version = "2020-04-11";
+    src = fetchFromGitHub {
+      owner = "ryanoasis";
+      repo = "vim-devicons";
+      rev = "58e57b6eeb407dba7ff6e607342c08c32b6fd398";
+      sha256 = "0czkkhj2s9vjis5h4gajvnqc1nraxyqhyvzk2ndffhnzxvylhd5w";
+    };
+  };
+
+  vim-diminactive = buildVimPluginFrom2Nix {
+    pname = "vim-diminactive";
+    version = "2017-08-27";
+    src = fetchFromGitHub {
+      owner = "blueyed";
+      repo = "vim-diminactive";
+      rev = "6f2e14e6ff6a038285937c378ec3685e6ff7ee36";
+      sha256 = "14jf5hh3v2f5wb10v09ygx15pxbwziv20pwv0fqkakxwf0vqwd50";
+    };
+  };
+
+  vim-dirdiff = buildVimPluginFrom2Nix {
+    pname = "vim-dirdiff";
+    version = "2020-03-31";
+    src = fetchFromGitHub {
+      owner = "will133";
+      repo = "vim-dirdiff";
+      rev = "5bf29d8a41b4ec93e6c04b9d4a6c626b408c27c5";
+      sha256 = "0nvhsj12gsjgncpmvg8b1qz675ghfcsib5gj22p7j4l4brih563r";
+    };
+  };
+
+  vim-dirvish = buildVimPluginFrom2Nix {
+    pname = "vim-dirvish";
+    version = "2020-02-24";
+    src = fetchFromGitHub {
+      owner = "justinmk";
+      repo = "vim-dirvish";
+      rev = "0a53fadc22ab6df6aed9cc580c9e498715870522";
+      sha256 = "09q5xpc4xbskzxppp66ypzd5mnic5bcwxahmhb259ch9xs8qmrc6";
+    };
+  };
+
+  vim-dispatch = buildVimPluginFrom2Nix {
+    pname = "vim-dispatch";
+    version = "2020-02-10";
+    src = fetchFromGitHub {
+      owner = "tpope";
+      repo = "vim-dispatch";
+      rev = "3757ddad87073a6ded8c34dfabb28c325acf6c02";
+      sha256 = "0vnkwn896v9dsqf329nvdik60bm6f0m0n32x3fqmzazqgqlx055j";
+    };
+  };
+
+  vim-docbk = buildVimPluginFrom2Nix {
+    pname = "vim-docbk";
+    version = "2015-04-01";
+    src = fetchFromGitHub {
+      owner = "jhradilek";
+      repo = "vim-docbk";
+      rev = "6ac0346ce96dbefe982b9e765a81c072997f2e9e";
+      sha256 = "1jnx39m152hf9j620ygagaydg6h8m8gxkr1fmxj6kgqf71jr0n9d";
+    };
+  };
+
+  vim-docbk-snippets = buildVimPluginFrom2Nix {
+    pname = "vim-docbk-snippets";
+    version = "2019-09-13";
+    src = fetchFromGitHub {
+      owner = "jhradilek";
+      repo = "vim-snippets";
+      rev = "b8604893f46f6c570a55efff733f0371ac8a805d";
+      sha256 = "1qz3azgzv9718s2a6h8xw5nrvs4j776csmzsn9chvykdpx8rwim1";
+    };
+  };
+
+  vim-easy-align = buildVimPluginFrom2Nix {
+    pname = "vim-easy-align";
+    version = "2019-04-29";
+    src = fetchFromGitHub {
+      owner = "junegunn";
+      repo = "vim-easy-align";
+      rev = "12dd6316974f71ce333e360c0260b4e1f81169c3";
+      sha256 = "0gpfdla8shaf5ykgakrsf0h0w6ygvwcv3lfpnki24l790xhdi606";
+    };
+  };
+
+  vim-easygit = buildVimPluginFrom2Nix {
+    pname = "vim-easygit";
+    version = "2018-07-08";
+    src = fetchFromGitHub {
+      owner = "neoclide";
+      repo = "vim-easygit";
+      rev = "9770370a35838f70eda91d0c3006d0563ccc8d2a";
+      sha256 = "1a42s0nymakz20rjrpwmiqpnlndrkdakzbm53aclzcs61i9zq2k8";
+    };
+  };
+
+  vim-easymotion = buildVimPluginFrom2Nix {
+    pname = "vim-easymotion";
+    version = "2020-02-08";
+    src = fetchFromGitHub {
+      owner = "easymotion";
+      repo = "vim-easymotion";
+      rev = "dd7b4b526775bc8553e16bc402020573b04a948c";
+      sha256 = "1dhhq1y6xa3q26irclad6254q89xpnxglfd92v3bq01l4p41zcqf";
+    };
+  };
+
+  vim-easytags = buildVimPluginFrom2Nix {
+    pname = "vim-easytags";
+    version = "2015-07-01";
+    src = fetchFromGitHub {
+      owner = "xolox";
+      repo = "vim-easytags";
+      rev = "72a8753b5d0a951e547c51b13633f680a95b5483";
+      sha256 = "0i8ha1fa5d860b1mi0xp8kwsgb0b9vbzcg1bldzv6s5xd9yyi12i";
+    };
+  };
+
+  vim-eighties = buildVimPluginFrom2Nix {
+    pname = "vim-eighties";
+    version = "2016-12-15";
+    src = fetchFromGitHub {
+      owner = "justincampbell";
+      repo = "vim-eighties";
+      rev = "1a6ea42ead1e31524ec94cfefb6afc1d8dacd170";
+      sha256 = "1yh1kny28c7f5qm52y7xd5aj4mycksfb0x1zvcb37c73ycdxc1v2";
+    };
+  };
+
+  vim-elixir = buildVimPluginFrom2Nix {
+    pname = "vim-elixir";
+    version = "2020-03-27";
+    src = fetchFromGitHub {
+      owner = "elixir-editors";
+      repo = "vim-elixir";
+      rev = "47d05df7fb41493821b0b3e3db72d5faeae3aecd";
+      sha256 = "10r9h359bla9gy48kvf2681r7gzk7klwrf488xc1rjzhgd41ila1";
+    };
+  };
+
+  vim-elm-syntax = buildVimPluginFrom2Nix {
+    pname = "vim-elm-syntax";
+    version = "2020-01-25";
+    src = fetchFromGitHub {
+      owner = "andys8";
+      repo = "vim-elm-syntax";
+      rev = "846a5929bff5795256fbca96707e451dbc755e36";
+      sha256 = "05jkx4dbkb646wy0igqpwc55iamm0a030dswhirg6nyl3x6qzgym";
+    };
+  };
+
+  vim-endwise = buildVimPluginFrom2Nix {
+    pname = "vim-endwise";
+    version = "2019-11-13";
+    src = fetchFromGitHub {
+      owner = "tpope";
+      repo = "vim-endwise";
+      rev = "bf90d8be447de667f4532b934d1a70881be56dd8";
+      sha256 = "1czx891via5783yk222mhki94wvq75hxxp1xk1d5m90vwqb3azfn";
+    };
+  };
+
+  vim-eunuch = buildVimPluginFrom2Nix {
+    pname = "vim-eunuch";
+    version = "2020-01-16";
+    src = fetchFromGitHub {
+      owner = "tpope";
+      repo = "vim-eunuch";
+      rev = "33e875b31c8b811a0a47908884a5e2339106bbe8";
+      sha256 = "1xadb22kd40swmww0qxmmkcpcq6viy8l167pjck5q32hfngll5d3";
+    };
+  };
+
+  vim-exchange = buildVimPluginFrom2Nix {
+    pname = "vim-exchange";
+    version = "2017-01-27";
+    src = fetchFromGitHub {
+      owner = "tommcdo";
+      repo = "vim-exchange";
+      rev = "05d82b87711c6c8b9b7389bfb91c24bc4f62aa87";
+      sha256 = "09fa156y8pxpzdbngifa7yzg1vjg1fjsgp1h9inj818zbig8mamb";
+    };
+  };
+
+  vim-expand-region = buildVimPluginFrom2Nix {
+    pname = "vim-expand-region";
+    version = "2013-08-19";
+    src = fetchFromGitHub {
+      owner = "terryma";
+      repo = "vim-expand-region";
+      rev = "966513543de0ddc2d673b5528a056269e7917276";
+      sha256 = "0l30wjlk4vxr16f1njnvf8aw9yg9p9jisvcxbcg3znsq5q8ix6zv";
+    };
+  };
+
+  vim-extradite = buildVimPluginFrom2Nix {
+    pname = "vim-extradite";
+    version = "2019-05-08";
+    src = fetchFromGitHub {
+      owner = "int3";
+      repo = "vim-extradite";
+      rev = "58c77fffbb5d61eb0b87c8b4ef0ad78e9659d621";
+      sha256 = "1mm2icx50q5iyhaz1dypnbqh14s1wsnw8skpxcm1klhqn02zk46f";
+    };
+  };
+
+  vim-fetch = buildVimPluginFrom2Nix {
+    pname = "vim-fetch";
+    version = "2020-01-31";
+    src = fetchFromGitHub {
+      owner = "wsdjeg";
+      repo = "vim-fetch";
+      rev = "dd674b50b261275a6a75cab6929b7bb7c5c4acba";
+      sha256 = "1hadfzhzkq2n9k3yga55fsl6nm5mgl2vv975jnxsi4qgz9cwcsgr";
+    };
+  };
+
+  vim-fireplace = buildVimPluginFrom2Nix {
+    pname = "vim-fireplace";
+    version = "2019-12-15";
+    src = fetchFromGitHub {
+      owner = "tpope";
+      repo = "vim-fireplace";
+      rev = "63d7209ff4f17d4bdc30f3478986b5bd44a47a3e";
+      sha256 = "1n0p70w0qmbxffchxsmklraxqrzg1q6bwnp4qhy0xjcz89p3fzx5";
+    };
+  };
+
+  vim-fish = buildVimPluginFrom2Nix {
+    pname = "vim-fish";
+    version = "2017-11-22";
+    src = fetchFromGitHub {
+      owner = "dag";
+      repo = "vim-fish";
+      rev = "50b95cbbcd09c046121367d49039710e9dc9c15f";
+      sha256 = "1yvjlm90alc4zsdsppkmsja33wsgm2q6kkn9dxn6xqwnq4jw5s7h";
+    };
+  };
+
+  vim-flagship = buildVimPluginFrom2Nix {
+    pname = "vim-flagship";
+    version = "2019-12-09";
+    src = fetchFromGitHub {
+      owner = "tpope";
+      repo = "vim-flagship";
+      rev = "e522bd0ffb0e329f695ead7d4288a6245ff22410";
+      sha256 = "0vqkdzd7b204kbinn12jk306kc9bn2f0yaifj49swd0g8hv6dk4b";
+    };
+  };
+
+  vim-flake8 = buildVimPluginFrom2Nix {
+    pname = "vim-flake8";
+    version = "2020-04-05";
+    src = fetchFromGitHub {
+      owner = "nvie";
+      repo = "vim-flake8";
+      rev = "0c7cf6dc038223b44e3c0a702fe2acf997768e8a";
+      sha256 = "14k1b7gjj1sh40qsf4wxbn0dymmc4jvsrd9pacsr6li273aiy6gq";
+    };
+  };
+
+  vim-flatbuffers = buildVimPluginFrom2Nix {
+    pname = "vim-flatbuffers";
+    version = "2018-10-11";
+    src = fetchFromGitHub {
+      owner = "dcharbon";
+      repo = "vim-flatbuffers";
+      rev = "ecd75c33576d982f3c83545dff7b3c9245285e75";
+      sha256 = "1mfi9als56cpfsz3s91hg3lci8zn7pr9s0l690wqh40vh57d1gxm";
+    };
+  };
+
+  vim-flutter = buildVimPluginFrom2Nix {
+    pname = "vim-flutter";
+    version = "2019-09-29";
+    src = fetchFromGitHub {
+      owner = "thosakwe";
+      repo = "vim-flutter";
+      rev = "030a4e609f8f38922fa4ec9a27836d9dabaae957";
+      sha256 = "0jibmr0v0pqml1cprs3qmkhhmacpb2bwpk8lhaz4dzp8jlga9g00";
+    };
+  };
+
+  vim-fsharp = buildVimPluginFrom2Nix {
+    pname = "vim-fsharp";
+    version = "2018-11-13";
+    src = fetchFromGitHub {
+      owner = "fsharp";
+      repo = "vim-fsharp";
+      rev = "012d98c981139976551a4d9779f5cce7f8d84d5c";
+      sha256 = "0ds300kjhm352ni3fwivsrnc9ls021d2x29f4cdszillamcgs7pw";
+    };
+  };
+
+  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";
+    };
+  };
+
+  vim-fugitive = buildVimPluginFrom2Nix {
+    pname = "vim-fugitive";
+    version = "2020-04-12";
+    src = fetchFromGitHub {
+      owner = "tpope";
+      repo = "vim-fugitive";
+      rev = "85e2c73830b6bb01ce7fc3a926d2b25836a253eb";
+      sha256 = "1zbw8cnjl9m59grr65kfkgi8p4850rjp24f1plp4jhidjmsfhv7x";
+    };
+  };
+
+  vim-ghost = buildVimPluginFrom2Nix {
+    pname = "vim-ghost";
+    version = "2019-01-05";
+    src = fetchFromGitHub {
+      owner = "raghur";
+      repo = "vim-ghost";
+      rev = "156f393d9c45a5c9dd16f9316a9ad125da67c449";
+      sha256 = "0b21yamsfrljk3mfjql0gzsv5mv24qwbs551hxqsapgmrv7j2acg";
+    };
+  };
+
+  vim-gist = buildVimPluginFrom2Nix {
+    pname = "vim-gist";
+    version = "2020-01-29";
+    src = fetchFromGitHub {
+      owner = "mattn";
+      repo = "vim-gist";
+      rev = "2158eceb210b0a354bc17aa4144554e5d8bb6c79";
+      sha256 = "1dz33c63q7gghz35hyrvbshqw20faccs7bvxlda5w70mkbz9h9c4";
+    };
+  };
+
+  vim-gista = buildVimPluginFrom2Nix {
+    pname = "vim-gista";
+    version = "2020-01-04";
+    src = fetchFromGitHub {
+      owner = "lambdalisue";
+      repo = "vim-gista";
+      rev = "af13c0062a46d73384f15abee5a54e164fcaad8e";
+      sha256 = "0f3pxahsaj37iln1k3289h7pj7z4fm0z3vfd0szf1spv3hzcjapd";
+    };
+  };
+
+  vim-gitbranch = buildVimPluginFrom2Nix {
+    pname = "vim-gitbranch";
+    version = "2017-05-27";
+    src = fetchFromGitHub {
+      owner = "itchyny";
+      repo = "vim-gitbranch";
+      rev = "8118dc1cdd387bd609852be4bf350360ce881193";
+      sha256 = "01gvd96mnzfc5s0951zzq122birg5svnximkldgb9kv5bmsnmh3j";
+    };
+  };
+
+  vim-gitgutter = buildVimPluginFrom2Nix {
+    pname = "vim-gitgutter";
+    version = "2020-04-03";
+    src = fetchFromGitHub {
+      owner = "airblade";
+      repo = "vim-gitgutter";
+      rev = "b7db78b258aa9925f3c86968b348413732964b3b";
+      sha256 = "0933b60bma8xs7cmw1p2npfzyqmpww3frmcg51dsg2hsg9rq213q";
+    };
+  };
+
+  vim-github-dashboard = buildVimPluginFrom2Nix {
+    pname = "vim-github-dashboard";
+    version = "2018-09-03";
+    src = fetchFromGitHub {
+      owner = "junegunn";
+      repo = "vim-github-dashboard";
+      rev = "8012a2016a9e39a50081c9d5db2deb09ae4a6010";
+      sha256 = "0jkr6mz5zcpbyswmiyprcbm8l93lkg5sr46r8kyds1n2vz19cf7x";
+    };
+  };
+
+  vim-glsl = buildVimPluginFrom2Nix {
+    pname = "vim-glsl";
+    version = "2019-11-01";
+    src = fetchFromGitHub {
+      owner = "tikhomirov";
+      repo = "vim-glsl";
+      rev = "fbdb226318e3e1747b29f31ad07c0cce07e9f22a";
+      sha256 = "076fny258ynamnd1mnknmp1zlafvvxpx7p28985mms84k65ihvy5";
+    };
+  };
+
+  vim-go = buildVimPluginFrom2Nix {
+    pname = "vim-go";
+    version = "2020-04-12";
+    src = fetchFromGitHub {
+      owner = "fatih";
+      repo = "vim-go";
+      rev = "b995086646f29de25acbe7df2c08cc196c4641d7";
+      sha256 = "12s04gnnkkmhlm36gxpy18ngxj88b9p5b6vzdq662gmwl3wk98nc";
+    };
+  };
+
+  vim-grammarous = buildVimPluginFrom2Nix {
+    pname = "vim-grammarous";
+    version = "2019-03-30";
+    src = fetchFromGitHub {
+      owner = "rhysd";
+      repo = "vim-grammarous";
+      rev = "083cbee6094c9ec347d7c75af421be27d2ec7e70";
+      sha256 = "1cxycr2ijzxn9d5xgp9ri4f2i4d87a3100nsc11iwa2bzir4xsiz";
+    };
+  };
+
+  vim-grepper = buildVimPluginFrom2Nix {
+    pname = "vim-grepper";
+    version = "2019-12-09";
+    src = fetchFromGitHub {
+      owner = "mhinz";
+      repo = "vim-grepper";
+      rev = "dde6a660c7dd4e02b331da238ea477770073aca2";
+      sha256 = "0c411yg2s6wb8141lqpgasg7iwgvfwy88z6l0c0gccmk8knypxhm";
+    };
+  };
+
+  vim-gui-position = buildVimPluginFrom2Nix {
+    pname = "vim-gui-position";
+    version = "2019-06-06";
+    src = fetchFromGitHub {
+      owner = "brennanfee";
+      repo = "vim-gui-position";
+      rev = "065d0dcf96c28cfc0003d72c1b3c49203632f62a";
+      sha256 = "11kv9kkya9sybslg7lfhhcn2fi3n735zvprg8ch6kd58m82xr4n3";
+    };
+  };
+
+  vim-gutentags = buildVimPluginFrom2Nix {
+    pname = "vim-gutentags";
+    version = "2020-02-15";
+    src = fetchFromGitHub {
+      owner = "ludovicchabant";
+      repo = "vim-gutentags";
+      rev = "96cd7dbfe324e8983da68468085967e0b85dc898";
+      sha256 = "15xvknzy2r178jh0w76cagmxprxsznzk0zgv41h33rns4hy5q1vf";
+    };
+  };
+
+  vim-hardtime = buildVimPluginFrom2Nix {
+    pname = "vim-hardtime";
+    version = "2017-03-31";
+    src = fetchFromGitHub {
+      owner = "takac";
+      repo = "vim-hardtime";
+      rev = "d9128568afa62947b7ac8f12c22d88e3de526a6b";
+      sha256 = "097wzfh4n4fnsq2gx4hbmyr731ciky8qcai5aiyh2baybvwshmr5";
+    };
+  };
+
+  vim-haskellconceal = buildVimPluginFrom2Nix {
+    pname = "vim-haskellconceal";
+    version = "2017-06-15";
+    src = fetchFromGitHub {
+      owner = "twinside";
+      repo = "vim-haskellconceal";
+      rev = "802f82a5afee56e9e1251e6f756104a3bd114234";
+      sha256 = "1kh6853hi4rgl4z1xs8kz9l1q9w7lh0r42y2m0rabfpr6yh3091r";
+    };
+  };
+
+  vim-haskellConcealPlus = buildVimPluginFrom2Nix {
+    pname = "vim-haskellConcealPlus";
+    version = "2020-01-21";
+    src = fetchFromGitHub {
+      owner = "enomsg";
+      repo = "vim-haskellConcealPlus";
+      rev = "d59da33c16966f694b2e4f0bfc57515a935da83f";
+      sha256 = "1y2hgcpls21738lhrgimsxnkhxxqczp05nmk68s28xssbn4dqgma";
+    };
+  };
+
+  vim-hdevtools = buildVimPluginFrom2Nix {
+    pname = "vim-hdevtools";
+    version = "2018-11-19";
+    src = fetchFromGitHub {
+      owner = "bitc";
+      repo = "vim-hdevtools";
+      rev = "ab33578bbdbcbd80050faf43e4adee1653fe34dc";
+      sha256 = "1xvjz6yidcywn1xmdqlxsz68lmkx6rmiqf6q2gfz56pzq1mfmski";
+    };
+  };
+
+  vim-hier = buildVimPluginFrom2Nix {
+    pname = "vim-hier";
+    version = "2011-08-27";
+    src = fetchFromGitHub {
+      owner = "jceb";
+      repo = "vim-hier";
+      rev = "0b8c365263551a67404ebd7e528c55e17c1d3de7";
+      sha256 = "118pd9sx1bl9vfr89xrf536hfx4l162a43a1qpwpkqxzb9a3ca7n";
+    };
+  };
+
+  vim-highlightedyank = buildVimPluginFrom2Nix {
+    pname = "vim-highlightedyank";
+    version = "2020-03-05";
+    src = fetchFromGitHub {
+      owner = "machakann";
+      repo = "vim-highlightedyank";
+      rev = "931cc6bd53e4a1fdbe592751f0e13c0e401f0a49";
+      sha256 = "091qw0zlc80micn29wb6r8m4f7pplcv8bx1yfvbn3cba77qyj3nb";
+    };
+  };
+
+  vim-hindent = buildVimPluginFrom2Nix {
+    pname = "vim-hindent";
+    version = "2018-07-31";
+    src = fetchFromGitHub {
+      owner = "alx741";
+      repo = "vim-hindent";
+      rev = "f8e84c199fd00a3ccaf5bbbc97786bde9a4faa13";
+      sha256 = "1y4nnz38zal1ffs5n751dn9p9apk8q7pq3cw79r5z6fsdp942ai6";
+    };
+  };
+
+  vim-hoogle = buildVimPluginFrom2Nix {
+    pname = "vim-hoogle";
+    version = "2018-03-04";
+    src = fetchFromGitHub {
+      owner = "Twinside";
+      repo = "vim-hoogle";
+      rev = "871d104c92e33cb238506f2805f1652561978cc8";
+      sha256 = "17qvi57g72ijgk7nczczli3kcphvdf625fzqbqcmqpsawgvfd07n";
+    };
+  };
+
+  vim-html-template-literals = buildVimPluginFrom2Nix {
+    pname = "vim-html-template-literals";
+    version = "2020-02-07";
+    src = fetchFromGitHub {
+      owner = "jonsmithers";
+      repo = "vim-html-template-literals";
+      rev = "3b370b69bce94bdeb0ca7137f548356f775cadcc";
+      sha256 = "1wmyxscyqs6344jsn839dyrx7k3iiwv07ic9gxh5d93g5s3c3pml";
+    };
+  };
+
+  vim-husk = buildVimPluginFrom2Nix {
+    pname = "vim-husk";
+    version = "2015-11-29";
+    src = fetchFromGitHub {
+      owner = "vim-utils";
+      repo = "vim-husk";
+      rev = "ad89559ff8a6c4b1e94a18b2d494a69a1f701d08";
+      sha256 = "09kqzaqa4jdh31q0a3nxbx9li7zg890qxh68rfzblzyx22xv4mka";
+    };
+  };
+
+  vim-hybrid-material = buildVimPluginFrom2Nix {
+    pname = "vim-hybrid-material";
+    version = "2018-11-12";
+    src = fetchFromGitHub {
+      owner = "kristijanhusak";
+      repo = "vim-hybrid-material";
+      rev = "f2e92ac7e5c4bb75d72f0abaea939e4364e00e2e";
+      sha256 = "01b9n598106qh68ky3fykczq13pldi221r7lrxvg0vnv2zp1z5qd";
+    };
+  };
+
+  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";
+    };
+  };
+
+  vim-illuminate = buildVimPluginFrom2Nix {
+    pname = "vim-illuminate";
+    version = "2020-02-21";
+    src = fetchFromGitHub {
+      owner = "RRethy";
+      repo = "vim-illuminate";
+      rev = "80dafb9b0e7b9f4ce7c843d4104f455c8c5b1f42";
+      sha256 = "1yijaj1dqfmw4dsdmgj01sxizyraisxwjqh2hhbq93pdln4lm51f";
+    };
+  };
+
+  vim-indent-guides = buildVimPluginFrom2Nix {
+    pname = "vim-indent-guides";
+    version = "2018-05-14";
+    src = fetchFromGitHub {
+      owner = "nathanaelkane";
+      repo = "vim-indent-guides";
+      rev = "54d889a63716ee2f1818aa2ec5082db47147147b";
+      sha256 = "0ahlbjv2ibhhnf9zqn85b2sh3wf9l0kmg2qmavz3z5fmf8sqljj2";
+    };
+  };
+
+  vim-indent-object = buildVimPluginFrom2Nix {
+    pname = "vim-indent-object";
+    version = "2018-04-08";
+    src = fetchFromGitHub {
+      owner = "michaeljsmith";
+      repo = "vim-indent-object";
+      rev = "5c5b24c959478929b54a9e831a8e2e651a465965";
+      sha256 = "1kmwnz0jxjkvfzy06r7r73pcxfcyjp8p8m2d6qrhjfvzidgfhw19";
+    };
+  };
+
+  vim-indentwise = buildVimPluginFrom2Nix {
+    pname = "vim-indentwise";
+    version = "2015-06-07";
+    src = fetchFromGitHub {
+      owner = "jeetsukumaran";
+      repo = "vim-indentwise";
+      rev = "608bd6876d3b56d469e0e615eb774a6e06095dbf";
+      sha256 = "0bnzk1afi88icq58389nxqz196gkxcj71qrxvw87d72h2zaspvcx";
+    };
+  };
+
+  vim-indexed-search = buildVimPluginFrom2Nix {
+    pname = "vim-indexed-search";
+    version = "2019-07-04";
+    src = fetchFromGitHub {
+      owner = "henrik";
+      repo = "vim-indexed-search";
+      rev = "5af020bba084b699d0453f242d7d76711d64b1e3";
+      sha256 = "0cq265yqksh7jqazxn7qxr7bclrk2pq7py4c29wspsvbi0m3m8rc";
+    };
+  };
+
+  vim-ipython = buildVimPluginFrom2Nix {
+    pname = "vim-ipython";
+    version = "2015-06-23";
+    src = fetchFromGitHub {
+      owner = "ivanov";
+      repo = "vim-ipython";
+      rev = "42499f094b805b90b683afa5009cee99abd0bb75";
+      sha256 = "10wpfvfs8yv1bvzra4d5zy5glp62gbalpayxx7mkalhr2ccppy3x";
+    };
+  };
+
+  vim-isort = buildVimPluginFrom2Nix {
+    pname = "vim-isort";
+    version = "2019-06-08";
+    src = fetchFromGitHub {
+      owner = "fisadev";
+      repo = "vim-isort";
+      rev = "b749d009075a333634dc61a039a2dc0e7f34609c";
+      sha256 = "1h8s21kwbjdg632jvd46r2va7il4f1dbgwfw8fkds0n08rbnpdjw";
+    };
+  };
+
+  vim-janah = buildVimPluginFrom2Nix {
+    pname = "vim-janah";
+    version = "2018-10-01";
+    src = fetchFromGitHub {
+      owner = "mhinz";
+      repo = "vim-janah";
+      rev = "3b8ae976987b6ade2abeac25f0208e8bc90d7138";
+      sha256 = "16bygyri9qxyhl8n8md945wwy1i9lss4hwxa7yjl9ms2fzzragv4";
+    };
+  };
+
+  vim-javacomplete2 = buildVimPluginFrom2Nix {
+    pname = "vim-javacomplete2";
+    version = "2019-12-17";
+    src = fetchFromGitHub {
+      owner = "artur-shaik";
+      repo = "vim-javacomplete2";
+      rev = "dc7951895a98c49c39622f65cdd7b39374c348bc";
+      sha256 = "1d8xiiwfg5wz57jyy7ahbi2bl5sjkhkpkqm2qbhsn7cd9vk36sxy";
+    };
+  };
+
+  vim-javascript = buildVimPluginFrom2Nix {
+    pname = "vim-javascript";
+    version = "2020-01-24";
+    src = fetchFromGitHub {
+      owner = "pangloss";
+      repo = "vim-javascript";
+      rev = "db595656304959dcc3805cf63ea9a430e3f01e8f";
+      sha256 = "0lr0506zbax41xdbfgmm70iiyqi6g8lsmwfy9112fnd9n62s32yd";
+    };
+  };
+
+  vim-javascript-syntax = buildVimPluginFrom2Nix {
+    pname = "vim-javascript-syntax";
+    version = "2019-08-21";
+    src = fetchFromGitHub {
+      owner = "jelera";
+      repo = "vim-javascript-syntax";
+      rev = "e65e4f01ba94761323450208c9bf7141428784db";
+      sha256 = "09561jf3cmzpm8jn8k34fd3av6i1mqi6n32bisri96jkabw8dpv7";
+    };
+  };
+
+  vim-jinja = buildVimPluginFrom2Nix {
+    pname = "vim-jinja";
+    version = "2016-11-16";
+    src = fetchFromGitHub {
+      owner = "lepture";
+      repo = "vim-jinja";
+      rev = "8d330a7aaf0763d080dc82204b4aaba6ac0605c6";
+      sha256 = "1n62ga02rcj7jjgzvwr46pckj59dc1zqahjgampjcwdd8vf4mg3q";
+    };
+  };
+
+  vim-jsbeautify = buildVimPluginFrom2Nix {
+    pname = "vim-jsbeautify";
+    version = "2019-10-18";
+    src = fetchFromGitHub {
+      owner = "maksimr";
+      repo = "vim-jsbeautify";
+      rev = "6003f9d420d56b91f5664ec5ed5a9a3a6d8df22b";
+      sha256 = "06gxmqyxkw2mgdy6m7b248w0gzkwsjcpyihpnyf5cajb5aw4wk13";
+      fetchSubmodules = true;
+    };
+  };
+
+  vim-jsdoc = buildVimPluginFrom2Nix {
+    pname = "vim-jsdoc";
+    version = "2019-02-08";
+    src = fetchFromGitHub {
+      owner = "heavenshell";
+      repo = "vim-jsdoc";
+      rev = "b23073449d1df98ecfe73828079115e0d1d7573b";
+      sha256 = "0r91lr3gpjbaalqln7k8kv4q88w9rclfyji87yzmnr3apjaazyjj";
+    };
+  };
+
+  vim-json = buildVimPluginFrom2Nix {
+    pname = "vim-json";
+    version = "2018-01-10";
+    src = fetchFromGitHub {
+      owner = "elzr";
+      repo = "vim-json";
+      rev = "3727f089410e23ae113be6222e8a08dd2613ecf2";
+      sha256 = "1c19pqrys45pzflj5jyrm4q6hcvs977lv6qsfvbnk7nm4skxrqp1";
+    };
+  };
+
+  vim-jsonnet = buildVimPluginFrom2Nix {
+    pname = "vim-jsonnet";
+    version = "2019-07-29";
+    src = fetchFromGitHub {
+      owner = "google";
+      repo = "vim-jsonnet";
+      rev = "b7459b36e5465515f7cf81d0bb0e66e42a7c2eb5";
+      sha256 = "0fc6xpiyxly3ibs4lzn6dk9yd2cc353qb8lavag7zmims1bncvqf";
+    };
+  };
+
+  vim-jsx-pretty = buildVimPluginFrom2Nix {
+    pname = "vim-jsx-pretty";
+    version = "2020-04-11";
+    src = fetchFromGitHub {
+      owner = "MaxMEllon";
+      repo = "vim-jsx-pretty";
+      rev = "496c44d89281d1e13c9bb4c75a2e69daba48b47b";
+      sha256 = "09xr8pbx27qpffcr0j1857cpyxgkv5xay6mgpzvynpxq21xrmm3q";
+    };
+  };
+
+  vim-kitty-navigator = buildVimPluginFrom2Nix {
+    pname = "vim-kitty-navigator";
+    version = "2019-11-04";
+    src = fetchFromGitHub {
+      owner = "knubie";
+      repo = "vim-kitty-navigator";
+      rev = "c32357892f10117291461631d51a6bfd20e72b9a";
+      sha256 = "0zqvcnbns0vbxkqr0mpiapql8cvp54nn5a6mwc7l24jr6plhiwmn";
+    };
+  };
+
+  vim-lastplace = buildVimPluginFrom2Nix {
+    pname = "vim-lastplace";
+    version = "2020-01-20";
+    src = fetchFromGitHub {
+      owner = "farmergreg";
+      repo = "vim-lastplace";
+      rev = "48ba343c8c1ca3039224727096aae214f51327d1";
+      sha256 = "0m8skd86p2cr0wz8rghj4is3fgnlh7vrw7can916li35i3hajid2";
+    };
+  };
+
+  vim-latex-live-preview = buildVimPluginFrom2Nix {
+    pname = "vim-latex-live-preview";
+    version = "2018-09-25";
+    src = fetchFromGitHub {
+      owner = "xuhdev";
+      repo = "vim-latex-live-preview";
+      rev = "855c30915547c7e9c19b7e6efb528730c071d2e8";
+      sha256 = "14fgbq7wyyhhzkd8832g07z97jg1b9awibzf3sn33ih7p5bb3hhp";
+    };
+  };
+
+  vim-lawrencium = buildVimPluginFrom2Nix {
+    pname = "vim-lawrencium";
+    version = "2019-04-10";
+    src = fetchFromGitHub {
+      owner = "ludovicchabant";
+      repo = "vim-lawrencium";
+      rev = "e0c127cb4e4224453cb88faffd4627b7da499bcb";
+      sha256 = "1gvvr04x17157iz83rv45nlbj1qaz90j0l96q3fki3h1b0fw0099";
+    };
+  };
+
+  vim-leader-guide = buildVimPluginFrom2Nix {
+    pname = "vim-leader-guide";
+    version = "2018-10-06";
+    src = fetchFromGitHub {
+      owner = "hecal3";
+      repo = "vim-leader-guide";
+      rev = "8dff63fcc29811bb30fccb135f31ad488a9a6170";
+      sha256 = "1n1qgvr729r28rprjkam0blh4qscs8bxf6ay7v8x732axg9gpyav";
+    };
+  };
+
+  vim-lean = buildVimPluginFrom2Nix {
+    pname = "vim-lean";
+    version = "2017-07-29";
+    src = fetchFromGitHub {
+      owner = "mk12";
+      repo = "vim-lean";
+      rev = "02d678e4346dce35d6b2eed9a03b2b2d3cc84127";
+      sha256 = "1yw13wf7j92gk8fwkhls6bdbz2h7xbyq4qba8zsfm76rbqn7vzfg";
+    };
+  };
+
+  vim-ledger = buildVimPluginFrom2Nix {
+    pname = "vim-ledger";
+    version = "2020-03-30";
+    src = fetchFromGitHub {
+      owner = "ledger";
+      repo = "vim-ledger";
+      rev = "47186eb47f543becc34a048a37298954d89bf7c8";
+      sha256 = "0265614sa2d2s3xpzfliq159v7bmdvlc9yyw5c89pqv4b86gjxzf";
+    };
+  };
+
+  vim-lion = buildVimPluginFrom2Nix {
+    pname = "vim-lion";
+    version = "2018-02-05";
+    src = fetchFromGitHub {
+      owner = "tommcdo";
+      repo = "vim-lion";
+      rev = "75306ac1922952ca1a401aee43ddbb304029926d";
+      sha256 = "0kkf91ppn5jhvnpmmjsp6rvf97pqj57jrbn3qmmy925ncfqh90ld";
+    };
+  };
+
+  vim-liquid = buildVimPluginFrom2Nix {
+    pname = "vim-liquid";
+    version = "2019-11-13";
+    src = fetchFromGitHub {
+      owner = "tpope";
+      repo = "vim-liquid";
+      rev = "9ebc192daec70e620c22d574b5a1c1e16f89a48c";
+      sha256 = "0cvcjiii5wv55n695284k520rrwi0l4gqpyiqnrpnhmsaqks0n0f";
+    };
+  };
+
+  vim-localvimrc = buildVimPluginFrom2Nix {
+    pname = "vim-localvimrc";
+    version = "2020-02-25";
+    src = fetchFromGitHub {
+      owner = "embear";
+      repo = "vim-localvimrc";
+      rev = "fc2f789ce7afa4bbdefbbb4599a802b39b7e7596";
+      sha256 = "19drgnsn4rb9kv30ykndwjgflsfs328dhm44a9hcp8f8faqpim3d";
+    };
+  };
+
+  vim-logreview = buildVimPluginFrom2Nix {
+    pname = "vim-logreview";
+    version = "2017-07-08";
+    src = fetchFromGitHub {
+      owner = "andreshazard";
+      repo = "vim-logreview";
+      rev = "b7b66ab338e904127d796af49235b8c29742f18f";
+      sha256 = "09lyymq0f3ybqdzhbpia7b0wcjbcyg5nkqd72qk8jkvc42da2af3";
+    };
+  };
+
+  vim-lsc = buildVimPluginFrom2Nix {
+    pname = "vim-lsc";
+    version = "2020-04-11";
+    src = fetchFromGitHub {
+      owner = "natebosch";
+      repo = "vim-lsc";
+      rev = "4da362f49254774fa5ad407ea3b2407db0147590";
+      sha256 = "0wlgj485dy4sb3hbwi8kp69d8iw2zh5xny09xv2zk174dsvp7xxx";
+    };
+  };
+
+  vim-maktaba = buildVimPluginFrom2Nix {
+    pname = "vim-maktaba";
+    version = "2020-03-20";
+    src = fetchFromGitHub {
+      owner = "google";
+      repo = "vim-maktaba";
+      rev = "b31525d7f6170c68f900abe24748ac9fbaf1ee4d";
+      sha256 = "0d6qss18dq36hvxv1if1aaylljsnp2isxajb5xh4zr4cxarrzbfi";
+    };
+  };
+
+  vim-manpager = buildVimPluginFrom2Nix {
+    pname = "vim-manpager";
+    version = "2017-05-08";
+    src = fetchFromGitHub {
+      owner = "lambdalisue";
+      repo = "vim-manpager";
+      rev = "25bdd9448651a7669659b1b8d8d7a82acdfbf8af";
+      sha256 = "0d7rg4lvyxr4v34bimxpdkynmvs606fqvv0qpi7g139ng9hv6wqm";
+    };
+  };
+
+  vim-markdown = buildVimPluginFrom2Nix {
+    pname = "vim-markdown";
+    version = "2019-07-09";
+    src = fetchFromGitHub {
+      owner = "plasticboy";
+      repo = "vim-markdown";
+      rev = "da5a7ac96f517e0fd6f886bc3fbe27156ca1f946";
+      sha256 = "198bsv88njz6l2pf9yjxb8292aj7x8n2sxi50q3cdsg29a3y2i5c";
+    };
+  };
+
+  vim-mergetool = buildVimPluginFrom2Nix {
+    pname = "vim-mergetool";
+    version = "2019-06-22";
+    src = fetchFromGitHub {
+      owner = "samoshkin";
+      repo = "vim-mergetool";
+      rev = "0275a85256ad173e3cde586d54f66566c01b607f";
+      sha256 = "1i3zil06zyndm400i2pfn64ykbs29fw8l720229a8ypp9mxcibcp";
+    };
+  };
+
+  vim-metamath = buildVimPluginFrom2Nix {
+    pname = "vim-metamath";
+    version = "2017-02-10";
+    src = fetchFromGitHub {
+      owner = "david-a-wheeler";
+      repo = "vim-metamath";
+      rev = "50aff63608256909159f1b8fc3f09ba61b2bb9bd";
+      sha256 = "0gwqafhr18wv9ygq47cxwi0k4gj1xll4z8s61w9l9vwaiy5znssh";
+    };
+  };
+
+  vim-misc = buildVimPluginFrom2Nix {
+    pname = "vim-misc";
+    version = "2015-05-21";
+    src = fetchFromGitHub {
+      owner = "xolox";
+      repo = "vim-misc";
+      rev = "3e6b8fb6f03f13434543ce1f5d24f6a5d3f34f0b";
+      sha256 = "0rd9788dyfc58py50xbiaz5j7nphyvf3rpp3yal7yq2dhf0awwfi";
+    };
+  };
+
+  vim-monokai-pro = buildVimPluginFrom2Nix {
+    pname = "vim-monokai-pro";
+    version = "2020-03-03";
+    src = fetchFromGitHub {
+      owner = "phanviet";
+      repo = "vim-monokai-pro";
+      rev = "c18f35725a5b0d569bfe6921fc4f56c029324828";
+      sha256 = "1nz8jnlhd6z9zqa9dfbxa9fabihpzz8ajlf4plkaxdy9137z1zqc";
+    };
+  };
+
+  vim-move = buildVimPluginFrom2Nix {
+    pname = "vim-move";
+    version = "2019-11-23";
+    src = fetchFromGitHub {
+      owner = "matze";
+      repo = "vim-move";
+      rev = "58049562efb0e6e077416d897b760c4dc9bb25c4";
+      sha256 = "18pnk6ri73a6dq86zh510wy1s0z1dwnsyay7lxrgirjgh3s9nhhq";
+    };
+  };
+
+  vim-mucomplete = buildVimPluginFrom2Nix {
+    pname = "vim-mucomplete";
+    version = "2020-01-22";
+    src = fetchFromGitHub {
+      owner = "lifepillar";
+      repo = "vim-mucomplete";
+      rev = "f13357964cc074d4fe747787065bfb19046f7fce";
+      sha256 = "0kqik4xgnk3cw7ls53djij086rbp49klzckc4zs4ph4cjwcpjhgq";
+    };
+  };
+
+  vim-multiple-cursors = buildVimPluginFrom2Nix {
+    pname = "vim-multiple-cursors";
+    version = "2020-02-06";
+    src = fetchFromGitHub {
+      owner = "terryma";
+      repo = "vim-multiple-cursors";
+      rev = "701e92dd4cfd1b0f511e83a96d52bc590c0218dd";
+      sha256 = "0a7fghk025f8gj5rsixi1hn8vkg2982fja7maf427v3wq74s6j1c";
+    };
+  };
+
+  vim-nerdtree-tabs = buildVimPluginFrom2Nix {
+    pname = "vim-nerdtree-tabs";
+    version = "2018-12-21";
+    src = fetchFromGitHub {
+      owner = "jistr";
+      repo = "vim-nerdtree-tabs";
+      rev = "07d19f0299762669c6f93fbadb8249da6ba9de62";
+      sha256 = "16iqhp5l6xvq0k8bq9ngqfhish1fwggpmvd7ni1fh5dqr00iii9x";
+    };
+  };
+
+  vim-nftables = buildVimPluginFrom2Nix {
+    pname = "vim-nftables";
+    version = "2020-02-21";
+    src = fetchFromGitHub {
+      owner = "nfnty";
+      repo = "vim-nftables";
+      rev = "01c7b97eff12fd4b624e6efa2c0468163db61ebc";
+      sha256 = "1n3mpaa60k4w0sqpkgw19aksa1sbcqz7vl8fp6bj6i63bhiprsqf";
+    };
+  };
+
+  vim-niceblock = buildVimPluginFrom2Nix {
+    pname = "vim-niceblock";
+    version = "2018-09-06";
+    src = fetchFromGitHub {
+      owner = "kana";
+      repo = "vim-niceblock";
+      rev = "9302f527eefc0fde8df983cbb9710ad52c4213b5";
+      sha256 = "1d0rx7s10jl1q9y5s4235imizbyxrgkm4dxh5ankcr8s617l7mz2";
+    };
+  };
+
+  vim-ninja-feet = buildVimPluginFrom2Nix {
+    pname = "vim-ninja-feet";
+    version = "2019-05-12";
+    src = fetchFromGitHub {
+      owner = "tommcdo";
+      repo = "vim-ninja-feet";
+      rev = "5b48f97bf4865a25f5f4568c45cdfd08f946ec4f";
+      sha256 = "1i3n5nlwyg65k0f0qrimbfs67l2xx39cqp4gyrycw4vzp6hs0lsc";
+    };
+  };
+
+  vim-nix = buildVimPluginFrom2Nix {
+    pname = "vim-nix";
+    version = "2019-06-03";
+    src = fetchFromGitHub {
+      owner = "LnL7";
+      repo = "vim-nix";
+      rev = "a3eed01f4de995a51dfdd06287e44fcb231f6adf";
+      sha256 = "0pwdfwws1dj3705m00ghw3dvym5zbm00bfsj023gmbp6vr8wn6yi";
+    };
+  };
+
+  vim-obsession = buildVimPluginFrom2Nix {
+    pname = "vim-obsession";
+    version = "2020-01-19";
+    src = fetchFromGitHub {
+      owner = "tpope";
+      repo = "vim-obsession";
+      rev = "96a3f837c112cb64e0a9857b69f6d6a71041155e";
+      sha256 = "11h7jyg7fhjmq3pmpc93nrsxm175ra14407rs3558h8p04snc159";
+    };
+  };
+
+  vim-one = buildVimPluginFrom2Nix {
+    pname = "vim-one";
+    version = "2019-04-09";
+    src = fetchFromGitHub {
+      owner = "rakr";
+      repo = "vim-one";
+      rev = "6695e135415c53a8fbe96672e382200aa1ffb4b4";
+      sha256 = "0951r9kw23zlwd7fda6ib2d9k0akpfd2hvh82pasgw3ks9v1n2vf";
+    };
+  };
+
+  vim-operator-replace = buildVimPluginFrom2Nix {
+    pname = "vim-operator-replace";
+    version = "2015-02-24";
+    src = fetchFromGitHub {
+      owner = "kana";
+      repo = "vim-operator-replace";
+      rev = "1345a556a321a092716e149d4765a5e17c0e9f0f";
+      sha256 = "07cibp61zwbzpjfxqdc77fzrgnz8jhimmdhhyjr0lvgrjgvsnv6q";
+    };
+  };
+
+  vim-operator-surround = buildVimPluginFrom2Nix {
+    pname = "vim-operator-surround";
+    version = "2018-11-01";
+    src = fetchFromGitHub {
+      owner = "rhysd";
+      repo = "vim-operator-surround";
+      rev = "80337a40a829cfc77b065a71d8a609e2ad7d2c8b";
+      sha256 = "0f9shg81bl39hz67ahbi6k6gbhky7gzp8by16fhiz75hbjgp9lq2";
+    };
+  };
+
+  vim-operator-user = buildVimPluginFrom2Nix {
+    pname = "vim-operator-user";
+    version = "2015-02-17";
+    src = fetchFromGitHub {
+      owner = "kana";
+      repo = "vim-operator-user";
+      rev = "c3dfd41c1ed516b4b901c97562e644de62c367aa";
+      sha256 = "16y2fyrmwg4vkcl85i8xg8s6m39ca2jvgi9qm36b3vzbnkcifafb";
+    };
+  };
+
+  vim-orgmode = buildVimPluginFrom2Nix {
+    pname = "vim-orgmode";
+    version = "2020-03-03";
+    src = fetchFromGitHub {
+      owner = "jceb";
+      repo = "vim-orgmode";
+      rev = "44faafa1d846691645b66e83f198f46afa755a6e";
+      sha256 = "1s649hksrwq70xyi8cvcd9bqcfyczga5c1g4fsas50rs107fcccn";
+    };
+  };
+
+  vim-pager = buildVimPluginFrom2Nix {
+    pname = "vim-pager";
+    version = "2015-08-26";
+    src = fetchFromGitHub {
+      owner = "lambdalisue";
+      repo = "vim-pager";
+      rev = "a657d508b4d5a23aada7585c9f1e0063914c0c45";
+      sha256 = "10xm77pia916zf9i2llyhs89s653r98l6zq8cswm7cw61bjfxvv6";
+    };
+  };
+
+  vim-pandoc = buildVimPluginFrom2Nix {
+    pname = "vim-pandoc";
+    version = "2020-03-20";
+    src = fetchFromGitHub {
+      owner = "vim-pandoc";
+      repo = "vim-pandoc";
+      rev = "c473c298d570622d520f455698a95356e55d6dcf";
+      sha256 = "1j4plsm7md6yhis8bmgznwln12gnnm0lg9wvxgydqd6wxrc6hfnd";
+    };
+  };
+
+  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";
+    };
+  };
+
+  vim-pandoc-syntax = buildVimPluginFrom2Nix {
+    pname = "vim-pandoc-syntax";
+    version = "2020-01-31";
+    src = fetchFromGitHub {
+      owner = "vim-pandoc";
+      repo = "vim-pandoc-syntax";
+      rev = "0d1129e5cf1b0e3a90e923c3b5f40133bf153f7c";
+      sha256 = "162l2p8md8lfyfjxzlmlz5ky5kvvr6wjmdk8r8lk6ygpkl2b51f7";
+    };
+  };
+
+  vim-parinfer = buildVimPluginFrom2Nix {
+    pname = "vim-parinfer";
+    version = "2020-02-04";
+    src = fetchFromGitHub {
+      owner = "bhurlow";
+      repo = "vim-parinfer";
+      rev = "a8c075ce5256bffbf1f62e08aba37dca88d0cf1a";
+      sha256 = "1v2pyjyxvqw2kl9j4pdpdlbl2q3jnndcb8iqgyygs7jn91c4s073";
+    };
+  };
+
+  vim-pasta = buildVimPluginFrom2Nix {
+    pname = "vim-pasta";
+    version = "2018-09-08";
+    src = fetchFromGitHub {
+      owner = "sickill";
+      repo = "vim-pasta";
+      rev = "cb4501a123d74fc7d66ac9f10b80c9d393746c66";
+      sha256 = "14rswwx24i75xzgkbx1hywan1msn2ki26353ly2pyvznnqss1pwq";
+    };
+  };
+
+  vim-pathogen = buildVimPluginFrom2Nix {
+    pname = "vim-pathogen";
+    version = "2020-01-17";
+    src = fetchFromGitHub {
+      owner = "tpope";
+      repo = "vim-pathogen";
+      rev = "c6bc42404597c718e4a032a98e21e63321cbb05a";
+      sha256 = "1scj84vlrn2kavnq2wabhdzhnlkb3w046grv9j3976i5ykjmyiif";
+    };
+  };
+
+  vim-peekaboo = buildVimPluginFrom2Nix {
+    pname = "vim-peekaboo";
+    version = "2019-12-12";
+    src = fetchFromGitHub {
+      owner = "junegunn";
+      repo = "vim-peekaboo";
+      rev = "cc4469c204099c73dd7534531fa8ba271f704831";
+      sha256 = "11lgf60v2kj772d9azkfddypwidcgfps5mvnhmp4gg0fmfx12h99";
+    };
+  };
+
+  vim-pencil = buildVimPluginFrom2Nix {
+    pname = "vim-pencil";
+    version = "2019-12-13";
+    src = fetchFromGitHub {
+      owner = "reedes";
+      repo = "vim-pencil";
+      rev = "09458527601fdb2fbd174317bdddfb34e4c64e79";
+      sha256 = "09b30cxlwbr9l07ya05is9q2y9vzbzhcc656nvjjzf968l496xr2";
+    };
+  };
+
+  vim-phabricator = buildVimPluginFrom2Nix {
+    pname = "vim-phabricator";
+    version = "2020-01-23";
+    src = fetchFromGitHub {
+      owner = "jparise";
+      repo = "vim-phabricator";
+      rev = "065c7e3f2d92a6792b50f087393b2c9a10a1e825";
+      sha256 = "0yhf347fhrs0aqsq1swqihyav32442lv2chzjr3mzqcym8zbzsh6";
+    };
+  };
+
+  vim-pico8-syntax = buildVimPluginFrom2Nix {
+    pname = "vim-pico8-syntax";
+    version = "2016-10-30";
+    src = fetchFromGitHub {
+      owner = "justinj";
+      repo = "vim-pico8-syntax";
+      rev = "dbdd92fad0533eeaeaea844815d4de11e9507ce7";
+      sha256 = "0say0bb74rdbabgsf7rrbm8x841pmgh80fwr6kn94fgphr3vhm0s";
+    };
+  };
+
+  vim-plug = buildVimPluginFrom2Nix {
+    pname = "vim-plug";
+    version = "2020-04-11";
+    src = fetchFromGitHub {
+      owner = "junegunn";
+      repo = "vim-plug";
+      rev = "e718868e85e2a32410144dfcdc3ba1303719450d";
+      sha256 = "1znaapjdz9nwgvr5il6rck82mz4dhj1nan87w2216xwpp53w61fb";
+    };
+  };
+
+  vim-plugin-AnsiEsc = buildVimPluginFrom2Nix {
+    pname = "vim-plugin-AnsiEsc";
+    version = "2019-04-07";
+    src = fetchFromGitHub {
+      owner = "powerman";
+      repo = "vim-plugin-AnsiEsc";
+      rev = "690f820d20b6e3a79ba20499874eb7333aa4ca5c";
+      sha256 = "05sf9xh7zs475kykz1hsp0xp7iiclp7pdiy3bpx7wlfp9z71bd9p";
+    };
+  };
+
+  vim-polyglot = buildVimPluginFrom2Nix {
+    pname = "vim-polyglot";
+    version = "2020-03-05";
+    src = fetchFromGitHub {
+      owner = "sheerun";
+      repo = "vim-polyglot";
+      rev = "e86e0ad36ef9501acbc3e8c63a1d4fab104e47cb";
+      sha256 = "0xr0fv26bxas315bvz0fkw11cg5j301vmy02a2aii90ljvyviv77";
+    };
+  };
+
+  vim-prettyprint = buildVimPluginFrom2Nix {
+    pname = "vim-prettyprint";
+    version = "2016-07-16";
+    src = fetchFromGitHub {
+      owner = "thinca";
+      repo = "vim-prettyprint";
+      rev = "d6060d2b1ff1cff71714e126addd3b10883ade12";
+      sha256 = "0mb1ylsq4023ik9wd9iwzlynra2c320xp9h2i79bspapglgd5gk9";
+    };
+  };
+
+  vim-projectionist = buildVimPluginFrom2Nix {
+    pname = "vim-projectionist";
+    version = "2019-11-13";
+    src = fetchFromGitHub {
+      owner = "tpope";
+      repo = "vim-projectionist";
+      rev = "17a8b2078a9ca1410d2080419e1cb9c9bb2e4492";
+      sha256 = "1vf3jdcfiq27k9mdwlvsm2hn1xgxr79ckq3jqq00avj50bpdzs1z";
+    };
+  };
+
+  vim-prosession = buildVimPluginFrom2Nix {
+    pname = "vim-prosession";
+    version = "2019-11-01";
+    src = fetchFromGitHub {
+      owner = "dhruvasagar";
+      repo = "vim-prosession";
+      rev = "84df77d6470491a67f926b9a6a6a8cc675c161ac";
+      sha256 = "03p5ncdah3mxd2dxrqprd14gzyy2qlvf9y5hcsdcakf2hhsrxvlg";
+    };
+  };
+
+  vim-protobuf = buildVimPluginFrom2Nix {
+    pname = "vim-protobuf";
+    version = "2017-12-26";
+    src = fetchFromGitHub {
+      owner = "uarun";
+      repo = "vim-protobuf";
+      rev = "0d0f4e4b4087e0e608066aa2ba295e396d039931";
+      sha256 = "1vh9f34rb7pg6dc64xhr102yig6y03is74777av464bhq651z7p5";
+    };
+  };
+
+  vim-ps1 = buildVimPluginFrom2Nix {
+    pname = "vim-ps1";
+    version = "2020-03-30";
+    src = fetchFromGitHub {
+      owner = "PProvost";
+      repo = "vim-ps1";
+      rev = "9fdf92846fbeb8445e535cf0c5bdb4b1dce4a506";
+      sha256 = "0w98zcjvb64fhd6ahy3cqrs4y7zacak9nzpkkhr03l6zzbqb5kz4";
+    };
+  };
+
+  vim-pug = buildVimPluginFrom2Nix {
+    pname = "vim-pug";
+    version = "2019-09-23";
+    src = fetchFromGitHub {
+      owner = "digitaltoad";
+      repo = "vim-pug";
+      rev = "ea39cd942cf3194230cf72bfb838901a5344d3b3";
+      sha256 = "07141jkfnaia4ydc6qcg0bc06w720l2lzl7bm4bsjwswqrzmhfam";
+    };
+  };
+
+  vim-puppet = buildVimPluginFrom2Nix {
+    pname = "vim-puppet";
+    version = "2019-09-16";
+    src = fetchFromGitHub {
+      owner = "rodjek";
+      repo = "vim-puppet";
+      rev = "fc6e9efef797c505b2e67631ad2517d7d6e8f00d";
+      sha256 = "0a4qv8f74g6c2i9l6kv3zbcq9lskhdqg86w12f8hshw1vkfmfr4x";
+    };
+  };
+
+  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";
+    };
+  };
+
+  vim-qml = buildVimPluginFrom2Nix {
+    pname = "vim-qml";
+    version = "2019-12-20";
+    src = fetchFromGitHub {
+      owner = "peterhoeg";
+      repo = "vim-qml";
+      rev = "b04de1dadb7dfe372d22f7529a001af1b5e19f4f";
+      sha256 = "1pxl70l0g4i8cbnpjhb9pyjhz982flkrng07y9xwzbdl2jx42i8s";
+    };
+  };
+
+  vim-quickrun = buildVimPluginFrom2Nix {
+    pname = "vim-quickrun";
+    version = "2020-02-03";
+    src = fetchFromGitHub {
+      owner = "thinca";
+      repo = "vim-quickrun";
+      rev = "f637c35b16d6e83cc71dababbda2a64eb29b3f5e";
+      sha256 = "0yf9acqcj3x62qchz0z9mwgf1af5vz39kyzhv5jh1mc0vwksrdwl";
+    };
+  };
+
+  vim-racer = buildVimPluginFrom2Nix {
+    pname = "vim-racer";
+    version = "2020-03-06";
+    src = fetchFromGitHub {
+      owner = "racer-rust";
+      repo = "vim-racer";
+      rev = "950b78f36e568134f5dcabc9a146c61e0084d220";
+      sha256 = "0k62yybilh2052w6zfscw7daz7y1qnqv1311zngjim5z8xmp7j1l";
+    };
+  };
+
+  vim-repeat = buildVimPluginFrom2Nix {
+    pname = "vim-repeat";
+    version = "2019-11-13";
+    src = fetchFromGitHub {
+      owner = "tpope";
+      repo = "vim-repeat";
+      rev = "c947ad2b6a16983724a0153bdf7f66d7a80a32ca";
+      sha256 = "00hhbqcx21j0738ad5xh92lsykpa0qxhdy1s7wnwc8d3jndmyjwb";
+    };
+  };
+
+  vim-rhubarb = buildVimPluginFrom2Nix {
+    pname = "vim-rhubarb";
+    version = "2019-11-12";
+    src = fetchFromGitHub {
+      owner = "tpope";
+      repo = "vim-rhubarb";
+      rev = "5130596a65330a4e8523d3ac1582f6c31ea6bc63";
+      sha256 = "1hpyxcmwrjxhkgkb0w2qpg8gh9bgiqwddyj4zx8hy2g8qnx7z5yj";
+    };
+  };
+
+  vim-rooter = buildVimPluginFrom2Nix {
+    pname = "vim-rooter";
+    version = "2020-02-17";
+    src = fetchFromGitHub {
+      owner = "airblade";
+      repo = "vim-rooter";
+      rev = "8a0a201a17fae3f7656b99f74d67741986faba37";
+      sha256 = "1r8kzzljs39ycc6jjh5anpl2gw73c2wb1bs8hjv6xnw1scln6gwq";
+    };
+  };
+
+  vim-rsi = buildVimPluginFrom2Nix {
+    pname = "vim-rsi";
+    version = "2019-11-15";
+    src = fetchFromGitHub {
+      owner = "tpope";
+      repo = "vim-rsi";
+      rev = "ad8ba6beae8e82339479104b914214a868c9f1fe";
+      sha256 = "1ycjwnbs6rks78yxh0k0ywpvic0663mv7kydy3kjpa4f5bnkgbvc";
+    };
+  };
+
+  vim-ruby = buildVimPluginFrom2Nix {
+    pname = "vim-ruby";
+    version = "2020-04-12";
+    src = fetchFromGitHub {
+      owner = "vim-ruby";
+      repo = "vim-ruby";
+      rev = "3db19e235bff9e6f6e0941836f67416dc761be32";
+      sha256 = "045b2gcmbm5kc4c3kalkjc36ck9llrbxjj2amga0041svgzb79sy";
+    };
+  };
+
+  vim-salve = buildVimPluginFrom2Nix {
+    pname = "vim-salve";
+    version = "2019-11-13";
+    src = fetchFromGitHub {
+      owner = "tpope";
+      repo = "vim-salve";
+      rev = "876104d364420a7a11a2d97729dd4ab0a2f8a72e";
+      sha256 = "1hj0qg182jv3cwg85rg4z0f8f8hr409is71z7sxhnhjq9fn1h6xj";
+    };
+  };
+
+  vim-sandwich = buildVimPluginFrom2Nix {
+    pname = "vim-sandwich";
+    version = "2020-02-13";
+    src = fetchFromGitHub {
+      owner = "machakann";
+      repo = "vim-sandwich";
+      rev = "02e3b6d1ff9ce346c115166855137b318b63c536";
+      sha256 = "1jd5i0ykvwf5jnm3g3rm2r0zn64xqk38p2xl55la9a1a99j9mfxh";
+    };
+  };
+
+  vim-sayonara = buildVimPluginFrom2Nix {
+    pname = "vim-sayonara";
+    version = "2017-03-13";
+    src = fetchFromGitHub {
+      owner = "mhinz";
+      repo = "vim-sayonara";
+      rev = "357135ce127581fab2c0caf45d4b3fec4603aa77";
+      sha256 = "0m4pbpqq7m4rbqj1sxzx3r25znm9m5df6z6kndc6x5c1p27a63pi";
+    };
+  };
+
+  vim-scala = buildVimPluginFrom2Nix {
+    pname = "vim-scala";
+    version = "2019-06-24";
+    src = fetchFromGitHub {
+      owner = "derekwyatt";
+      repo = "vim-scala";
+      rev = "bbdfea4b98fdb8866a8a6060ec1294643cfeb413";
+      sha256 = "14q8j6vwqad2nwia29d0844v2zdcx04xn9dyicv13sdpivzcm4rb";
+    };
+  };
+
+  vim-scouter = buildVimPluginFrom2Nix {
+    pname = "vim-scouter";
+    version = "2014-08-10";
+    src = fetchFromGitHub {
+      owner = "thinca";
+      repo = "vim-scouter";
+      rev = "5221901d4ad6b2ef8b370b336db2aa7f69f2b6dc";
+      sha256 = "0fx64hj1kzrsxz96195d5lm3x88zyycbcr78819mcbgfzyxis6b8";
+    };
+  };
+
+  vim-scriptease = buildVimPluginFrom2Nix {
+    pname = "vim-scriptease";
+    version = "2020-01-05";
+    src = fetchFromGitHub {
+      owner = "tpope";
+      repo = "vim-scriptease";
+      rev = "86f49aca266e4b17420bcadd29009997d15668d8";
+      sha256 = "0kcv5q4qahqd316h5k81xnf8skn71126x4lw2i6wa2m2653d0k5c";
+    };
+  };
+
+  vim-sensible = buildVimPluginFrom2Nix {
+    pname = "vim-sensible";
+    version = "2019-11-24";
+    src = fetchFromGitHub {
+      owner = "tpope";
+      repo = "vim-sensible";
+      rev = "2d9f34c09f548ed4df213389caa2882bfe56db58";
+      sha256 = "153i3kh44ri046va3qdrbvvsv7gy25fsd9pc2yhrg23lvj169zfp";
+    };
+  };
+
+  vim-sexp = buildVimPluginFrom2Nix {
+    pname = "vim-sexp";
+    version = "2017-05-15";
+    src = fetchFromGitHub {
+      owner = "guns";
+      repo = "vim-sexp";
+      rev = "12292941903d9ac8151513189d2007e1ccfc95f0";
+      sha256 = "1mfqbmrbqgnsc34pmcsrc0c5zvgxhhnw4hx4g5wbssfk1ddyx6y0";
+    };
+  };
+
+  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";
+    };
+  };
+
+  vim-signature = buildVimPluginFrom2Nix {
+    pname = "vim-signature";
+    version = "2018-07-06";
+    src = fetchFromGitHub {
+      owner = "kshenoy";
+      repo = "vim-signature";
+      rev = "6bc3dd1294a22e897f0dcf8dd72b85f350e306bc";
+      sha256 = "08m5dg77yavria7n7iajkj4kqaw848763680003j2gbrjlhpprpm";
+    };
+  };
+
+  vim-signify = buildVimPluginFrom2Nix {
+    pname = "vim-signify";
+    version = "2019-12-07";
+    src = fetchFromGitHub {
+      owner = "mhinz";
+      repo = "vim-signify";
+      rev = "56db16f8d3825c4d066c2faf05315c2b208cd5f5";
+      sha256 = "0alargsa6sxdxha6jshax7ff6jy8svzc9yxvsh83f8301zx9vmra";
+    };
+  };
+
+  vim-slash = buildVimPluginFrom2Nix {
+    pname = "vim-slash";
+    version = "2019-08-28";
+    src = fetchFromGitHub {
+      owner = "junegunn";
+      repo = "vim-slash";
+      rev = "31aee09b7ea8893a18fa34f65e63e364fc998444";
+      sha256 = "0ifdd3yqbk8hdvdmr4k44967lyvjnv9ig3r2145wn1lab797sbl4";
+    };
+  };
+
+  vim-sleuth = buildVimPluginFrom2Nix {
+    pname = "vim-sleuth";
+    version = "2019-11-16";
+    src = fetchFromGitHub {
+      owner = "tpope";
+      repo = "vim-sleuth";
+      rev = "ea3f065f23cd0592062b8226c8fef08b6af3b459";
+      sha256 = "17w4m6zg1izcs75isy1jdzycgdr1ml1f5wqf1bjq80qgy3f28znp";
+    };
+  };
+
+  vim-slime = buildVimPluginFrom2Nix {
+    pname = "vim-slime";
+    version = "2020-04-12";
+    src = fetchFromGitHub {
+      owner = "jpalardy";
+      repo = "vim-slime";
+      rev = "a81139239d6447b1c021e4873e6a14b47f32b65a";
+      sha256 = "0wavkm9k2vm23nm5bmc3lpm6cac7mihzjcyk4r77qgdgmnnxkm49";
+    };
+  };
+
+  vim-smalls = buildVimPluginFrom2Nix {
+    pname = "vim-smalls";
+    version = "2015-05-02";
+    src = fetchFromGitHub {
+      owner = "t9md";
+      repo = "vim-smalls";
+      rev = "9619eae81626bd63f88165e0520c467698264e34";
+      sha256 = "0s5z3zv220cg95yky2av6w0jmpc56ysyhsx0596ksvgz5jwhpbad";
+    };
+  };
+
+  vim-smt2 = buildVimPluginFrom2Nix {
+    pname = "vim-smt2";
+    version = "2018-05-20";
+    src = fetchFromGitHub {
+      owner = "bohlender";
+      repo = "vim-smt2";
+      rev = "9582e37b1dfd75621e51a3ac2275b6c6c895317f";
+      sha256 = "0cas6c3pj55qhbcy2vaygg8l9gncjshi1g0a54l78x73d3y3wm03";
+    };
+  };
+
+  vim-sneak = buildVimPluginFrom2Nix {
+    pname = "vim-sneak";
+    version = "2020-02-29";
+    src = fetchFromGitHub {
+      owner = "justinmk";
+      repo = "vim-sneak";
+      rev = "98a5c946d6dc76528b9d9b044059b5ef1fab5a48";
+      sha256 = "0xcxr658i5vzdkxfssd7zx6n3ar9b6dg4b2ddaswgnwq75xphrh9";
+    };
+  };
+
+  vim-snipmate = buildVimPluginFrom2Nix {
+    pname = "vim-snipmate";
+    version = "2020-03-27";
+    src = fetchFromGitHub {
+      owner = "garbas";
+      repo = "vim-snipmate";
+      rev = "b80367fefc2188c9d6c4a9eb1830360b09e13476";
+      sha256 = "0qq81hcavmaq76r38qfy1cxlmhj0aswbd41k2k9fyzilzq4r0bg8";
+    };
+  };
+
+  vim-snippets = buildVimPluginFrom2Nix {
+    pname = "vim-snippets";
+    version = "2020-04-03";
+    src = fetchFromGitHub {
+      owner = "honza";
+      repo = "vim-snippets";
+      rev = "b62dfce8449d8a8196720ddd3cfecbca8bb7fe45";
+      sha256 = "1c8r8hw4yqdnmn4nx37vdrjwc725qqr5rbzzxq8wl0min5c4lq1c";
+    };
+  };
+
+  vim-solidity = buildVimPluginFrom2Nix {
+    pname = "vim-solidity";
+    version = "2018-04-17";
+    src = fetchFromGitHub {
+      owner = "tomlion";
+      repo = "vim-solidity";
+      rev = "569bbbedc3898236d5912fed0caf114936112ae4";
+      sha256 = "1qpfbbrm4gjgvbkimhpxyl4fsdqkyw4raf17nw0ibqillz2d3pxx";
+    };
+  };
+
+  vim-sort-motion = buildVimPluginFrom2Nix {
+    pname = "vim-sort-motion";
+    version = "2018-07-15";
+    src = fetchFromGitHub {
+      owner = "christoomey";
+      repo = "vim-sort-motion";
+      rev = "49dfcabeee2bf3a85a6cc0774b35f687b6c9d0e5";
+      sha256 = "02v12iqy3gjhvh5aza6b6b3pfv2qkyyw83bxqjgbjj002f71ydkb";
+    };
+  };
+
+  vim-sourcetrail = buildVimPluginFrom2Nix {
+    pname = "vim-sourcetrail";
+    version = "2018-06-26";
+    src = fetchFromGitHub {
+      owner = "CoatiSoftware";
+      repo = "vim-sourcetrail";
+      rev = "0fd679321ce51f65a37d04e4ea9031be6eaed85d";
+      sha256 = "1xgvvmah3zn22rjaa093vghwrchmpm5wj30lwwl6h398dyywz8bg";
+    };
+  };
+
+  vim-speeddating = buildVimPluginFrom2Nix {
+    pname = "vim-speeddating";
+    version = "2019-11-12";
+    src = fetchFromGitHub {
+      owner = "tpope";
+      repo = "vim-speeddating";
+      rev = "fe98cfaa7ea9c4b838d42a6830437c919eb55b4e";
+      sha256 = "02875qswrmanr7b798ymlc7w60055q0av0qj3fh7fvpqhsqpg52k";
+    };
+  };
+
+  vim-startify = buildVimPluginFrom2Nix {
+    pname = "vim-startify";
+    version = "2019-12-07";
+    src = fetchFromGitHub {
+      owner = "mhinz";
+      repo = "vim-startify";
+      rev = "05122f08c6a553992f7b0a9ad88016a89f51548a";
+      sha256 = "09kg1zf5lmwlksqz11scnjazg5d862fjip48qakjbabf66f23svs";
+    };
+  };
+
+  vim-stylish-haskell = buildVimPluginFrom2Nix {
+    pname = "vim-stylish-haskell";
+    version = "2019-11-28";
+    src = fetchFromGitHub {
+      owner = "nbouscal";
+      repo = "vim-stylish-haskell";
+      rev = "ef12ab024cb3928ae57ce7c4fa519c4751afef99";
+      sha256 = "0ysz68v4c2i4kxchsvxgkpj5kb0jbm5x06ri1ns9cmk5gj01pmd6";
+    };
+  };
+
+  vim-stylishask = buildVimPluginFrom2Nix {
+    pname = "vim-stylishask";
+    version = "2020-04-05";
+    src = fetchFromGitHub {
+      owner = "alx741";
+      repo = "vim-stylishask";
+      rev = "dcc12c724cec7f8aee7ad197752710eaa3bfd12c";
+      sha256 = "09k1n6r9gy3jikss84y141dqqsgc1a1ia89jj0367an53pfl6dn2";
+    };
+  };
+
+  vim-subversive = buildVimPluginFrom2Nix {
+    pname = "vim-subversive";
+    version = "2020-04-10";
+    src = fetchFromGitHub {
+      owner = "svermeulen";
+      repo = "vim-subversive";
+      rev = "4a2020248c8a09950b7e1a2cd864ffb88826572c";
+      sha256 = "0pqrb3hz1hjl42khn4691s3ajlswk6nms43hdbglj679y28bkzfi";
+    };
+  };
+
+  vim-surround = buildVimPluginFrom2Nix {
+    pname = "vim-surround";
+    version = "2019-11-28";
+    src = fetchFromGitHub {
+      owner = "tpope";
+      repo = "vim-surround";
+      rev = "f51a26d3710629d031806305b6c8727189cd1935";
+      sha256 = "0aqrqn35xdiy80y7skxfsh3m33n6cdxw6lzz6aspfgzwllx2f0kr";
+    };
+  };
+
+  vim-swap = buildVimPluginFrom2Nix {
+    pname = "vim-swap";
+    version = "2019-06-07";
+    src = fetchFromGitHub {
+      owner = "machakann";
+      repo = "vim-swap";
+      rev = "e52ff679c88f4aa7a7afe77fb42af78c93ed33c8";
+      sha256 = "0rqvxqqk961syawmyc2qdfb4w9ilb1r3mxxij2ja1jbhl1f3w4vq";
+    };
+  };
+
+  vim-SyntaxRange = buildVimPluginFrom2Nix {
+    pname = "vim-SyntaxRange";
+    version = "2018-03-09";
+    src = fetchFromGitHub {
+      owner = "inkarkat";
+      repo = "vim-SyntaxRange";
+      rev = "dc33d8f84ebbf4c9fa03ce00b8adeb83e05249d3";
+      sha256 = "0nf0hkgl5fm0laxb5253br894259kz33zyiwxzrry6w3108alasr";
+    };
+  };
+
+  vim-table-mode = buildVimPluginFrom2Nix {
+    pname = "vim-table-mode";
+    version = "2020-03-02";
+    src = fetchFromGitHub {
+      owner = "dhruvasagar";
+      repo = "vim-table-mode";
+      rev = "6412352b544bda764a9616c3090abb09729526bc";
+      sha256 = "1z5v849vjbk4mdgkxs73b2nnvmqx7l6h3ycdb16qdhp9kppwmbvv";
+    };
+  };
+
+  vim-tabpagecd = buildVimPluginFrom2Nix {
+    pname = "vim-tabpagecd";
+    version = "2013-11-29";
+    src = fetchFromGitHub {
+      owner = "kana";
+      repo = "vim-tabpagecd";
+      rev = "8b71a03a037608fa5918f5096812577cec6355e4";
+      sha256 = "1mr6s2hvsf2a2nkjjvq78c9isfxk2k1ih890w740srbq6ssj0npm";
+    };
+  };
+
+  vim-tbone = buildVimPluginFrom2Nix {
+    pname = "vim-tbone";
+    version = "2019-11-13";
+    src = fetchFromGitHub {
+      owner = "tpope";
+      repo = "vim-tbone";
+      rev = "82b0118772a87b659a6af49b26b0c4817ec7eccf";
+      sha256 = "0pbj4v6zhlpcxm10jcq50jf2rpqiyp2x0zpxa50s6y6gm834v9wc";
+    };
+  };
+
+  vim-terraform = buildVimPluginFrom2Nix {
+    pname = "vim-terraform";
+    version = "2020-03-03";
+    src = fetchFromGitHub {
+      owner = "hashivim";
+      repo = "vim-terraform";
+      rev = "89c47c6c68f6260ba34ee0733437d863046fbe95";
+      sha256 = "1gkr3akvx44802i8cv4zw8j3bk5qk0h0rgz5k9jgkfch2yc76gzg";
+    };
+  };
+
+  vim-test = buildVimPluginFrom2Nix {
+    pname = "vim-test";
+    version = "2020-04-09";
+    src = fetchFromGitHub {
+      owner = "janko";
+      repo = "vim-test";
+      rev = "692b4b879520299ceffeaebb9b28173b75bf48da";
+      sha256 = "0lkng56y1wi29jp595jx5vib9zmnsagjczsdl434dn3hakm76plq";
+    };
+  };
+
+  vim-textobj-comment = buildVimPluginFrom2Nix {
+    pname = "vim-textobj-comment";
+    version = "2014-04-11";
+    src = fetchFromGitHub {
+      owner = "glts";
+      repo = "vim-textobj-comment";
+      rev = "58ae4571b76a5bf74850698f23d235eef991dd4b";
+      sha256 = "00wc14chwjfx95gl3yzbxm1ajx88zpzqz0ckl7xvd7gvkrf0mx04";
+    };
+  };
+
+  vim-textobj-function = buildVimPluginFrom2Nix {
+    pname = "vim-textobj-function";
+    version = "2014-05-03";
+    src = fetchFromGitHub {
+      owner = "kana";
+      repo = "vim-textobj-function";
+      rev = "adb50f38499b1f558cbd58845e3e91117e4538cf";
+      sha256 = "0cwl102si9zhhhpg6c0fjnyq35v6bl5f34p2s7b47isxdn0qvris";
+    };
+  };
+
+  vim-textobj-haskell = buildVimPluginFrom2Nix {
+    pname = "vim-textobj-haskell";
+    version = "2014-10-27";
+    src = fetchFromGitHub {
+      owner = "gibiansky";
+      repo = "vim-textobj-haskell";
+      rev = "ca656e98ea31e201f5bc543909398a6c8bb5d537";
+      sha256 = "096pjjl3ngw0hsh59j2x6pdrpqvp657rcxfyl9kw13ndqyd867xs";
+    };
+  };
+
+  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";
+    };
+  };
+
+  vim-textobj-user = buildVimPluginFrom2Nix {
+    pname = "vim-textobj-user";
+    version = "2020-02-21";
+    src = fetchFromGitHub {
+      owner = "kana";
+      repo = "vim-textobj-user";
+      rev = "41a675ddbeefd6a93664a4dc52f302fe3086a933";
+      sha256 = "1y1g3vcm97fqjyigiajbvbck4nlc04vxl3535x4sl40s5jbm5vz3";
+    };
+  };
+
+  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";
+    };
+  };
+
+  vim-themis = buildVimPluginFrom2Nix {
+    pname = "vim-themis";
+    version = "2020-03-08";
+    src = fetchFromGitHub {
+      owner = "thinca";
+      repo = "vim-themis";
+      rev = "2d10aee9c9982f4f5974e88351934759c69640e7";
+      sha256 = "06ab0kjamzpyql71qmc8qhvb72rx07x2g598aidk8nqkk36x87ai";
+    };
+  };
+
+  vim-tmux = buildVimPluginFrom2Nix {
+    pname = "vim-tmux";
+    version = "2019-03-22";
+    src = fetchFromGitHub {
+      owner = "tmux-plugins";
+      repo = "vim-tmux";
+      rev = "4e77341a2f8b9b7e41e81e9debbcecaea5987c85";
+      sha256 = "16fgc0lx1jr8zbayanf5w677ssiw5xb8vwfaca295c8xlk760c3m";
+    };
+  };
+
+  vim-tmux-focus-events = buildVimPluginFrom2Nix {
+    pname = "vim-tmux-focus-events";
+    version = "2019-12-09";
+    src = fetchFromGitHub {
+      owner = "tmux-plugins";
+      repo = "vim-tmux-focus-events";
+      rev = "e80960715c09aef8ab9204848ed1683805a93a33";
+      sha256 = "0ds6qw2i1r67jhxh9ff36al45bafsmbxxdc127l6iy2vl5wj0d3d";
+    };
+  };
+
+  vim-tmux-navigator = buildVimPluginFrom2Nix {
+    pname = "vim-tmux-navigator";
+    version = "2019-12-10";
+    src = fetchFromGitHub {
+      owner = "christoomey";
+      repo = "vim-tmux-navigator";
+      rev = "8fdf78292bb3aed1c9de880be7e03efdbf23d306";
+      sha256 = "0y92na4dcfcsj5zbs3m7y6csl3sd46a9968id78cdn9cgg8iwzac";
+    };
+  };
+
+  vim-togglelist = buildVimPluginFrom2Nix {
+    pname = "vim-togglelist";
+    version = "2013-04-07";
+    src = fetchFromGitHub {
+      owner = "milkypostman";
+      repo = "vim-togglelist";
+      rev = "cafedc49860950200f28f2e1d95ab6a87b79d113";
+      sha256 = "17y4ply2irz81gjv5hb51dy7wzv3l3sq6qaska31lswd5dgh1ifg";
+    };
+  };
+
+  vim-toml = buildVimPluginFrom2Nix {
+    pname = "vim-toml";
+    version = "2019-08-28";
+    src = fetchFromGitHub {
+      owner = "cespare";
+      repo = "vim-toml";
+      rev = "a4ec206052aa347d7df90dc4b6697b7f2b7929bc";
+      sha256 = "1dgykq4vl7vvj2f8lvg58rzqddm53i278g26ljwfimgqc8l6gmqd";
+    };
+  };
+
+  vim-trailing-whitespace = buildVimPluginFrom2Nix {
+    pname = "vim-trailing-whitespace";
+    version = "2019-12-09";
+    src = fetchFromGitHub {
+      owner = "bronson";
+      repo = "vim-trailing-whitespace";
+      rev = "6b7cdecff252474fe560d32c6f05641f3c5952c7";
+      sha256 = "0arv1hmlw7c1rlkc00hzjyg48pg8g4cc9q9l2hy8kpmsl037akm3";
+    };
+  };
+
+  vim-tsx = buildVimPluginFrom2Nix {
+    pname = "vim-tsx";
+    version = "2017-03-16";
+    src = fetchFromGitHub {
+      owner = "ianks";
+      repo = "vim-tsx";
+      rev = "77c89c42e189fefd3c9a632b37b7e3b3b9edf918";
+      sha256 = "0wmd6gql57bxp868sq2dchp9sc3jbisr4vaz4y0lczhmk0prds6n";
+    };
+  };
+
+  vim-twig = buildVimPluginFrom2Nix {
+    pname = "vim-twig";
+    version = "2018-05-23";
+    src = fetchFromGitHub {
+      owner = "lumiliet";
+      repo = "vim-twig";
+      rev = "ad115512725bcc156f7f89b72ff563b9fa44933b";
+      sha256 = "1p7sfhk0mwx4xk88b29ijb9nfbjwsf6hf3nab2ybcw291qaa75nj";
+    };
+  };
+
+  vim-unimpaired = buildVimPluginFrom2Nix {
+    pname = "vim-unimpaired";
+    version = "2019-11-12";
+    src = fetchFromGitHub {
+      owner = "tpope";
+      repo = "vim-unimpaired";
+      rev = "08e66532bffed445c949ae0a0501940c000553ed";
+      sha256 = "0sm5rv6z0s80l9c39hijhnfggvgmi24ac6d9a1k58pzjz6i9w2vr";
+    };
+  };
+
+  vim-vinegar = buildVimPluginFrom2Nix {
+    pname = "vim-vinegar";
+    version = "2019-11-13";
+    src = fetchFromGitHub {
+      owner = "tpope";
+      repo = "vim-vinegar";
+      rev = "fcce70f1403ba4101668a4c960c577bddbd00f06";
+      sha256 = "0zxqdyla40xcp0ps362b85bqwl3mp4zfmfdggl0gwvgd5m949yk0";
+    };
+  };
+
+  vim-visual-increment = buildVimPluginFrom2Nix {
+    pname = "vim-visual-increment";
+    version = "2015-07-02";
+    src = fetchFromGitHub {
+      owner = "triglav";
+      repo = "vim-visual-increment";
+      rev = "e50e8f7c062cec759f665278eb58535df1611a23";
+      sha256 = "1gd6mxp9y80wf7nxcm02104l54gqz5k3dgv1h98jl9a7q9swb8y6";
+    };
+  };
+
+  vim-visual-multi = buildVimPluginFrom2Nix {
+    pname = "vim-visual-multi";
+    version = "2020-04-06";
+    src = fetchFromGitHub {
+      owner = "mg979";
+      repo = "vim-visual-multi";
+      rev = "4b8e769b52922a17de4ef0ddb7aeacc18386a246";
+      sha256 = "1xjcz3dzwxlpaw8pz8mjn1cfp9822c8yvjwws6m4bzalqr0a14a4";
+    };
+  };
+
+  vim-visualstar = buildVimPluginFrom2Nix {
+    pname = "vim-visualstar";
+    version = "2015-08-27";
+    src = fetchFromGitHub {
+      owner = "thinca";
+      repo = "vim-visualstar";
+      rev = "a18cd0e7a03311ac709595c1d261ed44b45c9098";
+      sha256 = "0yz6ci4i84xxrgazjfa5nsj3q8733p0b6vwcljk1l7ghdfiflvy4";
+    };
+  };
+
+  vim-vue = buildVimPluginFrom2Nix {
+    pname = "vim-vue";
+    version = "2019-08-03";
+    src = fetchFromGitHub {
+      owner = "posva";
+      repo = "vim-vue";
+      rev = "c424294e769b26659176065f9713c395731f7b3a";
+      sha256 = "1ig8qacavr15i6z7whlkf2ivw5smnqsw3jwhh4dg5q6037k1hjh1";
+    };
+  };
+
+  vim-wakatime = buildVimPluginFrom2Nix {
+    pname = "vim-wakatime";
+    version = "2020-02-12";
+    src = fetchFromGitHub {
+      owner = "wakatime";
+      repo = "vim-wakatime";
+      rev = "dd74c71cd2ea23b4a6cba4b05c873983c16e297c";
+      sha256 = "1dc04vmpv62x2rfnfad2y60l5xzpw0167pbii9kss6n6ra81gayr";
+    };
+  };
+
+  vim-watchdogs = buildVimPluginFrom2Nix {
+    pname = "vim-watchdogs";
+    version = "2019-09-09";
+    src = fetchFromGitHub {
+      owner = "osyo-manga";
+      repo = "vim-watchdogs";
+      rev = "8ee2af37095af08376ba2409da152c2a36a4ee90";
+      sha256 = "1hvgqdcnnz09afbas5brwls2sifs8y78jmq44ldgsjny9l445df4";
+    };
+  };
+
+  vim-which-key = buildVimPluginFrom2Nix {
+    pname = "vim-which-key";
+    version = "2020-03-16";
+    src = fetchFromGitHub {
+      owner = "liuchengxu";
+      repo = "vim-which-key";
+      rev = "4b70b443ba5838b165f90e26f9ed628d7d05e11d";
+      sha256 = "197rp20hngrq7qdlii0ai4vb81dlilah0q1wlil8hv3qcf4az7qr";
+    };
+  };
+
+  vim-wordy = buildVimPluginFrom2Nix {
+    pname = "vim-wordy";
+    version = "2019-11-22";
+    src = fetchFromGitHub {
+      owner = "reedes";
+      repo = "vim-wordy";
+      rev = "f0391713fa83771d64b065868331ef4754d861ed";
+      sha256 = "0v5cl3rrg2vrdb2al67hbh730rw8m2zvhb1vippv64k65mknkgp5";
+    };
+  };
+
+  vim-xdebug = buildVimPluginFrom2Nix {
+    pname = "vim-xdebug";
+    version = "2012-08-15";
+    src = fetchFromGitHub {
+      owner = "joonty";
+      repo = "vim-xdebug";
+      rev = "a4980fa65f7f159780593ee37c178281691ba2c4";
+      sha256 = "1qh18r0sm4gh95sjbi2hnflvxdl4gk00jyy3n7z4i1gnx9ihxjqw";
+    };
+  };
+
+  vim-xkbswitch = buildVimPluginFrom2Nix {
+    pname = "vim-xkbswitch";
+    version = "2019-12-14";
+    src = fetchFromGitHub {
+      owner = "lyokha";
+      repo = "vim-xkbswitch";
+      rev = "b9839555f70d319b4e21fc7bc9b559d91cf1260a";
+      sha256 = "1ql8yv8rxpr9j9phf4jddqs1j81vcb9gpp0p3fmy6f8nf4b26nvw";
+    };
+  };
+
+  vim-yaml = buildVimPluginFrom2Nix {
+    pname = "vim-yaml";
+    version = "2020-01-30";
+    src = fetchFromGitHub {
+      owner = "stephpy";
+      repo = "vim-yaml";
+      rev = "8fc9136a9c3f64b3e65bb6170391f9daf2c23056";
+      sha256 = "08bg7mxvgrl070m0kk4rmain7h3rv712jj6lk9l808cfjzaw9343";
+    };
+  };
+
+  vim-yapf = buildVimPluginFrom2Nix {
+    pname = "vim-yapf";
+    version = "2018-10-04";
+    src = fetchFromGitHub {
+      owner = "mindriot101";
+      repo = "vim-yapf";
+      rev = "b0c31bd73a6d1026765e659bd0a62c625ec057ad";
+      sha256 = "0ncv6kjyywljsq5fz71rkmgmqxm7msyscgndnj055bnx5sh9wk80";
+    };
+  };
+
+  vim2hs = buildVimPluginFrom2Nix {
+    pname = "vim2hs";
+    version = "2014-04-16";
+    src = fetchFromGitHub {
+      owner = "dag";
+      repo = "vim2hs";
+      rev = "f2afd55704bfe0a2d66e6b270d247e9b8a7b1664";
+      sha256 = "18lqrl3hqb6cmizc04bbnsh8j0g761w2q8wascbzzfw80dmxy36b";
+    };
+  };
+
+  vimacs = buildVimPluginFrom2Nix {
+    pname = "vimacs";
+    version = "2016-03-24";
+    src = fetchFromGitHub {
+      owner = "andrep";
+      repo = "vimacs";
+      rev = "7b8e297722d55089f0f0535fe6422533c98112fb";
+      sha256 = "0x92jcpdlvxhhdpwkv7ig9ya7s96yqjy6ms9xnx8djkf12xql16f";
+    };
+  };
+
+  vimagit = buildVimPluginFrom2Nix {
+    pname = "vimagit";
+    version = "2020-01-12";
+    src = fetchFromGitHub {
+      owner = "jreybert";
+      repo = "vimagit";
+      rev = "bf7b16e99e075b019e56f2fbfb96c493ca3635e2";
+      sha256 = "1f7gvlhrvvkf69y5vfrkvidhx8aa03n1aqmdhk9qjd6sglfg5w0i";
+    };
+  };
+
+  vimelette = buildVimPluginFrom2Nix {
+    pname = "vimelette";
+    version = "2019-05-02";
+    src = fetchFromGitHub {
+      owner = "gotcha";
+      repo = "vimelette";
+      rev = "662f47fe0da2625dc743532832fa39f490388fa7";
+      sha256 = "094xyqba64dndgr5gfcqp6hy3siw90niyrrwz0avs924abss6adg";
+    };
+  };
+
+  vimfiler-vim = buildVimPluginFrom2Nix {
+    pname = "vimfiler-vim";
+    version = "2019-07-30";
+    src = fetchFromGitHub {
+      owner = "Shougo";
+      repo = "vimfiler.vim";
+      rev = "26d3fec10cb8921d510064411784301794229a93";
+      sha256 = "0iv1smk0999sfm3iqdlpb2il74l01lxfahwg87g7h3gq9frky2wd";
+    };
+  };
+
+  VimOrganizer = buildVimPluginFrom2Nix {
+    pname = "VimOrganizer";
+    version = "2014-04-10";
+    src = fetchFromGitHub {
+      owner = "hsitz";
+      repo = "VimOrganizer";
+      rev = "cab0baf635eb9470e62d57d42f2d470180b06c8d";
+      sha256 = "0qncr00xn7lj1i469fzjaaghhqrlyg5s2wj4v6625dhg98y0irix";
+    };
+  };
+
+  vimoutliner = buildVimPluginFrom2Nix {
+    pname = "vimoutliner";
+    version = "2020-02-09";
+    src = fetchFromGitHub {
+      owner = "vimoutliner";
+      repo = "vimoutliner";
+      rev = "1031b16e6b0069229fe0f33a66489f81174fa4d9";
+      sha256 = "1gn21b8yr0bjg0y1nidk13zcl4f6z8wkrxncgkd1hlc14d99jkg0";
+    };
+  };
+
+  vimpreviewpandoc = buildVimPluginFrom2Nix {
+    pname = "vimpreviewpandoc";
+    version = "2019-02-10";
+    src = fetchFromGitHub {
+      owner = "tex";
+      repo = "vimpreviewpandoc";
+      rev = "3b0a589140abf6cc5d19ad678a7f01822bbee34e";
+      sha256 = "15yjr01wfnhaqw1k8bgxk04vvh76y13zfms66irpihw79f9yzxi9";
+    };
+  };
+
+  vimproc-vim = buildVimPluginFrom2Nix {
+    pname = "vimproc-vim";
+    version = "2020-01-20";
+    src = fetchFromGitHub {
+      owner = "Shougo";
+      repo = "vimproc.vim";
+      rev = "51f4664c92f0f1b121127c84d3b1c901e1c698f0";
+      sha256 = "06nzh4x7j7j3nvw2s4m1gmds0z0bldxbizja91jd43qma9xnwvlk";
+    };
+  };
+
+  vimshell-vim = buildVimPluginFrom2Nix {
+    pname = "vimshell-vim";
+    version = "2019-07-16";
+    src = fetchFromGitHub {
+      owner = "Shougo";
+      repo = "vimshell.vim";
+      rev = "ee683538f57aaf5094db9860f67f4957a763ffb4";
+      sha256 = "0inf9xx6ni1scxkn0b78qq0234r0ybrwpphyzcafw7i8kzisbn26";
+    };
+  };
+
+  vimtex = buildVimPluginFrom2Nix {
+    pname = "vimtex";
+    version = "2020-04-11";
+    src = fetchFromGitHub {
+      owner = "lervag";
+      repo = "vimtex";
+      rev = "bd83ce759828c2bd0e210476717384002b9309ee";
+      sha256 = "086j0grj6pqidcl3gaxqcc7njgnzv5z4gshrlisr996dfzyrab2v";
+    };
+  };
+
+  vimux = buildVimPluginFrom2Nix {
+    pname = "vimux";
+    version = "2017-10-24";
+    src = fetchFromGitHub {
+      owner = "benmills";
+      repo = "vimux";
+      rev = "37f41195e6369ac602a08ec61364906600b771f1";
+      sha256 = "0k7ymak2ag67lb4sf80y4k35zj38rj0jf61bf50i6h1bgw987pra";
+    };
+  };
+
+  vimwiki = buildVimPluginFrom2Nix {
+    pname = "vimwiki";
+    version = "2020-01-13";
+    src = fetchFromGitHub {
+      owner = "vimwiki";
+      repo = "vimwiki";
+      rev = "64c9f3d36d632b1657616c06ea8f08f14cf6438d";
+      sha256 = "0wwfl0bafwh9p8lzic75d0nl6v5dnpfid7fbiffr0i72agp0gcq7";
+    };
+  };
+
+  vissort-vim = buildVimPluginFrom2Nix {
+    pname = "vissort-vim";
+    version = "2014-01-31";
+    src = fetchFromGitHub {
+      owner = "navicore";
+      repo = "vissort.vim";
+      rev = "75a5b08b64d2f762206bffd294066533891fa03c";
+      sha256 = "0a71b22apkhicca9nkd06jlcnqkf583mlpfh2mvl4d474viavqfn";
+    };
+  };
+
+  vista-vim = buildVimPluginFrom2Nix {
+    pname = "vista-vim";
+    version = "2020-04-12";
+    src = fetchFromGitHub {
+      owner = "liuchengxu";
+      repo = "vista.vim";
+      rev = "5399f850c4c0a1224051e84f6a6cee93055e4e6a";
+      sha256 = "13lh8wbyi9gwdn4mj5c88w4jp9jfi2zzxzdlccra67yrb1n3qymj";
+    };
+  };
+
+  Vundle-vim = buildVimPluginFrom2Nix {
+    pname = "Vundle-vim";
+    version = "2019-08-17";
+    src = fetchFromGitHub {
+      owner = "VundleVim";
+      repo = "Vundle.vim";
+      rev = "b255382d6242d7ea3877bf059d2934125e0c4d95";
+      sha256 = "0fkmklcq3fgvd6x6irz9bgyvcdaxafykk3k89gsi9p6b0ikw3rw6";
+    };
+  };
+
+  wal-vim = buildVimPluginFrom2Nix {
+    pname = "wal-vim";
+    version = "2020-03-06";
+    src = fetchFromGitHub {
+      owner = "dylanaraps";
+      repo = "wal.vim";
+      rev = "10f228ce1e7947f62be412f916229131b7710239";
+      sha256 = "0aiwsrcqnazam56cvwmck4bf7w543cr219bkmq0ngqzna72h9735";
+    };
+  };
+
+  webapi-vim = buildVimPluginFrom2Nix {
+    pname = "webapi-vim";
+    version = "2019-11-18";
+    src = fetchFromGitHub {
+      owner = "mattn";
+      repo = "webapi-vim";
+      rev = "10b8e926d85a3ab689c2966a3df1139bcb4e197f";
+      sha256 = "1hbm2mgsncqdjjfgabgncr4ji90mjsa3z0cx7813vdf113v41x26";
+    };
+  };
+
+  wmgraphviz-vim = buildVimPluginFrom2Nix {
+    pname = "wmgraphviz-vim";
+    version = "2018-04-26";
+    src = fetchFromGitHub {
+      owner = "wannesm";
+      repo = "wmgraphviz.vim";
+      rev = "f08ff5becd1e6e81d681ff2926f2cce29f63cb18";
+      sha256 = "12mb0lbkrzrxyawd9gg6igmsaylvsixcslim0lcgsrd551l9lq2l";
+    };
+  };
+
+  wombat256-vim = buildVimPluginFrom2Nix {
+    pname = "wombat256-vim";
+    version = "2010-10-18";
+    src = fetchFromGitHub {
+      owner = "vim-scripts";
+      repo = "wombat256.vim";
+      rev = "8734ba45dcf5e38c4d2686b35c94f9fcb30427e2";
+      sha256 = "01fdvfwdfqn5xi88lfanb4lb6jmn1ma6wq6d9jj2x7qamdbpvsrg";
+    };
+  };
+
+  workflowish = buildVimPluginFrom2Nix {
+    pname = "workflowish";
+    version = "2015-12-03";
+    src = fetchFromGitHub {
+      owner = "lukaszkorecki";
+      repo = "workflowish";
+      rev = "65472189814dddd060aaa558103d837c2f9a5ec9";
+      sha256 = "044jxkcbycmmahi98qd0ynpc8baay72i45qymv4mxvl1d96fjbmd";
+    };
+  };
+
+  xptemplate = buildVimPluginFrom2Nix {
+    pname = "xptemplate";
+    version = "2020-02-08";
+    src = fetchFromGitHub {
+      owner = "drmingdrmer";
+      repo = "xptemplate";
+      rev = "79d650bad58b9c896ec47785f8a0c7b603105c2d";
+      sha256 = "1myxp0ldk0s46aipx1iswa9zx2fkc4gwqpmhbswqgg7sxl1bz30g";
+    };
+  };
+
+  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";
+    };
+  };
+
+  YankRing-vim = buildVimPluginFrom2Nix {
+    pname = "YankRing-vim";
+    version = "2015-07-29";
+    src = fetchFromGitHub {
+      owner = "vim-scripts";
+      repo = "YankRing.vim";
+      rev = "28854abef8fa4ebd3cb219aefcf22566997d8f65";
+      sha256 = "0zdp8pdsqgrh6lfw8ipjhrig6psvmdxkim9ik801y3r373sk2hxw";
+    };
+  };
+
+  yats-vim = buildVimPluginFrom2Nix {
+    pname = "yats-vim";
+    version = "2020-04-12";
+    src = fetchFromGitHub {
+      owner = "HerringtonDarkholme";
+      repo = "yats.vim";
+      rev = "d5c60217a27bba799b0ed5a2f16c61ea0a9b314e";
+      sha256 = "1km829m6aa3pfgq6p0p0gb102w1b5w454iy8smz1zwipsc84zgp7";
+      fetchSubmodules = true;
+    };
+  };
+
+  YouCompleteMe = buildVimPluginFrom2Nix {
+    pname = "YouCompleteMe";
+    version = "2020-04-06";
+    src = fetchFromGitHub {
+      owner = "ycm-core";
+      repo = "YouCompleteMe";
+      rev = "97150c0b1fde6a7e3f3eea0abab7d114774dd1af";
+      sha256 = "16lwi234cwnp8f5gr8cry40ak2y71f6a7rbqnkq92smmw38fycnq";
+      fetchSubmodules = true;
+    };
+  };
+
+  YUNOcommit-vim = buildVimPluginFrom2Nix {
+    pname = "YUNOcommit-vim";
+    version = "2014-11-26";
+    src = fetchFromGitHub {
+      owner = "esneider";
+      repo = "YUNOcommit.vim";
+      rev = "981082055a73ef076d7e27477874d2303153a448";
+      sha256 = "0mjc7fn405vcx1n7vadl98p5wgm6jxrlbdbkqgjq8f1m1ir81zab";
+    };
+  };
+
+  zeavim-vim = buildVimPluginFrom2Nix {
+    pname = "zeavim-vim";
+    version = "2019-06-07";
+    src = fetchFromGitHub {
+      owner = "KabbAmine";
+      repo = "zeavim.vim";
+      rev = "298e52ad683680b4aa19b53d009cf0e6b9197664";
+      sha256 = "1qj6z0vd7y89wfwh84rndl4iz6cvilncih2fc5xgmljaarg914fs";
+    };
+  };
+
+  zenburn = buildVimPluginFrom2Nix {
+    pname = "zenburn";
+    version = "2020-01-23";
+    src = fetchFromGitHub {
+      owner = "jnurmine";
+      repo = "zenburn";
+      rev = "ec6f369a000602e37e7c066b725f9d6bd12538f4";
+      sha256 = "1ff5ac8lp7fq854kgf03c5h695lm60giw0qda5z428mmzwq0xask";
+    };
+  };
+
+  zig-vim = buildVimPluginFrom2Nix {
+    pname = "zig-vim";
+    version = "2020-04-12";
+    src = fetchFromGitHub {
+      owner = "ziglang";
+      repo = "zig.vim";
+      rev = "0e914f2ab5ab9a9554c31b90be189dca5c4ee3a8";
+      sha256 = "1njf3flx5dcahvk92kaf879sd4a75yq4nnii4ljip7bvkyci8ipa";
+    };
+  };
+
+  zoomwintab-vim = buildVimPluginFrom2Nix {
+    pname = "zoomwintab-vim";
+    version = "2020-04-10";
+    src = fetchFromGitHub {
+      owner = "troydm";
+      repo = "zoomwintab.vim";
+      rev = "63a70b9e12617d6565a0489c68efe44708d19cf8";
+      sha256 = "1dsi2d6wrv5x6w2hrrjzqivsspxxav0hdj0pymml6gry2jcbj4s9";
+    };
+  };
+
+});
+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..7333b61deae6
--- /dev/null
+++ b/nixpkgs/pkgs/misc/vim-plugins/overrides.nix
@@ -0,0 +1,704 @@
+{ lib, stdenv
+, python, cmake, meson, vim, ruby
+, which, fetchFromGitHub, fetchgit, fetchurl, fetchzip, fetchpatch
+, llvmPackages, rustPlatform
+, xkb-switch, fzf, skim, stylish-haskell
+, python3, boost, icu, ncurses
+, ycmd, rake
+, gobject-introspection, glib, wrapGAppsHook
+, substituteAll
+, languagetool
+, Cocoa, CoreFoundation, CoreServices
+, buildVimPluginFrom2Nix
+, nodePackages
+, dasht
+
+# coc-go dependency
+, go
+
+# deoplete-khard dependency
+, khard
+
+# vim-go dependencies
+, asmfmt, delve, errcheck, godef, golint
+, gomodifytags, gotags, gotools, go-motion
+, gnused, reftools, gogetdoc, gometalinter
+, impl, iferr, gocode, gocode-gomod, go-tools
+
+# direnv-vim dependencies
+, direnv
+
+# vCoolor dependency
+, gnome3
+}:
+
+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 {
+    pname = "fzf";
+    version = fzf.version;
+    src = fzf.src;
+  };
+
+  skim = buildVimPluginFrom2Nix {
+    pname = "skim";
+    version = skim.version;
+    src = skim.vim;
+  };
+
+  LanguageClient-neovim = let
+    version = "0.1.156";
+    LanguageClient-neovim-src = fetchurl {
+      url = "https://github.com/autozimu/LanguageClient-neovim/archive/${version}.tar.gz";
+      sha256 = "0bf2va6lpgw7wqpwpfidijbzphhvw48hyc2b529qv12vwgnd1shq";
+    };
+    LanguageClient-neovim-bin = rustPlatform.buildRustPackage {
+      name = "LanguageClient-neovim-bin";
+      src = LanguageClient-neovim-src;
+
+      cargoSha256 = "0w66fcrlaxf6zgkrfpgfybfbm759fzimnr3pjq6sm14frar7lhr6";
+      buildInputs = stdenv.lib.optionals stdenv.isDarwin [ CoreServices ];
+
+      # FIXME: Use impure version of CoreFoundation because of missing symbols.
+      #   Undefined symbols for architecture x86_64: "_CFURLResourceIsReachable"
+      preConfigure = stdenv.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
+    # as an alternative you can execute the following command:
+    # $ eval echo $(nix-instantiate --eval --expr 'with (import <nixpkgs>) {}; clang.default_cxx_stdlib_compile')
+    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
+    '';
+  });
+
+  coc-go = super.coc-go.overrideAttrs(old: {
+    preFixup = ''
+      substituteInPlace "$out"/share/vim-plugins/coc-go/src/utils/tools.ts \
+        --replace 'const cmd = `GOPATH=''${gopath}; go ''${args}`' 'const cmd = `GOPATH=''${gopath}; ${go}/bin/go ''${args}`'
+    '';
+  });
+
+  coc-css = buildVimPluginFrom2Nix {
+    pname = "coc-css";
+    version = nodePackages.coc-css.version;
+    src = "${nodePackages.coc-css}/lib/node_modules/coc-css";
+  };
+
+  coc-emmet = buildVimPluginFrom2Nix {
+    pname = "coc-emmet";
+    version = nodePackages.coc-emmet.version;
+    src = "${nodePackages.coc-emmet}/lib/node_modules/coc-emmet";
+  };
+
+  coc-eslint = buildVimPluginFrom2Nix {
+    pname = "coc-eslint";
+    version = nodePackages.coc-eslint.version;
+    src = "${nodePackages.coc-eslint}/lib/node_modules/coc-eslint";
+  };
+
+  coc-git = buildVimPluginFrom2Nix {
+    pname = "coc-git";
+    version = nodePackages.coc-git.version;
+    src = "${nodePackages.coc-git}/lib/node_modules/coc-git";
+  };
+
+  coc-highlight = buildVimPluginFrom2Nix {
+    pname = "coc-highlight";
+    version = nodePackages.coc-highlight.version;
+    src = "${nodePackages.coc-highlight}/lib/node_modules/coc-highlight";
+  };
+
+  coc-html = buildVimPluginFrom2Nix {
+    pname = "coc-html";
+    version = nodePackages.coc-html.version;
+    src = "${nodePackages.coc-html}/lib/node_modules/coc-html";
+  };
+
+  coc-imselect = buildVimPluginFrom2Nix {
+    pname = "coc-imselect";
+    version = nodePackages.coc-imselect.version;
+    src = "${nodePackages.coc-imselect}/lib/node_modules/coc-imselect";
+  };
+
+  coc-java = buildVimPluginFrom2Nix {
+    pname = "coc-java";
+    version = nodePackages.coc-java.version;
+    src = "${nodePackages.coc-java}/lib/node_modules/coc-java";
+  };
+
+  coc-jest = buildVimPluginFrom2Nix {
+    pname = "coc-jest";
+    version = nodePackages.coc-jest.version;
+    src = "${nodePackages.coc-jest}/lib/node_modules/coc-jest";
+  };
+
+  coc-json = buildVimPluginFrom2Nix {
+    pname = "coc-json";
+    version = nodePackages.coc-json.version;
+    src = "${nodePackages.coc-json}/lib/node_modules/coc-json";
+  };
+
+  coc-lists = buildVimPluginFrom2Nix {
+    pname = "coc-lists";
+    version = nodePackages.coc-lists.version;
+    src = "${nodePackages.coc-lists}/lib/node_modules/coc-lists";
+  };
+
+  coc-metals = buildVimPluginFrom2Nix {
+    pname = "coc-metals";
+    version = nodePackages.coc-metals.version;
+    src = "${nodePackages.coc-metals}/lib/node_modules/coc-metals";
+  };
+
+  coc-pairs = buildVimPluginFrom2Nix {
+    pname = "coc-pairs";
+    version = nodePackages.coc-pairs.version;
+    src = "${nodePackages.coc-pairs}/lib/node_modules/coc-pairs";
+  };
+
+  coc-prettier = buildVimPluginFrom2Nix {
+    pname = "coc-prettier";
+    version = nodePackages.coc-prettier.version;
+    src = "${nodePackages.coc-prettier}/lib/node_modules/coc-prettier";
+  };
+
+  coc-python = buildVimPluginFrom2Nix {
+    pname = "coc-python";
+    version = nodePackages.coc-python.version;
+    src = "${nodePackages.coc-python}/lib/node_modules/coc-python";
+  };
+
+  coc-r-lsp = buildVimPluginFrom2Nix {
+    pname = "coc-r-lsp";
+    version = nodePackages.coc-r-lsp.version;
+    src = "${nodePackages.coc-r-lsp}/lib/node_modules/coc-r-lsp";
+  };
+
+  coc-rls = buildVimPluginFrom2Nix {
+    pname = "coc-rls";
+    version = nodePackages.coc-rls.version;
+    src = "${nodePackages.coc-rls}/lib/node_modules/coc-rls";
+  };
+
+  coc-smartf = buildVimPluginFrom2Nix {
+    pname = "coc-smartf";
+    version = nodePackages.coc-smartf.version;
+    src = "${nodePackages.coc-smartf}/lib/node_modules/coc-smartf";
+  };
+
+  coc-snippets = buildVimPluginFrom2Nix {
+    pname = "coc-snippets";
+    version = nodePackages.coc-snippets.version;
+    src = "${nodePackages.coc-snippets}/lib/node_modules/coc-snippets";
+  };
+
+  coc-solargraph = buildVimPluginFrom2Nix {
+    pname = "coc-solargraph";
+    version = nodePackages.coc-solargraph.version;
+    src = "${nodePackages.coc-solargraph}/lib/node_modules/coc-solargraph";
+  };
+
+  coc-stylelint = buildVimPluginFrom2Nix {
+    pname = "coc-stylelint";
+    version = nodePackages.coc-stylelint.version;
+    src = "${nodePackages.coc-stylelint}/lib/node_modules/coc-stylelint";
+  };
+
+  coc-tabnine = buildVimPluginFrom2Nix {
+    pname = "coc-tabnine";
+    version = nodePackages.coc-tabnine.version;
+    src = "${nodePackages.coc-tabnine}/lib/node_modules/coc-tabnine";
+  };
+
+  coc-tslint = buildVimPluginFrom2Nix {
+    pname = "coc-tslint";
+    version = nodePackages.coc-tslint.version;
+    src = "${nodePackages.coc-tslint}/lib/node_modules/coc-tslint";
+  };
+
+  coc-tslint-plugin = buildVimPluginFrom2Nix {
+    pname = "coc-tslint-plugin";
+    version = nodePackages.coc-tslint-plugin.version;
+    src = "${nodePackages.coc-tslint-plugin}/lib/node_modules/coc-tslint-plugin";
+  };
+
+  coc-tsserver = buildVimPluginFrom2Nix {
+    pname = "coc-tsserver";
+    version = nodePackages.coc-tsserver.version;
+    src = "${nodePackages.coc-tsserver}/lib/node_modules/coc-tsserver";
+  };
+
+  coc-vetur = buildVimPluginFrom2Nix {
+    pname = "coc-vetur";
+    version = nodePackages.coc-vetur.version;
+    src = "${nodePackages.coc-vetur}/lib/node_modules/coc-vetur";
+  };
+
+  coc-vimtex = buildVimPluginFrom2Nix {
+    pname = "coc-vimtex";
+    version = nodePackages.coc-vimtex.version;
+    src = "${nodePackages.coc-vimtex}/lib/node_modules/coc-vimtex";
+  };
+
+  coc-wxml = buildVimPluginFrom2Nix {
+    pname = "coc-wxml";
+    version = nodePackages.coc-wxml.version;
+    src = "${nodePackages.coc-wxml}/lib/node_modules/coc-wxml";
+  };
+
+  coc-yaml = buildVimPluginFrom2Nix {
+    pname = "coc-yaml";
+    version = nodePackages.coc-yaml.version;
+    src = "${nodePackages.coc-yaml}/lib/node_modules/coc-yaml";
+  };
+
+  coc-yank = buildVimPluginFrom2Nix {
+    pname = "coc-yank";
+    version = nodePackages.coc-yank.version;
+    src = "${nodePackages.coc-yank}/lib/node_modules/coc-yank";
+  };
+
+  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 = stdenv.lib.licenses.mit;
+      maintainers = with stdenv.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 ];
+  });
+
+  ghcid = super.ghcid.overrideAttrs(old: {
+    configurePhase = "cd plugins/nvim";
+  });
+
+  vim-gist = super.vim-gist.overrideAttrs(old: {
+    dependencies = with super; [ webapi-vim ];
+  });
+
+  meson = buildVimPluginFrom2Nix {
+    inherit (meson) pname version src;
+    preInstall = "cd data/syntax-highlighting/vim";
+    meta.maintainers = with stdenv.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-ultisnips = super.ncm2-ultisnips.overrideAttrs(old: {
+    dependencies = with super; [ ultisnips ];
+  });
+
+  fzf-vim = super.fzf-vim.overrideAttrs(old: {
+    dependencies = [ self.fzfWrapper ];
+  });
+
+  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 stdenv.lib; {
+      description = "Vim-Improved eMACS: Emacs emulation plugin for Vim";
+      homepage = "http://algorithm.com.au/code/vimacs";
+      license = licenses.gpl2Plus;
+      maintainers = with stdenv.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 = stdenv.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-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
+      gometalinter
+      gomodifytags
+      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;
+      })
+    ];
+  });
+
+  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-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 stdenv.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 = stdenv.lib.licenses.mit;
+    };
+  });
+
+  lf-vim = super.lf-vim.overrideAttrs(old: {
+    dependencies = with super; [ bclose-vim ];
+  });
+
+  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 = stdenv.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
+      '';
+  });
+}
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..c6bf605ee473
--- /dev/null
+++ b/nixpkgs/pkgs/misc/vim-plugins/update.py
@@ -0,0 +1,562 @@
+#!/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 update.py
+
+import argparse
+import functools
+import http
+import json
+import os
+import subprocess
+import sys
+import time
+import traceback
+import urllib.error
+import urllib.parse
+import urllib.request
+import xml.etree.ElementTree as ET
+from datetime import datetime
+from functools import wraps
+from multiprocessing.dummy import Pool
+from pathlib import Path
+from typing import Dict, List, Optional, Tuple, Union, Any, Callable
+from urllib.parse import urljoin, urlparse
+from tempfile import NamedTemporaryFile
+
+import git
+
+ATOM_ENTRY = "{http://www.w3.org/2005/Atom}entry"  # " vim gets confused here
+ATOM_LINK = "{http://www.w3.org/2005/Atom}link"  # "
+ATOM_UPDATED = "{http://www.w3.org/2005/Atom}updated"  # "
+
+ROOT = Path(__file__).parent
+DEFAULT_IN = ROOT.joinpath("vim-plugin-names")
+DEFAULT_OUT = ROOT.joinpath("generated.nix")
+DEPRECATED = ROOT.joinpath("deprecated.json")
+
+
+def retry(ExceptionToCheck: Any, tries: int = 4, delay: float = 3, backoff: float = 2):
+    """Retry calling the decorated function using an exponential backoff.
+    http://www.saltycrane.com/blog/2009/11/trying-out-retry-decorator-python/
+    original from: http://wiki.python.org/moin/PythonDecoratorLibrary#Retry
+    (BSD licensed)
+    :param ExceptionToCheck: the exception on which to retry
+    :param tries: number of times to try (not retry) before giving up
+    :param delay: initial delay between retries in seconds
+    :param backoff: backoff multiplier e.g. value of 2 will double the delay
+        each retry
+    """
+
+    def deco_retry(f: Callable) -> Callable:
+        @wraps(f)
+        def f_retry(*args: Any, **kwargs: Any) -> Any:
+            mtries, mdelay = tries, delay
+            while mtries > 1:
+                try:
+                    return f(*args, **kwargs)
+                except ExceptionToCheck as e:
+                    print(f"{str(e)}, Retrying in {mdelay} seconds...")
+                    time.sleep(mdelay)
+                    mtries -= 1
+                    mdelay *= backoff
+            return f(*args, **kwargs)
+
+        return f_retry  # true decorator
+
+    return deco_retry
+
+
+class Repo:
+    def __init__(
+        self, owner: str, name: str, branch: str, alias: Optional[str]
+    ) -> None:
+        self.owner = owner
+        self.name = name
+        self.branch = branch
+        self.alias = alias
+        self.redirect: Dict[str, str] = {}
+
+    def url(self, path: str) -> str:
+        return urljoin(f"https://github.com/{self.owner}/{self.name}/", path)
+
+    def __repr__(self) -> str:
+        return f"Repo({self.owner}, {self.name})"
+
+    @retry(urllib.error.URLError, tries=4, delay=3, backoff=2)
+    def has_submodules(self) -> bool:
+        try:
+            urllib.request.urlopen(
+                self.url(f"blob/{self.branch}/.gitmodules"), timeout=10
+            ).close()
+        except urllib.error.HTTPError as e:
+            if e.code == 404:
+                return False
+            else:
+                raise
+        return True
+
+    @retry(urllib.error.URLError, tries=4, delay=3, backoff=2)
+    def latest_commit(self) -> Tuple[str, datetime]:
+        commit_url = self.url(f"commits/{self.branch}.atom")
+        with urllib.request.urlopen(commit_url, timeout=10) as req:
+            self.check_for_redirect(commit_url, req)
+            xml = req.read()
+            root = ET.fromstring(xml)
+            latest_entry = root.find(ATOM_ENTRY)
+            assert latest_entry is not None, f"No commits found in repository {self}"
+            commit_link = latest_entry.find(ATOM_LINK)
+            assert commit_link is not None, f"No link tag found feed entry {xml}"
+            url = urlparse(commit_link.get("href"))
+            updated_tag = latest_entry.find(ATOM_UPDATED)
+            assert (
+                updated_tag is not None and updated_tag.text is not None
+            ), f"No updated tag found feed entry {xml}"
+            updated = datetime.strptime(updated_tag.text, "%Y-%m-%dT%H:%M:%SZ")
+            return Path(str(url.path)).name, updated
+
+    def check_for_redirect(self, url: str, req: http.client.HTTPResponse):
+        response_url = req.geturl()
+        if url != response_url:
+            new_owner, new_name = (
+                urllib.parse.urlsplit(response_url).path.strip("/").split("/")[:2]
+            )
+            end_line = "\n" if self.alias is None else f" as {self.alias}\n"
+            plugin_line = "{owner}/{name}" + end_line
+
+            old_plugin = plugin_line.format(owner=self.owner, name=self.name)
+            new_plugin = plugin_line.format(owner=new_owner, name=new_name)
+            self.redirect[old_plugin] = new_plugin
+
+    def prefetch_git(self, ref: str) -> str:
+        data = subprocess.check_output(
+            ["nix-prefetch-git", "--fetch-submodules", self.url(""), ref]
+        )
+        return json.loads(data)["sha256"]
+
+    def prefetch_github(self, ref: str) -> str:
+        data = subprocess.check_output(
+            ["nix-prefetch-url", "--unpack", self.url(f"archive/{ref}.tar.gz")]
+        )
+        return data.strip().decode("utf-8")
+
+
+class Plugin:
+    def __init__(
+        self,
+        name: str,
+        commit: str,
+        has_submodules: bool,
+        sha256: str,
+        date: Optional[datetime] = None,
+    ) -> None:
+        self.name = name
+        self.commit = commit
+        self.has_submodules = has_submodules
+        self.sha256 = sha256
+        self.date = date
+
+    @property
+    def normalized_name(self) -> str:
+        return self.name.replace(".", "-")
+
+    @property
+    def version(self) -> str:
+        assert self.date is not None
+        return self.date.strftime("%Y-%m-%d")
+
+    def as_json(self) -> Dict[str, str]:
+        copy = self.__dict__.copy()
+        del copy["date"]
+        return copy
+
+
+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)"""
+
+
+class CleanEnvironment(object):
+    def __enter__(self) -> None:
+        self.old_environ = os.environ.copy()
+        local_pkgs = str(ROOT.joinpath("../../.."))
+        os.environ["NIX_PATH"] = f"localpkgs={local_pkgs}"
+        self.empty_config = NamedTemporaryFile()
+        self.empty_config.write(b"{}")
+        self.empty_config.flush()
+        os.environ["NIXPKGS_CONFIG"] = self.empty_config.name
+
+    def __exit__(self, exc_type: Any, exc_value: Any, traceback: Any) -> None:
+        os.environ.update(self.old_environ)
+        self.empty_config.close()
+
+
+def get_current_plugins() -> List[Plugin]:
+    with CleanEnvironment():
+        out = subprocess.check_output(["nix", "eval", "--json", GET_PLUGINS])
+    data = json.loads(out)
+    plugins = []
+    for name, attr in data.items():
+        p = Plugin(name, attr["rev"], attr["submodules"], attr["sha256"])
+        plugins.append(p)
+    return plugins
+
+
+def prefetch_plugin(
+    user: str,
+    repo_name: str,
+    branch: str,
+    alias: Optional[str],
+    cache: "Optional[Cache]" = None,
+) -> Tuple[Plugin, Dict[str, str]]:
+    repo = Repo(user, repo_name, branch, alias)
+    commit, date = repo.latest_commit()
+    has_submodules = repo.has_submodules()
+    cached_plugin = cache[commit] if cache else None
+    if cached_plugin is not None:
+        cached_plugin.name = alias or repo_name
+        cached_plugin.date = date
+        return cached_plugin, repo.redirect
+
+    print(f"prefetch {user}/{repo_name}")
+    if has_submodules:
+        sha256 = repo.prefetch_git(commit)
+    else:
+        sha256 = repo.prefetch_github(commit)
+
+    return (
+        Plugin(alias or repo_name, commit, has_submodules, sha256, date=date),
+        repo.redirect,
+    )
+
+
+def fetch_plugin_from_pluginline(plugin_line: str) -> Plugin:
+    plugin, _ = prefetch_plugin(*parse_plugin_line(plugin_line))
+    return plugin
+
+
+def print_download_error(plugin: str, ex: Exception):
+    print(f"{plugin}: {ex}", file=sys.stderr)
+    ex_traceback = ex.__traceback__
+    tb_lines = [
+        line.rstrip("\n")
+        for line in traceback.format_exception(ex.__class__, ex, ex_traceback)
+    ]
+    print("\n".join(tb_lines))
+
+
+def check_results(
+    results: List[Tuple[str, str, Union[Exception, Plugin], Dict[str, str]]]
+) -> Tuple[List[Tuple[str, str, Plugin]], Dict[str, str]]:
+    failures: List[Tuple[str, Exception]] = []
+    plugins = []
+    redirects: Dict[str, str] = {}
+    for (owner, name, result, redirect) in results:
+        if isinstance(result, Exception):
+            failures.append((name, result))
+        else:
+            plugins.append((owner, name, result))
+            redirects.update(redirect)
+
+    print(f"{len(results) - len(failures)} plugins were checked", end="")
+    if len(failures) == 0:
+        print()
+        return plugins, redirects
+    else:
+        print(f", {len(failures)} plugin(s) could not be downloaded:\n")
+
+        for (plugin, exception) in failures:
+            print_download_error(plugin, exception)
+
+        sys.exit(1)
+
+
+def parse_plugin_line(line: str) -> Tuple[str, str, str, Optional[str]]:
+    branch = "master"
+    alias = None
+    name, repo = line.split("/")
+    if " as " in repo:
+        repo, alias = repo.split(" as ")
+        alias = alias.strip()
+    if "@" in repo:
+        repo, branch = repo.split("@")
+
+    return (name.strip(), repo.strip(), branch.strip(), alias)
+
+
+def load_plugin_spec(plugin_file: str) -> List[Tuple[str, str, str, Optional[str]]]:
+    plugins = []
+    with open(plugin_file) as f:
+        for line in f:
+            plugin = parse_plugin_line(line)
+            if not plugin[0]:
+                msg = f"Invalid repository {line}, must be in the format owner/repo[ as alias]"
+                print(msg, file=sys.stderr)
+                sys.exit(1)
+            plugins.append(plugin)
+    return plugins
+
+
+def get_cache_path() -> Optional[Path]:
+    xdg_cache = os.environ.get("XDG_CACHE_HOME", None)
+    if xdg_cache is None:
+        home = os.environ.get("HOME", None)
+        if home is None:
+            return None
+        xdg_cache = str(Path(home, ".cache"))
+
+    return Path(xdg_cache, "vim-plugin-cache.json")
+
+
+class Cache:
+    def __init__(self, initial_plugins: List[Plugin]) -> None:
+        self.cache_file = get_cache_path()
+
+        downloads = {}
+        for plugin in initial_plugins:
+            downloads[plugin.commit] = plugin
+        downloads.update(self.load())
+        self.downloads = downloads
+
+    def load(self) -> Dict[str, Plugin]:
+        if self.cache_file is None or not self.cache_file.exists():
+            return {}
+
+        downloads: Dict[str, Plugin] = {}
+        with open(self.cache_file) as f:
+            data = json.load(f)
+            for attr in data.values():
+                p = Plugin(
+                    attr["name"], attr["commit"], attr["has_submodules"], attr["sha256"]
+                )
+                downloads[attr["commit"]] = p
+        return downloads
+
+    def store(self) -> None:
+        if self.cache_file is None:
+            return
+
+        os.makedirs(self.cache_file.parent, exist_ok=True)
+        with open(self.cache_file, "w+") as f:
+            data = {}
+            for name, attr in self.downloads.items():
+                data[name] = attr.as_json()
+            json.dump(data, f, indent=4, sort_keys=True)
+
+    def __getitem__(self, key: str) -> Optional[Plugin]:
+        return self.downloads.get(key, None)
+
+    def __setitem__(self, key: str, value: Plugin) -> None:
+        self.downloads[key] = value
+
+
+def prefetch(
+    args: Tuple[str, str, str, Optional[str]], cache: Cache
+) -> Tuple[str, str, Union[Exception, Plugin], dict]:
+    assert len(args) == 4
+    owner, repo, branch, alias = args
+    try:
+        plugin, redirect = prefetch_plugin(owner, repo, branch, alias, cache)
+        cache[plugin.commit] = plugin
+        return (owner, repo, plugin, redirect)
+    except Exception as e:
+        return (owner, repo, e, {})
+
+
+header = (
+    "# This file has been generated by ./pkgs/misc/vim-plugins/update.py. Do not edit!"
+)
+
+
+def generate_nix(plugins: List[Tuple[str, str, 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}
+    }};
+  }};
+"""
+            )
+        f.write(
+            """
+});
+in lib.fix' (lib.extends overrides packages)
+"""
+        )
+    print(f"updated {outfile}")
+
+
+def rewrite_input(
+    input_file: Path, redirects: Dict[str, str] = None, append: Tuple = ()
+):
+    with open(input_file, "r") as f:
+        lines = f.readlines()
+
+    lines.extend(append)
+
+    if redirects:
+        lines = [redirects.get(line, line) for line in lines]
+
+        cur_date_iso = datetime.now().strftime("%Y-%m-%d")
+        with open(DEPRECATED, "r") as f:
+            deprecations = json.load(f)
+        for old, new in redirects.items():
+            old_plugin = fetch_plugin_from_pluginline(old)
+            new_plugin = fetch_plugin_from_pluginline(new)
+            if old_plugin.normalized_name != new_plugin.normalized_name:
+                deprecations[old_plugin.normalized_name] = {
+                    "new": new_plugin.normalized_name,
+                    "date": cur_date_iso,
+                }
+        with open(DEPRECATED, "w") as f:
+            json.dump(deprecations, f, indent=4, sort_keys=True)
+
+    lines = sorted(lines, key=str.casefold)
+
+    with open(input_file, "w") as f:
+        f.writelines(lines)
+
+
+def parse_args():
+    parser = argparse.ArgumentParser(
+        description=(
+            "Updates nix derivations for vim plugins"
+            f"By default from {DEFAULT_IN} to {DEFAULT_OUT}"
+        )
+    )
+    parser.add_argument(
+        "--add",
+        dest="add_plugins",
+        default=[],
+        action="append",
+        help="Plugin to add to vimPlugins from Github in the form owner/repo",
+    )
+    parser.add_argument(
+        "--input-names",
+        "-i",
+        dest="input_file",
+        default=DEFAULT_IN,
+        help="A list of plugins in the form owner/repo",
+    )
+    parser.add_argument(
+        "--out",
+        "-o",
+        dest="outfile",
+        default=DEFAULT_OUT,
+        help="Filename to save generated nix code",
+    )
+    parser.add_argument(
+        "--proc",
+        "-p",
+        dest="proc",
+        type=int,
+        default=30,
+        help="Number of concurrent processes to spawn.",
+    )
+    return parser.parse_args()
+
+
+def commit(repo: git.Repo, message: str, files: List[Path]) -> None:
+    files_staged = repo.index.add([str(f.resolve()) for f in files])
+
+    if files_staged:
+        print(f'committing to nixpkgs "{message}"')
+        repo.index.commit(message)
+    else:
+        print("no changes in working tree to commit")
+
+
+def get_update(input_file: str, outfile: str, proc: int):
+    cache: Cache = Cache(get_current_plugins())
+    _prefetch = functools.partial(prefetch, cache=cache)
+
+    def update() -> dict:
+        plugin_names = load_plugin_spec(input_file)
+
+        try:
+            pool = Pool(processes=proc)
+            results = pool.map(_prefetch, plugin_names)
+        finally:
+            cache.store()
+
+        plugins, redirects = check_results(results)
+
+        generate_nix(plugins, outfile)
+
+        return redirects
+
+    return update
+
+
+def main():
+    args = parse_args()
+    nixpkgs_repo = git.Repo(ROOT, search_parent_directories=True)
+    update = get_update(args.input_file, args.outfile, args.proc)
+
+    redirects = update()
+    rewrite_input(args.input_file, redirects)
+    commit(nixpkgs_repo, "vimPlugins: update", [args.outfile])
+
+    if redirects:
+        update()
+        commit(
+            nixpkgs_repo,
+            "vimPlugins: resolve github repository redirects",
+            [args.outfile, args.input_file, DEPRECATED],
+        )
+
+    for plugin_line in args.add_plugins:
+        rewrite_input(args.input_file, append=(plugin_line + "\n",))
+        update()
+        plugin = fetch_plugin_from_pluginline(plugin_line)
+        commit(
+            nixpkgs_repo,
+            "vimPlugins.{name}: init at {version}".format(
+                name=plugin.normalized_name, version=plugin.version
+            ),
+            [args.outfile, args.input_file],
+        )
+
+
+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..9a854d58b08d
--- /dev/null
+++ b/nixpkgs/pkgs/misc/vim-plugins/vim-plugin-names
@@ -0,0 +1,574 @@
+907th/vim-auto-save
+airblade/vim-gitgutter
+airblade/vim-rooter
+ajh17/Spacegray.vim
+aklt/plantuml-syntax
+albfan/nerdtree-git-plugin
+altercation/vim-colors-solarized
+alvan/vim-closetag
+alx741/vim-hindent
+alx741/vim-stylishask
+amiorin/ctrlp-z
+andrep/vimacs
+andreshazard/vim-logreview
+AndrewRadev/splitjoin.vim
+andsild/peskcolor.vim
+andviro/flake8-vim
+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
+bazelbuild/vim-bazel
+bbchung/clighter8
+benizi/vim-automkdir
+benmills/vimux
+bhurlow/vim-parinfer
+bitc/vim-hdevtools
+bkad/camelcasemotion
+bling/vim-bufferline
+blueyed/vim-diminactive
+bogado/file-line
+bohlender/vim-smt2
+brennanfee/vim-gui-position
+bronson/vim-trailing-whitespace
+brooth/far.vim
+carlitux/deoplete-ternjs
+ccarpita/rtorrent-syntax-file
+cespare/vim-toml
+Chiel92/vim-autoformat
+chikatoike/concealedyank.vim
+chikatoike/sourcemap.vim
+chrisbra/CheckAttach
+chrisbra/csv.vim
+chrisbra/NrrwRgn
+chrisbra/Recover.vim
+chrisbra/unicode.vim
+chrisgeo/sparkup
+chriskempson/base16-vim
+christoomey/vim-sort-motion
+christoomey/vim-tmux-navigator
+ckarnell/antonys-macro-repeater
+ckipp01/coc-metals
+cloudhead/neovim-fuzzy
+CoatiSoftware/vim-sourcetrail
+cocopon/iceberg.vim
+cohama/lexima.vim
+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-zsh
+derekelkins/agda-vim
+derekwyatt/vim-scala
+dhruvasagar/vim-prosession
+dhruvasagar/vim-table-mode
+digitaltoad/vim-pug
+direnv/direnv.vim
+dleonard0/pony-vim-syntax
+dracula/vim
+drewtempelmeyer/palenight.vim
+drmingdrmer/xptemplate
+dylanaraps/wal.vim
+eagletmt/ghcmod-vim
+eagletmt/neco-ghc
+easymotion/vim-easymotion
+editorconfig/editorconfig-vim
+ehamberg/vim-cute-python
+eikenb/acp
+elixir-editors/vim-elixir
+elmcast/elm-vim
+elzr/vim-json
+embear/vim-localvimrc
+enomsg/vim-haskellConcealPlus
+ensime/ensime-vim
+ervandew/supertab
+esneider/YUNOcommit.vim
+farmergreg/vim-lastplace
+fatih/vim-go
+FelikZ/ctrlp-py-matcher
+fenetikm/falcon
+fisadev/vim-isort
+flazz/vim-colorschemes
+floobits/floobits-neovim
+freitass/todo.txt-vim
+frigoeu/psc-ide-vim
+fsharp/vim-fsharp
+fszymanski/deoplete-emoji
+garbas/vim-snipmate
+gentoo/gentoo-syntax
+gibiansky/vim-textobj-haskell
+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-terraform
+haya14busa/incsearch-easymotion.vim
+haya14busa/incsearch.vim
+haya14busa/vim-asterisk
+heavenshell/vim-jsdoc
+hecal3/vim-leader-guide
+henrik/vim-indexed-search
+HerringtonDarkholme/yats.vim
+honza/vim-snippets
+hotwatermorning/auto-git-diff
+hsanson/vim-android
+hsitz/VimOrganizer
+iamcco/coc-spell-checker
+ianks/vim-tsx
+icymind/NeoSolarized
+idris-hackers/idris-vim
+Inazuma110/deoplete-greek
+inkarkat/vim-SyntaxRange
+int3/vim-extradite
+itchyny/calendar.vim
+itchyny/lightline.vim
+itchyny/thumbnail.vim
+itchyny/vim-cursorword
+itchyny/vim-gitbranch
+ivanov/vim-ipython
+jacoborus/tender.vim
+janko/vim-test
+jaredgorski/SpaceCamp
+JazzCore/ctrlp-cmatcher
+jceb/vim-hier
+jceb/vim-orgmode
+jeetsukumaran/vim-buffergator
+jeetsukumaran/vim-indentwise
+jeffkreeftmeijer/neovim-sensible
+jelera/vim-javascript-syntax
+jgdavey/tslime.vim
+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-go
+jpalardy/vim-slime
+jparise/vim-phabricator
+jreybert/vimagit
+jsfaint/gen_tags.vim
+JuliaEditorSupport/deoplete-julia
+JuliaEditorSupport/julia-vim
+Julian/vim-textobj-variable-segment
+junegunn/fzf.vim
+junegunn/goyo.vim
+junegunn/gv.vim
+junegunn/limelight.vim
+junegunn/seoul256.vim
+junegunn/vader.vim
+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
+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
+kchmck/vim-coffee-script
+KeitaNakamura/neodark.vim
+keith/swift.vim
+kien/rainbow_parentheses.vim
+knubie/vim-kitty-navigator
+konfekt/fastfold
+kristijanhusak/defx-git
+kristijanhusak/defx-icons
+kristijanhusak/deoplete-phpactor
+kristijanhusak/vim-hybrid-material
+kshenoy/vim-signature
+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
+lfilho/cosco.vim
+lifepillar/vim-mucomplete
+lilydjwg/colorizer
+liuchengxu/vim-which-key
+liuchengxu/vista.vim
+LnL7/vim-nix
+LucHermitte/lh-brackets
+LucHermitte/lh-vim-lib
+ludovicchabant/vim-gutentags
+ludovicchabant/vim-lawrencium
+lukaszkorecki/workflowish
+lumiliet/vim-twig
+luochen1990/rainbow
+lyokha/vim-xkbswitch
+machakann/vim-highlightedyank
+machakann/vim-sandwich
+machakann/vim-swap
+majutsushi/tagbar
+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
+megaannum/forms
+megaannum/self
+mengelbrecht/lightline-bufferline
+mfukar/robotframework-vim
+mg979/vim-visual-multi
+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
+mopp/sky-color-clock.vim
+morhetz/gruvbox
+motus/pig.vim
+mpickering/hlint-refactor-vim
+nanotech/jellybeans.vim
+natebosch/vim-lsc
+nathanaelkane/vim-indent-guides
+nathangrigg/vim-beancount
+navicore/vissort.vim
+nbouscal/vim-stylish-haskell
+ncm2/float-preview.nvim
+ncm2/ncm2
+ncm2/ncm2-bufword
+ncm2/ncm2-jedi
+ncm2/ncm2-path
+ncm2/ncm2-tmux
+ncm2/ncm2-ultisnips
+ndmitchell/ghcid
+neoclide/coc-css
+neoclide/coc-denite
+neoclide/coc-emmet
+neoclide/coc-eslint
+neoclide/coc-git
+neoclide/coc-highlight
+neoclide/coc-html
+neoclide/coc-imselect
+neoclide/coc-java
+neoclide/coc-jest
+neoclide/coc-json
+neoclide/coc-lists
+neoclide/coc-neco
+neoclide/coc-pairs
+neoclide/coc-prettier
+neoclide/coc-python
+neoclide/coc-r-lsp
+neoclide/coc-rls
+neoclide/coc-smartf
+neoclide/coc-snippets
+neoclide/coc-solargraph
+neoclide/coc-stylelint
+neoclide/coc-tabnine
+neoclide/coc-tslint
+neoclide/coc-tslint-plugin
+neoclide/coc-tsserver
+neoclide/coc-vetur
+neoclide/coc-vimtex
+neoclide/coc-wxml
+neoclide/coc-yaml
+neoclide/coc-yank
+neoclide/coc.nvim@release
+neoclide/denite-extra
+neoclide/denite-git
+neoclide/vim-easygit
+neomake/neomake
+neovim/nvim-lsp
+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-terminal.lua
+ntpeters/vim-better-whitespace
+numirias/semshi
+nvie/vim-flake8
+octol/vim-cpp-enhanced-highlight
+OrangeT/vim-csharp
+osyo-manga/shabadou.vim
+osyo-manga/vim-anzu
+osyo-manga/vim-textobj-multiblock
+osyo-manga/vim-watchdogs
+pangloss/vim-javascript
+parsonsmatt/intero-neovim
+pearofducks/ansible-vim
+peterbjorgensen/sved
+peterhoeg/vim-qml
+phanviet/vim-monokai-pro
+plasticboy/vim-markdown
+ponko2/deoplete-fish
+posva/vim-vue
+powerman/vim-plugin-AnsiEsc
+PProvost/vim-ps1
+preservim/nerdcommenter
+preservim/nerdtree
+ptzz/lf.vim
+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/vim-ghost
+Raimondi/delimitMate
+rakr/vim-one
+rbgrouleff/bclose.vim
+reedes/vim-pencil
+reedes/vim-wordy
+rhysd/committia.vim
+rhysd/vim-grammarous
+rhysd/vim-operator-surround
+rodjek/vim-puppet
+romainl/vim-cool
+ron89/thesaurus_query.vim
+roxma/nvim-cm-racer
+roxma/nvim-completion-manager
+roxma/nvim-yarp
+RRethy/vim-illuminate
+rust-lang/rust.vim
+ryanoasis/vim-devicons
+ryvnf/readline.vim
+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-lsp
+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
+SirVer/ultisnips
+sjl/gundo.vim
+sjl/splice.vim
+sk1418/last256
+slashmili/alchemist.vim
+solarnz/arcanist.vim
+sonph/onehalf
+stefandtw/quickfix-reflector.vim
+stephpy/vim-yaml
+sunaku/vim-dasht
+svermeulen/vim-subversive
+t9md/vim-choosewin
+t9md/vim-smalls
+takac/vim-hardtime
+tbodt/deoplete-tabnine
+ternjs/tern_for_vim
+terryma/vim-expand-region
+terryma/vim-multiple-cursors
+tex/vimpreviewpandoc
+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
+tikhomirov/vim-glsl
+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
+tpope/vim-abolish
+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-liquid
+tpope/vim-obsession
+tpope/vim-pathogen
+tpope/vim-projectionist
+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
+triglav/vim-visual-increment
+troydm/zoomwintab.vim
+twerth/ir_black
+twinside/vim-haskellconceal
+Twinside/vim-hoogle
+tyru/caw.vim
+tyru/open-browser-github.vim
+tyru/open-browser.vim
+uarun/vim-protobuf
+udalov/kotlin-vim
+ujihisa/neco-look
+unblevable/quick-scope
+Valodim/deoplete-notmuch
+vhda/verilog_systemverilog.vim
+vim-airline/vim-airline
+vim-airline/vim-airline-themes
+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-utils/vim-husk
+Vimjas/vim-python-pep8-indent
+vimlab/split-term.vim
+vimoutliner/vimoutliner
+vimwiki/vimwiki
+vito-c/jq.vim
+vmchale/ats-vim
+vmchale/dhall-vim
+VundleVim/Vundle.vim
+wakatime/vim-wakatime
+wannesm/wmgraphviz.vim
+wellle/targets.vim
+wellle/tmux-complete.vim
+will133/vim-dirdiff
+wincent/command-t
+wincent/ferret
+wsdjeg/vim-fetch
+xavierd/clang_complete
+xolox/vim-easytags
+xolox/vim-misc
+xuhdev/vim-latex-live-preview
+ycm-core/YouCompleteMe
+Yggdroot/indentLine
+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..d745198e6a40
--- /dev/null
+++ b/nixpkgs/pkgs/misc/vim-plugins/vim-utils.nix
@@ -0,0 +1,531 @@
+{ 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 (stdenv) 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";
+
+  vimrcFile = {
+    packages ? null,
+    vam ? null,
+    pathogen ? null,
+    plug ? null,
+    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 writeText "vimrc" ''
+  " configuration generated by NIX
+  set nocompatible
+
+  ${vamImpl}
+  ${pathogenImpl}
+  ${plugImpl}
+  ${nativeImpl}
+
+  ${customRC}
+  '';
+
+in
+
+rec {
+  inherit vimrcFile;
+
+  # 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: stdenv.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 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..77cf28c552ed
--- /dev/null
+++ b/nixpkgs/pkgs/misc/vscode-extensions/cpptools/default.nix
@@ -0,0 +1,129 @@
+{ stdenv, 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";
+
+  langComponentBinaries = stdenv.mkDerivation rec {
+    name = "cpptools-language-component-binaries";
+
+    src = fetchurl {
+      # Follow https://go.microsoft.com/fwlink/?linkid=2037608
+      url = "https://download.visualstudio.microsoft.com/download/pr/fd05d7fd-b771-4746-9c54-b5b30afcd82e/1f443716d6156a265bf50cb6e53fa999/bin_linux.zip";
+      sha256 = "198xnq709clibjmd8rrv0haniy2m3qvhn89hg9hpj6lvg9lsr7a4";
+    };
+
+    sourceRoot = name;
+
+    nativeBuildInputs = [ unzip ];
+
+    unpackPhase = ''
+      runHook preUnpack
+      unzip -d $name $src || true
+      runHook postUnpack
+    '';
+
+    installPhase = ''
+      runHook preInstall
+      mkdir -p "$out/bin"
+      cp -a -t "$out/bin" ./bin/*
+      runHook postInstall
+    '';
+
+    postFixup = ''
+      elfInterpreter="$(cat $NIX_CC/nix-support/dynamic-linker)"
+      patchelf --set-interpreter "$elfInterpreter" $out/bin/Microsoft.VSCode.CPP.Extension.linux
+      patchelf --set-interpreter "$elfInterpreter" $out/bin/Microsoft.VSCode.CPP.IntelliSense.Msvc.linux
+      chmod a+x $out/bin/Microsoft.VSCode.CPP.Extension.linux $out/bin/Microsoft.VSCode.CPP.IntelliSense.Msvc.linux
+    '';
+  };
+
+  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 {
+  mktplcRef = {
+    name = "cpptools";
+    publisher = "ms-vscode";
+    version = "0.27.0";
+    sha256 = "06l25fjlcj0m7f7883afbh0x2ikgkqi768kv8y4qi1jc1gxndpm0";
+  };
+
+  buildInputs = [
+    jq
+  ];
+
+  postPatch = ''
+    mv ./package.json ./package_ori.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_ori.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"
+
+    # Move unused files out of the way.
+    mv ./debugAdapters/bin/OpenDebugAD7.exe.config ./debugAdapters/bin/OpenDebugAD7.exe.config.unused
+
+    # Combining the language component binaries as part of our package.
+    find "${langComponentBinaries}/bin" -mindepth 1 -maxdepth 1 | xargs cp -p -t "./bin"
+
+    # Mono runtimes from nix package (used by generated `OpenDebugAD7`).
+    rm "./debugAdapters/OpenDebugAD7"
+    cp -p "${openDebugAD7Script}" "./debugAdapters/OpenDebugAD7"
+
+    # Clang-format from nix package.
+    mkdir -p "./LLVM"
+    find "${clang-tools}" -mindepth 1 -maxdepth 1 | xargs ln -s -t "./LLVM"
+  '';
+
+    meta = with stdenv.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..433371e079e0
--- /dev/null
+++ b/nixpkgs/pkgs/misc/vscode-extensions/default.nix
@@ -0,0 +1,196 @@
+{ stdenv, callPackage, vscode-utils, llvmPackages_8 }:
+
+let
+  inherit (vscode-utils) buildVscodeMarketplaceExtension;
+in
+#
+# 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}".
+#
+{
+
+  alanz.vscode-hie-server = buildVscodeMarketplaceExtension {
+    mktplcRef = {
+      name = "vscode-hie-server";
+      publisher = "alanz";
+      version = "0.0.27"; # see the note above
+      sha256 = "1mz0h5zd295i73hbji9ivla8hx02i4yhqcv6l4r23w3f07ql3i8h";
+    };
+    meta = {
+      license = stdenv.lib.licenses.mit;
+    };
+  };
+
+  bbenoist.Nix = buildVscodeMarketplaceExtension {
+    mktplcRef = {
+        name = "Nix";
+        publisher = "bbenoist";
+        version = "1.0.1";
+        sha256 = "0zd0n9f5z1f0ckzfjr38xw2zzmcxg1gjrava7yahg5cvdcw6l35b";
+    };
+    meta = with stdenv.lib; {
+      license = licenses.mit;
+    };
+  };
+
+  cmschuetz12.wal = buildVscodeMarketplaceExtension {
+    mktplcRef = {
+        name = "wal";
+        publisher = "cmschuetz12";
+        version = "0.1.0";
+        sha256 = "0q089jnzqzhjfnv0vlb5kf747s3mgz64r7q3zscl66zb2pz5q4zd";
+    };
+    meta = with stdenv.lib; {
+      license = licenses.mit;
+    };
+  };
+
+  formulahendry.auto-close-tag = buildVscodeMarketplaceExtension {
+    mktplcRef = {
+      name = "auto-close-tag";
+      publisher = "formulahendry";
+      version = "0.5.6";
+      sha256 = "058jgmllqb0j6gg5anghdp35nkykii28igfcwqgh4bp10pyvspg0";
+    };
+    meta = {
+      license = stdenv.lib.licenses.mit;
+    };
+  };
+
+  james-yu.latex-workshop = buildVscodeMarketplaceExtension {
+    mktplcRef = {
+      name = "latex-workshop";
+      publisher = "James-Yu";
+      version = "8.2.0";
+      sha256 = "1ai16aam4v5jzhxgms589q0l24kyk1a9in6z4i7g05b3sahyxab2";
+    };
+    meta = with stdenv.lib; {
+      license = licenses.mit;
+    };
+  };
+
+  justusadam.language-haskell = buildVscodeMarketplaceExtension {
+    mktplcRef = {
+      name = "language-haskell";
+      publisher = "justusadam";
+      version = "2.6.0"; # see the note above
+      sha256 = "1891pg4x5qkh151pylvn93c4plqw6vgasa4g40jbma5xzq8pygr4";
+    };
+    meta = {
+      license = stdenv.lib.licenses.bsd3;
+    };
+  };
+
+  ms-azuretools.vscode-docker = buildVscodeMarketplaceExtension {
+    mktplcRef = {
+      name = "vscode-docker";
+      publisher = "ms-azuretools";
+      version = "0.8.1";
+      sha256 = "0n59whmcrx8946xix6skvc50f2vsc85ckvn8cs06w9mqmymm1q0s";
+    };
+    meta = {
+      license = stdenv.lib.licenses.mit;
+    };
+  };
+
+  ms-kubernetes-tools.vscode-kubernetes-tools = buildVscodeMarketplaceExtension {
+    mktplcRef = {
+      name = "vscode-kubernetes-tools";
+      publisher = "ms-kubernetes-tools";
+      version = "1.0.6";
+      sha256 = "12a4phl1pddsajy3n0ld6rp607iy0pif6pqrs6ljbg2x97fyra28";
+    };
+    meta = {
+      license = stdenv.lib.licenses.mit;
+    };
+  };
+
+  ms-vscode.Go = buildVscodeMarketplaceExtension {
+    mktplcRef = {
+      name = "Go";
+      publisher = "ms-vscode";
+      version = "0.11.7";
+      sha256 = "1l6jjdfivw1pn9y4d4i7zf80ls1k1b0ap1d828ah57ad3bgmyqfi";
+    };
+    meta = {
+      license = stdenv.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 { };
+  };
+
+  redhat.vscode-yaml = buildVscodeMarketplaceExtension {
+    mktplcRef = {
+      name = "vscode-yaml";
+      publisher = "redhat";
+      version = "0.5.3";
+      sha256 = "03swlsp906rqlrx6jf3ibh7pk36sm0zdr8jfy6sr3w5lqjg27gka";
+    };
+    meta = {
+      license = stdenv.lib.licenses.mit;
+    };
+  };
+
+  matklad.rust-analyzer = callPackage ./rust-analyzer {};
+
+  scala-lang.scala = buildVscodeMarketplaceExtension {
+    mktplcRef = {
+      name = "scala";
+      publisher = "scala-lang";
+      version = "0.3.8";
+      sha256 = "17dl10m3ayf57sqgil4mr9fjdm7i8gb5clrs227b768pp2d39ll9";
+    };
+    meta = {
+      license = stdenv.lib.licenses.mit;
+    };
+  };
+
+  scalameta.metals = buildVscodeMarketplaceExtension {
+    mktplcRef = {
+      name = "metals";
+      publisher = "scalameta";
+      version = "1.6.3";
+      sha256 = "1mc3awybzd2ql1b86inirhsw3j2c7cs0b0nvbjp38jjpq674bmj7";
+    };
+    meta = {
+      license = stdenv.lib.licenses.asl20;
+    };
+  };
+
+  skyapps.fish-vscode = buildVscodeMarketplaceExtension {
+    mktplcRef = {
+      name = "fish-vscode";
+      publisher = "skyapps";
+      version = "0.2.1";
+      sha256 = "0y1ivymn81ranmir25zk83kdjpjwcqpnc9r3jwfykjd9x0jib2hl";
+    };
+    meta = with stdenv.lib; {
+      license = licenses.mit;
+    };
+  };
+
+  vscodevim.vim = buildVscodeMarketplaceExtension {
+    mktplcRef = {
+      name = "vim";
+      publisher = "vscodevim";
+      version = "1.11.3";
+      sha256 = "1smzsgcrkhghbnpy51gp28kh74l7y4s2m8pfxabb4ffb751254j0";
+    };
+    meta = {
+      license = stdenv.lib.licenses.mit;
+    };
+  };
+
+  llvm-org.lldb-vscode = llvmPackages_8.lldb;
+
+  WakaTime.vscode-wakatime = callPackage ./wakatime {};
+}
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..8f5a92e47222
--- /dev/null
+++ b/nixpkgs/pkgs/misc/vscode-extensions/python/default.nix
@@ -0,0 +1,86 @@
+{ lib, stdenv, fetchurl, vscode-utils, extractNuGet
+, icu, curl, openssl, lttng-ust, autoPatchelfHook
+, python3
+, 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 {
+  mktplcRef = {
+    name = "python";
+    publisher = "ms-python";
+    version = "2020.3.71659";
+    sha256 = "1smhnhkfchmljz8aj1br70023ysgd2hj6pm1ncn1jxphf89qi1ja";
+  };
+
+  buildInputs = [
+    icu
+    curl
+    openssl
+    lttng-ust
+  ];
+
+  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;
+    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..e4d3b6a0ed1b
--- /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;
+
+  buildInputs = [ 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..e58ea98a606f
--- /dev/null
+++ b/nixpkgs/pkgs/misc/vscode-extensions/remote-ssh/default.nix
@@ -0,0 +1,55 @@
+{ stdenv
+, 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
+    ${stdenv.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 stdenv.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..5769db505d8a
--- /dev/null
+++ b/nixpkgs/pkgs/misc/vscode-extensions/rust-analyzer/build-deps/package.json
@@ -0,0 +1,22 @@
+{
+  "name": "rust-analyzer",
+  "version": "0.4.0-dev",
+  "dependencies": {
+    "jsonc-parser": "^2.2.1",
+    "node-fetch": "^2.6.0",
+    "vscode-languageclient": "6.1.3",
+    "@rollup/plugin-commonjs": "^11.0.2",
+    "@rollup/plugin-node-resolve": "^7.1.1",
+    "@types/node": "^12.12.34",
+    "@types/node-fetch": "^2.5.5",
+    "@types/vscode": "1.43.0",
+    "@typescript-eslint/eslint-plugin": "^2.26.0",
+    "@typescript-eslint/parser": "^2.26.0",
+    "eslint": "^6.8.0",
+    "rollup": "^2.3.2",
+    "tslib": "^1.11.1",
+    "typescript": "^3.8.3",
+    "typescript-formatter": "^7.2.2",
+    "vsce": "^1.75.0"
+  }
+}
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..230ee383af3a
--- /dev/null
+++ b/nixpkgs/pkgs/misc/vscode-extensions/rust-analyzer/default.nix
@@ -0,0 +1,50 @@
+# Update script: pkgs/development/tools/rust/rust-analyzer/update.sh
+{ lib, stdenv, vscode-utils, jq, rust-analyzer, nodePackages_10_x
+, 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_10_x."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;
+
+  postFixup = lib.optionalString setDefaultServerPath ''
+    package_json="$out/${publisher}.${pname}/package.json"
+    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/update_installed_exts.sh b/nixpkgs/pkgs/misc/vscode-extensions/update_installed_exts.sh
new file mode 100755
index 000000000000..fdbc14fb2642
--- /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 ourself 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 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-utils.nix b/nixpkgs/pkgs/misc/vscode-extensions/vscode-utils.nix
new file mode 100644
index 000000000000..5d446b025d7a
--- /dev/null
+++ b/nixpkgs/pkgs/misc/vscode-extensions/vscode-utils.nix
@@ -0,0 +1,88 @@
+{ stdenv, lib, fetchurl, unzip }:
+
+let
+  mktplcExtRefToFetchArgs = ext: {
+    url = "https://${ext.publisher}.gallery.vsassets.io/_apis/public/gallery/publisher/${ext.publisher}/extension/${ext.name}/${ext.version}/assetbyname/Microsoft.VisualStudio.Services.VSIXPackage";
+    sha256 = ext.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 = "${ext.publisher}-${ext.name}.zip";
+  };
+
+  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 = "${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((mktplcExtRefToFetchArgs 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;
+
+in
+
+{
+  inherit fetchVsixFromVscodeMarketplace buildVscodeExtension
+          buildVscodeMarketplaceExtension extensionFromVscodeMarketplace
+          extensionsFromVscodeMarketplace;
+}
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..30b2f94f1a58
--- /dev/null
+++ b/nixpkgs/pkgs/misc/vscode-extensions/wakatime/default.nix
@@ -0,0 +1,30 @@
+{ stdenv
+, wakatime, vscode-utils }:
+
+let
+  inherit (vscode-utils) buildVscodeMarketplaceExtension;
+in
+  buildVscodeMarketplaceExtension {
+    mktplcRef = {
+      name = "vscode-wakatime";
+      publisher = "WakaTime";
+      version = "4.0.0";
+      sha256 = "0bwxz8dg00k8frnvkvcngll5yaf9k7z13dg309vmw8xbdgkiyid4";
+    };
+
+    postPatch = ''
+      mkdir -p wakatime-master
+      cp -rt wakatime-master --no-preserve=all ${wakatime}/lib/python*/site-packages/wakatime
+    '';
+
+    meta = with stdenv.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..561f915d6636
--- /dev/null
+++ b/nixpkgs/pkgs/misc/xosd/default.nix
@@ -0,0 +1,21 @@
+{ 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 stdenv.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 ];
+  };
+}