Skip to content

Commit

Permalink
fix(overrides): mkdocs-material replace dynamic requirements
Browse files Browse the repository at this point in the history
Somehow, this is broken. It always raises `ValueError: Cannot specify
'filename' in [tool.hatch.metadata.hooks.requirements_txt] when
'dependencies' is not listed in 'project.dynamic'.`, but everything
looks good. So I decided to fix it with this "hack".
  • Loading branch information
cheriimoya authored and cpcloud committed Oct 28, 2024
1 parent 092f263 commit 50eeba7
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions overrides/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4297,9 +4297,11 @@ lib.composeManyExtensions [
});

mkdocs-material = prev.mkdocs-material.overridePythonAttrs (old: {
postPatch = old.postPatch or "" + ''
sed -i 's/"Framework :: MkDocs",//' pyproject.toml
postPatch = old.postPatch or "" + lib.optionalString (old.version == "8.5.4") ''
sed -i 's/filename = "requirements.txt"//' pyproject.toml
sed -i '/\[project\]/a dependencies = ["jinja2>=3.0.2", "markdown>=3.2", "mkdocs>=1.3", "mkdocs-material-extensions>=1.0.3", "pygments>=2.12", "pymdown-extensions>=9.4", "requests>=2.26"]' pyproject.toml
'';

});

# patch mkdocstrings to fix jinja2 imports
Expand Down

0 comments on commit 50eeba7

Please sign in to comment.