first commit

This commit is contained in:
Beyhan Oğur
2026-04-26 21:52:23 +03:00
commit 880f412e2c
2662 changed files with 866266 additions and 0 deletions

View File

@@ -0,0 +1,48 @@
{
pkgs,
src,
version,
}:
pkgs.buildNpmPackage {
pname = "bifrost-ui";
inherit version;
inherit src;
sourceRoot = "source/ui";
npmDepsHash = "sha256-+tI2NUJtpHwvI9sAYMXO7r00Y3Pb1E62ms1ZSd3O0hM=";
# Next's `next/font/google` requires network access at build time.
# Nix builds are sandboxed (no network), so patch the layout to avoid
# fetching Google Fonts.
postPatch = ''
cat > app/layout.tsx <<'EOF'
import "./globals.css"
export default function RootLayout({ children }: { children: React.ReactNode }) {
return (
<html lang="en" suppressHydrationWarning>
<head>
<link rel="dns-prefetch" href="https://getbifrost.ai" />
<link rel="preconnect" href="https://getbifrost.ai" />
</head>
<body className="font-sans antialiased">{children}</body>
</html>
)
}
EOF
'';
# Avoid the upstream build script's copy step (writes outside $PWD).
npmBuildScript = "build-enterprise";
env.NEXT_TELEMETRY_DISABLED = "1";
env.NEXT_DISABLE_ESLINT = "1";
installPhase = ''
runHook preInstall
mkdir -p "$out/ui"
cp -R --no-preserve=mode,ownership,timestamps out/. "$out/ui/"
runHook postInstall
'';
}