* Reverted most of the recent Python refactorings, as discussed. It's
a worthy goal to move the Python packages that are currently in all-packages.nix into a single attribute set, but this doesn't require moving python-packages.nix or the other changes made to that file. The Python packages in all-packages.nix should simply be moved to python-packages.nix, and ideally changed to use buildPythonPackage. svn path=/nixpkgs/trunk/; revision=21196
This commit is contained in:
13
pkgs/development/python-modules/4suite/default.nix
Normal file
13
pkgs/development/python-modules/4suite/default.nix
Normal file
@@ -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";
|
||||
}
|
||||
12
pkgs/development/python-modules/bsddb3/default.nix
Normal file
12
pkgs/development/python-modules/bsddb3/default.nix
Normal file
@@ -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}";
|
||||
}
|
||||
29
pkgs/development/python-modules/dbus/default.nix
Normal file
29
pkgs/development/python-modules/dbus/default.nix
Normal file
@@ -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";
|
||||
};
|
||||
}
|
||||
18
pkgs/development/python-modules/flup/default.nix
Normal file
18
pkgs/development/python-modules/flup/default.nix
Normal file
@@ -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";
|
||||
};
|
||||
}
|
||||
98
pkgs/development/python-modules/generic/default.nix
Normal file
98
pkgs/development/python-modules/generic/default.nix
Normal file
@@ -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
|
||||
'';
|
||||
}))
|
||||
32
pkgs/development/python-modules/irclib/default.nix
Normal file
32
pkgs/development/python-modules/irclib/default.nix
Normal file
@@ -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";
|
||||
};
|
||||
}
|
||||
32
pkgs/development/python-modules/libsexy/default.nix
Normal file
32
pkgs/development/python-modules/libsexy/default.nix
Normal file
@@ -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";
|
||||
};
|
||||
}
|
||||
40
pkgs/development/python-modules/numeric/default.nix
Normal file
40
pkgs/development/python-modules/numeric/default.nix
Normal file
@@ -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/;
|
||||
};
|
||||
}
|
||||
41
pkgs/development/python-modules/pil/default.nix
Normal file
41
pkgs/development/python-modules/pil/default.nix
Normal file
@@ -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";
|
||||
};
|
||||
}
|
||||
14
pkgs/development/python-modules/psyco/default.nix
Normal file
14
pkgs/development/python-modules/psyco/default.nix
Normal file
@@ -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";
|
||||
}
|
||||
11
pkgs/development/python-modules/pycairo/default.nix
Normal file
11
pkgs/development/python-modules/pycairo/default.nix
Normal file
@@ -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];
|
||||
}
|
||||
15
pkgs/development/python-modules/pycrypto/default.nix
Normal file
15
pkgs/development/python-modules/pycrypto/default.nix
Normal file
@@ -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
|
||||
";
|
||||
}
|
||||
17
pkgs/development/python-modules/pycups/default.nix
Normal file
17
pkgs/development/python-modules/pycups/default.nix
Normal file
@@ -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 ];
|
||||
}
|
||||
46
pkgs/development/python-modules/pygame/default.nix
Normal file
46
pkgs/development/python-modules/pygame/default.nix
Normal file
@@ -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";
|
||||
};
|
||||
}
|
||||
11
pkgs/development/python-modules/pygobject/default.nix
Normal file
11
pkgs/development/python-modules/pygobject/default.nix
Normal file
@@ -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];
|
||||
}
|
||||
17
pkgs/development/python-modules/pygtk/default.nix
Normal file
17
pkgs/development/python-modules/pygtk/default.nix
Normal file
@@ -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];
|
||||
}
|
||||
26
pkgs/development/python-modules/pyopenssl/default.nix
Normal file
26
pkgs/development/python-modules/pyopenssl/default.nix
Normal file
@@ -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";
|
||||
};
|
||||
}
|
||||
22
pkgs/development/python-modules/pyqt/default.nix
Normal file
22
pkgs/development/python-modules/pyqt/default.nix
Normal file
@@ -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;
|
||||
};
|
||||
}
|
||||
20
pkgs/development/python-modules/python-sip/default.nix
Normal file
20
pkgs/development/python-modules/python-sip/default.nix
Normal file
@@ -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 ];
|
||||
};
|
||||
}
|
||||
40
pkgs/development/python-modules/pyx/default.nix
Normal file
40
pkgs/development/python-modules/pyx/default.nix
Normal file
@@ -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/;
|
||||
};
|
||||
}
|
||||
28
pkgs/development/python-modules/pyxml/default.nix
Normal file
28
pkgs/development/python-modules/pyxml/default.nix
Normal file
@@ -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/;
|
||||
};
|
||||
}
|
||||
12
pkgs/development/python-modules/rhpl/builder.sh
Normal file
12
pkgs/development/python-modules/rhpl/builder.sh
Normal file
@@ -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
|
||||
16
pkgs/development/python-modules/rhpl/default.nix
Normal file
16
pkgs/development/python-modules/rhpl/default.nix
Normal file
@@ -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 ];
|
||||
}
|
||||
52
pkgs/development/python-modules/setuptools/default.nix
Normal file
52
pkgs/development/python-modules/setuptools/default.nix
Normal file
@@ -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" ];
|
||||
};
|
||||
}
|
||||
17
pkgs/development/python-modules/stringtemplate/default.nix
Normal file
17
pkgs/development/python-modules/stringtemplate/default.nix
Normal file
@@ -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";
|
||||
}
|
||||
14
pkgs/development/python-modules/wxPython/2.6.nix
Normal file
14
pkgs/development/python-modules/wxPython/2.6.nix
Normal file
@@ -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
|
||||
}
|
||||
14
pkgs/development/python-modules/wxPython/2.8.nix
Normal file
14
pkgs/development/python-modules/wxPython/2.8.nix
Normal file
@@ -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;};
|
||||
}
|
||||
17
pkgs/development/python-modules/wxPython/builder.sh
Normal file
17
pkgs/development/python-modules/wxPython/builder.sh
Normal file
@@ -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
|
||||
30
pkgs/development/python-modules/xmpppy/default.nix
Normal file
30
pkgs/development/python-modules/xmpppy/default.nix
Normal file
@@ -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";
|
||||
};
|
||||
}
|
||||
15
pkgs/development/python-modules/zope/default.nix
Normal file
15
pkgs/development/python-modules/zope/default.nix
Normal file
@@ -0,0 +1,15 @@
|
||||
{stdenv, fetchurl, python}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
version = "3.2.1";
|
||||
name = "zope-${version}";
|
||||
src = fetchurl {
|
||||
url = "http://www.zope.org/Products/Zope3/${version}/Zope-${version}.tgz";
|
||||
sha256 = "8431984af75054e4ddfe45bf708924240f8b6b02220cd84d090138413ac82341";
|
||||
};
|
||||
patches = [
|
||||
./zope_python-2.4.4.patch
|
||||
./zope_python-readline.patch
|
||||
];
|
||||
buildInputs = [python];
|
||||
}
|
||||
12
pkgs/development/python-modules/zope/zope_python-2.4.4.patch
Normal file
12
pkgs/development/python-modules/zope/zope_python-2.4.4.patch
Normal file
@@ -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
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user