anki-bin: 24.06.3 -> 24.11 (#360722)
[NixPkgs.git] / pkgs / development / python-modules / pysc2 / default.nix
blob54a79bff39099f6b0d80e59d754e522e0a39fc0b
2   buildPythonPackage,
3   lib,
4   fetchFromGitHub,
5   absl-py,
6   future,
7   mock,
8   mpyq,
9   numpy,
10   portpicker,
11   protobuf,
12   pygame,
13   s2clientprotocol,
14   six,
15   websocket-client,
16   sc2-headless,
19 buildPythonPackage {
20   pname = "pysc2";
21   version = "1.2";
23   src = fetchFromGitHub {
24     owner = "deepmind";
25     repo = "pysc2";
26     rev = "39f84b01d662eb58b3d95791f59208c210afd4e7";
27     sha256 = "0dfbc2krd2rys1ji75ng2nl0ki8nhnylxljcp287bfb8qyz2m25p";
28   };
30   patches = [
31     ./fix-setup-for-py3.patch
32     ./parameterize-runconfig-sc2path.patch
33   ];
35   postPatch = ''
36     substituteInPlace "./pysc2/run_configs/platforms.py" \
37       --subst-var-by 'sc2path' '${sc2-headless}'
38   '';
40   propagatedBuildInputs = [
41     absl-py
42     future
43     mock
44     mpyq
45     numpy
46     portpicker
47     protobuf
48     pygame
49     s2clientprotocol
50     six
51     websocket-client
52     sc2-headless
53   ];
55   meta = {
56     description = "Starcraft II environment and library for training agents";
57     homepage = "https://github.com/deepmind/pysc2";
58     license = lib.licenses.asl20;
59     platforms = lib.platforms.linux;
60     maintainers = [ ];
61   };