mirror of
https://github.com/autc04/Retro68.git
synced 2024-08-31 09:29:37 +00:00
setup nix source formatter
This commit is contained in:
parent
09e4e34c41
commit
b6b30d2c10
67
default.nix
67
default.nix
@ -1,9 +1,12 @@
|
|||||||
let sources = import ./nix/sources.nix;
|
let sources = import ./nix/sources.nix;
|
||||||
in { system ? builtins.currentSystem, nixpkgs ? sources.nixpkgs
|
in { system ? builtins.currentSystem
|
||||||
, multiversal_src ? if builtins.pathExists ./multiversal/make-multiverse.rb then
|
, nixpkgs ? sources.nixpkgs
|
||||||
./multiversal
|
, multiversal_src ? if builtins.pathExists ./multiversal/make-multiverse.rb then
|
||||||
else
|
./multiversal
|
||||||
sources.multiversal, ... }:
|
else
|
||||||
|
sources.multiversal
|
||||||
|
, ...
|
||||||
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
retroPlatforms = import nix/platforms.nix;
|
retroPlatforms = import nix/platforms.nix;
|
||||||
@ -22,30 +25,36 @@ let
|
|||||||
overlays = [ overlay ];
|
overlays = [ overlay ];
|
||||||
};
|
};
|
||||||
|
|
||||||
crossPkgs = lib.mapAttrs (name: plat:
|
crossPkgs = lib.mapAttrs
|
||||||
import nixpkgs {
|
(name: plat:
|
||||||
inherit system;
|
import nixpkgs {
|
||||||
overlays = [ overlay ];
|
inherit system;
|
||||||
crossSystem = plat;
|
overlays = [ overlay ];
|
||||||
config = { allowUnsupportedSystem = true; };
|
crossSystem = plat;
|
||||||
}) retroPlatforms;
|
config = { allowUnsupportedSystem = true; };
|
||||||
|
})
|
||||||
|
retroPlatforms;
|
||||||
targetPkgs = lib.mapAttrs (name: cross: cross.buildPackages) crossPkgs;
|
targetPkgs = lib.mapAttrs (name: cross: cross.buildPackages) crossPkgs;
|
||||||
|
|
||||||
shell = lib.mapAttrs (name: cross:
|
shell = lib.mapAttrs
|
||||||
cross.mkShell {
|
(name: cross:
|
||||||
nativeBuildInputs = with overlaidPkgs; [
|
cross.mkShell
|
||||||
retro68.hfsutils
|
{
|
||||||
retro68.tools
|
nativeBuildInputs = with overlaidPkgs; [
|
||||||
cmake
|
retro68.hfsutils
|
||||||
gnumake
|
retro68.tools
|
||||||
];
|
cmake
|
||||||
buildInputs = [ cross.retro68.console ];
|
gnumake
|
||||||
} // cross) crossPkgs;
|
];
|
||||||
|
buildInputs = [ cross.retro68.console ];
|
||||||
|
} // cross)
|
||||||
|
crossPkgs;
|
||||||
|
|
||||||
in builtins.trace
|
in
|
||||||
"Warning: Retro68's default.nix is deprecated and will disappear soon. Please use the flake instead."
|
builtins.trace
|
||||||
(shell.m68k // shell // {
|
"Warning: Retro68's default.nix is deprecated and will disappear soon. Please use the flake instead."
|
||||||
inherit overlay;
|
(shell.m68k // shell // {
|
||||||
inherit (overlaidPkgs) retro68;
|
inherit overlay;
|
||||||
targetPkg = targetPkgs;
|
inherit (overlaidPkgs) retro68;
|
||||||
})
|
targetPkg = targetPkgs;
|
||||||
|
})
|
||||||
|
@ -18,6 +18,8 @@
|
|||||||
{
|
{
|
||||||
_module.args.pkgs = import nixpkgs { inherit system; overlays = [ self.overlays.default ]; };
|
_module.args.pkgs = import nixpkgs { inherit system; overlays = [ self.overlays.default ]; };
|
||||||
|
|
||||||
|
formatter = pkgs.nixpkgs-fmt;
|
||||||
|
|
||||||
legacyPackages.pkgsCross = lib.mapAttrs
|
legacyPackages.pkgsCross = lib.mapAttrs
|
||||||
(name: plat:
|
(name: plat:
|
||||||
import nixpkgs {
|
import nixpkgs {
|
||||||
@ -52,7 +54,7 @@
|
|||||||
tools = pkgs.retro68.tools;
|
tools = pkgs.retro68.tools;
|
||||||
hfsutils = pkgs.retro68.hfsutils;
|
hfsutils = pkgs.retro68.hfsutils;
|
||||||
|
|
||||||
default = pkgs.runCommand "Retro68" {} ''
|
default = pkgs.runCommand "Retro68" { } ''
|
||||||
mkdir $out
|
mkdir $out
|
||||||
mkdir $out/m68k-apple-macos
|
mkdir $out/m68k-apple-macos
|
||||||
mkdir $out/powerpc-apple-macos
|
mkdir $out/powerpc-apple-macos
|
||||||
@ -85,8 +87,9 @@
|
|||||||
flake = {
|
flake = {
|
||||||
overlays.default =
|
overlays.default =
|
||||||
lib.composeManyExtensions [
|
lib.composeManyExtensions [
|
||||||
((import nix/overlay.nix) {
|
((import nix/overlay.nix) {
|
||||||
multiversal_src = if builtins.pathExists ./multiversal/make-multiverse.rb
|
multiversal_src =
|
||||||
|
if builtins.pathExists ./multiversal/make-multiverse.rb
|
||||||
then ./multiversal
|
then ./multiversal
|
||||||
else multiversal;
|
else multiversal;
|
||||||
})
|
})
|
||||||
|
150
nix/overlay.nix
150
nix/overlay.nix
@ -10,7 +10,7 @@ pkgs: prevPkgs: {
|
|||||||
src = ../.;
|
src = ../.;
|
||||||
nativeBuildInputs = [ cmake bison flex ruby ninja bash ];
|
nativeBuildInputs = [ cmake bison flex ruby ninja bash ];
|
||||||
buildInputs = [ boost gmp mpfr libmpc zlib ]
|
buildInputs = [ boost gmp mpfr libmpc zlib ]
|
||||||
++ lib.optional hostPlatform.isDarwin
|
++ lib.optional hostPlatform.isDarwin
|
||||||
darwin.apple_sdk.frameworks.ApplicationServices;
|
darwin.apple_sdk.frameworks.ApplicationServices;
|
||||||
buildCommand = ''
|
buildCommand = ''
|
||||||
bash $src/build-toolchain.bash --ninja --prefix=$out --no-carbon
|
bash $src/build-toolchain.bash --ninja --prefix=$out --no-carbon
|
||||||
@ -56,7 +56,7 @@ pkgs: prevPkgs: {
|
|||||||
|
|
||||||
nativeBuildInputs = [ cmake bison flex ];
|
nativeBuildInputs = [ cmake bison flex ];
|
||||||
buildInputs = [ boost zlib retro68.hfsutils ]
|
buildInputs = [ boost zlib retro68.hfsutils ]
|
||||||
++ lib.optional hostPlatform.isDarwin
|
++ lib.optional hostPlatform.isDarwin
|
||||||
darwin.apple_sdk.frameworks.ApplicationServices;
|
darwin.apple_sdk.frameworks.ApplicationServices;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -75,15 +75,17 @@ pkgs: prevPkgs: {
|
|||||||
++ stdenv.targetPlatform.retro68BinutilsConfig or [ ];
|
++ stdenv.targetPlatform.retro68BinutilsConfig or [ ];
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
postInstall = let
|
postInstall =
|
||||||
ld = "$out/bin/${stdenv.targetPlatform.config}-ld";
|
let
|
||||||
ld_real = "$out/bin/${stdenv.targetPlatform.config}-ld.real";
|
ld = "$out/bin/${stdenv.targetPlatform.config}-ld";
|
||||||
|
ld_real = "$out/bin/${stdenv.targetPlatform.config}-ld.real";
|
||||||
|
|
||||||
in ''
|
in
|
||||||
mv ${ld} ${ld_real}
|
''
|
||||||
|
mv ${ld} ${ld_real}
|
||||||
|
|
||||||
echo "#!${stdenv.shell}" > ${ld}
|
echo "#!${stdenv.shell}" > ${ld}
|
||||||
echo "exec \$'' + ''
|
echo "exec \$'' + ''
|
||||||
{RETRO68_LD_WRAPPER_${stdenv.targetPlatform.cmakeSystemName}-${ld_real}} \"\$@\"" >> ${ld}
|
{RETRO68_LD_WRAPPER_${stdenv.targetPlatform.cmakeSystemName}-${ld_real}} \"\$@\"" >> ${ld}
|
||||||
chmod +x ${ld}
|
chmod +x ${ld}
|
||||||
|
|
||||||
@ -117,12 +119,12 @@ pkgs: prevPkgs: {
|
|||||||
make -j$NIX_BUILD_CORES
|
make -j$NIX_BUILD_CORES
|
||||||
make install
|
make install
|
||||||
'';
|
'';
|
||||||
env.CXXFLAGS="--std=c++14"; # gcc 9 doesn't seem to like C++17
|
env.CXXFLAGS = "--std=c++14"; # gcc 9 doesn't seem to like C++17
|
||||||
};
|
};
|
||||||
|
|
||||||
# binutils -- binutils with the wrappers provided by nixpkgs
|
# binutils -- binutils with the wrappers provided by nixpkgs
|
||||||
binutils = pkgs.wrapBintoolsWith {
|
binutils = pkgs.wrapBintoolsWith {
|
||||||
bintools = pkgs.retro68.binutils_unwrapped;
|
bintools = pkgs.retro68.binutils_unwrapped;
|
||||||
libc = null;
|
libc = null;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -147,54 +149,56 @@ pkgs: prevPkgs: {
|
|||||||
|
|
||||||
} // prevPkgs.lib.optionalAttrs (prevPkgs.hostPlatform ? retro68) {
|
} // prevPkgs.lib.optionalAttrs (prevPkgs.hostPlatform ? retro68) {
|
||||||
|
|
||||||
setup_hook = let
|
setup_hook =
|
||||||
systemName = pkgs.targetPlatform.cmakeSystemName;
|
let
|
||||||
toolchain = pkgs.writeTextFile {
|
systemName = pkgs.targetPlatform.cmakeSystemName;
|
||||||
name = "retro68.cmake-toolchain";
|
toolchain = pkgs.writeTextFile {
|
||||||
text = ''
|
name = "retro68.cmake-toolchain";
|
||||||
set(CMAKE_SYSTEM_NAME ${systemName})
|
text = ''
|
||||||
set(CMAKE_SYSTEM_VERSION 1)
|
set(CMAKE_SYSTEM_NAME ${systemName})
|
||||||
set(CMAKE_CROSSCOMPILING TRUE)
|
set(CMAKE_SYSTEM_VERSION 1)
|
||||||
|
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" )
|
set(MAKE_PEF "${pkgs.buildPackages.retro68.tools}/bin/MakePEF" )
|
||||||
|
|
||||||
include(${../cmake/add_application.cmake})
|
include(${../cmake/add_application.cmake})
|
||||||
'' + (pkgs.lib.optionalString (systemName == "RetroCarbon") ''
|
'' + (pkgs.lib.optionalString (systemName == "RetroCarbon") ''
|
||||||
set(CMAKE_EXE_LINKER_FLAGS_INIT "-carbon")
|
set(CMAKE_EXE_LINKER_FLAGS_INIT "-carbon")
|
||||||
set(CMAKE_SHARED_LINKER_FLAGS_INIT "-carbon")
|
set(CMAKE_SHARED_LINKER_FLAGS_INIT "-carbon")
|
||||||
add_definitions( -DTARGET_API_MAC_CARBON=1 )
|
add_definitions( -DTARGET_API_MAC_CARBON=1 )
|
||||||
'');
|
'');
|
||||||
};
|
};
|
||||||
hook = pkgs.writeTextFile {
|
hook = pkgs.writeTextFile {
|
||||||
name = "retro68.setup_hook";
|
name = "retro68.setup_hook";
|
||||||
text = ''
|
text = ''
|
||||||
export CMAKE_TOOLCHAIN_FILE=${toolchain}
|
export CMAKE_TOOLCHAIN_FILE=${toolchain}
|
||||||
|
|
||||||
retro68_addRIncludes() {
|
retro68_addRIncludes() {
|
||||||
case $depHostOffset in
|
case $depHostOffset in
|
||||||
-1) local role='BUILD_' ;;
|
-1) local role='BUILD_' ;;
|
||||||
0) local role="" ;;
|
0) local role="" ;;
|
||||||
1) local role='TARGET_' ;;
|
1) local role='TARGET_' ;;
|
||||||
*) echo "retro68_addRIncludes: Error: Cannot be used with $depHostOffset-offset deps" >2;
|
*) echo "retro68_addRIncludes: Error: Cannot be used with $depHostOffset-offset deps" >2;
|
||||||
return 1 ;;
|
return 1 ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
if [[ -d "$1/RIncludes" ]]; then
|
if [[ -d "$1/RIncludes" ]]; then
|
||||||
export REZ_INCLUDE_PATH+=":$1/RIncludes"
|
export REZ_INCLUDE_PATH+=":$1/RIncludes"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
addEnvHooks "$targetOffset" retro68_addRIncludes
|
addEnvHooks "$targetOffset" retro68_addRIncludes
|
||||||
|
|
||||||
'' + (pkgs.lib.optionalString (systemName == "Retro68") ''
|
'' + (pkgs.lib.optionalString (systemName == "Retro68") ''
|
||||||
export RETRO68_LD_WRAPPER_Retro68="${pkgs.buildPackages.retro68.tools}/bin/Elf2Mac"
|
export RETRO68_LD_WRAPPER_Retro68="${pkgs.buildPackages.retro68.tools}/bin/Elf2Mac"
|
||||||
export RETRO68_REAL_LD="${pkgs.buildPackages.retro68.binutils_unwrapped}/bin/m68k-apple-macos-ld.real"
|
export RETRO68_REAL_LD="${pkgs.buildPackages.retro68.binutils_unwrapped}/bin/m68k-apple-macos-ld.real"
|
||||||
'');
|
'');
|
||||||
};
|
};
|
||||||
in pkgs.makeSetupHook { name = "retro68.setup_hook"; } hook;
|
in
|
||||||
|
pkgs.makeSetupHook { name = "retro68.setup_hook"; } hook;
|
||||||
|
|
||||||
# ----------- Retro68 core libraries -------------
|
# ----------- Retro68 core libraries -------------
|
||||||
|
|
||||||
@ -221,14 +225,15 @@ pkgs: prevPkgs: {
|
|||||||
|
|
||||||
import_libraries = with pkgs;
|
import_libraries = with pkgs;
|
||||||
if stdenvNoCC.targetPlatform.system != "m68k-macos" then
|
if stdenvNoCC.targetPlatform.system != "m68k-macos" then
|
||||||
stdenvNoCC.mkDerivation {
|
stdenvNoCC.mkDerivation
|
||||||
name = "retro68.import_libraries";
|
{
|
||||||
src = ../ImportLibraries;
|
name = "retro68.import_libraries";
|
||||||
buildCommand = ''
|
src = ../ImportLibraries;
|
||||||
mkdir -p $out/lib
|
buildCommand = ''
|
||||||
cp $src/*.a $out/lib/
|
mkdir -p $out/lib
|
||||||
'';
|
cp $src/*.a $out/lib/
|
||||||
}
|
'';
|
||||||
|
}
|
||||||
else
|
else
|
||||||
null;
|
null;
|
||||||
|
|
||||||
@ -243,7 +248,8 @@ pkgs: prevPkgs: {
|
|||||||
set(CMAKE_CROSSCOMPILING TRUE)
|
set(CMAKE_CROSSCOMPILING TRUE)
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
in (pkgs.stdenv.override {
|
in
|
||||||
|
(pkgs.stdenv.override {
|
||||||
cc = stdenv.cc.override { extraPackages = [ ]; };
|
cc = stdenv.cc.override { extraPackages = [ ]; };
|
||||||
}).mkDerivation {
|
}).mkDerivation {
|
||||||
name = "libretro";
|
name = "libretro";
|
||||||
@ -279,14 +285,16 @@ pkgs: prevPkgs: {
|
|||||||
# binutils -- binutils with the wrappers provided by nixpkgs
|
# binutils -- binutils with the wrappers provided by nixpkgs
|
||||||
# note: on nix/darwin (as of nixpkgs 23.11), nixpkgs seems to
|
# note: on nix/darwin (as of nixpkgs 23.11), nixpkgs seems to
|
||||||
# ignore (or re-override) this override.
|
# ignore (or re-override) this override.
|
||||||
binutils = if (prevPkgs.targetPlatform ? retro68) then
|
binutils =
|
||||||
pkgs.retro68.binutils
|
if (prevPkgs.targetPlatform ? retro68) then
|
||||||
else
|
pkgs.retro68.binutils
|
||||||
prevPkgs.binutils;
|
else
|
||||||
|
prevPkgs.binutils;
|
||||||
|
|
||||||
# gcc -- gcc with the wrappers provided by nixpkgs
|
# gcc -- gcc with the wrappers provided by nixpkgs
|
||||||
gcc = if (prevPkgs.targetPlatform ? retro68) then
|
gcc =
|
||||||
pkgs.retro68.gcc
|
if (prevPkgs.targetPlatform ? retro68) then
|
||||||
else
|
pkgs.retro68.gcc
|
||||||
prevPkgs.gcc;
|
else
|
||||||
|
prevPkgs.gcc;
|
||||||
}
|
}
|
||||||
|
@ -2,18 +2,20 @@ pkgs: prevPkgs: {
|
|||||||
retro68 = prevPkgs.retro68.overrideScope' (self: prevRetro: {
|
retro68 = prevPkgs.retro68.overrideScope' (self: prevRetro: {
|
||||||
samples = with pkgs;
|
samples = with pkgs;
|
||||||
let
|
let
|
||||||
individualSamples = lib.mapAttrs (key: path:
|
individualSamples = lib.mapAttrs
|
||||||
stdenv.mkDerivation {
|
(key: path:
|
||||||
name = "retro68.samples." + key;
|
stdenv.mkDerivation {
|
||||||
src = path;
|
name = "retro68.samples." + key;
|
||||||
nativeBuildInputs = [ buildPackages.ninja buildPackages.cmake ];
|
src = path;
|
||||||
buildInputs = [ retro68.console ];
|
nativeBuildInputs = [ buildPackages.ninja buildPackages.cmake ];
|
||||||
installPhase = ''
|
buildInputs = [ retro68.console ];
|
||||||
mkdir $out
|
installPhase = ''
|
||||||
cp *.bin $out/
|
mkdir $out
|
||||||
rm -f $out/*.code.bin $out/*.rsrc.bin
|
cp *.bin $out/
|
||||||
'';
|
rm -f $out/*.code.bin $out/*.rsrc.bin
|
||||||
}) ({
|
'';
|
||||||
|
})
|
||||||
|
({
|
||||||
dialog = ../Samples/Dialog;
|
dialog = ../Samples/Dialog;
|
||||||
helloworld = ../Samples/HelloWorld;
|
helloworld = ../Samples/HelloWorld;
|
||||||
raytracer = ../Samples/Raytracer;
|
raytracer = ../Samples/Raytracer;
|
||||||
@ -25,8 +27,9 @@ pkgs: prevPkgs: {
|
|||||||
} // lib.optionalAttrs (targetPlatform.cmakeSystemName == "Retro68") {
|
} // lib.optionalAttrs (targetPlatform.cmakeSystemName == "Retro68") {
|
||||||
systemextension = ../Samples/SystemExtension;
|
systemextension = ../Samples/SystemExtension;
|
||||||
launcher = ../Samples/Launcher;
|
launcher = ../Samples/Launcher;
|
||||||
}) // { launchapplserver = self.launchapplserver; };
|
}) // { launchapplserver = self.launchapplserver; };
|
||||||
in runCommand "retro68.samples" { } ''
|
in
|
||||||
|
runCommand "retro68.samples" { } ''
|
||||||
mkdir -p $out/
|
mkdir -p $out/
|
||||||
|
|
||||||
${lib.concatMapStrings (x: ''
|
${lib.concatMapStrings (x: ''
|
||||||
|
@ -1,58 +1,59 @@
|
|||||||
pkgs: prevPkgs:
|
pkgs: prevPkgs:
|
||||||
{
|
{
|
||||||
retro68 = if !(prevPkgs.hostPlatform ? retro68) then
|
retro68 =
|
||||||
prevPkgs.retro68
|
if !(prevPkgs.hostPlatform ? retro68) then
|
||||||
else
|
prevPkgs.retro68
|
||||||
prevPkgs.retro68.overrideScope' (self: prevRetro: {
|
else
|
||||||
|
prevPkgs.retro68.overrideScope' (self: prevRetro: {
|
||||||
|
|
||||||
mpw_35_gm = with pkgs;
|
mpw_35_gm = with pkgs;
|
||||||
fetchurl {
|
fetchurl {
|
||||||
url =
|
url =
|
||||||
"https://web.archive.org/web/20210309154524/https://staticky.com/mirrors/ftp.apple.com/developer/Tool_Chest/Core_Mac_OS_Tools/MPW_etc./MPW-GM_Images/MPW-GM.img.bin";
|
"https://web.archive.org/web/20210309154524/https://staticky.com/mirrors/ftp.apple.com/developer/Tool_Chest/Core_Mac_OS_Tools/MPW_etc./MPW-GM_Images/MPW-GM.img.bin";
|
||||||
sha256 = "0wm8dwmm0cpp8px27in564ih27sn5vbydz3jqpzwh04qpfazmfwr";
|
sha256 = "0wm8dwmm0cpp8px27in564ih27sn5vbydz3jqpzwh04qpfazmfwr";
|
||||||
};
|
};
|
||||||
|
|
||||||
universal = with pkgs;
|
universal = with pkgs;
|
||||||
stdenvNoCC.mkDerivation {
|
stdenvNoCC.mkDerivation {
|
||||||
name = "retro68.universal";
|
name = "retro68.universal";
|
||||||
src = retro68.mpw_35_gm;
|
src = retro68.mpw_35_gm;
|
||||||
nativeBuildInputs = with buildPackages.retro68; [
|
nativeBuildInputs = with buildPackages.retro68; [
|
||||||
tools
|
tools
|
||||||
hfsutils
|
hfsutils
|
||||||
binutils_unwrapped
|
binutils_unwrapped
|
||||||
];
|
];
|
||||||
|
|
||||||
buildCommand = ''
|
buildCommand = ''
|
||||||
ConvertDiskImage $src decoded.dsk
|
ConvertDiskImage $src decoded.dsk
|
||||||
export HOME=.
|
export HOME=.
|
||||||
hmount decoded.dsk
|
hmount decoded.dsk
|
||||||
mkdir -p CIncludes RIncludes
|
mkdir -p CIncludes RIncludes
|
||||||
hcopy -t 'MPW-GM:MPW-GM:Interfaces&Libraries:Interfaces:CIncludes:*.h' CIncludes/
|
hcopy -t 'MPW-GM:MPW-GM:Interfaces&Libraries:Interfaces:CIncludes:*.h' CIncludes/
|
||||||
hcopy -t 'MPW-GM:MPW-GM:Interfaces&Libraries:Interfaces:RIncludes:*.r' RIncludes/
|
hcopy -t 'MPW-GM:MPW-GM:Interfaces&Libraries:Interfaces:RIncludes:*.r' RIncludes/
|
||||||
mkdir -p $out/include $out/RIncludes
|
mkdir -p $out/include $out/RIncludes
|
||||||
bash ${../prepare-headers.sh} CIncludes $out/include
|
bash ${../prepare-headers.sh} CIncludes $out/include
|
||||||
bash ${../prepare-rincludes.sh} RIncludes $out/RIncludes
|
bash ${../prepare-rincludes.sh} RIncludes $out/RIncludes
|
||||||
|
|
||||||
. ${../interfaces-and-libraries.sh}
|
. ${../interfaces-and-libraries.sh}
|
||||||
'' + (pkgs.lib.optionalString (pkgs.targetPlatform.cmakeSystemName == "Retro68") ''
|
'' + (pkgs.lib.optionalString (pkgs.targetPlatform.cmakeSystemName == "Retro68") ''
|
||||||
mkdir -p lib68
|
mkdir -p lib68
|
||||||
hcopy -r 'MPW-GM:MPW-GM:Interfaces&Libraries:Libraries:Libraries:*.o' lib68
|
hcopy -r 'MPW-GM:MPW-GM:Interfaces&Libraries:Libraries:Libraries:*.o' lib68
|
||||||
M68KLIBRARIES=lib68
|
M68KLIBRARIES=lib68
|
||||||
setup68KLibraries $out/
|
setup68KLibraries $out/
|
||||||
mv $out/lib68k $out/lib
|
mv $out/lib68k $out/lib
|
||||||
'') + (pkgs.lib.optionalString (pkgs.targetPlatform.cmakeSystemName != "Retro68") ''
|
'') + (pkgs.lib.optionalString (pkgs.targetPlatform.cmakeSystemName != "Retro68") ''
|
||||||
mkdir -p libppc peflibs
|
mkdir -p libppc peflibs
|
||||||
hcopy -r 'MPW-GM:MPW-GM:Interfaces&Libraries:Libraries:PPCLibraries:*.o' libppc
|
hcopy -r 'MPW-GM:MPW-GM:Interfaces&Libraries:Libraries:PPCLibraries:*.o' libppc
|
||||||
hcopy -m 'MPW-GM:MPW-GM:Interfaces&Libraries:Libraries:SharedLibraries:*' peflibs
|
hcopy -m 'MPW-GM:MPW-GM:Interfaces&Libraries:Libraries:SharedLibraries:*' peflibs
|
||||||
PPCLIBRARIES=libppc
|
PPCLIBRARIES=libppc
|
||||||
SHAREDLIBRARIES=peflibs
|
SHAREDLIBRARIES=peflibs
|
||||||
INTERFACELIB=peflibs/InterfaceLib.bin
|
INTERFACELIB=peflibs/InterfaceLib.bin
|
||||||
|
|
||||||
setupPPCLibraries $out/
|
setupPPCLibraries $out/
|
||||||
mv $out/libppc $out/lib
|
mv $out/libppc $out/lib
|
||||||
'');
|
'');
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
stdenvUniversal = pkgs.stdenv.override {
|
stdenvUniversal = pkgs.stdenv.override {
|
||||||
cc = pkgs.stdenv.cc.override {
|
cc = pkgs.stdenv.cc.override {
|
||||||
|
Loading…
Reference in New Issue
Block a user