2017-03-02 21:20:19 +00:00
|
|
|
{ stdenv, lib, fetchurl, fetchFromGitHub, cmake, unzip, zip, file
|
2018-02-24 12:06:44 +00:00
|
|
|
, curl, glew , libGL, SDL2, SDL2_image, zlib, freetype, imagemagick
|
2017-03-02 21:20:19 +00:00
|
|
|
, openal , opusfile, libogg
|
|
|
|
}:
|
2014-06-27 16:21:17 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "openspades-${version}";
|
2018-02-27 17:02:02 +00:00
|
|
|
version = "0.1.2";
|
2017-03-02 21:20:19 +00:00
|
|
|
devPakVersion = "33";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "yvt";
|
|
|
|
repo = "openspades";
|
|
|
|
rev = "v${version}";
|
2018-02-27 17:02:02 +00:00
|
|
|
sha256 = "1mfj46c3pnn1f6awy3b6faxs26i93a5jsrvkdlr12ndsykvi6ng6";
|
2014-06-27 16:21:17 +00:00
|
|
|
};
|
|
|
|
|
2017-03-02 21:20:19 +00:00
|
|
|
nativeBuildInputs = [ cmake imagemagick unzip zip file ];
|
2016-03-01 13:31:33 +00:00
|
|
|
|
2017-03-02 21:20:19 +00:00
|
|
|
buildInputs = [
|
2018-02-24 12:06:44 +00:00
|
|
|
freetype SDL2 SDL2_image libGL zlib curl glew opusfile openal libogg
|
2017-03-02 21:20:19 +00:00
|
|
|
];
|
2014-06-27 16:21:17 +00:00
|
|
|
|
2016-08-25 21:11:27 +00:00
|
|
|
cmakeFlags = [
|
|
|
|
"-DOPENSPADES_INSTALL_BINARY=bin"
|
|
|
|
];
|
2014-06-27 16:21:17 +00:00
|
|
|
|
2017-03-02 21:20:19 +00:00
|
|
|
devPak = fetchurl {
|
|
|
|
url = "https://github.com/yvt/openspades-paks/releases/download/r${devPakVersion}/OpenSpadesDevPackage-r${devPakVersion}.zip";
|
|
|
|
sha256 = "1bd2fyn7mlxa3xnsvzj08xjzw02baimqvmnix07blfhb78rdq9q9";
|
2014-08-26 09:48:02 +00:00
|
|
|
};
|
|
|
|
|
2017-03-02 21:20:19 +00:00
|
|
|
postPatch = ''
|
|
|
|
sed -i 's,^wget .*,cp $devPak "$PAK_NAME",' Resources/downloadpak.sh
|
|
|
|
patchShebangs Resources
|
2014-08-26 09:48:02 +00:00
|
|
|
'';
|
|
|
|
|
2017-03-02 21:20:19 +00:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
|
|
|
NIX_CFLAGS_LINK = [ "-lopenal" ];
|
2014-06-27 16:21:17 +00:00
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
2014-08-24 14:21:08 +00:00
|
|
|
description = "A compatible client of Ace of Spades 0.75";
|
2014-06-27 16:21:17 +00:00
|
|
|
homepage = "https://github.com/yvt/openspades/";
|
|
|
|
license = licenses.gpl3;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|