devbox icon indicating copy to clipboard operation
devbox copied to clipboard

Error: nix: command error: nix --extra-experimental-features ca-derivations --option experimental-features 'nix-command flakes fetch-closure' build --impure --no-link 'github:NixOS/nixpkgs/1f37660f64a850233baab512c9b9bd83fb72be57#mongodb': exit code 1

Open khunemz opened this issue 1 year ago • 4 comments

What happened?

After upgrading to 0.13.3 and start services up then I got error message Error: nix: command error: nix --extra-experimental-features ca-derivations --option experimental-features 'nix-command flakes fetch-closure' build --impure --no-link 'github:NixOS/nixpkgs/1f37660f64a850233baab512c9b9bd83fb72be57#mongodb': exit code 1 after running devbox services up

Steps to reproduce

the devbox.json

{
  "packages": [
    "nats-server@latest",
    "ripgrep@latest",
    "overmind@latest",
    "postgresql_12@latest",
    "tldr@latest",
    "natscli@latest",
    "redis@latest",
    "nats-top@latest",
    "mongosh@latest",
    "mongodb@latest"
  ],
  "shell": {
    "init_hook": [
      ""
    ],
    "scripts": {
      "test": [
        "echo \"Error: no test specified\" && exit 1"
      ],
      "setup_db": [
        "initdb --encoding=UTF8"
      ],
      "add_users": [
        "psql -f add-users.sql"
      ]
    }
  },
  "include": [
    "github:jetpack-io/devbox-plugins?dir=mongodb"
  ]
}

Command

No response

devbox.json

No response

Devbox version

0.13.3

Nix version

No response

What system does this bug occur on?

macOS (Apple Silicon)

Debug logs

Info: Ensuring packages are installed. Info: Installing the following packages to the nix store: mongodb@latest error: the user '_nixbld1' in the group 'nixbld' does not exist Error: nix: command error: nix --extra-experimental-features ca-derivations --option experimental-features 'nix-command flakes fetch-closure' build --impure --no-link 'github:NixOS/nixpkgs/1f37660f64a850233baab512c9b9bd83fb72be57#mongodb': exit code 1

Error: There was an internal error. Run with DEVBOX_DEBUG=1 for a detailed error message, and consider reporting it at https://github.com/jetify-com/devbox/issues

khunemz avatar Oct 07 '24 09:10 khunemz

error: the user '_nixbld1' in the group 'nixbld' does not exist Error: nix: command error: nix --extra-experimental-features ca-derivations --option experimental-features 'nix-command

I think this is related to an issue with Nixpkgs on macOS Sequoia. Newer versions of macOS overwrote some of the UIDs that Nix uses to build it's packages.

To fix this, you can try running the repair script here:

curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix/tag/v0.26.0 | sh -s -- repair sequoia --move-existing-users

For more details, check out the issue here: https://github.com/NixOS/nix/issues/10892

Lagoja avatar Oct 08 '24 20:10 Lagoja

I get a similar error on Linux (popOS) . Devbox version 0.13.4.

devbox update or devbox add [email protected]

{
  "$schema":  "https://raw.githubusercontent.com/jetify-com/devbox/0.13.3/.schema/devbox.schema.json",
  "packages": ["[email protected]"],
  "shell": {
    "init_hook": [
      ". $VENV_DIR/bin/activate"
    ],
    "scripts": {
      "test": [
        "echo \"Error: no test specified\" && exit 1"
      ]
    }
  }
}

I get

Error: nix: command error: nix --extra-experimental-features ca-derivations --option experimental-features 'nix-command flakes fetch-closure' print-dev-env --json path:/home/papo/dev/python-etf/.devbox/gen/flake: attribute 'python313' missing: exit code 1

Error: There was an internal error. Run with DEVBOX_DEBUG=1 for a detailed error message, and consider reporting it at https://github.com/jetify-com/devbox/issues

javapapo avatar Oct 13 '24 17:10 javapapo

Same problem with devbox 0.13.4

include avatar Oct 14 '24 13:10 include

error: the user '_nixbld1' in the group 'nixbld' does not exist Error: nix: command error: nix --extra-experimental-features ca-derivations --option experimental-features 'nix-command

I think this is related to an issue with Nixpkgs on macOS Sequoia. Newer versions of macOS overwrote some of the UIDs that Nix uses to build it's packages.

To fix this, you can try running the repair script here:

curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix/tag/v0.26.0 | sh -s -- repair sequoia --move-existing-users

For more details, check out the issue here: NixOS/nix#10892

This fixed my issue!

oscarteg avatar Oct 15 '24 20:10 oscarteg