1 /* The reusable code, and package attributes, between OpenRA engine packages (engine.nix)
2 and out-of-tree mod packages (mod.nix).
4 { lib, makeSetupHook, curl, unzip, dos2unix, pkg-config, makeWrapper
6 , libGL, freetype, openal, SDL2
20 path = makeBinPath ([ mono python3 ] ++ optional (zenity != null) zenity);
21 rpath = makeLibraryPath [ lua freetype openal SDL2 ];
22 mkdirp = makeSetupHook {
23 name = "openra-mkdirp-hook";
27 patchEngine = dir: version: ''
29 -e 's/^VERSION.*/VERSION = ${version}/g' \
30 -e '/fetch-geoip-db/d' \
31 -e '/GeoLite2-Country.mmdb.gz/d' \
34 sed -i 's|locations=.*|locations=${lua}/lib|' ${dir}/thirdparty/configure-native-deps.sh
37 wrapLaunchGame = openraSuffix: binaryName: ''
38 # Setting TERM=xterm fixes an issue with terminfo in mono: System.Exception: Magic number is wrong: 542
39 # https://github.com/mono/mono/issues/6752#issuecomment-365212655
40 wrapProgram $out/lib/openra${openraSuffix}/launch-game.sh \
41 --prefix PATH : "${path}" \
42 --prefix LD_LIBRARY_PATH : "${rpath}" \
45 makeWrapper $out/lib/openra${openraSuffix}/launch-game.sh $(mkdirp $out/bin)/${binaryName} \
46 --chdir "$out/lib/openra${openraSuffix}"
50 buildInputs = [ libGL ];
52 # TODO: Test if this is correct.
64 makeFlags = [ "prefix=$(out)" ];
71 maintainers = with maintainers; [ fusion809 msteen ];
72 license = licenses.gpl3;
73 platforms = platforms.linux;