mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 15:03:28 +00:00
_86Box: darwin support
This commit is contained in:
parent
2e7880b2d0
commit
04d72f3b80
15
pkgs/applications/emulators/86box/darwin.patch
Normal file
15
pkgs/applications/emulators/86box/darwin.patch
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
diff --git a/src/qt/qt_platform.cpp b/src/qt/qt_platform.cpp
|
||||||
|
index 824f71023..1f38e4b5f 100644
|
||||||
|
--- a/src/qt/qt_platform.cpp
|
||||||
|
+++ b/src/qt/qt_platform.cpp
|
||||||
|
@@ -673,6 +673,10 @@ plat_init_rom_paths(void)
|
||||||
|
rom_add_path(QDir(path).filePath("86Box/roms").toUtf8().constData());
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
+
|
||||||
|
+ #ifdef __APPLE__
|
||||||
|
+ rom_add_path("@out@/share/86Box/roms/");
|
||||||
|
+ #endif
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
@ -1,5 +1,6 @@
|
|||||||
{
|
{
|
||||||
stdenv,
|
stdenv,
|
||||||
|
darwin,
|
||||||
lib,
|
lib,
|
||||||
fetchFromGitHub,
|
fetchFromGitHub,
|
||||||
cmake,
|
cmake,
|
||||||
@ -42,6 +43,12 @@ stdenv.mkDerivation (finalAttrs: {
|
|||||||
hash = "sha256-ioE0EVIXv/biXXvLqwhmtZ/RJM0nLqcE+i+CU+WXBY4=";
|
hash = "sha256-ioE0EVIXv/biXXvLqwhmtZ/RJM0nLqcE+i+CU+WXBY4=";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
patches = [ ./darwin.patch ];
|
||||||
|
|
||||||
|
postPatch = ''
|
||||||
|
substituteAllInPlace src/qt/qt_platform.cpp
|
||||||
|
'';
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
cmake
|
cmake
|
||||||
pkg-config
|
pkg-config
|
||||||
@ -64,7 +71,8 @@ stdenv.mkDerivation (finalAttrs: {
|
|||||||
qt5.qttools
|
qt5.qttools
|
||||||
] ++ lib.optional stdenv.isLinux alsa-lib
|
] ++ lib.optional stdenv.isLinux alsa-lib
|
||||||
++ lib.optional enableWayland wayland
|
++ lib.optional enableWayland wayland
|
||||||
++ lib.optional enableVncRenderer libvncserver;
|
++ lib.optional enableVncRenderer libvncserver
|
||||||
|
++ lib.optional stdenv.isDarwin darwin.apple_sdk_11_0.libs.xpc;
|
||||||
|
|
||||||
cmakeFlags =
|
cmakeFlags =
|
||||||
lib.optional stdenv.isDarwin "-DCMAKE_MACOSX_BUNDLE=OFF"
|
lib.optional stdenv.isDarwin "-DCMAKE_MACOSX_BUNDLE=OFF"
|
||||||
@ -114,6 +122,6 @@ stdenv.mkDerivation (finalAttrs: {
|
|||||||
homepage = "https://86box.net/";
|
homepage = "https://86box.net/";
|
||||||
license = with licenses; [ gpl2Only ] ++ optional (unfreeEnableDiscord || unfreeEnableRoms) unfree;
|
license = with licenses; [ gpl2Only ] ++ optional (unfreeEnableDiscord || unfreeEnableRoms) unfree;
|
||||||
maintainers = [ maintainers.jchw ];
|
maintainers = [ maintainers.jchw ];
|
||||||
platforms = platforms.linux;
|
platforms = platforms.linux ++ platforms.darwin;
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user