xgalagapp: fix darwin and cross-compiled builds
Forces `$CXX` back to the correct value so it doesn't just assume `g++`. Also rewrites the derivation to use the standard `buildPhase`, and properly call the `preInstall` and `postInstall` hooks.
This commit is contained in:
@@ -19,14 +19,20 @@ stdenv.mkDerivation rec {
|
||||
libXpm
|
||||
];
|
||||
|
||||
buildPhase = ''
|
||||
make all HIGH_SCORES_FILE=.xgalaga++.scores
|
||||
'';
|
||||
buildFlags = [
|
||||
"all"
|
||||
"HIGH_SCORES_FILE=.xgalaga++.scores"
|
||||
"CXX=${stdenv.cc.targetPrefix}c++" # fix darwin and cross-compiled builds
|
||||
];
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
mkdir -p $out/bin $out/share/man
|
||||
mv xgalaga++ $out/bin
|
||||
mv xgalaga++.6x $out/share/man
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
@@ -34,6 +40,6 @@ stdenv.mkDerivation rec {
|
||||
description = "XGalaga++ is a classic single screen vertical shoot ’em up. It is inspired by XGalaga and reuses most of its sprites";
|
||||
mainProgram = "xgalaga++";
|
||||
license = licenses.gpl2Plus;
|
||||
platforms = platforms.linux;
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user