mirror of
https://github.com/autc04/Retro68.git
synced 2025-01-13 16:33:02 +00:00
various fixes & workarounds for nix/mac
This commit is contained in:
parent
3c453c897f
commit
1ee050839f
@ -32,6 +32,7 @@ pkgs: prevPkgs: {
|
|||||||
mkdir -p $out/share/man/man1
|
mkdir -p $out/share/man/man1
|
||||||
'';
|
'';
|
||||||
configureFlags = [ "--mandir=$(out)/share/man" "--enable-devlibs" ];
|
configureFlags = [ "--mandir=$(out)/share/man" "--enable-devlibs" ];
|
||||||
|
env.CFLAGS = "--std=c89"; # the configure script fails with modern C
|
||||||
};
|
};
|
||||||
|
|
||||||
# tools -- native tools that are part of Retro68
|
# tools -- native tools that are part of Retro68
|
||||||
@ -116,6 +117,32 @@ 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
|
||||||
|
};
|
||||||
|
|
||||||
|
# binutils -- binutils with the wrappers provided by nixpkgs
|
||||||
|
binutils = pkgs.wrapBintoolsWith {
|
||||||
|
bintools = pkgs.retro68.binutils_unwrapped;
|
||||||
|
libc = null;
|
||||||
|
};
|
||||||
|
|
||||||
|
# gcc -- gcc with the wrappers provided by nixpkgs
|
||||||
|
gcc = pkgs.wrapCCWith {
|
||||||
|
cc = pkgs.retro68.gcc_unwrapped;
|
||||||
|
bintools = pkgs.retro68.binutils;
|
||||||
|
libc = null;
|
||||||
|
|
||||||
|
# don't allow nix to add options for hardening
|
||||||
|
extraBuildCommands = ''
|
||||||
|
echo "" > $out/nix-support/add-hardening.sh
|
||||||
|
'';
|
||||||
|
|
||||||
|
extraPackages = with pkgs.targetPackages.retro68; [
|
||||||
|
multiversal
|
||||||
|
import_libraries
|
||||||
|
libretro
|
||||||
|
setup_hook
|
||||||
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
} // prevPkgs.lib.optionalAttrs (prevPkgs.hostPlatform ? retro68) {
|
} // prevPkgs.lib.optionalAttrs (prevPkgs.hostPlatform ? retro68) {
|
||||||
@ -178,7 +205,7 @@ pkgs: prevPkgs: {
|
|||||||
}).mkDerivation {
|
}).mkDerivation {
|
||||||
name = "retro68.multiversal";
|
name = "retro68.multiversal";
|
||||||
src = multiversal_src;
|
src = multiversal_src;
|
||||||
nativeBuildInputs = [ buildPackages.ruby ];
|
nativeBuildInputs = [ pkgsBuildBuild.ruby ];
|
||||||
buildCommand = ''
|
buildCommand = ''
|
||||||
echo $src
|
echo $src
|
||||||
build=`pwd`
|
build=`pwd`
|
||||||
@ -250,33 +277,16 @@ pkgs: prevPkgs: {
|
|||||||
# ----------- Binutils & GCC wrapped for nixpkgs -------------
|
# ----------- Binutils & GCC wrapped for nixpkgs -------------
|
||||||
|
|
||||||
# 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
|
||||||
|
# ignore (or re-override) this override.
|
||||||
binutils = if (prevPkgs.targetPlatform ? retro68) then
|
binutils = if (prevPkgs.targetPlatform ? retro68) then
|
||||||
pkgs.wrapBintoolsWith {
|
pkgs.retro68.binutils
|
||||||
bintools = pkgs.retro68.binutils_unwrapped;
|
|
||||||
libc = null;
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
prevPkgs.binutils;
|
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 = if (prevPkgs.targetPlatform ? retro68) then
|
||||||
pkgs.wrapCCWith {
|
pkgs.retro68.gcc
|
||||||
cc = pkgs.retro68.gcc_unwrapped;
|
|
||||||
bintools = pkgs.binutils;
|
|
||||||
libc = null;
|
|
||||||
|
|
||||||
# don't allow nix to add options for hardening
|
|
||||||
extraBuildCommands = ''
|
|
||||||
echo "" > $out/nix-support/add-hardening.sh
|
|
||||||
'';
|
|
||||||
|
|
||||||
extraPackages = with pkgs.targetPackages.retro68; [
|
|
||||||
multiversal
|
|
||||||
import_libraries
|
|
||||||
libretro
|
|
||||||
setup_hook
|
|
||||||
];
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
prevPkgs.gcc;
|
prevPkgs.gcc;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user