ringracers: darwin support (#458891)
This commit is contained in:
@@ -13,7 +13,7 @@
|
|||||||
libvpx,
|
libvpx,
|
||||||
libyuv,
|
libyuv,
|
||||||
zlib,
|
zlib,
|
||||||
makeWrapper,
|
makeBinaryWrapper,
|
||||||
makeDesktopItem,
|
makeDesktopItem,
|
||||||
copyDesktopItems,
|
copyDesktopItems,
|
||||||
pkg-config,
|
pkg-config,
|
||||||
@@ -43,7 +43,7 @@ stdenv.mkDerivation (finalAttrs: {
|
|||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
cmake
|
cmake
|
||||||
nasm
|
nasm
|
||||||
makeWrapper
|
makeBinaryWrapper
|
||||||
copyDesktopItems
|
copyDesktopItems
|
||||||
pkg-config
|
pkg-config
|
||||||
];
|
];
|
||||||
@@ -78,22 +78,41 @@ stdenv.mkDerivation (finalAttrs: {
|
|||||||
})
|
})
|
||||||
];
|
];
|
||||||
|
|
||||||
installPhase = ''
|
installPhase =
|
||||||
runHook preInstall
|
lib.optionalString stdenv.hostPlatform.isLinux ''
|
||||||
|
runHook preInstall
|
||||||
|
|
||||||
install -Dm644 ../srb2.png $out/share/icons/hicolor/256x256/apps/ringracers.png
|
install -Dm644 ../srb2.png $out/share/icons/hicolor/256x256/apps/ringracers.png
|
||||||
install -Dm755 bin/ringracers $out/bin/ringracers
|
install -Dm755 bin/ringracers $out/bin/ringracers
|
||||||
|
|
||||||
wrapProgram $out/bin/ringracers \
|
wrapProgram $out/bin/ringracers \
|
||||||
--set RINGRACERSWADDIR "${finalAttrs.assets}"
|
--set RINGRACERSWADDIR "${finalAttrs.assets}"
|
||||||
|
|
||||||
runHook postInstall
|
runHook postInstall
|
||||||
'';
|
''
|
||||||
|
+ lib.optionalString stdenv.hostPlatform.isDarwin ''
|
||||||
|
runHook preInstall
|
||||||
|
|
||||||
|
mkdir -p $out/Applications
|
||||||
|
cp -r bin/ringracers.app $out/Applications/
|
||||||
|
|
||||||
|
wrapProgram $out/Applications/ringracers.app/Contents/MacOS/ringracers \
|
||||||
|
--set RINGRACERSWADDIR "${finalAttrs.assets}"
|
||||||
|
|
||||||
|
mkdir -p $out/bin
|
||||||
|
cat << EOF > "$out/bin/ringracers"
|
||||||
|
#!${stdenv.shell}
|
||||||
|
open -na "$out/Applications/ringracers.app" --args "\$@"
|
||||||
|
EOF
|
||||||
|
chmod +x $out/bin/ringracers
|
||||||
|
|
||||||
|
runHook postInstall
|
||||||
|
'';
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
description = "Kart racing video game based on Sonic Robo Blast 2 (SRB2), itself based on a modified version of Doom Legacy";
|
description = "Kart racing video game based on Sonic Robo Blast 2 (SRB2), itself based on a modified version of Doom Legacy";
|
||||||
homepage = "https://kartkrew.org";
|
homepage = "https://kartkrew.org";
|
||||||
platforms = lib.platforms.linux;
|
platforms = lib.platforms.linux ++ lib.platforms.darwin;
|
||||||
license = lib.licenses.gpl2Plus;
|
license = lib.licenses.gpl2Plus;
|
||||||
maintainers = with lib.maintainers; [
|
maintainers = with lib.maintainers; [
|
||||||
donovanglover
|
donovanglover
|
||||||
|
|||||||
Reference in New Issue
Block a user