fix bittorrent by using buildPythonPackage

svn path=/nixpkgs/branches/stdenv-updates/; revision=32636
This commit is contained in:
Florian Friesdorf 2012-02-27 22:53:44 +00:00
parent 998c1a3469
commit 2eb54f5062
2 changed files with 9 additions and 31 deletions

View file

@ -1,27 +0,0 @@
source $stdenv/setup
# Workaround for:
# File "...-python-2.4.4/lib/python2.4/posixpath.py", line 62, in join
# elif path == '' or path.endswith('/'):
# AttributeError: 'NoneType' object has no attribute 'endswith'
export HOME=$TMP
buildPhase() {
python setup.py build
}
installPhase() {
python setup.py install --prefix=$out
# Create wrappers that set the environment correctly.
for i in $(cd $out/bin && ls); do
wrapProgram $out/bin/$i \
--set PYTHONPATH "$(toPythonPath $out):$PYTHONPATH"
done
}
genericBuild

View file

@ -1,20 +1,25 @@
{ gui ? false
, stdenv, fetchurl, makeWrapper
, python, wxPython ? null, pycrypto, twisted
, python, wxPython ? null, pycrypto, twisted, buildPythonPackage
}:
assert gui -> wxPython != null;
stdenv.mkDerivation {
buildPythonPackage rec {
name = "bittorrent-5.2.2";
builder = ./builder.sh;
src = fetchurl {
url = http://download.bittorrent.com/dl/archive/BitTorrent-5.2.2.tar.gz;
sha256 = "05k803hbwsyn51j4aibzdsnqxz24kw4rvr60v2c0wji8gcvy3kx9";
};
preConfigure = ''
export HOME=$TMP
'';
# accesses network
doCheck = false;
buildInputs = [ python pycrypto twisted makeWrapper ]
++ stdenv.lib.optional gui wxPython;