summary refs log tree commit diff
diff options
context:
space:
mode:
authorSandro <sandro.jaeckel@gmail.com>2021-01-27 10:28:55 +0100
committerGitHub <noreply@github.com>2021-01-27 10:28:55 +0100
commitad97ca4e510a433e869a4e8d8a50744ed1e1b002 (patch)
tree8e331277e54b577223742de054c6093bc090eba8
parent2ee93d61ad2220199e8116526d485a8e23e9aee5 (diff)
parent3bbad8b041ce225eeb84b335c1cd1305b8c6f693 (diff)
downloadnixpkgs-ad97ca4e510a433e869a4e8d8a50744ed1e1b002.tar
nixpkgs-ad97ca4e510a433e869a4e8d8a50744ed1e1b002.tar.gz
nixpkgs-ad97ca4e510a433e869a4e8d8a50744ed1e1b002.tar.bz2
nixpkgs-ad97ca4e510a433e869a4e8d8a50744ed1e1b002.tar.lz
nixpkgs-ad97ca4e510a433e869a4e8d8a50744ed1e1b002.tar.xz
nixpkgs-ad97ca4e510a433e869a4e8d8a50744ed1e1b002.tar.zst
nixpkgs-ad97ca4e510a433e869a4e8d8a50744ed1e1b002.zip
Merge pull request #110912 from siraben/stdenv-lib-inherit
treewide: remove inherited stdenv.lib
-rw-r--r--pkgs/applications/editors/vim/macvim-configurable.nix3
-rw-r--r--pkgs/applications/gis/grass/default.nix4
-rw-r--r--pkgs/applications/misc/electrum/default.nix2
-rw-r--r--pkgs/applications/networking/irc/quassel/default.nix1
-rw-r--r--pkgs/applications/networking/remote/citrix-workspace/generic.nix4
-rw-r--r--pkgs/applications/science/logic/coq/default.nix3
-rw-r--r--pkgs/applications/video/epgstation/default.nix2
-rw-r--r--pkgs/development/compilers/gcc/10/default.nix2
-rw-r--r--pkgs/development/compilers/gcc/4.8/default.nix2
-rw-r--r--pkgs/development/compilers/gcc/4.9/default.nix2
-rw-r--r--pkgs/development/compilers/gcc/6/default.nix2
-rw-r--r--pkgs/development/compilers/gcc/7/default.nix2
-rw-r--r--pkgs/development/compilers/gcc/8/default.nix2
-rw-r--r--pkgs/development/compilers/gcc/9/default.nix2
-rw-r--r--pkgs/development/compilers/gcc/common/configure-flags.nix3
-rw-r--r--pkgs/development/compilers/gcc/common/extra-target-flags.nix4
-rw-r--r--pkgs/development/libraries/gpgme/default.nix3
-rw-r--r--pkgs/development/libraries/libsnark/default.nix3
-rw-r--r--pkgs/development/libraries/qt-5/5.12/default.nix2
-rw-r--r--pkgs/development/libraries/qt-5/5.14/default.nix6
-rw-r--r--pkgs/development/libraries/qt-5/5.15/default.nix6
-rw-r--r--pkgs/development/tools/profiling/systemtap/default.nix3
-rw-r--r--pkgs/development/web/nodejs/nodejs.nix2
-rw-r--r--pkgs/games/ue4/default.nix3
-rw-r--r--pkgs/servers/monitoring/prometheus/smokeping-prober.nix1
-rw-r--r--pkgs/servers/x11/xorg/overrides.nix4
-rw-r--r--pkgs/tools/graphics/wdisplays/default.nix4
-rw-r--r--pkgs/tools/misc/byobu/default.nix1
-rw-r--r--pkgs/tools/misc/staruml/default.nix1
-rw-r--r--pkgs/tools/misc/yubikey-manager-qt/default.nix5
-rw-r--r--pkgs/tools/networking/s6-networking/default.nix3
-rw-r--r--pkgs/tools/security/tor/default.nix2
32 files changed, 37 insertions, 52 deletions
diff --git a/pkgs/applications/editors/vim/macvim-configurable.nix b/pkgs/applications/editors/vim/macvim-configurable.nix
index 087a375c50c..6ea6b6c6094 100644
--- a/pkgs/applications/editors/vim/macvim-configurable.nix
+++ b/pkgs/applications/editors/vim/macvim-configurable.nix
@@ -1,4 +1,4 @@
-{ stdenv, callPackage, vimUtils, buildEnv, makeWrapper }:
+{ lib, stdenv, callPackage, vimUtils, buildEnv, makeWrapper }:
 
 let
   macvim = callPackage ./macvim.nix { inherit stdenv; };
