Repository navigation
Open
Labels
0.kind: build failureA package fails to build2.status: stalehttps://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md6.topic: rustGeneral-purpose programming language emphasizing performance, type safety, and concurrency.
Description
I thought I should open this issue so that I will be able to share the link to it in the future.
Related:
- treewide: support NIX_SSL_CERT_FILE as an impureEnvVar #303307
fetchFromGitHubwithfetchSubmoduleshave issues with HTTPS when using an alternate nix store #345226- cacert: ensure that NIX_SSL_CERT_FILE is readable before using it #345322
- cacert: avoid using unreadable inherited certificate bundle #401942
Related specifically to fetchCargoVendor:
- clash-rs: 0.7.4 -> 0.7.5 #382251
- lintspec: fetch-cargo-vendor-util fails during build #385366
- Build failure: gitbutler (0.14.13) (macos) #394068
- python3Packages.libcst @ 1.7.0: Build fails on Darwin w/
OperationNotPermitted#394968
Nix-side stuff
- NIX_SSL_CERT_FILE unreadable from nix sandbox nix#12698
- https://gerrit.lix.systems/c/lix/+/2869
- https://gerrit.lix.systems/c/lix/+/2906
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.
Reacted by Felix Rath, Austin Horstman, StepBroBD, Wataru Matsuoka, Maxime Brunet, adamjhf, Ethan Carter Edwards and Kenichi Kamiya
Metadata
Metadata
Assignees
Labels
0.kind: build failureA package fails to build2.status: stalehttps://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md6.topic: rustGeneral-purpose programming language emphasizing performance, type safety, and concurrency.
Activity