pytrainer: unpin python 3.10
[NixPkgs.git] / pkgs / games / openra_2019 / engines.nix
blobbbb4947acd237aedbfa90f92d6ab8fc573b9962a
1 { buildOpenRAEngine, fetchFromGitHub, postFetch }:
3 let
4   buildUpstreamOpenRAEngine = { version, rev, sha256 }: name: (buildOpenRAEngine {
5     inherit version;
6     description = "Open-source re-implementation of Westwood Studios' 2D Command and Conquer games";
7     homepage = "https://www.openra.net/";
8     mods = [ "cnc" "d2k" "ra" "ts" ];
9     src = fetchFromGitHub {
10       owner = "OpenRA";
11       repo = "OpenRA" ;
12       inherit rev sha256 postFetch;
13     };
14   } name).overrideAttrs (origAttrs: {
15     postInstall = ''
16       ${origAttrs.postInstall}
17       cp -r mods/ts $out/lib/openra/mods/
18       cp mods/ts/icon.png $(mkdirp $out/share/pixmaps)/openra-ts.png
19       ( cd $out/share/applications; sed -e 's/Dawn/Sun/g' -e 's/cnc/ts/g' openra-cnc.desktop > openra-ts.desktop )
20     '';
21   });
23 in {
24   release = name: (buildUpstreamOpenRAEngine rec {
25     version = "20190314";
26     rev = "${name}-${version}";
27     sha256 = "15pvn5cx3g0nzbrgpsfz8dngad5wkzp5dz25ydzn8bmxafiijvcr";
28   } name);
30   playtest = name: (buildUpstreamOpenRAEngine rec {
31     version = "20190302";
32     rev = "${name}-${version}";
33     sha256 = "1vqvfk2p2lpk3m0d3rpvj34i8cmk3mfc7w4cn4llqd9zp4kk9pya";
34   } name);
36   bleed = buildUpstreamOpenRAEngine {
37     version = "8ee1102";
38     rev = "8ee11028d72cde7556b31d45f556b40be65b4b70";
39     sha256 = "0f1fpf37ms8d7fhlh3rjzsxsk9w23iyi3phs2i7g561292d5rk3l";
40   };