-
Notifications
You must be signed in to change notification settings - Fork 3
/
nix.dockerfile
51 lines (43 loc) · 1.2 KB
/
nix.dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
FROM rust:latest
ENV TMUX_VERSION 3.1
WORKDIR /usr/src
# This is a dummy build to get the dependencies cached
COPY . .
RUN cargo fetch --target x86_64-unknown-linux-gnu; \
cargo build; \
rm -rf ./*
RUN apt-get update; \
apt-get install -y --no-install-recommends \
automake \
bison \
byacc \
git \
libevent-dev \
libncurses-dev \
locales \
pkg-config; \
apt-get remove tmux
RUN git clone --depth=1 --branch $TMUX_VERSION https://github.com/tmux/tmux.git /opt/tmux && \
cd /opt/tmux && \
git checkout $TMUX_VERSION && \
sh autogen.sh && \
./configure --prefix=/opt/tmux && make && make install
RUN sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && \
locale-gen
ENV PATH=$PATH:/opt/tmux/bin \
LANG=en_US.UTF-8 \
LANGUAGE=en_US:en \
LC_ALL=en_US.UTF-8
RUN apt-get remove \
automake \
bison \
byacc \
git \
libevent-dev \
libncurses-dev \
locales \
pkg-config; \
rm -rf /var/lib/apt/lists/*;
RUN rustup component add rustfmt; \
cargo install clog-cli
# RUN rustup component add clippy --toolchain=nightly || cargo install --git https://github.com/rust-lang/rust-clippy/ --force clippy