Files
jadb/nix/database_tool.nix
h7x4 1783338b2a
All checks were successful
Build database / evals (push) Successful in 10m47s
nix/database_tool: fix building
2026-02-21 00:49:53 +09:00

37 lines
745 B
Nix

{
src,
buildDartApplication,
}:
buildDartApplication {
pname = "jadb-database-tool";
version = "1.0.0";
inherit src;
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";
}