Rabbi_Gerzi/nix/packages/frontend.nix
2026-07-02 01:31:58 +03:00

46 lines
1 KiB
Nix

{
buildNpmPackage,
lib,
apiBaseUrl ? "",
}:
buildNpmPackage {
pname = "rabbi-gerzi-frontend";
version = "0.0.0";
src = lib.cleanSourceWith {
src = ../../frontend/rabbi_gerzi;
filter =
path: type:
let
relativePath = lib.removePrefix (toString ../../frontend/rabbi_gerzi + "/") (toString path);
in
!(
lib.hasPrefix ".env" relativePath
|| lib.hasPrefix "node_modules/" relativePath
|| lib.hasPrefix "dist/" relativePath
|| lib.hasPrefix "coverage/" relativePath
|| lib.hasSuffix ".tsbuildinfo" relativePath
|| lib.hasSuffix ".timestamp-" relativePath
);
};
npmDepsHash = "sha256-SF6YRzLySEkYAnwr5YYsftyvwbohtHQo0UpelHmJ7CY=";
npmFlags = [ "--legacy-peer-deps" ];
CYPRESS_INSTALL_BINARY = "0";
VITE_API_BASE_URL = apiBaseUrl;
installPhase = ''
runHook preInstall
mkdir -p $out
cp -R dist/* $out/
runHook postInstall
'';
meta = {
description = "Rabbi Gerzi Vue frontend";
};
}