Fallback to LicenseRef-OtherLicense on unknown license.
commitc0cb0756df147e5f2bb3d85684c664aab2140e3a
authorJean-Baptiste Giraudeau <jb@giraudeau.info>
dateFri 25 Jan 2019, 11:19 (8 years ago)
parent7c7d9f3
builder/comp-builder.nix+5−1
@@ -159,7 +159,11 @@ in stdenv.mkDerivation ({
159159 meta = {
160160 homepage = package.homepage;
161161 description = package.synopsis;
162− license = (import ../lib/cabal-licenses.nix lib).${package.license};
162+ license =
163+ let
164+ license-map = import ../lib/cabal-licenses.nix lib;
165+ in license-map.${package.license} or
166+ (builtins.trace "WARNING: license \"${package.license}\" not found" license-map.LicenseRef-OtherLicense);
163167 };
164168
165169 CABAL_CONFIG = configFiles + /cabal.config;