File tree Expand file tree Collapse file tree 3 files changed +30
-36
lines changed
Expand file tree Collapse file tree 3 files changed +30
-36
lines changed Original file line number Diff line number Diff line change @@ -97,6 +97,15 @@ ENV RUSTUP_HOME="/opt/rust/.rustup"
9797RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain=${RUST_VERSION}
9898ENV PATH="$CARGO_HOME/bin:$PATH"
9999
100+ # Install nix
101+ RUN sh <(curl --proto '=https' --tlsv1.2 -L https://nixos.org/nix/install) --daemon --yes
102+
103+ # Add nix to PATH and set NIX environment variables so nix is available in all
104+ # shells including non-interactive shells (e.g., GitHub Actions).
105+ ENV PATH="/nix/var/nix/profiles/default/bin:${PATH}"
106+ ENV NIX_PROFILES="/nix/var/nix/profiles/default"
107+ ENV NIX_SSL_CERT_FILE="/nix/var/nix/profiles/default/etc/ssl/certs/ca-bundle.crt"
108+
100109# Print versions.
101110RUN <<EOF
102111cmake --version
@@ -107,6 +116,7 @@ mold --version
107116python3 --version
108117rustc --version
109118cargo --version
119+ nix --version
110120EOF
111121
112122# ====================== GCC IMAGE ======================
@@ -192,18 +202,6 @@ rm -rf ccache-${CCACHE_VERSION}
192202ccache --version
193203EOF
194204
195- # Install nix
196- RUN sh <(curl --proto '=https' --tlsv1.2 -L https://nixos.org/nix/install) --daemon --yes
197-
198- # Add nix to PATH and set NIX environment variables so nix is available in all
199- # shells including non-interactive shells (e.g., GitHub Actions).
200- ENV PATH="/nix/var/nix/profiles/default/bin:${PATH}"
201- ENV NIX_PROFILES="/nix/var/nix/profiles/default"
202- ENV NIX_SSL_CERT_FILE="/nix/var/nix/profiles/default/etc/ssl/certs/ca-bundle.crt"
203-
204- # Verify the nix installation.
205- RUN nix --version
206-
207205# Set the Conan home directory, so the users of this image can find the default
208206# profile.
209207ENV HOME=/root
Original file line number Diff line number Diff line change @@ -109,6 +109,15 @@ ENV RUSTUP_HOME="/opt/rust/.rustup"
109109RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain=${RUST_VERSION}
110110ENV PATH="$CARGO_HOME/bin:$PATH"
111111
112+ # Install nix
113+ RUN sh <(curl --proto '=https' --tlsv1.2 -L https://nixos.org/nix/install) --daemon --yes
114+
115+ # Add nix to PATH and set NIX environment variables so nix is available in all
116+ # shells including non-interactive shells (e.g., GitHub Actions).
117+ ENV PATH="/nix/var/nix/profiles/default/bin:${PATH}"
118+ ENV NIX_PROFILES="/nix/var/nix/profiles/default"
119+ ENV NIX_SSL_CERT_FILE="/nix/var/nix/profiles/default/etc/ssl/certs/ca-bundle.crt"
120+
112121# Print versions.
113122RUN <<EOF
114123cmake --version
@@ -119,6 +128,7 @@ mold --version
119128python3 --version
120129rustc --version
121130cargo --version
131+ nix --version
122132EOF
123133
124134# ====================== GCC IMAGE ======================
@@ -308,18 +318,6 @@ rm -rf ccache-${CCACHE_VERSION}
308318ccache --version
309319EOF
310320
311- # Install nix
312- RUN sh <(curl --proto '=https' --tlsv1.2 -L https://nixos.org/nix/install) --daemon --yes
313-
314- # Add nix to PATH and set NIX environment variables so nix is available in all
315- # shells including non-interactive shells (e.g., GitHub Actions).
316- ENV PATH="/nix/var/nix/profiles/default/bin:${PATH}"
317- ENV NIX_PROFILES="/nix/var/nix/profiles/default"
318- ENV NIX_SSL_CERT_FILE="/nix/var/nix/profiles/default/etc/ssl/certs/ca-bundle.crt"
319-
320- # Verify the nix installation.
321- RUN nix --version
322-
323321# Set the Conan home directory, so the users of this image can find the default
324322# profile.
325323ENV HOME=/root
Original file line number Diff line number Diff line change @@ -80,6 +80,15 @@ ENV RUSTUP_HOME="/opt/rust/.rustup"
8080RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain=${RUST_VERSION}
8181ENV PATH="$CARGO_HOME/bin:$PATH"
8282
83+ # Install nix
84+ RUN sh <(curl --proto '=https' --tlsv1.2 -L https://nixos.org/nix/install) --daemon --yes
85+
86+ # Add nix to PATH and set NIX environment variables so nix is available in all
87+ # shells including non-interactive shells (e.g., GitHub Actions).
88+ ENV PATH="/nix/var/nix/profiles/default/bin:${PATH}"
89+ ENV NIX_PROFILES="/nix/var/nix/profiles/default"
90+ ENV NIX_SSL_CERT_FILE="/nix/var/nix/profiles/default/etc/ssl/certs/ca-bundle.crt"
91+
8392# Print versions.
8493RUN <<EOF
8594cmake --version
@@ -90,6 +99,7 @@ mold --version
9099python3 --version
91100rustc --version
92101cargo --version
102+ nix --version
93103EOF
94104
95105# ====================== GCC IMAGE ======================
@@ -165,18 +175,6 @@ rm -rf ccache-${CCACHE_VERSION}
165175ccache --version
166176EOF
167177
168- # Install nix
169- RUN sh <(curl --proto '=https' --tlsv1.2 -L https://nixos.org/nix/install) --daemon --yes
170-
171- # Add nix to PATH and set NIX environment variables so nix is available in all
172- # shells including non-interactive shells (e.g., GitHub Actions).
173- ENV PATH="/nix/var/nix/profiles/default/bin:${PATH}"
174- ENV NIX_PROFILES="/nix/var/nix/profiles/default"
175- ENV NIX_SSL_CERT_FILE="/nix/var/nix/profiles/default/etc/ssl/certs/ca-bundle.crt"
176-
177- # Verify the nix installation.
178- RUN nix --version
179-
180178# Set the Conan home directory, so the users of this image can find the default
181179# profile.
182180ENV HOME=/root
You can’t perform that action at this time.
0 commit comments