@@ -12,7 +12,6 @@ let
     # sourcing of the user's vimrc. Use `customRC = "source $HOME/.vim/vimrc"`
     # if you want to preserve that behavior.
     configure = let
-      inherit (stdenv) lib;
       doConfig = config: let
         vimrcConfig = config // {
           # always source the bundled system vimrc
diff --git a/pkgs/applications/gis/grass/default.nix b/pkgs/applications/gis/grass/default.nix
index 65f42d7c53f..ef7458d7394 100644
--- a/pkgs/applications/gis/grass/default.nix
+++ b/pkgs/applications/gis/grass/default.nix
@@ -1,10 +1,8 @@
-{ stdenv, fetchFromGitHub, flex, bison, pkg-config, zlib, libtiff, libpng, fftw
+{ lib, stdenv, fetchFromGitHub, flex, bison, pkg-config, zlib, libtiff, libpng, fftw
 , cairo, readline, ffmpeg_3, makeWrapper, wxGTK30, netcdf, blas
 , proj, gdal, geos, sqlite, postgresql, libmysqlclient, python2Packages, libLAS, proj-datumgrid
 }:
 
-let inherit (stdenv) lib; in
-
 stdenv.mkDerivation rec {
   name = "grass";
   version = "7.6.1";
diff --git a/pkgs/applications/misc/electrum/default.nix b/pkgs/applications/misc/electrum/default.nix
index 5a3e6265c25..273077b3bda 100644
--- a/pkgs/applications/misc/electrum/default.nix
+++ b/pkgs/applications/misc/electrum/default.nix
@@ -125,7 +125,7 @@ python3.pkgs.buildPythonApplication {
   '';
 
   passthru.updateScript = import ./update.nix {
-    inherit (stdenv) lib;
+    inherit lib;
     inherit
       writeScript
       common-updater-scripts
diff --git a/pkgs/applications/networking/irc/quassel/default.nix b/pkgs/applications/networking/irc/quassel/default.nix
index 842e160677e..b72e28929e3 100644
--- a/pkgs/applications/networking/irc/quassel/default.nix
+++ b/pkgs/applications/networking/irc/quassel/default.nix
@@ -20,7 +20,6 @@
 }:
 
 let
-    inherit (stdenv) lib;
     buildClient = monolithic || client;
     buildCore = monolithic || enableDaemon;
 in
diff --git a/pkgs/applications/networking/remote/citrix-workspace/generic.nix b/pkgs/applications/networking/remote/citrix-workspace/generic.nix
index c0dc438daac..0437a108d89 100644
--- a/pkgs/applications/networking/remote/citrix-workspace/generic.nix
+++ b/pkgs/applications/networking/remote/citrix-workspace/generic.nix
@@ -1,4 +1,4 @@
-{ stdenv, requireFile, makeWrapper, autoPatchelfHook, wrapGAppsHook, which, more
+{ lib, stdenv, requireFile, makeWrapper, autoPatchelfHook, wrapGAppsHook, which, more
 , file, atk, alsaLib, cairo, fontconfig, gdk-pixbuf, glib, gnome3, gtk2-x11, gtk3
 , heimdal, krb5, libsoup, libvorbis, speex, openssl, zlib, xorg, pango, gtk2
 , gnome2, nss, nspr, gtk_engines, freetype, dconf, libpng12, libxml2
@@ -11,8 +11,6 @@
 }:
 
 let
-  inherit (stdenv) lib;
-
   openssl' = symlinkJoin {
     name = "openssl-backwards-compat";
     nativeBuildInputs = [ makeWrapper ];
diff --git a/pkgs/applications/science/logic/coq/default.nix b/pkgs/applications/science/logic/coq/default.nix
index a2ff8382947..66abfaebeef 100644
--- a/pkgs/applications/science/logic/coq/default.nix
+++ b/pkgs/applications/science/logic/coq/default.nix
@@ -13,7 +13,8 @@
 , csdp ? null
 , version, coq-version ? null,
 }@args:
-let lib = import ../../../../build-support/coq/extra-lib.nix {inherit (stdenv) lib;}; in
+let lib' = lib; in
+let lib = import ../../../../build-support/coq/extra-lib.nix {lib = lib';}; in
 with builtins; with lib;
 let
   release = {
diff --git a/pkgs/applications/video/epgstation/default.nix b/pkgs/applications/video/epgstation/default.nix
index 53a3535fde4..f1f89b10907 100644
--- a/pkgs/applications/video/epgstation/default.nix
+++ b/pkgs/applications/video/epgstation/default.nix
@@ -91,7 +91,7 @@ let
     # NOTE: this may take a while since it has to update all packages in
     # nixpkgs.nodePackages
     passthru.updateScript = import ./update.nix {
-      inherit (stdenv) lib;
+      inherit lib;
       inherit (src.meta) homepage;
       inherit
         pname
diff --git a/pkgs/development/compilers/gcc/10/default.nix b/pkgs/development/compilers/gcc/10/default.nix
index cbc4e0e09e9..ad945f21346 100644
--- a/pkgs/development/compilers/gcc/10/default.nix
+++ b/pkgs/development/compilers/gcc/10/default.nix
@@ -245,7 +245,7 @@ stdenv.mkDerivation ({
 
   inherit
     (import ../common/extra-target-flags.nix {
-      inherit stdenv crossStageStatic libcCross threadsCross;
+      inherit lib stdenv crossStageStatic libcCross threadsCross;
     })
     EXTRA_FLAGS_FOR_TARGET
     EXTRA_LDFLAGS_FOR_TARGET
diff --git a/pkgs/development/compilers/gcc/4.8/default.nix b/pkgs/development/compilers/gcc/4.8/default.nix
index 69fdeefe87a..6a2121a8298 100644
--- a/pkgs/development/compilers/gcc/4.8/default.nix
+++ b/pkgs/development/compilers/gcc/4.8/default.nix
@@ -271,7 +271,7 @@ stdenv.mkDerivation ({
 
   inherit
     (import ../common/extra-target-flags.nix {
-      inherit stdenv crossStageStatic libcCross threadsCross;
+      inherit lib stdenv crossStageStatic libcCross threadsCross;
     })
     EXTRA_FLAGS_FOR_TARGET
     EXTRA_LDFLAGS_FOR_TARGET
diff --git a/pkgs/development/compilers/gcc/4.9/default.nix b/pkgs/development/compilers/gcc/4.9/default.nix
index 4c0a144f14d..709288559d1 100644
--- a/pkgs/development/compilers/gcc/4.9/default.nix
+++ b/pkgs/development/compilers/gcc/4.9/default.nix
@@ -284,7 +284,7 @@ stdenv.mkDerivation ({
 
   inherit
     (import ../common/extra-target-flags.nix {
-      inherit stdenv crossStageStatic libcCross threadsCross;
+      inherit lib stdenv crossStageStatic libcCross threadsCross;
     })
     EXTRA_FLAGS_FOR_TARGET
     EXTRA_LDFLAGS_FOR_TARGET
diff --git a/pkgs/development/compilers/gcc/6/default.nix b/pkgs/development/compilers/gcc/6/default.nix
index 7d4cc2a3ea1..4cd9d24aa58 100644
--- a/pkgs/development/compilers/gcc/6/default.nix
+++ b/pkgs/development/compilers/gcc/6/default.nix
@@ -303,7 +303,7 @@ stdenv.mkDerivation ({
 
   inherit
     (import ../common/extra-target-flags.nix {
-      inherit stdenv crossStageStatic libcCross threadsCross;
+      inherit lib stdenv crossStageStatic libcCross threadsCross;
     })
     EXTRA_FLAGS_FOR_TARGET
     EXTRA_LDFLAGS_FOR_TARGET
diff --git a/pkgs/development/compilers/gcc/7/default.nix b/pkgs/development/compilers/gcc/7/default.nix
index 051307e4842..aac43a3564a 100644
--- a/pkgs/development/compilers/gcc/7/default.nix
+++ b/pkgs/development/compilers/gcc/7/default.nix
@@ -255,7 +255,7 @@ stdenv.mkDerivation ({
 
   inherit
     (import ../common/extra-target-flags.nix {
-      inherit stdenv crossStageStatic libcCross threadsCross;
+      inherit lib stdenv crossStageStatic libcCross threadsCross;
     })
     EXTRA_FLAGS_FOR_TARGET
     EXTRA_LDFLAGS_FOR_TARGET
diff --git a/pkgs/development/compilers/gcc/8/default.nix b/pkgs/development/compilers/gcc/8/default.nix
index 6a072267019..9fced5d94ae 100644
--- a/pkgs/development/compilers/gcc/8/default.nix
+++ b/pkgs/development/compilers/gcc/8/default.nix
@@ -240,7 +240,7 @@ stdenv.mkDerivation ({
 
   inherit
     (import ../common/extra-target-flags.nix {
-      inherit stdenv crossStageStatic libcCross threadsCross;
+      inherit lib stdenv crossStageStatic libcCross threadsCross;
     })
     EXTRA_FLAGS_FOR_TARGET
     EXTRA_LDFLAGS_FOR_TARGET
diff --git a/pkgs/development/compilers/gcc/9/default.nix b/pkgs/development/compilers/gcc/9/default.nix
index ea5172184cc..5e8e8fd6c6b 100644
--- a/pkgs/development/compilers/gcc/9/default.nix
+++ b/pkgs/development/compilers/gcc/9/default.nix
@@ -259,7 +259,7 @@ stdenv.mkDerivation ({
 
   inherit
     (import ../common/extra-target-flags.nix {
-      inherit stdenv crossStageStatic langD libcCross threadsCross;
+      inherit lib stdenv crossStageStatic langD libcCross threadsCross;
     })
     EXTRA_FLAGS_FOR_TARGET
     EXTRA_LDFLAGS_FOR_TARGET
diff --git a/pkgs/development/compilers/gcc/common/configure-flags.nix b/pkgs/development/compilers/gcc/common/configure-flags.nix
index 3f1866713e6..4bdec26fd99 100644
--- a/pkgs/development/compilers/gcc/common/configure-flags.nix
+++ b/pkgs/development/compilers/gcc/common/configure-flags.nix
@@ -39,8 +39,7 @@ assert langJava -> lib.versionOlder version "7";
 
 let
   inherit (stdenv)
-    buildPlatform hostPlatform targetPlatform
-    lib;
+    buildPlatform hostPlatform targetPlatform;
 
   crossMingw = targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt";
   crossDarwin = targetPlatform != hostPlatform && targetPlatform.libc == "libSystem";
diff --git a/pkgs/development/compilers/gcc/common/extra-target-flags.nix b/pkgs/development/compilers/gcc/common/extra-target-flags.nix
index 6ced56cedc0..ad4ab6bcb4b 100644
--- a/pkgs/development/compilers/gcc/common/extra-target-flags.nix
+++ b/pkgs/development/compilers/gcc/common/extra-target-flags.nix
@@ -1,7 +1,7 @@
-{ stdenv, crossStageStatic, langD ? false, libcCross, threadsCross }:
+{ lib, stdenv, crossStageStatic, langD ? false, libcCross, threadsCross }:
 
 let
-  inherit (stdenv) lib hostPlatform targetPlatform;
+  inherit (stdenv) hostPlatform targetPlatform;
 in
 
 {
diff --git a/pkgs/development/libraries/gpgme/default.nix b/pkgs/development/libraries/gpgme/default.nix
index 5b24955af43..51b259a3ca8 100644
--- a/pkgs/development/libraries/gpgme/default.nix
+++ b/pkgs/development/libraries/gpgme/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, fetchpatch
+{ lib, stdenv, fetchurl, fetchpatch
 , autoreconfHook, libgpgerror, gnupg, pkg-config, glib, pth, libassuan
 , file, which, ncurses
 , texinfo
@@ -8,7 +8,6 @@
 }:
 
 let
-  inherit (stdenv) lib;
   inherit (stdenv.hostPlatform) system;
 in
 
diff --git a/pkgs/development/libraries/libsnark/default.nix b/pkgs/development/libraries/libsnark/default.nix
index 3864a99f5e9..c3e6d0e049e 100644
--- a/pkgs/development/libraries/libsnark/default.nix
+++ b/pkgs/development/libraries/libsnark/default.nix
@@ -1,8 +1,7 @@
-{ stdenv, fetchFromGitHub, cmake, pkg-config, openssl, boost, gmp, procps }:
+{ lib, stdenv, fetchFromGitHub, cmake, pkg-config, openssl, boost, gmp, procps }:
 
 let
   rev = "9e6b19ff15bc19fba5da1707ba18e7f160e5ed07";
-  inherit (stdenv) lib;
 in stdenv.mkDerivation rec {
   name = "libsnark-pre${version}";
   version = lib.substring 0 8 rev;
diff --git a/pkgs/development/libraries/qt-5/5.12/default.nix b/pkgs/development/libraries/qt-5/5.12/default.nix
index cf5a0de11ad..320d30214d4 100644
--- a/pkgs/development/libraries/qt-5/5.12/default.nix
+++ b/pkgs/development/libraries/qt-5/5.12/default.nix
@@ -124,7 +124,7 @@ let
       # to avoid cyclic dependencies between Qt modules.
       mkDerivation =
         import ../mkDerivation.nix
-        { inherit (stdenv) lib; inherit debug; wrapQtAppsHook = null; }
+        { inherit lib; inherit debug; wrapQtAppsHook = null; }
         stdenvActual.mkDerivation;
     }
     { inherit self srcs patches; };
diff --git a/pkgs/development/libraries/qt-5/5.14/default.nix b/pkgs/development/libraries/qt-5/5.14/default.nix
index 7139a3b7354..14b99fab4e2 100644
--- a/pkgs/development/libraries/qt-5/5.14/default.nix
+++ b/pkgs/development/libraries/qt-5/5.14/default.nix
@@ -123,12 +123,12 @@ let
     import ../qtModule.nix
     {
       inherit perl;
-      inherit (stdenv) lib;
+      inherit lib;
       # Use a variant of mkDerivation that does not include wrapQtApplications
       # to avoid cyclic dependencies between Qt modules.
       mkDerivation =
         import ../mkDerivation.nix
-        { inherit (stdenv) lib; inherit debug; wrapQtAppsHook = null; }
+        { inherit lib; inherit debug; wrapQtAppsHook = null; }
         stdenvActual.mkDerivation;
     }
     { inherit self srcs patches; };
@@ -140,7 +140,7 @@ let
 
       mkDerivationWith =
         import ../mkDerivation.nix
-        { inherit (stdenv) lib; inherit debug; inherit (self) wrapQtAppsHook; };
+        { inherit lib; inherit debug; inherit (self) wrapQtAppsHook; };
 
       mkDerivation = mkDerivationWith stdenvActual.mkDerivation;
 
diff --git a/pkgs/development/libraries/qt-5/5.15/default.nix b/pkgs/development/libraries/qt-5/5.15/default.nix
index a3a0496f160..6b7f21c86e9 100644
--- a/pkgs/development/libraries/qt-5/5.15/default.nix
+++ b/pkgs/development/libraries/qt-5/5.15/default.nix
@@ -103,12 +103,12 @@ let
     import ../qtModule.nix
     {
       inherit perl;
-      inherit (stdenv) lib;
+      inherit lib;
       # Use a variant of mkDerivation that does not include wrapQtApplications
       # to avoid cyclic dependencies between Qt modules.
       mkDerivation =
         import ../mkDerivation.nix
-        { inherit (stdenv) lib; inherit debug; wrapQtAppsHook = null; }
+        { inherit lib; inherit debug; wrapQtAppsHook = null; }
         stdenvActual.mkDerivation;
     }
     { inherit self srcs patches; };
@@ -120,7 +120,7 @@ let
 
       mkDerivationWith =
         import ../mkDerivation.nix
-        { inherit (stdenv) lib; inherit debug; inherit (self) wrapQtAppsHook; };
+        { inherit lib; inherit debug; inherit (self) wrapQtAppsHook; };
 
       mkDerivation = mkDerivationWith stdenvActual.mkDerivation;
 
diff --git a/pkgs/development/tools/profiling/systemtap/default.nix b/pkgs/development/tools/profiling/systemtap/default.nix
index c978d8bd96a..c5d65a8239e 100644
--- a/pkgs/development/tools/profiling/systemtap/default.nix
+++ b/pkgs/development/tools/profiling/systemtap/default.nix
@@ -1,4 +1,4 @@
-{ fetchgit, pkg-config, gettext, runCommand, makeWrapper
+{ lib, fetchgit, pkg-config, gettext, runCommand, makeWrapper
 , elfutils, kernel, gnumake, python2, python2Packages
 }:
 
@@ -10,7 +10,6 @@ let
   version = "4.1";
 
   inherit (kernel) stdenv;
-  inherit (stdenv) lib;
 
   ## stap binaries
   stapBuild = stdenv.mkDerivation {
diff --git a/pkgs/development/web/nodejs/nodejs.nix b/pkgs/development/web/nodejs/nodejs.nix
index 1af4024400a..68232088fa9 100644
--- a/pkgs/development/web/nodejs/nodejs.nix
+++ b/pkgs/development/web/nodejs/nodejs.nix
@@ -132,7 +132,7 @@ in
 
     passthru.updateScript = import ./update.nix {
       inherit writeScript coreutils gnugrep jq curl common-updater-scripts gnupg nix runtimeShell;
-      inherit (stdenv) lib;
+      inherit lib;
       inherit majorVersion;
     };
 
diff --git a/pkgs/games/ue4/default.nix b/pkgs/games/ue4/default.nix
index 73b1cb38ca3..95f0d64f197 100644
--- a/pkgs/games/ue4/default.nix
+++ b/pkgs/games/ue4/default.nix
@@ -1,8 +1,7 @@
-{ stdenv, writeScript, fetchurl, requireFile, unzip, clang, mono, which,
+{ lib, stdenv, writeScript, fetchurl, requireFile, unzip, clang, mono, which,
   xorg, xdg-user-dirs }:
 
 let
-  inherit (stdenv) lib;
   deps = import ./cdn-deps.nix { inherit fetchurl; };
   linkDeps = writeScript "link-deps.sh" (lib.concatMapStringsSep "\n" (hash:
     let prefix = lib.concatStrings (lib.take 2 (lib.stringToCharacters hash));
diff --git a/pkgs/servers/monitoring/prometheus/smokeping-prober.nix b/pkgs/servers/monitoring/prometheus/smokeping-prober.nix
index f440be3f57a..b1c3bc6999f 100644
--- a/pkgs/servers/monitoring/prometheus/smokeping-prober.nix
+++ b/pkgs/servers/monitoring/prometheus/smokeping-prober.nix
@@ -1,7 +1,6 @@
 { lib, stdenv, buildGoModule, fetchFromGitHub, nixosTests }:
 
 let
-  inherit (stdenv) lib;
   baseVersion = "0.3.1";
   commit = "9ba85274dcc21bf8132cbe3b3dccfcb4aab57d9f";
 in
diff --git a/pkgs/servers/x11/xorg/overrides.nix b/pkgs/servers/x11/xorg/overrides.nix
index ddd05150806..54082ce8126 100644
--- a/pkgs/servers/x11/xorg/overrides.nix
+++ b/pkgs/servers/x11/xorg/overrides.nix
@@ -1,5 +1,5 @@
 { abiCompat ? null,
-  stdenv, makeWrapper, fetchurl, fetchpatch, fetchFromGitLab, buildPackages,
+  lib, stdenv, makeWrapper, fetchurl, fetchpatch, fetchFromGitLab, buildPackages,
   automake, autoconf, gettext, libiconv, libtool, intltool,
   freetype, tradcpp, fontconfig, meson, ninja, ed, fontforge,
   libGL, spice-protocol, zlib, libGLU, dbus, libunwind, libdrm,
@@ -9,7 +9,7 @@
 }:
 
 let
-  inherit (stdenv) lib isDarwin;
+  inherit (stdenv) isDarwin;
   inherit (lib) overrideDerivation;
 
   malloc0ReturnsNullCrossFlag = lib.optional
diff --git a/pkgs/tools/graphics/wdisplays/default.nix b/pkgs/tools/graphics/wdisplays/default.nix
index cbcacfab3a8..2640769d186 100644
--- a/pkgs/tools/graphics/wdisplays/default.nix
+++ b/pkgs/tools/graphics/wdisplays/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchFromGitHub, meson, ninja, pkg-config, gtk3, epoxy, wayland, wrapGAppsHook
+{ lib, stdenv, fetchFromGitHub, meson, ninja, pkg-config, gtk3, epoxy, wayland, wrapGAppsHook
 , fetchpatch
 }:
 
@@ -26,7 +26,7 @@ stdenv.mkDerivation rec {
     })
   ];
 
-  meta = let inherit (stdenv) lib; in {
+  meta = with lib; {
     description = "A graphical application for configuring displays in Wayland compositors";
     homepage = "https://github.com/cyclopsian/wdisplays";
     maintainers = with lib.maintainers; [ lheckemann ma27 ];
diff --git a/pkgs/tools/misc/byobu/default.nix b/pkgs/tools/misc/byobu/default.nix
index 2008cf7b207..c647d3b3902 100644
--- a/pkgs/tools/misc/byobu/default.nix
+++ b/pkgs/tools/misc/byobu/default.nix
@@ -3,7 +3,6 @@
 , gettext, vim, bc, screen }:
 
 let
-  inherit (stdenv) lib;
   pythonEnv = python3.withPackages (ps: with ps; [ snack ]);
 in
 stdenv.mkDerivation rec {
diff --git a/pkgs/tools/misc/staruml/default.nix b/pkgs/tools/misc/staruml/default.nix
index b6a78f85a35..db3a065fdf4 100644
--- a/pkgs/tools/misc/staruml/default.nix
+++ b/pkgs/tools/misc/staruml/default.nix
@@ -4,7 +4,6 @@
 , libXdamage, expat }:
 
 let
-  inherit (stdenv) lib;
   LD_LIBRARY_PATH = lib.makeLibraryPath
     [ glib gtk2 gdk-pixbuf alsaLib nss nspr GConf cups libgcrypt dbus libXdamage expat ];
 in
diff --git a/pkgs/tools/misc/yubikey-manager-qt/default.nix b/pkgs/tools/misc/yubikey-manager-qt/default.nix
index fd6610a1973..0f81f132abd 100644
--- a/pkgs/tools/misc/yubikey-manager-qt/default.nix
+++ b/pkgs/tools/misc/yubikey-manager-qt/default.nix
@@ -1,4 +1,5 @@
-{ stdenv
+{ lib
+, stdenv
 , fetchurl
 , wrapQtAppsHook
 , pcsclite
@@ -16,8 +17,6 @@
 , yubikey-personalization
 }:
 
-let inherit (stdenv) lib; in
-
 stdenv.mkDerivation rec {
   pname = "yubikey-manager-qt";
   version = "1.1.5";
diff --git a/pkgs/tools/networking/s6-networking/default.nix b/pkgs/tools/networking/s6-networking/default.nix
index 3f10b850ca7..e7dd075df13 100644
--- a/pkgs/tools/networking/s6-networking/default.nix
+++ b/pkgs/tools/networking/s6-networking/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, skawarePackages
+{ lib, stdenv, skawarePackages
 
 # Whether to build the TLS/SSL tools and what library to use
 # acceptable values: "libressl", false
@@ -8,7 +8,6 @@
 
 with skawarePackages;
 let
-  inherit (stdenv) lib;
   sslSupportEnabled = sslSupport != false;
   sslLibs = {
     libressl = libressl;
diff --git a/pkgs/tools/security/tor/default.nix b/pkgs/tools/security/tor/default.nix
index b4adbfe8c64..ca68f8b71fc 100644
--- a/pkgs/tools/security/tor/default.nix
+++ b/pkgs/tools/security/tor/default.nix
@@ -73,7 +73,7 @@ stdenv.mkDerivation rec {
   passthru = {
     tests.tor = nixosTests.tor;
     updateScript = import ./update.nix {
-      inherit (stdenv) lib;
+      inherit lib;
       inherit
         writeScript
         common-updater-scripts