nix-generate-from-cpan: Don't quote names that don't need it

This commit is contained in:
Eelco Dolstra 2016-03-03 11:51:49 +01:00
parent aa564c9ed0
commit 50b950fe8d

View file

@ -431,7 +431,7 @@ my $build_fun = -e "$pkg_path/Build.PL"
print STDERR "===\n";
print <<EOF;
"$attr_name" = $build_fun rec {
${\(is_reserved($attr_name) ? "\"$attr_name\"" : $attr_name)} = $build_fun rec {
name = "$pkg_name";
src = fetchurl {
url = "mirror://cpan/${\$module->path}/\${name}.${\$module->package_extension}";
@ -450,7 +450,7 @@ EOF
print <<EOF if defined $homepage;
homepage = $homepage;
EOF
print <<EOF if defined $description;
print <<EOF if defined $description && $description ne "Unknown";
description = "$description";
EOF
print <<EOF if defined $license;