Skip to content

fetchCargoVendor: build failure on darwin due to unreadable certificate bundle #394972

Open

Description

@TomaSajt

I thought I should open this issue so that I will be able to share the link to it in the future.

Related:

Related specifically to fetchCargoVendor:

Nix-side stuff

When using Darwin and having the sandbox enabled you're going to get the following error with fetchCargoVendor:

Traceback (most recent call last):
 File "/nix/store/1sac2dm9dbd6iwxw3pdbzh739s5pw884-fetch-cargo-vendor-util/bin/fetch-cargo-vendor-util", line 15, in <module>
   import requests
 File "/nix/store/2kcy81nj3hb3c7ma0hg0ry8lbbd4cywa-python3-3.12.9-env/lib/python3.12/site-packages/requests/__init__.py", line 164, in <module>
   from .api import delete, get, head, options, patch, post, put, request
 File "/nix/store/2kcy81nj3hb3c7ma0hg0ry8lbbd4cywa-python3-3.12.9-env/lib/python3.12/site-packages/requests/api.py", line 11, in <module>
   from . import sessions
 File "/nix/store/2kcy81nj3hb3c7ma0hg0ry8lbbd4cywa-python3-3.12.9-env/lib/python3.12/site-packages/requests/sessions.py", line 15, in <module>
   from .adapters import HTTPAdapter
 File "/nix/store/2kcy81nj3hb3c7ma0hg0ry8lbbd4cywa-python3-3.12.9-env/lib/python3.12/site-packages/requests/adapters.py", line 81, in <module>
   _preloaded_ssl_context.load_verify_locations(
PermissionError: [Errno 1] Operation not permitted

This is because $NIX_SSL_CERT_FILE is inherited from the nix-daemon, but the path is not in the sandbox whitelist of nix.
So you get an error because the sandbox rules don't allow you to read that file.

As a workaround you can relax the sandbox temporarily.

Activity

  1. added
    2.status: stale
    on Sep 27, 2025
  2. added
    6.topic: rust
    0.kind: build failure
    on Sep 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    0.kind: build failure2.status: stale6.topic: rust

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions