diff --git a/flake.nix b/flake.nix index 3f7eba5..548093e 100644 --- a/flake.nix +++ b/flake.nix @@ -93,9 +93,18 @@ ]; }; in { - inherit sqlite-example-exts-static; - sqlite-with-static-ext = sqlite-with-static-exts.sqlite; - sqlite-cli-with-static-ext = sqlite-with-static-exts.sqlite-cli; + checkExts = pkgs.runCommand "test-sqlite-with-static-exts" { + nativeBuildInputs = [ sqlite-with-static-exts.sqlite-cli ]; + + passthru = { + inherit sqlite-example-exts-static; + inherit sqlite-with-static-exts; + }; + } '' + mkdir -p "$out" + sqlite3 :memory: <<<"SELECT myadd(1, 2), mysub(5, 3), mymult(4, 6);" | tee "$out/test.log" + grep -q -F "3|2|24" "$out/test.log" || (echo "Unexpected output from sqlite3 with static extensions" && exit 1) + ''; }); }; }