Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,14 @@
};
});

packages = pkgs: rec {
packages = pkgs: let
dockerArch = if pkgs.stdenv.hostPlatform.system == "x86_64-linux"
then "amd64"
else "arm64";
in rec {
devkitA64 = mkDevkit pkgs {
name = "devkitA64";
src = ./sources/devkita64.json;
src = ./sources/devkita64-${dockerArch}.json;
includePaths = [
"devkitA64"
"devkitA64/aarch64-none-elf"
Expand All @@ -86,7 +90,7 @@
};
devkitARM = mkDevkit pkgs {
name = "devkitARM";
src = ./sources/devkitarm.json;
src = ./sources/devkitarm-${dockerArch}.json;
includePaths = [
"devkitARM"
"devkitARM/arm-none-eabi"
Expand All @@ -105,7 +109,7 @@
};
devkitPPC = mkDevkit pkgs {
name = "devkitPPC";
src = ./sources/devkitppc.json;
src = ./sources/devkitppc-${dockerArch}.json;
includePaths = [
"devkitPPC"
"devkitPPC/powerpc-eabi"
Expand Down Expand Up @@ -140,7 +144,7 @@
} pkgs.stdenvNoCC;
};
in
(flake-utils.lib.eachDefaultSystem (
(flake-utils.lib.eachSystem [ "x86_64-linux" "aarch64-linux" ] (
system:
let
pkgs' = nixpkgs.legacyPackages.${system};
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
13 changes: 8 additions & 5 deletions update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,17 @@
# shellcheck shell=bash

function fetch() {
echo "fetching $1..."
nix-prefetch-docker --image-name "devkitpro/$1" --json --quiet >"sources/$1.json"
echo "fetching $1-$2..."
nix-prefetch-docker --image-name "devkitpro/$1" --arch $2 --json --quiet >"sources/$1-$2.json"
}

fd flake.nix -x nix flake update --flake "{//}" --option access-tokens "github.com=$GITHUB_TOKEN"

mkdir -p sources

fetch devkitarm
fetch devkita64
fetch devkitppc
fetch devkitarm amd64
fetch devkitarm arm64
fetch devkita64 amd64
fetch devkita64 arm64
fetch devkitppc amd64
fetch devkitppc arm64
Loading