From e4de4e8c6668f90ce5ad16af1b8f91668049b281 Mon Sep 17 00:00:00 2001 From: centra
Date: Tue, 9 Dec 2025 06:33:08 +0900 Subject: [PATCH] Fix R8: Use builtins.fetchGit for submodule workspaces - Added chainfireSrc, flaredbSrc, iamSrc with submodules=true - Updated chainfire-server, flaredb-server, iam-server to use fetched sources - Resolves T026.S1 blocker (nix build failures on submodule paths) Implements fix suggested by Foreman 000313 and PeerA 000314 --- flake.nix | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/flake.nix b/flake.nix index 6b12fd8..86b2bc3 100644 --- a/flake.nix +++ b/flake.nix @@ -31,6 +31,23 @@ inherit system overlays; }; + # Fetch submodule sources with their .git directories included + # This is necessary because chainfire, flaredb, and iam are git submodules + chainfireSrc = builtins.fetchGit { + url = ./chainfire; + submodules = true; + }; + + flaredbSrc = builtins.fetchGit { + url = ./flaredb; + submodules = true; + }; + + iamSrc = builtins.fetchGit { + url = ./iam; + submodules = true; + }; + # Rust toolchain configuration # Using stable channel with rust-src (for rust-analyzer) and rust-analyzer rustToolchain = pkgs.rust-bin.stable.latest.default.override { @@ -169,7 +186,7 @@ # -------------------------------------------------------------------- chainfire-server = buildRustWorkspace { name = "chainfire-server"; - workspaceDir = ./chainfire; + workspaceDir = chainfireSrc; mainCrate = "chainfire-server"; description = "Distributed key-value store with Raft consensus and gossip protocol"; }; @@ -179,7 +196,7 @@ # -------------------------------------------------------------------- flaredb-server = buildRustWorkspace { name = "flaredb-server"; - workspaceDir = ./flaredb; + workspaceDir = flaredbSrc; mainCrate = "flaredb-server"; description = "Distributed time-series database with Raft consensus for metrics and events"; }; @@ -189,7 +206,7 @@ # -------------------------------------------------------------------- iam-server = buildRustWorkspace { name = "iam-server"; - workspaceDir = ./iam; + workspaceDir = iamSrc; mainCrate = "iam-server"; description = "Identity and access management service with RBAC and multi-tenant support"; };