diff --git a/docker/debian/Dockerfile b/docker/debian/Dockerfile index 644f6dc..e2158d0 100644 --- a/docker/debian/Dockerfile +++ b/docker/debian/Dockerfile @@ -60,6 +60,7 @@ pkgs+=(python3-pip) # Package manager for Python applications. pkgs+=(unzip) # Dependency for tools requiring unzipping files. pkgs+=(vim) # Text editor. pkgs+=(wget) # Required build tool. +pkgs+=(xz-utils) # Required to install nix apt-get update apt-get install -y --no-install-recommends "${pkgs[@]}" apt-get clean @@ -96,6 +97,15 @@ ENV RUSTUP_HOME="/opt/rust/.rustup" RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain=${RUST_VERSION} ENV PATH="$CARGO_HOME/bin:$PATH" +# Install nix +RUN sh <(curl --proto '=https' --tlsv1.2 -L https://nixos.org/nix/install) --daemon --yes + +# Add nix to PATH and set NIX environment variables so nix is available in all +# shells including non-interactive shells (e.g., GitHub Actions). +ENV PATH="/nix/var/nix/profiles/default/bin:${PATH}" +ENV NIX_PROFILES="/nix/var/nix/profiles/default" +ENV NIX_SSL_CERT_FILE="/nix/var/nix/profiles/default/etc/ssl/certs/ca-bundle.crt" + # Print versions. RUN <