From 38002019ea36604ce3ebe713103ee1e02e80a877 Mon Sep 17 00:00:00 2001 From: Arunavo Ray Date: Tue, 24 Mar 2026 08:20:26 +0530 Subject: [PATCH] fix: regenerate bun.nix in CI to prevent stale dependency errors The Nix build has been failing since v3.9.6 because bun.nix fell out of sync with bun.lock. During the sandboxed build bun install cannot fetch missing packages, causing ConnectionRefused errors. - Add bun2nix regeneration step before nix build in CI - Trigger workflow on bun.lock and package.json changes - Update flake.nix version from 3.9.6 to 3.14.1 --- .github/workflows/nix-build.yml | 7 +++++++ flake.nix | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/nix-build.yml b/.github/workflows/nix-build.yml index 89892be..ea2373e 100644 --- a/.github/workflows/nix-build.yml +++ b/.github/workflows/nix-build.yml @@ -9,6 +9,8 @@ on: - 'flake.nix' - 'flake.lock' - 'bun.nix' + - 'bun.lock' + - 'package.json' - '.github/workflows/nix-build.yml' pull_request: branches: [main] @@ -16,6 +18,8 @@ on: - 'flake.nix' - 'flake.lock' - 'bun.nix' + - 'bun.lock' + - 'package.json' - '.github/workflows/nix-build.yml' permissions: @@ -39,6 +43,9 @@ jobs: - name: Setup Nix Cache uses: DeterminateSystems/magic-nix-cache-action@main + - name: Regenerate bun.nix from bun.lock + run: nix run github:nix-community/bun2nix -- -o bun.nix --accept-flake-config + - name: Check flake run: nix flake check --accept-flake-config diff --git a/flake.nix b/flake.nix index 3eabb81..0fde486 100644 --- a/flake.nix +++ b/flake.nix @@ -31,7 +31,7 @@ # Build the application gitea-mirror = pkgs.stdenv.mkDerivation { pname = "gitea-mirror"; - version = "3.9.6"; + version = "3.14.1"; src = ./.;