23 Oct 2024 |
| luna-null changed their display name from Autumn to luna-null. | 09:49:13 |
25 Oct 2024 |
| lholh joined the room. | 03:54:29 |
| lholh 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 |
stigo | ¯_(ツ)_/¯ | 15:58:00 |
stigo | * ¯\_(ツ)_/¯ | 15:58:04 |
stigo | * Maybe this works, get's rid of the Undefined subroutine 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;
| 16:03:35 |
vcunat | With some additional changes this worked. But it uncovered annoying nix issues, so it really is better to stay with the older version for now 😢 | 17:44:58 |
vcunat | But thank you | 17:45:23 |
vcunat | 🙂 | 17:45:41 |
3 Dec 2024 |
| stigo changed their display name from stigo (away) to stigo. | 00:52:10 |
26 Dec 2024 |
| nevoyu joined the room. | 01:41:18 |