diff --git a/nixos/doc/manual/release-notes/rl-2103.xml b/nixos/doc/manual/release-notes/rl-2103.xml
index 41086e2220f0..f33b4ef919f0 100644
--- a/nixos/doc/manual/release-notes/rl-2103.xml
+++ b/nixos/doc/manual/release-notes/rl-2103.xml
@@ -477,6 +477,14 @@ self: super:
Other Notable Changes
+
+
+ stdenv.lib has been deprecated and will break
+ eval in 21.11. Please use pkgs.lib instead.
+ See #108938
+ for details.
+
+
The Mailman NixOS module (services.mailman) has a new
diff --git a/pkgs/development/libraries/hspell/default.nix b/pkgs/development/libraries/hspell/default.nix
index 67e593d27f4f..2a65afad809a 100644
--- a/pkgs/development/libraries/hspell/default.nix
+++ b/pkgs/development/libraries/hspell/default.nix
@@ -16,15 +16,15 @@ stdenv.mkDerivation rec {
};
patchPhase = "patchShebangs .";
- preBuild = stdenv.lib.optionalString (stdenv.hostPlatform != stdenv.buildPlatform) ''
+ preBuild = lib.optionalString (stdenv.hostPlatform != stdenv.buildPlatform) ''
make CC=${buildPackages.stdenv.cc}/bin/cc find_sizes
mv find_sizes find_sizes_build
make clean
substituteInPlace Makefile --replace "./find_sizes" "./find_sizes_build"
- substituteInPlace Makefile --replace "ar cr" "${stdenv.lib.getBin stdenv.cc.bintools.bintools}/bin/${stdenv.cc.targetPrefix}ar cr"
- substituteInPlace Makefile --replace "ranlib" "${stdenv.lib.getBin stdenv.cc.bintools.bintools}/bin/${stdenv.cc.targetPrefix}ranlib"
- substituteInPlace Makefile --replace "STRIP=strip" "STRIP=${stdenv.lib.getBin stdenv.cc.bintools.bintools}/bin/${stdenv.cc.targetPrefix}strip"
+ substituteInPlace Makefile --replace "ar cr" "${lib.getBin stdenv.cc.bintools.bintools}/bin/${stdenv.cc.targetPrefix}ar cr"
+ substituteInPlace Makefile --replace "ranlib" "${lib.getBin stdenv.cc.bintools.bintools}/bin/${stdenv.cc.targetPrefix}ranlib"
+ substituteInPlace Makefile --replace "STRIP=strip" "STRIP=${lib.getBin stdenv.cc.bintools.bintools}/bin/${stdenv.cc.targetPrefix}strip"
'';
nativeBuildInputs = [ perl zlib ];
# buildInputs = [ zlib ];
diff --git a/pkgs/development/tools/rust/cargo-valgrind/default.nix b/pkgs/development/tools/rust/cargo-valgrind/default.nix
index 138fc060568f..50cffe74848e 100644
--- a/pkgs/development/tools/rust/cargo-valgrind/default.nix
+++ b/pkgs/development/tools/rust/cargo-valgrind/default.nix
@@ -1,4 +1,5 @@
-{ stdenv
+{ lib
+, stdenv
, rustPlatform
, fetchFromGitHub
, nix-update-script
@@ -30,10 +31,10 @@ rustPlatform.buildRustPackage rec {
nativeBuildInputs = [ makeWrapper ];
postInstall = ''
- wrapProgram $out/bin/cargo-valgrind --prefix PATH : ${stdenv.lib.makeBinPath [ valgrind ]}
+ wrapProgram $out/bin/cargo-valgrind --prefix PATH : ${lib.makeBinPath [ valgrind ]}
'';
- meta = with stdenv.lib; {
+ meta = with lib; {
description = ''Cargo subcommand "valgrind": runs valgrind and collects its output in a helpful manner'';
homepage = "https://github.com/jfrimmel/cargo-valgrind";
license = with licenses; [ asl20 /* or */ mit ];
diff --git a/pkgs/servers/pleroma-otp/default.nix b/pkgs/servers/pleroma-otp/default.nix
index e66ae693a0e8..4905acd07577 100644
--- a/pkgs/servers/pleroma-otp/default.nix
+++ b/pkgs/servers/pleroma-otp/default.nix
@@ -1,4 +1,5 @@
-{ stdenv
+{ lib
+, stdenv
, autoPatchelfHook
, fetchurl
, file
@@ -60,11 +61,11 @@ stdenv.mkDerivation {
pleroma = nixosTests.pleroma;
};
- meta = {
+ meta = with lib; {
description = "ActivityPub microblogging server";
homepage = https://git.pleroma.social/pleroma/pleroma;
- license = stdenv.lib.licenses.agpl3;
- maintainers = with stdenv.lib.maintainers; [ ninjatrappeur ];
+ license = licenses.agpl3;
+ maintainers = with maintainers; [ ninjatrappeur ];
platforms = [ "x86_64-linux" "aarch64-linux" ];
};
}
diff --git a/pkgs/stdenv/generic/default.nix b/pkgs/stdenv/generic/default.nix
index c7c3bb9f3f3f..52d57a6decee 100644
--- a/pkgs/stdenv/generic/default.nix
+++ b/pkgs/stdenv/generic/default.nix
@@ -152,9 +152,12 @@ let
inherit lib config stdenv;
}) mkDerivation;
- # For convenience, bring in the library functions in lib/ so
- # packages don't have to do that themselves.
- inherit lib;
+ # Slated for deprecation in 21.11
+ lib = builtins.trace
+ ( "Warning: `stdenv.lib` is deprecated and will be removed in the next release."
+ + " Please use `pkgs.lib` instead."
+ + " For more information see https://github.com/NixOS/nixpkgs/issues/108938")
+ lib;
inherit fetchurlBoot;