openspades: Fix Darwin build

This commit is contained in:
John Ericson 2018-12-20 04:38:17 -05:00 committed by John Ericson
parent b513231dc6
commit d5fe466566
2 changed files with 16 additions and 3 deletions

View File

@ -1,6 +1,7 @@
{ stdenv, fetchurl, fetchFromGitHub, cmake, unzip, zip, file { stdenv, fetchurl, fetchFromGitHub, fetchpatch, cmake, unzip, zip, file
, curl, glew , libGL, SDL2, SDL2_image, zlib, freetype, imagemagick , curl, glew , libGL, SDL2, SDL2_image, zlib, freetype, imagemagick
, openal , opusfile, libogg , openal , opusfile, libogg
, Cocoa
}: }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
@ -19,6 +20,16 @@ stdenv.mkDerivation rec {
buildInputs = [ buildInputs = [
freetype SDL2 SDL2_image libGL zlib curl glew opusfile openal libogg freetype SDL2 SDL2_image libGL zlib curl glew opusfile openal libogg
] ++ stdenv.lib.optionals stdenv.hostPlatform.isDarwin [
Cocoa
];
patches = [
# https://github.com/yvt/openspades/pull/793 fix Darwin build
(fetchpatch {
url = "https://github.com/yvt/openspades/commit/2d13704fefc475b279337e89057b117f711a35d4.diff";
sha256 = "1i7rcpjzkjhbv5pp6byzrxv7sb1iamqq5k1vyqlvkbr38k2dz0rv";
})
]; ];
cmakeFlags = [ cmakeFlags = [
@ -43,6 +54,6 @@ stdenv.mkDerivation rec {
description = "A compatible client of Ace of Spades 0.75"; description = "A compatible client of Ace of Spades 0.75";
homepage = "https://github.com/yvt/openspades/"; homepage = "https://github.com/yvt/openspades/";
license = licenses.gpl3; license = licenses.gpl3;
platforms = platforms.linux; platforms = platforms.all;
}; };
} }

View File

@ -20034,7 +20034,9 @@ with pkgs;
openrw = callPackage ../games/openrw { }; openrw = callPackage ../games/openrw { };
openspades = callPackage ../games/openspades { }; openspades = callPackage ../games/openspades {
inherit (darwin.apple_sdk.frameworks) Cocoa;
};
openttd = callPackage ../games/openttd { openttd = callPackage ../games/openttd {
zlib = zlibStatic; zlib = zlibStatic;