Skip to content

[email protected] error creating shell (NixOS) #2370

Closed
@shot-codes

Description

@shot-codes

What happened?

I am trying to add [email protected] and create a shell. I get the following error

❯ devbox init 

❯ devbox add [email protected] 
Info: Adding package "[email protected]" to devbox.json
...

❯ 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:/home/shot/Develop/python-test/.devbox/gen/flake: 1 dependencies of derivation '/nix/store/zns1s5ycy576kiqym83vzhp1szxkpqqr-nix-shell-env.drv' failed to build: exit code 1

Happens with any version of the python package. Does not happen with package python312

Steps to reproduce

  1. devbox init
  2. devbox add [email protected]
  3. devbox shell

Command

shell

devbox.json

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

Devbox version

0.13.4

Nix version

nix (Nix) 2.24.9

What system does this bug occur on?

Linux (x86-64)

Debug logs

❯ devbox shell
time=2024-10-20T13:31:01.759+02:00 level=DEBUG source=go.jetpack.io/devbox/internal/devconfig/config.go:125 msg="searching for config file (including parent directories)" path=.
time=2024-10-20T13:31:01.759+02:00 level=DEBUG source=go.jetpack.io/devbox/internal/devconfig/config.go:146 msg="trying config file" path=devbox.json
time=2024-10-20T13:31:01.759+02:00 level=DEBUG source=go.jetpack.io/devbox/internal/devconfig/config.go:133 msg="config file found" path=/home/shot/Develop/python-test/devbox.json dur=372.496µs
time=2024-10-20T13:31:01.760+02:00 level=DEBUG source=go.jetpack.io/devbox/internal/devpkg/package.go:198 msg="package needs patching" pkg=python mode=auto
time=2024-10-20T13:31:01.760+02:00 level=DEBUG source=go.jetpack.io/devbox/internal/devconfig/config.go:125 msg="searching for config file (including parent directories)" path=.
time=2024-10-20T13:31:01.760+02:00 level=DEBUG source=go.jetpack.io/devbox/internal/devconfig/config.go:146 msg="trying config file" path=devbox.json
time=2024-10-20T13:31:01.760+02:00 level=DEBUG source=go.jetpack.io/devbox/internal/devconfig/config.go:133 msg="config file found" path=/home/shot/Develop/python-test/devbox.json dur=122.379µs
time=2024-10-20T13:31:01.760+02:00 level=DEBUG source=go.jetpack.io/devbox/internal/devpkg/package.go:198 msg="package needs patching" pkg=python mode=auto
time=2024-10-20T13:31:01.788+02:00 level=DEBUG source=go.jetpack.io/devbox/internal/nix/nix.go:342 msg="nix --version --debug output" out="nix (Nix) 2.24.9\nSystem type: x86_64-linux\nAdditional system types: i686-linux, x86_64-v1-linux, x86_64-v2-linux, x86_64-v3-linux\nFeatures: gc, signed-caches\nSystem configuration file: /etc/nix/nix.conf\nUser configuration files: /home/shot/.config/nix/nix.conf:/etc/xdg/nix/nix.conf:/home/shot/.nix-profile/etc/xdg/nix/nix.conf:/nix/profile/etc/xdg/nix/nix.conf:/home/shot/.local/state/nix/profile/etc/xdg/nix/nix.conf:/etc/profiles/per-user/shot/etc/xdg/nix/nix.conf:/nix/var/nix/profiles/default/etc/xdg/nix/nix.conf:/run/current-system/sw/etc/xdg/nix/nix.conf\nStore directory: /nix/store\nState directory: /nix/var/nix\nData directory: /nix/store/fpxbwqdma9rln9b6c21pz22famcvwsip-nix-2.24.9/share\n"
time=2024-10-20T13:31:01.788+02:00 level=DEBUG source=go.jetpack.io/devbox/internal/nix/command.go:60 msg="nix command starting" cmd.args="nix --extra-experimental-features ca-derivations --option experimental-features 'nix-command flakes fetch-closure' eval --impure --raw --expr builtins.currentSystem" cmd.path=/run/current-system/sw/bin/nix
time=2024-10-20T13:31:01.803+02:00 level=DEBUG source=go.jetpack.io/devbox/internal/nix/command.go:67 msg="nix command exited" cmd.args="nix --extra-experimental-features ca-derivations --option experimental-features 'nix-command flakes fetch-closure' eval --impure --raw --expr builtins.currentSystem" cmd.path=/run/current-system/sw/bin/nix cmd.pid=21406 cmd.code=0 cmd.dur=14.707267ms
time=2024-10-20T13:31:01.803+02:00 level=DEBUG source=go.jetpack.io/devbox/internal/devconfig/config.go:125 msg="searching for config file (including parent directories)" path=.
time=2024-10-20T13:31:01.803+02:00 level=DEBUG source=go.jetpack.io/devbox/internal/devconfig/config.go:146 msg="trying config file" path=devbox.json
time=2024-10-20T13:31:01.803+02:00 level=DEBUG source=go.jetpack.io/devbox/internal/devconfig/config.go:133 msg="config file found" path=/home/shot/Develop/python-test/devbox.json dur=78.483µs
time=2024-10-20T13:31:01.803+02:00 level=DEBUG source=go.jetpack.io/devbox/internal/devpkg/package.go:198 msg="package needs patching" pkg=python mode=auto
time=2024-10-20T13:31:01.803+02:00 level=DEBUG source=go.jetpack.io/devbox/internal/devpkg/package.go:198 msg="package needs patching" pkg=python mode=auto
time=2024-10-20T13:31:01.803+02:00 level=DEBUG source=go.jetpack.io/devbox/internal/devpkg/package.go:198 msg="package needs patching" pkg=python mode=auto
Info: Ensuring packages are installed.
time=2024-10-20T13:31:01.803+02:00 level=DEBUG source=go.jetpack.io/devbox/internal/plugin/plugin.go:85 msg="creating files for package" [email protected]
time=2024-10-20T13:31:01.804+02:00 level=DEBUG source=go.jetpack.io/devbox/internal/plugin/plugin.go:128 msg="Creating file %q from contentPath: %q" /home/shot/Develop/python-test/.devbox/virtenv/python/bin/venvShellHook.sh=python/venvShellHook.sh
time=2024-10-20T13:31:02.316+02:00 level=DEBUG source=go.jetpack.io/devbox/internal/devpkg/package.go:198 msg="package needs patching" pkg=python mode=auto
time=2024-10-20T13:31:02.316+02:00 level=DEBUG source=go.jetpack.io/devbox/internal/nix/command.go:60 msg="nix command starting" cmd.args="nix --extra-experimental-features ca-derivations --option experimental-features 'nix-command flakes fetch-closure' path-info --offline --json /nix/store/h3i0acpmr8mrjx07519xxmidv8mpax4y-python3-3.12.5" cmd.path=/run/current-system/sw/bin/nix
time=2024-10-20T13:31:02.353+02:00 level=DEBUG source=go.jetpack.io/devbox/internal/nix/command.go:67 msg="nix command exited" cmd.args="nix --extra-experimental-features ca-derivations --option experimental-features 'nix-command flakes fetch-closure' path-info --offline --json /nix/store/h3i0acpmr8mrjx07519xxmidv8mpax4y-python3-3.12.5" cmd.path=/run/current-system/sw/bin/nix cmd.pid=21414 cmd.code=0 cmd.dur=37.256086ms
time=2024-10-20T13:31:02.354+02:00 level=DEBUG source=go.jetpack.io/devbox/internal/devpkg/package.go:198 msg="package needs patching" pkg=python mode=auto
time=2024-10-20T13:31:02.354+02:00 level=DEBUG source=go.jetpack.io/devbox/internal/plugin/plugin.go:85 msg="creating files for package" pkg=python3
time=2024-10-20T13:31:02.354+02:00 level=DEBUG source=go.jetpack.io/devbox/internal/plugin/plugin.go:128 msg="Creating file %q from contentPath: %q" /home/shot/Develop/python-test/.devbox/virtenv/python/bin/venvShellHook.sh=python/venvShellHook.sh
time=2024-10-20T13:31:02.354+02:00 level=DEBUG source=go.jetpack.io/devbox/internal/devpkg/package.go:198 msg="package needs patching" pkg=python mode=auto
time=2024-10-20T13:31:02.355+02:00 level=DEBUG source=go.jetpack.io/devbox/internal/nix/nix.go:85 msg="running print-dev-env cmd" cmd.args="nix --extra-experimental-features ca-derivations --option experimental-features 'nix-command flakes fetch-closure' print-dev-env --json path:/home/shot/Develop/python-test/.devbox/gen/flake"
time=2024-10-20T13:31:02.355+02:00 level=DEBUG source=go.jetpack.io/devbox/internal/nix/command.go:60 msg="nix command starting" cmd.args="nix --extra-experimental-features ca-derivations --option experimental-features 'nix-command flakes fetch-closure' print-dev-env --json path:/home/shot/Develop/python-test/.devbox/gen/flake" cmd.path=/run/current-system/sw/bin/nix
⣽ Computing the Devbox environment...
time=2024-10-20T13:31:02.496+02:00 level=DEBUG source=go.jetpack.io/devbox/internal/nix/command.go:67 msg="nix command exited" cmd.args="nix --extra-experimental-features ca-derivations --option experimental-features 'nix-command flakes fetch-closure' print-dev-env --json path:/home/shot/Develop/python-test/.devbox/gen/flake" cmd.path=/run/current-system/sw/bi✓ 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:/home/shot/Develop/python-test/.devbox/gen/flake: attribute 'python3' missing: exit code 1

