Skip to content

nix build fails because it tries to access models.dev #10989

Closed

Description

@Profpatsch

Description

Nix builds are sandboxed from the network, so they are not allowed to access domains.

End of build log:

error: builder for '/nix/store/4214c1mny2r91n92lp0v0x9hmgg56mv4-opencode-1.1.39-8798a77.drv' failed with exit code 2;
       last 25 log lines:
       > shrinking RPATHs of ELF executables and libraries in /nix/store/4agjsq8ysqp3padifp7xrhryxv46hjrx-opencode-1.1.39-8798a77
       > shrinking /nix/store/4agjsq8ysqp3padifp7xrhryxv46hjrx-opencode-1.1.39-8798a77/bin/.opencode-wrapped
       > shrinking /nix/store/4agjsq8ysqp3padifp7xrhryxv46hjrx-opencode-1.1.39-8798a77/bin/opencode
       > checking for references to /build/ in /nix/store/4agjsq8ysqp3padifp7xrhryxv46hjrx-opencode-1.1.39-8798a77...
       > patching script interpreter paths in /nix/store/4agjsq8ysqp3padifp7xrhryxv46hjrx-opencode-1.1.39-8798a77
       > Running phase: installCheckPhase
       > Executing versionCheckPhase
       > Did not find version 1.1.39-8798a77 in the output of the command /nix/store/4agjsq8ysqp3padifp7xrhryxv46hjrx-opencode-1.1.39-8798a77/bin/opencode --version
       > ERROR 2026-01-28T11:19:33 +452ms service=models.dev error=Unable to connect. Is the computer able to access the url? Failed to fetch models.dev
       > 168 |         return wa();
       > 169 |       });
       > 170 |     }
       > 171 |     function za(a) {
       > 172 |       for (;0 < a.length; )
       > 173 |         a.shift()(h);
       >                       ^
       > RuntimeError: access to a null reference (evaluating 'a6.shift()(h2)')
       >       at za (../../node_modules/.bun/@[email protected]+81ecd8642a1892ca/node_modules/@opentui/core/index-s0q9547t.js:173:17)
       >       at a6 (../../node_modules/.bun/@[email protected]+81ecd8642a1892ca/node_modules/@opentui/core/index-s0q9547t.js:1325:11)
       >       at Mb (../../node_modules/.bun/@[email protected]+81ecd8642a1892ca/node_modules/@opentui/core/index-s0q9547t.js:1347:18)
       >       at Lb (../../node_modules/.bun/@[email protected]+81ecd8642a1892ca/node_modules/@opentui/core/index-s0q9547t.js:1319:13)
       >       at a6 (../../node_modules/.bun/@[email protected]+81ecd8642a1892ca/node_modules/@opentui/core/index-s0q9547t.js:1265:90)
       >       at b2 (../../node_modules/.bun/@[email protected]+81ecd8642a1892ca/node_modules/@opentui/core/index-s0q9547t.js:1268:9)
       >
       > Bun v1.3.6 (Linux x64)
       For full logs, run 'nix log /nix/store/4214c1mny2r91n92lp0v0x9hmgg56mv4-opencode-1.1.39-8798a77.drv'.

Plugins

OpenCode version

1.1.39-8798a77

Steps to reproduce

nix run github:anomalyco/opencode

Screenshot and/or share link

No response

Operating System

NixOS

Terminal

No response

Activity

  1. github-actions commented on Jan 28, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

    Feel free to ignore if none of these address your specific case.

  2. Profpatsch commented on Jan 28, 2026

    @Profpatsch
    Author

    Huh, I tried again and it worked. Weird. Maybe a caching problem?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingnix

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions