Generate python3 docs

This commit is contained in:
Ihar Hrachyshka 2019-03-06 22:49:25 -08:00 committed by Frederik Rietdijk
parent 6a73992cfa
commit 43f9d5ccaa
10 changed files with 97 additions and 13 deletions

View file

@ -3,10 +3,10 @@
{ stdenv, fetchurl, lib }:
stdenv.mkDerivation rec {
name = "python27-docs-html-2.7.3";
name = "python27-docs-html-2.7.16";
src = fetchurl {
url = http://docs.python.org/ftp/python/doc/2.7.3/python-2.7.3-docs-html.tar.bz2;
sha256 = "1hg92n0mzl9w6j33b2h0bf2vy6fsxnpxfdc3qw760vcm0y00155j";
url = http://docs.python.org/ftp/python/doc/2.7.16/python-2.7.16-docs-html.tar.bz2;
sha256 = "1razs1grzhai65ihaiyph8kz6ncjkgp1gsn3c8v7kanf13lqim02";
};
installPhase = ''
mkdir -p $out/share/doc/python27

View file

@ -3,10 +3,10 @@
{ stdenv, fetchurl, lib }:
stdenv.mkDerivation rec {
name = "python27-docs-pdf-a4-2.7.3";
name = "python27-docs-pdf-a4-2.7.16";
src = fetchurl {
url = http://docs.python.org/ftp/python/doc/2.7.3/python-2.7.3-docs-pdf-a4.tar.bz2;
sha256 = "13da88panq5b6qfhf8k4dgqgxkg4ydcac5cx69a3f35s1w90xdjr";
url = http://docs.python.org/ftp/python/doc/2.7.16/python-2.7.16-docs-pdf-a4.tar.bz2;
sha256 = "14ml1ynrlbhg43737bdsb8k5y39wsffqj4iwhylhb8n8l5dplfdq";
};
installPhase = ''
mkdir -p $out/share/doc/python27

View file

@ -3,10 +3,10 @@
{ stdenv, fetchurl, lib }:
stdenv.mkDerivation rec {
name = "python27-docs-pdf-letter-2.7.3";
name = "python27-docs-pdf-letter-2.7.16";
src = fetchurl {
url = http://docs.python.org/ftp/python/doc/2.7.3/python-2.7.3-docs-pdf-letter.tar.bz2;
sha256 = "0x41phsdrpivhzkchswsliyx3a10n7gzc9irkrw6rz22j81bfydg";
url = http://docs.python.org/ftp/python/doc/2.7.16/python-2.7.16-docs-pdf-letter.tar.bz2;
sha256 = "019i8n48m71mn31v8d85kkwyqfgcgqnqh506y4a7fcgf656bajs0";
};
installPhase = ''
mkdir -p $out/share/doc/python27

View file

@ -3,10 +3,10 @@
{ stdenv, fetchurl, lib }:
stdenv.mkDerivation rec {
name = "python27-docs-text-2.7.3";
name = "python27-docs-text-2.7.16";
src = fetchurl {
url = http://docs.python.org/ftp/python/doc/2.7.3/python-2.7.3-docs-text.tar.bz2;
sha256 = "1rxlb3jhh3892y65i45nk1y2lx981fr22a5hmfkp9gvjvdykjnzp";
url = http://docs.python.org/ftp/python/doc/2.7.16/python-2.7.16-docs-text.tar.bz2;
sha256 = "1da7swlykvc013684nywycinfz3v8dqkcmv0zj8p7l5lyi5mq03r";
};
installPhase = ''
mkdir -p $out/share/doc/python27

View file

@ -0,0 +1,18 @@
# This file was generated and will be overwritten by ./generate.sh
{ stdenv, fetchurl, lib }:
stdenv.mkDerivation rec {
name = "python37-docs-html-3.7.2";
src = fetchurl {
url = http://docs.python.org/ftp/python/doc/3.7.2/python-3.7.2-docs-html.tar.bz2;
sha256 = "19wbrawpdam09fmyipfy92sxwn1rl93v8jkfqsfx028qhvzf0422";
};
installPhase = ''
mkdir -p $out/share/doc/python37
cp -R ./ $out/share/doc/python37/html
'';
meta = {
maintainers = [ ];
};
}

View file

@ -0,0 +1,18 @@
# This file was generated and will be overwritten by ./generate.sh
{ stdenv, fetchurl, lib }:
stdenv.mkDerivation rec {
name = "python37-docs-pdf-a4-3.7.2";
src = fetchurl {
url = http://docs.python.org/ftp/python/doc/3.7.2/python-3.7.2-docs-pdf-a4.tar.bz2;
sha256 = "0vdx762m30hjaabn6w88awcj2qpbz0b6z59zn9wmamd35k59lfba";
};
installPhase = ''
mkdir -p $out/share/doc/python37
cp -R ./ $out/share/doc/python37/pdf-a4
'';
meta = {
maintainers = [ ];
};
}

View file

@ -0,0 +1,18 @@
# This file was generated and will be overwritten by ./generate.sh
{ stdenv, fetchurl, lib }:
stdenv.mkDerivation rec {
name = "python37-docs-pdf-letter-3.7.2";
src = fetchurl {
url = http://docs.python.org/ftp/python/doc/3.7.2/python-3.7.2-docs-pdf-letter.tar.bz2;
sha256 = "17g57vlyvqx0k916q84q2pcx7y8myw0fda9fvg9kh0ph930c837x";
};
installPhase = ''
mkdir -p $out/share/doc/python37
cp -R ./ $out/share/doc/python37/pdf-letter
'';
meta = {
maintainers = [ ];
};
}

View file

@ -0,0 +1,18 @@
# This file was generated and will be overwritten by ./generate.sh
{ stdenv, fetchurl, lib }:
stdenv.mkDerivation rec {
name = "python37-docs-text-3.7.2";
src = fetchurl {
url = http://docs.python.org/ftp/python/doc/3.7.2/python-3.7.2-docs-text.tar.bz2;
sha256 = "0h50rlr8jclwfxa106b42q2vn2ynp219c4zsy5qz65n5m3b7y1g2";
};
installPhase = ''
mkdir -p $out/share/doc/python37
cp -R ./ $out/share/doc/python37/text
'';
meta = {
maintainers = [ ];
};
}

View file

@ -7,23 +7,35 @@ pythonDocs = {
python27 = import ./2.7-html.nix {
inherit stdenv fetchurl lib;
};
python37 = import ./3.7-html.nix {
inherit stdenv fetchurl lib;
};
};
pdf_a4 = {
recurseForDerivations = true;
python27 = import ./2.7-pdf-a4.nix {
inherit stdenv fetchurl lib;
};
python37 = import ./3.7-pdf-a4.nix {
inherit stdenv fetchurl lib;
};
};
pdf_letter = {
recurseForDerivations = true;
python27 = import ./2.7-pdf-letter.nix {
inherit stdenv fetchurl lib;
};
python37 = import ./3.7-pdf-letter.nix {
inherit stdenv fetchurl lib;
};
};
text = {
recurseForDerivations = true;
python27 = import ./2.7-text.nix {
inherit stdenv fetchurl lib;
};
python37 = import ./3.7-text.nix {
inherit stdenv fetchurl lib;
};
};
}; in pythonDocs

View file

@ -2,7 +2,7 @@
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")
VERSIONS=$(for major in 2 3; do curl https://docs.python.org/$major/archives/ 2>/dev/null | perl -l -n -e'/<a href="python-([23].[0-9].[0-9]+)-docs-html.tar.bz2/ && print $1' | tail -n 1; done)
echo "Generating expressions for:
${VERSIONS}
"