summary refs log tree commit diff
path: root/pkgs/stdenv
diff options
context:
space:
mode:
authorBenjamin Hipple <bhipple@protonmail.com>2018-09-23 12:45:03 -0400
committerBenjamin Hipple <bhipple@protonmail.com>2018-09-23 12:48:02 -0400
commit0b9d9ab256012a9007695a174895e9d32eca809d (patch)
tree569c3861a8ae63bd0c1afc2b60b001cfcf43c885 /pkgs/stdenv
parent243cdbf24e27985c78d5bcec482bf938e514e693 (diff)
downloadnixlib-0b9d9ab256012a9007695a174895e9d32eca809d.tar
nixlib-0b9d9ab256012a9007695a174895e9d32eca809d.tar.gz
nixlib-0b9d9ab256012a9007695a174895e9d32eca809d.tar.bz2
nixlib-0b9d9ab256012a9007695a174895e9d32eca809d.tar.lz
nixlib-0b9d9ab256012a9007695a174895e9d32eca809d.tar.xz
nixlib-0b9d9ab256012a9007695a174895e9d32eca809d.tar.zst
nixlib-0b9d9ab256012a9007695a174895e9d32eca809d.zip
Remove dead code from stdenv check-meta license logic
The `unfree` and `unfreeRedistributable` licenses both have `free = false`,
which will trigger the first portion of logic. This removes dead code to
simplify the logic.

As a follow-up, I plan to add an attribute `redistributable = [true|false]`,
which can be used by Hydra to determine whether a given package with a given
license can be included in the channel.
Diffstat (limited to 'pkgs/stdenv')
-rw-r--r--pkgs/stdenv/generic/check-meta.nix5
1 files changed, 2 insertions, 3 deletions
diff --git a/pkgs/stdenv/generic/check-meta.nix b/pkgs/stdenv/generic/check-meta.nix
index 28b69f5c2dc9..26cd9f8beb96 100644
--- a/pkgs/stdenv/generic/check-meta.nix
+++ b/pkgs/stdenv/generic/check-meta.nix
@@ -42,8 +42,7 @@ let
   allowUnsupportedSystem = config.allowUnsupportedSystem or false
     || builtins.getEnv "NIXPKGS_ALLOW_UNSUPPORTED_SYSTEM" == "1";
 
-  isUnfree = licenses: lib.lists.any (l:
-    !l.free or true || l == "unfree" || l == "unfree-redistributable") licenses;
+  isUnfree = licenses: lib.lists.any (l: !l.free or true) licenses;
 
   # Alow granular checks to allow only some unfree packages
   # Example:
@@ -56,7 +55,7 @@ let
 
   # Check whether unfree packages are allowed and if not, whether the
   # package has an unfree license and is not explicitely allowed by the
-  # `allowUNfreePredicate` function.
+  # `allowUnfreePredicate` function.
   hasDeniedUnfreeLicense = attrs:
     !allowUnfree &&
     hasLicense attrs &&