From 2fb4a91186296e2a713d50ebb8f9578d75fac0fd Mon Sep 17 00:00:00 2001 From: Max Howell Date: Thu, 8 Feb 2024 10:19:49 -0500 Subject: [PATCH] +scriptisto (#5153) --- .../igor-petruk/scriptisto/package.yml | 44 +++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 projects/github.com/igor-petruk/scriptisto/package.yml diff --git a/projects/github.com/igor-petruk/scriptisto/package.yml b/projects/github.com/igor-petruk/scriptisto/package.yml new file mode 100644 index 00000000..e0d594b2 --- /dev/null +++ b/projects/github.com/igor-petruk/scriptisto/package.yml @@ -0,0 +1,44 @@ +distributable: + url: https://github.com/igor-petruk/scriptisto/archive/refs/tags/{{version.tag}}.tar.gz + strip-components: 1 + +display-name: Scriptisto + +versions: + github: igor-petruk/scriptisto + +build: + dependencies: + rust-lang.org: ^1.75 + rust-lang.org/cargo: ^0.76 + script: + cargo install --path . --root {{prefix}} + # ^^ --locked doesn’t work currently + +provides: + - bin/scriptisto + +test: + dependencies: + linux: + llvm.org: '*' + gnome.org/glib: ^2.79 + script: + - run: | + scriptisto $FIXTURE | grep 'Current user: ' + fixture: | + #!/usr/bin/env scriptisto + + #include + #include + + // scriptisto-begin + // script_src: main.c + // build_cmd: clang -O2 main.c `pkg-config --libs --cflags glib-2.0` -o ./script + // scriptisto-end + + int main(int argc, char *argv[]) { + gchar* user = g_getenv("USER"); + printf("Hello, C! Current user: %s\n", user); + return 0; + }