mirror of
https://github.com/versia-pub/server.git
synced 2026-03-12 21:39:15 +01:00
refactor: ♻️ [BROKEN] Refactor Nix build to use fetchBunDeps PR
This commit is contained in:
parent
03940cd8fd
commit
1a666e8371
4 changed files with 151 additions and 303 deletions
|
|
@ -1,11 +1,14 @@
|
|||
{
|
||||
lib,
|
||||
stdenv,
|
||||
pnpm,
|
||||
bun,
|
||||
nodejs,
|
||||
vips,
|
||||
makeWrapper,
|
||||
fetchBunDeps,
|
||||
bunConfigHook,
|
||||
bunInstallHook,
|
||||
bunBuildHook,
|
||||
...
|
||||
}: let
|
||||
packageJson = builtins.fromJSON (builtins.readFile ../package.json);
|
||||
|
|
@ -16,34 +19,22 @@ in
|
|||
|
||||
src = ../.;
|
||||
|
||||
# Fixes the build script mv usage
|
||||
pnpmInstallFlags = ["--shamefully-hoist"];
|
||||
|
||||
pnpmDeps = pnpm.fetchDeps {
|
||||
inherit (finalAttrs) pname version src pnpmInstallFlags;
|
||||
hash = "sha256-nC1bYW+It2N0Mp8+Yh1uk3MOj8DABOCNP5E3LbMuCEQ=";
|
||||
bunOfflineCache = fetchBunDeps {
|
||||
bunLock = finalAttrs.src + "/bun.lock";
|
||||
hash = "sha256-8R+LzgqAiqRGCMDBw2R7QO6hbdNrtIwzSjR3A8xhfVw=";
|
||||
};
|
||||
|
||||
bunBuildScript = "packages/api/build.ts";
|
||||
|
||||
nativeBuildInputs = [
|
||||
pnpm
|
||||
pnpm.configHook
|
||||
bun
|
||||
nodejs
|
||||
makeWrapper
|
||||
bunConfigHook
|
||||
bunInstallHook
|
||||
bunBuildHook
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
vips
|
||||
];
|
||||
|
||||
buildPhase = ''
|
||||
runHook preBuild
|
||||
|
||||
bun run packages/api/build.ts
|
||||
|
||||
runHook postBuild
|
||||
'';
|
||||
|
||||
entrypointPath = "packages/api/index.js";
|
||||
|
||||
installPhase = let
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue