Browse Source

bump devkitpro docker image versions

main
xenua 8 months ago
parent
commit
8efb402656
Signed by: xenua
GPG Key ID: 8F93B68BD37255B8
  1. 8
      flake.lock
  2. 168
      flake.nix

8
flake.lock

@ -2,16 +2,16 @@
"nodes": { "nodes": {
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1668595291, "lastModified": 1713145326,
"narHash": "sha256-j8cyfbtT5sAYPYwbERgTDzfD48ZernL0/V668eGpXAM=", "narHash": "sha256-m7+IWM6mkWOg22EC5kRUFCycXsXLSU7hWmHdmBfmC3s=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "6474d93e007e4d165bcf48e7f87de2175c93d10b", "rev": "53a2c32bc66f5ae41a28d7a9a49d321172af621e",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "NixOS", "owner": "NixOS",
"ref": "nixos-22.05", "ref": "nixos-23.11",
"repo": "nixpkgs", "repo": "nixpkgs",
"type": "github" "type": "github"
} }

168
flake.nix

@ -1,47 +1,39 @@
{ {
inputs = { inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11"; };
nixpkgs.url = "github:NixOS/nixpkgs/nixos-22.05";
};
outputs = { outputs = { self, nixpkgs, }:
self, let
nixpkgs, pkgs = import nixpkgs { system = "x86_64-linux"; };
}: let imageA64 = pkgs.dockerTools.pullImage {
pkgs = import nixpkgs {system = "x86_64-linux";}; imageName = "devkitpro/devkita64";
imageA64 = pkgs.dockerTools.pullImage { imageDigest =
imageName = "devkitpro/devkita64"; "sha256:fa47ae6e5c73e0ae81154a120858d3de2d1fcc0bfbf810581ba1d14a2fedef0f";
imageDigest = "sha256:70db4c954eea43be5f1bc64c8882154126c99f47927ecb1e6b27fa18004fc961"; sha256 = "i1zJ+3Usvk7D7ZQF2Gdi2Ea6u04J0JVMSuLQY4q6rmM=";
sha256 = "a05LU5jF5KxQdqWJv+4b3EBRlVCZjBGx69WpFL57wP4="; finalImageName = "devkitpro/devkita64";
finalImageName = "devkitpro/devkita64"; finalImageTag = "20240324";
finalImageTag = "20221113"; };
}; imageARM = pkgs.dockerTools.pullImage {
imageARM = pkgs.dockerTools.pullImage { imageName = "devkitpro/devkitarm";
imageName = "devkitpro/devkitarm"; imageDigest =
imageDigest = "sha256:695d1eb865ca4b908b1f5c4de777b9eef0f927680f0c0654b07721f1df908606"; "sha256:340c466b53961c0d90e7536f6db3364d4bfede0f65a26492c25b118d0a00d82e";
sha256 = "U2Xkt4IYUeU00w/FzlvySzG5lFL2R7kN8sjxL0EEKD4="; sha256 = "KUiKhA3QhMR9cIQC82FI0AgE+Ud7dAXY50xSn5oWZzI=";
finalImageName = "devkitpro/devkitarm"; finalImageName = "devkitpro/devkitarm";
finalImageTag = "20221115"; finalImageTag = "20240202";
}; };
imagePPC = pkgs.dockerTools.pullImage { imagePPC = pkgs.dockerTools.pullImage {
imageName = "devkitpro/devkitppc"; imageName = "devkitpro/devkitppc";
imageDigest = "sha256:d88e21c1a7b5f8070ba7a15aa892e395f118ded9803b0f8223a3d29ba279fff3"; imageDigest =
sha256 = "nVtz/9mbYveKbvTMj/39EzND7qiLkjBHfqSOgT6SBUY="; "sha256:bc904413f470ea85d559d042da2f077208fe2adebeecc70d34f61828e87f3310";
finalImageName = "devkitpro/devkitppc"; sha256 = "6GGKWpgw27mq+1dLJGPS5sJBGQ35JmzAHM2qokW73cI=";
finalImageTag = "20220821"; finalImageName = "devkitpro/devkitppc";
}; finalImageTag = "20240417";
extractDocker = image: };
pkgs.vmTools.runInLinuxVM ( extractDocker = image:
pkgs.runCommand "docker-preload-image" { pkgs.vmTools.runInLinuxVM (pkgs.runCommand "docker-preload-image" {
memSize = 10 * 1024; memSize = 40 * 1024;
buildInputs = [ buildInputs =
pkgs.curl [ pkgs.curl pkgs.kmod pkgs.docker pkgs.e2fsprogs pkgs.utillinux ];
pkgs.kmod } ''
pkgs.docker
pkgs.e2fsprogs
pkgs.utillinux
];
}
''
modprobe overlay modprobe overlay
# from https://github.com/tianon/cgroupfs-mount/blob/master/cgroupfs-mount # from https://github.com/tianon/cgroupfs-mount/blob/master/cgroupfs-mount
@ -71,61 +63,45 @@
echo end echo end
kill %1 kill %1
'' '');
); in {
in { packages.x86_64-linux.devkitA64 = pkgs.stdenv.mkDerivation {
packages.x86_64-linux.devkitA64 = pkgs.stdenv.mkDerivation { name = "devkitA64";
name = "devkitA64"; src = extractDocker imageA64;
src = extractDocker imageA64; nativeBuildInputs = [ pkgs.autoPatchelfHook ];
nativeBuildInputs = [ buildInputs = [ pkgs.stdenv.cc.cc pkgs.ncurses6 pkgs.zsnes ];
pkgs.autoPatchelfHook buildPhase = "true";
]; installPhase = ''
buildInputs = [ mkdir -p $out
pkgs.stdenv.cc.cc cp -r $src/{devkitA64,libnx,portlibs,tools} $out
pkgs.ncurses6 rm -rf $out/pacman
pkgs.zsnes '';
]; };
buildPhase = "true";
installPhase = ''
mkdir -p $out
cp -r $src/{devkitA64,libnx,portlibs,tools} $out
rm -rf $out/pacman
'';
};
packages.x86_64-linux.devkitARM = pkgs.stdenv.mkDerivation { packages.x86_64-linux.devkitARM = pkgs.stdenv.mkDerivation {
name = "devkitARM"; name = "devkitARM";
src = extractDocker imageARM; src = extractDocker imageARM;
nativeBuildInputs = [pkgs.autoPatchelfHook]; nativeBuildInputs = [ pkgs.autoPatchelfHook ];
buildInputs = [ buildInputs = [ pkgs.stdenv.cc.cc pkgs.ncurses6 pkgs.zsnes ];
pkgs.stdenv.cc.cc buildPhase = "true";
pkgs.ncurses6 installPhase = ''
pkgs.zsnes mkdir -p $out
]; cp -r $src/{devkitARM,libgba,libnds,libctru,libmirko,liborcus,portlibs,tools} $out
buildPhase = "true"; rm -rf $out/pacman
installPhase = '' '';
mkdir -p $out };
cp -r $src/{devkitARM,libgba,libnds,libctru,libmirko,liborcus,portlibs,tools} $out
rm -rf $out/pacman
'';
};
packages.x86_64-linux.devkitPPC = pkgs.stdenv.mkDerivation { packages.x86_64-linux.devkitPPC = pkgs.stdenv.mkDerivation {
name = "devkitPPC"; name = "devkitPPC";
src = extractDocker imagePPC; src = extractDocker imagePPC;
nativeBuildInputs = [pkgs.autoPatchelfHook]; nativeBuildInputs = [ pkgs.autoPatchelfHook ];
buildInputs = [ buildInputs = [ pkgs.stdenv.cc.cc pkgs.ncurses6 pkgs.expat pkgs.xz ];
pkgs.stdenv.cc.cc buildPhase = "true";
pkgs.ncurses5 installPhase = ''
pkgs.expat mkdir -p $out
pkgs.xz cp -r $src/{devkitPPC,libogc,portlibs,tools,wut} $out
]; rm -rf $out/pacman
buildPhase = "true"; '';
installPhase = '' };
mkdir -p $out
cp -r $src/{devkitPPC,libogc,portlibs,tools,wut} $out
rm -rf $out/pacman
'';
}; };
};
} }

Loading…
Cancel
Save