about summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorJohn Ericson <git@JohnEricson.me>2021-01-30 22:28:05 -0500
committerGitHub <noreply@github.com>2021-01-30 22:28:05 -0500
commit6717246373541f92ac8d044c6ad1224700686a47 (patch)
treed881aac7e251d4706cb4a8a86960ef30b0a03d76 /pkgs
parent8468a9878cefabeda552695f8ee9fac217c770b0 (diff)
parent227693ed69a03605d7b9d5e051f2158aaf8cbe3c (diff)
Merge pull request #111284 from siraben/remove-new-stdenv-lib
stdenv: warn about use of inherited lib
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/development/libraries/hspell/default.nix8
-rw-r--r--pkgs/development/tools/rust/cargo-valgrind/default.nix7
-rw-r--r--pkgs/servers/pleroma-otp/default.nix9
-rw-r--r--pkgs/stdenv/generic/default.nix9
4 files changed, 19 insertions, 14 deletions
diff --git a/pkgs/development/libraries/hspell/default.nix b/pkgs/development/libraries/hspell/default.nix
index 67e593d27f4fc..2a65afad809a8 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 138fc060568fd..50cffe74848ed 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 e66ae693a0e81..4905acd075773 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 c7c3bb9f3f3f9..52d57a6decee3 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;