Merge pull request #108957 from stigtsp/maintainers/nix-generate-from-cpan-1

nix-generate-from-cpan: quote homepage, stdenv.lib -> lib
This commit is contained in:
stigo 2021-01-11 00:03:09 +01:00 committed by GitHub
commit 7d20329434
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

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