mirror of
https://github.com/engineer-man/piston.git
synced 2025-06-08 03:06:26 +02:00
migrate sqlite3 to nix
This commit is contained in:
parent
f113b0c00a
commit
2758f95228
7 changed files with 31 additions and 21 deletions
|
@ -19,4 +19,5 @@ args: {
|
|||
"vlang" = import ./vlang.nix args;
|
||||
"swift" = import ./swift.nix args;
|
||||
"node-typescript" = import ./node-typescript.nix args;
|
||||
"sqlite3" = import ./sqlite3.nix args;
|
||||
}
|
||||
|
|
30
runtimes/sqlite3.nix
Normal file
30
runtimes/sqlite3.nix
Normal file
|
@ -0,0 +1,30 @@
|
|||
{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";
|
||||
})
|
||||
];
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue