nixpkgs/pkgs/games/openra/engines.nix

42 lines
1.4 KiB
Nix
Raw Normal View History

2019-01-02 00:05:51 +00:00
{ buildOpenRAEngine, fetchFromGitHub, abbrevCommit, extraPostFetch }:
let
buildUpstreamOpenRAEngine = { version, rev, sha256 }: name: (buildOpenRAEngine {
inherit version;
description = "Open-source re-implementation of Westwood Studios' 2D Command and Conquer games";
homepage = https://www.openra.net/;
mods = [ "cnc" "d2k" "ra" "ts" ];
src = fetchFromGitHub {
owner = "OpenRA";
repo = "OpenRA" ;
inherit rev sha256 extraPostFetch;
};
} name).overrideAttrs (oldAttrs: {
postInstall = ''
${oldAttrs.postInstall}
cp -r mods/ts $out/lib/openra/mods/
cp mods/ts/icon.png $(mkdirp $out/share/pixmaps)/openra-ts.png
( cd $out/share/applications; sed -e 's/Dawn/Sun/g' -e 's/cnc/ts/g' openra-cnc.desktop > openra-ts.desktop )
'';
});
in {
release = buildUpstreamOpenRAEngine rec {
version = "20181215";
rev = "release-${version}";
sha256 = "0p0izykjnz7pz02g2khp7msqa00jhjsrzk9y0g29dirmdv75qa4r";
};
playtest = buildUpstreamOpenRAEngine rec {
version = "20190106";
rev = "playtest-${version}";
sha256 = "0ps9x379plrrj1hnj4fpr26lc46mzgxknv5imxi0bmrh5y4781ql";
};
bleed = let commit = "6de92de8d982094a766eab97a92225c240d85493"; in buildUpstreamOpenRAEngine {
version = abbrevCommit commit;
rev = commit;
sha256 = "0p0izykjnz7pz02g2khp7msqa00jhjsrzk9y0g29dirmdv75qa4r";
};
}