1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
{ stdenv, lib, fetchurl, fetchFromGitHub, cmake, unzip, zip, file
, curl, glew , mesa_noglu, SDL2, SDL2_image, zlib, freetype, imagemagick
, openal , opusfile, libogg
}:
stdenv.mkDerivation rec {
name = "openspades-${version}";
version = "0.1.1b";
devPakVersion = "33";
src = fetchFromGitHub {
owner = "yvt";
repo = "openspades";
rev = "v${version}";
sha256 = "1xk3il5ykxg68hvwb42kpspcxppdib7y3ysaxb8anmmcsk1m3drn";
};
nativeBuildInputs = [ cmake imagemagick unzip zip file ];
buildInputs = [
freetype SDL2 SDL2_image mesa_noglu zlib curl glew opusfile openal libogg
];
cmakeFlags = [
"-DOPENSPADES_INSTALL_BINARY=bin"
];
devPak = fetchurl {
url = "https://github.com/yvt/openspades-paks/releases/download/r${devPakVersion}/OpenSpadesDevPackage-r${devPakVersion}.zip";
sha256 = "1bd2fyn7mlxa3xnsvzj08xjzw02baimqvmnix07blfhb78rdq9q9";
};
postPatch = ''
sed -i 's,^wget .*,cp $devPak "$PAK_NAME",' Resources/downloadpak.sh
patchShebangs Resources
'';
enableParallelBuilding = true;
NIX_CFLAGS_LINK = [ "-lopenal" ];
meta = with stdenv.lib; {
description = "A compatible client of Ace of Spades 0.75";
homepage = "https://github.com/yvt/openspades/";
license = licenses.gpl3;
platforms = platforms.linux;
};
}
|