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