From db783c4225c2568080cb45df5a8357c0e79804c0 Mon Sep 17 00:00:00 2001 From: Arunavo Ray Date: Fri, 6 Mar 2026 09:41:22 +0530 Subject: [PATCH] nix: reduce bun install CI stalls --- .github/workflows/nix-build.yml | 2 +- flake.nix | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/.github/workflows/nix-build.yml b/.github/workflows/nix-build.yml index 22c5e41..05a7b72 100644 --- a/.github/workflows/nix-build.yml +++ b/.github/workflows/nix-build.yml @@ -24,7 +24,7 @@ permissions: jobs: check: runs-on: ubuntu-latest - timeout-minutes: 25 + timeout-minutes: 45 steps: - uses: actions/checkout@v4 diff --git a/flake.nix b/flake.nix index 27e79bf..3eabb81 100644 --- a/flake.nix +++ b/flake.nix @@ -49,6 +49,20 @@ bunNix = ./bun.nix; }; + # bun2nix defaults to isolated installs on Linux, which can be + # very slow in CI for larger dependency trees and may appear stuck. + # Use hoisted linker and fail fast on lockfile drift. + bunInstallFlags = if pkgs.stdenv.hostPlatform.isDarwin then [ + "--linker=hoisted" + "--backend=copyfile" + "--frozen-lockfile" + "--no-progress" + ] else [ + "--linker=hoisted" + "--frozen-lockfile" + "--no-progress" + ]; + # Let the bun2nix hook handle dependency installation via the # pre-fetched cache, but skip its default build/check/install # phases since we have custom ones.