add RetroConsole

This commit is contained in:
Wolfgang Thaller 2021-11-28 02:06:00 +01:00
parent 7b0091ae49
commit 9e1b653f3a

View File

@ -2,7 +2,7 @@
, ... }: , ... }:
let let
retroSystems = { retroPlatforms = {
m68k = { m68k = {
system = "m68k-macos"; system = "m68k-macos";
config = "m68k-apple-macos"; config = "m68k-apple-macos";
@ -82,6 +82,8 @@ let
overlay = pkgs: prev: overlay = pkgs: prev:
{ {
retro68 = { retro68 = {
platforms = retroPlatforms;
# ----------- Native Tools ------------- # ----------- Native Tools -------------
# hfsutils -- Utilities for manipulating HFS volumes & disk images. # hfsutils -- Utilities for manipulating HFS volumes & disk images.
hfsutils = with pkgs; hfsutils = with pkgs;
@ -191,9 +193,11 @@ let
set(CMAKE_SYSTEM_VERSION 1) set(CMAKE_SYSTEM_VERSION 1)
set(CMAKE_CROSSCOMPILING TRUE) set(CMAKE_CROSSCOMPILING TRUE)
set( REZ "${pkgs.buildPackages.retro68.tools}/bin/Rez" ) set(REZ "${pkgs.buildPackages.retro68.tools}/bin/Rez" )
set(REZ_TEMPLATES_PATH ${pkgs.retro68.libretro}/RIncludes) set(REZ_TEMPLATES_PATH ${pkgs.retro68.libretro}/RIncludes)
set(MAKE_PEF "${pkgs.buildPackages.retro68.tools}/bin/MakePEF" )
include(${./cmake/add_application.cmake}) include(${./cmake/add_application.cmake})
''; '';
}; };
@ -249,7 +253,7 @@ let
}; };
import_libraries = with pkgs; import_libraries = with pkgs;
if stdenvNoCC.targetPlatform != retroSystems.m68k then if stdenvNoCC.targetPlatform != retroPlatforms.m68k then
stdenvNoCC.mkDerivation { stdenvNoCC.mkDerivation {
name = "retro68.import_libraries"; name = "retro68.import_libraries";
src = ./ImportLibraries; src = ./ImportLibraries;
@ -292,6 +296,14 @@ let
cmake --build . --target install cmake --build . --target install
''; '';
}; };
console = with pkgs;
stdenv.mkDerivation {
name = "retro68.console";
src = ./Console;
nativeBuildInputs = [ buildPackages.cmake ];
};
}; };
} // prev.lib.optionalAttrs (prev.targetPlatform ? retro68) { } // prev.lib.optionalAttrs (prev.targetPlatform ? retro68) {
@ -335,7 +347,7 @@ let
overlays = [ overlay ]; overlays = [ overlay ];
crossSystem = plat; crossSystem = plat;
config = { allowUnsupportedSystem = true; }; config = { allowUnsupportedSystem = true; };
}) retroSystems; }) retroPlatforms;
shell = pkgs.lib.mapAttrs (name: cross: shell = pkgs.lib.mapAttrs (name: cross:
cross.mkShell { cross.mkShell {
@ -345,6 +357,7 @@ let
cmake cmake
gnumake gnumake
]; ];
buildInputs = [ cross.retro68.console ];
} // cross) crossPkgs; } // cross) crossPkgs;
in shell.m68k // shell // { inherit overlay; } in shell.m68k // shell // { inherit overlay; }