From 1783338b2ac69d504743eba006f5e8203bad6580 Mon Sep 17 00:00:00 2001 From: h7x4 Date: Sat, 21 Feb 2026 00:49:53 +0900 Subject: [PATCH] nix/database_tool: fix building --- nix/database_tool.nix | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/nix/database_tool.nix b/nix/database_tool.nix index 0f840ea..3fffb74 100644 --- a/nix/database_tool.nix +++ b/nix/database_tool.nix @@ -9,6 +9,27 @@ buildDartApplication { dartEntryPoints."bin/jadb" = "bin/jadb.dart"; + # NOTE: the default dart hooks are using `dart compile`, which is not able to call the + # new dart build hooks required to use package:sqlite3 >= 3.0.0. So we override + # these phases to use `dart build` instead. + buildPhase = '' + runHook preBuild + + mkdir -p "$out/bin" + dart build cli --target "bin/jadb.dart" + + runHook postBuild + ''; + + installPhase = '' + runHook preInstall + + mkdir -p "$out" + mv build/cli/*/bundle/* "$out/" + + runHook postInstall + ''; + autoPubspecLock = ../pubspec.lock; meta.mainProgram = "jadb";