Add nix build script to generate static files

This commit is contained in:
thiloho
2023-08-01 22:59:28 +00:00
parent 0017fcdfa7
commit a7a1570805
5 changed files with 918 additions and 854 deletions

View File

@@ -20,11 +20,19 @@
});
in
{
devShells = forAllSystems ({ pkgs }: {
default = pkgs.mkShell {
packages = with pkgs; [
nodejs # Node.js, plus npm, npx, and corepack
packages = forAllSystems ({ pkgs }: {
default = pkgs.buildNpmPackage {
name = "build-aurora-blog";
buildInputs = with pkgs; [
nodejs_18
];
src = ./.;
npmDepsHash = "sha256-K30UsMZ508XT1x/1eXY/xg7dfhLm55pdi9vOdDQHtWg=";
npmBuild = "npm run build";
installPhase = ''
mkdir $out
cp -r dist/* $out
'';
};
});
};