Commit 7683eadc authored by hqurve's avatar hqurve
Browse files

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
parent 00bbc3f1
Loading
Loading
Loading
Loading
+12 −2
Original line number Diff line number Diff line
{ 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";
  };
}
+3 −1
Original line number Diff line number Diff line
@@ -31682,7 +31682,9 @@ with pkgs;
  rrootage = callPackage ../games/rrootage { };
  space-cadet-pinball = callPackage ../games/space-cadet-pinball { };
  space-cadet-pinball = callPackage ../games/space-cadet-pinball {
    inherit (darwin.apple_sdk.frameworks) Cocoa;
  };
  starsector = callPackage ../games/starsector {
    openjdk = openjdk8;