add python docs

This commit is contained in:
Florian Friesdorf 2013-03-02 05:40:20 +01:00
parent 089fd0a769
commit 0314b8b00f
28 changed files with 509 additions and 0 deletions

View File

@ -0,0 +1,15 @@
# This file was generated and will be overwritten by ./generate.sh
{ stdenv, fetchurl }:
stdenv.mkDerivation {
name = "python26-docs-html-2.6.8";
src = fetchurl {
url = http://docs.python.org/ftp/python/doc/2.6.8/python-2.6.8-docs-html.tar.bz2;
sha256 = "09kznik9ahmnrqw9gkr7mjv3b3zr258f2fm27n12hrrwwsaszkni";
};
installPhase = ''
mkdir -p $out/share/docs
cp -R ./ $out/share/docs/
'';
}

View File

@ -0,0 +1,15 @@
# This file was generated and will be overwritten by ./generate.sh
{ stdenv, fetchurl }:
stdenv.mkDerivation {
name = "python26-docs-pdf-a4-2.6.8";
src = fetchurl {
url = http://docs.python.org/ftp/python/doc/2.6.8/python-2.6.8-docs-pdf-a4.tar.bz2;
sha256 = "07k8n9zhd59s1yn8ahsizkaqnv969p0f2c2acxgxrxhhyy842pp8";
};
installPhase = ''
mkdir -p $out/share/docs
cp -R ./ $out/share/docs/
'';
}

View File

@ -0,0 +1,15 @@
# This file was generated and will be overwritten by ./generate.sh
{ stdenv, fetchurl }:
stdenv.mkDerivation {
name = "python26-docs-pdf-letter-2.6.8";
src = fetchurl {
url = http://docs.python.org/ftp/python/doc/2.6.8/python-2.6.8-docs-pdf-letter.tar.bz2;
sha256 = "01r87m8hb7f9ql4j9zcjcrr9150nsk23sj8cy02vygr83sc1ldmq";
};
installPhase = ''
mkdir -p $out/share/docs
cp -R ./ $out/share/docs/
'';
}

View File

@ -0,0 +1,15 @@
# This file was generated and will be overwritten by ./generate.sh
{ stdenv, fetchurl }:
stdenv.mkDerivation {
name = "python26-docs-text-2.6.8";
src = fetchurl {
url = http://docs.python.org/ftp/python/doc/2.6.8/python-2.6.8-docs-text.tar.bz2;
sha256 = "05wsdh6ilgkclgak09fq7fsx5kflkmqq8dyxi2rpydx289cw3a8c";
};
installPhase = ''
mkdir -p $out/share/docs
cp -R ./ $out/share/docs/
'';
}

View File

@ -0,0 +1,15 @@
# This file was generated and will be overwritten by ./generate.sh
{ stdenv, fetchurl }:
stdenv.mkDerivation {
name = "python27-docs-html-2.7.3";
src = fetchurl {
url = http://docs.python.org/ftp/python/doc/2.7.3/python-2.7.3-docs-html.tar.bz2;
sha256 = "1hg92n0mzl9w6j33b2h0bf2vy6fsxnpxfdc3qw760vcm0y00155j";
};
installPhase = ''
mkdir -p $out/share/docs
cp -R ./ $out/share/docs/
'';
}

View File

@ -0,0 +1,15 @@
# This file was generated and will be overwritten by ./generate.sh
{ stdenv, fetchurl }:
stdenv.mkDerivation {
name = "python27-docs-pdf-a4-2.7.3";
src = fetchurl {
url = http://docs.python.org/ftp/python/doc/2.7.3/python-2.7.3-docs-pdf-a4.tar.bz2;
sha256 = "13da88panq5b6qfhf8k4dgqgxkg4ydcac5cx69a3f35s1w90xdjr";
};
installPhase = ''
mkdir -p $out/share/docs
cp -R ./ $out/share/docs/
'';
}

View File

