-
Notifications
You must be signed in to change notification settings - Fork 73
/
build.envd
49 lines (47 loc) · 1.32 KB
/
build.envd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# syntax=v1
def build():
base(dev=True)
shell("zsh")
install.apt_packages(
name=[
"bison",
"build-essential",
"ccache",
"flex",
"gcc",
"git",
"gnupg",
"libreadline-dev",
"libssl-dev",
"libxml2-dev",
"libxml2-utils",
"libxslt-dev",
"lsb-release",
"pkg-config",
"tzdata",
"xsltproc",
"zlib1g-dev",
]
)
run(
commands=[
"echo 'deb http://apt.llvm.org/$(lsb_release -cs)/ llvm-toolchain-$(lsb_release -cs)-16 main' | sudo tee -a /etc/apt/sources.list",
"wget --quiet -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -",
"sudo apt-get update",
"sudo apt-get install -y clang-16",
]
)
runtime.environ(extra_path=["/home/envd/.cargo/bin"])
run(
commands=[
"curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y",
]
)
run(
commands=[
"export PGRX=$(grep -o \"pgrx = { version = \\\"=[^\\\"]*\" Cargo.toml | cut -d = -f 4)",
"cargo install cargo-pgrx --version $PGRX",
"cargo pgrx init",
],
mount_host=True,
)