diff options
author | William A. Kennington III <william@wkennington.com> | 2015-08-28 17:55:20 -0700 |
---|---|---|
committer | William A. Kennington III <william@wkennington.com> | 2015-08-28 17:55:20 -0700 |
commit | 5ca1c32a9d3705b36caef94bd8a8628a81c2d210 (patch) | |
tree | 0baaad6405c8483726accb0b28c7aa5ffbea068b /pkgs/stdenv | |
parent | 28a18999faeab25b92649027f4411e7f41d793da (diff) | |
parent | d2dce19793069b6104ff7df29af92316e7fe3b50 (diff) |
Merge branch 'master.upstream' into staging.upstream
Diffstat (limited to 'pkgs/stdenv')
-rw-r--r-- | pkgs/stdenv/generic/default.nix | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/pkgs/stdenv/generic/default.nix b/pkgs/stdenv/generic/default.nix index fe7bec54ba02b..249e4845bc280 100644 --- a/pkgs/stdenv/generic/default.nix +++ b/pkgs/stdenv/generic/default.nix @@ -27,7 +27,7 @@ let lib.lists.all (license: let l = lib.licenses.${license.shortName or "BROKEN"} or false; in if license == l then true else - throw ''‘${builtins.toJSON license}’ is not an attribute of lib.licenses'' + throw ''‘${showLicense license}’ is not an attribute of lib.licenses'' ) list; mutuallyExclusive = a: b: @@ -73,6 +73,8 @@ let isUnfree (lib.lists.toList attrs.meta.license) && !allowUnfreePredicate attrs; + showLicense = license: license.shortName or "unknown"; + defaultNativeBuildInputs = extraBuildInputs ++ [ ../../build-support/setup-hooks/move-docs.sh ../../build-support/setup-hooks/compress-man-pages.sh @@ -121,9 +123,9 @@ let licenseAllowed = attrs: if hasDeniedUnfreeLicense attrs && !(hasWhitelistedLicense attrs) then - throwEvalHelp "Unfree" "has an unfree license ‘${builtins.toJSON attrs.meta.license}’ which is not whitelisted" + throwEvalHelp "Unfree" "has an unfree license (‘${showLicense attrs.meta.license}’)" else if hasBlacklistedLicense attrs then - throwEvalHelp "blacklisted" "has the ‘${builtins.toJSON attrs.meta.license}’ license which is blacklisted" + throwEvalHelp "blacklisted" "has a blacklisted license (‘${showLicense attrs.meta.license}’)" else if !allowBroken && attrs.meta.broken or false then throwEvalHelp "Broken" "is marked as broken" else if !allowBroken && attrs.meta.platforms or null != null && !lib.lists.elem result.system attrs.meta.platforms then |