mirror of
https://github.com/versia-pub/frontend.git
synced 2025-12-06 08:28:20 +01:00
66 lines
1.3 KiB
Nix
66 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;
|
|
hash = "sha256-or+GR3zZGOqcC/6h2pHlhK2SGyysIAnghik8gpJhAlk=";
|
|
};
|
|
|
|
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"];
|
|
};
|
|
})
|