frontend/nix/package.nix
Jesse Wierzbinski a6db9e059d
Some checks failed
CodeQL / Analyze (javascript) (push) Failing after 0s
Deploy to GitHub Pages / build (push) Failing after 0s
Deploy to GitHub Pages / deploy (push) Has been skipped
Docker / build (push) Failing after 4s
Mirror to Codeberg / Mirror (push) Failing after 0s
chore: ⬆️ Upgrade dependencies
2025-08-21 21:42:43 +02:00

67 lines
1.3 KiB
Nix

{
lib,
stdenv,
pnpm,
bun,
nodejs,
makeWrapper,
...
}: let
packageJson = builtins.fromJSON (builtins.readFile ../package.json);
in
stdenv.mkDerivation (finalAttrs: {
pname = "versia-fe";
version = packageJson.version;
src = ../.;
pnpmDeps = pnpm.fetchDeps {
inherit (finalAttrs) pname version src;
fetcherVersion = 2;
hash = "sha256-mVoQCdBDX6e2Y7cWUGJzxyJ5CpMgjrw5hf9K9qvGU7Y=";
};
nativeBuildInputs = [
pnpm
pnpm.configHook
bun
nodejs
makeWrapper
];
buildPhase = ''
runHook preBuild
# Disable telemetry, as it crashes the build
export NUXT_TELEMETRY_DISABLED=1
bun run emojis:generate
bun run build
runHook postBuild
'';
installPhase = ''
runHook preInstall
mkdir -p $out
cp -r .output/public $out/${finalAttrs.pname}
runHook postInstall
'';
meta = with lib; {
description = packageJson.description;
license = licenses.agpl3Only;
maintainers = [
{
name = "CPlusPatch";
email = "contact@cpluspatch.com";
github = "CPlusPatch";
githubId = 42910258;
matrix = "@jesse:cpluspatch.dev";
}
];
platforms = ["x86_64-linux" "aarch64-linux"];
};
})