Browse Source

Merge pull request #214 from pcasaretto/fix/nix-build-deps

Tobias Lütke 3 months ago
parent
commit
a815b52ede
1 changed files with 7 additions and 1 deletions
  1. 7 1
      flake.nix

+ 7 - 1
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 ];