Skip to content
This repository has been archived by the owner on Jul 18, 2024. It is now read-only.

Commit

Permalink
fix devcontainer.
Browse files Browse the repository at this point in the history
  • Loading branch information
m1k1o committed Aug 17, 2023
1 parent ea5517b commit 25a6586
Showing 1 changed file with 26 additions and 20 deletions.
46 changes: 26 additions & 20 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,31 +1,36 @@
#
# Stage 0: Build xserver-xorg-video-dummy 0.3.8-2 with RandR support.
# Stage 0: Build xorg dependencies.
#
FROM debian:bullseye-slim as xserver-xorg-video-dummy

WORKDIR /usr/local/src
FROM debian:bullseye-slim as xorg-deps

ENV DEBIAN_FRONTEND=noninteractive

RUN set -eux; \
cp /etc/apt/sources.list /etc/apt/sources.list~; \
sed -Ei 's/^deb /deb-src /' /etc/apt/sources.list; \
cat /etc/apt/sources.list~ >> /etc/apt/sources.list; \
apt-get update; \
apt-get install -y dpkg-dev git; \
apt-get build-dep -y xserver-xorg-video-dummy; \
git clone --depth 1 --branch xserver-xorg-video-dummy-1_0.3.8-2 https://salsa.debian.org/xorg-team/driver/xserver-xorg-video-dummy; \
#
# clean up
apt-get clean -y; \
rm -rf /var/lib/apt/lists/* /var/cache/apt/*
apt-get install -y \
git gcc pkgconf autoconf automake libtool make xorg-dev xutils-dev \
&& rm -rf /var/lib/apt/lists/*;

WORKDIR /xorg

COPY runtime/xdummy-randr.patch /tmp/xdummy-randr.patch
COPY xorg/ /xorg/

# build xserver-xorg-video-dummy 0.3.8-2 with RandR support.
RUN set -eux; \
cd xf86-video-dummy; \
git clone --depth 1 --branch xserver-xorg-video-dummy-1_0.3.8-2 https://salsa.debian.org/xorg-team/driver/xserver-xorg-video-dummy; \
cd xserver-xorg-video-dummy; \
patch -p1 < /tmp/xdummy-randr.patch; \
bash ./autogen.sh; \
make; \
patch -p1 < ../xdummy-randr.patch; \
./autogen.sh; \
make -j$(nproc); \
make install;

# build custom input driver
RUN set -eux; \
cd xf86-input-neko; \
./autogen.sh --prefix=/usr; \
./configure; \
make -j$(nproc); \
make install;

# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.166.0/containers/go/.devcontainer/base.Dockerfile
Expand Down Expand Up @@ -112,8 +117,9 @@ RUN set -eux; \
# Indian fonts
fonts-indic;

# replace version
COPY --from=xserver-xorg-video-dummy /usr/local/lib/xorg/modules/drivers/dummy_drv.so /usr/lib/xorg/modules/drivers/dummy_drv.so
# copy dependencies from previous stage
COPY --from=xorg-deps /usr/local/lib/xorg/modules/drivers/dummy_drv.so /usr/lib/xorg/modules/drivers/dummy_drv.so
COPY --from=xorg-deps /usr/local/lib/xorg/modules/input/neko_drv.so /usr/lib/xorg/modules/input/neko_drv.so

# copy runtime files
COPY runtime/dbus /usr/bin/dbus
Expand Down

0 comments on commit 25a6586

Please sign in to comment.