Switch to Svelte

This commit is contained in:
2026-06-11 14:39:41 -07:00
parent 29860061c4
commit 58a7e4d4f1
74 changed files with 7144 additions and 2379 deletions

View File

@@ -18,6 +18,19 @@
let
pkgs = nixpkgs.legacyPackages.${system};
python = pkgs.python3;
# Build the Svelte frontend
frontend = pkgs.buildNpmPackage {
pname = "pirats-frontend";
version = "0.1.0";
src = ./frontend;
npmDepsHash = "sha256-ekYBi0oUjtnsfdig2B0yrmT7KbSc9IB1DVbTCRwYI24=";
installPhase = ''
mkdir -p $out
cp -r dist $out/
'';
};
in
{
default = python.pkgs.buildPythonApplication {
@@ -35,7 +48,6 @@
fastapi
sqlmodel
uvicorn
jinja2
python-multipart
httpx
];
@@ -43,6 +55,11 @@
nativeCheckInputs = with python.pkgs; [
pytestCheckHook
];
preBuild = ''
mkdir -p src/pirats/static
cp -r ${frontend}/dist/* src/pirats/static/
'';
pythonImportsCheck = [ "pirats" ];
};
@@ -59,6 +76,7 @@
inputsFrom = [ self.packages.${system}.default ];
packages = with pkgs; [
pkgs.python3.pkgs.pytest
pkgs.nodejs
];
};
}