|
|
@ -1,39 +1,47 @@ |
|
|
|
{ |
|
|
|
{ |
|
|
|
inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11"; }; |
|
|
|
inputs = { |
|
|
|
|
|
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-22.05"; |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
outputs = { self, nixpkgs, }: |
|
|
|
outputs = { |
|
|
|
let |
|
|
|
self, |
|
|
|
|
|
|
|
nixpkgs, |
|
|
|
|
|
|
|
}: let |
|
|
|
pkgs = import nixpkgs {system = "x86_64-linux";}; |
|
|
|
pkgs = import nixpkgs {system = "x86_64-linux";}; |
|
|
|
imageA64 = pkgs.dockerTools.pullImage { |
|
|
|
imageA64 = pkgs.dockerTools.pullImage { |
|
|
|
imageName = "devkitpro/devkita64"; |
|
|
|
imageName = "devkitpro/devkita64"; |
|
|
|
imageDigest = |
|
|
|
imageDigest = "sha256:70db4c954eea43be5f1bc64c8882154126c99f47927ecb1e6b27fa18004fc961"; |
|
|
|
"sha256:fa47ae6e5c73e0ae81154a120858d3de2d1fcc0bfbf810581ba1d14a2fedef0f"; |
|
|
|
sha256 = "a05LU5jF5KxQdqWJv+4b3EBRlVCZjBGx69WpFL57wP4="; |
|
|
|
sha256 = "i1zJ+3Usvk7D7ZQF2Gdi2Ea6u04J0JVMSuLQY4q6rmM="; |
|
|
|
|
|
|
|
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 = "20240202"; |
|
|
|
finalImageTag = "20221115"; |
|
|
|
}; |
|
|
|
}; |
|
|
|
imagePPC = pkgs.dockerTools.pullImage { |
|
|
|
imagePPC = pkgs.dockerTools.pullImage { |
|
|
|
imageName = "devkitpro/devkitppc"; |
|
|
|
imageName = "devkitpro/devkitppc"; |
|
|
|
imageDigest = |
|
|
|
imageDigest = "sha256:d88e21c1a7b5f8070ba7a15aa892e395f118ded9803b0f8223a3d29ba279fff3"; |
|
|
|
"sha256:bc904413f470ea85d559d042da2f077208fe2adebeecc70d34f61828e87f3310"; |
|
|
|
sha256 = "nVtz/9mbYveKbvTMj/39EzND7qiLkjBHfqSOgT6SBUY="; |
|
|
|
sha256 = "6GGKWpgw27mq+1dLJGPS5sJBGQ35JmzAHM2qokW73cI="; |
|
|
|
|
|
|
|
finalImageName = "devkitpro/devkitppc"; |
|
|
|
finalImageName = "devkitpro/devkitppc"; |
|
|
|
finalImageTag = "20240417"; |
|
|
|
finalImageTag = "20220821"; |
|
|
|
}; |
|
|
|
}; |
|
|
|
extractDocker = image: |
|
|
|
extractDocker = image: |
|
|
|
pkgs.vmTools.runInLinuxVM (pkgs.runCommand "docker-preload-image" { |
|
|
|
pkgs.vmTools.runInLinuxVM ( |
|
|
|
memSize = 40 * 1024; |
|
|
|
pkgs.runCommand "docker-preload-image" { |
|
|
|
buildInputs = |
|
|
|
memSize = 10 * 1024; |
|
|
|
[ pkgs.curl pkgs.kmod pkgs.docker pkgs.e2fsprogs pkgs.utillinux ]; |
|
|
|
buildInputs = [ |
|
|
|
} '' |
|
|
|
pkgs.curl |
|
|
|
|
|
|
|
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 |
|
|
@ -63,13 +71,20 @@ |
|
|
|
|
|
|
|
|
|
|
|
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 |
|
|
|
|
|
|
|
]; |
|
|
|
|
|
|
|
buildInputs = [ |
|
|
|
|
|
|
|
pkgs.stdenv.cc.cc |
|
|
|
|
|
|
|
pkgs.ncurses6 |
|
|
|
|
|
|
|
pkgs.zsnes |
|
|
|
|
|
|
|
]; |
|
|
|
buildPhase = "true"; |
|
|
|
buildPhase = "true"; |
|
|
|
installPhase = '' |
|
|
|
installPhase = '' |
|
|
|
mkdir -p $out |
|
|
|
mkdir -p $out |
|
|
@ -82,7 +97,11 @@ |
|
|
|
name = "devkitARM"; |
|
|
|
name = "devkitARM"; |
|
|
|
src = extractDocker imageARM; |
|
|
|
src = extractDocker imageARM; |
|
|
|
nativeBuildInputs = [pkgs.autoPatchelfHook]; |
|
|
|
nativeBuildInputs = [pkgs.autoPatchelfHook]; |
|
|
|
buildInputs = [ pkgs.stdenv.cc.cc pkgs.ncurses6 pkgs.zsnes ]; |
|
|
|
buildInputs = [ |
|
|
|
|
|
|
|
pkgs.stdenv.cc.cc |
|
|
|
|
|
|
|
pkgs.ncurses6 |
|
|
|
|
|
|
|
pkgs.zsnes |
|
|
|
|
|
|
|
]; |
|
|
|
buildPhase = "true"; |
|
|
|
buildPhase = "true"; |
|
|
|
installPhase = '' |
|
|
|
installPhase = '' |
|
|
|
mkdir -p $out |
|
|
|
mkdir -p $out |
|
|
@ -95,7 +114,12 @@ |
|
|
|
name = "devkitPPC"; |
|
|
|
name = "devkitPPC"; |
|
|
|
src = extractDocker imagePPC; |
|
|
|
src = extractDocker imagePPC; |
|
|
|
nativeBuildInputs = [pkgs.autoPatchelfHook]; |
|
|
|
nativeBuildInputs = [pkgs.autoPatchelfHook]; |
|
|
|
buildInputs = [ pkgs.stdenv.cc.cc pkgs.ncurses6 pkgs.expat pkgs.xz ]; |
|
|
|
buildInputs = [ |
|
|
|
|
|
|
|
pkgs.stdenv.cc.cc |
|
|
|
|
|
|
|
pkgs.ncurses5 |
|
|
|
|
|
|
|
pkgs.expat |
|
|
|
|
|
|
|
pkgs.xz |
|
|
|
|
|
|
|
]; |
|
|
|
buildPhase = "true"; |
|
|
|
buildPhase = "true"; |
|
|
|
installPhase = '' |
|
|
|
installPhase = '' |
|
|
|
mkdir -p $out |
|
|
|
mkdir -p $out |
|
|
|