9 Oct 2024 |
stigo | * Keeping two perls seems to have limited value imho, as the versions are usually quite backwards compatible, and there are very few references in nixpkgs to perl538 and they can be fixed of course.
I think keeping a perl5 and perl5Packages makes more sense and instead add a perl7 when/if it is released, and if it breaks some backwards compat.
| 08:45:40 |
ajs124 | Sounds like a plan.
I trust you to have the insight to make this decision. | 08:46:58 |
stigo | (I do really hope perl7 will break backwards compat by enabling modern features by default and disabling some old cruft, but... dreams) | 08:50:03 |
17 Oct 2024 |
| Mic92 changed their display name from Mic92 to Mic3000. | 06:51:17 |
| Mic92 changed their display name from Mic3000 to Mic3000 🌋. | 06:51:46 |
| Mic92 changed their display name from Mic3000 🌋 to Mic92. | 12:22:31 |
19 Oct 2024 |
stigo | Started working on a new set of perl updates in the perl-updates branch, currently it removes perl538 and keeps one perl as perl5 . This PR will contain a mass updated as well: https://github.com/NixOS/nixpkgs/pull/349743 | 11:27:25 |
stigo | * Started working on a new set of perl updates in the perl-updates branch, currently it removes perl538 and keeps one perl as perl5 . This PR will contain a mass update of perlPackages as well: https://github.com/NixOS/nixpkgs/pull/349743 | 11:32:49 |
23 Oct 2024 |
| luna-null changed their display name from Autumn to luna-null. | 09:49:13 |
25 Oct 2024 |
| @lholh:matrix.org joined the room. | 03:54:29 |
| @lholh:matrix.org left the room. | 22:42:00 |
1 Nov 2024 |
| Toma joined the room. | 20:07:14 |
8 Nov 2024 |
| jschvz joined the room. | 02:57:01 |
13 Nov 2024 |
| inayet joined the room. | 22:15:17 |
20 Nov 2024 |
| inayet removed their profile picture. | 00:59:23 |
27 Nov 2024 |
| stigo changed their display name from stigo to stigo (away). | 20:49:35 |
1 Dec 2024 |
vcunat | Is there someone who knows/follows Nix:: , i.e. the perl bindings for Nix? | 07:59:39 |
vcunat | Apparently <nixpkgs/maintainers/scripts/copy-tarballs.pl> needs some changes to stay compatible with the current default version of Nix. | 08:01:42 |
stigo | Is there an easy way to test/reproduce? | 15:07:39 |
vcunat | I could... deploy it :-D | 15:13:51 |
vcunat | But if you run it now, it should fail on line 25 already. | 15:15:30 |
vcunat | env NIX_PATH=nixpkgs=. ./maintainers/scripts/copy-tarballs.pl
Undefined subroutine &main::isValidPath called at ./maintainers/scripts/copy-tarballs.pl line 25.
| 15:15:51 |
vcunat | Afterwards it deals with AWS a lot, so I think deploying it to infra will be the best way to test in this case. | 15:17:49 |
vcunat | stigo (away): by a quick glance I suspect that we might need some new Nix::Store now and do calls like ->isValidPath(foo) | 15:20:37 |
stigo | I think you are right, looking at tests in CppNix src/perl/t/init.t the usage appears to be something like:
my $s = new Nix::Store("dummy://");
my $res = $s->isValidPath("/nix/store/g1w7hy3qg1w7hy3qg1w7hy3qg1w7hy3q-bar");
| 15:48:25 |
stigo | Can't see any reason why isValidPath should be exported by default by Nix::Store , so weird if this has worked before? | 15:48:51 |
stigo | Btw, you should use Nix::Store->new instead of new Nix::Store | 15:49:55 |
stigo | Maybe:
diff --git a/maintainers/scripts/copy-tarballs.pl b/maintainers/scripts/copy-tarballs.pl
index 30fbac6f002d..6c25471278f8 100755
--- a/maintainers/scripts/copy-tarballs.pl
+++ b/maintainers/scripts/copy-tarballs.pl
@@ -22,7 +22,9 @@ use JSON;
use Net::Amazon::S3;
use Nix::Store;
-isValidPath("/nix/store/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa-foo"); # FIXME: forces Nix::Store initialisation
+my $store = Nix::Store->new();
+
+$store->isValidPath("/nix/store/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa-foo"); # FIXME: forces Nix::Store initialisation
sub usage {
die "Syntax: $0 [--dry-run] [--exclude REGEXP] [--expr EXPR | --file FILES...]\n";
@@ -216,12 +218,12 @@ elsif (defined $expr) {
}
# Substitute the output.
- if (!isValidPath($storePath)) {
+ if (!$store->isValidPath($storePath)) {
system("nix-store", "-r", $storePath);
}
# Otherwise download the file using nix-prefetch-url.
- if (!isValidPath($storePath)) {
+ if (!$store->isValidPath($storePath)) {
$ENV{QUIET} = 1;
$ENV{PRINT_PATH} = 1;
my $fh;
| 15:56:48 |
stigo | * Maybe this works, get's rid of the Undefined subrouting error, but not tested of course :D
diff --git a/maintainers/scripts/copy-tarballs.pl b/maintainers/scripts/copy-tarballs.pl
index 30fbac6f002d..6c25471278f8 100755
--- a/maintainers/scripts/copy-tarballs.pl
+++ b/maintainers/scripts/copy-tarballs.pl
@@ -22,7 +22,9 @@ use JSON;
use Net::Amazon::S3;
use Nix::Store;
-isValidPath("/nix/store/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa-foo"); # FIXME: forces Nix::Store initialisation
+my $store = Nix::Store->new();
+
+$store->isValidPath("/nix/store/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa-foo"); # FIXME: forces Nix::Store initialisation
sub usage {
die "Syntax: $0 [--dry-run] [--exclude REGEXP] [--expr EXPR | --file FILES...]\n";
@@ -216,12 +218,12 @@ elsif (defined $expr) {
}
# Substitute the output.
- if (!isValidPath($storePath)) {
+ if (!$store->isValidPath($storePath)) {
system("nix-store", "-r", $storePath);
}
# Otherwise download the file using nix-prefetch-url.
- if (!isValidPath($storePath)) {
+ if (!$store->isValidPath($storePath)) {
$ENV{QUIET} = 1;
$ENV{PRINT_PATH} = 1;
my $fh;
| 15:57:20 |
vcunat | Maybe the forcing of initialization isn't needed now that we use new() ? | 15:57:46 |