File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -35,6 +35,7 @@ pkgs+=(python3-venv) # Python environment management tool.
3535pkgs+=(python3-pip) # Package manager for Python applications.
3636pkgs+=(wget) # Required build tool.
3737pkgs+=(vim) # Text editor.
38+ pkgs+=(xz-utils) # Required to install nix
3839apt-get update
3940apt-get install -y --no-install-recommends "${pkgs[@]}"
4041apt-get clean
@@ -54,6 +55,18 @@ FROM base AS pre-commit
5455# This is not inherited from base image.
5556ARG DEBIAN_FRONTEND=noninteractive
5657
58+ # Install nix
59+ RUN sh <(curl --proto '=https' --tlsv1.2 -L https://nixos.org/nix/install) --daemon --yes
60+
61+ # Add nix to PATH and set NIX environment variables so nix is available in all
62+ # shells including non-interactive shells (e.g., GitHub Actions).
63+ ENV PATH="/nix/var/nix/profiles/default/bin:${PATH}"
64+ ENV NIX_PROFILES="/nix/var/nix/profiles/default"
65+ ENV NIX_SSL_CERT_FILE="/nix/var/nix/profiles/default/etc/ssl/certs/ca-bundle.crt"
66+
67+ # Verify nix installation
68+ RUN nix --version
69+
5770# Install additional dependencies.
5871RUN <<EOF
5972apt-get update
You can’t perform that action at this time.
0 commit comments