diff options
author | Chris Ostrouchov <chris.ostrouchov@gmail.com> | 2018-10-26 11:23:47 -0400 |
---|---|---|
committer | Frederik Rietdijk <fridh@fridh.nl> | 2018-10-27 09:07:22 +0200 |
commit | 1a773a84fc52939483681778cb511a7bea7903fb (patch) | |
tree | 330d1ed5c5ae63797a13deb448b8f63a09eafa12 /pkgs/development/python-modules/pyopengl | |
parent | 294ee4ccfdfe145406ca85c88c9451d2a50bb6e0 (diff) | |
download | nixpkgs-1a773a84fc52939483681778cb511a7bea7903fb.tar nixpkgs-1a773a84fc52939483681778cb511a7bea7903fb.tar.gz nixpkgs-1a773a84fc52939483681778cb511a7bea7903fb.tar.bz2 nixpkgs-1a773a84fc52939483681778cb511a7bea7903fb.tar.lz nixpkgs-1a773a84fc52939483681778cb511a7bea7903fb.tar.xz nixpkgs-1a773a84fc52939483681778cb511a7bea7903fb.tar.zst nixpkgs-1a773a84fc52939483681778cb511a7bea7903fb.zip |
pythonPackages.pyopengl: refactor move to python-modules
Diffstat (limited to 'pkgs/development/python-modules/pyopengl')
-rw-r--r-- | pkgs/development/python-modules/pyopengl/default.nix | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/pyopengl/default.nix b/pkgs/development/python-modules/pyopengl/default.nix new file mode 100644 index 00000000000..11a51f354d9 --- /dev/null +++ b/pkgs/development/python-modules/pyopengl/default.nix @@ -0,0 +1,50 @@ +{ stdenv +, buildPythonPackage +, fetchPypi +, pkgs +, pillow +}: + +buildPythonPackage rec { + pname = "pyopengl"; + version = "3.1.0"; + + src = fetchPypi { + inherit pname version; + sha256 = "9b47c5c3a094fa518ca88aeed35ae75834d53e4285512c61879f67a48c94ddaf"; + }; + + propagatedBuildInputs = [ pkgs.libGLU_combined pkgs.freeglut pillow ]; + + patchPhase = let + ext = stdenv.hostPlatform.extensions.sharedLibrary; in '' + substituteInPlace OpenGL/platform/glx.py \ + --replace "'GL'" "'${pkgs.libGL}/lib/libGL${ext}'" \ + --replace "'GLU'" "'${pkgs.libGLU}/lib/libGLU${ext}'" \ + --replace "'glut'" "'${pkgs.freeglut}/lib/libglut${ext}'" + substituteInPlace OpenGL/platform/darwin.py \ + --replace "'OpenGL'" "'${pkgs.libGL}/lib/libGL${ext}'" \ + --replace "'GLUT'" "'${pkgs.freeglut}/lib/libglut${ext}'" + ''; + + # Need to fix test runner + # Tests have many dependencies + # Extension types could not be found. + # Should run test suite from $out/${python.sitePackages} + doCheck = false; + + meta = with stdenv.lib; { + homepage = http://pyopengl.sourceforge.net/; + description = "PyOpenGL, the Python OpenGL bindings"; + longDescription = '' + PyOpenGL is the cross platform Python binding to OpenGL and + related APIs. The binding is created using the standard (in + Python 2.5) ctypes library, and is provided under an extremely + liberal BSD-style Open-Source license. + ''; + license = "BSD-style"; + platforms = platforms.mesaPlatforms; + }; + + +} |