From 201ca7ca1ae536be11bbbfbcc8ed9eb67604798a Mon Sep 17 00:00:00 2001 From: Knarkzel Date: Tue, 15 Nov 2022 17:09:06 +0100 Subject: [PATCH] Added devkitA64 --- devkita64.nix | 27 +++++++++++++++++++++++++++ devkitppc.nix | 8 +++----- extract-docker.nix | 7 +++++-- 3 files changed, 35 insertions(+), 7 deletions(-) create mode 100644 devkita64.nix diff --git a/devkita64.nix b/devkita64.nix new file mode 100644 index 0000000..3c2b30f --- /dev/null +++ b/devkita64.nix @@ -0,0 +1,27 @@ +let + pkgs = import {}; + 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 + ''; + }; +} diff --git a/devkitppc.nix b/devkitppc.nix index 6c6c3ec..81369c2 100644 --- a/devkitppc.nix +++ b/devkitppc.nix @@ -10,10 +10,8 @@ let in { devkitppc = pkgs.stdenv.mkDerivation { name = "devkitppc"; - src = import ./extract-docker.nix pkgs image "/opt/devkitpro"; - nativeBuildInputs = [ - pkgs.autoPatchelfHook - ]; + src = import ./extract-docker.nix pkgs image; + nativeBuildInputs = [ pkgs.autoPatchelfHook ]; buildInputs = [ pkgs.stdenv.cc.cc pkgs.ncurses5 @@ -23,7 +21,7 @@ in { buildPhase = "true"; installPhase = '' 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 ''; }; diff --git a/extract-docker.nix b/extract-docker.nix index 1388614..e0fc9df 100644 --- a/extract-docker.nix +++ b/extract-docker.nix @@ -1,7 +1,10 @@ -pkgs: image: directory: +pkgs: image: +let + directory = "/opt/devkitpro"; +in pkgs.vmTools.runInLinuxVM ( pkgs.runCommand "docker-preload-image" { - memSize = 8 * 1024; + memSize = 12 * 1024; buildInputs = [ pkgs.curl pkgs.kmod