Compare commits

..

No commits in common. 'main' and 'master' have entirely different histories.
main ... master

  1. 8
      flake.lock
  2. 168
      flake.nix

8
flake.lock

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

168
flake.nix

@ -1,39 +1,47 @@ @@ -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, }:
let
pkgs = import nixpkgs { system = "x86_64-linux"; };
imageA64 = pkgs.dockerTools.pullImage {
imageName = "devkitpro/devkita64";
imageDigest =
"sha256:fa47ae6e5c73e0ae81154a120858d3de2d1fcc0bfbf810581ba1d14a2fedef0f";
sha256 = "i1zJ+3Usvk7D7ZQF2Gdi2Ea6u04J0JVMSuLQY4q6rmM=";
finalImageName = "devkitpro/devkita64";
finalImageTag = "20240324";
};
imageARM = pkgs.dockerTools.pullImage {
imageName = "devkitpro/devkitarm";
imageDigest =
"sha256:340c466b53961c0d90e7536f6db3364d4bfede0f65a26492c25b118d0a00d82e";
sha256 = "KUiKhA3QhMR9cIQC82FI0AgE+Ud7dAXY50xSn5oWZzI=";
finalImageName = "devkitpro/devkitarm";
finalImageTag = "20240202";
};
imagePPC = pkgs.dockerTools.pullImage {
imageName = "devkitpro/devkitppc";
imageDigest =
"sha256:bc904413f470ea85d559d042da2f077208fe2adebeecc70d34f61828e87f3310";
sha256 = "6GGKWpgw27mq+1dLJGPS5sJBGQ35JmzAHM2qokW73cI=";
finalImageName = "devkitpro/devkitppc";
finalImageTag = "20240417";
};
extractDocker = image:
pkgs.vmTools.runInLinuxVM (pkgs.runCommand "docker-preload-image" {
memSize = 40 * 1024;
buildInputs =
[ pkgs.curl pkgs.kmod pkgs.docker pkgs.e2fsprogs pkgs.utillinux ];
} ''
outputs = {
self,
nixpkgs,
}: let
pkgs = import nixpkgs {system = "x86_64-linux";};
imageA64 = pkgs.dockerTools.pullImage {
imageName = "devkitpro/devkita64";
imageDigest = "sha256:70db4c954eea43be5f1bc64c8882154126c99f47927ecb1e6b27fa18004fc961";
sha256 = "a05LU5jF5KxQdqWJv+4b3EBRlVCZjBGx69WpFL57wP4=";
finalImageName = "devkitpro/devkita64";
finalImageTag = "20221113";
};
imageARM = pkgs.dockerTools.pullImage {
imageName = "devkitpro/devkitarm";
imageDigest = "sha256:695d1eb865ca4b908b1f5c4de777b9eef0f927680f0c0654b07721f1df908606";
sha256 = "U2Xkt4IYUeU00w/FzlvySzG5lFL2R7kN8sjxL0EEKD4=";
finalImageName = "devkitpro/devkitarm";
finalImageTag = "20221115";
};
imagePPC = pkgs.dockerTools.pullImage {
imageName = "devkitpro/devkitppc";
imageDigest = "sha256:d88e21c1a7b5f8070ba7a15aa892e395f118ded9803b0f8223a3d29ba279fff3";
sha256 = "nVtz/9mbYveKbvTMj/39EzND7qiLkjBHfqSOgT6SBUY=";
finalImageName = "devkitpro/devkitppc";
finalImageTag = "20220821";
};
extractDocker = image:
pkgs.vmTools.runInLinuxVM (
pkgs.runCommand "docker-preload-image" {
memSize = 10 * 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
@ -63,45 +71,61 @@ @@ -63,45 +71,61 @@
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 ];
buildPhase = "true";
installPhase = ''
mkdir -p $out
cp -r $src/{devkitA64,libnx,portlibs,tools} $out
rm -rf $out/pacman
'';
};
''
);
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
];
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 {
name = "devkitARM";
src = extractDocker imageARM;
nativeBuildInputs = [ pkgs.autoPatchelfHook ];
buildInputs = [ pkgs.stdenv.cc.cc pkgs.ncurses6 pkgs.zsnes ];
buildPhase = "true";
installPhase = ''
mkdir -p $out
cp -r $src/{devkitARM,libgba,libnds,libctru,libmirko,liborcus,portlibs,tools} $out
rm -rf $out/pacman
'';
};
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
];
buildPhase = "true";
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 {
name = "devkitPPC";
src = extractDocker imagePPC;
nativeBuildInputs = [ pkgs.autoPatchelfHook ];
buildInputs = [ pkgs.stdenv.cc.cc pkgs.ncurses6 pkgs.expat pkgs.xz ];
buildPhase = "true";
installPhase = ''
mkdir -p $out
cp -r $src/{devkitPPC,libogc,portlibs,tools,wut} $out
rm -rf $out/pacman
'';
};
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
];
buildPhase = "true";
installPhase = ''
mkdir -p $out
cp -r $src/{devkitPPC,libogc,portlibs,tools,wut} $out
rm -rf $out/pacman
'';
};
};
}

Loading…
Cancel
Save