`devbox shell` command fails on x86_64-darwin: "nixpkgs 26.11 has dropped support for x86_64-darwin"

Aberta
#2,937 1 comentário 0 reações 0 responsáveis Ver no GitHub

Mantenedores costumam responder em até 1 dia

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
4/5
Tempo estimado
3-5 dias
Facilidade para iniciantes
48/100
Tipo de issue
Bug
Clareza
Claramente especificada
Status de atividade
Ativa
Stack de tecnologia
shell
Domínio
build-system, tooling

Direção de pesquisa

Start by tracing how Devbox selects the nixpkgs revision used to generate .devbox/gen/flake/flake.nix for the x86_64-darwin system; the issue provides that generated file and a working nixpkgs-26.05-darwin commit as references. Check the relevant tests for platform-specific revision selection, then verify that devbox shell succeeds on Intel macOS without a manual nixpkgs.commit pin.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

bug looks easy p2 processed triage
What happened?

On x86_64-darwin, devbox shell fails in both existing projects and newly initialized ones. It fails even when packages is empty, so Devbox is currently unusable on this platform.

devbox shell
Info: Ensuring packages are installed.
✓ Computed the Devbox environment.
Error: nix: command error: nix --extra-experimental-features ca-derivations --option experimental-features 'nix-command flakes fetch-closure' print-dev-env --json path:~/ws/nix-fix-x86darwin/.devbox/gen/flake: Nixpkgs 26.11 has dropped support for x86_64-darwin.: exit code 1

The generated .devbox/gen/flake/flake.nix pins a nixpkgs revision from the
26.11 line, which no longer supports this platform:

{
   description = "A devbox shell";

   inputs = {
     nixpkgs.url = "github:NixOS/nixpkgs/38a4887411571457d700c51c64a6e49ead2ed5ab?narHash=sha256-kh35kIx7el4Jk8Ki3BH9%2FPn1eZYSYLJ6LMALos0zOy0%3D";
   };

   outputs = {
     self,
     nixpkgs,
   }:
      let
        pkgs = nixpkgs.legacyPackages.x86_64-darwin;
      in
      {
        devShells.x86_64-darwin.default = pkgs.mkShell {
          buildInputs = [
          ];
        };
      };
 }

As a local workaround, adding "nixpkgs.commit": "329c3d2af6d1b618705150ea39f72c15eb4e613e" that indicates current nixpkgs-26.05-darwin branch to the devbox.json.

{
   "$schema": "https://raw.githubusercontent.com/jetify-com/devbox/0.17.5/.schema/devbox.schema.json",
   "packages": [],
   "shell": {
     "init_hook": [
       "echo 'Welcome to devbox!' > /dev/null"
     ],
     "scripts": {
       "test": [
         "echo \"Error: no test specified\" && exit 1"
       ]
     }
+  },
+  "nixpkgs": {
+    "commit": "329c3d2af6d1b618705150ea39f72c15eb4e613e"
   }
 }

.devbox/gen/flake/flake.nix generated from the devbox.json above

{
   description = "A devbox shell";

   inputs = {
     nixpkgs.url = "github:NixOS/nixpkgs/329c3d2af6d1b618705150ea39f72c15eb4e613e";
   };

   outputs = {
     self,
     nixpkgs,
   }:
      let
        pkgs = nixpkgs.legacyPackages.x86_64-darwin;
      in
      {
        devShells.x86_64-darwin.default = pkgs.mkShell {
          buildInputs = [
          ];
        };
      };
 }

Could Devbox select a nixpkgs-26.05-darwin revision for x86_64-darwin, so that existing projects keep working without each user pinning nixpkgs.commit by hand?
Nixpkgs 26.05 is supported until the end of 2026, so this would cover the remaining lifetime of the platform.

See:
https://github.com/NixOS/nixpkgs/blob/38a4887411571457d700c51c64a6e49ead2ed5ab/doc/release-notes/rl-2611.section.md

Steps to reproduce
  1. devbox init on x86_64-darwin system.
  2. devbox shell
Command

shell

devbox.json

Devbox version

0.17.5

Nix version

No response

What system does this bug occur on?

macOS (Intel)

Debug logs

No response

Linguagem predominante
Go
Estrelas
12.4k
Forks
358
Merge médio
17h 12min
PRs com merge (30d)
31

Preparar o ambiente

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de jetify-com/devbox

Todas as issues de jetify-com/devbox

Issues semelhantes

Mais issues de Go

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.