33 lines
809 B
Nix
33 lines
809 B
Nix
{ 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;
|
|
};
|
|
})
|