2023-01-13 14:20:20 +03:00
|
|
|
distributable:
|
|
|
|
url: https://github.com/PRQL/prql/archive/refs/tags/{{ version }}.tar.gz
|
|
|
|
strip-components: 1
|
|
|
|
|
|
|
|
versions:
|
|
|
|
github: PRQL/prql/tags
|
|
|
|
|
|
|
|
build:
|
|
|
|
dependencies:
|
|
|
|
rust-lang.org/cargo: '*'
|
|
|
|
script: |
|
|
|
|
cd ./prql-compiler
|
2023-01-16 22:52:49 +03:00
|
|
|
cargo install --path . --root {{prefix}} --all-features
|
2023-01-13 14:20:20 +03:00
|
|
|
|
2023-01-16 22:52:49 +03:00
|
|
|
cd {{prefix}}/bin
|
|
|
|
|
|
|
|
# Bin got renamed; this is one way to keep ourselves working
|
|
|
|
if test {{version.major}} -eq 0 -a {{version.minor}} -lt 4; then
|
|
|
|
ln -s prql-compiler prqlc
|
|
|
|
else
|
|
|
|
ln -s prqlc prql-compiler
|
|
|
|
fi
|
|
|
|
|
|
|
|
test: |
|
|
|
|
if test {{version.major}} -eq 0 -a {{version.minor}} -lt 4; then
|
|
|
|
COMPILER=prql-compiler
|
|
|
|
else
|
|
|
|
COMPILER=prqlc
|
|
|
|
fi
|
|
|
|
echo "from employees | filter has_dog | select salary" | $COMPILER compile
|
2023-01-13 14:20:20 +03:00
|
|
|
|
|
|
|
provides:
|
2023-01-16 22:52:49 +03:00
|
|
|
- bin/prql-compiler
|
|
|
|
- bin/prqlc
|