From 61c0f3015595331e3e1b77b3ba53003f3ecbb932 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Tue, 12 Aug 2008 15:40:01 +0000 Subject: [PATCH] Add PyOpenGL. svn path=/nixpkgs/trunk/; revision=12598 --- .../python-modules/pyopengl/default.nix | 37 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 5 +++ 2 files changed, 42 insertions(+) create mode 100644 pkgs/development/python-modules/pyopengl/default.nix diff --git a/pkgs/development/python-modules/pyopengl/default.nix b/pkgs/development/python-modules/pyopengl/default.nix new file mode 100644 index 00000000000..5a33f1db806 --- /dev/null +++ b/pkgs/development/python-modules/pyopengl/default.nix @@ -0,0 +1,37 @@ +{ fetchurl, stdenv, python, setuptools, mesa, freeglut, pil }: + +let version = "3.0.0b5"; +in + stdenv.mkDerivation { + name = "pyopengl-${version}"; + + src = fetchurl { + url = "mirror://sourceforge/pyopengl/PyOpenGL-${version}.tar.gz"; + sha256 = "1rjpl2qdcqn4wamkik840mywdycd39q8dn3wqfaiv35jdsbifxx3"; + }; + + # Note: We need `ctypes', available in Python 2.5+. + buildInputs = [ python setuptools mesa freeglut pil ]; + + configurePhase = "ensureDir $out/lib/python2.5/site-packages"; + buildPhase = "python setup.py build"; + + installPhase = '' + PYTHONPATH="$out/lib/python2.5/site-packages:$PYTHONPATH" \ + python setup.py install --prefix=$out + ''; + + meta = { + 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"; + }; + } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 063b9ba072f..e481faf8c6c 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -4517,6 +4517,11 @@ let pkgs = rec { inherit fetchurl stdenv python libjpeg zlib freetype; }; + pyopengl = import ../development/python-modules/pyopengl { + inherit fetchurl stdenv setuptools mesa freeglut pil; + python = python25; + }; + pythonSip = builderDefsPackage (selectVersion ../development/python-modules/python-sip "4.7.4") { python=python25; } null;