@ -0,0 +1,15 @@
# This file was generated and will be overwritten by ./generate.sh
{ stdenv, fetchurl }:
stdenv.mkDerivation {
name = "python27-docs-pdf-letter-2.7.3";
src = fetchurl {
url = http://docs.python.org/ftp/python/doc/2.7.3/python-2.7.3-docs-pdf-letter.tar.bz2;
sha256 = "0x41phsdrpivhzkchswsliyx3a10n7gzc9irkrw6rz22j81bfydg";
};
installPhase = ''
mkdir -p $out/share/docs
cp -R ./ $out/share/docs/
'';
}

View File

@ -0,0 +1,15 @@
# This file was generated and will be overwritten by ./generate.sh
{ stdenv, fetchurl }:
stdenv.mkDerivation {
name = "python27-docs-text-2.7.3";
src = fetchurl {
url = http://docs.python.org/ftp/python/doc/2.7.3/python-2.7.3-docs-text.tar.bz2;
sha256 = "1rxlb3jhh3892y65i45nk1y2lx981fr22a5hmfkp9gvjvdykjnzp";
};
installPhase = ''
mkdir -p $out/share/docs
cp -R ./ $out/share/docs/
'';
}

View File

@ -0,0 +1,15 @@
# This file was generated and will be overwritten by ./generate.sh
{ stdenv, fetchurl }:
stdenv.mkDerivation {
name = "python30-docs-html-3.0.1";
src = fetchurl {
url = http://docs.python.org/ftp/python/doc/3.0.1/python-3.0.1-docs-html.tar.bz2;
sha256 = "0ybjnhg8qfr9kc4axm5xlghkz9dmsg6b1caj6m4gz28q89vggv3c";
};
installPhase = ''
mkdir -p $out/share/docs
cp -R ./ $out/share/docs/
'';
}

View File

@ -0,0 +1,15 @@
# This file was generated and will be overwritten by ./generate.sh
{ stdenv, fetchurl }:
stdenv.mkDerivation {
name = "python30-docs-pdf-a4-3.0.1";
src = fetchurl {
url = http://docs.python.org/ftp/python/doc/3.0.1/python-3.0.1-docs-pdf-a4.tar.bz2;
sha256 = "1qgcydqxxhy317lkzzs2v5as4hcwcblir8y3mdr173qsg51iggra";
};
installPhase = ''
mkdir -p $out/share/docs
cp -R ./ $out/share/docs/
'';
}

View File

@ -0,0 +1,15 @@
# This file was generated and will be overwritten by ./generate.sh
{ stdenv, fetchurl }:
stdenv.mkDerivation {
name = "python30-docs-pdf-letter-3.0.1";
src = fetchurl {
url = http://docs.python.org/ftp/python/doc/3.0.1/python-3.0.1-docs-pdf-letter.tar.bz2;
sha256 = "1x59q0k6fv55vvpsgr5xcq66k5zsd0f142cp6aa4rb6c81i31yml";
};
installPhase = ''
mkdir -p $out/share/docs
cp -R ./ $out/share/docs/
'';
}

View File

@ -0,0 +1,15 @@
# This file was generated and will be overwritten by ./generate.sh
{ stdenv, fetchurl }:
stdenv.mkDerivation {
name = "python30-docs-text-3.0.1";
src = fetchurl {
url = http://docs.python.org/ftp/python/doc/3.0.1/python-3.0.1-docs-text.tar.bz2;
sha256 = "12qlh9ywbnw50wk5siq7lmhr935dd16q3vjbii6gfv0g80b1byzx";
};
installPhase = ''
mkdir -p $out/share/docs
cp -R ./ $out/share/docs/
'';
}

View File

@ -0,0 +1,15 @@
# This file was generated and will be overwritten by ./generate.sh
{ stdenv, fetchurl }:
stdenv.mkDerivation {
name = "python31-docs-html-3.1.5";
src = fetchurl {
url = http://docs.python.org/ftp/python/doc/3.1.5/python-3.1.5-docs-html.tar.bz2;
sha256 = "187shb92218k0i07hj9ak1kqbqjcxkivmwxlzj18v791l7x7qcpz";
};
installPhase = ''
mkdir -p $out/share/docs
cp -R ./ $out/share/docs/
'';
}

