Skip to content

Commit e53cb5b

Browse files
committed
Add nix installation
1 parent ab4d1f0 commit e53cb5b

File tree

3 files changed

+28
-0
lines changed

3 files changed

+28
-0
lines changed

docker/debian/Dockerfile

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ pkgs+=(binutils-gold) # Required build tool.
4646
pkgs+=(curl) # Dependency for tools requiring downloading data.
4747
pkgs+=(dpkg-dev) # Required packaging tool.
4848
pkgs+=(debhelper) # Required packaging tool.
49+
pkgs+=(xz-utils) # Required to install nix
4950
pkgs+=(file) # Required packaging tool.
5051
pkgs+=(git) # Required build tool.
5152
pkgs+=(gpg) # Dependency for tools requiring signing or encrypting/decrypting.
@@ -191,6 +192,14 @@ rm -rf ccache-${CCACHE_VERSION}
191192
ccache --version
192193
EOF
193194

195+
# Install nix
196+
RUN <<EOF
197+
sh <(curl --proto '=https' --tlsv1.2 -L https://nixos.org/nix/install) --daemon
198+
199+
# Verify the installation. Should be run from a new shell.
200+
bash -c 'nix --version'
201+
EOF
202+
194203
# Set the Conan home directory, so the users of this image can find the default
195204
# profile.
196205
ENV HOME=/root

docker/rhel/Dockerfile

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ pkgs+=(rpm-build) # Required packaging tool.
5656
pkgs+=(unzip) # Dependency for tools requiring unzipping files.
5757
pkgs+=(vim) # Text editor.
5858
pkgs+=(wget) # Required build tool.
59+
pkgs+=(curl) # Required to install nix
60+
pkgs+=(xz) # Required to install nix
5961
dnf update -y
6062
dnf install -y --allowerasing --setopt=tsflags=nodocs "${pkgs[@]}"
6163
dnf clean -y all
@@ -306,6 +308,14 @@ rm -rf ccache-${CCACHE_VERSION}
306308
ccache --version
307309
EOF
308310

311+
# Install nix
312+
RUN <<EOF
313+
sh <(curl --proto '=https' --tlsv1.2 -L https://nixos.org/nix/install) --daemon
314+
315+
# Verify the installation. Should be run from a new shell.
316+
bash -c 'nix --version'
317+
EOF
318+
309319
# Set the Conan home directory, so the users of this image can find the default
310320
# profile.
311321
ENV HOME=/root

docker/ubuntu/Dockerfile

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ pkgs+=(ca-certificates) # Enable TLS verification for HTTPS connections by provi
2929
pkgs+=(binutils-gold) # Required build tool.
3030
pkgs+=(curl) # Dependency for tools requiring downloading data.
3131
pkgs+=(dpkg-dev) # Required packaging tool.
32+
pkgs+=(xz-utils) # Required to install nix
3233
pkgs+=(file) # Required packaging tool.
3334
pkgs+=(git) # Required build tool.
3435
pkgs+=(gpg) # Dependency for tools requiring signing or encrypting/decrypting.
@@ -164,6 +165,14 @@ rm -rf ccache-${CCACHE_VERSION}
164165
ccache --version
165166
EOF
166167

168+
# Install nix
169+
RUN <<EOF
170+
sh <(curl --proto '=https' --tlsv1.2 -L https://nixos.org/nix/install) --daemon
171+
172+
# Verify the installation. Should be run from a new shell.
173+
bash -c 'nix --version'
174+
EOF
175+
167176
# Set the Conan home directory, so the users of this image can find the default
168177
# profile.
169178
ENV HOME=/root

0 commit comments

Comments
 (0)