Skip to content

Commit c17ecb7

Browse files
authored
Merge pull request #6 from paulrbr-fl/upgrade-nix
Upgrade: nix to latest v2.3.1 and upgrade channel to stable 19.09
2 parents 9b801ac + 788f0fc commit c17ecb7

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

alpine/Dockerfile

+5-5
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22
FROM alpine
33

44
ARG NIX_VERSION
5-
ENV NIX_VERSION ${NIX_VERSION:-2.2.1}
5+
ENV NIX_VERSION ${NIX_VERSION:-2.3.1}
66
ARG LANG
77
ENV LANG ${LANG:-"en_US.UTF-8"}
88

99
RUN addgroup -g 30000 -S nixbld \
1010
&& for i in $(seq 1 30); do adduser -S -D -h /var/empty -g "Nix build user $i" -u $((30000 + i)) -G nixbld nixbld$i ; done \
1111
&& adduser -D nixuser \
1212
&& mkdir -m 0755 /nix && chown nixuser /nix \
13-
&& apk add --no-cache bash \
13+
&& apk add --no-cache bash xz \
1414
&& rm -rf /var/cache/apk/* \
1515
# sandboxing enabled by default since 2.2
1616
&& mkdir -p /etc/nix && echo 'sandbox = false' > /etc/nix/nix.conf
@@ -19,8 +19,8 @@ USER nixuser
1919
ENV USER=nixuser
2020
ENV HOME="/home/nixuser"
2121

22-
RUN cd && wget https://nixos.org/releases/nix/nix-$NIX_VERSION/nix-$NIX_VERSION-x86_64-linux.tar.bz2 \
23-
&& tar xjf nix-*-x86_64-linux.tar.bz2 \
22+
RUN cd && wget https://nixos.org/releases/nix/nix-$NIX_VERSION/nix-$NIX_VERSION-x86_64-linux.tar.xz \
23+
&& tar xJf nix-*-x86_64-linux.tar.xz \
2424
&& ~/nix-*-x86_64-linux/install \
2525
&& rm -rf ~/nix-*-*
2626

@@ -29,7 +29,7 @@ RUN echo ". ${ENV}" >> ${HOME}/.profile
2929
# All subsequent "RUN" will use a login shell
3030
SHELL ["/usr/bin/env", "bash", "-l", "-c"]
3131

32-
RUN nix-channel --add https://nixos.org/channels/nixpkgs-19.03-darwin nixpkgs \
32+
RUN nix-channel --add https://nixos.org/channels/nixpkgs-19.09-darwin nixpkgs \
3333
&& nix-channel --add https://nixos.org/channels/nixpkgs-unstable unstable \
3434
&& nix-channel --update
3535

debian/Dockerfile

+5-5
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22
FROM debian:stable-slim
33

44
ARG NIX_VERSION
5-
ENV NIX_VERSION ${NIX_VERSION:-2.2.1}
5+
ENV NIX_VERSION ${NIX_VERSION:-2.3.1}
66
ARG LANG
77
ENV LANG ${LANG:-"en_US.UTF-8"}
88

99
RUN addgroup --gid 30000 --system nixbld \
1010
&& for i in $(seq 1 30); do adduser --system --disabled-password --home /var/empty --gecos "Nix build user $i" --uid $((30000 + i)) --ingroup nixbld nixbld$i ; done \
1111
&& adduser --disabled-password nixuser \
1212
&& mkdir -m 0755 /nix && chown nixuser /nix \
13-
&& apt update && apt install -y wget bzip2 \
13+
&& apt update && apt install -y wget xz-utils \
1414
&& apt clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \
1515
# sandboxing enabled by default since 2.2
1616
&& mkdir -p /etc/nix && echo 'sandbox = false' > /etc/nix/nix.conf
@@ -19,8 +19,8 @@ USER nixuser
1919
ENV USER=nixuser
2020
ENV HOME="/home/nixuser"
2121

22-
RUN cd && wget https://nixos.org/releases/nix/nix-$NIX_VERSION/nix-$NIX_VERSION-x86_64-linux.tar.bz2 \
23-
&& tar xjf nix-*-x86_64-linux.tar.bz2 \
22+
RUN cd && wget https://nixos.org/releases/nix/nix-$NIX_VERSION/nix-$NIX_VERSION-x86_64-linux.tar.xz \
23+
&& tar xJf nix-*-x86_64-linux.tar.xz \
2424
&& ~/nix-*-x86_64-linux/install \
2525
&& rm -rf ~/nix-*-*
2626

@@ -29,7 +29,7 @@ RUN echo ". ${ENV}" >> ${HOME}/.profile
2929
# All subsequent "RUN" will use a login shell
3030
SHELL ["/usr/bin/env", "bash", "-l", "-c"]
3131

32-
RUN nix-channel --add https://nixos.org/channels/nixpkgs-19.03-darwin nixpkgs \
32+
RUN nix-channel --add https://nixos.org/channels/nixpkgs-19.09-darwin nixpkgs \
3333
&& nix-channel --add https://nixos.org/channels/nixpkgs-unstable unstable \
3434
&& nix-channel --update
3535

0 commit comments

Comments
 (0)