nanoboyadvance: Build the Darwin app bundle (#353773)
This commit is contained in:
@@ -37,6 +37,11 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
url = "https://github.com/nba-emu/NanoBoyAdvance/commit/f5551cc1aa6a12b3d65dd56d186c73a67f3d9dd6.patch";
|
||||
hash = "sha256-TCyN0qz7o7BDhVZtaTsWCZAcKThi5oVqUM0NGmj44FI=";
|
||||
})
|
||||
(fetchpatch {
|
||||
name = "fix-darwin-bundle-install-path.patch";
|
||||
url = "https://github.com/nba-emu/NanoBoyAdvance/commit/bd07a261141cd1f67b828d20f6d01a97adf91c16.patch";
|
||||
hash = "sha256-Nqz35PGfPBZ3Lg6szez4k3R/NkgObNndvbxY8JCY40Y";
|
||||
})
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
@@ -53,13 +58,24 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
libunarr
|
||||
];
|
||||
|
||||
cmakeFlags = [
|
||||
(lib.cmakeFeature "FETCHCONTENT_SOURCE_DIR_GLAD" "${gladSrc}")
|
||||
(lib.cmakeBool "USE_SYSTEM_FMT" true)
|
||||
(lib.cmakeBool "USE_SYSTEM_TOML11" true)
|
||||
(lib.cmakeBool "USE_SYSTEM_UNARR" true)
|
||||
(lib.cmakeBool "PORTABLE_MODE" false)
|
||||
];
|
||||
cmakeFlags =
|
||||
[
|
||||
(lib.cmakeFeature "FETCHCONTENT_SOURCE_DIR_GLAD" "${gladSrc}")
|
||||
(lib.cmakeBool "USE_SYSTEM_FMT" true)
|
||||
(lib.cmakeBool "USE_SYSTEM_TOML11" true)
|
||||
(lib.cmakeBool "USE_SYSTEM_UNARR" true)
|
||||
(lib.cmakeBool "PORTABLE_MODE" false)
|
||||
]
|
||||
++ lib.optionals stdenv.hostPlatform.isDarwin [
|
||||
(lib.cmakeBool "MACOS_BUILD_APP_BUNDLE" true)
|
||||
(lib.cmakeBool "MACOS_BUNDLE_QT" false)
|
||||
];
|
||||
|
||||
# Make it runnable from the terminal on Darwin
|
||||
postInstall = lib.optionals stdenv.hostPlatform.isDarwin ''
|
||||
mkdir "$out/bin"
|
||||
ln -s "$out/Applications/NanoBoyAdvance.app/Contents/MacOS/NanoBoyAdvance" "$out/bin/NanoBoyAdvance"
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "Cycle-accurate Nintendo Game Boy Advance emulator";
|
||||
|
||||
Reference in New Issue
Block a user