nix: keep readthedocs dependencies in-sync with nix
This is to make sure that we will always have the same development environment for the docs build as is used live on the website.
This commit is contained in:
committed by
Wolfgang Walther
parent
6c46f7dba5
commit
a023bd5742
@@ -8,14 +8,13 @@
|
|||||||
"/^v[0-9]+/"
|
"/^v[0-9]+/"
|
||||||
],
|
],
|
||||||
"rebaseWhen": "conflicted",
|
"rebaseWhen": "conflicted",
|
||||||
|
"pip_requirements": {
|
||||||
|
"enabled": false
|
||||||
|
},
|
||||||
"packageRules": [
|
"packageRules": [
|
||||||
{
|
{
|
||||||
"matchBaseBranches": [ "/^v[0-9]+/" ],
|
"matchBaseBranches": [ "/^v[0-9]+/" ],
|
||||||
"groupName": "all dependencies"
|
"groupName": "all dependencies"
|
||||||
},
|
|
||||||
{
|
|
||||||
"matchPackageNames": ["docutils"],
|
|
||||||
"allowedVersions": "<0.21.0"
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,9 +1,7 @@
|
|||||||
docutils==0.20.1
|
# This file is auto-generated by postgrest-nixpkgs-upgrade
|
||||||
sphinx-copybutton
|
sphinx==7.4.7
|
||||||
sphinx-intl
|
sphinx-copybutton==0.5.2
|
||||||
sphinx-rtd-theme>=0.5.1
|
sphinx-rtd-dark-mode==1.3.0
|
||||||
sphinx-rtd-dark-mode>=1.3.0
|
sphinx-rtd-theme==2.0.0
|
||||||
sphinx-tabs>=3.2.0
|
sphinx-tabs==3.4.7
|
||||||
sphinx>=5.0.2
|
sphinxext-opengraph==0.9.1
|
||||||
sphinxext-opengraph==0.9.1
|
|
||||||
urllib3==2.2.3
|
|
||||||
+13
-6
@@ -2,22 +2,28 @@
|
|||||||
, aspellDicts
|
, aspellDicts
|
||||||
, buildToolbox
|
, buildToolbox
|
||||||
, checkedShellScript
|
, checkedShellScript
|
||||||
|
, lib
|
||||||
|
, plantuml
|
||||||
, python3
|
, python3
|
||||||
, python3Packages
|
, python3Packages
|
||||||
|
, writeTextFile
|
||||||
, writers
|
, writers
|
||||||
, plantuml
|
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
selectPythonPackages = ps: [
|
selectPythonPackages = ps: [
|
||||||
ps.sphinx
|
ps.sphinx
|
||||||
ps.sphinx_rtd_theme
|
|
||||||
ps.livereload
|
|
||||||
ps.sphinx-tabs
|
|
||||||
ps.sphinx-copybutton
|
ps.sphinx-copybutton
|
||||||
ps.sphinxext-opengraph
|
|
||||||
ps.sphinx-rtd-dark-mode
|
ps.sphinx-rtd-dark-mode
|
||||||
|
ps.sphinx-rtd-theme
|
||||||
|
ps.sphinx-tabs
|
||||||
|
ps.sphinxext-opengraph
|
||||||
];
|
];
|
||||||
|
|
||||||
|
requirements = writeTextFile {
|
||||||
|
name = "requirements.txt";
|
||||||
|
text = lib.concatMapStringsSep "\n" (pkg: "${pkg.pname}==${pkg.version}") (selectPythonPackages python3Packages);
|
||||||
|
};
|
||||||
|
|
||||||
python = python3.withPackages selectPythonPackages;
|
python = python3.withPackages selectPythonPackages;
|
||||||
|
|
||||||
build =
|
build =
|
||||||
@@ -71,7 +77,7 @@ let
|
|||||||
server =
|
server =
|
||||||
writers.writePython3
|
writers.writePython3
|
||||||
"postgrest-docs-server"
|
"postgrest-docs-server"
|
||||||
{ libraries = selectPythonPackages python3Packages; }
|
{ libraries = selectPythonPackages python3Packages ++ [ python3Packages.livereload ]; }
|
||||||
''
|
''
|
||||||
import sys
|
import sys
|
||||||
from livereload import Server, shell
|
from livereload import Server, shell
|
||||||
@@ -181,4 +187,5 @@ buildToolbox
|
|||||||
serve
|
serve
|
||||||
spellcheck;
|
spellcheck;
|
||||||
};
|
};
|
||||||
|
extra = { inherit requirements; };
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -49,6 +49,9 @@ let
|
|||||||
tarballHash = "$tarballHash";
|
tarballHash = "$tarballHash";
|
||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
echo "# This file is auto-generated by ${name}" > docs/requirements.txt
|
||||||
|
cat "$(nix-build -A docs.requirements)" >> docs/requirements.txt
|
||||||
'';
|
'';
|
||||||
|
|
||||||
in
|
in
|
||||||
|
|||||||
Reference in New Issue
Block a user