Skip to content

Commit 843f2b3

Browse files
committed
Clean up dev setup script, disable zig build
1 parent 502388c commit 843f2b3

File tree

1 file changed

+55
-44
lines changed

1 file changed

+55
-44
lines changed

alpine/root/setup-dev.sh

Lines changed: 55 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -5,24 +5,50 @@ set -x
55

66
cwd=$(pwd)
77

8-
doas apk add ccache git
8+
doas apk add docs git texinfo
9+
10+
## go
11+
doas apk add go
12+
echo 'export PATH="$PATH:$HOME/go/bin"' >>~/.profile
13+
14+
## rust
15+
doas apk add rustup
16+
rustup-init -y
17+
# echo 'export PATH="$HOME/.cargo/bin:$PATH"' >>~/.profile
18+
19+
## ccache/sccache
20+
doas apk add ccache sccache
21+
922
echo 'export PATH="/usr/lib/ccache/bin:$PATH"' >>~/.profile
23+
echo 'export RUSTC_WRAPPER=/usr/bin/sccache' >>~/.profile
24+
1025
. ~/.profile
1126

12-
# neovim build deps
13-
doas apk add build-base cmake coreutils curl unzip gettext-tiny-dev
27+
cargo install fd-find ripgrep
28+
go install github.com/dundee/gdu/v5/cmd/gdu@latest
1429

30+
## dev src
1531
trap "cd $cwd" EXIT
1632
mkdir -p ~/.local/src
1733
cd ~/.local/src
1834

35+
## alpine
36+
doas apk add alpine-sdk
37+
# git clone git://git.alpinelinux.org/abuild
38+
# git clone git://git.alpinelinux.org/aports
39+
git clone --depth 1 https://git.alpinelinux.org/abuild
40+
git clone --depth 1 https://git.alpinelinux.org/aports
41+
42+
## neovim
43+
doas apk add build-base cmake coreutils curl unzip gettext-tiny-dev
44+
1945
git clone --depth 1 https://github.com/neovim/neovim
2046
cd neovim
2147
make CMAKE_BUILD_TYPE=Release
2248
doas make install
2349
cd ..
2450

25-
# tmux build deps
51+
## tmux
2652
doas apk add autoconf automake bison libevent-dev ncurses-dev
2753

2854
git clone --depth 1 https://github.com/tmux/tmux
@@ -32,13 +58,7 @@ sh autogen.sh
3258
doas make install
3359
cd ..
3460

35-
doas apk add rustup sccache
36-
rustup-init -y
37-
echo 'RUSTC_WRAPPER=/usr/bin/sccache' >>~/.profile
38-
. ~/.profile
39-
40-
cargo install fd-find ripgrep
41-
61+
## fish
4262
git clone --depth 1 https://github.com/fish-shell/fish-shell
4363
cd fish-shell
4464
mkdir build
@@ -48,36 +68,27 @@ make
4868
doas make install
4969
cd ../..
5070

51-
doas apk add go
52-
53-
go install github.com/dundee/gdu/v5/cmd/gdu@latest
54-
55-
doas apk add samurai # ninja alternative
56-
57-
arch=native
58-
os=linux
59-
abi=musl
60-
cpu=native
61-
target=$arch-$os-$abi
62-
63-
git clone --depth 1 https://github.com/ziglang/zig-bootstrap
64-
cd zig-bootstrap
65-
zig_bootstrap_dir=$(pwd)
66-
CMAKE_GENERATOR=Ninja ./build $target $cpu
67-
cd ..
68-
69-
export ZIG_PREFIX=$zig_bootstrap_dir/out/zig-$target-$cpu
70-
export LLVM_PREFIX=$zig_bootstrap_dir/out/$target-$cpu
71-
72-
git clone --depth 1 https://github.com/ziglang/zig
73-
cd zig
74-
$ZIG_PREFIX/zig build -p stage3 --search-prefix $LLVM_PREFIX --zig-lib-dir lib -Dstatic-llvm
75-
cd ..
76-
77-
doas apk add alpine-sdk
78-
# git clone git://git.alpinelinux.org/abuild
79-
git clone --depth 1 https://git.alpinelinux.org/abuild
80-
# git clone git://git.alpinelinux.org/aports
81-
git clone --depth 1 https://git.alpinelinux.org/aports
82-
83-
doas apk add docs texinfo
71+
## zig
72+
doas apk add zig
73+
74+
# doas apk add samurai # ninja alternative
75+
#
76+
# arch=native
77+
# os=linux
78+
# abi=musl
79+
# cpu=native
80+
# target=$arch-$os-$abi
81+
#
82+
# git clone --depth 1 https://github.com/ziglang/zig-bootstrap
83+
# cd zig-bootstrap
84+
# zig_bootstrap_dir=$(pwd)
85+
# CMAKE_GENERATOR=Ninja ./build $target $cpu
86+
# cd ..
87+
#
88+
# export ZIG_PREFIX=$zig_bootstrap_dir/out/zig-$target-$cpu
89+
# export LLVM_PREFIX=$zig_bootstrap_dir/out/$target-$cpu
90+
#
91+
# git clone --depth 1 https://github.com/ziglang/zig
92+
# cd zig
93+
# $ZIG_PREFIX/zig build -p stage3 --search-prefix $LLVM_PREFIX --zig-lib-dir lib -Dstatic-llvm
94+
# cd ..

0 commit comments

Comments
 (0)