mirror of
https://github.com/numtide/treefmt.git
synced 2024-09-11 17:07:44 +03:00
31 lines
537 B
Nix
31 lines
537 B
Nix
{ stdenv, mkdocs, python310Packages }:
|
|
|
|
stdenv.mkDerivation {
|
|
name = "treefmt-docs";
|
|
|
|
src = builtins.path {
|
|
name = "treefmt-docs";
|
|
path = ./.;
|
|
};
|
|
|
|
# Re-create the folder structure since mkdocs insists on having the
|
|
# mkdocs.yml at the root of the repo.
|
|
unpackPhase = ''
|
|
cp -r --no-preserve=mode $src docs
|
|
cp ${../mkdocs.yml} mkdocs.yml
|
|
'';
|
|
|
|
nativeBuildInputs = [
|
|
mkdocs
|
|
python310Packages.mkdocs-material
|
|
];
|
|
|
|
buildPhase = ''
|
|
mkdocs build
|
|
'';
|
|
|
|
installPhase = ''
|
|
mv site $out
|
|
'';
|
|
}
|