time=2024-10-20T13:31:02.496+02:00 level=ERROR source=go.jetpack.io/devbox/internal/boxcli/midcobra/debug.go:68 msg="command error" stderr="trace: evaluating glibc-patch.packages.x86_64-linux.python3\nerror:\n       … while calling the 'derivationStrict' builtin\n         at <nix/derivation-internal.nix>:34:12:\n           33|\n           34|   strict = derivationStrict drvAttrs;\n             |            ^\n           35|\n\n       … while evaluating derivation 'nix-shell'\n         whose name attribute is located at /nix/store/j0jlb33bm31w347w43051hbffgh616jr-source/pkgs/stdenv/generic/make-derivation.nix:300:7\n\n       … while evaluating attribute 'buildInputs' of derivation 'nix-shell'\n         at /nix/store/j0jlb33bm31w347w43051hbffgh616jr-source/pkgs/stdenv/generic/make-derivation.nix:347:7:\n          346|       depsHostHost                = lib.elemAt (lib.elemAt dependencies 1) 0;\n          347|       buildInputs                 = lib.elemAt (lib.elemAt dependencies 1) 1;\n             |       ^\n          348|       depsTargetTarget            = lib.elemAt (lib.elemAt dependencies 2) 0;\n\n       (stack trace truncated; use '--show-trace' to show the full, detailed trace)\n\n       error: attribute 'python3' missing\n       at /nix/store/yhc8zv0a16j8gcg46yqmhmh8k55jdbfh-source/flake.nix:21:84:\n           20|\n           21|             (builtins.trace \"evaluating glibc-patch.packages.x86_64-linux.python3\" glibc-patch.packages.x86_64-linux.python3)\n             |                                                                                    ^\n           22|           ];\n       Did you mean python313?\n" execid=c50636727bf84d55998f8d430648f4e9 stack=<nil>
time=2024-10-20T13:31:02.496+02:00 level=ERROR source=go.jetpack.io/devbox/internal/boxcli/midcobra/debug.go:70 msg="command error" execid=c50636727bf84d55998f8d430648f4e9 stack=<nil>
time=2024-10-20T13:31:02.496+02:00 level=DEBUG source=go.jetpack.io/devbox/internal/devconfig/config.go:125 msg="searching for config file (including parent directories)" path=.
time=2024-10-20T13:31:02.496+02:00 level=DEBUG source=go.jetpack.io/devbox/internal/devconfig/config.go:146 msg="trying config file" path=devbox.json
time=2024-10-20T13:31:02.496+02:00 level=DEBUG source=go.jetpack.io/devbox/internal/devconfig/config.go:133 msg="config file found" path=/home/shot/Develop/python-test/devbox.json dur=78.873µs
time=2024-10-20T13:31:02.496+02:00 level=DEBUG source=go.jetpack.io/devbox/internal/devpkg/package.go:198 msg="package needs patching" pkg=python mode=auto

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions