summary refs log tree commit diff
diff options
context:
space:
mode:
authorArtturin <Artturin@artturin.com>2022-08-15 06:40:21 +0300
committerArtturin <Artturin@artturin.com>2022-08-16 13:14:19 +0300
commitc6568adb005175fb77ef94fee09aa4e8cc248a60 (patch)
tree91a150d7e3f24f50fbf07b1f44b9bb19c95b6743
parent2f27d033805fdb0b619bad6316d6228662947712 (diff)
downloadnixpkgs-c6568adb005175fb77ef94fee09aa4e8cc248a60.tar
nixpkgs-c6568adb005175fb77ef94fee09aa4e8cc248a60.tar.gz
nixpkgs-c6568adb005175fb77ef94fee09aa4e8cc248a60.tar.bz2
nixpkgs-c6568adb005175fb77ef94fee09aa4e8cc248a60.tar.lz
nixpkgs-c6568adb005175fb77ef94fee09aa4e8cc248a60.tar.xz
nixpkgs-c6568adb005175fb77ef94fee09aa4e8cc248a60.tar.zst
nixpkgs-c6568adb005175fb77ef94fee09aa4e8cc248a60.zip
treewide: makeWrapper buildInputs to nativeBuildInputs
most found with https://github.com/siraben/nix-lint
-rw-r--r--pkgs/applications/editors/eclipse/build-eclipse.nix3
-rw-r--r--pkgs/applications/editors/jupyter-kernels/octave/default.nix2
-rw-r--r--pkgs/applications/editors/vim/plugins/vim-utils.nix2
-rw-r--r--pkgs/applications/gis/grass/default.nix4
-rw-r--r--pkgs/applications/graphics/timelapse-deflicker/default.nix3
-rw-r--r--pkgs/applications/misc/eaglemode/default.nix4
-rw-r--r--pkgs/applications/misc/ikiwiki/default.nix3
-rw-r--r--pkgs/applications/misc/lyx/default.nix4
-rw-r--r--pkgs/applications/misc/notify-osd-customizable/default.nix5
-rw-r--r--pkgs/applications/misc/notify-osd/default.nix4
-rw-r--r--pkgs/applications/misc/rofi-emoji/default.nix2
-rw-r--r--pkgs/applications/misc/slic3r/default.nix3
-rw-r--r--pkgs/applications/misc/tabula-java/default.nix2
-rw-r--r--pkgs/applications/networking/browsers/offpunk/default.nix3
-rw-r--r--pkgs/applications/networking/instant-messengers/oysttyer/default.nix2
-rw-r--r--pkgs/applications/networking/instant-messengers/pidgin/wrapper.nix2
-rw-r--r--pkgs/applications/networking/instant-messengers/teams/default.nix2
-rw-r--r--pkgs/applications/networking/mailreaders/notmuch/mutt.nix2
-rw-r--r--pkgs/applications/science/electronics/bitscope/common.nix5
-rw-r--r--pkgs/applications/science/math/pspp/default.nix4
-rw-r--r--pkgs/applications/science/math/sage/sage-tests.nix2
-rw-r--r--pkgs/applications/science/math/sage/sage-with-env.nix3
-rw-r--r--pkgs/applications/science/math/sage/sage.nix5
-rw-r--r--pkgs/applications/science/misc/openmodelica/combined/default.nix2
-rw-r--r--pkgs/applications/version-management/gitlab/default.nix3
-rw-r--r--pkgs/applications/video/avidemux/default.nix4
-rw-r--r--pkgs/development/compilers/ecl/16.1.2.nix6
-rw-r--r--pkgs/development/compilers/elm/default.nix6
-rw-r--r--pkgs/development/compilers/intercal/default.nix3
-rw-r--r--pkgs/development/compilers/opa/default.nix4
-rw-r--r--pkgs/development/compilers/open-watcom/wrapper.nix2
-rw-r--r--pkgs/development/compilers/opendylan/default.nix3
-rw-r--r--pkgs/development/compilers/yosys/default.nix2
-rw-r--r--pkgs/development/idris-modules/idris-wrapper.nix2
-rw-r--r--pkgs/development/idris-modules/with-packages.nix2
-rw-r--r--pkgs/development/interpreters/lfe/generic-builder.nix2
-rw-r--r--pkgs/development/interpreters/maude/default.nix4
-rw-r--r--pkgs/development/libraries/aspell/aspell-with-dicts.nix2
-rw-r--r--pkgs/development/libraries/gsignond/wrapper.nix2
-rw-r--r--pkgs/development/libraries/vapoursynth/editor.nix2
-rw-r--r--pkgs/development/lisp-modules-new/packages.nix3
-rw-r--r--pkgs/development/mobile/androidenv/build-tools.nix5
-rw-r--r--pkgs/development/mobile/androidenv/emulator.nix6
-rw-r--r--pkgs/development/mobile/androidenv/tools/25.nix4
-rw-r--r--pkgs/development/mobile/androidenv/tools/26.nix7
-rw-r--r--pkgs/development/python-modules/gtimelog/default.nix2
-rw-r--r--pkgs/development/tools/build-managers/msbuild/default.nix2
-rw-r--r--pkgs/development/tools/eclipse-mat/default.nix3
-rw-r--r--pkgs/development/tools/haskell/ihaskell/wrapper.nix2
-rw-r--r--pkgs/development/web/wml/default.nix3
-rw-r--r--pkgs/games/frogatto/default.nix2
-rw-r--r--pkgs/games/megaglest/default.nix6
-rw-r--r--pkgs/games/nanosaur/default.nix3
-rw-r--r--pkgs/games/space-cadet-pinball/default.nix3
-rw-r--r--pkgs/games/stuntrally/default.nix3
-rw-r--r--pkgs/games/xconq/default.nix4
-rw-r--r--pkgs/servers/slimserver/default.nix2
-rw-r--r--pkgs/servers/sql/postgresql/default.nix2
-rw-r--r--pkgs/servers/web-apps/discourse/mail_receiver/default.nix4
-rw-r--r--pkgs/tools/audio/gvolicon/default.nix4
-rw-r--r--pkgs/tools/backup/lvmsync/default.nix2
-rw-r--r--pkgs/tools/filesystems/glusterfs/default.nix8
-rw-r--r--pkgs/tools/networking/dd-agent/5.nix8
-rw-r--r--pkgs/tools/security/pass/default.nix3
64 files changed, 103 insertions, 110 deletions
diff --git a/pkgs/applications/editors/eclipse/build-eclipse.nix b/pkgs/applications/editors/eclipse/build-eclipse.nix
index 19a2e378f30..d2a0080859d 100644
--- a/pkgs/applications/editors/eclipse/build-eclipse.nix
+++ b/pkgs/applications/editors/eclipse/build-eclipse.nix
@@ -17,9 +17,10 @@ stdenv.mkDerivation rec {
     categories = [ "Development" ];
   };
 
+  nativeBuildInputs = [ makeWrapper ];
   buildInputs = [
     fontconfig freetype glib gsettings-desktop-schemas gtk jdk libX11
-    libXrender libXtst libsecret makeWrapper zlib
+    libXrender libXtst libsecret zlib
   ] ++ lib.optional (webkitgtk != null) webkitgtk;
 
   buildCommand = ''
diff --git a/pkgs/applications/editors/jupyter-kernels/octave/default.nix b/pkgs/applications/editors/jupyter-kernels/octave/default.nix
index 7a1c997a7c5..8a6dc4e0073 100644
--- a/pkgs/applications/editors/jupyter-kernels/octave/default.nix
+++ b/pkgs/applications/editors/jupyter-kernels/octave/default.nix
@@ -22,7 +22,7 @@ rec {
   launcher = runCommand "octave-kernel-launcher" {
     inherit octave;
     python = python3.withPackages (ps: [ ps.traitlets ps.jupyter_core ps.ipykernel ps.metakernel kernel ]);
-    buildInputs = [ makeWrapper ];
+    nativeBuildInputs = [ makeWrapper ];
   } ''
     mkdir -p $out/bin
 
diff --git a/pkgs/applications/editors/vim/plugins/vim-utils.nix b/pkgs/applications/editors/vim/plugins/vim-utils.nix
index d11d638f4a0..c80dcb80949 100644
--- a/pkgs/applications/editors/vim/plugins/vim-utils.nix
+++ b/pkgs/applications/editors/vim/plugins/vim-utils.nix
@@ -338,7 +338,7 @@ rec {
           if vimrcFile != null then vimrcFile
           else if vimrcConfig != null then mkVimrcFile vimrcConfig
           else throw "at least one of vimrcConfig and vimrcFile must be specified";
-        bin = runCommand "${name}-bin" { buildInputs = [ makeWrapper ]; } ''
+        bin = runCommand "${name}-bin" { nativeBuildInputs = [ makeWrapper ]; } ''
           vimrc=${lib.escapeShellArg vimrc}
           gvimrc=${if gvimrcFile != null then lib.escapeShellArg gvimrcFile else ""}
 
diff --git a/pkgs/applications/gis/grass/default.nix b/pkgs/applications/gis/grass/default.nix
index 8ec293e489a..8cc7caee674 100644
--- a/pkgs/applications/gis/grass/default.nix
+++ b/pkgs/applications/gis/grass/default.nix
@@ -15,9 +15,9 @@ stdenv.mkDerivation rec {
     sha256 = "sha256-VK9FCqIwHGmeJe5lk12lpAGcsC1aPRBiI+XjACXjDd4=";
   };
 
-  nativeBuildInputs = [ pkg-config ];
+  nativeBuildInputs = [ pkg-config makeWrapper ];
   buildInputs = [ flex bison zlib proj gdal libtiff libpng fftw sqlite
-  readline ffmpeg makeWrapper netcdf geos postgresql libmysqlclient blas
+  readline ffmpeg netcdf geos postgresql libmysqlclient blas
   libLAS proj-datumgrid zstd wrapGAppsHook ]
     ++ lib.optionals stdenv.isLinux [ cairo pdal wxGTK31 ]
     ++ lib.optional stdenv.isDarwin wxmac
diff --git a/pkgs/applications/graphics/timelapse-deflicker/default.nix b/pkgs/applications/graphics/timelapse-deflicker/default.nix
index c752d7e3f71..f1757d51b1b 100644
--- a/pkgs/applications/graphics/timelapse-deflicker/default.nix
+++ b/pkgs/applications/graphics/timelapse-deflicker/default.nix
@@ -16,8 +16,9 @@ stdenv.mkDerivation rec {
     wrapProgram $out/bin/timelapse-deflicker --set PERL5LIB $PERL5LIB
   '';
 
+  nativeBuildInputs = [ makeWrapper ];
   buildInputs = with perlPackages; [
-    makeWrapper perl
+    perl
     ImageMagick TermProgressBar ImageExifTool
     FileType ClassMethodMaker
   ];
diff --git a/pkgs/applications/misc/eaglemode/default.nix b/pkgs/applications/misc/eaglemode/default.nix
index 65a74c4aca4..285c5270948 100644
--- a/pkgs/applications/misc/eaglemode/default.nix
+++ b/pkgs/applications/misc/eaglemode/default.nix
@@ -10,9 +10,9 @@ stdenv.mkDerivation rec {
     sha256 = "10zxih7gmyhq0az1mnsw2x563l4bbwcns794s4png8rf4d6hjszm";
   };
 
-  nativeBuildInputs = [ pkg-config ];
+  nativeBuildInputs = [ pkg-config makeWrapper ];
   buildInputs = [ perl libX11 libXinerama libjpeg libpng libtiff
-    librsvg glib gtk2 libXxf86vm libXext poppler xine-lib ghostscript makeWrapper ];
+    librsvg glib gtk2 libXxf86vm libXext poppler xine-lib ghostscript ];
 
   # The program tries to dlopen Xxf86vm, Xext and Xinerama, so we use the
   # trick on NIX_LDFLAGS and dontPatchELF to make it find them.
diff --git a/pkgs/applications/misc/ikiwiki/default.nix b/pkgs/applications/misc/ikiwiki/default.nix
index af7e9888c17..09f9b85e4b7 100644
--- a/pkgs/applications/misc/ikiwiki/default.nix
+++ b/pkgs/applications/misc/ikiwiki/default.nix
@@ -18,9 +18,10 @@ stdenv.mkDerivation rec {
     sha256 = "0skrc8r4wh4mjfgw1c94awr5sacfb9nfsbm4frikanc9xsy16ksr";
   };
 
+  nativeBuildInputs = [ makeWrapper ];
   buildInputs = [ which highlight ]
     ++ (with perlPackages; [ perl TextMarkdown URI HTMLParser HTMLScrubber HTMLTemplate
-      TimeDate gettext makeWrapper DBFile CGISession CGIFormBuilder LocaleGettext
+      TimeDate gettext DBFile CGISession CGIFormBuilder LocaleGettext
       RpcXML XMLSimple ImageMagick YAML YAMLLibYAML HTMLTree AuthenPassphrase
       NetOpenIDConsumer LWPxParanoidAgent CryptSSLeay ])
     ++ lib.optionals docutilsSupport [
diff --git a/pkgs/applications/misc/lyx/default.nix b/pkgs/applications/misc/lyx/default.nix
index e736c235c45..d1a19eeccc5 100644
--- a/pkgs/applications/misc/lyx/default.nix
+++ b/pkgs/applications/misc/lyx/default.nix
@@ -12,10 +12,10 @@ mkDerivation rec {
   };
 
   # LaTeX is used from $PATH, as people often want to have it with extra pkgs
-  nativeBuildInputs = [ pkg-config ];
+  nativeBuildInputs = [ pkg-config makeWrapper ];
   buildInputs = [
     qtbase qtsvg python3 file/*for libmagic*/ bc
-    hunspell makeWrapper # enchant
+    hunspell # enchant
   ];
 
   configureFlags = [
diff --git a/pkgs/applications/misc/notify-osd-customizable/default.nix b/pkgs/applications/misc/notify-osd-customizable/default.nix
index 820eceabb51..17377c6dae5 100644
--- a/pkgs/applications/misc/notify-osd-customizable/default.nix
+++ b/pkgs/applications/misc/notify-osd-customizable/default.nix
@@ -24,11 +24,10 @@ in stdenv.mkDerivation rec {
 
   preConfigure = "./autogen.sh --libexecdir=$(out)/bin";
 
-  nativeBuildInputs = [ pkg-config ];
+  nativeBuildInputs = [ pkg-config makeWrapper libtool ];
   buildInputs = [
-    glib libwnck libnotify dbus-glib makeWrapper
+    glib libwnck libnotify dbus-glib
     gsettings-desktop-schemas gnome.gnome-common
-    libtool
   ];
 
   configureFlags = [ "--libexecdir=$(out)/bin" ];
diff --git a/pkgs/applications/misc/notify-osd/default.nix b/pkgs/applications/misc/notify-osd/default.nix
index 005d0273466..9c0c5a3921e 100644
--- a/pkgs/applications/misc/notify-osd/default.nix
+++ b/pkgs/applications/misc/notify-osd/default.nix
@@ -9,9 +9,9 @@ stdenv.mkDerivation rec {
     sha256 = "0g5a7a680b05x27apz0y1ldl5csxpp152wqi42s107jymbp0s20j";
   };
 
-  nativeBuildInputs = [ pkg-config ];
+  nativeBuildInputs = [ pkg-config makeWrapper ];
   buildInputs = [
-    glib libwnck libnotify dbus-glib makeWrapper
+    glib libwnck libnotify dbus-glib
     gsettings-desktop-schemas
   ];
 
diff --git a/pkgs/applications/misc/rofi-emoji/default.nix b/pkgs/applications/misc/rofi-emoji/default.nix
index 6f858c8c6a9..7797b6dccac 100644
--- a/pkgs/applications/misc/rofi-emoji/default.nix
+++ b/pkgs/applications/misc/rofi-emoji/default.nix
@@ -46,13 +46,13 @@ stdenv.mkDerivation rec {
   nativeBuildInputs = [
     autoreconfHook
     pkg-config
+    makeWrapper
   ];
 
   buildInputs = [
     cairo
     glib
     libnotify
-    makeWrapper
     rofi-unwrapped
     wl-clipboard
     xclip
diff --git a/pkgs/applications/misc/slic3r/default.nix b/pkgs/applications/misc/slic3r/default.nix
index 8d929e0eef5..f973cf59159 100644
--- a/pkgs/applications/misc/slic3r/default.nix
+++ b/pkgs/applications/misc/slic3r/default.nix
@@ -13,9 +13,10 @@ stdenv.mkDerivation rec {
     sha256 = "sha256-cf0QTOzhLyTcbJryCQoTVzU8kfrPV6SLpqi4s36X5N0=";
   };
 
+  nativeBuildInputs = [ makeWrapper which ];
   buildInputs =
   [boost] ++
-  (with perlPackages; [ perl makeWrapper which
+  (with perlPackages; [ perl
     EncodeLocale MathClipper ExtUtilsXSpp
     MathConvexHullMonotoneChain MathGeometryVoronoi MathPlanePath Moo
     IOStringy ClassXSAccessor Wx GrowlGNTP NetDBus ImportInto XMLSAX
diff --git a/pkgs/applications/misc/tabula-java/default.nix b/pkgs/applications/misc/tabula-java/default.nix
index 0b0163b054d..ebd266e6669 100644
--- a/pkgs/applications/misc/tabula-java/default.nix
+++ b/pkgs/applications/misc/tabula-java/default.nix
@@ -9,7 +9,7 @@ stdenv.mkDerivation rec {
     sha256 = "sha256-IWHj//ZZOdfOCBJHnPnKNoYNtWl/f8H6ARYe1AkqB0U=";
   };
 
-  buildInputs = [ makeWrapper ];
+  nativeBuildInputs = [ makeWrapper ];
 
   dontUnpack = true;
   dontBuild = true;
diff --git a/pkgs/applications/networking/browsers/offpunk/default.nix b/pkgs/applications/networking/browsers/offpunk/default.nix
index 8f6d2712caa..cb11708fbee 100644
--- a/pkgs/applications/networking/browsers/offpunk/default.nix
+++ b/pkgs/applications/networking/browsers/offpunk/default.nix
@@ -41,7 +41,8 @@ stdenv.mkDerivation (finalAttrs: {
     sha256 = "1zg13wajsfrl3hli6sihn47db08w037jjq9vgr6m5sjh8r1jb9iy";
   };
 
-  buildInputs = [ makeWrapper ] ++ otherDependencies ++ pythonDependencies;
+  nativeBuildInputs = [ makeWrapper ];
+  buildInputs = otherDependencies ++ pythonDependencies;
 
   installPhase = ''
     runHook preInstall
diff --git a/pkgs/applications/networking/instant-messengers/oysttyer/default.nix b/pkgs/applications/networking/instant-messengers/oysttyer/default.nix
index 33f3b90873d..5dc09ae1f3e 100644
--- a/pkgs/applications/networking/instant-messengers/oysttyer/default.nix
+++ b/pkgs/applications/networking/instant-messengers/oysttyer/default.nix
@@ -12,9 +12,9 @@ stdenv.mkDerivation rec {
     sha256 = "0cm1hvi68iqgjsg15xdii271pklgzjn9j9afb1c460z71kgy3wz2";
   };
 
+  nativeBuildInputs = [ makeWrapper ];
   buildInputs = [
     perl
-    makeWrapper
   ];
 
   propagatedBuildInputs = with perlPackages; [
diff --git a/pkgs/applications/networking/instant-messengers/pidgin/wrapper.nix b/pkgs/applications/networking/instant-messengers/pidgin/wrapper.nix
index d5641c24fb0..a2885d7194f 100644
--- a/pkgs/applications/networking/instant-messengers/pidgin/wrapper.nix
+++ b/pkgs/applications/networking/instant-messengers/pidgin/wrapper.nix
@@ -7,7 +7,7 @@ in symlinkJoin {
 
   paths = [ pidgin ] ++ plugins;
 
-  buildInputs = [ makeWrapper ];
+  nativeBuildInputs = [ makeWrapper ];
 
   postBuild = ''
     wrapProgram $out/bin/pidgin \
diff --git a/pkgs/applications/networking/instant-messengers/teams/default.nix b/pkgs/applications/networking/instant-messengers/teams/default.nix
index dd4e104aa66..cebc1f9eb42 100644
--- a/pkgs/applications/networking/instant-messengers/teams/default.nix
+++ b/pkgs/applications/networking/instant-messengers/teams/default.nix
@@ -137,7 +137,7 @@ let
       hash = "sha256-vLUEvOSBUyAJIWHOAIkTqTW/W6TkgmeyRzQbquZP810=";
     };
 
-    buildInputs = [ xar cpio makeWrapper ];
+    nativeBuildInputs = [ xar cpio makeWrapper ];
 
     unpackPhase = ''
       xar -xf $src
diff --git a/pkgs/applications/networking/mailreaders/notmuch/mutt.nix b/pkgs/applications/networking/mailreaders/notmuch/mutt.nix
index ffd30c754b4..4cd9706bdb9 100644
--- a/pkgs/applications/networking/mailreaders/notmuch/mutt.nix
+++ b/pkgs/applications/networking/mailreaders/notmuch/mutt.nix
@@ -8,9 +8,9 @@ stdenv.mkDerivation rec {
 
   dontStrip = true;
 
+  nativeBuildInputs = [ makeWrapper ];
   buildInputs = [
     perl
-    makeWrapper
   ] ++ (with perlPackages; [
     FileRemove
     DigestSHA1
diff --git a/pkgs/applications/science/electronics/bitscope/common.nix b/pkgs/applications/science/electronics/bitscope/common.nix
index 2018878773e..1cd23d0f414 100644
--- a/pkgs/applications/science/electronics/bitscope/common.nix
+++ b/pkgs/applications/science/electronics/bitscope/common.nix
@@ -32,10 +32,7 @@ let
       ];
     } // (attrs.meta or {});
 
-    buildInputs = [
-      dpkg
-      makeWrapper
-    ];
+    nativeBuildInputs = [ makeWrapper dpkg ];
 
     libs = attrs.libs or [
       atk
diff --git a/pkgs/applications/science/math/pspp/default.nix b/pkgs/applications/science/math/pspp/default.nix
index 6e9ff90315c..dbc5c8a0f17 100644
--- a/pkgs/applications/science/math/pspp/default.nix
+++ b/pkgs/applications/science/math/pspp/default.nix
@@ -13,10 +13,10 @@ stdenv.mkDerivation rec {
     sha256 = "0lqrash677b09zxdlxp89z6k02y4i23mbqg83956dwl69wc53dan";
   };
 
-  nativeBuildInputs = [ pkg-config texinfo python3 ];
+  nativeBuildInputs = [ pkg-config texinfo python3 makeWrapper ];
   buildInputs = [ libxml2 readline zlib perl cairo gtk3 gsl
     gtksourceview pango gettext
-    makeWrapper gsettings-desktop-schemas hicolor-icon-theme ssw
+    gsettings-desktop-schemas hicolor-icon-theme ssw
   ];
 
   doCheck = false;
diff --git a/pkgs/applications/science/math/sage/sage-tests.nix b/pkgs/applications/science/math/sage/sage-tests.nix
index 451edb8f085..79d4f78082e 100644
--- a/pkgs/applications/science/math/sage/sage-tests.nix
+++ b/pkgs/applications/science/math/sage/sage-tests.nix
@@ -28,8 +28,8 @@ stdenv.mkDerivation {
   pname = "sage-tests";
   inherit src;
 
+  nativeBuildInputs = [ makeWrapper ];
   buildInputs = [
-    makeWrapper
     sage-with-env
   ];
 
diff --git a/pkgs/applications/science/math/sage/sage-with-env.nix b/pkgs/applications/science/math/sage/sage-with-env.nix
index df3a1467d53..23069f335b8 100644
--- a/pkgs/applications/science/math/sage/sage-with-env.nix
+++ b/pkgs/applications/science/math/sage/sage-with-env.nix
@@ -30,7 +30,6 @@ assert (!blas.isILP64) && (!lapack.isILP64);
 let
   buildInputs = [
     pythonEnv # for patchShebangs
-    makeWrapper
     pkg-config
     blas lapack
     singular
@@ -73,7 +72,7 @@ let
       []
     );
 
-  allInputs = lib.remove null (buildInputs ++ pythonEnv.extraLibs);
+  allInputs = lib.remove null (buildInputs ++ pythonEnv.extraLibs ++ [ makeWrapper ]);
   transitiveDeps = lib.unique (builtins.concatLists (map transitiveClosure allInputs ));
   # fix differences between spkg and sage names
   # (could patch sage instead, but this is more lightweight and also works for packages depending on sage)
diff --git a/pkgs/applications/science/math/sage/sage.nix b/pkgs/applications/science/math/sage/sage.nix
index 87f3e1137b1..73776a74cdf 100644
--- a/pkgs/applications/science/math/sage/sage.nix
+++ b/pkgs/applications/science/math/sage/sage.nix
@@ -17,9 +17,8 @@ stdenv.mkDerivation rec {
   pname = "sage";
   src = sage-with-env.env.lib.src;
 
-  buildInputs = [
-    makeWrapper
-  ] ++ lib.optionals requireSageTests [
+  nativeBuildInputs = [ makeWrapper ];
+  buildInputs = lib.optionals requireSageTests [
     # This is a hack to make sure sage-tests is evaluated. It doesn't acutally
     # produce anything of value, it just decouples the tests from the build.
     sage-tests
diff --git a/pkgs/applications/science/misc/openmodelica/combined/default.nix b/pkgs/applications/science/misc/openmodelica/combined/default.nix
index 0c2220b7ea2..bc6bc962021 100644
--- a/pkgs/applications/science/misc/openmodelica/combined/default.nix
+++ b/pkgs/applications/science/misc/openmodelica/combined/default.nix
@@ -11,7 +11,7 @@ symlinkJoin {
     omshell
   ];
 
-  buildInputs = [ gnumake makeWrapper ];
+  nativeBuildInputs = [ makeWrapper ];
 
   postBuild = ''
     wrapProgram $out/bin/OMEdit \
diff --git a/pkgs/applications/version-management/gitlab/default.nix b/pkgs/applications/version-management/gitlab/default.nix
index 1175b42fc5d..8fae17774c0 100644
--- a/pkgs/applications/version-management/gitlab/default.nix
+++ b/pkgs/applications/version-management/gitlab/default.nix
@@ -129,8 +129,9 @@ stdenv.mkDerivation {
 
   inherit src;
 
+  nativeBuildInputs = [ makeWrapper ];
   buildInputs = [
-    rubyEnv rubyEnv.wrappedRuby rubyEnv.bundler tzdata git nettools makeWrapper
+    rubyEnv rubyEnv.wrappedRuby rubyEnv.bundler tzdata git nettools
   ];
 
   patches = [
diff --git a/pkgs/applications/video/avidemux/default.nix b/pkgs/applications/video/avidemux/default.nix
index 35c628f8a59..e29b0a48806 100644
--- a/pkgs/applications/video/avidemux/default.nix
+++ b/pkgs/applications/video/avidemux/default.nix
@@ -38,11 +38,11 @@ stdenv.mkDerivation rec {
   ];
 
   nativeBuildInputs =
-    [ yasm cmake pkg-config ]
+    [ yasm cmake pkg-config makeWrapper ]
     ++ lib.optional withQT wrapQtAppsHook;
   buildInputs = [
     zlib gettext libvdpau libva libXv sqlite fribidi fontconfig
-    freetype alsa-lib libXext libGLU makeWrapper
+    freetype alsa-lib libXext libGLU
   ] ++ lib.optional withX264 x264
     ++ lib.optional withX265 x265
     ++ lib.optional withXvid xvidcore
diff --git a/pkgs/development/compilers/ecl/16.1.2.nix b/pkgs/development/compilers/ecl/16.1.2.nix
index 513e4ec3eec..f2d50fa6f92 100644
--- a/pkgs/development/compilers/ecl/16.1.2.nix
+++ b/pkgs/development/compilers/ecl/16.1.2.nix
@@ -25,11 +25,7 @@ stdenv.mkDerivation rec {
     sha256 = "sha256-LUgrGgpPvV2IFDRRcDInnYCMtkBeIt2R721zNTRGS5k=";
   };
 
-  nativeBuildInputs = [ autoconf automake ];
-  buildInputs = [
-    libtool
-    makeWrapper
-  ];
+  nativeBuildInputs = [ autoconf automake makeWrapper libtool ];
   propagatedBuildInputs = [
     libffi
     gmp
diff --git a/pkgs/development/compilers/elm/default.nix b/pkgs/development/compilers/elm/default.nix
index b5e17efd363..376e956d7ca 100644
--- a/pkgs/development/compilers/elm/default.nix
+++ b/pkgs/development/compilers/elm/default.nix
@@ -1,4 +1,4 @@
-{ pkgs, lib }:
+{ pkgs, lib, makeWrapper }:
 
 let
 
@@ -18,7 +18,7 @@ let
           elmVersion = drv.version;
           registryDat = ./registry.dat;
         };
-        buildTools = drv.buildTools or [] ++ [ pkgs.makeWrapper ];
+        buildTools = drv.buildTools or [] ++ [ makeWrapper ];
         jailbreak = true;
         postInstall = ''
           wrapProgram $out/bin/elm \
@@ -214,7 +214,7 @@ in lib.makeScope pkgs.newScope (self: with self; {
 
       elm-pages = nodePkgs."elm-pages".overrideAttrs (
         old: {
-          buildInputs = old.buildInputs ++ [ pkgs.makeWrapper ];
+          nativeBuildInputs = [ makeWrapper ];
 
           # can't use `patches = [ <patch_file> ]` with a nodePkgs derivation;
           # need to patch in one of the build phases instead.
diff --git a/pkgs/development/compilers/intercal/default.nix b/pkgs/development/compilers/intercal/default.nix
index f3383bdcb5f..54641d45bce 100644
--- a/pkgs/development/compilers/intercal/default.nix
+++ b/pkgs/development/compilers/intercal/default.nix
@@ -24,8 +24,7 @@ stdenv.mkDerivation rec {
     })
   ];
 
-  buildInputs =
-  [ pkg-config bison flex makeWrapper ];
+  nativeBuildInputs = [ pkg-config bison flex makeWrapper ];
 
   # Intercal invokes gcc, so we need an explicit PATH
   postInstall = ''
diff --git a/pkgs/development/compilers/opa/default.nix b/pkgs/development/compilers/opa/default.nix
index 1ee284e9f92..e4cd191683c 100644
--- a/pkgs/development/compilers/opa/default.nix
+++ b/pkgs/development/compilers/opa/default.nix
@@ -44,8 +44,8 @@ stdenv.mkDerivation rec {
 
   configureFlags = [ "-ocamlfind ${ocamlPackages.findlib}/bin/ocamlfind" ];
 
-  buildInputs = [ which perl jdk openssl coreutils zlib ncurses
-    makeWrapper gcc binutils gnumake nodejs
+  nativeBuildInputs = [ gcc binutils nodejs which makeWrapper ];
+  buildInputs = [ perl jdk openssl coreutils zlib ncurses
   ] ++ (with ocamlPackages; [
     ocaml findlib ssl camlzip ulex ocamlgraph camlp4
   ]);
diff --git a/pkgs/development/compilers/open-watcom/wrapper.nix b/pkgs/development/compilers/open-watcom/wrapper.nix
index 113df520b4f..fe787cbedbf 100644
--- a/pkgs/development/compilers/open-watcom/wrapper.nix
+++ b/pkgs/development/compilers/open-watcom/wrapper.nix
@@ -36,7 +36,7 @@ let
 
       paths = [ open-watcom ];
 
-      buildInputs = [ makeWrapper ];
+      nativeBuildInputs = [ makeWrapper ];
 
       postBuild = ''
         mkdir $out/bin
diff --git a/pkgs/development/compilers/opendylan/default.nix b/pkgs/development/compilers/opendylan/default.nix
index f9ab0714b47..283ee2dffe4 100644
--- a/pkgs/development/compilers/opendylan/default.nix
+++ b/pkgs/development/compilers/opendylan/default.nix
@@ -13,8 +13,9 @@ stdenv.mkDerivation {
     fetchSubmodules = true;
   };
 
+  nativeBuildInputs = [ makeWrapper autoconf automake ];
   buildInputs = (if stdenv.hostPlatform.system == "i686-linux" then [ mps ] else [ boehmgc ]) ++ [
-    opendylan-bootstrap boehmgc gnused autoconf automake perl makeWrapper
+    opendylan-bootstrap boehmgc perl
   ];
 
   preConfigure = if stdenv.hostPlatform.system == "i686-linux" then ''
diff --git a/pkgs/development/compilers/yosys/default.nix b/pkgs/development/compilers/yosys/default.nix
index 984678f689c..44f56d36602 100644
--- a/pkgs/development/compilers/yosys/default.nix
+++ b/pkgs/development/compilers/yosys/default.nix
@@ -56,7 +56,7 @@ let
     in lib.appendToName "with-plugins" ( symlinkJoin {
       inherit (yosys) name;
       paths = paths ++ [ yosys ] ;
-      buildInputs = [ makeWrapper ];
+      nativeBuildInputs = [ makeWrapper ];
       postBuild = ''
         wrapProgram $out/bin/yosys \
           --set NIX_YOSYS_PLUGIN_DIRS $out/share/yosys/plugins \
diff --git a/pkgs/development/idris-modules/idris-wrapper.nix b/pkgs/development/idris-modules/idris-wrapper.nix
index 68a1a0f267a..da20fa7a660 100644
--- a/pkgs/development/idris-modules/idris-wrapper.nix
+++ b/pkgs/development/idris-modules/idris-wrapper.nix
@@ -3,7 +3,7 @@
 symlinkJoin {
   inherit (idris-no-deps) name src meta;
   paths = [ idris-no-deps ];
-  buildInputs = [ makeWrapper ];
+  nativeBuildInputs = [ makeWrapper ];
   postBuild = ''
     wrapProgram $out/bin/idris \
       --run 'export IDRIS_CC=''${IDRIS_CC:-${stdenv.cc}/bin/cc}' \
diff --git a/pkgs/development/idris-modules/with-packages.nix b/pkgs/development/idris-modules/with-packages.nix
index 080cbe2778a..55bfd8c1575 100644
--- a/pkgs/development/idris-modules/with-packages.nix
+++ b/pkgs/development/idris-modules/with-packages.nix
@@ -10,7 +10,7 @@ lib.appendToName "with-packages" (symlinkJoin {
 
   paths = paths ++ [idris] ;
 
-  buildInputs = [ makeWrapper ];
+  nativeBuildInputs = [ makeWrapper ];
 
   postBuild = ''
     wrapProgram $out/bin/idris \
diff --git a/pkgs/development/interpreters/lfe/generic-builder.nix b/pkgs/development/interpreters/lfe/generic-builder.nix
index 2431199beaa..ada99e525c8 100644
--- a/pkgs/development/interpreters/lfe/generic-builder.nix
+++ b/pkgs/development/interpreters/lfe/generic-builder.nix
@@ -37,7 +37,7 @@ buildRebar3 {
 
   inherit src version;
 
-  buildInputs = [ erlang makeWrapper ];
+  nativeBuildInputs = [ makeWrapper erlang ];
   beamDeps    = [ proper ];
   patches     = [ ./fix-rebar-config.patch ./dedup-ebins.patch ] ++ patches;
   doCheck     = true;
diff --git a/pkgs/development/interpreters/maude/default.nix b/pkgs/development/interpreters/maude/default.nix
index 96a715cbbc7..da4df0fb79a 100644
--- a/pkgs/development/interpreters/maude/default.nix
+++ b/pkgs/development/interpreters/maude/default.nix
@@ -22,9 +22,9 @@ stdenv.mkDerivation {
     sha256 = "b112d7843f65217e3b5a9d40461698ef8dab7cbbe830af21216dfb924dc88a2f";
   };
 
-  nativeBuildInputs = [ unzip ];
+  nativeBuildInputs = [ flex bison unzip makeWrapper ];
   buildInputs = [
-    flex bison ncurses buddy tecla gmpxx libsigsegv makeWrapper cln yices
+    ncurses buddy tecla gmpxx libsigsegv cln yices
   ];
 
   hardeningDisable = [ "stackprotector" ] ++
diff --git a/pkgs/development/libraries/aspell/aspell-with-dicts.nix b/pkgs/development/libraries/aspell/aspell-with-dicts.nix
index 88b1302271f..fae94dbf08d 100644
--- a/pkgs/development/libraries/aspell/aspell-with-dicts.nix
+++ b/pkgs/development/libraries/aspell/aspell-with-dicts.nix
@@ -19,7 +19,7 @@ let
 
 in buildEnv {
   name = "aspell-env";
-  buildInputs = [ makeWrapper ];
+  nativeBuildInputs = [ makeWrapper ];
   paths = [ aspell ] ++ dicts;
   postBuild = ''
     # Construct wrappers in /bin
diff --git a/pkgs/development/libraries/gsignond/wrapper.nix b/pkgs/development/libraries/gsignond/wrapper.nix
index a4738e4b6a7..9b31a2213ce 100644
--- a/pkgs/development/libraries/gsignond/wrapper.nix
+++ b/pkgs/development/libraries/gsignond/wrapper.nix
@@ -5,7 +5,7 @@ symlinkJoin {
 
   paths = [ gsignond ] ++ plugins;
 
-  buildInputs = [ makeWrapper ];
+  nativeBuildInputs = [ makeWrapper ];
 
   postBuild = ''
     wrapProgram $out/bin/gsignond \
diff --git a/pkgs/development/libraries/vapoursynth/editor.nix b/pkgs/development/libraries/vapoursynth/editor.nix
index bbf65879d16..2b4b1d5767b 100644
--- a/pkgs/development/libraries/vapoursynth/editor.nix
+++ b/pkgs/development/libraries/vapoursynth/editor.nix
@@ -45,7 +45,7 @@ let
   withPlugins = plugins: let
     vapoursynthWithPlugins = vapoursynth.withPlugins plugins;
   in runCommand "${unwrapped.name}-with-plugins" {
-    buildInputs = [ makeWrapper ];
+    nativeBuildInputs = [ makeWrapper ];
     passthru = { withPlugins = plugins': withPlugins (plugins ++ plugins'); };
   } ''
     mkdir -p $out/bin
diff --git a/pkgs/development/lisp-modules-new/packages.nix b/pkgs/development/lisp-modules-new/packages.nix
index e858fa40288..0a6520df537 100644
--- a/pkgs/development/lisp-modules-new/packages.nix
+++ b/pkgs/development/lisp-modules-new/packages.nix
@@ -309,9 +309,8 @@ let
       sha256 = "12l7ir3q29v06jx0zng5cvlbmap7p709ka3ik6x29lw334qshm9b";
     };
 
+    nativeBuildInputs = [ pkgs.makeWrapper ];
     buildInputs = [
-      pkgs.makeWrapper
-
       # needed for GSETTINGS_SCHEMAS_PATH
       pkgs.gsettings-desktop-schemas pkgs.glib pkgs.gtk3
 
diff --git a/pkgs/development/mobile/androidenv/build-tools.nix b/pkgs/development/mobile/androidenv/build-tools.nix
index 641560f1992..3c6640c007f 100644
--- a/pkgs/development/mobile/androidenv/build-tools.nix
+++ b/pkgs/development/mobile/androidenv/build-tools.nix
@@ -2,8 +2,9 @@
 
 deployAndroidPackage {
   inherit package os;
-  buildInputs = [ makeWrapper ] ++
-    lib.optionals (os == "linux") [ autoPatchelfHook pkgs.glibc pkgs.zlib pkgs.ncurses5 pkgs_i686.glibc pkgs_i686.zlib pkgs_i686.ncurses5 pkgs.libcxx ];
+  nativeBuildInputs = [ makeWrapper ]
+    ++ lib.optionals (os == "linux") [ autoPatchelfHook ];
+  buildInputs = lib.optionals (os == "linux") [ pkgs.glibc pkgs.zlib pkgs.ncurses5 pkgs_i686.glibc pkgs_i686.zlib pkgs_i686.ncurses5 pkgs.libcxx ];
   patchInstructions = ''
     ${lib.optionalString (os == "linux") ''
       addAutoPatchelfSearchPath $packageBaseDir/lib
diff --git a/pkgs/development/mobile/androidenv/emulator.nix b/pkgs/development/mobile/androidenv/emulator.nix
index 94a76078c47..f68d51c75c3 100644
--- a/pkgs/development/mobile/androidenv/emulator.nix
+++ b/pkgs/development/mobile/androidenv/emulator.nix
@@ -2,9 +2,9 @@
 
 deployAndroidPackage {
   inherit package os;
-  buildInputs = [ makeWrapper ]
-    ++ lib.optionals (os == "linux") (with pkgs; [
-      autoPatchelfHook
+  nativeBuildInputs = [ makeWrapper ]
+    ++ lib.optionals (os == "linux") [ autoPatchelfHook ];
+  buildInputs = lib.optionals (os == "linux") (with pkgs; [
       glibc
       libcxx
       libGL
diff --git a/pkgs/development/mobile/androidenv/tools/25.nix b/pkgs/development/mobile/androidenv/tools/25.nix
index 5ce21a2fee3..28ea249df25 100644
--- a/pkgs/development/mobile/androidenv/tools/25.nix
+++ b/pkgs/development/mobile/androidenv/tools/25.nix
@@ -2,8 +2,8 @@
 
 deployAndroidPackage {
   name = "androidsdk";
-  buildInputs = [ autoPatchelfHook makeWrapper ]
-    ++ lib.optional (os == "linux") [ pkgs.glibc pkgs.xorg.libX11 pkgs.xorg.libXext pkgs.xorg.libXdamage pkgs.xorg.libxcb pkgs.xorg.libXfixes pkgs.xorg.libXrender pkgs.fontconfig.lib pkgs.freetype pkgs.libGL pkgs.zlib pkgs.ncurses5 pkgs.libpulseaudio pkgs_i686.glibc pkgs_i686.xorg.libX11 pkgs_i686.xorg.libXrender pkgs_i686.fontconfig pkgs_i686.freetype pkgs_i686.zlib ];
+  nativeBuildInputs = [ autoPatchelfHook makeWrapper ];
+  buildInputs = lib.optional (os == "linux") [ pkgs.glibc pkgs.xorg.libX11 pkgs.xorg.libXext pkgs.xorg.libXdamage pkgs.xorg.libxcb pkgs.xorg.libXfixes pkgs.xorg.libXrender pkgs.fontconfig.lib pkgs.freetype pkgs.libGL pkgs.zlib pkgs.ncurses5 pkgs.libpulseaudio pkgs_i686.glibc pkgs_i686.xorg.libX11 pkgs_i686.xorg.libXrender pkgs_i686.fontconfig pkgs_i686.freetype pkgs_i686.zlib ];
   inherit package os;
 
   patchInstructions = ''
diff --git a/pkgs/development/mobile/androidenv/tools/26.nix b/pkgs/development/mobile/androidenv/tools/26.nix
index 361e02661f3..2f4f88a7597 100644
--- a/pkgs/development/mobile/androidenv/tools/26.nix
+++ b/pkgs/development/mobile/androidenv/tools/26.nix
@@ -3,9 +3,10 @@
 deployAndroidPackage {
   name = "androidsdk";
   inherit os package;
-  buildInputs = [ makeWrapper ]
-    ++ lib.optional (os == "linux") (
-      (with pkgs; [ autoPatchelfHook glibc freetype fontconfig fontconfig.lib])
+  nativeBuildInputs = [ makeWrapper ]
+    ++ lib.optionals (os == "linux") [ autoPatchelfHook ];
+  buildInputs = lib.optional (os == "linux") (
+      (with pkgs; [ glibc freetype fontconfig fontconfig.lib])
       ++ (with pkgs.xorg; [ libX11 libXrender libXext ])
       ++ (with pkgs_i686; [ glibc xorg.libX11 xorg.libXrender xorg.libXext fontconfig.lib freetype zlib ])
     );
diff --git a/pkgs/development/python-modules/gtimelog/default.nix b/pkgs/development/python-modules/gtimelog/default.nix
index 5870f448db9..532481fbeeb 100644
--- a/pkgs/development/python-modules/gtimelog/default.nix
+++ b/pkgs/development/python-modules/gtimelog/default.nix
@@ -15,8 +15,8 @@ buildPythonPackage rec {
     sha256 = "0qv2kv7vc3qqlzxsisgg31cmrkkqgnmxspbj10c5fhdmwzzwi0i9";
   };
 
+  nativeBuildInputs = [ makeWrapper ];
   buildInputs = [
-    makeWrapper
     glibcLocales gobject-introspection gtk3 libsoup libsecret
   ];
 
diff --git a/pkgs/development/tools/build-managers/msbuild/default.nix b/pkgs/development/tools/build-managers/msbuild/default.nix
index 31c1b5dc521..f5b75f8e669 100644
--- a/pkgs/development/tools/build-managers/msbuild/default.nix
+++ b/pkgs/development/tools/build-managers/msbuild/default.nix
@@ -36,12 +36,12 @@ stdenv.mkDerivation rec {
     dotnet-sdk
     mono
     unzip
+    makeWrapper
   ];
 
   buildInputs = [
     dotnetPackages.Nuget
     glibcLocales
-    makeWrapper
   ];
 
   # https://github.com/NixOS/nixpkgs/issues/38991
diff --git a/pkgs/development/tools/eclipse-mat/default.nix b/pkgs/development/tools/eclipse-mat/default.nix
index dced6c6cde2..b90256f0333 100644
--- a/pkgs/development/tools/eclipse-mat/default.nix
+++ b/pkgs/development/tools/eclipse-mat/default.nix
@@ -79,7 +79,7 @@ stdenv.mkDerivation rec {
     mv $out/share/pixmaps/eclipse64.png $out/share/pixmaps/eclipse.png
   '';
 
-  nativeBuildInputs = [ unzip ];
+  nativeBuildInputs = [ unzip makeWrapper ];
   buildInputs = [
     fontconfig
     freetype
@@ -90,7 +90,6 @@ stdenv.mkDerivation rec {
     libX11
     libXrender
     libXtst
-    makeWrapper
     zlib
     shared-mime-info
     webkitgtk
diff --git a/pkgs/development/tools/haskell/ihaskell/wrapper.nix b/pkgs/development/tools/haskell/ihaskell/wrapper.nix
index 4a848231410..4572da6242a 100644
--- a/pkgs/development/tools/haskell/ihaskell/wrapper.nix
+++ b/pkgs/development/tools/haskell/ihaskell/wrapper.nix
@@ -14,7 +14,7 @@ let
 in
 buildEnv {
   name = "ihaskell-with-packages";
-  buildInputs = [ makeWrapper ];
+  nativeBuildInputs = [ makeWrapper ];
   paths = [ ihaskellEnv jupyter ];
   postBuild = ''
     ln -s ${ihaskellSh}/bin/ihaskell-notebook $out/bin/
diff --git a/pkgs/development/web/wml/default.nix b/pkgs/development/web/wml/default.nix
index ff3d20f16da..57892920c8d 100644
--- a/pkgs/development/web/wml/default.nix
+++ b/pkgs/development/web/wml/default.nix
@@ -23,8 +23,9 @@ perlPackages.buildPerlPackage {
     sed -i '/p2_mp4h\/doc/d' Makefile.in
   '';
 
+  nativeBuildInputs = [ makeWrapper ];
   buildInputs = with perlPackages;
-    [ perl TermReadKey GD BitVector ncurses lynx makeWrapper ImageSize ];
+    [ perl TermReadKey GD BitVector ncurses lynx ImageSize ];
 
   patches = [ ./redhat-with-thr.patch ./dynaloader.patch ./no_bitvector.patch ];
 
diff --git a/pkgs/games/frogatto/default.nix b/pkgs/games/frogatto/default.nix
index fa6b46e0751..e141b68e88d 100644
--- a/pkgs/games/frogatto/default.nix
+++ b/pkgs/games/frogatto/default.nix
@@ -18,7 +18,7 @@ let
 in buildEnv {
   name = "frogatto-${version}";
 
-  buildInputs = [ makeWrapper ];
+  nativeBuildInputs = [ makeWrapper ];
   paths = [ engine data desktopItem ];
   pathsToLink = [
     "/bin"
diff --git a/pkgs/games/megaglest/default.nix b/pkgs/games/megaglest/default.nix
index 6a21a74f70b..52949cf18aa 100644
--- a/pkgs/games/megaglest/default.nix
+++ b/pkgs/games/megaglest/default.nix
@@ -37,9 +37,9 @@ stdenv.mkDerivation {
     })
   ];
 
-  nativeBuildInputs = [ cmake pkg-config ];
-  buildInputs = [ git curl SDL2 xercesc openal lua libpng libjpeg libvlc wxGTK
-    glib cppunit fontconfig freetype ftgl glew libogg libvorbis makeWrapper libGLU ];
+  nativeBuildInputs = [ cmake pkg-config makeWrapper git ];
+  buildInputs = [ curl SDL2 xercesc openal lua libpng libjpeg libvlc wxGTK
+    glib cppunit fontconfig freetype ftgl glew libogg libvorbis libGLU ];
 
   cmakeFlags = [
     "-DCMAKE_INSTALL_PREFIX=$out"
diff --git a/pkgs/games/nanosaur/default.nix b/pkgs/games/nanosaur/default.nix
index 0d5ea528a92..4b250927526 100644
--- a/pkgs/games/nanosaur/default.nix
+++ b/pkgs/games/nanosaur/default.nix
@@ -12,10 +12,9 @@ stdenv.mkDerivation rec {
     fetchSubmodules = true;
   };
 
-  nativeBuildInputs = [ cmake ];
+  nativeBuildInputs = [ cmake makeWrapper ];
   buildInputs = [
     SDL2
-    makeWrapper
   ];
 
   configurePhase = ''
diff --git a/pkgs/games/space-cadet-pinball/default.nix b/pkgs/games/space-cadet-pinball/default.nix
index 0c991d727e2..3957bf4fc1b 100644
--- a/pkgs/games/space-cadet-pinball/default.nix
+++ b/pkgs/games/space-cadet-pinball/default.nix
@@ -33,11 +33,10 @@ stdenv.mkDerivation rec {
     })
   ];
 
-  nativeBuildInputs = [ cmake ];
+  nativeBuildInputs = [ cmake makeWrapper ];
   buildInputs = [
     SDL2
     SDL2_mixer
-    makeWrapper
   ] ++ lib.optional stdenv.isDarwin Cocoa;
 
   # Darwin needs a custom installphase since it is excluded from the cmake install
diff --git a/pkgs/games/stuntrally/default.nix b/pkgs/games/stuntrally/default.nix
index 537a3f83a03..706fd23c65c 100644
--- a/pkgs/games/stuntrally/default.nix
+++ b/pkgs/games/stuntrally/default.nix
@@ -37,7 +37,7 @@ stdenv.mkDerivation rec {
     ln -s ${tracks} data/tracks
   '';
 
-  nativeBuildInputs = [ cmake pkg-config ];
+  nativeBuildInputs = [ cmake pkg-config makeWrapper ];
   buildInputs = [
     boost
     ogre
@@ -45,7 +45,6 @@ stdenv.mkDerivation rec {
     ois
     SDL2
     libvorbis
-    makeWrapper
     enet
     libXcursor
     bullet
diff --git a/pkgs/games/xconq/default.nix b/pkgs/games/xconq/default.nix
index 2d28090c595..ee6748676bd 100644
--- a/pkgs/games/xconq/default.nix
+++ b/pkgs/games/xconq/default.nix
@@ -10,8 +10,8 @@ stdenv.mkDerivation rec {
     sha256 = "1za78yx57mgwcmmi33wx3533yz1x093dnqis8q2qmqivxav51lca";
   };
 
-  buildInputs = [ cpio xorgproto libX11 libXmu libXaw libXt tcl tk libXext
-    fontconfig makeWrapper ];
+  nativeBuildInputs = [ makeWrapper ];
+  buildInputs = [ cpio xorgproto libX11 libXmu libXaw libXt tcl tk libXext fontconfig ];
 
   configureFlags = [
     "--enable-alternate-scoresdir=scores"
diff --git a/pkgs/servers/slimserver/default.nix b/pkgs/servers/slimserver/default.nix
index 7296635c7dd..987e3770e98 100644
--- a/pkgs/servers/slimserver/default.nix
+++ b/pkgs/servers/slimserver/default.nix
@@ -21,8 +21,8 @@ perlPackages.buildPerlPackage rec {
     hash = "sha256-P4CSu/ff6i48uWV5gXsJgayZ1S1s0RAqa5O5y3Y0g9Y=";
   };
 
+  nativeBuildInputs = [ makeWrapper ];
   buildInputs = [
-    makeWrapper
     perlPackages.perl
     perlPackages.AnyEvent
     perlPackages.ArchiveZip
diff --git a/pkgs/servers/sql/postgresql/default.nix b/pkgs/servers/sql/postgresql/default.nix
index 83bdcec7397..f15c3dd73e1 100644
--- a/pkgs/servers/sql/postgresql/default.nix
+++ b/pkgs/servers/sql/postgresql/default.nix
@@ -176,7 +176,7 @@ let
         postgresql.lib
         postgresql.man   # in case user installs this into environment
     ];
-    buildInputs = [ makeWrapper ];
+    nativeBuildInputs = [ makeWrapper ];
 
 
     # We include /bin to ensure the $out/bin directory is created, which is
diff --git a/pkgs/servers/web-apps/discourse/mail_receiver/default.nix b/pkgs/servers/web-apps/discourse/mail_receiver/default.nix
index c1a3a2df106..139e6718ed5 100644
--- a/pkgs/servers/web-apps/discourse/mail_receiver/default.nix
+++ b/pkgs/servers/web-apps/discourse/mail_receiver/default.nix
@@ -11,8 +11,8 @@ stdenv.mkDerivation rec {
     sha256 = "0grifm5qyqazq63va3w26xjqnxwmfixhx0fx0zy7kd39378wwa6i";
   };
 
-  nativeBuildInputs = [ replace ];
-  buildInputs = [ ruby makeWrapper ];
+  nativeBuildInputs = [ replace makeWrapper ];
+  buildInputs = [ ruby ];
 
   dontBuild = true;
 
diff --git a/pkgs/tools/audio/gvolicon/default.nix b/pkgs/tools/audio/gvolicon/default.nix
index 7df594d88ec..fb9ef49c548 100644
--- a/pkgs/tools/audio/gvolicon/default.nix
+++ b/pkgs/tools/audio/gvolicon/default.nix
@@ -11,9 +11,9 @@ stdenv.mkDerivation {
     sha256 = "sha256-lm5OfryV1/1T1RgsVDdp0Jg5rh8AND8M3ighfrznKes=";
   };
 
-  nativeBuildInputs = [ pkg-config ];
+  nativeBuildInputs = [ pkg-config makeWrapper ];
   buildInputs = [
-    makeWrapper alsa-lib gtk3 gdk-pixbuf gnome.adwaita-icon-theme
+    alsa-lib gtk3 gdk-pixbuf gnome.adwaita-icon-theme
     librsvg wrapGAppsHook
   ];
 
diff --git a/pkgs/tools/backup/lvmsync/default.nix b/pkgs/tools/backup/lvmsync/default.nix
index e36e20902df..00a03cda714 100644
--- a/pkgs/tools/backup/lvmsync/default.nix
+++ b/pkgs/tools/backup/lvmsync/default.nix
@@ -4,7 +4,7 @@ stdenv.mkDerivation rec {
   pname = "lvmsync";
   version = (import ./gemset.nix).${pname}.version;
 
-  buildInputs = [ makeWrapper ];
+  nativeBuildInputs = [ makeWrapper ];
 
   dontUnpack = true;
 
diff --git a/pkgs/tools/filesystems/glusterfs/default.nix b/pkgs/tools/filesystems/glusterfs/default.nix
index 125fb01d88a..a1d09df7e60 100644
--- a/pkgs/tools/filesystems/glusterfs/default.nix
+++ b/pkgs/tools/filesystems/glusterfs/default.nix
@@ -14,9 +14,9 @@ let
   #       can help with finding new Python scripts.
 
   buildInputs = [
-    fuse bison flex openssl ncurses readline
-    libtool pkg-config zlib libaio libxml2
-    acl sqlite liburcu attr makeWrapper util-linux libtirpc gperftools
+    fuse openssl ncurses readline
+    zlib libaio libxml2
+    acl sqlite liburcu attr util-linux libtirpc gperftools
     liburing
     (python3.withPackages (pkgs: [
       pkgs.flask
@@ -106,7 +106,7 @@ in stdenv.mkDerivation rec {
     "--localstatedir=/var"
   ];
 
-  nativeBuildInputs = [ rpcsvc-proto autoconf automake ];
+  nativeBuildInputs = [ autoconf automake libtool pkg-config bison flex makeWrapper rpcsvc-proto ];
 
   makeFlags = [ "DESTDIR=$(out)" ];
 
diff --git a/pkgs/tools/networking/dd-agent/5.nix b/pkgs/tools/networking/dd-agent/5.nix
index 57ab6ed97b9..6feaec38f70 100644
--- a/pkgs/tools/networking/dd-agent/5.nix
+++ b/pkgs/tools/networking/dd-agent/5.nix
@@ -49,10 +49,8 @@ in stdenv.mkDerivation rec {
 
   patches = [ ./40103-iostat-fix.patch ];
 
-  nativeBuildInputs = [ unzip ];
-  buildInputs = [
-    makeWrapper
-  ] ++ (with python'.pkgs; [
+  nativeBuildInputs = [ unzip makeWrapper ];
+  buildInputs = with python'.pkgs; [
     requests
     psycopg2
     psutil
@@ -63,7 +61,7 @@ in stdenv.mkDerivation rec {
     python-etcd
     consul
     docker
-  ]);
+  ];
   propagatedBuildInputs = with python'.pkgs; [ python tornado ];
 
   buildCommand = ''
diff --git a/pkgs/tools/security/pass/default.nix b/pkgs/tools/security/pass/default.nix
index 7d214f1649a..f8692edead2 100644
--- a/pkgs/tools/security/pass/default.nix
+++ b/pkgs/tools/security/pass/default.nix
@@ -33,7 +33,8 @@ let
     in buildEnv {
       name = "pass-extensions-env";
       paths = selected;
-      buildInputs = [ makeWrapper ] ++ concatMap (x: x.buildInputs) selected;
+      nativeBuildInputs = [ makeWrapper ];
+      buildInputs = concatMap (x: x.buildInputs) selected;
 
       postBuild = ''
         files=$(find $out/bin/ -type f -exec readlink -f {} \;)