pythonDocs: init at 3.14, drop 3.10 (#526551)

This commit is contained in:
Martin Weinelt
2026-06-04 22:40:13 +00:00
committed by GitHub
13 changed files with 145 additions and 147 deletions

View File

@@ -1,24 +0,0 @@
# This file was generated and will be overwritten by ./generate.sh
{
stdenv,
lib,
fetchurl,
}:
stdenv.mkDerivation {
pname = "python310-docs-html";
version = "3.10.7";
src = fetchurl {
url = "https://www.python.org/ftp/python/doc/3.10.7/python-3.10.7-docs-html.tar.bz2";
sha256 = "0j86z1vmaghzj5i4frvzyfb9qwsmm09g4f4ssx5w27cm30b8k0v1";
};
installPhase = ''
mkdir -p $out/share/doc/python310
cp -R ./ $out/share/doc/python310/html
'';
meta = {
maintainers = [ ];
};
}

View File

@@ -1,24 +0,0 @@
# This file was generated and will be overwritten by ./generate.sh
{
stdenv,
lib,
fetchurl,
}:
stdenv.mkDerivation {
pname = "python310-docs-pdf-a4";
version = "3.10.7";
src = fetchurl {
url = "https://www.python.org/ftp/python/doc/3.10.7/python-3.10.7-docs-pdf-a4.tar.bz2";
sha256 = "1gvi457dsj3ywwvxysp7idkk9ndngnby1dnfh1q8f5gv3kg4093r";
};
installPhase = ''
mkdir -p $out/share/doc/python310
cp -R ./ $out/share/doc/python310/pdf-a4
'';
meta = {
maintainers = [ ];
};
}

View File

@@ -1,24 +0,0 @@
# This file was generated and will be overwritten by ./generate.sh
{
stdenv,
lib,
fetchurl,
}:
stdenv.mkDerivation {
pname = "python310-docs-pdf-letter";
version = "3.10.7";
src = fetchurl {
url = "https://www.python.org/ftp/python/doc/3.10.7/python-3.10.7-docs-pdf-letter.tar.bz2";
sha256 = "0hzq5n6absqsh21jp6j5iaim9a1wq69d8lc2assldzb2zg4i75hr";
};
installPhase = ''
mkdir -p $out/share/doc/python310
cp -R ./ $out/share/doc/python310/pdf-letter
'';
meta = {
maintainers = [ ];
};
}

View File

@@ -1,24 +0,0 @@
# This file was generated and will be overwritten by ./generate.sh
{
stdenv,
lib,
fetchurl,
}:
stdenv.mkDerivation {
pname = "python310-docs-texinfo";
version = "3.10.7";
src = fetchurl {
url = "https://www.python.org/ftp/python/doc/3.10.7/python-3.10.7-docs-texinfo.tar.bz2";
sha256 = "0p0fifi84ijz4ng6krw7c1x965jhgysprkijblmlnax7x9rmqrdf";
};
installPhase = ''
mkdir -p $out/share/info
cp ./python.info $out/share/info
'';
meta = {
maintainers = [ ];
};
}

View File

@@ -1,24 +0,0 @@
# This file was generated and will be overwritten by ./generate.sh
{
stdenv,
lib,
fetchurl,
}:
stdenv.mkDerivation {
pname = "python310-docs-text";
version = "3.10.7";
src = fetchurl {
url = "https://www.python.org/ftp/python/doc/3.10.7/python-3.10.7-docs-text.tar.bz2";
sha256 = "1zbmm2fvdjnl214y41yffyqw3ywfai5r5npc00n1wkfxsdp7gcc3";
};
installPhase = ''
mkdir -p $out/share/doc/python310
cp -R ./ $out/share/doc/python310/text
'';
meta = {
maintainers = [ ];
};
}

View File

@@ -0,0 +1,26 @@
# This file was generated and will be overwritten by ./generate.sh
{
stdenv,
fetchurl,
lib,
}:
stdenv.mkDerivation {
pname = "python314-docs-html";
version = "3.14";
src = fetchurl {
url = "https://docs.python.org/3.14/archives/python-3.14-docs-html.tar.bz2";
sha256 = "0igikxq71zqyps8swfib4rwfi81vgvi4fdc6j4sz3x1981nh4j3v";
};
installPhase = ''
mkdir -p $out/share/doc/python314
cp -R ./ $out/share/doc/python314/html
'';
meta = {
maintainers = with lib.maintainers; [
panicgh
];
};
}

View File

@@ -0,0 +1,26 @@
# This file was generated and will be overwritten by ./generate.sh
{
stdenv,
fetchurl,
lib,
}:
stdenv.mkDerivation {
pname = "python314-docs-pdf-a4";
version = "3.14";
src = fetchurl {
url = "https://docs.python.org/3.14/archives/python-3.14-docs-pdf-a4.tar.bz2";
sha256 = "0nb69h3wz2vixf80alh9x8fafz3ipq2hdrxccj8vp8vvrcqna75y";
};
installPhase = ''
mkdir -p $out/share/doc/python314
cp -R ./ $out/share/doc/python314/pdf-a4
'';
meta = {
maintainers = with lib.maintainers; [
panicgh
];
};
}

View File

@@ -0,0 +1,26 @@
# This file was generated and will be overwritten by ./generate.sh
{
stdenv,
fetchurl,
lib,
}:
stdenv.mkDerivation {
pname = "python314-docs-texinfo";
version = "3.14";
src = fetchurl {
url = "https://docs.python.org/3.14/archives/python-3.14-docs-texinfo.tar.bz2";
sha256 = "0r89zg2dzh90iv3qff9rx0ckfsds8hin5z53ai31cchxhglg4b8s";
};
installPhase = ''
mkdir -p $out/share/info
cp ./python.info $out/share/info
'';
meta = {
maintainers = with lib.maintainers; [
panicgh
];
};
}

View File

@@ -0,0 +1,26 @@
# This file was generated and will be overwritten by ./generate.sh
{
stdenv,
fetchurl,
lib,
}:
stdenv.mkDerivation {
pname = "python314-docs-text";
version = "3.14";
src = fetchurl {
url = "https://docs.python.org/3.14/archives/python-3.14-docs-text.tar.bz2";
sha256 = "1w8zl9pymsfviiw7iqz86liwnvfh1093syk3vkpvsdmvsa9acwyf";
};
installPhase = ''
mkdir -p $out/share/doc/python314
cp -R ./ $out/share/doc/python314/text
'';
meta = {
maintainers = with lib.maintainers; [
panicgh
];
};
}

View File

@@ -8,31 +8,25 @@ let
pythonDocs = {
html = {
recurseForDerivations = true;
python310 = import ./3.10-html.nix {
python314 = import ./3.14-html.nix {
inherit stdenv fetchurl lib;
};
};
pdf_a4 = {
recurseForDerivations = true;
python310 = import ./3.10-pdf-a4.nix {
inherit stdenv fetchurl lib;
};
};
pdf_letter = {
recurseForDerivations = true;
python310 = import ./3.10-pdf-letter.nix {
python314 = import ./3.14-pdf-a4.nix {
inherit stdenv fetchurl lib;
};
};
text = {
recurseForDerivations = true;
python310 = import ./3.10-text.nix {
python314 = import ./3.14-text.nix {
inherit stdenv fetchurl lib;
};
};
texinfo = {
recurseForDerivations = true;
python310 = import ./3.10-texinfo.nix {
python314 = import ./3.14-texinfo.nix {
inherit stdenv fetchurl lib;
};
};

View File

@@ -2,25 +2,29 @@
cd -- "$(dirname -- "${BASH_SOURCE[0]}")"
TYPES="html pdf-a4 pdf-letter text texinfo"
URL=http://www.python.org/ftp/python/doc/VERSION/python-VERSION-docs-TYPE.tar.bz2
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)
TYPES="html pdf-a4 text texinfo"
URL=https://docs.python.org/VERSION/archives/python-VERSION-docs-TYPE.tar.bz2
VERSIONS=$(for major in 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}
"
cat >default.nix <<EOF
{ stdenv, fetchurl, lib }:
{
stdenv,
fetchurl,
lib,
}:
let
pythonDocs = {
pythonDocs = {
EOF
for type in $TYPES; do
cat >>default.nix <<EOF
${type/-/_} = {
recurseForDerivations = true;
${type/-/_} = {
recurseForDerivations = true;
EOF
for version in $VERSIONS; do
@@ -39,7 +43,7 @@ EOF
hash=
if [ -e ${outfile} ]; then
currentversion=$(grep "url =" ${outfile} |cut -d/ -f7)
if [ ${version} = ${currentversion} ]; then
if [ "${version}" = "${currentversion}" ]; then
hash=$(grep sha256 ${outfile} | cut -d'"' -f2)
fi
fi
@@ -57,15 +61,19 @@ EOF
attrname=python${major}${minor}
cat >>default.nix <<EOF
${attrname} = import ./${major}.${minor}-${type}.nix {
inherit stdenv fetchurl lib;
};
${attrname} = import ./${major}.${minor}-${type}.nix {
inherit stdenv fetchurl lib;
};
EOF
echo "done."
echo
done
echo " };" >> default.nix
echo " };" >> default.nix
done
echo "}; in pythonDocs" >> default.nix
cat >>default.nix <<EOF
};
in
pythonDocs
EOF

View File

@@ -1,6 +1,10 @@
# This file was generated and will be overwritten by ./generate.sh
{ stdenv, fetchurl }:
{
stdenv,
fetchurl,
lib,
}:
stdenv.mkDerivation {
pname = "pythonMAJORMINOR-docs-TYPE";
@@ -15,6 +19,8 @@ stdenv.mkDerivation {
cp ./python.info $out/share/info
'';
meta = {
maintainers = [ ];
maintainers = with lib.maintainers; [
panicgh
];
};
}

View File

@@ -1,6 +1,10 @@
# This file was generated and will be overwritten by ./generate.sh
{ stdenv, fetchurl }:
{
stdenv,
fetchurl,
lib,
}:
stdenv.mkDerivation {
pname = "pythonMAJORMINOR-docs-TYPE";
@@ -15,6 +19,8 @@ stdenv.mkDerivation {
cp -R ./ $out/share/doc/pythonMAJORMINOR/TYPE
'';
meta = {
maintainers = [ ];
maintainers = with lib.maintainers; [
panicgh
];
};
}