export nix module
This commit is contained in:
parent
fee174ec05
commit
e288b3a63b
6 changed files with 522 additions and 4 deletions
46
nix/packages/frontend.nix
Normal file
46
nix/packages/frontend.nix
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
{
|
||||
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";
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue