2019-03-27 21:26:54 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
2019-05-28 12:00:17 +00:00
|
|
|
, isPy3k
|
2019-03-27 21:26:54 +00:00
|
|
|
, python
|
|
|
|
, fetchFromGitHub
|
|
|
|
, fetchpatch
|
2020-09-07 15:35:11 +00:00
|
|
|
, qtbase
|
2019-03-27 21:26:54 +00:00
|
|
|
, boost
|
|
|
|
, assimp
|
|
|
|
, gym
|
|
|
|
, bullet-roboschool
|
2021-01-19 06:50:56 +00:00
|
|
|
, pkg-config
|
2019-03-27 21:26:54 +00:00
|
|
|
, which
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "roboschool";
|
|
|
|
version = "1.0.39";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "openai";
|
|
|
|
repo = "roboschool";
|
|
|
|
rev = version;
|
|
|
|
sha256 = "1s7rp5bbiglnrfm33wf7x7kqj0ks3b21bqyz18c5g6vx39rxbrmh";
|
|
|
|
};
|
|
|
|
|
2019-05-28 12:00:17 +00:00
|
|
|
# fails to find boost_python for some reason
|
|
|
|
disabled = !isPy3k;
|
|
|
|
|
2019-03-27 21:26:54 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
gym
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
2021-01-19 06:50:56 +00:00
|
|
|
pkg-config
|
2020-09-07 15:35:11 +00:00
|
|
|
qtbase # needs the `moc` tool
|
2019-03-27 21:26:54 +00:00
|
|
|
which
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
bullet-roboschool
|
|
|
|
assimp
|
2020-09-07 15:35:11 +00:00
|
|
|
qtbase
|
2019-03-27 21:26:54 +00:00
|
|
|
boost
|
|
|
|
];
|
|
|
|
|
2021-01-12 11:50:23 +00:00
|
|
|
dontWrapQtApps = true;
|
|
|
|
|
2019-03-27 21:26:54 +00:00
|
|
|
NIX_CFLAGS_COMPILE="-I ${python}/include/${python.libPrefix}";
|
|
|
|
|
|
|
|
patches = [
|
|
|
|
# Remove kwarg that was removed in upstream gym
|
|
|
|
# https://github.com/openai/roboschool/pull/180
|
|
|
|
(fetchpatch {
|
|
|
|
name = "remove-close-kwarg.patch";
|
|
|
|
url = "https://github.com/openai/roboschool/pull/180/commits/334f489c8ce7af4887e376139ec676f89da5b16f.patch";
|
|
|
|
sha256 = "0bbz8b63m40a9lrwmh7c8d8gj9kpa8a7svdh08qhrddjkykvip6r";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
|
|
|
preBuild = ''
|
|
|
|
# First build the cpp dependencies
|
|
|
|
cd roboschool/cpp-household
|
|
|
|
make \
|
|
|
|
MOC=moc \
|
|
|
|
-j$NIX_BUILD_CORES
|
|
|
|
cd ../..
|
|
|
|
'';
|
|
|
|
|
|
|
|
# Does a QT sanity check, but QT is not expected to work in isolation
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Open-source software for robot simulation, integrated with OpenAI Gym";
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://github.com/openai/roboschool";
|
2019-03-27 21:26:54 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ timokau ];
|
|
|
|
};
|
|
|
|
}
|