From a961c8a6b92b9595e9f0f0c59402ad25504f1032 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Janne=20He=C3=9F?= Date: Mon, 22 Nov 2021 01:07:18 +0100 Subject: [PATCH 1/2] mirror-nixos-branch: Add aarch64 support --- mirror-nixos-branch.pl | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/mirror-nixos-branch.pl b/mirror-nixos-branch.pl index 6cb49ac..3e572e1 100755 --- a/mirror-nixos-branch.pl +++ b/mirror-nixos-branch.pl @@ -210,27 +210,31 @@ if ($bucketReleases && $bucketReleases->head_key("$releasePrefix")) { } if ($channelName =~ /nixos/) { + my $arch = "x86_64-linux"; + if ($channelName =~ /-aarch64\z/) { + $arch = "aarch64-linux"; + } + downloadFile("nixos.channel", "nixexprs.tar.xz"); - downloadFile("nixos.iso_minimal.x86_64-linux"); + downloadFile("nixos.iso_minimal.$arch"); downloadFile("nixpkgs.tarball", "packages.json.br", "json-br"); downloadFile("nixos.options", "options.json.br", "json-br"); if ($channelName !~ /-small/) { - downloadFile("nixos.iso_minimal.i686-linux"); + downloadFile("nixos.iso_minimal.i686-linux") if $arch eq "x86_64-linux"; # Renamed iso_graphcial to iso_plasma5 in 20.03 if ($releaseName !~ /-19./) { - downloadFile("nixos.iso_plasma5.x86_64-linux"); + downloadFile("nixos.iso_plasma5.$arch"); } else { - downloadFile("nixos.iso_graphical.x86_64-linux"); + downloadFile("nixos.iso_graphical.$arch"); } if ($releaseName !~ /-19./ && $releaseName !~ /-20.03/) { - downloadFile("nixos.iso_gnome.x86_64-linux"); + downloadFile("nixos.iso_gnome.$arch"); } - downloadFile("nixos.ova.x86_64-linux"); - #downloadFile("nixos.ova.i686-linux"); + downloadFile("nixos.ova.$arch"); } } else { From fa2c4eae31fa9e9dd2dde13e4b08860ceea23990 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Janne=20He=C3=9F?= Date: Mon, 22 Nov 2021 01:18:18 +0100 Subject: [PATCH 2/2] mirror-nixos-branches: Fix failing aarch64 downloads --- mirror-nixos-branch.pl | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/mirror-nixos-branch.pl b/mirror-nixos-branch.pl index 3e572e1..29640af 100755 --- a/mirror-nixos-branch.pl +++ b/mirror-nixos-branch.pl @@ -211,18 +211,21 @@ if ($bucketReleases && $bucketReleases->head_key("$releasePrefix")) { if ($channelName =~ /nixos/) { my $arch = "x86_64-linux"; - if ($channelName =~ /-aarch64\z/) { + if ($channelName =~ /-aarch64/) { $arch = "aarch64-linux"; } downloadFile("nixos.channel", "nixexprs.tar.xz"); downloadFile("nixos.iso_minimal.$arch"); downloadFile("nixpkgs.tarball", "packages.json.br", "json-br"); - downloadFile("nixos.options", "options.json.br", "json-br"); - if ($channelName !~ /-small/) { - downloadFile("nixos.iso_minimal.i686-linux") if $arch eq "x86_64-linux"; + # Only built on the main channel (x86_64-linux) + if ($arch eq "x86_64-linux") { + downloadFile("nixos.options", "options.json.br", "json-br"); + } + # All of these paths are x86-specific only and are not in small channels + if ($arch eq "x86_64-linux" and $channelName !~ /-small/) { # Renamed iso_graphcial to iso_plasma5 in 20.03 if ($releaseName !~ /-19./) { downloadFile("nixos.iso_plasma5.$arch"); @@ -234,6 +237,7 @@ if ($bucketReleases && $bucketReleases->head_key("$releasePrefix")) { downloadFile("nixos.iso_gnome.$arch"); } + downloadFile("nixos.iso_minimal.i686-linux"); downloadFile("nixos.ova.$arch"); }