Back to feed

sledtools/pika branch #140

pika-git-tar-path

infra: add tar tools to pika-git runtime

Target branch: master

Merge Commit: 200f620cdbb0b0efc9a3a983580c7af5b57f3b63

branch: merged tutorial: ready ci: success
Open CI Details

Continuous Integration

CI: success

Compact status on the review page, with full logs on the CI page.

Open CI Details

Latest run #176 success

head e601b0a0038297dabe5d4340ec5fc0020a46c712 · queued 2026-03-27 01:30:39 · 0 lane(s)

queued 0s

No lanes were selected for this branch head.

Summary

This branch adds gnutar and gzip to the pika-git runtime environment defined in the Nix module. These two packages provide the tar and gzip command-line tools, which were previously unavailable inside the pika-git service container. Adding them ensures that tar archive creation, extraction, and gzip compression operations can be performed within the runtime without relying on external tooling or ad-hoc workarounds.

Tutorial Steps

Add tar and gzip packages to the pika-git Nix runtime

Intent: Make `tar` (GNU tar) and `gzip` available as runtime dependencies of the pika-git service so that archive and compression operations can be performed inside its environment.

Affected files: infra/nix/modules/pika-git.nix

Evidence
@@ -129,6 +129,8 @@ in
       pkgs.claude-code
       pkgs.curl
       pkgs.git
+      pkgs.gnutar
+      pkgs.gzip
       pkgs.just
       pkgs.nix
       pkgs.openssh

What changed

Two new packages — pkgs.gnutar and pkgs.gzip — are added to the runtime package list in infra/nix/modules/pika-git.nix (lines 132–133).

Why it matters

The pika-git runtime is a controlled Nix environment where only explicitly listed packages are available. Without gnutar and gzip, any workflow that needs to create or extract .tar or .tar.gz archives (e.g., bundling repository snapshots, unpacking vendored dependencies, or working with release artifacts) would fail at runtime.

How it works

Nix modules declare their runtime dependencies as a list of packages. By appending pkgs.gnutar and pkgs.gzip to this list, the Nix build system ensures that the tar and gzip binaries are present on $PATH when the pika-git service starts.

# infra/nix/modules/pika-git.nix  (around line 129)
pkgs.claude-code
pkgs.curl
pkgs.git
pkgs.gnutar   # <-- NEW
pkgs.gzip      # <-- NEW
pkgs.just
pkgs.nix
pkgs.openssh

The entries are inserted in alphabetical order, consistent with the existing style of the package list.

Verification

After rebuilding the Nix environment you can confirm availability:

which tar    # should resolve to the Nix store path for gnutar
which gzip   # should resolve to the Nix store path for gzip
tar --version
gzip --version

Diff