View File

@ -0,0 +1,15 @@
# This file was generated and will be overwritten by ./generate.sh
{ stdenv, fetchurl }:
stdenv.mkDerivation {
name = "python31-docs-pdf-a4-3.1.5";
src = fetchurl {
url = http://docs.python.org/ftp/python/doc/3.1.5/python-3.1.5-docs-pdf-a4.tar.bz2;
sha256 = "0kbj6b43gnwlb1czkzmirasmc31j10plq0rlb9s9rh8phqnbmhx1";
};
installPhase = ''
mkdir -p $out/share/docs
cp -R ./ $out/share/docs/
'';
}

View File

@ -0,0 +1,15 @@
# This file was generated and will be overwritten by ./generate.sh
{ stdenv, fetchurl }:
stdenv.mkDerivation {
name = "python31-docs-pdf-letter-3.1.5";
src = fetchurl {
url = http://docs.python.org/ftp/python/doc/3.1.5/python-3.1.5-docs-pdf-letter.tar.bz2;
sha256 = "0s202vrjfa8dnp3vpfjb21bmqym9wyj8jn2glgwjzk63z6fwb60i";
};
installPhase = ''
mkdir -p $out/share/docs
cp -R ./ $out/share/docs/
'';
}

View File

@ -0,0 +1,15 @@
# This file was generated and will be overwritten by ./generate.sh
{ stdenv, fetchurl }:
stdenv.mkDerivation {
name = "python31-docs-text-3.1.5";
src = fetchurl {
url = http://docs.python.org/ftp/python/doc/3.1.5/python-3.1.5-docs-text.tar.bz2;
sha256 = "1jsfgfgdi1i2l3lhdk7ss5gwrcg3qhhh8syfrwz8xrv2klmmmn9b";
};
installPhase = ''
mkdir -p $out/share/docs
cp -R ./ $out/share/docs/
'';
}

View File

@ -0,0 +1,15 @@
# This file was generated and will be overwritten by ./generate.sh
{ stdenv, fetchurl }:
stdenv.mkDerivation {
name = "python32-docs-html-3.2.3";
src = fetchurl {
url = http://docs.python.org/ftp/python/doc/3.2.3/python-3.2.3-docs-html.tar.bz2;
sha256 = "058pryg0gn0rlpswkj1z0xvpr39s3ymx3dwqfhhf83w0mlysdm0x";
};
installPhase = ''
mkdir -p $out/share/docs
cp -R ./ $out/share/docs/
'';
}

View File

@ -0,0 +1,15 @@
# This file was generated and will be overwritten by ./generate.sh
{ stdenv, fetchurl }:
stdenv.mkDerivation {
name = "python32-docs-pdf-a4-3.2.3";
src = fetchurl {
url = http://docs.python.org/ftp/python/doc/3.2.3/python-3.2.3-docs-pdf-a4.tar.bz2;
sha256 = "1lw1sbk3nx70k2zxgjc36ryvyzlxndzsvhrxyzdy9sjfhasyd807";
};
installPhase = ''
mkdir -p $out/share/docs
cp -R ./ $out/share/docs/
'';
}

View File

@ -0,0 +1,15 @@
# This file was generated and will be overwritten by ./generate.sh
{ stdenv, fetchurl }:
stdenv.mkDerivation {
name = "python32-docs-pdf-letter-3.2.3";
src = fetchurl {
url = http://docs.python.org/ftp/python/doc/3.2.3/python-3.2.3-docs-pdf-letter.tar.bz2;
sha256 = "199ibzslw3zrwjd49582vc5q6ghp5ig8zalvslawz0xkz1226wg2";
};
installPhase = ''
mkdir -p $out/share/docs
cp -R ./ $out/share/docs/
'';
}

View File

