pantry/projects/github.com/igor-petruk/scriptisto/package.yml
2024-02-08 10:19:49 -05:00

45 lines
1,011 B
YAML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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;
}