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
5 , lua, mono, dotnetPackages, python3
6 , libGL, freetype, openal, SDL2
13 path = makeBinPath ([ mono python3 ] ++ optional (zenity != null) zenity);
14 rpath = makeLibraryPath [ lua freetype openal SDL2 ];
15 mkdirp = makeSetupHook { } ./mkdirp.sh;
18 patchEngine = dir: version: ''
20 -e 's/^VERSION.*/VERSION = ${version}/g' \
21 -e '/fetch-geoip-db/d' \
22 -e '/GeoLite2-Country.mmdb.gz/d' \
25 sed -i 's|locations=.*|locations=${lua}/lib|' ${dir}/thirdparty/configure-native-deps.sh
28 wrapLaunchGame = openraSuffix: ''
29 # Setting TERM=xterm fixes an issue with terminfo in mono: System.Exception: Magic number is wrong: 542
30 # https://github.com/mono/mono/issues/6752#issuecomment-365212655
31 wrapProgram $out/lib/openra${openraSuffix}/launch-game.sh \
32 --prefix PATH : "${path}" \
33 --prefix LD_LIBRARY_PATH : "${rpath}" \
36 makeWrapper $out/lib/openra${openraSuffix}/launch-game.sh $(mkdirp $out/bin)/openra${openraSuffix} \
37 --chdir "$out/lib/openra${openraSuffix}"
41 buildInputs = with dotnetPackages; [
60 # TODO: Test if this is correct.
72 makeFlags = [ "prefix=$(out)" ];
79 maintainers = with maintainers; [ fusion809 msteen rardiol ];
80 license = licenses.gpl3;
81 platforms = platforms.linux;