FROM archlinux:latest

RUN curl --location --output /usr/bin/release-cli "https://gitlab.com/api/v4/projects/gitlab-org%2Frelease-cli/packages/generic/release-cli/latest/release-cli-linux-amd64" && \
    chmod +x /usr/bin/release-cli && \
    pacman -Syyuu gcc git python llvm clang rustup npm pre-commit pkgconf --noconfirm --needed && \
    rustup default stable && \
    rustup update && \
    touch /root/.bashrc && \
    cargo install just && \
    echo "export PATH=\"$PATH:$HOME/.cargo/bin\"" | tee -a "$HOME/.bashrc"

ENV PATH=/root/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

RUN git clone https://gitlab.com/byacrates/nishikaze.git && \
    cd nishikaze && \
    just init && \
    cd .. && \
    rm -rf nishikaze

RUN curl -Os https://uploader.codecov.io/latest/linux/codecov && \
    chmod +x ./codecov && \
    mv ./codecov /usr/bin/codecov

CMD ["bash"]
