mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-29 00:53:57 +00:00
4f0dadbf38
After final improvements to the official formatter implementation, this commit now performs the first treewide reformat of Nix files using it. This is part of the implementation of RFC 166. Only "inactive" files are reformatted, meaning only files that aren't being touched by any PR with activity in the past 2 months. This is to avoid conflicts for PRs that might soon be merged. Later we can do a full treewide reformat to get the rest, which should not cause as many conflicts. A CI check has already been running for some time to ensure that new and already-formatted files are formatted, so the files being reformatted here should also stay formatted. This commit was automatically created and can be verified using nix-builda08b3a4d19
.tar.gz \ --argstr baseRevb32a094368
result/bin/apply-formatting $NIXPKGS_PATH
69 lines
1.5 KiB
Nix
69 lines
1.5 KiB
Nix
/*
|
|
The package defintion for an OpenRA engine.
|
|
It shares code with `mod.nix` by what is defined in `common.nix`.
|
|
Similar to `mod.nix` it is a generic package definition,
|
|
in order to make it easy to define multiple variants of the OpenRA engine.
|
|
For each mod provided by the engine, a wrapper script is created,
|
|
matching the naming convention used by `mod.nix`.
|
|
This package could be seen as providing a set of in-tree mods,
|
|
while the `mod.nix` pacakges provide a single out-of-tree mod.
|
|
*/
|
|
{
|
|
lib,
|
|
stdenv,
|
|
packageAttrs,
|
|
patchEngine,
|
|
wrapLaunchGame,
|
|
engine,
|
|
}:
|
|
|
|
stdenv.mkDerivation (
|
|
lib.recursiveUpdate packageAttrs rec {
|
|
pname = "openra_2019";
|
|
version = "${engine.name}-${engine.version}";
|
|
|
|
src = engine.src;
|
|
|
|
postPatch = patchEngine "." version;
|
|
|
|
configurePhase = ''
|
|
runHook preConfigure
|
|
|
|
make version VERSION=${lib.escapeShellArg version}
|
|
|
|
runHook postConfigure
|
|
'';
|
|
|
|
buildFlags = [
|
|
"DEBUG=false"
|
|
"default"
|
|
"man-page"
|
|
];
|
|
|
|
checkTarget = "nunit test";
|
|
|
|
installTargets = [
|
|
"install"
|
|
"install-linux-icons"
|
|
"install-linux-desktop"
|
|
"install-linux-appdata"
|
|
"install-linux-mime"
|
|
"install-man-page"
|
|
];
|
|
|
|
postInstall = ''
|
|
${wrapLaunchGame "" "openra"}
|
|
|
|
${lib.concatStrings (
|
|
map (mod: ''
|
|
makeWrapper $out/bin/openra $out/bin/openra-${mod} --add-flags Game.Mod=${mod}
|
|
'') engine.mods
|
|
)}
|
|
'';
|
|
|
|
meta = {
|
|
inherit (engine) description homepage;
|
|
};
|
|
}
|
|
)
|