1{ lib, stdenv, fetchFromGitHub, curl, expat
2, jansson, libpng, libjpeg, libGLU, libGL, libXxf86vm, pcre
3, pkg-config, SDL2, vim, speex }:
4
5stdenv.mkDerivation rec {
6 pname = "ezquake";
7 version = "3.2.3";
8
9 src = fetchFromGitHub {
10 owner = "ezQuake";
11 repo = pname + "-source";
12 rev = version;
13 sha256 = "sha256-EBhKmoX11JavTG6tPfg15FY2lqOFfzSDg3058OWfcYQ=";
14 };
15
16 nativeBuildInputs = [ pkg-config ];
17 buildInputs = [
18 expat curl jansson libpng libjpeg libGLU libGL libXxf86vm pcre SDL2 vim speex
19 ];
20
21 installPhase = with lib; let
22 sys = last (splitString "-" stdenv.hostPlatform.system);
23 arch = head (splitString "-" stdenv.hostPlatform.system);
24 in ''
25 mkdir -p $out/bin
26 find .
27 mv ezquake-${sys}-${arch} $out/bin/ezquake
28 '';
29
30 enableParallelBuilding = true;
31
32 meta = with lib; {
33 homepage = "http://ezquake.github.io/";
34 description = "A modern QuakeWorld client focused on competitive online play";
35 license = licenses.gpl2;
36 platforms = platforms.linux;
37 maintainers = with maintainers; [ edwtjo ];
38 };
39}