mirror of
https://github.com/numtide/treefmt.git
synced 2024-09-11 17:07:44 +03:00
986f020c3d
Signed-off-by: Brian McGee <brian@bmcgee.ie>
26 lines
497 B
Nix
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
|
|
'';
|
|
}
|