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]+/"
|
||||
],
|
||||
"rebaseWhen": "conflicted",
|
||||
"pip_requirements": {
|
||||
"enabled": false
|
||||
},
|
||||
"packageRules": [
|
||||
{
|
||||
"matchBaseBranches": [ "/^v[0-9]+/" ],
|
||||
"groupName": "all dependencies"
|
||||
},
|
||||
{
|
||||
"matchPackageNames": ["docutils"],
|
||||
"allowedVersions": "<0.21.0"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
docutils==0.20.1
|
||||
sphinx-copybutton
|
||||
sphinx-intl
|
||||
sphinx-rtd-theme>=0.5.1
|
||||
sphinx-rtd-dark-mode>=1.3.0
|
||||
sphinx-tabs>=3.2.0
|
||||
sphinx>=5.0.2
|
||||
sphinxext-opengraph==0.9.1
|
||||
urllib3==2.2.3
|
||||
# This file is auto-generated by postgrest-nixpkgs-upgrade
|
||||
sphinx==7.4.7
|
||||
sphinx-copybutton==0.5.2
|
||||
sphinx-rtd-dark-mode==1.3.0
|
||||
sphinx-rtd-theme==2.0.0
|
||||
sphinx-tabs==3.4.7
|
||||
sphinxext-opengraph==0.9.1
|
||||
+13
-6
@@ -2,22 +2,28 @@
|
||||
, aspellDicts
|
||||
, buildToolbox
|
||||
, checkedShellScript
|
||||
, lib
|
||||
, plantuml
|
||||
, python3
|
||||
, python3Packages
|
||||
, writeTextFile
|
||||
, writers
|
||||
, plantuml
|
||||
}:
|
||||
let
|
||||
selectPythonPackages = ps: [
|
||||
ps.sphinx
|
||||
ps.sphinx_rtd_theme
|
||||
ps.livereload
|
||||
ps.sphinx-tabs
|
||||
ps.sphinx-copybutton
|
||||
ps.sphinxext-opengraph
|
||||
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;
|
||||
|
||||
build =
|
||||
@@ -71,7 +77,7 @@ let
|
||||
server =
|
||||
writers.writePython3
|
||||
"postgrest-docs-server"
|
||||
{ libraries = selectPythonPackages python3Packages; }
|
||||
{ libraries = selectPythonPackages python3Packages ++ [ python3Packages.livereload ]; }
|
||||
''
|
||||
import sys
|
||||
from livereload import Server, shell
|
||||
@@ -181,4 +187,5 @@ buildToolbox
|
||||
serve
|
||||
spellcheck;
|
||||
};
|
||||
extra = { inherit requirements; };
|
||||
}
|
||||
|
||||
@@ -49,6 +49,9 @@ let
|
||||
tarballHash = "$tarballHash";
|
||||
}
|
||||
EOF
|
||||
|
||||
echo "# This file is auto-generated by ${name}" > docs/requirements.txt
|
||||
cat "$(nix-build -A docs.requirements)" >> docs/requirements.txt
|
||||
'';
|
||||
|
||||
in
|
||||
|
||||
Reference in New Issue
Block a user