2012-11-23 17:27:12 +01:00
|
|
|
# Used during module installation to prevent easy_install and python
|
|
|
|
# setup.py install/test from downloading
|
|
|
|
|
|
|
|
{ stdenv, python }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
name = "python-offline-distutils-${python.version}";
|
|
|
|
|
|
|
|
buildInputs = [ python ];
|
|
|
|
|
|
|
|
unpackPhase = "true";
|
|
|
|
installPhase = ''
|
2013-01-21 12:11:08 +01:00
|
|
|
dst="$out/lib/${python.libPrefix}/site-packages"
|
2012-11-23 17:27:12 +01:00
|
|
|
ensureDir $dst/distutils
|
|
|
|
ln -s ${python}/lib/${python.libPrefix}/distutils/* $dst/distutils/
|
|
|
|
cat <<EOF > $dst/distutils/distutils.cfg
|
|
|
|
[easy_install]
|
|
|
|
allow-hosts = None
|
|
|
|
EOF
|
|
|
|
'';
|
|
|
|
}
|