package vue frontend with nix
This commit is contained in:
parent
d7f7460601
commit
b7db23b6aa
1 changed files with 33 additions and 0 deletions
33
nix/packages/frontend.nix
Normal file
33
nix/packages/frontend.nix
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
{ buildNpmPackage, lib, nodejs_22, apiUrl }:
|
||||
buildNpmPackage (finalAttrs: {
|
||||
pname = "tide-frontend";
|
||||
version = "0.0.0";
|
||||
|
||||
src = lib.cleanSource ../../frontend/blog_portal;
|
||||
|
||||
nodejs = nodejs_22;
|
||||
|
||||
npmDepsFetcherVersion = 2;
|
||||
npmDepsHash = "sha256-NHAo9Bvg80W2341yPaw97khUCJyr/7fyQFvhQFKWYnY=";
|
||||
|
||||
env = {
|
||||
VITE_API_URL = apiUrl;
|
||||
# Cypress' postinstall reaches out to download.cypress.io, which
|
||||
# is not allowed inside the Nix sandbox. Cypress is only used
|
||||
# for local E2E so skip the download during the production
|
||||
# build.
|
||||
CYPRESS_INSTALL_BINARY = "0";
|
||||
};
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
mkdir -p $out
|
||||
cp -r dist/* $out/
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "TIDE Vue frontend (blog_portal)";
|
||||
license = lib.licenses.mit;
|
||||
};
|
||||
})
|
||||
Loading…
Add table
Add a link
Reference in a new issue