3
0
Fork 0
forked from mirrors/nixpkgs

Merge pull request #193415 from risicle/ris-nixpkgs-allow-nonsource-fix-1

stdenv/check-meta: fix support for `NIXPKGS_ALLOW_NONSOURCE=1`
This commit is contained in:
Robert Scott 2022-10-15 01:25:44 +01:00 committed by GitHub
commit 692512da6a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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 [];