1{
2 lib,
3 buildPythonPackage,
4 fetchPypi,
5 setuptools,
6 libGLU,
7 libGL,
8 xorg,
9 numpy,
10}:
11
12buildPythonPackage rec {
13 pname = "pybullet";
14 version = "3.2.7";
15 pyproject = true;
16
17 src = fetchPypi {
18 inherit pname version;
19 hash = "sha256-BCh5240QGsdZDe5HX8at7VCLhf4Sc/27/eHYi9IA4U8=";
20 };
21
22 nativeBuildInputs = [ setuptools ];
23
24 buildInputs = [
25 libGLU
26 libGL
27 xorg.libX11
28 ];
29
30 propagatedBuildInputs = [ numpy ];
31
32 # Fix GCC 14 build.
33 # from incompatible pointer type [-Wincompatible-pointer-types
34 env.NIX_CFLAGS_COMPILE = "-Wno-error=incompatible-pointer-types";
35
36 patches = [
37 # make sure X11 and OpenGL can be found at runtime
38 ./static-libs.patch
39 ];
40
41 meta = with lib; {
42 description = "Open-source software for robot simulation, integrated with OpenAI Gym";
43 downloadPage = "https://github.com/bulletphysics/bullet3";
44 homepage = "https://pybullet.org/";
45 license = licenses.zlib;
46 maintainers = with maintainers; [ timokau ];
47 platforms = platforms.linux;
48 };
49}