1 /* The package defintion for an OpenRA engine.
2 It shares code with `mod.nix` by what is defined in `common.nix`.
3 Similar to `mod.nix` it is a generic package definition,
4 in order to make it easy to define multiple variants of the OpenRA engine.
5 For each mod provided by the engine, a wrapper script is created,
6 matching the naming convention used by `mod.nix`.
7 This package could be seen as providing a set of in-tree mods,
8 while the `mod.nix` pacakges provide a single out-of-tree mod.
19 stdenv.mkDerivation (recursiveUpdate packageAttrs rec {
21 version = "${engine.name}-${engine.version}";
25 postPatch = patchEngine "." version;
30 make version VERSION=${escapeShellArg version}
35 buildFlags = [ "DEBUG=false" "default" "man-page" ];
37 checkTarget = "nunit test";
42 "install-linux-desktop"
43 "install-linux-appdata"
51 ${concatStrings (map (mod: ''
52 makeWrapper $out/bin/openra $out/bin/openra-${mod} --add-flags Game.Mod=${mod}
57 inherit (engine) description homepage;