about summary refs log tree commit diff
path: root/pkgs/games
diff options
context:
space:
mode:
authorBen Siraphob <bensiraphob@gmail.com>2022-03-30 20:36:33 -0500
committerGitHub <noreply@github.com>2022-03-30 20:36:33 -0500
commit1f545f9900e025cb5a5ef9132e520ab777de147d (patch)
tree002313669867d945fc27151ab1ca94d10e0058ef /pkgs/games
parent0392957d1bf9f902b0cf4863b9b4c3b3f9c352cf (diff)
parentd066c1229893851c997d2b79b5747d09ff4c0b8e (diff)
downloadnixlib-1f545f9900e025cb5a5ef9132e520ab777de147d.tar
nixlib-1f545f9900e025cb5a5ef9132e520ab777de147d.tar.gz
nixlib-1f545f9900e025cb5a5ef9132e520ab777de147d.tar.bz2
nixlib-1f545f9900e025cb5a5ef9132e520ab777de147d.tar.lz
nixlib-1f545f9900e025cb5a5ef9132e520ab777de147d.tar.xz
nixlib-1f545f9900e025cb5a5ef9132e520ab777de147d.tar.zst
nixlib-1f545f9900e025cb5a5ef9132e520ab777de147d.zip
Merge pull request #166506 from siraben/space-cadet-pinball-darwin
Diffstat (limited to 'pkgs/games')
-rw-r--r--pkgs/games/space-cadet-pinball/default.nix13
1 files changed, 10 insertions, 3 deletions
diff --git a/pkgs/games/space-cadet-pinball/default.nix b/pkgs/games/space-cadet-pinball/default.nix
index 312b2e32823b..31df5377f1d3 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,15 +38,21 @@ stdenv.mkDerivation rec {
     SDL2_mixer
     cmake
     makeWrapper
+    Cocoa
   ];
 
-  postInstall = ''
+  preBuild = ''
     mkdir -p $out/lib/SpaceCadetPinball
+    mkdir -p $out/bin
+  '';
+
+  installPhase = ''
     install ${assets}/*.{DAT,DOC,MID,BMP,INF} ${assets}/Sounds/*.WAV $out/lib/SpaceCadetPinball
 
     # Assets are loaded from the directory of the program is stored in
     # https://github.com/k4zmu2a/SpaceCadetPinball/blob/de13d4e326b2dfa8e6dfb59815c0a8b9657f942d/SpaceCadetPinball/winmain.cpp#L119
-    mv $out/bin/SpaceCadetPinball $out/lib/SpaceCadetPinball
+    cp ../bin/SpaceCadetPinball $out/bin
+    cp $out/bin/SpaceCadetPinball $out/lib/SpaceCadetPinball
     makeWrapper $out/lib/SpaceCadetPinball/SpaceCadetPinball $out/bin/SpaceCadetPinball
   '';
 
@@ -57,5 +63,6 @@ stdenv.mkDerivation rec {
     license = with licenses; [ unfree mit ];
     maintainers = [ maintainers.hqurve ];
     platforms = platforms.all;
+    mainProgram = "SpaceCadetPinball";
   };
 }