Skip to content

Commit 6e61e3e

Browse files
committed
Fix nix sourcing issue
1 parent 51210eb commit 6e61e3e

File tree

3 files changed

+18
-6
lines changed

3 files changed

+18
-6
lines changed

docker/debian/Dockerfile

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -196,8 +196,11 @@ EOF
196196
RUN <<EOF
197197
sh <(curl --proto '=https' --tlsv1.2 -L https://nixos.org/nix/install) --daemon --yes
198198

199-
# Verify the installation. Should be run from a new shell.
200-
bash -c 'nix --version'
199+
# Source the nix daemon script to make nix available in the current shell.
200+
. /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh
201+
202+
# Verify the installation.
203+
nix --version
201204
EOF
202205

203206
# Set the Conan home directory, so the users of this image can find the default
@@ -348,3 +351,4 @@ cd test && ./run.sh clang
348351
cd ..
349352
rm -rf test
350353
EOF
354+

docker/rhel/Dockerfile

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -312,8 +312,11 @@ EOF
312312
RUN <<EOF
313313
sh <(curl --proto '=https' --tlsv1.2 -L https://nixos.org/nix/install) --daemon --yes
314314

315-
# Verify the installation. Should be run from a new shell.
316-
bash -c 'nix --version'
315+
# Source the nix daemon script to make nix available in the current shell.
316+
. /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh
317+
318+
# Verify the installation.
319+
nix --version
317320
EOF
318321

319322
# Set the Conan home directory, so the users of this image can find the default
@@ -350,3 +353,4 @@ cd test && ./run.sh clang
350353
cd ..
351354
rm -rf test
352355
EOF
356+

docker/ubuntu/Dockerfile

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,8 +169,11 @@ EOF
169169
RUN <<EOF
170170
sh <(curl --proto '=https' --tlsv1.2 -L https://nixos.org/nix/install) --daemon --yes
171171

172-
# Verify the installation. Should be run from a new shell.
173-
bash -c 'nix --version'
172+
# Source the nix daemon script to make nix available in the current shell.
173+
. /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh
174+
175+
# Verify the installation.
176+
nix --version
174177
EOF
175178

176179
# Set the Conan home directory, so the users of this image can find the default
@@ -316,3 +319,4 @@ cd test && ./run.sh clang
316319
cd ..
317320
rm -rf test
318321
EOF
322+

0 commit comments

Comments
 (0)