19 Aug 2022 |
stigo | Software Foundation; either version 1, or (at your option) any
later version, or```
| 13:59:43 |
stigo | * Software Foundation; either version 1, or (at your option) any
later version, or`
| 13:59:52 |
@janne.hess:helsinki-systems.de | alright, that helps | 13:59:57 |
stigo | https://metacpan.org/dist/Software-License/source/lib/Software/License/Perl_5.pm | 14:00:06 |
@janne.hess:helsinki-systems.de | (I'm currently writing a meta generator for all perl packages) | 14:00:09 |
stigo | (silly matrix paste) | 14:00:11 |
stigo | So for gpl: " the GNU General Public License as published by the Free Software Foundation; either version 1, or (at your option) any
later version" | 14:00:43 |
stigo | * So for gpl: " the GNU General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version" | 14:00:48 |
@janne.hess:helsinki-systems.de | In reply to @stigo:matrix.org https://metacpan.org/dist/Software-License/source/lib/Software/License/Perl_5.pm That module has conflicting info as it depends on Software::License::GPL_1 rather than Software::License::GPL_1::or_later | 14:00:50 |
stigo | I guess LICENSE section here will be the correct one, not sure about the dependency tree for Software::License:. https://metacpan.org/release/RJBS/perl-5.36.0/source/README | 14:02:24 |
@janne.hess:helsinki-systems.de | thanks, that's probably the best source available | 14:02:49 |
stigo | That covers the majority of perl modules as they defer the licence to what perl is using. | 14:03:24 |
@janne.hess:helsinki-systems.de | yeah I saw the license is just called perl-5 | 14:03:39 |
@janne.hess:helsinki-systems.de | * yeah I saw the license is just called perl_5 | 14:03:41 |
stigo | ... sometimes :D | 14:03:47 |
stigo | The licence mapping just just copied from maintainers/scripts/nix-generate-from-cpan.pl | 14:05:27 |
@janne.hess:helsinki-systems.de | found a bug in nix-update-cpan :/ | 14:05:59 |
@janne.hess:helsinki-systems.de | it calls the constant-defer library defer when I do --list-nix-file | 14:06:14 |
stigo | oh | 14:06:52 |
@janne.hess:helsinki-systems.de | @@ -119,7 +119,7 @@ sub parse_nix_file($nix_file, $cb=undef) { # Parses a perl-packages.nix file
my $nix = Mojo::File->new($nix_file)->slurp;
my (@ret);
- while ($nix =~ m/((\w+)\s+=\s+buildPerl(Package|Module)\s+(?:rec)?\s*)
+ while ($nix =~ m/(([^\s]+)\s+=\s+buildPerl(Package|Module)\s+(?:rec)?\s*)
($RE{balanced}{-parens=>'{}'})/gx) {
my ($prepart, $attrname, $build_fun, $part) = ($1, $2, $3, $4);
if ($cb) {
| 14:07:58 |
@janne.hess:helsinki-systems.de | not sure if that is too open though | 14:08:02 |
stigo |
| 14:08:15 |
stigo | * @@ -118,7 +118,7 @@ sub parse_nix_file($nix_file, $cb=undef) { # Parses a perl-packages.nix file
my $nix = Mojo::File->new($nix_file)->slurp;
my (@ret);
- while ($nix =~ m/((\w+)\s+=\s+buildPerl(Package|Module)\s+(?:rec)?\s*)
+ while ($nix =~ m/(([\w-]+)\s+=\s+buildPerl(Package|Module)\s+(?:rec)?\s*)
($RE{balanced}{-parens=>'{}'})/gx) {
my ($prepart, $attrname, $build_fun, $part) = ($1, $2, $3, $4);
if ($cb) {
| 14:08:20 |
stigo | \w is probably too open too | 14:08:43 |
@janne.hess:helsinki-systems.de | yeah your whitelist approach is probably better than my blacklist approach | 14:08:44 |
stigo | allowlist you mean? :) | 14:08:54 |
@janne.hess:helsinki-systems.de | In reply to @stigo:matrix.org \w is probably too open too okay what is an identifier :/ | 14:08:58 |
stigo | [A-Za-z0-9_-] is probably better | 14:09:20 |
stigo | prefer being explicit when matching stuff | 14:09:34 |
stigo | but would be nicer to get the code from nix itself i think | 14:09:53 |