diff options
Diffstat (limited to 'pkgs/development/python2-packages')
36 files changed, 1746 insertions, 0 deletions
diff --git a/pkgs/development/python2-packages/4suite/default.nix b/pkgs/development/python2-packages/4suite/default.nix new file mode 100644 index 000000000000..9f900e4f50ab --- /dev/null +++ b/pkgs/development/python2-packages/4suite/default.nix @@ -0,0 +1,13 @@ +{stdenv, fetchurl, python}: + +stdenv.mkDerivation rec { + version = "1.0.2"; + name = "4suite-${version}"; + src = fetchurl { + url = "mirror://sourceforge/foursuite/4Suite-XML-${version}.tar.bz2"; + sha256 = "0g5cyqxhhiqnvqk457k8sb97r18pwgx6gff18q5296xd3zf4cias"; + }; + buildInputs = [python]; + buildPhase = "true"; + installPhase = "python ./setup.py install --prefix=$out"; +} diff --git a/pkgs/development/python2-packages/ZopeInterface/default.nix b/pkgs/development/python2-packages/ZopeInterface/default.nix new file mode 100644 index 000000000000..6bcedcd0f171 --- /dev/null +++ b/pkgs/development/python2-packages/ZopeInterface/default.nix @@ -0,0 +1,12 @@ +{stdenv, fetchurl, python}: + +stdenv.mkDerivation { + name = "ZopeInterface-3.3.0"; + src = fetchurl { + url = http://www.zope.org/Products/ZopeInterface/3.3.0/zope.interface-3.3.0.tar.gz; + sha256 = "0xahg9cmagn4j3dbifvgzbjliw2jdrbf27fhqwkdp8j80xpyyjf0"; + }; + buildInputs = [python]; + buildPhase = "true"; + installPhase = "python ./setup.py install --prefix=$out"; +} diff --git a/pkgs/development/python2-packages/bsddb3/default.nix b/pkgs/development/python2-packages/bsddb3/default.nix new file mode 100644 index 000000000000..6ba7f9f8d024 --- /dev/null +++ b/pkgs/development/python2-packages/bsddb3/default.nix @@ -0,0 +1,12 @@ +{stdenv, fetchurl, python, db4}: + +stdenv.mkDerivation { + name = "bsddb3-4.5.0"; + src = fetchurl { + url = mirror://sourceforge/pybsddb/bsddb3-4.5.0.tar.gz; + sha256 = "1h09kij32iikr9racp5p7qrb4li2gf2hs0lyq6d312qarja4d45v"; + }; + buildInputs = [python]; + buildPhase = "true"; + installPhase = "python ./setup.py install --prefix=$out --berkeley-db=${db4}"; +} diff --git a/pkgs/development/python2-packages/dbus/default.nix b/pkgs/development/python2-packages/dbus/default.nix new file mode 100644 index 000000000000..fa8b88d08344 --- /dev/null +++ b/pkgs/development/python2-packages/dbus/default.nix @@ -0,0 +1,29 @@ +a : +let + fetchurl = a.fetchurl; + + version = a.lib.attrByPath ["version"] "0.83.0" a; + buildInputs = with a; [ + pkgconfig + ]; + propagatedBuildInputs = with a; [ + dbus python dbus_glib + ]; +in +rec { + src = fetchurl { + url = "http://dbus.freedesktop.org/releases/dbus-python/dbus-python-${version}.tar.gz"; + sha256 = "14b1fwq9jyvg9qbbrmpk1264s9shm9n638hsgmkh9fn2lmd1vpc9"; + }; + + inherit buildInputs propagatedBuildInputs; + configureFlags = []; + + /* doConfigure should be removed if not needed */ + phaseNames = ["doConfigure" "doMakeInstall"]; + + name = "python-dbus-" + version; + meta = { + description = "Python DBus bindings"; + }; +} diff --git a/pkgs/development/python2-packages/default.nix b/pkgs/development/python2-packages/default.nix new file mode 100644 index 000000000000..0014e92f8cf0 --- /dev/null +++ b/pkgs/development/python2-packages/default.nix @@ -0,0 +1,876 @@ +{ pkgs, python, makeWrapper }: + +let inherit (pkgs) builderDefsPackage lib fetchurl fetchsvn stdenv zlib libjpeg; + +in + +rec { + + # pythonPackages + # only keep packages being known to build with this python version + b = builtins.removeAttrs allPythonPackages + (["foolscap" + "nevow" + "setuptoolsTrial" + "simplejson" + ] + # these packages don't build with specific python versions.. + ++ (pkgs.lib.optionals (python.libPrefix == "python2.6") []) + ++ (pkgs.lib.optionals (python.libPrefix == "python2.5") + ["pycairo" "pygtk" "pyGtkGlade" "rhpl" "pygobject" "pythonSexy"]) + ); + + result = b // { + all = builtins.removeAttrs b ["buildPythonPackage"]; + }; + + # intentionally not using rec. Using b so that if a depedency doesn't build + # its less work to find all depending packages + allPythonPackages = { + + setuptools = builderDefsPackage (import ./setuptools) { + inherit python; + inherit (pkgs) makeWrapper; + }; + + buildPythonPackage = + import ./generic { + inherit python makeWrapper lib; + inherit (b) setuptools; + }; + + foursuite = import ./4suite { + inherit fetchurl stdenv python; + }; + + bsddb3 = import ./bsddb3 { + inherit fetchurl stdenv python; + inherit (pkgs) db4; + }; + + # python25 only? + flup = builderDefsPackage ./flup { + inherit fetchurl stdenv python; + inherit (b) setuptools; + }; + + numeric = import ./numeric { + inherit fetchurl stdenv python; + }; + + pil = import ./pil { + inherit fetchurl stdenv python; + inherit (pkgs) zlib libjpeg freetype; + }; + + #psyco = import ./psyco { + # inherit fetchurl stdenv python; + #}; + + pycairo = import ./pycairo { + inherit fetchurl stdenv python; + inherit (pkgs) cairo x11 pkgconfig; + }; + + pycrypto = import ./pycrypto { + inherit fetchurl stdenv python; + inherit (pkgs) gmp; + }; + + pycups = import ./pycups { + inherit stdenv fetchurl python; + inherit (pkgs) cups; + }; + + pygame = import ./pygame { + inherit fetchurl stdenv python; + inherit (pkgs) pkgconfig SDL SDL_image + SDL_mixer SDL_ttf numeric; + }; + + pygobject = import ./pygobject { + inherit fetchurl stdenv python; + inherit (pkgs) pkgconfig glib; + }; + + pygtk = import ./pygtk { + inherit fetchurl stdenv python; + inherit (b) pygobject pycairo; + inherit (pkgs) pkgconfig; + inherit (pkgs.gtkLibs) glib gtk; + }; + + pyGtkGlade = import ./pygtk { + inherit fetchurl stdenv python; + inherit (b) pygobject pycairo; + inherit (pkgs) pkgconfig; + inherit (pkgs.gtkLibs) glib gtk; + inherit (pkgs.gnome) libglade; + }; + + pyopengl = import ./pyopengl { + inherit fetchurl stdenv python; + inherit (b) setuptools; + inherit (pkgs) mesa freeglut pil; + }; + + pyopenssl = builderDefsPackage (import ./pyopenssl) { + inherit python; + inherit (pkgs) openssl; + }; + + pystringtemplate = import ./stringtemplate { + inherit stdenv fetchurl python; + inherit (pkgs) antlr; + }; + + pythonDBus = builderDefsPackage (import ./dbus) { + inherit python; + inherit (pkgs) pkgconfig dbus_glib; + dbus = pkgs.dbus.libs; + }; + + pythonIRClib = builderDefsPackage (import ./irclib) { + inherit python; + }; + + pythonSexy = builderDefsPackage (import ./libsexy) { + inherit python; + inherit (pkgs) pkgconfig libxml2 pygtk libsexy; + inherit (pkgs.gtkLibs) pango gtk glib; + }; + + rhpl = import ./rhpl { + inherit stdenv fetchurl python; + inherit (pkgs) rpm cpio wirelesstools gettext; + }; + + sip = b.sip48; + sip48 = import ./python-sip { + inherit stdenv fetchurl python; + }; + + sip410 = import ./python-sip/4.10.nix { + inherit stdenv fetchurl python; + }; + + pyqt4 = b.pyqt45; + + pyqt45 = import ./pyqt/4.5.nix { + inherit stdenv fetchurl python; + inherit (b) sip; + qt4 = pkgs.qt45; + }; + + pyqt47 = import ./pyqt/4.7.nix { + inherit stdenv fetchurl python; + qt4 = pkgs.qt46; + sip = b.sip410; + }; + + pyx = import ./pyx { + inherit fetchurl stdenv python makeWrapper; + }; + + pyxml = import ./pyxml { + inherit fetchurl stdenv python makeWrapper; + }; + + wxPython = b.wxPython26; + + wxPython26 = import ./wxPython/2.6.nix { + inherit fetchurl stdenv python; + inherit (pkgs) pkgconfig; + wxGTK = pkgs.wxGTK26; + }; + + wxPython28 = import ./wxPython/2.8.nix { + inherit fetchurl stdenv python; + inherit (pkgs) pkgconfig; + inherit (pkgs) wxGTK; + }; + + ZopeInterface = import ./ZopeInterface { + inherit fetchurl stdenv python; + }; + + argparse = b.buildPythonPackage (rec { + name = "argparse-0.9.1"; + + src = fetchurl { + url = "http://pypi.python.org/packages/source/a/argparse/${name}.zip"; + sha256 = "00jw32wwccpf9smraywjk869b93w7f99rw8gi63yfhw6379fnq6m"; + }; + + buildInputs = [ pkgs.unzip ]; + + # How do we run the tests? + doCheck = false; + + meta = { + homepage = http://code.google.com/p/argparse/; + + license = "Apache License 2.0"; + + description = "argparse: Python command line parser"; + + longDescription = '' + The argparse module makes writing command line tools in Python + easy. Just briefly describe your command line interface and + argparse will take care of the rest, including: parsing the + arguments and flags from sys.argv, converting arg strings into + objects for your program, formatting and printing any help + messages, and much more. + ''; + }; + }); + + boto = b.buildPythonPackage (rec { + name = "boto-1.9b"; + + src = fetchurl { + url = "http://boto.googlecode.com/files/${name}.tar.gz"; + sha256 = "0kir3ddm79rxdf7wb5czmxpbnqzgj3j966q4mach29kkb98p48wz"; + }; + + meta = { + homepage = http://code.google.com/p/boto/; + + license = "bsd"; + + description = "Python interface to Amazon Web Services"; + + longDescription = '' + The boto module is an integrated interface to current and + future infrastructural services offered by Amazon Web + Services. This includes S3, SQS, EC2, among others. + ''; + }; + }); + + darcsver = b.buildPythonPackage (rec { + name = "darcsver-1.3.1"; + + src = fetchurl { + url = "http://pypi.python.org/packages/source/d/darcsver/${name}.tar.gz"; + sha256 = "1a5cl2yhnd88a4vkc9r381cbjkcvga87dp9zx5av68857q1nvvvq"; + }; + + buildInputs = [ pkgs.darcs ]; + + meta = { + description = "Darcsver, generate a version number from Darcs history"; + + homepage = http://pypi.python.org/pypi/darcsver; + + license = "BSD-style"; + }; + }); + + dateutil = b.buildPythonPackage (rec { + name = "dateutil-1.4.1"; + + src = fetchurl { + url = "http://pypi.python.org/packages/source/p/python-dateutil/python-${name}.tar.gz"; + sha256 = "0mrkh932k8s74h4rpgksvpmwbrrkq8zn78gbgwc22i2vlp31bdkl"; + }; + + meta = { + description = "Powerful extensions to the standard datetime module"; + + homepage = http://pypi.python.org/pypi/python-dateutil; + + license = "BSD-style"; + }; + }); + + foolscap = b.buildPythonPackage (rec { + name = "foolscap-0.4.2"; + + src = fetchurl { + url = "http://foolscap.lothar.com/releases/${name}.tar.gz"; + sha256 = "14g89kjxxci3ssl9jgvpkyrcq62g361aw8pamlkclk8nnrh4f776"; + }; + + propagatedBuildInputs = [ b.twisted pkgs.pyopenssl ]; + + # For some reason "python setup.py test" doesn't work with Python 2.6. + doCheck = false; + + meta = { + homepage = http://foolscap.lothar.com/; + + description = "Foolscap, an RPC protocol for Python that follows the distributed object-capability model"; + + longDescription = '' + "Foolscap" is the name for the next-generation RPC protocol, + intended to replace Perspective Broker (part of Twisted). + Foolscap is a protocol to implement a distributed + object-capabilities model in Python. + ''; + + # See http://foolscap.lothar.com/trac/browser/LICENSE. + license = "MIT"; + + maintainers = [ stdenv.lib.maintainers.ludo ]; + platforms = python.meta.platforms; + }; + }); + + genshi = b.buildPythonPackage { + name = "genshi-0.5.1"; + + src = fetchurl { + url = http://ftp.edgewall.com/pub/genshi/Genshi-0.5.1.tar.bz2; + sha256 = "1g2xw3zvgz59ilv7mrdlnvfl6ph8lwflwd4jr6zwrca2zhj7d8rs"; + }; + + patches = + [ # Fix `make check' (http://bugs.gentoo.org/276299) + (fetchurl { + url = "http://sources.gentoo.org/viewcvs.py/*checkout*/gentoo-x86/dev-python/genshi/files/genshi-0.5.1_test_fix.patch?rev=1.1"; + sha256 = "019skkas07lc2kjy5br5jhhf9dqfy4fs389m5f4ws3fc62fklwhk"; + }) + ]; + + buildInputs = [ b.setuptools ]; + + meta = { + description = "Python components for parsing HTML, XML and other textual content"; + + longDescription = '' + Python library that provides an integrated set of + components for parsing, generating, and processing HTML, XML or other + textual content for output generation on the web. + ''; + + license = "BSD"; + }; + }; + + jinja2 = b.buildPythonPackage { + name = "jinja2-2.2.1"; + + src = fetchurl { + url = "http://pypi.python.org/packages/source/J/Jinja2/Jinja2-2.2.1.tar.gz"; + md5 = "fea849d68891218eb0b21c170f1c32d5"; + }; + + meta = { + homepage = http://jinja.pocoo.org/; + description = "Stand-alone template engine"; + license = "BSD"; + longDescription = '' + Jinja2 is a template engine written in pure Python. It provides a + Django inspired non-XML syntax but supports inline expressions and + an optional sandboxed environment. + ''; + }; + }; + + lxml = b.buildPythonPackage ( rec { + name = "lxml-2.2.2"; + + src = fetchurl { + url = http://pypi.python.org/packages/source/l/lxml/lxml-2.2.2.tar.gz; + sha256 = "0zjpsy67wcs69qhb06ficl3a5z229hmczpr8h84rkk05vaagj8qv"; + }; + + buildInputs = [ pkgs.libxml2 pkgs.libxslt ]; + + meta = { + description = "Pythonic binding for the libxml2 and libxslt libraries"; + homepage = http://codespeak.net/lxml/index.html; + license = "BSD"; + }; + }); + + matplotlib = b.buildPythonPackage ( rec { + name = "matplotlib-0.99.1.2"; + + src = fetchurl { + url = "http://downloads.sourceforge.net/matplotlib/${name}.tar.gz"; + sha256 = "12lhwgkahck795946hb8wp605c912zq9ds8067ybbifqs56q24b9"; + }; + + doCheck = false; + + buildInputs = [ b.dateutil b.numpy pkgs.freetype pkgs.libpng pkgs.pkgconfig pkgs.tcl pkgs.tk pkgs.xlibs.libX11 ]; + + meta = { + description = "python plotting library, making publication quality plots"; + homepage = "http://matplotlib.sourceforge.net/"; + }; + }); + + mechanize = b.buildPythonPackage (rec { + name = "mechanize-0.1.11"; + + src = fetchurl { + url = "http://wwwsearch.sourceforge.net/mechanize/src/${name}.tar.gz"; + sha256 = "1h62mwy4iz09jqz17nrb9j8y0djd500zdfqwrz9xmdwqzqwixkj2"; + }; + + meta = { + description = "Stateful programmatic web browsing in Python"; + + homepage = http://wwwsearch.sourceforge.net/; + + license = "BSD-style"; + }; + }); + + namebench = b.buildPythonPackage (rec { + name = "namebench-1.0.5"; + + src = fetchurl { + url = "http://namebench.googlecode.com/files/${name}.tgz"; + sha256 = "6cbde35ce94d1f31e7d48f5d8eec13238b4dbc505675a33f1e183e600c1482c3"; + }; + + # No support of GUI yet. + + doCheck = false; + + meta = { + homepage = http://namebench.googlecode.com/; + description = "Find fastest DNS servers available"; + license = [ + "Apache-2.0" + # third-party program licenses (embedded in the sources) + "LGPL" # Crystal_Clear + "free" # dns + "Apache-2.0" # graphy + "BSD" # jinja2 + ]; + longDescription = '' + It hunts down the fastest DNS servers available for your computer to + use. namebench runs a fair and thorough benchmark using your web + browser history, tcpdump output, or standardized datasets in order + to provide an individualized recommendation. namebench is completely + free and does not modify your system in any way. + ''; + }; + }); + + nevow = b.buildPythonPackage (rec { + name = "nevow-0.9.33"; + + src = fetchurl { + url = "http://divmod.org/trac/attachment/wiki/SoftwareReleases/Nevow-0.9.33.tar.gz?format=raw"; + sha256 = "1b6zhfxx247b60n1qi2hrawhiaah88v8igg37pf7rjkmvy2z1c6c"; + name = "${name}.tar.gz"; + }; + + propagatedBuildInputs = [ b.twisted ]; + + postInstall = "twistd --help > /dev/null"; + + meta = { + description = "Nevow, a web application construction kit for Python"; + + longDescription = '' + Nevow - Pronounced as the French "nouveau", or "noo-voh", Nevow + is a web application construction kit written in Python. It is + designed to allow the programmer to express as much of the view + logic as desired in Python, and includes a pure Python XML + expression syntax named stan to facilitate this. However it + also provides rich support for designer-edited templates, using + a very small XML attribute language to provide bi-directional + template manipulation capability. + + Nevow also includes formless, a declarative syntax for + specifying the types of method parameters and exposing these + methods to the web. Forms can be rendered automatically, and + form posts will be validated and input coerced, rendering error + pages if appropriate. Once a form post has validated + successfully, the method will be called with the coerced values. + ''; + + homepage = http://divmod.org/trac/wiki/DivmodNevow; + + license = "BSD-style"; + }; + }); + + numpy = b.buildPythonPackage ( rec { + name = "numpy-1.3.0"; + + src = fetchurl { + url = "http://downloads.sourceforge.net/numpy/${name}.tar.gz"; + sha256 = "7524687cce85aa78103046db5e617c626b0ef871a203a049159f88f35647c90d"; + }; + + doCheck = false; + + buildInputs = [ pkgs.liblapack pkgs.blas /* pkgs.gfortran */ ]; + + # The build should be run as follows: + # + # python setup.py config_fc --fcompiler=gnu95 build + # python setup.py config_fc --fcompiler=gnu95 install + # + # But I con't figure out how to pass the extra flags to setuptools. + + meta = { + description = "Scientific tools for Python"; + homepage = "http://numpy.scipy.org/"; + }; + }); + + ply = b.buildPythonPackage (rec { + name = "ply-3.2"; + + src = fetchurl { + url = "http://www.dabeaz.com/ply/${name}.tar.gz"; + sha256 = "10z4xq8lc8c21v4g7z3zpnvpqbc0vidigrck1kqhwgkqi4gh0kfj"; + }; + + meta = { + homepage = http://www.dabeaz.com/ply/; + + description = "PLY (Python Lex-Yacc), an implementation of the lex and yacc parsing tools for Python"; + + longDescription = '' + PLY is an implementation of lex and yacc parsing tools for Python. + In a nutshell, PLY is nothing more than a straightforward lex/yacc + implementation. Here is a list of its essential features: It's + implemented entirely in Python; It uses LR-parsing which is + reasonably efficient and well suited for larger grammars; PLY + provides most of the standard lex/yacc features including support for + empty productions, precedence rules, error recovery, and support for + ambiguous grammars; PLY is straightforward to use and provides very + extensive error checking; PLY doesn't try to do anything more or less + than provide the basic lex/yacc functionality. In other words, it's + not a large parsing framework or a component of some larger system. + ''; + + license = "revised-BSD"; + + maintainers = [ stdenv.lib.maintainers.ludo ]; + platforms = python.meta.platforms; + }; + }); + + psycopg2 = b.buildPythonPackage rec { + name = "psycopg2-2.0.13"; + + doCheck = false; + + src = fetchurl { + url = "http://initd.org/pub/software/psycopg/PSYCOPG-2-0/${name}.tar.gz"; + sha256 = "0arkaa1nbbd3pyn4l1bc75wi7nff3vxxh4s8sj5al5hv20p64pm1"; + }; + + propagatedBuildInputs = [ pkgs.postgresql ]; + + meta = { + description = "PostgreSQL database adapter for the Python programming language"; + license = "GPLv2/ZPL"; + }; + }; + + pycryptopp = b.buildPythonPackage (rec { + name = "pycryptopp-0.5.15"; + + src = fetchurl { + url = "http://pypi.python.org/packages/source/p/pycryptopp/${name}.tar.gz"; + sha256 = "0f8v3cs8vjpj423yx3ikj7qjvljrm86x0qpkckidv69kah8kndxa"; + }; + + # Use our own copy of Crypto++. + preConfigure = "export PYCRYPTOPP_DISABLE_EMBEDDED_CRYPTOPP=1"; + + buildInputs = [ b.setuptoolsDarcs b.darcsver pkgs.cryptopp ]; + + meta = { + homepage = http://allmydata.org/trac/pycryptopp; + + description = "Python wrappers for the Crypto++ library"; + + license = "GPLv2+"; + + maintainers = [ stdenv.lib.maintainers.ludo ]; + platforms = stdenv.lib.platforms.linux; + }; + }); + + pysqlite = b.buildPythonPackage (rec { + name = "pysqlite-2.5.5"; + + src = fetchurl { + url = "http://pysqlite.googlecode.com/files/${name}.tar.gz"; + sha256 = "ef7ca7f44893790e1a7084b10ea083770e138689406fddc7076d12d6bff4d44f"; + }; + + # Since the `.egg' file is zipped, the `NEEDED' of the `.so' files + # it contains is not taken into account. Thus, we must explicitly make + # it a propagated input. + propagatedBuildInputs = [ pkgs.sqlite ]; + + patchPhase = '' + substituteInPlace "setup.cfg" \ + --replace "/usr/local/include" "${pkgs.sqlite}/include" \ + --replace "/usr/local/lib" "${pkgs.sqlite}/lib" + ''; + + # FIXME: How do we run the tests? + doCheck = false; + + meta = { + homepage = http://pysqlite.org/; + + description = "Python bindings for the SQLite embedded relational database engine"; + + longDescription = '' + pysqlite is a DB-API 2.0-compliant database interface for SQLite. + + SQLite is a relational database management system contained in + a relatively small C library. It is a public domain project + created by D. Richard Hipp. Unlike the usual client-server + paradigm, the SQLite engine is not a standalone process with + which the program communicates, but is linked in and thus + becomes an integral part of the program. The library + implements most of SQL-92 standard, including transactions, + triggers and most of complex queries. + + pysqlite makes this powerful embedded SQL engine available to + Python programmers. It stays compatible with the Python + database API specification 2.0 as much as possible, but also + exposes most of SQLite's native API, so that it is for example + possible to create user-defined SQL functions and aggregates + in Python. + ''; + + license = "revised BSD"; + + maintainers = [ stdenv.lib.maintainers.ludo ]; + platforms = python.meta.platforms; + }; + }); + + pyutil = b.buildPythonPackage (rec { + name = "pyutil-1.3.30"; + + src = fetchurl { + url = "http://pypi.python.org/packages/source/p/pyutil/${name}.tar.gz"; + sha256 = "1ksb4gn8x53wcyddmjv1ma8cvvhjlmfxc6kpszyhb838i7xzla19"; + }; + + buildInputs = [ b.setuptoolsDarcs ]; + propagatedBuildInputs = [ b.zbase32 b.argparse ]; + + meta = { + description = "Pyutil, a collection of mature utilities for Python programmers"; + + longDescription = '' + These are a few data structures, classes and functions which + we've needed over many years of Python programming and which + seem to be of general use to other Python programmers. Many of + the modules that have existed in pyutil over the years have + subsequently been obsoleted by new features added to the + Python language or its standard library, thus showing that + we're not alone in wanting tools like these. + ''; + + homepage = http://allmydata.org/trac/pyutil; + + license = "GPLv2+"; + }; + }); + + pyyaml = b.buildPythonPackage (rec { + name = "PyYAML-3.09"; + + src = fetchurl { + url = "http://pyyaml.org/download/pyyaml/PyYAML-3.09.zip"; + sha256 = "204aca8b42dbe90e460794d743dd16182011da85507bfd4f092f9f76e0688040"; + }; + + buildInputs = [ pkgs.unzip pkgs.pyrex ]; + propagatedBuildInputs = [ pkgs.libyaml ]; + + meta = { + description = "The next generation YAML parser and emitter for Python"; + homepage = http://pyyaml.org; + license = "free"; # !? + }; + }); + + setuptoolsDarcs = b.buildPythonPackage { + name = "setuptools-darcs-1.2.8"; + + src = fetchurl { + url = "http://pypi.python.org/packages/source/s/setuptools_darcs/setuptools_darcs-1.2.8.tar.gz"; + sha256 = "0jg9q9mhsky444mm7lpmmlxai8hmjg4pc71viv4kni8gls0gk9n8"; + }; + + propagatedBuildInputs = [ pkgs.darcs ]; + + meta = { + description = "setuptools plugin for the Darcs version control system"; + + homepage = http://allmydata.org/trac/setuptools_darcs; + + license = "BSD"; + }; + }; + + setuptoolsTrial = b.b.buildPythonPackage { + name = "setuptools-trial-0.5.3"; + + src = fetchurl { + url = "http://pypi.python.org/packages/source/s/setuptools_trial/setuptools_trial-0.5.3.tar.gz"; + sha256 = "0h3mgjsz3z1sjl9j0b6bv4bss8d0przamj4gnjmpyazc633hhlyi"; + }; + + propagatedBuildInputs = [ b.twisted ]; + + meta = { + description = "setuptools plug-in that helps run unit tests built with the \"Trial\" framework (from Twisted)"; + + homepage = http://allmydata.org/trac/setuptools_trial; + + license = "unspecified"; # ! + }; + }; + + simplejson = b.b.buildPythonPackage (rec { + name = "simplejson-2.0.9"; + + src = fetchsvn { + url = "http://simplejson.googlecode.com/svn/tags/${name}"; + sha256 = "a48d5256fdb4f258c33da3dda110ecf3c786f086dcb08a01309acde6d1ddb921"; + rev = "172"; # to be on the safe side + }; + + meta = { + description = "simplejson is a simple, fast, extensible JSON encoder/decoder for Python"; + + longDescription = '' + simplejson is compatible with Python 2.4 and later with no + external dependencies. It covers the full JSON specification + for both encoding and decoding, with unicode support. By + default, encoding is done in an encoding neutral fashion (plain + ASCII with \uXXXX escapes for unicode characters). + ''; + + homepage = http://code.google.com/p/simplejson/; + + license = "MIT"; + }; + }); + + trac = b.buildPythonPackage { + name = "trac-0.11.5"; + + src = fetchurl { + url = http://ftp.edgewall.com/pub/trac/Trac-0.11.5.tar.gz; + sha256 = "cc3362ecc533abc1755dd78e2d096d1413bc975abc3185318f4821458cd6a8ac"; + }; + + doCheck = false; + + PYTHON_EGG_CACHE = "`pwd`/.egg-cache"; + + propagatedBuildInputs = [ b.genshi b.setuptools ]; + + meta = { + description = "Enhanced wiki and issue tracking system for software development projects"; + + license = "BSD"; + }; + }; + + twisted = b.buildPythonPackage { + name = "twisted-8.2.0"; + + src = fetchurl { + url = http://tmrc.mit.edu/mirror/twisted/Twisted/8.2/Twisted-8.2.0.tar.bz2; + sha256 = "1c6zplisjdnjzkfs0ld3a0f7m7xbjgx5rcwsdw5i1xiibsq2nq70"; + }; + + propagatedBuildInputs = [ b.ZopeInterface ]; + + # Generate Twisted's plug-in cache. Twited users must do it as well. See + # http://twistedmatrix.com/documents/current/core/howto/plugin.html#auto3 + # and http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=477103 for + # details. + postInstall = "$out/bin/twistd --help > /dev/null"; + + meta = { + homepage = http://twistedmatrix.com/; + + description = "Twisted, an event-driven networking engine written in Python"; + + longDescription = '' + Twisted is an event-driven networking engine written in Python + and licensed under the MIT license. + ''; + + license = "MIT"; + + maintainers = [ stdenv.lib.maintainers.ludo ]; + platforms = python.meta.platforms; + }; + }; + + zbase32 = b.buildPythonPackage (rec { + name = "zbase32-1.1.1"; + + src = fetchurl { + url = "http://pypi.python.org/packages/source/z/zbase32/${name}.tar.gz"; + sha256 = "0n59l4rs26vrhxpsfrwybjjir68aj23f09k1yjnbxqy5n0khp8gm"; + }; + + # Tests require `pyutil' so disable them to avoid circular references. + doCheck = false; + + buildInputs = [ b.setuptoolsDarcs ]; + + meta = { + description = "zbase32, a base32 encoder/decoder"; + + homepage = http://pypi.python.org/pypi/zbase32; + + license = "BSD"; + }; + }); + + zfec = b.buildPythonPackage (rec { + name = "zfec-1.4.4"; + + src = fetchurl { + url = "http://pypi.python.org/packages/source/z/zfec/${name}.tar.gz"; + sha256 = "0rgg7nsvbr4f9xmiclzypc39fnivg23kldv5aa8si0bgsxn6mh6w"; + }; + + buildInputs = [ b.setuptoolsDarcs ]; + propagatedBuildInputs = [ b.pyutil b.argparse ]; + + meta = { + homepage = http://allmydata.org/trac/zfec; + + description = "Zfec, a fast erasure codec which can be used with the command-line, C, Python, or Haskell"; + + longDescription = '' + Fast, portable, programmable erasure coding a.k.a. "forward + error correction": the generation of redundant blocks of + information such that if some blocks are lost then the + original data can be recovered from the remaining blocks. The + zfec package includes command-line tools, C API, Python API, + and Haskell API. + ''; + + license = "GPLv2+"; + }; + }); + + xmpppy = builderDefsPackage (import ./xmpppy) { + inherit python; + inherit (b) setuptools; + }; + + }; + +}.result diff --git a/pkgs/development/python2-packages/flup/default.nix b/pkgs/development/python2-packages/flup/default.nix new file mode 100644 index 000000000000..2c0a84aec1a5 --- /dev/null +++ b/pkgs/development/python2-packages/flup/default.nix @@ -0,0 +1,18 @@ +{ stdenv, fetchurl, python, setuptools, ... }: + +rec { + name = "flup-1.0.2"; + + src = fetchurl { + url = "http://www.saddi.com/software/flup/dist/${name}.tar.gz"; + sha256 = "1nbx174g40l1z3a8arw72qz05a1qxi3didp9wm7kvkn1bxx33bab"; + }; + + buildInputs = [ python setuptools ]; + + phaseNames = ["addInputs" "createPythonInstallationTarget" "installPythonPackage"]; + + meta = { + description = "FastCGI Python module set"; + }; +} diff --git a/pkgs/development/python2-packages/generic/default.nix b/pkgs/development/python2-packages/generic/default.nix new file mode 100644 index 000000000000..458a30116ae8 --- /dev/null +++ b/pkgs/development/python2-packages/generic/default.nix @@ -0,0 +1,98 @@ +/* This function provides a generic Python package builder. It is + intended to work with packages that use `setuptools' + (http://pypi.python.org/pypi/setuptools/), which represents a large + number of Python packages nowadays. */ + +{ python, setuptools, makeWrapper, lib }: + +{ name, namePrefix ? "python-", src, meta, patches ? [] +, doCheck ? true, checkPhase ? "python setup.py test" +, postInstall ? "" +, ... } @ attrs: + +let + # Return the list of recursively propagated build inputs of PKG. + recursiveBuildInputs = + pkg: + [ pkg ] ++ + (if pkg ? propagatedBuildNativeInputs + then lib.concatLists (map recursiveBuildInputs + pkg.propagatedBuildNativeInputs) + else []); + +in + +python.stdenv.mkDerivation ( + # Keep extra attributes from ATTR, e.g., `patchPhase', etc. + attrs + + // + + (rec { + inherit src meta patches doCheck checkPhase; + + name = namePrefix + attrs.name; + + buildInputs = [ python setuptools makeWrapper ] ++ + (if attrs ? buildInputs then attrs.buildInputs else []); + + propagatedBuildInputs = [ setuptools ] ++ + (if attrs ? propagatedBuildInputs + then attrs.propagatedBuildInputs + else []); + + buildPhase = "true"; + + # XXX: Should we run `easy_install --always-unzip'? It doesn't seem + # to have a noticeable impact on small scripts. + installPhase = '' + ensureDir "$out/lib/${python.libPrefix}/site-packages" + + echo "installing \`${name}' with \`easy_install'..." + export PYTHONPATH="$out/lib/${python.libPrefix}/site-packages:$PYTHONPATH" + easy_install --prefix="$out" . + + ${postInstall} + ''; + + postFixup = '' + # Wrap scripts that are under `{s,}bin/' so that they get the right + # $PYTHONPATH. + for i in "$out/bin/"* "$out/sbin/"* + do + if head -n1 "$i" | grep -q "${python}" + then + echo "wrapping \`$i'..." + + # Compute a $PATH prefix for the program. + program_PATH="" + ${lib.concatStrings + (map (path: + ''if [ -d "${path}/bin" ] + then + program_PATH="${path}/bin'' + "\$" + ''{program_PATH:+:}$program_PATH" + fi + '') + (lib.concatMap recursiveBuildInputs propagatedBuildInputs))} + + wrapProgram "$i" \ + --prefix PYTHONPATH ":" \ + ${lib.concatStringsSep ":" + ([ "$out/lib/${python.libPrefix}/site-packages" ] ++ + (map (path: path + "/lib/${python.libPrefix}/site-packages") + (lib.concatMap recursiveBuildInputs + propagatedBuildInputs)))} \ + --prefix PATH ":" "$program_PATH" + + fi + done + + # If a user installs a Python package, she probably also wants its + # dependencies in the user environment (since Python modules don't + # have something like an RPATH, so the only way to find the + # dependencies is to have them in the PYTHONPATH variable). + if test -e $out/nix-support/propagated-build-inputs; then + ln -s $out/nix-support/propagated-build-inputs $out/nix-support/propagated-user-env-packages + fi + ''; +})) diff --git a/pkgs/development/python2-packages/irclib/default.nix b/pkgs/development/python2-packages/irclib/default.nix new file mode 100644 index 000000000000..c840e0a10035 --- /dev/null +++ b/pkgs/development/python2-packages/irclib/default.nix @@ -0,0 +1,32 @@ +a : +let + fetchurl = a.fetchurl; + + version = a.lib.attrByPath ["version"] "0.4.8" a; + buildInputs = with a; [ + python + ]; +in +rec { + src = fetchurl { + url = "http://prdownloads.sourceforge.net/sourceforge/python-irclib/python-irclib-${version}.tar.gz"; + sha256 = "1x5456y4rbxmnw4yblhb4as5791glcw394bm36px3x6l05j3mvl1"; + }; + patches = [(fetchurl { + url = "http://trac.uwc.ac.za/trac/python_tools/browser/xmpp/resources/irc-transport/irclib.py.diff?rev=387&format=raw"; + name = "irclib.py.diff"; + sha256 = "5fb8d95d6c95c93eaa400b38447c63e7a176b9502bc49b2f9b788c9905f4ec5e"; + })]; + patchFlags = "irclib.py"; + + inherit buildInputs; + configureFlags = []; + + /* doConfigure should be removed if not needed */ + phaseNames = ["doPatch" "installPythonPackage"]; + + name = "python-irclib-" + version; + meta = { + description = "Python IRC library"; + }; +} diff --git a/pkgs/development/python2-packages/libsexy/default.nix b/pkgs/development/python2-packages/libsexy/default.nix new file mode 100644 index 000000000000..fa00a7040a03 --- /dev/null +++ b/pkgs/development/python2-packages/libsexy/default.nix @@ -0,0 +1,32 @@ +a : +let + fetchurl = a.fetchurl; + + version = a.lib.attrByPath ["version"] "0.1.9" a; + buildInputs = with a; [ + pkgconfig pygtk + ]; + propagatedBuildInputs = with a; [ + libsexy python gtk glib pango libxml2 + ]; +in +rec { + src = fetchurl { + url = "http://releases.chipx86.com/libsexy/sexy-python/sexy-python-${version}.tar.gz"; + sha256 = "05bgcsxwkp63rlr8wg6znd46cfbhrzc5wh70jabsi654pxxjb39d"; + }; + + inherit buildInputs propagatedBuildInputs; + configureFlags = []; + + /* doConfigure should be removed if not needed */ + phaseNames = ["doConfigure" "doMakeInstall" "postInstall"]; + postInstall = a.fullDepEntry ('' + ln -s $out/lib/python*/site-packages/gtk-2.0/* $out/lib/python*/site-packages/ + '') ["minInit"]; + + name = "python-libsexy-" + version; + meta = { + description = "Python libsexy bindings"; + }; +} diff --git a/pkgs/development/python2-packages/numeric/default.nix b/pkgs/development/python2-packages/numeric/default.nix new file mode 100644 index 000000000000..e97b2a5f1a40 --- /dev/null +++ b/pkgs/development/python2-packages/numeric/default.nix @@ -0,0 +1,40 @@ +{ fetchurl, stdenv, python }: + +let version = "24.2"; in + stdenv.mkDerivation { + name = "python-numeric-${version}"; + + src = fetchurl { + url = "mirror://sourceforge/numpy/Numeric-${version}.tar.gz"; + sha256 = "0n2jy47n3d121pky4a3r0zjmk2vk66czr2x3y9179xbgxclyfwjz"; + }; + + buildInputs = [ python ]; + + buildPhase = ''python setup.py build --build-base "$out"''; + installPhase = '' + python setup.py install --prefix "$out" + + # Remove the `lib.linux-i686-2.5' and `temp.linux-i686-2.5' (or + # similar) directories. + rm -rf $out/lib.* $out/temp.* + ''; + + # FIXME: Run the tests. + + meta = { + description = "Numeric, a Python module for high-performance, numeric computing"; + + longDescription = '' + Numeric is a Python module for high-performance, numeric + computing. It provides much of the functionality and + performance of commercial numeric software such as Matlab; it + some cases, it provides more functionality than commercial + software. + ''; + + license = "Python+LLNL"; + + homepage = http://people.csail.mit.edu/jrennie/python/numeric/; + }; + } \ No newline at end of file diff --git a/pkgs/development/python2-packages/pil/default.nix b/pkgs/development/python2-packages/pil/default.nix new file mode 100644 index 000000000000..e4586762527d --- /dev/null +++ b/pkgs/development/python2-packages/pil/default.nix @@ -0,0 +1,41 @@ +{ fetchurl, stdenv, python +, libjpeg, zlib, freetype }: + +let version = "1.1.6"; +in + stdenv.mkDerivation { + name = "python-imaging-${version}"; + src = fetchurl { + url = "http://effbot.org/downloads/Imaging-${version}.tar.gz"; + sha256 = "141zidl3s9v4vfi3nsbg42iq1lc2a932gprqr1kij5hrnn53bmvx"; + }; + + buildInputs = [ python libjpeg zlib freetype ]; + + doCheck = true; + + configurePhase = '' + sed -i "setup.py" \ + -e 's|^FREETYPE_ROOT =.*$|FREETYPE_ROOT = libinclude("${freetype}")|g ; + s|^JPEG_ROOT =.*$|JPEG_ROOT = libinclude("${libjpeg}")|g ; + s|^ZLIB_ROOT =.*$|ZLIB_ROOT = libinclude("${zlib}")|g ;' + ''; + + buildPhase = "python setup.py build_ext -i"; + checkPhase = "python selftest.py"; + installPhase = "python setup.py install --prefix=$out"; + + meta = { + homepage = http://www.pythonware.com/products/pil/; + description = "The Python Imaging Library (PIL)"; + + longDescription = '' + The Python Imaging Library (PIL) adds image processing + capabilities to your Python interpreter. This library + supports many file formats, and provides powerful image + processing and graphics capabilities. + ''; + + license = "http://www.pythonware.com/products/pil/license.htm"; + }; + } diff --git a/pkgs/development/python2-packages/psyco/default.nix b/pkgs/development/python2-packages/psyco/default.nix new file mode 100644 index 000000000000..1bdade67d68c --- /dev/null +++ b/pkgs/development/python2-packages/psyco/default.nix @@ -0,0 +1,14 @@ +{stdenv, fetchurl, python}: + +assert stdenv.system == "i686-linux"; + +stdenv.mkDerivation { + name = "psyco-1.5.2"; + src = fetchurl { + url = mirror://sourceforge/psyco/psyco-1.5.2-src.tar.gz; + md5 = "bceb17423d06b573dc7b875d34e79417"; + }; + buildInputs = [python]; + buildPhase = "true"; + installPhase = "python ./setup.py install --prefix=$out"; +} diff --git a/pkgs/development/python2-packages/pycairo/default.nix b/pkgs/development/python2-packages/pycairo/default.nix new file mode 100644 index 000000000000..8aebf1d78290 --- /dev/null +++ b/pkgs/development/python2-packages/pycairo/default.nix @@ -0,0 +1,11 @@ +{stdenv, fetchurl, python, pkgconfig, cairo, x11}: + +stdenv.mkDerivation { + name = "pycairo-1.8.8"; + src = fetchurl { + url = http://cairographics.org/releases/pycairo-1.8.8.tar.gz; + sha256 = "0q18hd4ai4raljlvd76ylgi30kxpr2qq83ka6gzwh0ya8fcmjlig"; + }; + + buildInputs = [python pkgconfig cairo x11]; +} diff --git a/pkgs/development/python2-packages/pycrypto/default.nix b/pkgs/development/python2-packages/pycrypto/default.nix new file mode 100644 index 000000000000..67413fa93708 --- /dev/null +++ b/pkgs/development/python2-packages/pycrypto/default.nix @@ -0,0 +1,15 @@ +{stdenv, fetchurl, python, gmp}: + +stdenv.mkDerivation { + name = "pycrypto-2.0.1"; + src = fetchurl { + url = http://www.amk.ca/files/python/crypto/pycrypto-2.0.1.tar.gz; + md5 = "4d5674f3898a573691ffb335e8d749cd"; + }; + buildInputs = [python gmp]; + buildPhase = "true"; + installPhase = " + python ./setup.py build_ext --library-dirs=${gmp}/lib + python ./setup.py install --prefix=$out + "; +} diff --git a/pkgs/development/python2-packages/pycups/default.nix b/pkgs/development/python2-packages/pycups/default.nix new file mode 100644 index 000000000000..18de5fbe7f1c --- /dev/null +++ b/pkgs/development/python2-packages/pycups/default.nix @@ -0,0 +1,17 @@ +{stdenv, fetchurl, python, cups}: + +let + version = "1.9.49"; +in +stdenv.mkDerivation { + name = "pycups-${version}"; + src = fetchurl { + url = "http://cyberelk.net/tim/data/pycups/pycups-${version}.tar.bz2"; + sha256 = "1gpp28sknjw5z4mzhaifc6hkfrlbm2y6w870q47ia8amnm05d3pk"; + }; + buildPhase = ""; + installPhase = '' + CFLAGS=-DVERSION=\\\"${version}\\\" python ./setup.py install --prefix $out + ''; + buildInputs = [ python cups ]; +} diff --git a/pkgs/development/python2-packages/pygame/default.nix b/pkgs/development/python2-packages/pygame/default.nix new file mode 100644 index 000000000000..347501f8a5b7 --- /dev/null +++ b/pkgs/development/python2-packages/pygame/default.nix @@ -0,0 +1,46 @@ +{ fetchurl, stdenv, python, pkgconfig, SDL, SDL_image, SDL_mixer, SDL_ttf +, numeric }: + +stdenv.mkDerivation { + name = "pygame-1.7"; + + src = fetchurl { + url = http://www.pygame.org/ftp/pygame-1.7.1release.tar.gz ; + sha256 = "0hl0rmgjcqj217fibwyilz7w9jpg0kh7hsa7vyzd4cgqyliskpqi"; + }; + + buildInputs = [python pkgconfig SDL SDL_image SDL_ttf numeric]; + + configurePhase = '' + export LOCALBASE=/// + sed -e "/origincdirs =/a'${SDL_image}/include/SDL','${SDL_image}/include'," -i config_unix.py + sed -e "/origlibdirs =/aoriglibdirs += '${SDL_image}/lib'," -i config_unix.py + sed -e "/origincdirs =/a'${SDL_mixer}/include/SDL','${SDL_mixer}/include'," -i config_unix.py + sed -e "/origlibdirs =/aoriglibdirs += '${SDL_mixer}/lib'," -i config_unix.py + sed -e "/origincdirs =/a'${SDL_ttf}/include/SDL','${SDL_ttf}/include'," -i config_unix.py + sed -e "/origlibdirs =/aoriglibdirs += '${SDL_ttf}/lib'," -i config_unix.py + sed -e "/origincdirs =/a'${numeric}/include/python2.5'," -i config_unix.py + + sed -e "s|get_python_inc(0)|\"${numeric}/include/python2.5\"|g" -i config_unix.py + + # XXX: `Numeric.pth' should be found by Python but it's not, hence the + # $PYTHONPATH setting below. Gobolinux has the same problem: + # http://bugs.python.org/issue1431 . + yes Y | \ + PYTHONPATH="${numeric}/lib/python2.5/site-packages/Numeric:$PYTHONPATH" \ + python config.py + + # That `config.py' is really deeply broken. + sed -i Setup \ + -e "s|^NUMERIC *=.*$|NUMERIC = -I${numeric}/include/python2.5|g ; + s|^MIXER *=.*$|MIXER = -I${SDL_mixer}/include -L${SDL_mixer}/lib -lSDL_mixer|g" + ''; + + buildPhase = "yes Y | python setup.py build"; + + installPhase = "yes Y | python setup.py install --prefix=\${out} "; + + meta = { + description = "Python library for games"; + }; +} diff --git a/pkgs/development/python2-packages/pygobject/default.nix b/pkgs/development/python2-packages/pygobject/default.nix new file mode 100644 index 000000000000..4007b7210117 --- /dev/null +++ b/pkgs/development/python2-packages/pygobject/default.nix @@ -0,0 +1,11 @@ +{stdenv, fetchurl, python, pkgconfig, glib}: + +stdenv.mkDerivation { + name = "pygobject-2.20.0"; + src = fetchurl { + url = http://ftp.gnome.org/pub/GNOME/sources/pygobject/2.20/pygobject-2.20.0.tar.bz2; + sha256 = "10gsf3i2q9y659hayxyaxyfz7inswcjc8m6iyqckwsj2yjij7sa1"; + }; + + buildInputs = [python pkgconfig glib]; +} diff --git a/pkgs/development/python2-packages/pygtk/default.nix b/pkgs/development/python2-packages/pygtk/default.nix new file mode 100644 index 000000000000..76b50372ca26 --- /dev/null +++ b/pkgs/development/python2-packages/pygtk/default.nix @@ -0,0 +1,17 @@ +{stdenv, fetchurl, python, pkgconfig, glib, gtk, pygobject, pycairo + , libglade ? null}: + +stdenv.mkDerivation { + name = "pygtk-2.16.0"; + + src = fetchurl { + url = http://ftp.gnome.org/pub/GNOME/sources/pygtk/2.16/pygtk-2.16.0.tar.bz2; + sha256 = "1a24fkxslir8zb800hs4ix9iyvgqsy5c6hdfirrh2yi1mw0mxbkz"; + }; + + buildInputs = [python pkgconfig glib gtk] + ++ (if libglade != null then [libglade] else []) + ; + + propagatedBuildInputs = [pygobject pycairo]; +} diff --git a/pkgs/development/python2-packages/pyopengl/default.nix b/pkgs/development/python2-packages/pyopengl/default.nix new file mode 100644 index 000000000000..6a8008d25255 --- /dev/null +++ b/pkgs/development/python2-packages/pyopengl/default.nix @@ -0,0 +1,38 @@ +{ 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 ]; + propagatedBuildInputs = [ 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/development/python2-packages/pyopenssl/default.nix b/pkgs/development/python2-packages/pyopenssl/default.nix new file mode 100644 index 000000000000..86a79f1070e9 --- /dev/null +++ b/pkgs/development/python2-packages/pyopenssl/default.nix @@ -0,0 +1,26 @@ +a : +let + fetchurl = a.fetchurl; + + version = a.lib.attrByPath ["version"] "0.8" a; + propagatedBuildInputs = with a; [ + openssl python + ]; +in +rec { + src = fetchurl { + url = "http://prdownloads.sourceforge.net/sourceforge/pyopenssl/pyOpenSSL-${version}.tar.gz"; + sha256 = "1qzzycjyp1qsw87msj9kg2q3h7il1bf4jkrwy841y0zi44fl3112"; + }; + + inherit propagatedBuildInputs; + configureFlags = []; + + /* doConfigure should be removed if not needed */ + phaseNames = ["installPythonPackage"]; + + name = "pyOpenSSL-" + version; + meta = { + description = "Python OpenSSL wrapper capable of checking certificates"; + }; +} diff --git a/pkgs/development/python2-packages/pyqt/4.5.nix b/pkgs/development/python2-packages/pyqt/4.5.nix new file mode 100644 index 000000000000..4357a4c0ed0d --- /dev/null +++ b/pkgs/development/python2-packages/pyqt/4.5.nix @@ -0,0 +1,22 @@ +{stdenv, fetchurl, python, sip, qt4}: + +stdenv.mkDerivation { + name = "pyqt-x11-gpl-4.5.4"; + + src = fetchurl { + url = http://pyqwt.sourceforge.net/support/PyQt-x11-gpl-4.5.4.tar.gz; # Not downloading from riverbank, since they remove older releases + sha256 = "1a55zng6yhnbk5swc02bkbyccdgf0f0v94yxk9v5a43hv9xnrl5k"; + }; + + configurePhase = "python ./configure.py --confirm-license -b $out/bin -d $out/lib/${python.libPrefix}/site-packages -v $out/share/sip -p $out/plugins"; + + buildInputs = [ python sip qt4 ]; + + meta = { + description = "Python bindings for Qt"; + license = "GPL"; + homepage = http://www.riverbankcomputing.co.uk; + maintainers = [ stdenv.lib.maintainers.sander ]; + platforms = stdenv.lib.platforms.mesaPlatforms; + }; +} diff --git a/pkgs/development/python2-packages/pyqt/4.7.nix b/pkgs/development/python2-packages/pyqt/4.7.nix new file mode 100644 index 000000000000..eb09a32d00c6 --- /dev/null +++ b/pkgs/development/python2-packages/pyqt/4.7.nix @@ -0,0 +1,22 @@ +{stdenv, fetchurl, python, sip, qt4}: + +stdenv.mkDerivation { + name = "pyqt-x11-gpl-4.7.2"; + + src = fetchurl { + url = http://www.riverbankcomputing.co.uk/static/Downloads/PyQt4/PyQt-x11-gpl-4.7.2.tar.gz; + sha256 = "097gxdr7jqv5a58z89djylm2b21x83crqn2fjsr5zmwhc0zwj5yv"; + }; + + configurePhase = "python ./configure.py --confirm-license -b $out/bin -d $out/lib/${python.libPrefix}/site-packages -v $out/share/sip -p $out/plugins"; + + buildInputs = [ python sip qt4 ]; + + meta = { + description = "Python bindings for Qt"; + license = "GPL"; + homepage = http://www.riverbankcomputing.co.uk; + maintainers = [ stdenv.lib.maintainers.sander ]; + platforms = stdenv.lib.platforms.mesaPlatforms; + }; +} diff --git a/pkgs/development/python2-packages/python-sip/4.10.nix b/pkgs/development/python2-packages/python-sip/4.10.nix new file mode 100644 index 000000000000..c64d7be52f70 --- /dev/null +++ b/pkgs/development/python2-packages/python-sip/4.10.nix @@ -0,0 +1,20 @@ +{ stdenv, fetchurl, python }: + +stdenv.mkDerivation rec { + name = "sip-4.10.1"; + + src = fetchurl { + url = "http://www.riverbankcomputing.co.uk/static/Downloads/sip4/${name}.tar.gz"; + sha256 = "16pdk86amcl4hnc9vv2y1ihl8ym9hjkh49andm4jahv4630qhc9h"; + }; + + configurePhase = "python ./configure.py -d $out/lib/${python.libPrefix}/site-packages -b $out/bin -e $out/include"; + + buildInputs = [ python ]; + + meta = { + description = "Creates C++ bindings for Python modules"; + license = "GPL"; + maintainers = [ stdenv.lib.maintainers.sander ]; + }; +} diff --git a/pkgs/development/python2-packages/python-sip/default.nix b/pkgs/development/python2-packages/python-sip/default.nix new file mode 100644 index 000000000000..3fb827e4600e --- /dev/null +++ b/pkgs/development/python2-packages/python-sip/default.nix @@ -0,0 +1,20 @@ +{ stdenv, fetchurl, python }: + +stdenv.mkDerivation { + name = "sip-4.8.2"; + + src = fetchurl { + url = http://pyqwt.sourceforge.net/support/sip-4.8.2.tar.gz; # Not downloading from riverbank, since they remove older releases + sha256 = "1afr2qaibzgf8fq4fmc31jz9hvbwxbg5jvl68ygvkkdvnbg2kfrf"; + }; + + configurePhase = "python ./configure.py -d $out/lib/${python.libPrefix}/site-packages -b $out/bin -e $out/include"; + + buildInputs = [ python ]; + + meta = { + description = "Creates C++ bindings for Python modules"; + license = "GPL"; + maintainers = [ stdenv.lib.maintainers.sander ]; + }; +} diff --git a/pkgs/development/python2-packages/pyx/default.nix b/pkgs/development/python2-packages/pyx/default.nix new file mode 100644 index 000000000000..374158da810c --- /dev/null +++ b/pkgs/development/python2-packages/pyx/default.nix @@ -0,0 +1,40 @@ +{stdenv, fetchurl, python, makeWrapper}: + +stdenv.mkDerivation rec { + name = "PyX-0.10"; + src = fetchurl { + url = "mirror://sourceforge/pyx/${name}.tar.gz"; + sha256 = "dfaa4a7790661d67d95f80b22044fdd8a9922483631950296ff1d7a9f85c8bba"; + }; + + patchPhase = '' + substituteInPlace ./setup.py --replace '"/etc"' '"etc"' + ''; + + buildInputs = [python makeWrapper]; + buildPhase = "python ./setup.py build"; + installPhase = '' + python ./setup.py install --prefix="$out" || exit 1 + + for i in "$out/bin/"* + do + # FIXME: We're assuming Python 2.4. + wrapProgram "$i" --prefix PYTHONPATH : \ + "$out/lib/python2.4/site-packages" || \ + exit 2 + done + ''; + + meta = { + description = ''Python graphics package''; + longDescription = '' + PyX is a Python package for the creation of PostScript and PDF + files. It combines an abstraction of the PostScript drawing + model with a TeX/LaTeX interface. Complex tasks like 2d and 3d + plots in publication-ready quality are built out of these + primitives. + ''; + license = "GPLv2"; + homepage = http://pyx.sourceforge.net/; + }; +} diff --git a/pkgs/development/python2-packages/pyxml/default.nix b/pkgs/development/python2-packages/pyxml/default.nix new file mode 100644 index 000000000000..3c36565b5266 --- /dev/null +++ b/pkgs/development/python2-packages/pyxml/default.nix @@ -0,0 +1,28 @@ +{stdenv, fetchurl, python, makeWrapper}: + +stdenv.mkDerivation rec { + name = "PyXML-0.8.4"; + src = fetchurl { + url = "mirror://sourceforge/pyxml/${name}.tar.gz"; + sha256 = "04wc8i7cdkibhrldy6j65qp5l75zjxf5lx6qxdxfdf2gb3wndawz"; + }; + + buildInputs = [python makeWrapper]; + buildPhase = "python ./setup.py build"; + installPhase = '' + python ./setup.py install --prefix="$out" || exit 1 + + for i in "$out/bin/"* + do + # FIXME: We're assuming Python 2.4. + wrapProgram "$i" --prefix PYTHONPATH : \ + "$out/lib/python2.4/site-packages" || \ + exit 2 + done + ''; + + meta = { + description = "A collection of libraries to process XML with Python"; + homepage = http://pyxml.sourceforge.net/; + }; +} diff --git a/pkgs/development/python2-packages/rhpl/builder.sh b/pkgs/development/python2-packages/rhpl/builder.sh new file mode 100644 index 000000000000..5c56b70c24f9 --- /dev/null +++ b/pkgs/development/python2-packages/rhpl/builder.sh @@ -0,0 +1,12 @@ +source $stdenv/setup + +rpm2cpio $src | cpio -idv +tar xfvj rhpl-*.tar.bz2 +rm rhpl-*.tar.bz2 +cd rhpl-* +sed -i -e "s@/usr/include/\$(PYTHON)@$python/include/python2.6@" \ + -e "s@PYTHONLIBDIR = /usr/\$(LIBDIR)/\$(PYTHON)/site-packages@PYTHONLIBDIR = $out/lib/python2.6/site-packages@" Makefile.inc +sed -i -e "s@/usr/bin/install@install@g" \ + -e "s@\$(DESTDIR)/usr/share/locale@$out/share/locale@" po/Makefile +make PREFIX=$out +make PREFIX=$out install diff --git a/pkgs/development/python2-packages/rhpl/default.nix b/pkgs/development/python2-packages/rhpl/default.nix new file mode 100644 index 000000000000..7b33932492b9 --- /dev/null +++ b/pkgs/development/python2-packages/rhpl/default.nix @@ -0,0 +1,16 @@ +{stdenv, fetchurl, rpm, cpio, python, wirelesstools, gettext}: + +stdenv.mkDerivation { + name = "rhpl-0.218"; + + src = fetchurl { + url = http://ftp.stw-bonn.de/pub/fedora/linux/releases/10/Everything/source/SRPMS/rhpl-0.218-1.src.rpm; + md5 = "a72c6b66df782ca1d4950959d2aad292"; + }; + + inherit python; + + builder = ./builder.sh; + + buildInputs = [ rpm cpio python wirelesstools gettext ]; +} diff --git a/pkgs/development/python2-packages/setuptools/default.nix b/pkgs/development/python2-packages/setuptools/default.nix new file mode 100644 index 000000000000..1cdbb2e26245 --- /dev/null +++ b/pkgs/development/python2-packages/setuptools/default.nix @@ -0,0 +1,52 @@ +a : +let + fetchurl = a.fetchurl; + + version = a.lib.attrByPath ["version"] "0.6c11" a; + buildInputs = with a; [ + python makeWrapper + ]; +in +rec { + name = "setuptools-" + version; + + src = fetchurl { + url = "http://pypi.python.org/packages/source/s/setuptools/${name}.tar.gz"; + sha256 = "1lx1hwxkhipyh206bgl90ddnfcnb68bzcvyawczbf833fadyl3v3"; + }; + + inherit buildInputs; + configureFlags = []; + + doCheck = true; + + doMakeCheck = a.fullDepEntry ('' + python setup.py test + '') ["minInit" "doUnpack" "addInputs" "doBuild"]; + + doBuild = a.fullDepEntry('' + python setup.py build --build-base $out + '') ["addInputs" "doUnpack"]; + + doInstall = a.fullDepEntry('' + ensureDir "$out/lib/${a.python.libPrefix}/site-packages" + + PYTHONPATH="$out/lib/${a.python.libPrefix}/site-packages:$PYTHONPATH" \ + python setup.py install --prefix="$out" + + for i in "$out/bin/"* + do + wrapProgram "$i" \ + --prefix PYTHONPATH ":" \ + "$out/lib/${a.python.libPrefix}/site-packages" + done + '') ["doBuild"]; + + phaseNames = ["doBuild" "doInstall"]; + + meta = { + description = "Utilities to facilitate the installation of Python packages"; + homepage = http://pypi.python.org/pypi/setuptools; + licenses = [ "PSF" "ZPL" ]; + }; +} diff --git a/pkgs/development/python2-packages/stringtemplate/default.nix b/pkgs/development/python2-packages/stringtemplate/default.nix new file mode 100644 index 000000000000..f70888f102fc --- /dev/null +++ b/pkgs/development/python2-packages/stringtemplate/default.nix @@ -0,0 +1,17 @@ +{stdenv, fetchurl, python, antlr}: + +stdenv.mkDerivation rec { + name = "PyStringTemplate-${version}"; + version = "3.2b1"; + meta = { + homepage = "http://www.stringtemplate.org/"; + description = "Text Templating Library"; + }; + src = fetchurl { + url = "http://www.stringtemplate.org/download/${name}.tar.gz"; + sha256 = "0lbib0l8c1q7i1j610rwcdagymr1idahrql4dkgnm5rzyg2vk3ml"; + }; + propagatedBuildInputs = [python antlr]; + buildPhase = "true"; + installPhase = "python setup.py install --prefix=$out --install-lib=$(toPythonPath $out) -O1"; +} diff --git a/pkgs/development/python2-packages/wxPython/2.6.nix b/pkgs/development/python2-packages/wxPython/2.6.nix new file mode 100644 index 000000000000..ad8c39b4ea7a --- /dev/null +++ b/pkgs/development/python2-packages/wxPython/2.6.nix @@ -0,0 +1,14 @@ +{stdenv, fetchurl, pkgconfig, wxGTK, python}: + +assert wxGTK.unicode; + +stdenv.mkDerivation { + name = "wxPython-2.6.3.3"; + builder = ./builder.sh; + src = fetchurl { + url = mirror://sourceforge/wxpython/wxPython-src-2.6.3.3.tar.bz2; + md5 = "66b9c5f8e20a9505c39dab1a1234daa9"; + }; + buildInputs = [pkgconfig wxGTK (wxGTK.gtk) python]; + inherit wxGTK; # !!! move this down +} diff --git a/pkgs/development/python2-packages/wxPython/2.8.nix b/pkgs/development/python2-packages/wxPython/2.8.nix new file mode 100644 index 000000000000..5cab740f8c3b --- /dev/null +++ b/pkgs/development/python2-packages/wxPython/2.8.nix @@ -0,0 +1,14 @@ +{stdenv, fetchurl, pkgconfig, wxGTK, python}: + +assert wxGTK.unicode; + +stdenv.mkDerivation { + name = "wxPython-2.8.4.0"; + builder = ./builder.sh; + src = fetchurl { + url = mirror://sourceforge/wxpython/wxPython-src-2.8.4.0.tar.bz2; + sha256 = "0lkj29jcw3kqaf2iphgmmn9cqf2ppkm6qqr9izlx4bvn9dihgq6h"; + }; + buildInputs = [pkgconfig wxGTK (wxGTK.gtk) python]; + passthru = {inherit wxGTK;}; +} diff --git a/pkgs/development/python2-packages/wxPython/builder.sh b/pkgs/development/python2-packages/wxPython/builder.sh new file mode 100644 index 000000000000..ed7177081f9f --- /dev/null +++ b/pkgs/development/python2-packages/wxPython/builder.sh @@ -0,0 +1,17 @@ +source $stdenv/setup + +flags="WXPORT=gtk2 NO_HEADERS=1 BUILD_GLCANVAS=0 BUILD_OGL=0 UNICODE=1" + +configurePhase() { + cd wxPython +} + +buildPhase() { + python setup.py $flags build +} + +installPhase() { + python setup.py $flags install --prefix=$out +} + +genericBuild diff --git a/pkgs/development/python2-packages/xmpppy/default.nix b/pkgs/development/python2-packages/xmpppy/default.nix new file mode 100644 index 000000000000..3fc8058dfb2a --- /dev/null +++ b/pkgs/development/python2-packages/xmpppy/default.nix @@ -0,0 +1,30 @@ +a : +let + fetchurl = a.fetchurl; + + version = a.lib.attrByPath ["version"] "0.5.0rc1" a; + buildInputs = with a; [ + python setuptools + ]; +in +rec { + src = fetchurl { + url = "http://prdownloads.sourceforge.net/sourceforge/xmpppy/xmpppy-${version}.tar.gz"; + sha256 = "16hbh8kwc5n4qw2rz1mrs8q17rh1zq9cdl05b1nc404n7idh56si"; + }; + + inherit buildInputs; + configureFlags = []; + + /* doConfigure should be removed if not needed */ + phaseNames = ["mkDirs" "installPythonPackage"]; + mkDirs = a.fullDepEntry('' + ensureDir $out/bin $out/lib $out/share $(toPythonPath $out) + export PYTHONPATH=$PYTHONPATH:$(toPythonPath $out) + '') ["defEnsureDir" "addInputs"]; + + name = "xmpp.py-" + version; + meta = { + description = "XMPP python library"; + }; +} diff --git a/pkgs/development/python2-packages/zope/zope_python-2.4.4.patch b/pkgs/development/python2-packages/zope/zope_python-2.4.4.patch new file mode 100644 index 000000000000..223604129641 --- /dev/null +++ b/pkgs/development/python2-packages/zope/zope_python-2.4.4.patch @@ -0,0 +1,12 @@ +diff -r 8833d4892dfc Zope-3.2.1/configure +--- a/configure Mon Aug 18 14:55:39 2008 +0200 ++++ b/configure Mon Aug 18 14:57:39 2008 +0200 +@@ -21,7 +21,7 @@ prefix="$DEFAULT_PREFIX" + + # Place the optimal target version number (as returned by sys.version) + # below +-TARGET="2.4.2" ++TARGET="2.4.4" + + # Order a list of "acceptable" python version numbers (as returned by + # sys.version) below in "best" to "worst" order, not including the diff --git a/pkgs/development/python2-packages/zope/zope_python-readline.patch b/pkgs/development/python2-packages/zope/zope_python-readline.patch new file mode 100644 index 000000000000..4775cfba49b9 --- /dev/null +++ b/pkgs/development/python2-packages/zope/zope_python-readline.patch @@ -0,0 +1,12 @@ +diff -r 8833d4892dfc Zope-3.2.1/Dependencies/zope.publisher-Zope-3.2.1/zope.publisher/http.py +--- a/Dependencies/zope.publisher-Zope-3.2.1/zope.publisher/http.py Mon Aug 18 14:55:39 2008 +0200 ++++ b/Dependencies/zope.publisher-Zope-3.2.1/zope.publisher/http.py Mon Aug 18 16:37:02 2008 +0200 +@@ -198,7 +198,7 @@ class HTTPInputStream(object): + self.cacheStream.write(data) + return data + +- def readline(self): ++ def readline(self, size=None): + data = self.stream.readline() + self.cacheStream.write(data) + return data |