15 , client ? true, server ? true
18 stdenv.mkDerivation rec {
19 pname = "assaultcube";
22 src = fetchFromGitHub {
23 owner = "assaultcube";
26 sha256 = "0qv339zw9q5q1y7bghca03gw7z4v89sl4lbr6h3b7siy08mcwiz9";
38 ] ++ lib.optionals client [
46 targets = (lib.optionalString server "server") + (lib.optionalString client " client");
47 makeFlags = [ "-C source/src" "CXX=${stdenv.cc.targetPrefix}c++" targets ];
52 desktopName = "AssaultCube";
53 comment = "A multiplayer, first-person shooter game, based on the CUBE engine. Fast, arcade gameplay.";
54 genericName = "First-person shooter";
55 categories = [ "Game" "ActionGame" "Shooter" ];
61 gamedatadir = "/share/games/${pname}";
68 mkdir -p $bindir $out/$gamedatadir
70 cp -r config packages $out/$gamedatadir
72 if (test -e source/src/ac_client) then
73 cp source/src/ac_client $bindir
74 mkdir -p $out/share/applications
75 install -Dpm644 packages/misc/icon.png $out/share/icons/assaultcube.png
76 install -Dpm644 packages/misc/icon.png $out/share/pixmaps/assaultcube.png
78 makeWrapper $out/bin/ac_client $out/bin/${pname} \
79 --chdir "$out/$gamedatadir" --add-flags "--home=\$HOME/.assaultcube/v1.2next --init"
82 if (test -e source/src/ac_server) then
83 cp source/src/ac_server $bindir
84 makeWrapper $out/bin/ac_server $out/bin/${pname}-server \
85 --chdir "$out/$gamedatadir" --add-flags "-Cconfig/servercmdline.txt"
92 description = "Fast and fun first-person-shooter based on the Cube fps";
93 homepage = "https://assault.cubers.net";
94 platforms = platforms.linux; # should work on darwin with a little effort.
95 license = licenses.unfree;
96 maintainers = with maintainers; [ darkonion0 ];