3
0
Fork 0
forked from mirrors/nixpkgs

stdenv/check-meta: fix support for NIXPKGS_ALLOW_NONSOURCE=1

This commit is contained in:
Robert Scott 2022-09-28 23:18:33 +01:00
parent ca6034728b
commit d02ac63f4f

View file

@ -16,8 +16,11 @@ let
allowUnfree = config.allowUnfree
|| builtins.getEnv "NIXPKGS_ALLOW_UNFREE" == "1";
allowNonSource = config.allowNonSource or true
&& builtins.getEnv "NIXPKGS_ALLOW_NONSOURCE" != "0";
allowNonSource = let
envVar = builtins.getEnv "NIXPKGS_ALLOW_NONSOURCE";
in if envVar != ""
then envVar != "0"
else config.allowNonSource or true;
allowlist = config.allowlistedLicenses or config.whitelistedLicenses or [];
blocklist = config.blocklistedLicenses or config.blacklistedLicenses or [];