!lheuhImcToQZYTQTuI:nixos.org

Nix on macOS

1144 Members
“There are still many issues with the Darwin platform but most of it is quite usable.” — http://yves.gnu-darwin.org181 Servers

Load older messages


SenderMessageTime
18 Nov 2025
@weethet:catgirl.cloudWeetHet * com.apple.SecurityServer is seemingly a Secure.framework thing 19:07:07
@weethet:catgirl.cloudWeetHet

Okay it fails on an unrelated thing, because it tries to access system proxy by default and gets

2025-11-18 21:23:01.093926+0200  localhost kernel[0]: (Sandbox) Sandbox: test-native(79417) deny(1) mach-lookup com.apple.SystemConfiguration.configd
19:29:06
@jopejoe1:matrix.orgjopejoe1 (4094@39c3) changed their display name from jopejoe1 to jopejoe1 (4094@39c3).20:18:53
@weethet:catgirl.cloudWeetHet

Why don't you work...

fetched-content> Error: reqwest::Error { kind: Request, url: "https://dummyjson.com/test", source: hyper_util::client::legacy::Error(Connect, Custom { kind: Other, error: Custom { kind: InvalidData, error: InvalidCertificate(UnknownIssuer) } }) }
building of '/nix/store/z3lg2ccma5grszxmkwdwvibdzlpd2gl0-fetched-content.drv^out' from .drv file: build done
killing process 71696
builder process for '/nix/store/z3lg2ccma5grszxmkwdwvibdzlpd2gl0-fetched-content.drv' finished
killing all processes running under uid '351'
lock released on '/nix/store/vjl83xzpf5nxihbp164nm7n1dakl85pj-fetched-content.lock'
building of '/nix/store/z3lg2ccma5grszxmkwdwvibdzlpd2gl0-fetched-content.drv^out' from .drv file: done
building of '/nix/store/z3lg2ccma5grszxmkwdwvibdzlpd2gl0-fetched-content.drv^out' from .drv file: goal destroyed
error: builder for '/nix/store/z3lg2ccma5grszxmkwdwvibdzlpd2gl0-fetched-content.drv' failed with exit code 1;
       last 1 log lines:
       > Error: reqwest::Error { kind: Request, url: "https://dummyjson.com/test", source: hyper_util::client::legacy::Error(Connect, Custom { kind: Other, error: Custom { kind: InvalidData, error: InvalidCertificate(UnknownIssuer) } }) }
       For full logs, run:
               nix-store -l /nix/store/z3lg2ccma5grszxmkwdwvibdzlpd2gl0-fetched-content.drv
21:06:53
@reckenrode:matrix.orgRandy EckenrodeInvalid certificate this time. Is the CA supposed to be in Keychain?21:10:24
@weethet:catgirl.cloudWeetHetI'm working through the sandbox errors21:11:00
@weethet:catgirl.cloudWeetHetFor now I'm just allowing everything that fails21:11:11
@weethet:catgirl.cloudWeetHetThen I'm gonna minimise the profile21:11:34
@weethet:catgirl.cloudWeetHet

This is for

[package]
name = "test-native"
version = "0.1.0"
edition = "2024"

[dependencies]
tokio = { version = "1.48.0", features = ["macros", "rt-multi-thread"] }

[dependencies.reqwest]
version = "0.12.24"
default-features = false
features = [
  "rustls-tls-native-roots",
  "charset",
  "http2",
  "system-proxy"
]
21:12:14
@weethet:catgirl.cloudWeetHetFixing the system-proxy failure was easy but rustls-tls-native-roots does something weird21:13:13
@weethet:catgirl.cloudWeetHet

It's not pretty:

; Allow system proxy
(allow mach-lookup (global-name "com.apple.SystemConfiguration.configd"))

; Allow native TLS
(allow mach-lookup
       (global-name "com.apple.SecurityServer"))
