Fix flake to build with vite

This commit is contained in:
Greg Shuflin 2025-02-17 03:27:49 -08:00
parent 7e7d2fc86b
commit 7ee840c28a

View File

@ -32,6 +32,7 @@
buildInputs = with pkgs; [
openssl
sqlite
nodejs_20
];
in {
devShells.default = pkgs.mkShell {
@ -53,10 +54,17 @@
inherit nativeBuildInputs buildInputs;
# Copy static files to the output
# Build the Vite assets and copy them to the output
preInstall = ''
cd static
npm install
npm run build
cd ..
'';
postInstall = ''
mkdir -p $out
cp -r static $out
cp -r static/dist $out/static
cp -r templates $out
'';