2 with import <nixpkgs> {}; { xonoticEnv =
3 stdenv.mkDerivation rec {
7 name = "xonotic-${version}";
9 src = lib.sourceFilesBySuffices ./. [
17 enableParallelBuilding = true;
20 "-DCMAKE_BUILD_TYPE=Release"
25 NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE ${lib.concatStringsSep " " [
26 "-I${SDL2}/include/SDL2" # for darkplaces
33 openssl # for d0_blind_id
35 # unzip # for downloading maps
54 exe=darkplaces/darkplaces
55 rpath=$(patchelf --print-rpath $exe)
56 rpath_firstparty=$out/d0_blind_id
57 rpath_thirdparty=${lib.makeLibraryPath runtimeInputs}
58 rpath=$rpath:$rpath_firstparty:$rpath_thirdparty
59 patchelf --set-rpath $rpath $exe