Fix flake to build with vite
This commit is contained in:
parent
7e7d2fc86b
commit
7ee840c28a
12
flake.nix
12
flake.nix
@ -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
|
||||
'';
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user