(allow file-read-data
       (literal "/Library/Keychains/System.keychain")
       (literal "/System/Library/Keychains/SystemRootCertificates.keychain")
       (literal "/System/Library/Keychains/SystemTrustSettings.plist"))
(allow file-read-metadata
       (literal "/Library/Keychains/System.keychain")
       (literal "/System/Library/Keychains/SystemRootCertificates.keychain")
       (literal "/System/Library/Keychains/SystemTrustSettings.plist"))
21:40:48
@weethet:catgirl.cloudWeetHet *

It's not pretty:

; Allow system proxy
(allow mach-lookup (global-name "com.apple.SystemConfiguration.configd"))

; Allow native TLS
(allow mach-lookup
       (global-name "com.apple.SecurityServer"))
(allow file-read-data
       (literal "/Library/Keychains/System.keychain")
       (literal "/System/Library/Keychains/SystemRootCertificates.keychain")
       (literal "/System/Library/Keychains/SystemTrustSettings.plist"))
21:42:26
@weethet:catgirl.cloudWeetHetNeed to test with an actual nix-build still but I think this is all21:43:08
@weethet:catgirl.cloudWeetHet *

It's not pretty:

; Allow system proxy
(allow mach-lookup (global-name "com.apple.SystemConfiguration.configd"))

; Allow native TLS
(allow mach-lookup (global-name "com.apple.SecurityServer"))
(allow file-read-data
       (literal "/Library/Keychains/System.keychain")
       (literal "/System/Library/Keychains/SystemRootCertificates.keychain")
       (literal "/System/Library/Keychains/SystemTrustSettings.plist"))
21:44:34
@weethet:catgirl.cloudWeetHetNone of these can be removed21:44:50
@weethet:catgirl.cloudWeetHetWait it doesn't work21:47:15
@weethet:catgirl.cloudWeetHetWait what22:28:27
@weethet:catgirl.cloudWeetHet
declare -x NIX_SSL_CERT_FILE="/private/tmp/2412pn9wp2vk7abqp0glq967n4/etc/ssl/certs/ca-certificates.crt"
declare -x SSL_CERT_FILE="/no-cert-file.crt"
22:28:42
@weethet:catgirl.cloudWeetHetHuh22:28:45
@reckenrode:matrix.orgRandy EckenrodeIs this Lix 2.94?22:29:29
@weethet:catgirl.cloudWeetHetYes22:30:22
@weethet:catgirl.cloudWeetHet But lix doesn't set SSL_CERT_FILE at all 22:30:34
@weethet:catgirl.cloudWeetHet It's nixpkgs/pkgs/stdenv/generic/setup.sh's fault 22:30:46
@weethet:catgirl.cloudWeetHet * It's pkgs/stdenv/generic/setup.sh's fault 22:30:51
@weethet:catgirl.cloudWeetHet
if [[ -z "${NIX_SSL_CERT_FILE:-}" && "${IN_NIX_SHELL:-}" != "impure" ]]; then
  export NIX_SSL_CERT_FILE=/no-cert-file.crt
fi
# Another variant left for compatibility.
if [[ -z "${SSL_CERT_FILE:-}" && "${IN_NIX_SHELL:-}" != "impure" ]]; then
  export SSL_CERT_FILE=/no-cert-file.crt
fi
22:30:59
@reckenrode:matrix.orgRandy Eckenrode

https://docs.lix.systems/manual/lix/stable/release-notes/rl-2.94.html

Global certificate authorities are copied inside the builder's environment gh#12698 fj#885 cl/3765

22:31:21
@weethet:catgirl.cloudWeetHet Yes, this sets NIX_SSL_CERT_FILE to a correct value 22:32:07
@reckenrode:matrix.orgRandy EckenrodeOh, is the issue that they’re different?22:32:54
@weethet:catgirl.cloudWeetHetYes22:33:14
@weethet:catgirl.cloudWeetHet Removing SSL_CERT_FILE and adding this to the profile fixes the FOD 22:33:55

Show newer messages


Back to Room ListRoom Version: 6