From 7683eadc8768cada0c4e427a56f58f1a85459de7 Mon Sep 17 00:00:00 2001 From: hqurve Date: Fri, 1 Apr 2022 07:40:09 -0400 Subject: space-cadet-pinball: reimplement fix darwin build Darwin builds need a custom installPhase since it is excluded from the cmake install https://github.com/k4zmu2a/SpaceCadetPinball/blob/0f88e43ba261bc21fa5c3ef9d44969a2a079d0de/CMakeLists.txt#L221 --- pkgs/games/space-cadet-pinball/default.nix | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'pkgs/games') diff --git a/pkgs/games/space-cadet-pinball/default.nix b/pkgs/games/space-cadet-pinball/default.nix index 312b2e32823b..307fc2043a64 100644 --- a/pkgs/games/space-cadet-pinball/default.nix +++ b/pkgs/games/space-cadet-pinball/default.nix @@ -1,5 +1,5 @@ { lib, stdenv, fetchFromGitHub, fetchzip -, cmake, SDL2, SDL2_mixer +, cmake, SDL2, SDL2_mixer, Cocoa , unrar-wrapper, makeWrapper , fetchpatch }: @@ -38,7 +38,16 @@ stdenv.mkDerivation rec { SDL2_mixer cmake makeWrapper - ]; + ] ++ lib.optional stdenv.isDarwin Cocoa; + + # Darwin needs a custom installphase since it is excluded from the cmake install + # https://github.com/k4zmu2a/SpaceCadetPinball/blob/0f88e43ba261bc21fa5c3ef9d44969a2a079d0de/CMakeLists.txt#L221 + installPhase = lib.optionalString stdenv.isDarwin '' + runHook preInstall + mkdir -p $out/bin + install ../bin/SpaceCadetPinball $out/bin + runHook postInstall + ''; postInstall = '' mkdir -p $out/lib/SpaceCadetPinball @@ -57,5 +66,6 @@ stdenv.mkDerivation rec { license = with licenses; [ unfree mit ]; maintainers = [ maintainers.hqurve ]; platforms = platforms.all; + mainProgram = "SpaceCadetPinball"; }; } -- cgit 1.4.1