Browse Source

Added devkitA64

master
Knarkzel 2 years ago
parent
commit
201ca7ca1a
  1. 27
      devkita64.nix
  2. 8
      devkitppc.nix
  3. 7
      extract-docker.nix

27
devkita64.nix

@ -0,0 +1,27 @@
let
pkgs = import <nixpkgs> {};
image = pkgs.dockerTools.pullImage {
imageName = "devkitpro/devkita64";
imageDigest = "sha256:70db4c954eea43be5f1bc64c8882154126c99f47927ecb1e6b27fa18004fc961";
sha256 = "a05LU5jF5KxQdqWJv+4b3EBRlVCZjBGx69WpFL57wP4=";
finalImageName = "devkitpro/devkita64";
finalImageTag = "20221113";
};
in {
devkita64 = pkgs.stdenv.mkDerivation {
name = "devkita64";
src = import ./extract-docker.nix pkgs image;
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
'';
};
}

8
devkitppc.nix

@ -10,10 +10,8 @@ let
in { in {
devkitppc = pkgs.stdenv.mkDerivation { devkitppc = pkgs.stdenv.mkDerivation {
name = "devkitppc"; name = "devkitppc";
src = import ./extract-docker.nix pkgs image "/opt/devkitpro"; src = import ./extract-docker.nix pkgs image;
nativeBuildInputs = [ nativeBuildInputs = [ pkgs.autoPatchelfHook ];
pkgs.autoPatchelfHook
];
buildInputs = [ buildInputs = [
pkgs.stdenv.cc.cc pkgs.stdenv.cc.cc
pkgs.ncurses5 pkgs.ncurses5
@ -23,7 +21,7 @@ in {
buildPhase = "true"; buildPhase = "true";
installPhase = '' installPhase = ''
mkdir -p $out mkdir -p $out
cp -r $src/{devkitPPC,libogc,examples,portlibs,tools,wut} $out cp -r $src/{devkitPPC,libogc,portlibs,tools} $out
rm -rf $out/pacman rm -rf $out/pacman
''; '';
}; };

7
extract-docker.nix

@ -1,7 +1,10 @@
pkgs: image: directory: pkgs: image:
let
directory = "/opt/devkitpro";
in
pkgs.vmTools.runInLinuxVM ( pkgs.vmTools.runInLinuxVM (
pkgs.runCommand "docker-preload-image" { pkgs.runCommand "docker-preload-image" {
memSize = 8 * 1024; memSize = 12 * 1024;
buildInputs = [ buildInputs = [
pkgs.curl pkgs.curl
pkgs.kmod pkgs.kmod

Loading…
Cancel
Save