@ -0,0 +1,15 @@
# This file was generated and will be overwritten by ./generate.sh
{ stdenv, fetchurl }:
stdenv.mkDerivation {
name = "python32-docs-text-3.2.3";
src = fetchurl {
url = http://docs.python.org/ftp/python/doc/3.2.3/python-3.2.3-docs-text.tar.bz2;
sha256 = "1jdc9rj2b4vsbvg5mq6vcdfa2b72avhhvjw7rn7k3kl521cvxs09";
};
installPhase = ''
mkdir -p $out/share/docs
cp -R ./ $out/share/docs/
'';
}

View File

@ -0,0 +1,15 @@
# This file was generated and will be overwritten by ./generate.sh
{ stdenv, fetchurl }:
stdenv.mkDerivation {
name = "python33-docs-html-3.3.0";
src = fetchurl {
url = http://docs.python.org/ftp/python/doc/3.3.0/python-3.3.0-docs-html.tar.bz2;
sha256 = "0vv24b9qi7gznv687ik0pa2w1rq9grqivy44znvj2ysjfg7mc2c1";
};
installPhase = ''
mkdir -p $out/share/docs
cp -R ./ $out/share/docs/
'';
}

View File

@ -0,0 +1,15 @@
# This file was generated and will be overwritten by ./generate.sh
{ stdenv, fetchurl }:
stdenv.mkDerivation {
name = "python33-docs-pdf-a4-3.3.0";
src = fetchurl {
url = http://docs.python.org/ftp/python/doc/3.3.0/python-3.3.0-docs-pdf-a4.tar.bz2;
sha256 = "1y6n13bxlw8a11khy3ynfbz8z0kpf2lvh32dvy8scyw3hrk6wdxp";
};
installPhase = ''
mkdir -p $out/share/docs
cp -R ./ $out/share/docs/
'';
}

View File

@ -0,0 +1,15 @@
# This file was generated and will be overwritten by ./generate.sh
{ stdenv, fetchurl }:
stdenv.mkDerivation {
name = "python33-docs-pdf-letter-3.3.0";
src = fetchurl {
url = http://docs.python.org/ftp/python/doc/3.3.0/python-3.3.0-docs-pdf-letter.tar.bz2;
sha256 = "0mcj1i47nx81fc9zk1cic4c4p139qjcqlzf4hnnkzvb3jcgy5z6k";
};
installPhase = ''
mkdir -p $out/share/docs
cp -R ./ $out/share/docs/
'';
}

View File

@ -0,0 +1,15 @@
# This file was generated and will be overwritten by ./generate.sh
{ stdenv, fetchurl }:
stdenv.mkDerivation {
name = "python33-docs-text-3.3.0";
src = fetchurl {
url = http://docs.python.org/ftp/python/doc/3.3.0/python-3.3.0-docs-text.tar.bz2;
sha256 = "10vk2fixg1aglqmsf89kn98rlirrbhnrk1285vzfbynf2iavxw0n";
};
installPhase = ''
mkdir -p $out/share/docs
cp -R ./ $out/share/docs/
'';
}

View File

