From 1033fffca6c340b18e6cf1d319da6624a516f2a9 Mon Sep 17 00:00:00 2001 From: Paulo Casaretto Date: Wed, 18 Feb 2026 10:22:32 -0300 Subject: [PATCH] fix: add python3 and cctools to nix build dependencies node-gyp needs python3 to compile better-sqlite3, and on macOS it also needs libtool from cctools to create static libraries. Without these, `nix build` fails in the sandbox. --- flake.nix | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index 0d8db982..f3a1fc15 100644 --- a/flake.nix +++ b/flake.nix @@ -24,7 +24,13 @@ src = ./.; - nativeBuildInputs = [ pkgs.bun pkgs.makeWrapper ]; + nativeBuildInputs = [ + pkgs.bun + pkgs.makeWrapper + pkgs.python3 # needed by node-gyp to compile better-sqlite3 + ] ++ pkgs.lib.optionals pkgs.stdenv.hostPlatform.isDarwin [ + pkgs.darwin.cctools # provides libtool needed by node-gyp on macOS + ]; buildInputs = [ pkgs.sqlite ];