Merge remote-tracking branch 'origin/master' into staging-next
This commit is contained in:
@@ -2,13 +2,13 @@
|
||||
|
||||
{ stdenv, fetchurl, lib }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
stdenv.mkDerivation {
|
||||
pname = "python27-docs-html";
|
||||
version = "2.7.16";
|
||||
version = "2.7.18";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://docs.python.org/ftp/python/doc/${version}/python-${version}-docs-html.tar.bz2";
|
||||
sha256 = "1razs1grzhai65ihaiyph8kz6ncjkgp1gsn3c8v7kanf13lqim02";
|
||||
url = "http://www.python.org/ftp/python/doc/2.7.18/python-2.7.18-docs-html.tar.bz2";
|
||||
sha256 = "03igxwpqc2lvzspnj78zz1prnmfwwj00jbvh1wsxvb0wayd5wi10";
|
||||
};
|
||||
installPhase = ''
|
||||
mkdir -p $out/share/doc/python27
|
||||
|
||||
@@ -2,13 +2,13 @@
|
||||
|
||||
{ stdenv, fetchurl, lib }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
stdenv.mkDerivation {
|
||||
pname = "python27-docs-pdf-a4";
|
||||
version = "2.7.16";
|
||||
version = "2.7.18";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://docs.python.org/ftp/python/doc/${version}/python-${version}-docs-pdf-a4.tar.bz2";
|
||||
sha256 = "14ml1ynrlbhg43737bdsb8k5y39wsffqj4iwhylhb8n8l5dplfdq";
|
||||
url = "http://www.python.org/ftp/python/doc/2.7.18/python-2.7.18-docs-pdf-a4.tar.bz2";
|
||||
sha256 = "0rxb2fpxwivjpk5wi2pl1fqibr4khf9s0yq6a49k9b4awi9nkb6v";
|
||||
};
|
||||
installPhase = ''
|
||||
mkdir -p $out/share/doc/python27
|
||||
|
||||
@@ -2,13 +2,13 @@
|
||||
|
||||
{ stdenv, fetchurl, lib }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
stdenv.mkDerivation {
|
||||
pname = "python27-docs-pdf-letter";
|
||||
version = "2.7.16";
|
||||
version = "2.7.18";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://docs.python.org/ftp/python/doc/${version}/python-${version}-docs-pdf-letter.tar.bz2";
|
||||
sha256 = "019i8n48m71mn31v8d85kkwyqfgcgqnqh506y4a7fcgf656bajs0";
|
||||
url = "http://www.python.org/ftp/python/doc/2.7.18/python-2.7.18-docs-pdf-letter.tar.bz2";
|
||||
sha256 = "07hbqvrdlq01cb95r1574bxqqhiqbkj4f92wzlq4d6dq1l272nan";
|
||||
};
|
||||
installPhase = ''
|
||||
mkdir -p $out/share/doc/python27
|
||||
|
||||
@@ -2,13 +2,13 @@
|
||||
|
||||
{ stdenv, fetchurl, lib }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
stdenv.mkDerivation {
|
||||
pname = "python27-docs-text";
|
||||
version = "2.7.16";
|
||||
version = "2.7.18";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://docs.python.org/ftp/python/doc/${version}/python-${version}-docs-text.tar.bz2";
|
||||
sha256 = "1da7swlykvc013684nywycinfz3v8dqkcmv0zj8p7l5lyi5mq03r";
|
||||
url = "http://www.python.org/ftp/python/doc/2.7.18/python-2.7.18-docs-text.tar.bz2";
|
||||
sha256 = "1wj7mxs52kp5lmn5mvv574sygkfnk00kbz9ya9c03yfq5dd5nvy8";
|
||||
};
|
||||
installPhase = ''
|
||||
mkdir -p $out/share/doc/python27
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
# This file was generated and will be overwritten by ./generate.sh
|
||||
|
||||
{ stdenv, fetchurl, lib }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
pname = "python310-docs-html";
|
||||
version = "3.10.7";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://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 = [ ];
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
# This file was generated and will be overwritten by ./generate.sh
|
||||
|
||||
{ stdenv, fetchurl, lib }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
pname = "python310-docs-pdf-a4";
|
||||
version = "3.10.7";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://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 = [ ];
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
# This file was generated and will be overwritten by ./generate.sh
|
||||
|
||||
{ stdenv, fetchurl, lib }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
pname = "python310-docs-pdf-letter";
|
||||
version = "3.10.7";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://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 = [ ];
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
# This file was generated and will be overwritten by ./generate.sh
|
||||
|
||||
{ stdenv, fetchurl, lib }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
pname = "python310-docs-texinfo";
|
||||
version = "3.10.7";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://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 = [ ];
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
# This file was generated and will be overwritten by ./generate.sh
|
||||
|
||||
{ stdenv, fetchurl, lib }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
pname = "python310-docs-text";
|
||||
version = "3.10.7";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://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 = [ ];
|
||||
};
|
||||
}
|
||||
@@ -7,7 +7,7 @@ pythonDocs = {
|
||||
python27 = import ./2.7-html.nix {
|
||||
inherit stdenv fetchurl lib;
|
||||
};
|
||||
python37 = import ./3.7-html.nix {
|
||||
python310 = import ./3.10-html.nix {
|
||||
inherit stdenv fetchurl lib;
|
||||
};
|
||||
};
|
||||
@@ -16,7 +16,7 @@ pythonDocs = {
|
||||
python27 = import ./2.7-pdf-a4.nix {
|
||||
inherit stdenv fetchurl lib;
|
||||
};
|
||||
python37 = import ./3.7-pdf-a4.nix {
|
||||
python310 = import ./3.10-pdf-a4.nix {
|
||||
inherit stdenv fetchurl lib;
|
||||
};
|
||||
};
|
||||
@@ -25,7 +25,7 @@ pythonDocs = {
|
||||
python27 = import ./2.7-pdf-letter.nix {
|
||||
inherit stdenv fetchurl lib;
|
||||
};
|
||||
python37 = import ./3.7-pdf-letter.nix {
|
||||
python310 = import ./3.10-pdf-letter.nix {
|
||||
inherit stdenv fetchurl lib;
|
||||
};
|
||||
};
|
||||
@@ -34,7 +34,13 @@ pythonDocs = {
|
||||
python27 = import ./2.7-text.nix {
|
||||
inherit stdenv fetchurl lib;
|
||||
};
|
||||
python37 = import ./3.7-text.nix {
|
||||
python310 = import ./3.10-text.nix {
|
||||
inherit stdenv fetchurl lib;
|
||||
};
|
||||
};
|
||||
texinfo = {
|
||||
recurseForDerivations = true;
|
||||
python310 = import ./3.10-texinfo.nix {
|
||||
inherit stdenv fetchurl lib;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
#!/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=$(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)
|
||||
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)
|
||||
echo "Generating expressions for:
|
||||
${VERSIONS}
|
||||
"
|
||||
@@ -24,6 +26,15 @@ EOF
|
||||
for version in $VERSIONS; do
|
||||
major=$(echo -n ${version}| cut -d. -f1)
|
||||
minor=$(echo -n ${version}| cut -d. -f2)
|
||||
if [ "${type}" = "texinfo" ]; then
|
||||
if [ "${major}" = "2" ]; then
|
||||
# Python 2 doesn't have pregenerated texinfos available
|
||||
continue
|
||||
fi
|
||||
template=template-info.nix
|
||||
else
|
||||
template=template.nix
|
||||
fi
|
||||
outfile=${major}.${minor}-${type}.nix
|
||||
hash=
|
||||
if [ -e ${outfile} ]; then
|
||||
@@ -36,12 +47,13 @@ EOF
|
||||
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}
|
||||
-e "s,SHA,${sha}," < ${template} > ${outfile}
|
||||
|
||||
attrname=python${major}${minor}
|
||||
cat >>default.nix <<EOF
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
# This file was generated and will be overwritten by ./generate.sh
|
||||
|
||||
{ stdenv, fetchurl, lib }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
pname = "pythonMAJORMINOR-docs-TYPE";
|
||||
version = "VERSION";
|
||||
|
||||
src = fetchurl {
|
||||
url = "URL";
|
||||
sha256 = "SHA";
|
||||
};
|
||||
installPhase = ''
|
||||
mkdir -p $out/share/info
|
||||
cp ./python.info $out/share/info
|
||||
'';
|
||||
meta = {
|
||||
maintainers = [ ];
|
||||
};
|
||||
}
|
||||
@@ -3,9 +3,11 @@
|
||||
{ stdenv, fetchurl, lib }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "pythonMAJORMINOR-docs-TYPE-VERSION";
|
||||
pname = "pythonMAJORMINOR-docs-TYPE";
|
||||
version = "VERSION";
|
||||
|
||||
src = fetchurl {
|
||||
url = URL;
|
||||
url = "URL";
|
||||
sha256 = "SHA";
|
||||
};
|
||||
installPhase = ''
|
||||
|
||||
@@ -4,9 +4,6 @@
|
||||
, makeSetupHook
|
||||
, disabledIf
|
||||
, isPy3k
|
||||
, ensureNewerSourcesForZipFilesHook
|
||||
, findutils
|
||||
, installShellFiles
|
||||
}:
|
||||
|
||||
let
|
||||
@@ -106,7 +103,7 @@ in rec {
|
||||
};
|
||||
} ./python-imports-check-hook.sh) {};
|
||||
|
||||
pythonNamespacesHook = callPackage ({}:
|
||||
pythonNamespacesHook = callPackage ({ findutils }:
|
||||
makeSetupHook {
|
||||
name = "python-namespaces-hook.sh";
|
||||
substitutions = {
|
||||
@@ -177,7 +174,7 @@ in rec {
|
||||
};
|
||||
} ./unittest-check-hook.sh) {};
|
||||
|
||||
venvShellHook = disabledIf (!isPy3k) (callPackage ({ }:
|
||||
venvShellHook = disabledIf (!isPy3k) (callPackage ({ ensureNewerSourcesForZipFilesHook }:
|
||||
makeSetupHook {
|
||||
name = "venv-shell-hook";
|
||||
deps = [ ensureNewerSourcesForZipFilesHook ];
|
||||
@@ -192,7 +189,7 @@ in rec {
|
||||
deps = [ wheel ];
|
||||
} ./wheel-unpack-hook.sh) {};
|
||||
|
||||
sphinxHook = callPackage ({ sphinx }:
|
||||
sphinxHook = callPackage ({ sphinx, installShellFiles }:
|
||||
makeSetupHook {
|
||||
name = "python${python.pythonVersion}-sphinx-hook";
|
||||
deps = [ sphinx installShellFiles ];
|
||||
|
||||
Reference in New Issue
Block a user