summary refs log tree commit diff
path: root/pkgs/applications
diff options
context:
space:
mode:
authorvolth <volth@volth.com>2019-06-16 19:59:06 +0000
committerAlyssa Ross <hi@alyssa.is>2019-06-16 19:59:05 +0000
commitf3282c8d1e0ce6ba5d9f6aeddcfad51d879c7a4a (patch)
treefc248141d976626274065a36839f64bd2dd3db99 /pkgs/applications
parentccee4117be08f0474640e06f76a7881389fb7b47 (diff)
downloadnixpkgs-f3282c8d1e0ce6ba5d9f6aeddcfad51d879c7a4a.tar
nixpkgs-f3282c8d1e0ce6ba5d9f6aeddcfad51d879c7a4a.tar.gz
nixpkgs-f3282c8d1e0ce6ba5d9f6aeddcfad51d879c7a4a.tar.bz2
nixpkgs-f3282c8d1e0ce6ba5d9f6aeddcfad51d879c7a4a.tar.lz
nixpkgs-f3282c8d1e0ce6ba5d9f6aeddcfad51d879c7a4a.tar.xz
nixpkgs-f3282c8d1e0ce6ba5d9f6aeddcfad51d879c7a4a.tar.zst
nixpkgs-f3282c8d1e0ce6ba5d9f6aeddcfad51d879c7a4a.zip
treewide: remove unused variables (#63177)
* treewide: remove unused variables

* making ofborg happy
Diffstat (limited to 'pkgs/applications')
-rw-r--r--pkgs/applications/altcoins/btc1.nix2
-rw-r--r--pkgs/applications/altcoins/default.nix2
-rw-r--r--pkgs/applications/altcoins/exodus/default.nix2
-rw-r--r--pkgs/applications/audio/ams-lv2/default.nix2
-rw-r--r--pkgs/applications/audio/bitwig-studio/bitwig-studio2.nix4
-rw-r--r--pkgs/applications/audio/cadence/default.nix2
-rw-r--r--pkgs/applications/audio/calf/default.nix2
-rw-r--r--pkgs/applications/audio/cantata/default.nix2
-rw-r--r--pkgs/applications/audio/carla/default.nix4
-rw-r--r--pkgs/applications/audio/chuck/default.nix1
-rw-r--r--pkgs/applications/audio/cozy-audiobooks/default.nix2
-rw-r--r--pkgs/applications/audio/gnome-podcasts/default.nix2
-rw-r--r--pkgs/applications/audio/mixxx/default.nix2
-rw-r--r--pkgs/applications/audio/parlatype/default.nix2
-rw-r--r--pkgs/applications/audio/pulseaudio-dlna/zeroconf.nix1
-rw-r--r--pkgs/applications/audio/reaper/default.nix2
-rw-r--r--pkgs/applications/audio/vocal/default.nix1
-rw-r--r--pkgs/applications/editors/android-studio/default.nix2
-rw-r--r--pkgs/applications/editors/atom/default.nix2
-rw-r--r--pkgs/applications/editors/emacs-modes/elpa-packages.nix2
-rw-r--r--pkgs/applications/editors/emacs/default.nix4
-rw-r--r--pkgs/applications/editors/featherpad/default.nix2
-rw-r--r--pkgs/applications/editors/gobby/default.nix2
-rw-r--r--pkgs/applications/editors/quilter/default.nix2
-rw-r--r--pkgs/applications/editors/retext/default.nix2
-rw-r--r--pkgs/applications/editors/texmacs/default.nix2
-rw-r--r--pkgs/applications/editors/vim/configurable.nix2
-rw-r--r--pkgs/applications/editors/vscode/generic.nix2
-rw-r--r--pkgs/applications/editors/vscode/vscode.nix2
-rw-r--r--pkgs/applications/editors/vscode/vscodium.nix2
-rw-r--r--pkgs/applications/editors/vscode/with-extensions.nix2
-rw-r--r--pkgs/applications/editors/xmlcopyeditor/default.nix2
-rw-r--r--pkgs/applications/gis/qgis/default.nix2
-rw-r--r--pkgs/applications/graphics/animbar/default.nix2
-rw-r--r--pkgs/applications/graphics/freecad/default.nix4
-rw-r--r--pkgs/applications/graphics/gcolor3/default.nix2
-rw-r--r--pkgs/applications/graphics/gscan2pdf/default.nix2
-rw-r--r--pkgs/applications/graphics/image_optim/default.nix2
-rw-r--r--pkgs/applications/graphics/jpeg-archive/default.nix2
-rw-r--r--pkgs/applications/graphics/krita/default.nix1
-rw-r--r--pkgs/applications/graphics/shotwell/default.nix1
-rw-r--r--pkgs/applications/graphics/tesseract/tesseract3.nix2
-rw-r--r--pkgs/applications/kde/knotes.nix2
-rw-r--r--pkgs/applications/misc/buku/default.nix2
-rw-r--r--pkgs/applications/misc/cardpeek/default.nix2
-rw-r--r--pkgs/applications/misc/curaengine/default.nix2
-rw-r--r--pkgs/applications/misc/ddgr/default.nix2
-rw-r--r--pkgs/applications/misc/digitalbitbox/default.nix1
-rw-r--r--pkgs/applications/misc/electron-cash/default.nix6
-rw-r--r--pkgs/applications/misc/font-manager/default.nix2
-rw-r--r--pkgs/applications/misc/gImageReader/default.nix4
-rw-r--r--pkgs/applications/misc/ganttproject-bin/default.nix2
-rw-r--r--pkgs/applications/misc/gremlin-console/default.nix2
-rw-r--r--pkgs/applications/misc/k2pdfopt/default.nix2
-rw-r--r--pkgs/applications/misc/kitty/default.nix2
-rw-r--r--pkgs/applications/misc/lutris/default.nix4
-rw-r--r--pkgs/applications/misc/taskell/default.nix2
-rw-r--r--pkgs/applications/misc/termite/wrapper.nix2
-rw-r--r--pkgs/applications/misc/ulauncher/default.nix3
-rw-r--r--pkgs/applications/misc/xcruiser/default.nix2
-rw-r--r--pkgs/applications/misc/yubioath-desktop/default.nix6
-rw-r--r--pkgs/applications/misc/zathura/pdf-mupdf/default.nix2
-rw-r--r--pkgs/applications/networking/browsers/chromium/common.nix2
-rw-r--r--pkgs/applications/networking/browsers/chromium/default.nix2
-rw-r--r--pkgs/applications/networking/browsers/firefox-bin/update.nix3
-rw-r--r--pkgs/applications/networking/browsers/firefox/packages.nix2
-rw-r--r--pkgs/applications/networking/browsers/firefox/update.nix1
-rw-r--r--pkgs/applications/networking/browsers/midori/default.nix2
-rw-r--r--pkgs/applications/networking/browsers/tor-browser-bundle/default.nix2
-rw-r--r--pkgs/applications/networking/charles/default.nix3
-rw-r--r--pkgs/applications/networking/cluster/docker-machine/kvm2.nix2
-rw-r--r--pkgs/applications/networking/cluster/kubectl/default.nix2
-rw-r--r--pkgs/applications/networking/cluster/minikube/default.nix2
-rw-r--r--pkgs/applications/networking/cluster/terraform-landscape/default.nix5
-rw-r--r--pkgs/applications/networking/cluster/tilt/default.nix2
-rw-r--r--pkgs/applications/networking/feedreaders/feedreader/default.nix4
-rw-r--r--pkgs/applications/networking/feedreaders/newsboat/default.nix2
-rw-r--r--pkgs/applications/networking/gns3/default.nix2
-rw-r--r--pkgs/applications/networking/gns3/server.nix2
-rw-r--r--pkgs/applications/networking/instant-messengers/fractal/default.nix2
-rw-r--r--pkgs/applications/networking/instant-messengers/gitter/default.nix2
-rw-r--r--pkgs/applications/networking/instant-messengers/nheko/default.nix2
-rw-r--r--pkgs/applications/networking/instant-messengers/quaternion/default.nix2
-rw-r--r--pkgs/applications/networking/instant-messengers/riot/yarn2nix.nix3
-rw-r--r--pkgs/applications/networking/instant-messengers/sky/default.nix4
-rw-r--r--pkgs/applications/networking/instant-messengers/telegram/telegram-cli/default.nix2
-rw-r--r--pkgs/applications/networking/instant-messengers/utox/default.nix2
-rw-r--r--pkgs/applications/networking/irc/konversation/default.nix1
-rw-r--r--pkgs/applications/networking/irc/weechat/default.nix3
-rw-r--r--pkgs/applications/networking/irc/weechat/wrapper.nix2
-rw-r--r--pkgs/applications/networking/mailreaders/astroid/default.nix2
-rw-r--r--pkgs/applications/networking/mailreaders/sup/default.nix2
-rw-r--r--pkgs/applications/networking/mailreaders/thunderbird/default.nix2
-rw-r--r--pkgs/applications/networking/modem-manager-gui/default.nix2
-rw-r--r--pkgs/applications/networking/mpop/default.nix2
-rw-r--r--pkgs/applications/networking/ndppd/default.nix2
-rw-r--r--pkgs/applications/networking/newsreaders/pan/default.nix2
-rw-r--r--pkgs/applications/networking/nextcloud-client/default.nix2
-rw-r--r--pkgs/applications/networking/remote/remmina/default.nix2
-rw-r--r--pkgs/applications/networking/sync/rclone/default.nix2
-rw-r--r--pkgs/applications/networking/sync/rsync/rrsync.nix2
-rw-r--r--pkgs/applications/networking/syncthing/default.nix2
-rw-r--r--pkgs/applications/networking/weather/meteo/default.nix4
-rw-r--r--pkgs/applications/office/aesop/default.nix2
-rw-r--r--pkgs/applications/office/bookworm/default.nix2
-rw-r--r--pkgs/applications/office/kexi/default.nix2
-rw-r--r--pkgs/applications/office/kmymoney/default.nix1
-rw-r--r--pkgs/applications/office/mendeley/default.nix2
-rw-r--r--pkgs/applications/office/mendeley/update.nix2
-rw-r--r--pkgs/applications/office/paperless/default.nix2
-rw-r--r--pkgs/applications/office/paperwork/default.nix2
-rw-r--r--pkgs/applications/office/qownnotes/default.nix2
-rw-r--r--pkgs/applications/office/todoman/default.nix2
-rw-r--r--pkgs/applications/office/vnote/default.nix8
-rw-r--r--pkgs/applications/office/zotero/default.nix2
-rw-r--r--pkgs/applications/radio/rtl-sdr/default.nix2
-rw-r--r--pkgs/applications/science/biology/niftyreg/default.nix2
-rw-r--r--pkgs/applications/science/biology/niftyseg/default.nix2
-rw-r--r--pkgs/applications/science/biology/sumatools/default.nix3
-rw-r--r--pkgs/applications/science/chemistry/openmolcas/default.nix2
-rw-r--r--pkgs/applications/science/electronics/dsview/default.nix4
-rw-r--r--pkgs/applications/science/electronics/eagle/eagle.nix4
-rw-r--r--pkgs/applications/science/logic/clprover/clprover.nix2
-rw-r--r--pkgs/applications/science/logic/cryptominisat/default.nix2
-rw-r--r--pkgs/applications/science/machine-learning/sc2-headless/maps.nix2
-rw-r--r--pkgs/applications/science/math/caffe/default.nix2
-rw-r--r--pkgs/applications/science/math/gap/default.nix1
-rw-r--r--pkgs/applications/science/math/sage/default.nix2
-rw-r--r--pkgs/applications/science/math/sage/sagenb.nix1
-rw-r--r--pkgs/applications/science/math/scilab-bin/default.nix2
-rw-r--r--pkgs/applications/science/robotics/betaflight-configurator/default.nix2
-rw-r--r--pkgs/applications/video/bombono/default.nix2
-rw-r--r--pkgs/applications/video/kodi/plugins.nix2
-rw-r--r--pkgs/applications/video/lightworks/default.nix2
-rw-r--r--pkgs/applications/video/obs-studio/default.nix1
-rw-r--r--pkgs/applications/video/qstopmotion/default.nix2
-rw-r--r--pkgs/applications/video/subtitleeditor/default.nix2
-rw-r--r--pkgs/applications/video/vdr/plugins.nix2
-rw-r--r--pkgs/applications/video/vlc/default.nix1
-rw-r--r--pkgs/applications/virtualization/containerd/default.nix2
-rw-r--r--pkgs/applications/virtualization/docker/proxy.nix2
-rw-r--r--pkgs/applications/virtualization/nvidia-docker/default.nix2
-rw-r--r--pkgs/applications/virtualization/railcar/default.nix2
-rw-r--r--pkgs/applications/virtualization/runc/default.nix2
-rw-r--r--pkgs/applications/virtualization/singularity/default.nix2
-rw-r--r--pkgs/applications/virtualization/virtualbox/extpack.nix2
-rw-r--r--pkgs/applications/window-managers/compton/default.nix4
-rw-r--r--pkgs/applications/window-managers/stumpish/default.nix2
148 files changed, 142 insertions, 188 deletions
diff --git a/pkgs/applications/altcoins/btc1.nix b/pkgs/applications/altcoins/btc1.nix
index 2f85a894797..3241148aee1 100644
--- a/pkgs/applications/altcoins/btc1.nix
+++ b/pkgs/applications/altcoins/btc1.nix
@@ -1,5 +1,5 @@
 { stdenv, fetchurl, pkgconfig, autoreconfHook, hexdump, openssl, db48
-, boost, zlib, miniupnpc, qt4, utillinux, protobuf, qrencode, libevent
+, boost, zlib, miniupnpc, qt4, protobuf, qrencode, libevent
 , AppKit
 , withGui ? !stdenv.isDarwin
 }:
diff --git a/pkgs/applications/altcoins/default.nix b/pkgs/applications/altcoins/default.nix
index b6a47b2828c..492a221c3f8 100644
--- a/pkgs/applications/altcoins/default.nix
+++ b/pkgs/applications/altcoins/default.nix
@@ -1,4 +1,4 @@
-{ callPackage, boost155, boost165, openssl_1_1, haskellPackages, darwin, libsForQt5, libsForQt59, miniupnpc_2, python3, buildGo110Package }:
+{ callPackage, boost155, boost165, openssl_1_1, darwin, libsForQt5, libsForQt59, miniupnpc_2, python3, buildGo110Package }:
 
 rec {
 
diff --git a/pkgs/applications/altcoins/exodus/default.nix b/pkgs/applications/altcoins/exodus/default.nix
index 6531640d93f..421f739a7a8 100644
--- a/pkgs/applications/altcoins/exodus/default.nix
+++ b/pkgs/applications/altcoins/exodus/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, lib, makeWrapper, fetchurl, unzip, glib, systemd, nss, nspr, gtk3-x11, gnome2,
+{ stdenv, lib, fetchurl, unzip, glib, systemd, nss, nspr, gtk3-x11, gnome2,
 atk, cairo, gdk_pixbuf, xorg, xorg_sys_opengl, utillinux, alsaLib, dbus, at-spi2-atk,
 cups, vivaldi-ffmpeg-codecs, libpulseaudio }:
 
diff --git a/pkgs/applications/audio/ams-lv2/default.nix b/pkgs/applications/audio/ams-lv2/default.nix
index 4a6be2cc55f..d6064e80e3f 100644
--- a/pkgs/applications/audio/ams-lv2/default.nix
+++ b/pkgs/applications/audio/ams-lv2/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchFromGitHub, cairo, fftw, gtkmm2, lv2, lvtk, pkgconfig, python3
+{ stdenv, fetchFromGitHub, cairo, fftw, gtkmm2, lv2, lvtk, pkgconfig
 , wafHook }:
 
 stdenv.mkDerivation  rec {
diff --git a/pkgs/applications/audio/bitwig-studio/bitwig-studio2.nix b/pkgs/applications/audio/bitwig-studio/bitwig-studio2.nix
index 065dd01c862..345750e9e2a 100644
--- a/pkgs/applications/audio/bitwig-studio/bitwig-studio2.nix
+++ b/pkgs/applications/audio/bitwig-studio/bitwig-studio2.nix
@@ -1,5 +1,5 @@
-{ stdenv, fetchurl, bitwig-studio1,
-  xdg_utils, zenity, ffmpeg, pulseaudio }:
+{ fetchurl, bitwig-studio1,
+  pulseaudio }:
 
 bitwig-studio1.overrideAttrs (oldAttrs: rec {
   name = "bitwig-studio-${version}";
diff --git a/pkgs/applications/audio/cadence/default.nix b/pkgs/applications/audio/cadence/default.nix
index ef7eeab4b60..87efa6fb6b6 100644
--- a/pkgs/applications/audio/cadence/default.nix
+++ b/pkgs/applications/audio/cadence/default.nix
@@ -3,9 +3,7 @@
 , pkgconfig
 , qtbase
 , makeWrapper
-, jack2Full
 , python3Packages
-, a2jmidid
 }:
 
  stdenv.mkDerivation rec {
diff --git a/pkgs/applications/audio/calf/default.nix b/pkgs/applications/audio/calf/default.nix
index ba49682e7ea..d4e2fba0cf4 100644
--- a/pkgs/applications/audio/calf/default.nix
+++ b/pkgs/applications/audio/calf/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, fetchpatch, cairo, expat, fftwSinglePrec, fluidsynth, glib
+{ stdenv, fetchurl, cairo, expat, fftwSinglePrec, fluidsynth, glib
 , gtk2, libjack2, ladspaH , libglade, lv2, pkgconfig }:
 
 stdenv.mkDerivation rec {
diff --git a/pkgs/applications/audio/cantata/default.nix b/pkgs/applications/audio/cantata/default.nix
index 64e99768ded..dc805a8caf9 100644
--- a/pkgs/applications/audio/cantata/default.nix
+++ b/pkgs/applications/audio/cantata/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchFromGitHub, fetchpatch, cmake, pkgconfig, vlc
+{ stdenv, fetchFromGitHub, cmake, pkgconfig, vlc
 , qtbase, qtmultimedia, qtsvg, qttools
 
 # Cantata doesn't build with cdparanoia enabled so we disable that
diff --git a/pkgs/applications/audio/carla/default.nix b/pkgs/applications/audio/carla/default.nix
index af29c3dc9e0..6e623a69919 100644
--- a/pkgs/applications/audio/carla/default.nix
+++ b/pkgs/applications/audio/carla/default.nix
@@ -1,5 +1,5 @@
-{ stdenv, fetchFromGitHub, alsaLib, file, fluidsynth, ffmpeg, fftw, jack2,
-  liblo, libpulseaudio, libsndfile, makeWrapper, pkgconfig, python3Packages,
+{ stdenv, fetchFromGitHub, alsaLib, file, fluidsynth, ffmpeg, jack2,
+  liblo, libpulseaudio, libsndfile, pkgconfig, python3Packages,
   which, withFrontend ? true,
   withQt ? true, qtbase ? null,
   withGtk2 ? true, gtk2 ? null,
diff --git a/pkgs/applications/audio/chuck/default.nix b/pkgs/applications/audio/chuck/default.nix
index c10556260c7..6113a776a67 100644
--- a/pkgs/applications/audio/chuck/default.nix
+++ b/pkgs/applications/audio/chuck/default.nix
@@ -1,6 +1,5 @@
 { stdenv, lib, fetchurl, alsaLib, bison, flex, libsndfile, which
 , AppKit, Carbon, CoreAudio, CoreMIDI, CoreServices, Kernel
-, xcbuild
 }:
 
 stdenv.mkDerivation rec {
diff --git a/pkgs/applications/audio/cozy-audiobooks/default.nix b/pkgs/applications/audio/cozy-audiobooks/default.nix
index 53ab4fd6f2f..8865743de7f 100644
--- a/pkgs/applications/audio/cozy-audiobooks/default.nix
+++ b/pkgs/applications/audio/cozy-audiobooks/default.nix
@@ -1,6 +1,5 @@
 { stdenv, fetchFromGitHub
 , ninja
-, boost
 , meson
 , pkgconfig
 , wrapGAppsHook
@@ -12,7 +11,6 @@
 , python3Packages
 , file
 , cairo
-, sqlite
 , gettext
 , gnome3
 }:
diff --git a/pkgs/applications/audio/gnome-podcasts/default.nix b/pkgs/applications/audio/gnome-podcasts/default.nix
index 670641fae75..3981bc79276 100644
--- a/pkgs/applications/audio/gnome-podcasts/default.nix
+++ b/pkgs/applications/audio/gnome-podcasts/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, fetchpatch, fetchFromGitLab, meson, ninja, gettext, cargo, rustc, python3, rustPlatform, pkgconfig, gnome3
+{ stdenv, fetchurl, fetchpatch, meson, ninja, gettext, cargo, rustc, python3, pkgconfig, gnome3
 , glib, libhandy, gtk3, dbus, openssl, sqlite, gst_all_1, wrapGAppsHook }:
 
 # TODO: build from git for easier updates
diff --git a/pkgs/applications/audio/mixxx/default.nix b/pkgs/applications/audio/mixxx/default.nix
index ff02d2a9e22..9fbcf8b7ac2 100644
--- a/pkgs/applications/audio/mixxx/default.nix
+++ b/pkgs/applications/audio/mixxx/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchFromGitHub, makeWrapper, chromaprint, fetchpatch
+{ stdenv, fetchFromGitHub, makeWrapper, chromaprint
 , fftw, flac, faad2, glibcLocales, mp4v2
 , libid3tag, libmad, libopus, libshout, libsndfile, libusb1, libvorbis
 , libGLU, libxcb, lilv, lv2, opusfile
diff --git a/pkgs/applications/audio/parlatype/default.nix b/pkgs/applications/audio/parlatype/default.nix
index 87257f4920d..c00a79cb98b 100644
--- a/pkgs/applications/audio/parlatype/default.nix
+++ b/pkgs/applications/audio/parlatype/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchFromGitHub, pkgconfig, meson, gtk3, at-spi2-core, dbus, gst_all_1, sphinxbase, pocketsphinx, ninja, gettext, appstream-glib, python3, glib, gobject-introspection, gsettings-desktop-schemas, itstool, wrapGAppsHook, makeWrapper, hicolor-icon-theme }:
+{ stdenv, fetchFromGitHub, pkgconfig, meson, gtk3, at-spi2-core, dbus, gst_all_1, sphinxbase, pocketsphinx, ninja, gettext, appstream-glib, python3, glib, gobject-introspection, gsettings-desktop-schemas, itstool, wrapGAppsHook, hicolor-icon-theme }:
 
 stdenv.mkDerivation rec {
   pname = "parlatype";
diff --git a/pkgs/applications/audio/pulseaudio-dlna/zeroconf.nix b/pkgs/applications/audio/pulseaudio-dlna/zeroconf.nix
index 9532c467d2b..328bd8b0b04 100644
--- a/pkgs/applications/audio/pulseaudio-dlna/zeroconf.nix
+++ b/pkgs/applications/audio/pulseaudio-dlna/zeroconf.nix
@@ -3,7 +3,6 @@
 , fetchPypi
 , ifaddr
 , typing
-, isPy27
 , pythonOlder
 , netifaces
 , six
diff --git a/pkgs/applications/audio/reaper/default.nix b/pkgs/applications/audio/reaper/default.nix
index 40e390ab3bb..356078fde22 100644
--- a/pkgs/applications/audio/reaper/default.nix
+++ b/pkgs/applications/audio/reaper/default.nix
@@ -1,6 +1,6 @@
 { stdenv, fetchurl, autoPatchelfHook, makeWrapper
 , alsaLib, xorg
-, gnome3, gtk3, pango, gdk_pixbuf, cairo, glib, freetype
+, gtk3, pango, gdk_pixbuf, cairo, glib, freetype
 , libpulseaudio, xdg_utils
 }:
 
diff --git a/pkgs/applications/audio/vocal/default.nix b/pkgs/applications/audio/vocal/default.nix
index b6ba5ec349a..c4333b09f18 100644
--- a/pkgs/applications/audio/vocal/default.nix
+++ b/pkgs/applications/audio/vocal/default.nix
@@ -14,7 +14,6 @@
 , libnotify
 , sqlite
 , gst_all_1
-, libsoup
 , json-glib
 , libgee
 , wrapGAppsHook
diff --git a/pkgs/applications/editors/android-studio/default.nix b/pkgs/applications/editors/android-studio/default.nix
index 1509f7ab780..db51b3feebe 100644
--- a/pkgs/applications/editors/android-studio/default.nix
+++ b/pkgs/applications/editors/android-studio/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, callPackage, makeFontsConf, gnome2 }:
+{ callPackage, makeFontsConf, gnome2 }:
 
 let
   mkStudio = opts: callPackage (import ./common.nix opts) {
diff --git a/pkgs/applications/editors/atom/default.nix b/pkgs/applications/editors/atom/default.nix
index bc791d63d24..26deee3b859 100644
--- a/pkgs/applications/editors/atom/default.nix
+++ b/pkgs/applications/editors/atom/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, pkgs, fetchurl, makeWrapper, wrapGAppsHook, gvfs, gtk3, atomEnv }:
+{ stdenv, pkgs, fetchurl, wrapGAppsHook, gvfs, gtk3, atomEnv }:
 
 let
   versions = {
diff --git a/pkgs/applications/editors/emacs-modes/elpa-packages.nix b/pkgs/applications/editors/emacs-modes/elpa-packages.nix
index b9f1ab53baa..9c08e91af41 100644
--- a/pkgs/applications/editors/emacs-modes/elpa-packages.nix
+++ b/pkgs/applications/editors/emacs-modes/elpa-packages.nix
@@ -12,7 +12,7 @@ To update the list of packages from MELPA,
 
 */
 
-{ fetchurl, lib, stdenv, texinfo }:
+{ lib, stdenv, texinfo }:
 
 self:
 
diff --git a/pkgs/applications/editors/emacs/default.nix b/pkgs/applications/editors/emacs/default.nix
index 4eb988a782c..c2756eab961 100644
--- a/pkgs/applications/editors/emacs/default.nix
+++ b/pkgs/applications/editors/emacs/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, lib, fetchpatch, fetchurl, ncurses, xlibsWrapper, libXaw, libXpm
+{ stdenv, lib, fetchurl, ncurses, xlibsWrapper, libXaw, libXpm
 , Xaw3d, libXcursor,  pkgconfig, gettext, libXft, dbus, libpng, libjpeg, libungif
 , libtiff, librsvg, gconf, libxml2, imagemagick, gnutls, libselinux
 , alsaLib, cairo, acl, gpm, cf-private, AppKit, GSS, ImageIO, m17n_lib, libotf
@@ -7,7 +7,7 @@
 , withNS ? stdenv.isDarwin
 , withGTK2 ? false, gtk2-x11 ? null
 , withGTK3 ? true, gtk3-x11 ? null, gsettings-desktop-schemas ? null
-, withXwidgets ? false, webkitgtk ? null, wrapGAppsHook ? null, glib-networking ? null
+, withXwidgets ? false, webkitgtk ? null, wrapGAppsHook ? null
 , withCsrc ? true
 , srcRepo ? false, autoconf ? null, automake ? null, texinfo ? null
 , siteStart ? ./site-start.el
diff --git a/pkgs/applications/editors/featherpad/default.nix b/pkgs/applications/editors/featherpad/default.nix
index 76e00edaa04..6d420599152 100644
--- a/pkgs/applications/editors/featherpad/default.nix
+++ b/pkgs/applications/editors/featherpad/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, pkgconfig, qt5, fetchFromGitHub }:
+{ stdenv, pkgconfig, qt5, fetchFromGitHub }:
 
 with qt5;
 
diff --git a/pkgs/applications/editors/gobby/default.nix b/pkgs/applications/editors/gobby/default.nix
index e59def88de5..ec05f0f8262 100644
--- a/pkgs/applications/editors/gobby/default.nix
+++ b/pkgs/applications/editors/gobby/default.nix
@@ -1,5 +1,5 @@
 { avahiSupport ? false # build support for Avahi in libinfinity
-, stdenv, fetchurl, fetchFromGitHub, autoconf, automake, pkgconfig, wrapGAppsHook
+, stdenv, fetchFromGitHub, autoconf, automake, pkgconfig, wrapGAppsHook
 , gtkmm3, gsasl, gtksourceview3, libxmlxx, libinfinity, intltool, itstool, gnome3 }:
 
 let
diff --git a/pkgs/applications/editors/quilter/default.nix b/pkgs/applications/editors/quilter/default.nix
index c27a85d260b..0252c06b943 100644
--- a/pkgs/applications/editors/quilter/default.nix
+++ b/pkgs/applications/editors/quilter/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchFromGitHub, fetchpatch, pkgconfig, meson, ninja, python3
+{ stdenv, fetchFromGitHub, pkgconfig, meson, ninja, python3
 , gtk3, desktop-file-utils, gtksourceview, webkitgtk, gtkspell3, pantheon
 , libgee, discount, wrapGAppsHook }:
 
diff --git a/pkgs/applications/editors/retext/default.nix b/pkgs/applications/editors/retext/default.nix
index 3288b8e90ad..a7dc02a9a63 100644
--- a/pkgs/applications/editors/retext/default.nix
+++ b/pkgs/applications/editors/retext/default.nix
@@ -1,4 +1,4 @@
-{ lib, stdenv, python3, fetchFromGitHub, makeWrapper, buildEnv, aspellDicts
+{ stdenv, python3, fetchFromGitHub, makeWrapper, buildEnv, aspellDicts
 # Use `lib.collect lib.isDerivation aspellDicts;` to make all dictionaries
 # available.
 , enchantAspellDicts ? with aspellDicts; [ en en-computers en-science ]
diff --git a/pkgs/applications/editors/texmacs/default.nix b/pkgs/applications/editors/texmacs/default.nix
index ac5ac34d214..2c391cae517 100644
--- a/pkgs/applications/editors/texmacs/default.nix
+++ b/pkgs/applications/editors/texmacs/default.nix
@@ -1,5 +1,5 @@
 { stdenv, callPackage,
-  fetchurl, guile_1_8, qt4, zlib, xmodmap, which, makeWrapper, freetype,
+  fetchurl, guile_1_8, qt4, xmodmap, which, makeWrapper, freetype,
   tex ? null,
   aspell ? null,
   ghostscriptX ? null,
diff --git a/pkgs/applications/editors/vim/configurable.nix b/pkgs/applications/editors/vim/configurable.nix
index 9fdbdba8e18..5255b04fe5f 100644
--- a/pkgs/applications/editors/vim/configurable.nix
+++ b/pkgs/applications/editors/vim/configurable.nix
@@ -1,6 +1,6 @@
 # TODO tidy up eg The patchelf code is patching gvim even if you don't build it..
 # but I have gvim with python support now :) - Marc
-{ source ? "default", callPackage, fetchurl, stdenv, ncurses, pkgconfig, gettext
+{ source ? "default", callPackage, stdenv, ncurses, pkgconfig, gettext
 , writeText, config, glib, gtk2-x11, gtk3-x11, lua, python, perl, tcl, ruby
 , libX11, libXext, libSM, libXpm, libXt, libXaw, libXau, libXmu
 , libICE
diff --git a/pkgs/applications/editors/vscode/generic.nix b/pkgs/applications/editors/vscode/generic.nix
index 10a981f59bf..e42ca8a0bbf 100644
--- a/pkgs/applications/editors/vscode/generic.nix
+++ b/pkgs/applications/editors/vscode/generic.nix
@@ -1,4 +1,4 @@
-{ stdenv, lib, fetchurl, makeDesktopItem
+{ stdenv, lib, makeDesktopItem
 , unzip, libsecret, libXScrnSaver, wrapGAppsHook
 , gtk2, atomEnv, at-spi2-atk, autoPatchelfHook
 , systemd, fontconfig
diff --git a/pkgs/applications/editors/vscode/vscode.nix b/pkgs/applications/editors/vscode/vscode.nix
index 902ff6c389d..39c3f735d2f 100644
--- a/pkgs/applications/editors/vscode/vscode.nix
+++ b/pkgs/applications/editors/vscode/vscode.nix
@@ -1,4 +1,4 @@
-{ stdenv, lib, callPackage, fetchurl, fetchpatch, isInsiders ? false }:
+{ stdenv, lib, callPackage, fetchurl, isInsiders ? false }:
 
 let
   inherit (stdenv.hostPlatform) system;
diff --git a/pkgs/applications/editors/vscode/vscodium.nix b/pkgs/applications/editors/vscode/vscodium.nix
index 4d4316e43f7..0d13318efeb 100644
--- a/pkgs/applications/editors/vscode/vscodium.nix
+++ b/pkgs/applications/editors/vscode/vscodium.nix
@@ -1,4 +1,4 @@
-{ stdenv, lib, callPackage, fetchurl, fetchpatch }:
+{ stdenv, callPackage, fetchurl }:
 
 let
   inherit (stdenv.hostPlatform) system;
diff --git a/pkgs/applications/editors/vscode/with-extensions.nix b/pkgs/applications/editors/vscode/with-extensions.nix
index 88bea0c0809..c6ba528c358 100644
--- a/pkgs/applications/editors/vscode/with-extensions.nix
+++ b/pkgs/applications/editors/vscode/with-extensions.nix
@@ -1,4 +1,4 @@
-{ stdenv, lib, runCommand, buildEnv, vscode, makeWrapper
+{ lib, runCommand, buildEnv, vscode, makeWrapper
 , vscodeExtensions ? [] }:
 
 /*
diff --git a/pkgs/applications/editors/xmlcopyeditor/default.nix b/pkgs/applications/editors/xmlcopyeditor/default.nix
index 229e37d0080..d91403bc54f 100644
--- a/pkgs/applications/editors/xmlcopyeditor/default.nix
+++ b/pkgs/applications/editors/xmlcopyeditor/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, aspell, boost, expat, expect, intltool, libxml2, libxslt, pcre, wxGTK, xercesc }:
+{ stdenv, fetchurl, aspell, boost, expat, intltool, libxml2, libxslt, pcre, wxGTK, xercesc }:
 
 stdenv.mkDerivation rec {
   name = "xmlcopyeditor-${version}";
diff --git a/pkgs/applications/gis/qgis/default.nix b/pkgs/applications/gis/qgis/default.nix
index 0c76a489f13..f272fd04dd0 100644
--- a/pkgs/applications/gis/qgis/default.nix
+++ b/pkgs/applications/gis/qgis/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, lib, makeWrapper, symlinkJoin
+{ lib, makeWrapper, symlinkJoin
 , qgis-unwrapped, extraPythonPackages ? (ps: [ ])
 }:
 with lib;
diff --git a/pkgs/applications/graphics/animbar/default.nix b/pkgs/applications/graphics/animbar/default.nix
index 0d6b538b107..c918e4b302b 100644
--- a/pkgs/applications/graphics/animbar/default.nix
+++ b/pkgs/applications/graphics/animbar/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, lib, fetchurl, cmake, qt4, file, gcc }:
+{ stdenv, lib, fetchurl, cmake, qt4, file }:
 
 stdenv.mkDerivation rec {
   pname = "animbar";
diff --git a/pkgs/applications/graphics/freecad/default.nix b/pkgs/applications/graphics/freecad/default.nix
index 92fc74242a2..130e8255aa3 100644
--- a/pkgs/applications/graphics/freecad/default.nix
+++ b/pkgs/applications/graphics/freecad/default.nix
@@ -1,6 +1,6 @@
 { stdenv, fetchurl, cmake, coin3d, xercesc, ode, eigen, qt4, opencascade, gts
-, hdf5, vtk, medfile, zlib, python27Packages, swig, gfortran, fetchpatch
-, soqt, libf2c, makeWrapper, makeDesktopItem
+, hdf5, vtk, medfile, zlib, python27Packages, swig, gfortran
+, soqt, libf2c, makeWrapper
 , mpi ? null }:
 
 assert mpi != null;
diff --git a/pkgs/applications/graphics/gcolor3/default.nix b/pkgs/applications/graphics/gcolor3/default.nix
index ed350b2b0ee..5ad7cb88b03 100644
--- a/pkgs/applications/graphics/gcolor3/default.nix
+++ b/pkgs/applications/graphics/gcolor3/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchFromGitLab, gnome3, meson, ninja, gettext, pkgconfig, libxml2, gtk3, hicolor-icon-theme, wrapGAppsHook }:
+{ stdenv, fetchFromGitLab, meson, ninja, gettext, pkgconfig, libxml2, gtk3, hicolor-icon-theme, wrapGAppsHook }:
 
 let
   version = "2.3.1";
diff --git a/pkgs/applications/graphics/gscan2pdf/default.nix b/pkgs/applications/graphics/gscan2pdf/default.nix
index 9ec82ea2a94..191aefbe7ef 100644
--- a/pkgs/applications/graphics/gscan2pdf/default.nix
+++ b/pkgs/applications/graphics/gscan2pdf/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, perlPackages, makeWrapper, wrapGAppsHook,
+{ stdenv, fetchurl, perlPackages, wrapGAppsHook,
   librsvg, sane-backends, sane-frontends,
   imagemagick, libtiff, djvulibre, poppler_utils, ghostscript, unpaper,
   xvfb_run, hicolor-icon-theme, liberation_ttf, file, pdftk }:
diff --git a/pkgs/applications/graphics/image_optim/default.nix b/pkgs/applications/graphics/image_optim/default.nix
index f093a79f374..c3dffee3aa8 100644
--- a/pkgs/applications/graphics/image_optim/default.nix
+++ b/pkgs/applications/graphics/image_optim/default.nix
@@ -1,4 +1,4 @@
-{ lib, bundlerApp, fetchurl, ruby, makeWrapper,
+{ lib, bundlerApp, ruby, makeWrapper,
   withPngcrush ? true,       pngcrush ? null,
   withPngout ? true,         pngout ? null,
   withAdvpng ? true,         advancecomp ? null,
diff --git a/pkgs/applications/graphics/jpeg-archive/default.nix b/pkgs/applications/graphics/jpeg-archive/default.nix
index 8002da55703..ed583490c90 100644
--- a/pkgs/applications/graphics/jpeg-archive/default.nix
+++ b/pkgs/applications/graphics/jpeg-archive/default.nix
@@ -1,4 +1,4 @@
-{ lib, stdenv, fetchFromGitHub, mozjpeg, makeWrapper, coreutils, parallel, findutils }:
+{ stdenv, fetchFromGitHub, mozjpeg, makeWrapper, coreutils, parallel, findutils }:
 
 stdenv.mkDerivation rec {
   name = "jpeg-archive-${version}";
diff --git a/pkgs/applications/graphics/krita/default.nix b/pkgs/applications/graphics/krita/default.nix
index 36257f58c34..ca174080778 100644
--- a/pkgs/applications/graphics/krita/default.nix
+++ b/pkgs/applications/graphics/krita/default.nix
@@ -12,7 +12,6 @@ let
 
 major = "4.2";
 minor = "1";
-patch = null;
 
 in
 
diff --git a/pkgs/applications/graphics/shotwell/default.nix b/pkgs/applications/graphics/shotwell/default.nix
index c8ada0e85fe..294737ee733 100644
--- a/pkgs/applications/graphics/shotwell/default.nix
+++ b/pkgs/applications/graphics/shotwell/default.nix
@@ -1,6 +1,5 @@
 { stdenv
 , fetchurl
-, fetchpatch
 , meson
 , ninja
 , gtk3
diff --git a/pkgs/applications/graphics/tesseract/tesseract3.nix b/pkgs/applications/graphics/tesseract/tesseract3.nix
index db0e06434aa..23713271c40 100644
--- a/pkgs/applications/graphics/tesseract/tesseract3.nix
+++ b/pkgs/applications/graphics/tesseract/tesseract3.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, fetchFromGitHub, autoreconfHook, pkgconfig
+{ stdenv, fetchFromGitHub, autoreconfHook, pkgconfig
 , leptonica, libpng, libtiff, icu, pango, opencl-headers }:
 
 stdenv.mkDerivation rec {
diff --git a/pkgs/applications/kde/knotes.nix b/pkgs/applications/kde/knotes.nix
index 6aa3206acc7..ced046c2f4e 100644
--- a/pkgs/applications/kde/knotes.nix
+++ b/pkgs/applications/kde/knotes.nix
@@ -1,5 +1,5 @@
 {
-  mkDerivation, lib,
+  mkDerivation,
   extra-cmake-modules, kdoctools,
   kcompletion, kconfig, kconfigwidgets, kcoreaddons, kcrash,
   kdbusaddons, kdnssd, kglobalaccel, kiconthemes, kitemmodels,
diff --git a/pkgs/applications/misc/buku/default.nix b/pkgs/applications/misc/buku/default.nix
index 4a73e6b002e..60ade661cff 100644
--- a/pkgs/applications/misc/buku/default.nix
+++ b/pkgs/applications/misc/buku/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, python3, fetchFromGitHub, fetchpatch }:
+{ stdenv, python3, fetchFromGitHub }:
 
 with python3.pkgs; buildPythonApplication rec {
   version = "4.2.2";
diff --git a/pkgs/applications/misc/cardpeek/default.nix b/pkgs/applications/misc/cardpeek/default.nix
index 9b219270809..a0e5c814996 100644
--- a/pkgs/applications/misc/cardpeek/default.nix
+++ b/pkgs/applications/misc/cardpeek/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, lib, fetchFromGitHub, pkgconfig, autoreconfHook,
+{ stdenv, fetchFromGitHub, pkgconfig, autoreconfHook,
   glib, gtk3, pcsclite, lua5_2, curl, readline }:
 let
   version = "0.8.4";
diff --git a/pkgs/applications/misc/curaengine/default.nix b/pkgs/applications/misc/curaengine/default.nix
index 25cfccd3ed3..a7339acddee 100644
--- a/pkgs/applications/misc/curaengine/default.nix
+++ b/pkgs/applications/misc/curaengine/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchFromGitHub, fetchpatch, cmake, libarcus, stb, protobuf }:
+{ stdenv, fetchFromGitHub, cmake, libarcus, stb, protobuf }:
 
 stdenv.mkDerivation rec {
   name = "curaengine-${version}";
diff --git a/pkgs/applications/misc/ddgr/default.nix b/pkgs/applications/misc/ddgr/default.nix
index 0716125859b..b010e5401b8 100644
--- a/pkgs/applications/misc/ddgr/default.nix
+++ b/pkgs/applications/misc/ddgr/default.nix
@@ -1,4 +1,4 @@
-{stdenv, fetchpatch, fetchFromGitHub, python3}:
+{stdenv, fetchFromGitHub, python3}:
 
 stdenv.mkDerivation rec {
   version = "1.6";
diff --git a/pkgs/applications/misc/digitalbitbox/default.nix b/pkgs/applications/misc/digitalbitbox/default.nix
index 0272cfd52c0..58bc483d43f 100644
--- a/pkgs/applications/misc/digitalbitbox/default.nix
+++ b/pkgs/applications/misc/digitalbitbox/default.nix
@@ -3,7 +3,6 @@
 , curl
 , fetchFromGitHub
 , git
-, libcap
 , libevent
 , libtool
 , qrencode
diff --git a/pkgs/applications/misc/electron-cash/default.nix b/pkgs/applications/misc/electron-cash/default.nix
index 11adfaaf80d..788ff9b638b 100644
--- a/pkgs/applications/misc/electron-cash/default.nix
+++ b/pkgs/applications/misc/electron-cash/default.nix
@@ -1,11 +1,5 @@
 { lib, fetchurl, python3Packages, qtbase, makeWrapper }:
 
-let
-
-  python = python3Packages.python;
-
-in
-
 python3Packages.buildPythonApplication rec {
   pname = "electron-cash";
   version = "4.0.2";
diff --git a/pkgs/applications/misc/font-manager/default.nix b/pkgs/applications/misc/font-manager/default.nix
index f00d6cfc60d..f0da4e88351 100644
--- a/pkgs/applications/misc/font-manager/default.nix
+++ b/pkgs/applications/misc/font-manager/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchFromGitHub, meson, ninja, gettext, python3, fetchpatch,
+{ stdenv, fetchFromGitHub, meson, ninja, gettext, python3,
   pkgconfig, libxml2, json-glib , sqlite, itstool, librsvg,
   vala, gtk3, gnome3, desktop-file-utils, wrapGAppsHook, gobject-introspection
 }:
diff --git a/pkgs/applications/misc/gImageReader/default.nix b/pkgs/applications/misc/gImageReader/default.nix
index e0fd33d5e61..062bca5b215 100644
--- a/pkgs/applications/misc/gImageReader/default.nix
+++ b/pkgs/applications/misc/gImageReader/default.nix
@@ -6,8 +6,8 @@
 
 # Gtk deps
 # upstream gImagereader supports Qt too
-, gtk3, gobject-introspection, wrapGAppsHook
-, gnome3, gtkmm3, gtksourceview3, gtksourceviewmm, gtkspell3, gtkspellmm, cairomm
+, gobject-introspection, wrapGAppsHook
+, gtkmm3, gtksourceview3, gtksourceviewmm, gtkspell3, gtkspellmm, cairomm
 }:
 
 let
diff --git a/pkgs/applications/misc/ganttproject-bin/default.nix b/pkgs/applications/misc/ganttproject-bin/default.nix
index 6bc18ba3790..dd0a5c9a4f6 100644
--- a/pkgs/applications/misc/ganttproject-bin/default.nix
+++ b/pkgs/applications/misc/ganttproject-bin/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, lib, fetchzip, makeDesktopItem, makeWrapper
+{ stdenv, fetchzip, makeDesktopItem, makeWrapper
 , jre
 }:
 
diff --git a/pkgs/applications/misc/gremlin-console/default.nix b/pkgs/applications/misc/gremlin-console/default.nix
index a35079e9151..9274c2d0521 100644
--- a/pkgs/applications/misc/gremlin-console/default.nix
+++ b/pkgs/applications/misc/gremlin-console/default.nix
@@ -1,4 +1,4 @@
-{ pkgs, fetchzip, stdenv, makeWrapper, openjdk }:
+{ fetchzip, stdenv, makeWrapper, openjdk }:
 
 stdenv.mkDerivation rec {
   name = "gremlin-console-${version}";
diff --git a/pkgs/applications/misc/k2pdfopt/default.nix b/pkgs/applications/misc/k2pdfopt/default.nix
index bf29e05db1b..7c5845b3541 100644
--- a/pkgs/applications/misc/k2pdfopt/default.nix
+++ b/pkgs/applications/misc/k2pdfopt/default.nix
@@ -1,5 +1,5 @@
 { stdenv, fetchzip, fetchurl, fetchpatch, cmake, pkgconfig
-, zlib, libpng, openjpeg
+, zlib, libpng
 , enableGSL ? true, gsl
 , enableGhostScript ? true, ghostscript
 , enableMuPDF ? true, mupdf
diff --git a/pkgs/applications/misc/kitty/default.nix b/pkgs/applications/misc/kitty/default.nix
index aa234cf4a25..9b77bdcd2a5 100644
--- a/pkgs/applications/misc/kitty/default.nix
+++ b/pkgs/applications/misc/kitty/default.nix
@@ -2,7 +2,7 @@
   harfbuzz, fontconfig, pkgconfig, ncurses, imagemagick, xsel,
   libstartup_notification, libX11, libXrandr, libXinerama, libXcursor,
   libxkbcommon, libXi, libXext, wayland-protocols, wayland,
-  which, dbus, fetchpatch,
+  which, dbus,
   Cocoa,
   CoreGraphics,
   Foundation,
diff --git a/pkgs/applications/misc/lutris/default.nix b/pkgs/applications/misc/lutris/default.nix
index 3ccceb0e922..070d293a183 100644
--- a/pkgs/applications/misc/lutris/default.nix
+++ b/pkgs/applications/misc/lutris/default.nix
@@ -1,5 +1,5 @@
-{ stdenv, pkgs, buildFHSUserEnv, makeDesktopItem, fetchFromGitHub, fetchpatch
-, wrapGAppsHook, python2Packages, python3Packages }:
+{ stdenv, pkgs, buildFHSUserEnv, makeDesktopItem, fetchFromGitHub
+, wrapGAppsHook, python3Packages }:
 
 let
   qt5Deps = with pkgs; with qt5; [ qtbase qtmultimedia ];
diff --git a/pkgs/applications/misc/taskell/default.nix b/pkgs/applications/misc/taskell/default.nix
index 743d89de4ad..1a1ea3102af 100644
--- a/pkgs/applications/misc/taskell/default.nix
+++ b/pkgs/applications/misc/taskell/default.nix
@@ -1,4 +1,4 @@
-{ haskell, lib, haskellPackages, fetchFromGitHub }:
+{ lib, haskellPackages, fetchFromGitHub }:
 
 let
   version = "1.4.3";
diff --git a/pkgs/applications/misc/termite/wrapper.nix b/pkgs/applications/misc/termite/wrapper.nix
index 0b12a905360..379223d9076 100644
--- a/pkgs/applications/misc/termite/wrapper.nix
+++ b/pkgs/applications/misc/termite/wrapper.nix
@@ -1,4 +1,4 @@
-{  makeWrapper, wrapGAppsHook, symlinkJoin, configFile ? null, termite }:
+{  makeWrapper, symlinkJoin, configFile ? null, termite }:
 
 if configFile == null then termite else symlinkJoin {
   name = "termite-with-config-${termite.version}";
diff --git a/pkgs/applications/misc/ulauncher/default.nix b/pkgs/applications/misc/ulauncher/default.nix
index 961df1a4c53..12cf96580f7 100644
--- a/pkgs/applications/misc/ulauncher/default.nix
+++ b/pkgs/applications/misc/ulauncher/default.nix
@@ -1,12 +1,9 @@
 { stdenv
-, fetchFromGitHub
 , fetchurl
 , python27Packages
-, substituteAll
 , gnome3
 , gobject-introspection
 , wrapGAppsHook
-, gtk3
 , webkitgtk
 , libnotify
 , keybinder3
diff --git a/pkgs/applications/misc/xcruiser/default.nix b/pkgs/applications/misc/xcruiser/default.nix
index 945072ce026..8875c95fe57 100644
--- a/pkgs/applications/misc/xcruiser/default.nix
+++ b/pkgs/applications/misc/xcruiser/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, gccmakedep, xorg, imake, libXt, libXaw, libXpm, libXext }:
+{ stdenv, fetchurl, gccmakedep, imake, libXt, libXaw, libXpm, libXext }:
 
 stdenv.mkDerivation {
   name = "xcruiser-0.30";
diff --git a/pkgs/applications/misc/yubioath-desktop/default.nix b/pkgs/applications/misc/yubioath-desktop/default.nix
index 6280f24e22f..3d4718990cb 100644
--- a/pkgs/applications/misc/yubioath-desktop/default.nix
+++ b/pkgs/applications/misc/yubioath-desktop/default.nix
@@ -1,6 +1,6 @@
-{ stdenv, fetchurl, fetchFromGitHub
-, qmake, qtbase, qtquickcontrols, qtsvg
-, python3, pyotherside, ncurses
+{ stdenv, fetchurl
+, qmake, qtbase, qtquickcontrols
+, python3, pyotherside
 , pcsclite, yubikey-personalization
 , yubikey-manager, makeWrapper }:
 
diff --git a/pkgs/applications/misc/zathura/pdf-mupdf/default.nix b/pkgs/applications/misc/zathura/pdf-mupdf/default.nix
index e2c08a00da2..f3cacd21236 100644
--- a/pkgs/applications/misc/zathura/pdf-mupdf/default.nix
+++ b/pkgs/applications/misc/zathura/pdf-mupdf/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, lib, meson, ninja, fetchurl, fetchFromGitHub
+{ stdenv, lib, meson, ninja, fetchFromGitHub
 , pkgconfig, zathura_core, cairo , gtk-mac-integration, girara, mupdf }:
 
 stdenv.mkDerivation rec {
diff --git a/pkgs/applications/networking/browsers/chromium/common.nix b/pkgs/applications/networking/browsers/chromium/common.nix
index 75b1c8b09bd..ea0e0184340 100644
--- a/pkgs/applications/networking/browsers/chromium/common.nix
+++ b/pkgs/applications/networking/browsers/chromium/common.nix
@@ -1,4 +1,4 @@
-{ stdenv, llvmPackages, gn, ninja, which, nodejs, fetchurl, fetchpatch, gnutar
+{ stdenv, llvmPackages, gn, ninja, which, nodejs, fetchpatch, gnutar
 
 # default dependencies
 , bzip2, flac, speex, libopus
diff --git a/pkgs/applications/networking/browsers/chromium/default.nix b/pkgs/applications/networking/browsers/chromium/default.nix
index 60ff4b27880..3178e2595fc 100644
--- a/pkgs/applications/networking/browsers/chromium/default.nix
+++ b/pkgs/applications/networking/browsers/chromium/default.nix
@@ -1,5 +1,5 @@
 { newScope, config, stdenv, llvmPackages, gcc8Stdenv, llvmPackages_8
-, makeWrapper, makeDesktopItem, ed
+, makeWrapper, ed
 , glib, gtk3, gnome3, gsettings-desktop-schemas
 , libva ? null
 
diff --git a/pkgs/applications/networking/browsers/firefox-bin/update.nix b/pkgs/applications/networking/browsers/firefox-bin/update.nix
index 97163ffa762..1bfc211d850 100644
--- a/pkgs/applications/networking/browsers/firefox-bin/update.nix
+++ b/pkgs/applications/networking/browsers/firefox-bin/update.nix
@@ -1,5 +1,4 @@
-{ stdenv
-, name
+{ name
 , channel
 , writeScript
 , xidel
diff --git a/pkgs/applications/networking/browsers/firefox/packages.nix b/pkgs/applications/networking/browsers/firefox/packages.nix
index 9ada4b90b75..5253dc41749 100644
--- a/pkgs/applications/networking/browsers/firefox/packages.nix
+++ b/pkgs/applications/networking/browsers/firefox/packages.nix
@@ -1,4 +1,4 @@
-{ lib, callPackage, stdenv, fetchurl, fetchFromGitHub, fetchpatch, python3, overrideCC, gccStdenv, gcc6 }:
+{ lib, callPackage, fetchurl, fetchFromGitHub, python3, overrideCC, gccStdenv, gcc6 }:
 
 let
 
diff --git a/pkgs/applications/networking/browsers/firefox/update.nix b/pkgs/applications/networking/browsers/firefox/update.nix
index 0ead6de123a..e12b552535d 100644
--- a/pkgs/applications/networking/browsers/firefox/update.nix
+++ b/pkgs/applications/networking/browsers/firefox/update.nix
@@ -1,5 +1,4 @@
 { writeScript
-, stdenv
 , lib
 , xidel
 , common-updater-scripts
diff --git a/pkgs/applications/networking/browsers/midori/default.nix b/pkgs/applications/networking/browsers/midori/default.nix
index 13120903383..fd21d9222d3 100644
--- a/pkgs/applications/networking/browsers/midori/default.nix
+++ b/pkgs/applications/networking/browsers/midori/default.nix
@@ -1,5 +1,5 @@
 { stdenv, fetchurl, cmake, ninja, pkgconfig, intltool, vala, wrapGAppsHook, gcr, libpeas
-, gtk3, webkitgtk, sqlite, gsettings-desktop-schemas, libsoup, glib-networking, gnome3
+, gtk3, webkitgtk, sqlite, gsettings-desktop-schemas, libsoup, glib-networking
 }:
 
 stdenv.mkDerivation rec {
diff --git a/pkgs/applications/networking/browsers/tor-browser-bundle/default.nix b/pkgs/applications/networking/browsers/tor-browser-bundle/default.nix
index 80879baa283..b5ceae82ac0 100644
--- a/pkgs/applications/networking/browsers/tor-browser-bundle/default.nix
+++ b/pkgs/applications/networking/browsers/tor-browser-bundle/default.nix
@@ -21,8 +21,6 @@
 , mediaSupport ? false
 , ffmpeg
 
-, gmp
-
 # Extensions, common
 , zip
 
diff --git a/pkgs/applications/networking/charles/default.nix b/pkgs/applications/networking/charles/default.nix
index e8d732cf617..3946bf88625 100644
--- a/pkgs/applications/networking/charles/default.nix
+++ b/pkgs/applications/networking/charles/default.nix
@@ -20,8 +20,7 @@ let
       startupNotify = "true";
     };
 
-    attrs' = builtins.removeAttrs attrs ["version" "sha256"];
-    in stdenv.mkDerivation rec {
+  in stdenv.mkDerivation rec {
       name = "charles-${version}";
       inherit version;
 
diff --git a/pkgs/applications/networking/cluster/docker-machine/kvm2.nix b/pkgs/applications/networking/cluster/docker-machine/kvm2.nix
index 41465766489..d8fa1a04507 100644
--- a/pkgs/applications/networking/cluster/docker-machine/kvm2.nix
+++ b/pkgs/applications/networking/cluster/docker-machine/kvm2.nix
@@ -1,4 +1,4 @@
-{ stdenv, buildGoPackage, fetchFromGitHub, libvirt, pkgconfig, minikube }:
+{ stdenv, buildGoPackage, libvirt, pkgconfig, minikube }:
 
 buildGoPackage rec {
   pname = "docker-machine-kvm2";
diff --git a/pkgs/applications/networking/cluster/kubectl/default.nix b/pkgs/applications/networking/cluster/kubectl/default.nix
index 4dbd3d38d31..40d42408679 100644
--- a/pkgs/applications/networking/cluster/kubectl/default.nix
+++ b/pkgs/applications/networking/cluster/kubectl/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, lib, kubernetes }:
+{ stdenv, kubernetes }:
 
 stdenv.mkDerivation {
   name = "kubectl-${kubernetes.version}";
diff --git a/pkgs/applications/networking/cluster/minikube/default.nix b/pkgs/applications/networking/cluster/minikube/default.nix
index 5ce4ab7b906..5b5d6a98e88 100644
--- a/pkgs/applications/networking/cluster/minikube/default.nix
+++ b/pkgs/applications/networking/cluster/minikube/default.nix
@@ -1,5 +1,5 @@
 { stdenv, buildGoPackage, fetchFromGitHub, go-bindata, libvirt, qemu
-, gpgme, makeWrapper, vmnet, python
+, gpgme, makeWrapper, vmnet
 , docker-machine-kvm, docker-machine-kvm2
 , extraDrivers ? []
 }:
diff --git a/pkgs/applications/networking/cluster/terraform-landscape/default.nix b/pkgs/applications/networking/cluster/terraform-landscape/default.nix
index aa523506850..1380005a1c1 100644
--- a/pkgs/applications/networking/cluster/terraform-landscape/default.nix
+++ b/pkgs/applications/networking/cluster/terraform-landscape/default.nix
@@ -1,7 +1,6 @@
 { lib, bundlerApp, ruby }:
-let
-  version = (import ./gemset.nix).terraform_landscape.version;
-in bundlerApp {
+
+bundlerApp {
   pname = "terraform_landscape";
 
   inherit ruby;
diff --git a/pkgs/applications/networking/cluster/tilt/default.nix b/pkgs/applications/networking/cluster/tilt/default.nix
index 36c1f6334c4..86496d18e2e 100644
--- a/pkgs/applications/networking/cluster/tilt/default.nix
+++ b/pkgs/applications/networking/cluster/tilt/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, lib, buildGoPackage, fetchFromGitHub }:
+{ stdenv, buildGoPackage, fetchFromGitHub }:
 
 buildGoPackage rec {
   pname   = "tilt";
diff --git a/pkgs/applications/networking/feedreaders/feedreader/default.nix b/pkgs/applications/networking/feedreaders/feedreader/default.nix
index ed42f7607b4..55932c5c198 100644
--- a/pkgs/applications/networking/feedreaders/feedreader/default.nix
+++ b/pkgs/applications/networking/feedreaders/feedreader/default.nix
@@ -1,5 +1,5 @@
-{ stdenv, fetchFromGitHub, fetchpatch, meson, ninja, pkgconfig, vala, gettext, python3
-, appstream-glib, desktop-file-utils, glibcLocales, wrapGAppsHook
+{ stdenv, fetchFromGitHub, meson, ninja, pkgconfig, vala, gettext, python3
+, appstream-glib, desktop-file-utils, wrapGAppsHook
 , gtk3, libgee, libpeas, librest, webkitgtk, gsettings-desktop-schemas, hicolor-icon-theme
 , curl, glib, gnome3, gst_all_1, json-glib, libnotify, libsecret, sqlite, gumbo, libxml2
 }:
diff --git a/pkgs/applications/networking/feedreaders/newsboat/default.nix b/pkgs/applications/networking/feedreaders/newsboat/default.nix
index d89d5624ece..dbd49014493 100644
--- a/pkgs/applications/networking/feedreaders/newsboat/default.nix
+++ b/pkgs/applications/networking/feedreaders/newsboat/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, rustPlatform, fetchurl, fetchpatch, stfl, sqlite, curl, gettext, pkgconfig, libxml2, json_c, ncurses
+{ stdenv, rustPlatform, fetchurl, stfl, sqlite, curl, gettext, pkgconfig, libxml2, json_c, ncurses
 , asciidoc, docbook_xml_dtd_45, libxslt, docbook_xsl, libiconv, Security, makeWrapper }:
 
 rustPlatform.buildRustPackage rec {
diff --git a/pkgs/applications/networking/gns3/default.nix b/pkgs/applications/networking/gns3/default.nix
index 7e8601dd723..a3b2bbe90c1 100644
--- a/pkgs/applications/networking/gns3/default.nix
+++ b/pkgs/applications/networking/gns3/default.nix
@@ -1,4 +1,4 @@
-{ callPackage, stdenv }:
+{ callPackage }:
 
 let
   stableVersion = "2.1.21";
diff --git a/pkgs/applications/networking/gns3/server.nix b/pkgs/applications/networking/gns3/server.nix
index 0c57a52ee6b..f681f3fa63b 100644
--- a/pkgs/applications/networking/gns3/server.nix
+++ b/pkgs/applications/networking/gns3/server.nix
@@ -1,6 +1,6 @@
 { stable, branch, version, sha256Hash }:
 
-{ stdenv, python3, fetchFromGitHub, fetchpatch }:
+{ stdenv, python3, fetchFromGitHub }:
 
 let
   python = if stable then python3.override {
diff --git a/pkgs/applications/networking/instant-messengers/fractal/default.nix b/pkgs/applications/networking/instant-messengers/fractal/default.nix
index 84b9bdfa7a0..69580245fa9 100644
--- a/pkgs/applications/networking/instant-messengers/fractal/default.nix
+++ b/pkgs/applications/networking/instant-messengers/fractal/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, fetchFromGitLab, meson, ninja, gettext, cargo, rustc, python3, rustPlatform, pkgconfig, gtksourceview
+{ stdenv, fetchFromGitLab, meson, ninja, gettext, cargo, rustc, python3, rustPlatform, pkgconfig, gtksourceview
 , hicolor-icon-theme, glib, libhandy, gtk3, libsecret, dbus, openssl, sqlite, gst_all_1, wrapGAppsHook }:
 
 rustPlatform.buildRustPackage rec {
diff --git a/pkgs/applications/networking/instant-messengers/gitter/default.nix b/pkgs/applications/networking/instant-messengers/gitter/default.nix
index be911f70f91..5b664415c1f 100644
--- a/pkgs/applications/networking/instant-messengers/gitter/default.nix
+++ b/pkgs/applications/networking/instant-messengers/gitter/default.nix
@@ -3,7 +3,7 @@
 , libXScrnSaver, libXcomposite, libXcursor, libXdamage, libXext, libXfixes
 , libXi, libXrandr, libXrender, libXtst, libappindicator-gtk3, libcxx
 , libnotify, libpulseaudio, libxcb, makeDesktopItem, makeWrapper, nspr, nss
-, nwjs, pango, systemd }:
+, pango, systemd }:
 
 let gitterDirectorySuffix = "opt/gitter";
     doELFPatch = target: ''
diff --git a/pkgs/applications/networking/instant-messengers/nheko/default.nix b/pkgs/applications/networking/instant-messengers/nheko/default.nix
index 4a669f127e5..defec82b916 100644
--- a/pkgs/applications/networking/instant-messengers/nheko/default.nix
+++ b/pkgs/applications/networking/instant-messengers/nheko/default.nix
@@ -1,4 +1,4 @@
-{ lib, stdenv, fetchFromGitHub, fetchurl
+{ lib, stdenv, fetchFromGitHub
 , cmake, cmark, lmdb, qt5, qtmacextras, mtxclient
 , boost, spdlog, olm, pkgconfig
 }:
diff --git a/pkgs/applications/networking/instant-messengers/quaternion/default.nix b/pkgs/applications/networking/instant-messengers/quaternion/default.nix
index 8f18d25089c..1c58ae353bb 100644
--- a/pkgs/applications/networking/instant-messengers/quaternion/default.nix
+++ b/pkgs/applications/networking/instant-messengers/quaternion/default.nix
@@ -1,6 +1,6 @@
 { stdenv, lib, fetchFromGitHub, cmake
 , qtbase, qtquickcontrols, qtkeychain, qtmultimedia, qttools
-, libqmatrixclient_0_4, libqmatrixclient_0_5 }:
+, libqmatrixclient_0_5 }:
 
 let
   generic = version: sha256: prefix: library: stdenv.mkDerivation rec {
diff --git a/pkgs/applications/networking/instant-messengers/riot/yarn2nix.nix b/pkgs/applications/networking/instant-messengers/riot/yarn2nix.nix
index d243d9356bd..5dd79fdf1d8 100644
--- a/pkgs/applications/networking/instant-messengers/riot/yarn2nix.nix
+++ b/pkgs/applications/networking/instant-messengers/riot/yarn2nix.nix
@@ -60,7 +60,6 @@ in rec {
   mkYarnModules = {
     name,
     pname,
-    version,
     packageJSON,
     yarnLock,
     yarnNix ? mkYarnNix yarnLock,
@@ -207,7 +206,7 @@ in rec {
         name = "${safeName}-modules-${version}";
         preBuild = yarnPreBuild;
         workspaceDependencies = workspaceDependenciesTransitive;
-        inherit packageJSON pname version yarnLock yarnNix yarnFlags pkgConfig;
+        inherit packageJSON pname yarnLock yarnNix yarnFlags pkgConfig;
       };
       publishBinsFor_ = unlessNull publishBinsFor [pname];
       linkDirFunction = ''
diff --git a/pkgs/applications/networking/instant-messengers/sky/default.nix b/pkgs/applications/networking/instant-messengers/sky/default.nix
index a90acc8eae3..cf6031aa05b 100644
--- a/pkgs/applications/networking/instant-messengers/sky/default.nix
+++ b/pkgs/applications/networking/instant-messengers/sky/default.nix
@@ -1,9 +1,9 @@
-{ stdenv, fetchurl, file, lib, libX11, libXScrnSaver
+{ stdenv, fetchurl, file, libX11, libXScrnSaver
 , libGL, qt5, SDL, libpulseaudio
 , libXrandr, libXext, libXcursor, libXinerama, libXi
 , curl, sqlite, openssl
 , libuuid, openh264, libv4l, libxkbfile, libXv, zlib, libXmu
-, libXtst, libXdamage, pam, patchelfUnstable, libXfixes, libXrender, libjpeg_original
+, libXtst, libXdamage, pam, libXfixes, libXrender, libjpeg_original
 , ffmpeg
 }:
  let
diff --git a/pkgs/applications/networking/instant-messengers/telegram/telegram-cli/default.nix b/pkgs/applications/networking/instant-messengers/telegram/telegram-cli/default.nix
index 2b744c61ccb..c0b1de893c7 100644
--- a/pkgs/applications/networking/instant-messengers/telegram/telegram-cli/default.nix
+++ b/pkgs/applications/networking/instant-messengers/telegram/telegram-cli/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchgit, bash, libconfig, libevent, openssl
+{ stdenv, fetchgit, libconfig, libevent, openssl
 , readline, zlib, lua5_2, python, pkgconfig, jansson
 , runtimeShell
 }:
diff --git a/pkgs/applications/networking/instant-messengers/utox/default.nix b/pkgs/applications/networking/instant-messengers/utox/default.nix
index 6fafe26aa30..349a1363259 100644
--- a/pkgs/applications/networking/instant-messengers/utox/default.nix
+++ b/pkgs/applications/networking/instant-messengers/utox/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, lib, fetchFromGitHub, check, cmake, pkgconfig
+{ stdenv, fetchFromGitHub, check, cmake, pkgconfig
 , libtoxcore, filter-audio, dbus, libvpx, libX11, openal, freetype, libv4l
 , libXrender, fontconfig, libXext, libXft, libsodium, libopus }:
 
diff --git a/pkgs/applications/networking/irc/konversation/default.nix b/pkgs/applications/networking/irc/konversation/default.nix
index ccee78a64da..27297b01dce 100644
--- a/pkgs/applications/networking/irc/konversation/default.nix
+++ b/pkgs/applications/networking/irc/konversation/default.nix
@@ -1,7 +1,6 @@
 { mkDerivation
 , lib
 , fetchurl
-, fetchpatch
 , extra-cmake-modules
 , kdoctools
 , kbookmarks
diff --git a/pkgs/applications/networking/irc/weechat/default.nix b/pkgs/applications/networking/irc/weechat/default.nix
index cde5fe5f8f6..4c6bfb721b7 100644
--- a/pkgs/applications/networking/irc/weechat/default.nix
+++ b/pkgs/applications/networking/irc/weechat/default.nix
@@ -5,12 +5,11 @@
 , asciidoctor # manpages
 , guileSupport ? true, guile
 , luaSupport ? true, lua5
-, perlSupport ? true, perl, perlPackages
+, perlSupport ? true, perl
 , pythonSupport ? true, pythonPackages
 , rubySupport ? true, ruby
 , tclSupport ? true, tcl
 , extraBuildInputs ? []
-, fetchpatch
 }:
 
 let
diff --git a/pkgs/applications/networking/irc/weechat/wrapper.nix b/pkgs/applications/networking/irc/weechat/wrapper.nix
index bd05b63c68b..6dcd9a31e5e 100644
--- a/pkgs/applications/networking/irc/weechat/wrapper.nix
+++ b/pkgs/applications/networking/irc/weechat/wrapper.nix
@@ -1,4 +1,4 @@
-{ stdenv, lib, runCommand, writeScriptBin, buildEnv
+{ lib, runCommand, writeScriptBin, buildEnv
 , pythonPackages, perlPackages, runtimeShell
 }:
 
diff --git a/pkgs/applications/networking/mailreaders/astroid/default.nix b/pkgs/applications/networking/mailreaders/astroid/default.nix
index 41f3a271a69..58797800deb 100644
--- a/pkgs/applications/networking/mailreaders/astroid/default.nix
+++ b/pkgs/applications/networking/mailreaders/astroid/default.nix
@@ -1,7 +1,7 @@
 { stdenv, fetchFromGitHub, cmake, pkgconfig, gnome3, gmime3, webkitgtk
 , libsass, notmuch, boost, wrapGAppsHook, glib-networking, protobuf, vim_configurable
 , gtkmm3, libpeas, gsettings-desktop-schemas
-, makeWrapper, python3, python3Packages
+, python3, python3Packages
 , vim ? vim_configurable.override {
                     features = "normal";
                     gui = "auto";
diff --git a/pkgs/applications/networking/mailreaders/sup/default.nix b/pkgs/applications/networking/mailreaders/sup/default.nix
index cfc471a57f0..f7b7d6e8c3d 100644
--- a/pkgs/applications/networking/mailreaders/sup/default.nix
+++ b/pkgs/applications/networking/mailreaders/sup/default.nix
@@ -1,4 +1,4 @@
-{ lib, bundlerApp, rake, which }:
+{ lib, bundlerApp }:
 
 # Updated with:
 # rm gemset.nix Gemfile.lock
diff --git a/pkgs/applications/networking/mailreaders/thunderbird/default.nix b/pkgs/applications/networking/mailreaders/thunderbird/default.nix
index 0a3c4789cf2..3e360a28829 100644
--- a/pkgs/applications/networking/mailreaders/thunderbird/default.nix
+++ b/pkgs/applications/networking/mailreaders/thunderbird/default.nix
@@ -1,4 +1,4 @@
-{ lib, stdenv, fetchurl, pkgconfig, gtk2, pango, perl, python, zip, fetchpatch
+{ lib, stdenv, fetchurl, pkgconfig, gtk2, pango, perl, python, zip
 , libIDL, libjpeg, zlib, dbus, dbus-glib, bzip2, xorg
 , freetype, fontconfig, file, nspr, nss, libnotify
 , yasm, libGLU_combined, sqlite, unzip
diff --git a/pkgs/applications/networking/modem-manager-gui/default.nix b/pkgs/applications/networking/modem-manager-gui/default.nix
index ca8a4d0fb0c..d31f98ef4ba 100644
--- a/pkgs/applications/networking/modem-manager-gui/default.nix
+++ b/pkgs/applications/networking/modem-manager-gui/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, buildEnv, pkgconfig, python3, fetchhg, gtk3, glib, gdbm, gtkspell3, itstool, libappindicator-gtk3, perlPackages, glibcLocales, meson, ninja }:
+{ stdenv, pkgconfig, python3, fetchhg, gtk3, glib, gdbm, gtkspell3, itstool, libappindicator-gtk3, perlPackages, glibcLocales, meson, ninja }:
 
 stdenv.mkDerivation rec {
   name = "modem-manager-gui-${version}";
diff --git a/pkgs/applications/networking/mpop/default.nix b/pkgs/applications/networking/mpop/default.nix
index c4dd8e402ec..60049cd64b9 100644
--- a/pkgs/applications/networking/mpop/default.nix
+++ b/pkgs/applications/networking/mpop/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, openssl, pkgconfig, gnutls, gsasl, libidn, Security }:
+{ stdenv, fetchurl, pkgconfig, gnutls, gsasl, libidn, Security }:
 
 with stdenv.lib;
 
diff --git a/pkgs/applications/networking/ndppd/default.nix b/pkgs/applications/networking/ndppd/default.nix
index 6e6315ced7d..44355c2c181 100644
--- a/pkgs/applications/networking/ndppd/default.nix
+++ b/pkgs/applications/networking/ndppd/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchFromGitHub, fetchurl, gzip }:
+{ stdenv, fetchFromGitHub, gzip }:
 
 stdenv.mkDerivation rec {
   name = "ndppd-${version}";
diff --git a/pkgs/applications/networking/newsreaders/pan/default.nix b/pkgs/applications/networking/newsreaders/pan/default.nix
index 308c857644e..e88936dc072 100644
--- a/pkgs/applications/networking/newsreaders/pan/default.nix
+++ b/pkgs/applications/networking/newsreaders/pan/default.nix
@@ -1,6 +1,6 @@
 { spellChecking ? true
 , stdenv, fetchurl, pkgconfig, gtk3, gtkspell3 ? null
-, perl, gmime2, gettext, intltool, itstool, libxml2, dbus-glib, libnotify, gnutls
+, gmime2, gettext, intltool, itstool, libxml2, libnotify, gnutls
 , makeWrapper, gnupg
 , gnomeSupport ? true, libsecret, gcr
 }:
diff --git a/pkgs/applications/networking/nextcloud-client/default.nix b/pkgs/applications/networking/nextcloud-client/default.nix
index 0bf2cfce6e4..7aa7d88149f 100644
--- a/pkgs/applications/networking/nextcloud-client/default.nix
+++ b/pkgs/applications/networking/nextcloud-client/default.nix
@@ -1,5 +1,5 @@
 { stdenv, fetchgit, cmake, pkgconfig, qtbase, qtwebkit, qtkeychain, qttools, sqlite
-, inotify-tools, makeWrapper, openssl_1_1, pcre, qtwebengine, libsecret, fetchpatch
+, inotify-tools, makeWrapper, openssl_1_1, pcre, qtwebengine, libsecret
 , libcloudproviders
 }:
 
diff --git a/pkgs/applications/networking/remote/remmina/default.nix b/pkgs/applications/networking/remote/remmina/default.nix
index 951b136dd4e..fb577f09120 100644
--- a/pkgs/applications/networking/remote/remmina/default.nix
+++ b/pkgs/applications/networking/remote/remmina/default.nix
@@ -1,6 +1,6 @@
 { stdenv, fetchFromGitLab, cmake, ninja, pkgconfig, wrapGAppsHook
 , glib, gtk3, gettext, libxkbfile, libX11
-, freerdp, libssh, libgcrypt, gnutls, makeDesktopItem
+, freerdp, libssh, libgcrypt, gnutls
 , pcre, libdbusmenu-gtk3, libappindicator-gtk3
 , libvncserver, libpthreadstubs, libXdmcp, libxkbcommon
 , libsecret, libsoup, spice-protocol, spice-gtk, epoxy, at-spi2-core
diff --git a/pkgs/applications/networking/sync/rclone/default.nix b/pkgs/applications/networking/sync/rclone/default.nix
index fcfa1a55223..66ce9bc7b17 100644
--- a/pkgs/applications/networking/sync/rclone/default.nix
+++ b/pkgs/applications/networking/sync/rclone/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, buildGoModule, fetchFromGitHub, fetchpatch }:
+{ stdenv, buildGoModule, fetchFromGitHub }:
 
 buildGoModule rec {
   pname = "rclone";
diff --git a/pkgs/applications/networking/sync/rsync/rrsync.nix b/pkgs/applications/networking/sync/rsync/rrsync.nix
index e5c04798aab..7563b0ea195 100644
--- a/pkgs/applications/networking/sync/rsync/rrsync.nix
+++ b/pkgs/applications/networking/sync/rsync/rrsync.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, fetchpatch, perl, rsync }:
+{ stdenv, fetchurl, perl, rsync }:
 
 let
   base = import ./base.nix { inherit stdenv fetchurl; };
diff --git a/pkgs/applications/networking/syncthing/default.nix b/pkgs/applications/networking/syncthing/default.nix
index f57bbe69f7a..cc916e069a0 100644
--- a/pkgs/applications/networking/syncthing/default.nix
+++ b/pkgs/applications/networking/syncthing/default.nix
@@ -1,4 +1,4 @@
-{ buildGoPackage, fetchpatch, stdenv, lib, procps, fetchFromGitHub }:
+{ buildGoPackage, stdenv, lib, procps, fetchFromGitHub }:
 
 let
   common = { stname, target, postInstall ? "" }:
diff --git a/pkgs/applications/networking/weather/meteo/default.nix b/pkgs/applications/networking/weather/meteo/default.nix
index 74a1b571406..4c183dd4607 100644
--- a/pkgs/applications/networking/weather/meteo/default.nix
+++ b/pkgs/applications/networking/weather/meteo/default.nix
@@ -1,6 +1,6 @@
 { stdenv, fetchFromGitLab, vala, python3, pkgconfig, meson, ninja, gtk3
-, json-glib, libsoup, clutter, clutter-gtk, libchamplain, webkitgtk, geocode-glib
-, libappindicator, desktop-file-utils, appstream, gobject-introspection, wrapGAppsHook
+, json-glib, libsoup, webkitgtk, geocode-glib
+, libappindicator, desktop-file-utils, appstream, wrapGAppsHook
 , hicolor-icon-theme }:
 
 stdenv.mkDerivation rec {
diff --git a/pkgs/applications/office/aesop/default.nix b/pkgs/applications/office/aesop/default.nix
index 42831b7a839..470eabdf6e4 100644
--- a/pkgs/applications/office/aesop/default.nix
+++ b/pkgs/applications/office/aesop/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchFromGitHub, fetchpatch, pantheon, pkgconfig, meson, ninja, python3, gtk3
+{ stdenv, fetchFromGitHub, pantheon, pkgconfig, meson, ninja, python3, gtk3
 , desktop-file-utils, json-glib, libsoup, libgee, poppler, wrapGAppsHook }:
 
 stdenv.mkDerivation rec {
diff --git a/pkgs/applications/office/bookworm/default.nix b/pkgs/applications/office/bookworm/default.nix
index 63199945f2b..fe81340a7fb 100644
--- a/pkgs/applications/office/bookworm/default.nix
+++ b/pkgs/applications/office/bookworm/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchFromGitHub, fetchpatch, pantheon, python3, python2, pkgconfig, libxml2, meson, ninja, gtk3, gnome3, glib, webkitgtk
+{ stdenv, fetchFromGitHub, pantheon, python3, python2, pkgconfig, libxml2, meson, ninja, gtk3, gnome3, glib, webkitgtk
 , gobject-introspection, sqlite, poppler, poppler_utils, html2text, curl, gnugrep, coreutils, bash, unzip, unar, wrapGAppsHook }:
 
 stdenv.mkDerivation rec {
diff --git a/pkgs/applications/office/kexi/default.nix b/pkgs/applications/office/kexi/default.nix
index 784126ba3d8..e28a2d0852b 100644
--- a/pkgs/applications/office/kexi/default.nix
+++ b/pkgs/applications/office/kexi/default.nix
@@ -1,5 +1,5 @@
 {
-  mkDerivation, lib, fetchurl, fetchpatch, extra-cmake-modules, kdoctools,
+  mkDerivation, lib, fetchurl, extra-cmake-modules, kdoctools,
   boost, qttools, qtwebkit,
   breeze-icons, karchive, kcodecs, kcompletion, kconfig, kconfigwidgets, kcoreaddons,
   kcrash, kguiaddons, ki18n, kiconthemes, kitemviews, kio, ktexteditor, ktextwidgets,
diff --git a/pkgs/applications/office/kmymoney/default.nix b/pkgs/applications/office/kmymoney/default.nix
index 236f794c8b7..a29e256675f 100644
--- a/pkgs/applications/office/kmymoney/default.nix
+++ b/pkgs/applications/office/kmymoney/default.nix
@@ -1,5 +1,4 @@
 { stdenv, lib, fetchurl, doxygen, extra-cmake-modules, graphviz, kdoctools
-, fetchpatch
 
 , akonadi, alkimia, aqbanking, gmp, gwenhywfar, kactivities, karchive
 , kcmutils, kcontacts, kdewebkit, kdiagram, kholidays, kidentitymanagement
diff --git a/pkgs/applications/office/mendeley/default.nix b/pkgs/applications/office/mendeley/default.nix
index 589f583e4e3..7ead0fe7348 100644
--- a/pkgs/applications/office/mendeley/default.nix
+++ b/pkgs/applications/office/mendeley/default.nix
@@ -131,7 +131,7 @@ stdenv.mkDerivation {
   dontStrip = true;
   dontPatchElf = true;
 
-  updateScript = import ./update.nix { inherit stdenv writeScript runtimeShell; };
+  updateScript = import ./update.nix { inherit writeScript runtimeShell; };
 
   meta = with stdenv.lib; {
     homepage = https://www.mendeley.com;
diff --git a/pkgs/applications/office/mendeley/update.nix b/pkgs/applications/office/mendeley/update.nix
index c174e7dc668..56becea9959 100644
--- a/pkgs/applications/office/mendeley/update.nix
+++ b/pkgs/applications/office/mendeley/update.nix
@@ -1,4 +1,4 @@
-{ stdenv, writeScript, runtimeShell }:
+{ writeScript, runtimeShell }:
 
 writeScript "update-mendeley" ''
   #!${runtimeShell}
diff --git a/pkgs/applications/office/paperless/default.nix b/pkgs/applications/office/paperless/default.nix
index 0b6ae285bc0..f1dd10e9420 100644
--- a/pkgs/applications/office/paperless/default.nix
+++ b/pkgs/applications/office/paperless/default.nix
@@ -5,11 +5,9 @@
 , callPackage
 
 , python3
-, file
 , imagemagick7
 , ghostscript
 , optipng
-, poppler
 , tesseract
 , unpaper
 }:
diff --git a/pkgs/applications/office/paperwork/default.nix b/pkgs/applications/office/paperwork/default.nix
index 401d3be3128..adbd4c30a39 100644
--- a/pkgs/applications/office/paperwork/default.nix
+++ b/pkgs/applications/office/paperwork/default.nix
@@ -1,4 +1,4 @@
-{ lib, python3Packages, fetchFromGitLab, gtk3, cairo
+{ lib, python3Packages, gtk3, cairo
 , aspellDicts, buildEnv
 , gnome3, hicolor-icon-theme, librsvg
 , xvfb_run, dbus, libnotify
diff --git a/pkgs/applications/office/qownnotes/default.nix b/pkgs/applications/office/qownnotes/default.nix
index f73dc0168ef..6e9f954a461 100644
--- a/pkgs/applications/office/qownnotes/default.nix
+++ b/pkgs/applications/office/qownnotes/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, qmake, qttools, qtbase, qtsvg, qttranslations, qtdeclarative, qtxmlpatterns, qtwayland, qtwebsockets }:
+{ stdenv, fetchurl, qmake, qttools, qtbase, qtsvg, qtdeclarative, qtxmlpatterns, qtwayland, qtwebsockets }:
 
 stdenv.mkDerivation rec {
   pname = "qownnotes";
diff --git a/pkgs/applications/office/todoman/default.nix b/pkgs/applications/office/todoman/default.nix
index 3f4953fc12a..a69fb7a1c6c 100644
--- a/pkgs/applications/office/todoman/default.nix
+++ b/pkgs/applications/office/todoman/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, python3, glibcLocales, fetchpatch }:
+{ stdenv, python3, glibcLocales }:
 
 let
   inherit (python3.pkgs) buildPythonApplication fetchPypi;
diff --git a/pkgs/applications/office/vnote/default.nix b/pkgs/applications/office/vnote/default.nix
index 0e6921accb3..b02bf505874 100644
--- a/pkgs/applications/office/vnote/default.nix
+++ b/pkgs/applications/office/vnote/default.nix
@@ -2,14 +2,6 @@
 
 let
   description = "A note-taking application that knows programmers and Markdown better";
-  desktopItem = makeDesktopItem {
-    name = "VNote";
-    exec = "vnote";
-    icon = "vnote";
-    comment = description;
-    desktopName = "VNote";
-    categories = "Office";
-  };
 in stdenv.mkDerivation rec {
   version = "2.6";
   pname = "vnote";
diff --git a/pkgs/applications/office/zotero/default.nix b/pkgs/applications/office/zotero/default.nix
index 025b772d73b..b8b2f96a502 100644
--- a/pkgs/applications/office/zotero/default.nix
+++ b/pkgs/applications/office/zotero/default.nix
@@ -29,8 +29,6 @@
 , nspr
 , nss
 , pango
-, coreutils
-, gnused
 , gsettings-desktop-schemas
 }:
 
diff --git a/pkgs/applications/radio/rtl-sdr/default.nix b/pkgs/applications/radio/rtl-sdr/default.nix
index aedc847ee69..a4d5b2cad1e 100644
--- a/pkgs/applications/radio/rtl-sdr/default.nix
+++ b/pkgs/applications/radio/rtl-sdr/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, lib, fetchpatch, fetchgit, cmake, pkgconfig, libusb1 }:
+{ stdenv, fetchgit, cmake, pkgconfig, libusb1 }:
 
 stdenv.mkDerivation rec {
   name = "rtl-sdr-${version}";
diff --git a/pkgs/applications/science/biology/niftyreg/default.nix b/pkgs/applications/science/biology/niftyreg/default.nix
index 9f24046b3bf..9f1cb8db43d 100644
--- a/pkgs/applications/science/biology/niftyreg/default.nix
+++ b/pkgs/applications/science/biology/niftyreg/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, lib, fetchurl, cmake, zlib }:
+{ stdenv, fetchurl, cmake, zlib }:
 
 stdenv.mkDerivation rec {
   pname   = "niftyreg";
diff --git a/pkgs/applications/science/biology/niftyseg/default.nix b/pkgs/applications/science/biology/niftyseg/default.nix
index 671ee4b95c6..e7221855503 100644
--- a/pkgs/applications/science/biology/niftyseg/default.nix
+++ b/pkgs/applications/science/biology/niftyseg/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, lib, fetchurl, cmake, eigen, zlib }:
+{ stdenv, fetchurl, cmake, eigen, zlib }:
 
 stdenv.mkDerivation rec {
   pname   = "niftyseg";
diff --git a/pkgs/applications/science/biology/sumatools/default.nix b/pkgs/applications/science/biology/sumatools/default.nix
index 6f7227d7a3e..f9042f30011 100644
--- a/pkgs/applications/science/biology/sumatools/default.nix
+++ b/pkgs/applications/science/biology/sumatools/default.nix
@@ -23,6 +23,7 @@ in rec {
       sha256 = "0hwkrxzfz7m5wdjvmrhkjg8kis378iaqr5n4nhdhkwwhn8x1jn5a";
     };
     makeFlags = "PREFIX=$(out)";
+    inherit meta;
   };
 
   # Sumatra
@@ -42,6 +43,7 @@ in rec {
       "LIBSUMAPATH=-L${sumalibs}"
       "PREFIX=$(out)"
     ];
+    inherit meta;
   };
 
   # Sumaclust
@@ -61,5 +63,6 @@ in rec {
       "LIBSUMAPATH=-L${sumalibs}"
       "PREFIX=$(out)"
     ];
+    inherit meta;
   };
 }
diff --git a/pkgs/applications/science/chemistry/openmolcas/default.nix b/pkgs/applications/science/chemistry/openmolcas/default.nix
index 70e79023c0f..bc6301e1fd4 100644
--- a/pkgs/applications/science/chemistry/openmolcas/default.nix
+++ b/pkgs/applications/science/chemistry/openmolcas/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, pkgs, fetchFromGitLab, cmake, gfortran, perl
+{ stdenv, fetchFromGitLab, cmake, gfortran, perl
 , openblas, hdf5-cpp, python3, texlive
 , armadillo, openmpi, globalarrays, openssh
 , makeWrapper
diff --git a/pkgs/applications/science/electronics/dsview/default.nix b/pkgs/applications/science/electronics/dsview/default.nix
index be32f33a365..ecbbeff108d 100644
--- a/pkgs/applications/science/electronics/dsview/default.nix
+++ b/pkgs/applications/science/electronics/dsview/default.nix
@@ -1,5 +1,5 @@
-{ stdenv, fetchFromGitHub, pkgconfig, cmake, autoreconfHook,
-glib, libzip, boost, fftw, qtbase,
+{ stdenv, fetchFromGitHub, pkgconfig, cmake,
+libzip, boost, fftw, qtbase,
 libusb, makeWrapper, libsigrok4dsl, libsigrokdecode4dsl
 }:
 
diff --git a/pkgs/applications/science/electronics/eagle/eagle.nix b/pkgs/applications/science/electronics/eagle/eagle.nix
index 286dbc07f3d..444638db8e9 100644
--- a/pkgs/applications/science/electronics/eagle/eagle.nix
+++ b/pkgs/applications/science/electronics/eagle/eagle.nix
@@ -1,6 +1,6 @@
-{ stdenv, fetchurl, makeDesktopItem, patchelf
+{ stdenv, fetchurl, makeDesktopItem
 , libXrender, libXrandr, libXcursor, libX11, libXext, libXi, libxcb
-, cups , libGL, glib, nss, nspr, expat, alsaLib
+ , libGL, glib, nss, nspr, expat, alsaLib
 , qtbase, qtdeclarative, qtsvg, qtlocation, qtwebchannel, qtwebengine
 }:
 
diff --git a/pkgs/applications/science/logic/clprover/clprover.nix b/pkgs/applications/science/logic/clprover/clprover.nix
index b6ebce68193..ae57724e4f8 100644
--- a/pkgs/applications/science/logic/clprover/clprover.nix
+++ b/pkgs/applications/science/logic/clprover/clprover.nix
@@ -1,4 +1,4 @@
-{ stdenv, pkgs, fetchzip }:
+{ stdenv, fetchzip }:
 
 stdenv.mkDerivation rec {
   name = "clprover-${version}";
diff --git a/pkgs/applications/science/logic/cryptominisat/default.nix b/pkgs/applications/science/logic/cryptominisat/default.nix
index c6b7b918eac..c9516a135c0 100644
--- a/pkgs/applications/science/logic/cryptominisat/default.nix
+++ b/pkgs/applications/science/logic/cryptominisat/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchFromGitHub, fetchpatch, cmake, python3, xxd, boost }:
+{ stdenv, fetchFromGitHub, cmake, python3, xxd, boost }:
 
 stdenv.mkDerivation rec {
   name = "cryptominisat-${version}";
diff --git a/pkgs/applications/science/machine-learning/sc2-headless/maps.nix b/pkgs/applications/science/machine-learning/sc2-headless/maps.nix
index b4ff9fc1821..6eec10e958c 100644
--- a/pkgs/applications/science/machine-learning/sc2-headless/maps.nix
+++ b/pkgs/applications/science/machine-learning/sc2-headless/maps.nix
@@ -1,4 +1,4 @@
-{ fetchzip, unzip
+{ fetchzip
 }:
 let
   fetchzip' = args: (fetchzip args).overrideAttrs (old: { UNZIP = "-j -P iagreetotheeula"; });
diff --git a/pkgs/applications/science/math/caffe/default.nix b/pkgs/applications/science/math/caffe/default.nix
index 9ee56041ed3..3367fa87422 100644
--- a/pkgs/applications/science/math/caffe/default.nix
+++ b/pkgs/applications/science/math/caffe/default.nix
@@ -1,4 +1,4 @@
-{ config, stdenv, lib, runCommand
+{ config, stdenv, lib
 , fetchFromGitHub
 , fetchurl
 , cmake
diff --git a/pkgs/applications/science/math/gap/default.nix b/pkgs/applications/science/math/gap/default.nix
index 6beb87e9f02..9b42bcd9f13 100644
--- a/pkgs/applications/science/math/gap/default.nix
+++ b/pkgs/applications/science/math/gap/default.nix
@@ -45,7 +45,6 @@ let
     "sophus-*"
     "tomlib-*"
   ];
-  standardPackages = requiredPackages ++ autoloadedPackages;
   keepAll = keepAllPackages || (packageSet == "full");
   packagesToKeep = requiredPackages ++ lib.optionals (packageSet == "standard") autoloadedPackages;
 
diff --git a/pkgs/applications/science/math/sage/default.nix b/pkgs/applications/science/math/sage/default.nix
index 92ec32d5cc5..875ccb3a484 100644
--- a/pkgs/applications/science/math/sage/default.nix
+++ b/pkgs/applications/science/math/sage/default.nix
@@ -7,7 +7,7 @@
 # is always preferred, see `sage-src.nix` for that.
 
 let
-  inherit (pkgs) fetchurl symlinkJoin callPackage nodePackages;
+  inherit (pkgs) symlinkJoin callPackage nodePackages;
 
   # https://trac.sagemath.org/ticket/15980 for tracking of python3 support
   python = pkgs.python2.override {
diff --git a/pkgs/applications/science/math/sage/sagenb.nix b/pkgs/applications/science/math/sage/sagenb.nix
index 32335b45202..03b5b7a3bbf 100644
--- a/pkgs/applications/science/math/sage/sagenb.nix
+++ b/pkgs/applications/science/math/sage/sagenb.nix
@@ -1,5 +1,4 @@
 { stdenv
-, fetchpatch
 , python
 , buildPythonPackage
 , fetchFromGitHub
diff --git a/pkgs/applications/science/math/scilab-bin/default.nix b/pkgs/applications/science/math/scilab-bin/default.nix
index c3a74d14bc0..262ee7d0d5d 100644
--- a/pkgs/applications/science/math/scilab-bin/default.nix
+++ b/pkgs/applications/science/math/scilab-bin/default.nix
@@ -5,8 +5,6 @@ let
 
   ver = "6.0.1";
 
-  majorVer = builtins.elemAt (lib.splitString "." ver) 0;
-
   badArch = throw "${name} requires i686-linux or x86_64-linux";
 
   architecture =
diff --git a/pkgs/applications/science/robotics/betaflight-configurator/default.nix b/pkgs/applications/science/robotics/betaflight-configurator/default.nix
index 2cedb7aeca4..6449e966959 100644
--- a/pkgs/applications/science/robotics/betaflight-configurator/default.nix
+++ b/pkgs/applications/science/robotics/betaflight-configurator/default.nix
@@ -1,4 +1,4 @@
-{stdenv, fetchurl, unzip, runtimeShell, makeDesktopItem, makeWrapper, nwjs, wrapGAppsHook, gsettings-desktop-schemas, gtk3 }:
+{stdenv, fetchurl, unzip, makeDesktopItem, nwjs, wrapGAppsHook, gsettings-desktop-schemas, gtk3 }:
 
 let
   strippedName = "betaflight-configurator";
diff --git a/pkgs/applications/video/bombono/default.nix b/pkgs/applications/video/bombono/default.nix
index aaa1737f99a..4b97db56e97 100644
--- a/pkgs/applications/video/bombono/default.nix
+++ b/pkgs/applications/video/bombono/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchFromGitHub, wrapGAppsHook, gtk2, boost, gnome2, gtkmm2, scons,
+{ stdenv, fetchFromGitHub, wrapGAppsHook, gtk2, boost, gtkmm2, scons,
 mjpegtools, libdvdread, dvdauthor, gettext, dvdplusrwtools, libxmlxx, ffmpeg,
 enca, pkgconfig, fetchpatch }:
 
diff --git a/pkgs/applications/video/kodi/plugins.nix b/pkgs/applications/video/kodi/plugins.nix
index b9976e54019..1cb51078069 100644
--- a/pkgs/applications/video/kodi/plugins.nix
+++ b/pkgs/applications/video/kodi/plugins.nix
@@ -1,4 +1,4 @@
-{ stdenv, callPackage, fetchurl, fetchFromGitHub, unzip
+{ stdenv, callPackage, fetchFromGitHub
 , cmake, kodiPlain, libcec_platform, tinyxml, rapidxml
 , steam, libusb, pcre-cpp, jsoncpp, libhdhomerun, zlib
 , python2Packages, expat, glib, nspr, nss, openssl
diff --git a/pkgs/applications/video/lightworks/default.nix b/pkgs/applications/video/lightworks/default.nix
index 2b21a25434d..6d74c64343d 100644
--- a/pkgs/applications/video/lightworks/default.nix
+++ b/pkgs/applications/video/lightworks/default.nix
@@ -1,5 +1,5 @@
 { stdenv, fetchurl, dpkg, makeWrapper, buildFHSUserEnv
-, gnome3, gtk3, gdk_pixbuf, cairo, libjpeg_original, glib, gnome2, libGLU
+, gtk3, gdk_pixbuf, cairo, libjpeg_original, glib, gnome2, libGLU
 , nvidia_cg_toolkit, zlib, openssl, portaudio
 }:
 let
diff --git a/pkgs/applications/video/obs-studio/default.nix b/pkgs/applications/video/obs-studio/default.nix
index 932436bd8d3..be55511c441 100644
--- a/pkgs/applications/video/obs-studio/default.nix
+++ b/pkgs/applications/video/obs-studio/default.nix
@@ -1,6 +1,5 @@
 { config, stdenv
 , fetchFromGitHub
-, fetchpatch
 , cmake
 , fdk_aac
 , ffmpeg
diff --git a/pkgs/applications/video/qstopmotion/default.nix b/pkgs/applications/video/qstopmotion/default.nix
index 812004bd119..f2b23fbdea0 100644
--- a/pkgs/applications/video/qstopmotion/default.nix
+++ b/pkgs/applications/video/qstopmotion/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, lib, fetchurl, qt5, ffmpeg, guvcview, cmake, ninja, libxml2
+{ stdenv, fetchurl, qt5, ffmpeg, guvcview, cmake, ninja, libxml2
 , gettext, pkgconfig, libgphoto2, gphoto2, v4l_utils, libv4l, pcre
 , qwt, extra-cmake-modules }:
 
diff --git a/pkgs/applications/video/subtitleeditor/default.nix b/pkgs/applications/video/subtitleeditor/default.nix
index 135dabd6898..ea51471d9aa 100644
--- a/pkgs/applications/video/subtitleeditor/default.nix
+++ b/pkgs/applications/video/subtitleeditor/default.nix
@@ -1,5 +1,5 @@
 { stdenv, fetchFromGitHub, autoreconfHook, pkgconfig, intltool, file,
-  desktop-file-utils, enchant, gnome3, gtk3, gtkmm3, gst_all_1, hicolor-icon-theme,
+  desktop-file-utils, enchant, gtk3, gtkmm3, gst_all_1, hicolor-icon-theme,
   libsigcxx, libxmlxx, xdg_utils, isocodes, wrapGAppsHook
 }:
 
diff --git a/pkgs/applications/video/vdr/plugins.nix b/pkgs/applications/video/vdr/plugins.nix
index 4fc3783ba51..589c0144647 100644
--- a/pkgs/applications/video/vdr/plugins.nix
+++ b/pkgs/applications/video/vdr/plugins.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, fetchgit, vdr, ffmpeg_2, alsaLib, fetchFromGitHub
+{ stdenv, fetchurl, fetchgit, vdr, alsaLib, fetchFromGitHub
 , libvdpau, libxcb, xcbutilwm, graphicsmagick, libav, pcre, xorgserver, ffmpeg
 , libiconv, boost, libgcrypt, perl, utillinux, groff, libva, xorg, ncurses }:
 let
diff --git a/pkgs/applications/video/vlc/default.nix b/pkgs/applications/video/vlc/default.nix
index c9fc11e889d..5ac72e94140 100644
--- a/pkgs/applications/video/vlc/default.nix
+++ b/pkgs/applications/video/vlc/default.nix
@@ -11,7 +11,6 @@
 , onlyLibVLC ? false
 , withQt5 ? true, qtbase ? null, qtsvg ? null, qtx11extras ? null
 , jackSupport ? false
-, fetchpatch
 , removeReferencesTo
 , chromecastSupport ? true, protobuf, libmicrodns
 }:
diff --git a/pkgs/applications/virtualization/containerd/default.nix b/pkgs/applications/virtualization/containerd/default.nix
index fe23bcac585..d21bc8cc32b 100644
--- a/pkgs/applications/virtualization/containerd/default.nix
+++ b/pkgs/applications/virtualization/containerd/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, lib, fetchFromGitHub, buildGoPackage, btrfs-progs, go-md2man, utillinux }:
+{ lib, fetchFromGitHub, buildGoPackage, btrfs-progs, go-md2man, utillinux }:
 
 with lib;
 
diff --git a/pkgs/applications/virtualization/docker/proxy.nix b/pkgs/applications/virtualization/docker/proxy.nix
index 8b7021f7dbb..3b2e1f45ae6 100644
--- a/pkgs/applications/virtualization/docker/proxy.nix
+++ b/pkgs/applications/virtualization/docker/proxy.nix
@@ -1,4 +1,4 @@
-{ stdenv, buildGoPackage, fetchFromGitHub, docker }:
+{ stdenv, buildGoPackage, fetchFromGitHub }:
 
 buildGoPackage rec {
   name = "docker-proxy-${rev}";
diff --git a/pkgs/applications/virtualization/nvidia-docker/default.nix b/pkgs/applications/virtualization/nvidia-docker/default.nix
index 3e79ff84882..197b3045cf2 100644
--- a/pkgs/applications/virtualization/nvidia-docker/default.nix
+++ b/pkgs/applications/virtualization/nvidia-docker/default.nix
@@ -1,5 +1,5 @@
 { stdenv, lib, fetchFromGitHub, fetchpatch, callPackage, makeWrapper
-, buildGoPackage, runc, libelf, libcap, libseccomp, glibc }:
+, buildGoPackage, runc, glibc }:
 
 with lib; let
 
diff --git a/pkgs/applications/virtualization/railcar/default.nix b/pkgs/applications/virtualization/railcar/default.nix
index 437324e9b05..0a139448cb3 100644
--- a/pkgs/applications/virtualization/railcar/default.nix
+++ b/pkgs/applications/virtualization/railcar/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, lib, fetchFromGitHub, fetchpatch, rustPlatform, libseccomp }:
+{ lib, fetchFromGitHub, rustPlatform, libseccomp }:
 
 rustPlatform.buildRustPackage rec {
   name = "railcar-${version}";
diff --git a/pkgs/applications/virtualization/runc/default.nix b/pkgs/applications/virtualization/runc/default.nix
index f19f4c5b27e..10c7d17209c 100644
--- a/pkgs/applications/virtualization/runc/default.nix
+++ b/pkgs/applications/virtualization/runc/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, lib, fetchFromGitHub, buildGoPackage, go-md2man
+{ lib, fetchFromGitHub, buildGoPackage, go-md2man
 , pkgconfig, libapparmor, apparmor-parser, libseccomp, which }:
 
 with lib;
diff --git a/pkgs/applications/virtualization/singularity/default.nix b/pkgs/applications/virtualization/singularity/default.nix
index ab9416fd3d6..12057c221e8 100644
--- a/pkgs/applications/virtualization/singularity/default.nix
+++ b/pkgs/applications/virtualization/singularity/default.nix
@@ -1,12 +1,10 @@
 {stdenv
 , removeReferencesTo
 , lib
-, fetchgit
 , fetchFromGitHub
 , utillinux
 , openssl
 , coreutils
-, gawk
 , go
 , which
 , makeWrapper
diff --git a/pkgs/applications/virtualization/virtualbox/extpack.nix b/pkgs/applications/virtualization/virtualbox/extpack.nix
index a748a0adbba..78c2538bbb0 100644
--- a/pkgs/applications/virtualization/virtualbox/extpack.nix
+++ b/pkgs/applications/virtualization/virtualbox/extpack.nix
@@ -1,4 +1,4 @@
-{stdenv, fetchurl, lib}:
+{fetchurl, lib}:
 
 with lib;
 
diff --git a/pkgs/applications/window-managers/compton/default.nix b/pkgs/applications/window-managers/compton/default.nix
index 60607ea89d1..e729f786a56 100644
--- a/pkgs/applications/window-managers/compton/default.nix
+++ b/pkgs/applications/window-managers/compton/default.nix
@@ -1,8 +1,8 @@
 { stdenv, lib, fetchFromGitHub, pkgconfig, asciidoc, docbook_xml_dtd_45
 , docbook_xsl, libxslt, libxml2, makeWrapper, meson, ninja
 , xorgproto, libxcb ,xcbutilrenderutil, xcbutilimage, pixman, libev
-, dbus, libconfig, libdrm, libGL, pcre, libX11, libXcomposite, libXdamage
-, libXinerama, libXrandr, libXrender, libXext, xwininfo, libxdg_basedir }:
+, dbus, libconfig, libdrm, libGL, pcre, libX11
+, libXinerama, libXext, xwininfo, libxdg_basedir }:
 stdenv.mkDerivation rec {
   pname = "compton";
   version = "6.2";
diff --git a/pkgs/applications/window-managers/stumpish/default.nix b/pkgs/applications/window-managers/stumpish/default.nix
index bccb49ff4d5..56d2515ed7b 100644
--- a/pkgs/applications/window-managers/stumpish/default.nix
+++ b/pkgs/applications/window-managers/stumpish/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, substituteAll, fetchurl, fetchFromGitHub, bash, gnused, ncurses, xorg, rlwrap }:
+{ stdenv, substituteAll, fetchFromGitHub, gnused, ncurses, xorg, rlwrap }:
 
 stdenv.mkDerivation rec {
   pname = "stumpish";