diff --git a/pkgs/stdenv/generic/default.nix b/pkgs/stdenv/generic/default.nix index 0b1003a7392..f8aff33a327 100644 --- a/pkgs/stdenv/generic/default.nix +++ b/pkgs/stdenv/generic/default.nix @@ -49,7 +49,7 @@ let # Add a utility function to produce derivations that use this # stdenv and its shell. mkDerivation = attrs: - if !allowUnfree && (let l = attrs.meta.license or ""; in l == "unfree" || l == "unfree-redistributable") then + if !allowUnfree && (let l = lib.lists.toList attrs.meta.license or []; in lib.lists.elem "unfree" l || lib.lists.elem "unfree-redistributable" l) then throw "package ‘${attrs.name}’ has an unfree license, refusing to evaluate" else lib.addPassthru (derivation (