mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-24 03:43:53 +03:00
Small fix in handling of "unfree" meta.license attributes
meta.license is can be a string or a list of strings. But there is one unhandled case where "unfree" (or "unfree-redistributable") is a part of a list. It will currently not be detected as an "unfree" package and Hydra will attempt to build it. This should fix it. Example: http://hydra.nixos.org/build/6553461
This commit is contained in:
parent
0a4d53cc5e
commit
fc687b393f
@ -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 (
|
||||
|
Loading…
Reference in New Issue
Block a user