piston/runtimes/sqlite.nix

29 lines
502 B
Nix
Raw Normal View History

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