+scriptisto (#5153)

This commit is contained in:
Max Howell 2024-02-08 10:19:49 -05:00 committed by GitHub
parent 5c57a1ccb2
commit 2fb4a91186
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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 doesnt 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 <stdio.h>
#include <glib.h>
// 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;
}