Skip to content

Commit

Permalink
fix(devshell): work around godoc not supporting riscv5
Browse files Browse the repository at this point in the history
  • Loading branch information
zimbatm committed Sep 12, 2024
1 parent 4ccec85 commit 5dacfc2
Showing 1 changed file with 19 additions and 17 deletions.
36 changes: 19 additions & 17 deletions nix/devshells/docs.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,23 @@
}:
pkgs.mkShellNoCC {
packages = with pkgs;
[
perSystem.godoc.default
(pkgs.writeScriptBin "gen-reference" ''
out="./docs/content/reference/go_doc"
godoc -c -o $out .
'')
(pkgs.writeScriptBin "mkdocs" ''
# generate reference docs first
gen-reference
# execute the underlying command
${pkgs.mkdocs}/bin/mkdocs "$@"
'')
]
++ (with pkgs.python3Packages; [
mike
mkdocs-material
]);
# Pop an empty shell on systems that aren't supported by godoc
lib.optionals (perSystem.godoc ? default)
([
perSystem.godoc.default
(pkgs.writeScriptBin "gen-reference" ''
out="./docs/content/reference/go_doc"
godoc -c -o $out .
'')
(pkgs.writeScriptBin "mkdocs" ''
# generate reference docs first
gen-reference
# execute the underlying command
${pkgs.mkdocs}/bin/mkdocs "$@"
'')
]
++ (with pkgs.python3Packages; [
mike
mkdocs-material
]));
}

0 comments on commit 5dacfc2

Please sign in to comment.