at 25.11-pre 1.2 kB view raw
1{ 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, 17}: 18 19buildPythonPackage rec { 20 pname = "pysc2"; 21 version = "4.0"; 22 23 src = fetchFromGitHub { 24 owner = "deepmind"; 25 repo = "pysc2"; 26 tag = "v${version}"; 27 sha256 = "sha256-70Uqs30Dyq1u+e1CTR8mO/rzZangBvgY0ah2l7VJLhQ="; 28 }; 29 30 patches = [ 31 ./fix-setup-for-py3.patch 32 ./parameterize-runconfig-sc2path.patch 33 ]; 34 35 postPatch = '' 36 substituteInPlace "./pysc2/run_configs/platforms.py" \ 37 --subst-var-by 'sc2path' '${sc2-headless}' 38 ''; 39 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 ]; 54 55 meta = { 56 changelog = "https://github.com/google-deepmind/pysc2/releases/tag/${src.tag}"; 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 = [ ]; 62 }; 63}