Merge pull request #111447 from siraben/stdenv-lib-alias-throw

stdenv/generic: throw when using stdenv.lib and disallowing aliases
This commit is contained in:
Jan Tojnar 2021-02-07 02:15:59 +01:00 committed by GitHub
commit 2d30bf830b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -153,11 +153,11 @@ let
}) mkDerivation; }) mkDerivation;
# Slated for deprecation in 21.11 # Slated for deprecation in 21.11
lib = builtins.trace lib = if config.allowAlises then builtins.trace
( "Warning: `stdenv.lib` is deprecated and will be removed in the next release." ( "Warning: `stdenv.lib` is deprecated and will be removed in the next release."
+ " Please use `pkgs.lib` instead." + " Please use `pkgs.lib` instead."
+ " For more information see https://github.com/NixOS/nixpkgs/issues/108938") + " For more information see https://github.com/NixOS/nixpkgs/issues/108938")
lib; lib else throw "`stdenv.lib` is a deprecated alias for `pkgs.lib`";
inherit fetchurlBoot; inherit fetchurlBoot;