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