Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 6c0a30321e87
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 197bc2afc03c
Choose a head ref
  • 1 commit
  • 3 files changed
  • 1 contributor

Commits on Mar 27, 2019

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    197bc2a View commit details
Showing with 49 additions and 0 deletions.
  1. +34 −0 pkgs/development/python-modules/pybullet/default.nix
  2. +13 −0 pkgs/development/python-modules/pybullet/static-libs.patch
  3. +2 −0 pkgs/top-level/python-packages.nix
34 changes: 34 additions & 0 deletions pkgs/development/python-modules/pybullet/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{ lib
, buildPythonPackage
, fetchPypi
, libGLU_combined
, xorg
}:

buildPythonPackage rec {
pname = "pybullet";
version = "2.4.8";

src = fetchPypi {
inherit pname version;
sha256 = "0b6dkrac5zydxqfrf827xhamsimychrn77dsfnz1kf7c1crlwcw9";
};

buildInputs = [
libGLU_combined
xorg.libX11
];

patches = [
# make sure X11 and OpenGL can be found at runtime
./static-libs.patch
];

meta = with lib; {
description = "Open-source software for robot simulation, integrated with OpenAI Gym";
homepage = https://pybullet.org/;
license = licenses.zlib;
maintainers = with maintainers; [ timokau ];
platforms = platforms.linux;
};
}
13 changes: 13 additions & 0 deletions pkgs/development/python-modules/pybullet/static-libs.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/setup.py b/setup.py
index 98efabdbf..e69e79084 100644
--- a/setup.py
+++ b/setup.py
@@ -563,6 +563,8 @@ print("-----")

extensions = []

+libraries += [ "X11", "GL" ] # statically link x11 and opengl
+
pybullet_ext = Extension("pybullet",
sources = sources,
libraries = libraries,
2 changes: 2 additions & 0 deletions pkgs/top-level/python-packages.nix
Original file line number Diff line number Diff line change
@@ -617,6 +617,8 @@ in {

pybind11 = callPackage ../development/python-modules/pybind11 { };

pybullet = callPackage ../development/python-modules/pybullet { };

pycairo = callPackage ../development/python-modules/pycairo {
inherit (pkgs) pkgconfig;
};