Merge pull request #307098 from r-ryantm/auto-update/cilium-cli
[NixPkgs.git] / pkgs / development / python-modules / pysc2 / default.nix
blobb45c9554160948b5baea55091caf0399ef5653ef
1 { buildPythonPackage
2 , lib
3 , fetchFromGitHub
4 , absl-py
5 , enum34
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     enum34
43     future
44     mock
45     mpyq
46     numpy
47     portpicker
48     protobuf
49     pygame
50     s2clientprotocol
51     six
52     websocket-client
53     sc2-headless
54   ];
56   meta = {
57     description = "Starcraft II environment and library for training agents.";
58     homepage = "https://github.com/deepmind/pysc2";
59     license = lib.licenses.asl20;
60     platforms = lib.platforms.linux;
61     maintainers = with lib.maintainers; [ ];
62   };