From 56712d503220fd6e6eb36d9a407ad5624a2920fe Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 17 Feb 2004 20:02:31 +0000 Subject: [PATCH] * Export a variation point `zlibSupport'. svn path=/nixpkgs/trunk/; revision=796 --- pkgs/development/interpreters/python/builder.sh | 17 +++++++++++------ .../development/interpreters/python/default.nix | 11 ++++++++--- 2 files changed, 19 insertions(+), 9 deletions(-) diff --git a/pkgs/development/interpreters/python/builder.sh b/pkgs/development/interpreters/python/builder.sh index 73a8bdc38649..9c57a580847f 100755 --- a/pkgs/development/interpreters/python/builder.sh +++ b/pkgs/development/interpreters/python/builder.sh @@ -1,10 +1,15 @@ #! /bin/sh buildinputs="" -. $stdenv/setup || exit 1 +if test -n "$zlibSupport"; then + buildinputs="$zlib $buildinputs" +fi +. $stdenv/setup + +tar xvfj $src +cd Python-* +./configure --prefix=$out + +make +make install -tar xvfj $src || exit 1 -cd Python-* || exit 1 -./configure --prefix=$out || exit 1 -make || exit 1 -make install || exit 1 diff --git a/pkgs/development/interpreters/python/default.nix b/pkgs/development/interpreters/python/default.nix index 85118d132a4f..4d60896424e2 100644 --- a/pkgs/development/interpreters/python/default.nix +++ b/pkgs/development/interpreters/python/default.nix @@ -1,10 +1,15 @@ -{stdenv, fetchurl}: derivation { +{stdenv, fetchurl, zlib ? null, zlibSupport ? true}: + +assert zlibSupport -> zlib != null; + +derivation { name = "python-2.3.3"; system = stdenv.system; builder = ./builder.sh; src = fetchurl { url = http://www.python.org/ftp/python/2.3.3/Python-2.3.3.tar.bz2; md5 = "70ada9f65742ab2c77a96bcd6dffd9b1"; - }; - stdenv = stdenv; + }; + zlib = if zlibSupport then zlib else null; + inherit stdenv zlibSupport; }