piston/runtimes/sqlite3.nix

30 lines
520 B
Nix
Raw Normal View History

2022-02-06 22:07:13 +01:00
{pkgs, piston, ...}:
let
pkg = pkgs.sqlite;
in piston.mkRuntime {
language = "sqlite3";
version = pkg.version;
aliases = [
"sqlite"
"sql"
];
run = ''
${pkg}/bin/sqlite3 < "$1"
'';
tests = [
(piston.mkTest {
files = {
"test.sql" = ''
SELECT 'OK';
'';
};
args = [];
stdin = "";
packages = [];
main = "test.sql";
})
];
}