Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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 #2327

Open
khunemz opened this issue Oct 7, 2024 · 4 comments
Labels
bug Something isn't working triage Issue needs triage

Comments

@khunemz
Copy link

khunemz commented Oct 7, 2024

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 khunemz added bug Something isn't working triage Issue needs triage labels Oct 7, 2024
@Lagoja
Copy link
Contributor

Lagoja commented Oct 8, 2024

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

@javapapo
Copy link

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

@include
Copy link

include commented Oct 14, 2024

Same problem with devbox 0.13.4

@oscarteg
Copy link

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage Issue needs triage
Development

No branches or pull requests

5 participants