@ -0,0 +1,77 @@
{ stdenv, fetchurl }:
let
pythonDocs = {
python33_html = import ./3.3-html.nix {
inherit stdenv fetchurl;
};
python33_pdf_a4 = import ./3.3-pdf-a4.nix {
inherit stdenv fetchurl;
};
python33_pdf_letter = import ./3.3-pdf-letter.nix {
inherit stdenv fetchurl;
};
python33_text = import ./3.3-text.nix {
inherit stdenv fetchurl;
};
python32_html = import ./3.2-html.nix {
inherit stdenv fetchurl;
};
python32_pdf_a4 = import ./3.2-pdf-a4.nix {
inherit stdenv fetchurl;
};
python32_pdf_letter = import ./3.2-pdf-letter.nix {
inherit stdenv fetchurl;
};
python32_text = import ./3.2-text.nix {
inherit stdenv fetchurl;
};
python31_html = import ./3.1-html.nix {
inherit stdenv fetchurl;
};
python31_pdf_a4 = import ./3.1-pdf-a4.nix {
inherit stdenv fetchurl;
};
python31_pdf_letter = import ./3.1-pdf-letter.nix {
inherit stdenv fetchurl;
};
python31_text = import ./3.1-text.nix {
inherit stdenv fetchurl;
};
python30_html = import ./3.0-html.nix {
inherit stdenv fetchurl;
};
python30_pdf_a4 = import ./3.0-pdf-a4.nix {
inherit stdenv fetchurl;
};
python30_pdf_letter = import ./3.0-pdf-letter.nix {
inherit stdenv fetchurl;
};
python30_text = import ./3.0-text.nix {
inherit stdenv fetchurl;
};
python27_html = import ./2.7-html.nix {
inherit stdenv fetchurl;
};
python27_pdf_a4 = import ./2.7-pdf-a4.nix {
inherit stdenv fetchurl;
};
python27_pdf_letter = import ./2.7-pdf-letter.nix {
inherit stdenv fetchurl;
};
python27_text = import ./2.7-text.nix {
inherit stdenv fetchurl;
};
python26_html = import ./2.6-html.nix {
inherit stdenv fetchurl;
};
python26_pdf_a4 = import ./2.6-pdf-a4.nix {
inherit stdenv fetchurl;
};
python26_pdf_letter = import ./2.6-pdf-letter.nix {
inherit stdenv fetchurl;
};
python26_text = import ./2.6-text.nix {
inherit stdenv fetchurl;
};
}; in pythonDocs

View File

@ -0,0 +1,53 @@
#!/usr/bin/env bash
TYPES="html pdf-a4 pdf-letter text"
URL=http://docs.python.org/ftp/python/doc/VERSION/python-VERSION-docs-TYPE.tar.bz2
VERSIONS=$(curl http://www.python.org/download/releases/ 2>/dev/null | grep "releases/[123456789]"| cut -d/ -f4 |grep -v "^[12].[012345]" |grep -v "^1.6.1")
echo "Generating expressions for:
${VERSIONS}
"
cat >default.nix <<EOF
{ stdenv, fetchurl }:
let
pythonDocs = {
EOF
for version in $VERSIONS; do
for type in $TYPES; do
major=$(echo -n ${version}| cut -d. -f1)
minor=$(echo -n ${version}| cut -d. -f2)
outfile=${major}.${minor}-${type}.nix
hash=
if [ -e ${outfile} ]; then
currentversion=$(grep "url =" ${outfile} |cut -d/ -f7)
if [ ${version} = ${currentversion} ]; then
hash=$(grep sha256 ${outfile} | cut -d'"' -f2)
fi
fi
echo "Generating ${outfile}"
url=$(echo -n $URL |sed -e "s,VERSION,${version},g" -e "s,TYPE,${type},")
sha=$(nix-prefetch-url ${url} ${hash})
sed -e "s,VERSION,${version}," \
-e "s,MAJOR,${major}," \
-e "s,MINOR,${minor}," \
-e "s,TYPE,${type}," \
-e "s,URL,${url}," \
-e "s,SHA,${sha}," < template.nix > ${outfile}
attrname=python${major}${minor}_$(echo -n ${type} |sed -e "s,-,_,g")
cat >>default.nix <<EOF
${attrname} = import ./${major}.${minor}-${type}.nix {
inherit stdenv fetchurl;
};
EOF
echo "done."
echo
done
done
echo "}; in pythonDocs" >> default.nix

View File

@ -0,0 +1,15 @@
# This file was generated and will be overwritten by ./generate.sh
{ stdenv, fetchurl }:
stdenv.mkDerivation {
name = "pythonMAJORMINOR-docs-TYPE-VERSION";
src = fetchurl {
url = URL;
sha256 = "SHA";
};
installPhase = ''
mkdir -p $out/share/docs
cp -R ./ $out/share/docs/
'';
}

View File

@ -2891,6 +2891,10 @@ let
inherit (python27Packages) recursivePthLoader;
};
pythonDocs = recurseIntoAttrs (import ../development/interpreters/python/docs {
inherit stdenv fetchurl;
});
pythonLinkmeWrapper = callPackage ../development/interpreters/python/python-linkme-wrapper.nix { };
pyrex = pyrex095;