Skip to content

Add devenv.sh feature - #89

Merged
sebst merged 5 commits into
mainfrom
copilot/add-devenv-script
Mar 16, 2026
Merged

sebst merged 5 commits into
mainfrom
copilot/add-devenv-script

Conversation

Copilot AI commented Mar 16, 2026 •

Copy link
Copy Markdown
Contributor

Adds a devcontainer feature for devenv.sh — a Nix-based developer environment manager by Cachix.

Changes

  • src/devenv.sh/devcontainer-feature.json — feature metadata with version option (default: latest)
  • src/devenv.sh/install.sh — installs devenv via Nix: installs the Nix package manager if not already present (using the Determinate Systems installer, same approach as the nixos.org feature), starts the Nix daemon, then installs devenv from the devenv.cachix.org binary cache via nix profile install github:cachix/devenv[/v{version}]#devenv; supports both latest and specific version tags (e.g. 2.0.4); symlinks the devenv binary to /usr/local/bin/devenv
  • src/devenv.sh/README.md — auto-generated format documentation
  • test/devenv.sh/test.sh — verifies binary is installed and functional
  • .github/workflows/test.yaml — added devenv.sh to both the test-autogenerated and test-scenarios CI matrices

Usage

"features": {
    "ghcr.io/devcontainer-community/devcontainer-features/devenv.sh:1": {}
}
Original prompt

This section details on the original issue you should resolve

<issue_title>Add feature devenv.sh</issue_title>
<issue_description></issue_description>

Comments on the Issue (you are @copilot in this section)


🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

Co-authored-by: sebst <592313+sebst@users.noreply.github.com>
Copilot AI changed the title [WIP] Add feature devenv.sh Add devenv.sh feature Mar 16, 2026
Copilot AI requested a review from sebst March 16, 2026 15:00
@sebst

sebst commented Mar 16, 2026

Copy link
Copy Markdown
Member

@copilot New features need to be added to .github/workflows/test.yaml

Co-authored-by: sebst <592313+sebst@users.noreply.github.com>

Copilot AI commented Mar 16, 2026

Copy link
Copy Markdown
Contributor Author

@copilot New features need to be added to .github/workflows/test.yaml

Added devenv.sh to both the test-autogenerated and test-scenarios matrices in .github/workflows/test.yaml (commit 6fd902c).

@sebst
sebst marked this pull request as ready for review March 16, 2026 15:36

@sebst sebst left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tests are failing

@sebst sebst left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tests are still failing:

[2026-03-16T15:32:38.968Z] ERROR: failed to build: failed to solve: process "/bin/sh -c cp -ar /tmp/build-features-src/devenv.sh_0 /tmp/dev-container-features && chmod -R 0755 /tmp/dev-container-features/devenv.sh_0 && cd /tmp/dev-container-features/devenv.sh_0 && chmod +x ./devcontainer-features-install.sh && ./devcontainer-features-install.sh && rm -rf /tmp/dev-container-features/devenv.sh_0" did not complete successfully: exit code: 1

…y download

Co-authored-by: sebst <592313+sebst@users.noreply.github.com>

Copilot AI commented Mar 16, 2026 •

Copy link
Copy Markdown
Contributor Author

tests are failing

The tests were failing because devenv doesn't publish standalone binary releases to GitHub — the download URL was always a 404. Fixed in commit 5aa30ae by rewriting install.sh to install devenv via Nix instead: it installs the Nix package manager (using the same Determinate Systems approach as the nixos.org feature), starts the Nix daemon, then installs devenv from the devenv.cachix.org binary cache via nix profile install github:cachix/devenv#devenv.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • devenv.sh
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node /home/REDACTED/work/_temp/ghcca-node/node/bin/node --enable-source-maps /home/REDACTED/work/_temp/copilot-developer-action-main/dist/index.js (dns block)
  • https://api.github.com/repos/cachix/devenv/releases/295917499/assets
    • Triggering command: /usr/bin/curl curl -s REDACTED (http block)
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node /home/REDACTED/work/_temp/ghcca-node/node/bin/node --enable-source-maps /home/REDACTED/work/_temp/copilot-developer-action-main/dist/index.js (http block)
  • https://api.github.com/repos/cachix/devenv/releases/tags/v1.3.1
    • Triggering command: /usr/bin/curl curl -s REDACTED (http block)

If you need me to access, download, or install something from one of these locations, you can either:

Co-authored-by: sebst <592313+sebst@users.noreply.github.com>

Copilot AI commented Mar 16, 2026

Copy link
Copy Markdown
Contributor Author

Tests are still failing:

...

The error shown is from the run before my fix — the new CI run (triggered by commit 5aa30ae, now 158bac0) shows action_required and hasn't run yet.

The root cause of the original failure: devenv doesn't publish standalone binary releases — the download URL was always a 404. I've replaced the entire approach: install.sh now installs Nix via the Determinate Systems installer (same as the nixos.org feature), starts the nix-daemon, then installs devenv from the devenv.cachix.org binary cache via nix profile install github:cachix/devenv#devenv, and symlinks the result to /usr/local/bin/devenv.

@sebst
sebst merged commit 105999b into main Mar 16, 2026
107 of 109 checks passed
@sebst
sebst deleted the copilot/add-devenv-script branch March 16, 2026 16:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add feature devenv.sh

2 participants