2007-05-27 16:34:01 +02:00
|
|
|
{stdenv, fetchurl, zlib ? null, zlibSupport ? true, bzip2}:
|
2004-02-17 21:02:31 +01:00
|
|
|
|
|
|
|
assert zlibSupport -> zlib != null;
|
|
|
|
|
2007-05-27 16:34:01 +02:00
|
|
|
with stdenv.lib;
|
|
|
|
|
|
|
|
let
|
|
|
|
|
|
|
|
buildInputs =
|
2007-05-27 17:00:30 +02:00
|
|
|
optional (stdenv ? gcc && stdenv.gcc.libc != null) stdenv.gcc.libc ++
|
2007-05-27 16:34:01 +02:00
|
|
|
[bzip2] ++
|
|
|
|
optional zlibSupport zlib;
|
|
|
|
|
|
|
|
in
|
|
|
|
|
2004-03-29 19:23:01 +02:00
|
|
|
stdenv.mkDerivation {
|
2006-12-13 19:03:08 +01:00
|
|
|
name = "python-2.4.4";
|
2007-05-27 16:34:01 +02:00
|
|
|
|
2003-12-21 21:52:13 +01:00
|
|
|
src = fetchurl {
|
2006-12-13 19:03:08 +01:00
|
|
|
url = http://www.python.org/ftp/python/2.4.4/Python-2.4.4.tar.bz2;
|
|
|
|
md5 = "0ba90c79175c017101100ebf5978e906";
|
2004-02-17 21:02:31 +01:00
|
|
|
};
|
2007-05-27 16:34:01 +02:00
|
|
|
|
|
|
|
patches = [
|
|
|
|
# Look in C_INCLUDE_PATH and LIBRARY_PATH for stuff.
|
|
|
|
./search-path.patch
|
2004-09-18 23:12:25 +02:00
|
|
|
];
|
2007-05-27 16:34:01 +02:00
|
|
|
|
|
|
|
inherit buildInputs;
|
|
|
|
C_INCLUDE_PATH = concatStringsSep ":" (map (p: "${p}/include") buildInputs);
|
|
|
|
LIBRARY_PATH = concatStringsSep ":" (map (p: "${p}/lib") buildInputs);
|
|
|
|
|
2005-10-27 01:37:53 +02:00
|
|
|
configureFlags = "--enable-shared";
|
2006-12-13 19:03:08 +01:00
|
|
|
|
2007-05-27 16:34:01 +02:00
|
|
|
preConfigure = "
|
|
|
|
# Purity.
|
|
|
|
for i in /usr /sw /opt /pkg; do
|
|
|
|
substituteInPlace ./setup.py --replace $i /no-such-path
|
|
|
|
done
|
|
|
|
";
|
2006-12-13 19:03:08 +01:00
|
|
|
|
|
|
|
postInstall = "
|
|
|
|
ensureDir $out/nix-support
|
|
|
|
cp ${./setup-hook.sh} $out/nix-support/setup-hook
|
|
|
|
rm -rf $out/lib/python2.4/test
|
|
|
|
";
|
2007-05-27 16:34:01 +02:00
|
|
|
|
|
|
|
passthru = {
|
|
|
|
inherit zlibSupport;
|
|
|
|
libPrefix = "python2.4";
|
|
|
|
};
|
2003-12-21 21:52:13 +01:00
|
|
|
}
|