@@ -348,25 +348,16 @@ sub fetch {
348
348
my $cache_control = " maxage=600,stale-while-revalidate=1800,public" ;
349
349
350
350
sub redirect {
351
- my ($from , $to , $immutable_flake_tarball ) = @_ ;
351
+ my ($from , $to ) = @_ ;
352
352
$to = " https://releases.nixos.org/" . $to ;
353
353
print STDERR " redirect $from -> $to \n " ;
354
- my $object_metadata = { " x-amz-website-redirect-location" => $to , " cache-control" => $cache_control };
355
- if ($immutable_flake_tarball // 0) {
356
- # Optionally sets a header for the "Lockable HTTP Tarball Protocol".
357
- # See <https://github.com/NixOS/nix/blob/61f49de7ae0b3899abdcc102832523153dd40d35/doc/manual/source/protocols/tarball-fetcher.md>.
358
- # AWS S3 does not not allow setting the "Link" header directly.
359
- # Instead, we prefix the header with "x-amz-meta" and let Fastly
360
- # rename the header for us.
361
- $object_metadata -> {' x-amz-meta-link' } = " <$to ?rev=$rev >; rel=\" immutable\" " ;
362
- }
363
- $bucketChannels -> add_key($from , " " , $object_metadata )
354
+ $bucketChannels -> add_key($from , " " , { " x-amz-website-redirect-location" => $to , " cache-control" => $cache_control })
364
355
or die $bucketChannels -> err . " : " . $bucketChannels -> errstr;
365
356
}
366
357
367
358
# Update channels on channels.nixos.org.
368
359
redirect($channelName , $releasePrefix );
369
- redirect(" $channelName /nixexprs.tar.xz" , " $releasePrefix /nixexprs.tar.xz" , 1 );
360
+ redirect(" $channelName /nixexprs.tar.xz" , " $releasePrefix /nixexprs.tar.xz?rev= $rev " );
370
361
redirect(" $channelName /git-revision" , " $releasePrefix /git-revision" );
371
362
redirect(" $channelName /packages.json.br" , " $releasePrefix /packages.json.br" );
372
363
redirect(" $channelName /store-paths.xz" , " $releasePrefix /store-paths.xz" );
0 commit comments