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