FROM archlinux:latest RUN pacman-key --init && pacman-key --populate {% if unstable %} RUN sed -i '/^# after the header/a[kde-unstable]\nInclude = /etc/pacman.d/mirrorlist\n\n[core-testing]\nInclude = /etc/pacman.d/mirrorlist\n\n[extra-testing]\nInclude = /etc/pacman.d/mirrorlist' /etc/pacman.conf {% endif %} RUN pacman -Sy --noconfirm archlinux-keyring RUN pacman -Su --noconfirm \ git \ {% if webengine %} python-tox \ python-distlib \ {% endif %} {% if qt6 %} qt6-base \ qt6-declarative \ {% if webengine %} qt6-webengine python-pyqt6-webengine \ pdfjs \ {% else %}{{ 1/0 }}{% endif %} python-pyqt6 \ {% else %} qt5-base \ qt5-declarative \ openssl-1.1 \ {% if webengine %} qt5-webengine \ python-pyqtwebengine \ python-pyqt5 \ {% endif %} {% endif %} xorg-xinit \ xorg-server-xvfb \ ttf-bitstream-vera \ gcc \ libyaml \ xorg-xdpyinfo \ base-devel RUN useradd user -u 1001 && \ mkdir /home/user && \ chown user:users /home/user RUN echo 'user ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers # needed for makepkg {% if not webengine %} RUN pacman -U --noconfirm \ https://archive.archlinux.org/packages/q/qt5-webkit/qt5-webkit-5.212.0alpha4-18-x86_64.pkg.tar.zst \ https://archive.archlinux.org/packages/p/python-pyqt5/python-pyqt5-5.15.7-2-x86_64.pkg.tar.zst \ https://archive.archlinux.org/packages/i/icu/icu-72.1-2-x86_64.pkg.tar.zst \ https://archive.archlinux.org/packages/l/libxml2/libxml2-2.10.4-4-x86_64.pkg.tar.zst \ https://archive.archlinux.org/packages/l/libxslt/libxslt-1.1.42-2-x86_64.pkg.tar.zst \ https://archive.archlinux.org/packages/l/libarchive/libarchive-3.7.9-1-x86_64.pkg.tar.zst \ https://archive.archlinux.org/packages/q/qt5-base/qt5-base-5.15.10%2Bkde%2Br129-3-x86_64.pkg.tar.zst \ https://archive.archlinux.org/packages/q/qt5-declarative/qt5-declarative-5.15.10%2Bkde%2Br31-1-x86_64.pkg.tar.zst \ https://archive.archlinux.org/packages/q/qt5-translations/qt5-translations-5.15.10-1-any.pkg.tar.zst \ https://archive.archlinux.org/packages/q/qt5-sensors/qt5-sensors-5.15.10-1-x86_64.pkg.tar.zst \ https://archive.archlinux.org/packages/q/qt5-location/qt5-location-5.15.10%2Bkde%2Br5-1-x86_64.pkg.tar.zst \ https://archive.archlinux.org/packages/q/qt5-webchannel/qt5-webchannel-5.15.10%2Bkde%2Br3-1-x86_64.pkg.tar.zst USER user RUN cd ~ && \ git clone https://aur.archlinux.org/python310.git && \ cd python310 && \ makepkg -si --noconfirm USER root RUN python3.10 -m ensurepip RUN python3.10 -m pip install tox pyqt5-sip {% endif %} # Needed for running PyPI Qt builds USER user RUN cd ~ && \ git clone https://aur.archlinux.org/libxml2.13.git && \ cd libxml2.13 && \ makepkg -si --noconfirm USER root {% if qt6 %} {% set pyqt_module = 'PyQt6' %} {% else %} {% set pyqt_module = 'PyQt5' %} {% endif %} {% if webengine %} {% set python = 'python3' %} RUN {{ python }} -c "from {{ pyqt_module }} import QtWebEngineCore, QtWebEngineWidgets" {% else %} {% set python = 'python3.10' %} RUN {{ python }} -c "from {{ pyqt_module }} import QtWebKit, QtWebKitWidgets" {% endif %} USER user WORKDIR /home/user RUN git config --global --add safe.directory /outside/.git CMD git clone /outside qutebrowser.git && \ cd qutebrowser.git && \ {{ python }} -m tox -e {% if qt6 %}py-qt6{% else %}py-qt5{% endif %}