Skip to content

Instantly share code, notes, and snippets.

@cedws
Last active March 2, 2019 12:02
Show Gist options
  • Save cedws/24ea239084f7d68f7528bde341f8a4f1 to your computer and use it in GitHub Desktop.
Save cedws/24ea239084f7d68f7528bde341f8a4f1 to your computer and use it in GitHub Desktop.
# This Dockerfile is not pure and should not be used as anything other than a reference.
# You can build an image by running `docker build -t sway -f fedora29 .`
FROM fedora:29
# Install build dependencies.
RUN dnf install -y git gcc meson ninja-build
# Install dependencies.
RUN dnf install -y wayland-devel wayland-protocols-devel mesa-libEGL-devel mesa-libGLES-devel libdrm-devel libgbm-devel libxkbcommon-devel libudev-devel pixman-devel libinput-devel libevdev-devel systemd-devel cairo-devel libpcap-devel json-c-devel pam-devel pango-devel pcre-devel gdk-pixbuf2-devel
# Drivers, may be needed.
RUN dnf install -y mesa-dri-drivers
RUN git clone https://github.com/swaywm/wlroots /root/wlroots
WORKDIR /root/wlroots
# Build wlroots and install it to /usr/local/lib64/wlroots.
RUN meson build
RUN ninja -C build install
RUN git clone https://github.com/swaywm/sway /root/sway
WORKDIR /root/sway
# These environment variables are necessary to tell Meson and Sway where to find the wlroots shared object.
# You should add both of these to your .bashrc and prepend `export` to each one.
# Be sure they are set before you run `meson build`
ARG PKG_CONFIG_PATH=/usr/local/lib64/pkgconfig
ARG LD_LIBRARY_PATH=/usr/local/lib64
# Build Sway and install it to /usr/local/bin.
RUN meson build
RUN ninja -C build install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment