Merge pull request #47230 from bhipple/fix/licenses
Remove dead code from stdenv check-meta license logic
This commit is contained in:
@@ -42,8 +42,7 @@ let
|
|||||||
allowUnsupportedSystem = config.allowUnsupportedSystem or false
|
allowUnsupportedSystem = config.allowUnsupportedSystem or false
|
||||||
|| builtins.getEnv "NIXPKGS_ALLOW_UNSUPPORTED_SYSTEM" == "1";
|
|| builtins.getEnv "NIXPKGS_ALLOW_UNSUPPORTED_SYSTEM" == "1";
|
||||||
|
|
||||||
isUnfree = licenses: lib.lists.any (l:
|
isUnfree = licenses: lib.lists.any (l: !l.free or true) licenses;
|
||||||
!l.free or true || l == "unfree" || l == "unfree-redistributable") licenses;
|
|
||||||
|
|
||||||
# Alow granular checks to allow only some unfree packages
|
# Alow granular checks to allow only some unfree packages
|
||||||
# Example:
|
# Example:
|
||||||
@@ -56,7 +55,7 @@ let
|
|||||||
|
|
||||||
# Check whether unfree packages are allowed and if not, whether the
|
# Check whether unfree packages are allowed and if not, whether the
|
||||||
# package has an unfree license and is not explicitely allowed by the
|
# package has an unfree license and is not explicitely allowed by the
|
||||||
# `allowUNfreePredicate` function.
|
# `allowUnfreePredicate` function.
|
||||||
hasDeniedUnfreeLicense = attrs:
|
hasDeniedUnfreeLicense = attrs:
|
||||||
!allowUnfree &&
|
!allowUnfree &&
|
||||||
hasLicense attrs &&
|
hasLicense attrs &&
|
||||||
|
|||||||
Reference in New Issue
Block a user