FROM archlinux:latest

# Install archiso and build dependencies
RUN pacman -Syu --noconfirm \
    archiso \
    base-devel \
    git \
    libx11 \
    libxft \
    libxfixes \
    dbus \
    libpng \
    feh \
    picom \
    libpam \
    ttf-dejavu \
    xorg-server \
    xorg-xinit \
    xterm \
    notify-send-py \
 && pacman -Scc --noconfirm

WORKDIR /build
COPY . /build/orionos

# Build OrionOS components
RUN cd /build/orionos && make && make install

# Copy archiso profile and build the ISO
RUN cp -r /build/orionos/iso/profile /tmp/orionos-profile
RUN mkarchiso -v -w /tmp/iso-work -o /output /tmp/orionos-profile

CMD ["/bin/bash"]
