treefmt/nix/packages/treefmt-docs.nix
Brian McGee 986f020c3d
feat: use numtide/blueprint instead of flake.parts
Signed-off-by: Brian McGee <brian@bmcgee.ie>
2024-06-30 12:25:00 +01:00

26 lines
497 B
Nix

{
pname,
pkgs,
flake,
perSystem,
...
}:
pkgs.buildNpmPackage {
inherit pname;
inherit (perSystem.self.treefmt) version;
src = "${flake}/docs";
npmDepsHash = "sha256-vHxJHuhvQJ0P4wS1Hd2BIfPMSptnLhuHGLXCO+P5iFs=";
# we have to use a custom build phase because vitepress is doing something funky with the ttty
buildPhase = ''
cat | npm run build 2>&1 | cat
'';
installPhase = ''
runHook preInstall
cp -rv .vitepress/dist/ $out
runHook postInstall
'';
}