nix-generate-from-cpan: quote homepage, stdenv.lib -> lib

This commit is contained in:
Stig Palmquist 2021-01-10 16:13:57 +01:00
parent 9f8b7cb4a8
commit f12ad54760

View File

@ -309,7 +309,7 @@ sub render_license {
# "GPL v2" or to "GPL v2 or later".
my $amb = 0;
# Whether the license is available inside `stdenv.lib.licenses`.
# Whether the license is available inside `lib.licenses`.
my $in_set = 1;
my $nix_license = $LICENSE_MAP{$cpan_license};
@ -331,7 +331,7 @@ sub render_license {
# Avoid defining the license line.
}
elsif ($in_set) {
my $lic = 'stdenv.lib.licenses';
my $lic = 'lib.licenses';
if ( @$licenses == 1 ) {
$license_line = "$lic.$licenses->[0]";
}
@ -449,7 +449,7 @@ print <<EOF;
meta = {
EOF
print <<EOF if defined $homepage;
homepage = $homepage;
homepage = "$homepage";
EOF
print <<EOF if defined $description && $description ne "Unknown";
description = "$description";