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
13 path = makeBinPath ([ mono python3 ] ++ optional (zenity != null) zenity);
14 rpath = makeLibraryPath [ lua freetype openal SDL2 ];
15 mkdirp = makeSetupHook {
16 name = "openra-mkdirp-hook";
20 patchEngine = dir: version: ''
22 -e 's/^VERSION.*/VERSION = ${version}/g' \
23 -e '/fetch-geoip-db/d' \
24 -e '/GeoLite2-Country.mmdb.gz/d' \
27 sed -i 's|locations=.*|locations=${lua}/lib|' ${dir}/thirdparty/configure-native-deps.sh
30 wrapLaunchGame = openraSuffix: binaryName: ''
31 # Setting TERM=xterm fixes an issue with terminfo in mono: System.Exception: Magic number is wrong: 542
32 # https://github.com/mono/mono/issues/6752#issuecomment-365212655
33 wrapProgram $out/lib/openra${openraSuffix}/launch-game.sh \
34 --prefix PATH : "${path}" \
35 --prefix LD_LIBRARY_PATH : "${rpath}" \
38 makeWrapper $out/lib/openra${openraSuffix}/launch-game.sh $(mkdirp $out/bin)/${binaryName} \
39 --chdir "$out/lib/openra${openraSuffix}"
43 buildInputs = [ libGL ];
45 # TODO: Test if this is correct.
57 makeFlags = [ "prefix=$(out)" ];
64 maintainers = with maintainers; [ fusion809 msteen ];
65 license = licenses.gpl3;
66 platforms = platforms.linux;