bsnes-hd: unbreak on x86_64-darwin

This commit is contained in:
Weijia Wang 2022-12-28 16:29:53 +01:00
parent 0ad5b19765
commit 76aaf902a5
2 changed files with 17 additions and 11 deletions

View File

@ -6,9 +6,12 @@
, SDL2
, gtk3, gtksourceview3
, alsa-lib, libao, openal, libpulseaudio
, libicns, Cocoa, OpenAL
, libicns, makeWrapper, darwin
}:
let
inherit (darwin.apple_sdk_11_0.frameworks) Cocoa OpenAL;
in
stdenv.mkDerivation {
pname = "bsnes-hd";
version = "10.6-beta";
@ -35,8 +38,9 @@ stdenv.mkDerivation {
./macos-copy-app-to-prefix.patch
];
nativeBuildInputs = [ pkg-config wrapGAppsHook ]
++ lib.optionals stdenv.isDarwin [ libicns ];
nativeBuildInputs = [ pkg-config ]
++ lib.optionals stdenv.isLinux [ wrapGAppsHook ]
++ lib.optionals stdenv.isDarwin [ libicns makeWrapper ];
buildInputs = [ SDL2 libao ]
++ lib.optionals stdenv.isLinux [ libX11 libXv udev gtk3 gtksourceview3 alsa-lib openal libpulseaudio ]
@ -44,10 +48,17 @@ stdenv.mkDerivation {
enableParallelBuilding = true;
makeFlags = [ "-C" "bsnes" "hiro=gtk3" "prefix=$(out)" ];
makeFlags = [ "-C" "bsnes" "prefix=$(out)" ]
++ lib.optionals stdenv.isLinux [ "hiro=gtk3" ]
++ lib.optionals stdenv.isDarwin [ "hiro=cocoa" ];
postInstall = lib.optionalString stdenv.isDarwin ''
mkdir -p $out/bin
makeWrapper $out/{Applications/bsnes.app/Contents/MacOS,bin}/bsnes
'';
# https://github.com/bsnes-emu/bsnes/issues/107
preFixup = ''
preFixup = lib.optionalString stdenv.isLinux ''
gappsWrapperArgs+=(
--prefix GDK_BACKEND : x11
)
@ -59,9 +70,6 @@ stdenv.mkDerivation {
license = licenses.gpl3Only;
maintainers = with maintainers; [ stevebob ];
platforms = platforms.unix;
# ../nall/traits.hpp:19:14: error: no member named 'is_floating_point_v' in namespace 'std'; did you mean 'is_floating_point'?
# using std::is_floating_point_v;
broken = (stdenv.isDarwin && stdenv.isx86_64);
mainProgram = "bsnes";
};
}

View File

@ -2175,9 +2175,7 @@ with pkgs;
ares = darwin.apple_sdk_11_0.callPackage ../applications/emulators/bsnes/ares { };
bsnes-hd = callPackage ../applications/emulators/bsnes/bsnes-hd {
inherit (darwin.apple_sdk.frameworks) Cocoa OpenAL;
};
bsnes-hd = darwin.apple_sdk_11_0.callPackage ../applications/emulators/bsnes/bsnes-hd { };
higan = callPackage ../applications/emulators/bsnes/higan { };