!sUXcTulPzyhnqOiFPL:helsinki-systems.de

NixOS Perl

46 Members
12 Servers

Load older messages


SenderMessageTime
19 Aug 2022
@janne.hess:helsinki-systems.de@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@janne.hess:helsinki-systems.denot sure if that is too open though14:08:02
@stigo:matrix.orgstigo
14:08:15
@stigo:matrix.orgstigo *
@@ -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:matrix.orgstigo \w is probably too open too 14:08:43
@janne.hess:helsinki-systems.de@janne.hess:helsinki-systems.deyeah your whitelist approach is probably better than my blacklist approach14:08:44
@stigo:matrix.orgstigoallowlist you mean? :)14:08:54
@janne.hess:helsinki-systems.de@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:matrix.orgstigo[A-Za-z0-9_-] is probably better14:09:20
@stigo:matrix.orgstigoprefer being explicit when matching stuff14:09:34
@stigo:matrix.orgstigobut would be nicer to get the code from nix itself i think14:09:53
@stigo:matrix.orgstigorather than parsing it with regexps, if that's possible14:10:13
@stigo:matrix.orgstigo(oh, the attributes can be optionally quoted too...)14:11:05
@janne.hess:helsinki-systems.de@janne.hess:helsinki-systems.de
In reply to @stigo:matrix.org
rather than parsing it with regexps, if that's possible
nix eval --impure --raw --expr 'builtins.concatStringsSep " " (builtins.attrNames (import ./. {}).perlPackages)'
14:11:24
@janne.hess:helsinki-systems.de@janne.hess:helsinki-systems.de better: nix eval --impure --json --expr 'builtins.attrNames (import ./. { config.allowAliases = false; }).perlPackages' 14:12:18
@stigo:matrix.orgstigohttps://github.com/NixOS/nixpkgs/pull/187480 <-- feel like patching HTTP::Tiny so it verifies TLS connections by default :)17:49:44
@qbit:tapenet.org@qbit:tapenet.orgnice!18:26:09
@qbit:tapenet.org@qbit:tapenet.orgi was following a thread on the perl mailing list that was talking about enabling tls by default.. but i can't find it now.. did that happen? 18:29:20
@qbit:tapenet.org@qbit:tapenet.orgdang: https://marc.info/?t=163769025000001&r=1&w=2 nope18:33:35
@stigo:matrix.orgstigoProbably not yet, perl is usually quite deeply rooted in dependency trees.. openssl requires perl to build for instance.18:34:07
@qbit:tapenet.org@qbit:tapenet.orgright, but that build doesn't have to include openssl :D18:34:36
@stigo:matrix.orgstigoVery true, i totally agree that tls should be available in perl's core by default18:35:12
@stigo:matrix.orgstigothe issue became highlighted after the GPG signature scheme on cpan was shown to be quite broken18:36:04
@qbit:tapenet.org@qbit:tapenet.orgahh18:36:18
@qbit:tapenet.org@qbit:tapenet.orghttps://gist.github.com/afresh1/c4ac35cdd29e6b2cd15eef38246c4c71 <-- my fav approach so far :D18:36:26
@stigo:matrix.orgstigoNice :D18:36:47
@stigo:matrix.orgstigobtw, I've been looking at creating a replacement for the (also somewhat broken) Module::Signature module using openssh instead of gpg (very early work though) https://github.com/stigtsp/CPAN-Author-Signature18:38:49
@stigo:matrix.orgstigo * btw, I've been looking at proposing an alternative to the (also somewhat broken) Module::Signature module using openssh instead of gpg (very early work though) https://github.com/stigtsp/CPAN-Author-Signature18:39:15
@qbit:tapenet.org@qbit:tapenet.orgawesome!18:39:38
@stigo:matrix.orgstigo it uses metacpan -> (github|gitlab|foobar) as a trust root for ssh keys etc 18:40:44

Show newer messages


Back to Room ListRoom Version: 9