2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
buildPythonPackage,
|
|
|
|
lib,
|
|
|
|
fetchFromGitHub,
|
|
|
|
absl-py,
|
|
|
|
enum34,
|
|
|
|
future,
|
|
|
|
mock,
|
|
|
|
mpyq,
|
|
|
|
numpy,
|
|
|
|
portpicker,
|
|
|
|
protobuf,
|
|
|
|
pygame,
|
|
|
|
s2clientprotocol,
|
|
|
|
six,
|
|
|
|
websocket-client,
|
|
|
|
sc2-headless,
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage {
|
2024-04-21 15:54:59 +00:00
|
|
|
pname = "pysc2";
|
2020-04-24 23:36:52 +00:00
|
|
|
version = "1.2";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "deepmind";
|
|
|
|
repo = "pysc2";
|
|
|
|
rev = "39f84b01d662eb58b3d95791f59208c210afd4e7";
|
|
|
|
sha256 = "0dfbc2krd2rys1ji75ng2nl0ki8nhnylxljcp287bfb8qyz2m25p";
|
|
|
|
};
|
|
|
|
|
|
|
|
patches = [
|
|
|
|
./fix-setup-for-py3.patch
|
|
|
|
./parameterize-runconfig-sc2path.patch
|
|
|
|
];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace "./pysc2/run_configs/platforms.py" \
|
|
|
|
--subst-var-by 'sc2path' '${sc2-headless}'
|
|
|
|
'';
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
absl-py
|
|
|
|
enum34
|
|
|
|
future
|
|
|
|
mock
|
|
|
|
mpyq
|
|
|
|
numpy
|
|
|
|
portpicker
|
|
|
|
protobuf
|
|
|
|
pygame
|
|
|
|
s2clientprotocol
|
|
|
|
six
|
2021-06-28 23:13:55 +00:00
|
|
|
websocket-client
|
2020-04-24 23:36:52 +00:00
|
|
|
sc2-headless
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Starcraft II environment and library for training agents";
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/deepmind/pysc2";
|
|
|
|
license = lib.licenses.asl20;
|
|
|
|
platforms = lib.platforms.linux;
|
2022-07-14 12:49:19 +00:00
|
|
|
maintainers = with lib.maintainers; [ ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|