nixpkgs/pkgs/by-name/ov/overlayed/webui.nix
2024-10-26 10:44:18 +08:00

41 lines
624 B
Nix

{
src,
meta,
version,
stdenv,
nodejs,
pnpm,
}:
stdenv.mkDerivation (finalAttrs: {
inherit version src meta;
pname = "overlayed-webui";
pnpmDeps = pnpm.fetchDeps {
inherit (finalAttrs) src pname version;
hash = "sha256-+yyxoodcDfqJ2pkosd6sMk77/71RDsGthedo1Oigwto=";
};
nativeBuildInputs = [
nodejs
pnpm.configHook
];
buildPhase = ''
runHook preBuild
cd apps/desktop
node --max_old_space_size=1024000 ./node_modules/vite/bin/vite.js build
runHook postBuild
'';
installPhase = ''
runHook preInstall
cp -r dist $out
runHook postInstall
'';
})