diff --git a/packages/sqlite3/3.36.0/build.sh b/packages/sqlite3/3.36.0/build.sh deleted file mode 100755 index 18d5b8f..0000000 --- a/packages/sqlite3/3.36.0/build.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash -PREFIX=$(realpath $(dirname $0)) - -curl https://www.sqlite.org/2021/sqlite-amalgamation-3360000.zip -o sqlite.zip -unzip -q sqlite.zip -rm -rf sqlite.zip - -gcc -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION sqlite-amalgamation-3360000/shell.c sqlite-amalgamation-3360000/sqlite3.c -o sqlite3 - -rm -rf sqlite-amalgamation-3360000 diff --git a/packages/sqlite3/3.36.0/environment b/packages/sqlite3/3.36.0/environment deleted file mode 100644 index 50242cc..0000000 --- a/packages/sqlite3/3.36.0/environment +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -export PATH=$PWD:$PATH diff --git a/packages/sqlite3/3.36.0/metadata.json b/packages/sqlite3/3.36.0/metadata.json deleted file mode 100644 index d531aaf..0000000 --- a/packages/sqlite3/3.36.0/metadata.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "language": "sqlite3", - "version": "3.36.0", - "aliases": ["sqlite", "sql"] -} diff --git a/packages/sqlite3/3.36.0/run b/packages/sqlite3/3.36.0/run deleted file mode 100644 index 8484f3d..0000000 --- a/packages/sqlite3/3.36.0/run +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -sqlite3 < "$1" diff --git a/packages/sqlite3/3.36.0/test.sql b/packages/sqlite3/3.36.0/test.sql deleted file mode 100644 index 3a3c57b..0000000 --- a/packages/sqlite3/3.36.0/test.sql +++ /dev/null @@ -1 +0,0 @@ -SELECT 'OK'; diff --git a/runtimes/default.nix b/runtimes/default.nix index 6aa3355..9e817a6 100644 --- a/runtimes/default.nix +++ b/runtimes/default.nix @@ -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; } diff --git a/runtimes/sqlite3.nix b/runtimes/sqlite3.nix new file mode 100644 index 0000000..5fc105a --- /dev/null +++ b/runtimes/sqlite3.nix @@ -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"; + }) + ]; +} \ No newline at end of file