!lheuhImcToQZYTQTuI:nixos.org

Nix on macOS

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

Load older messages


SenderMessageTime
18 Nov 2025
@weethet:catgirl.cloudWeetHetWhat do they propose people use instead?18:53:53
@reckenrode:matrix.orgRandy Eckenrode Eventually if/when we get a rustPackages, we can patch it not to do that. 18:53:54
@weethet:catgirl.cloudWeetHetWhat does swift use?18:54:34
@reckenrode:matrix.orgRandy Eckenrode Network.framework. According to the curl devs, it doesn't look straightforward to use for what they need. 18:55:10
@weethet:catgirl.cloudWeetHetapple's swift-nio uses boringssl18:55:47
@reckenrode:matrix.orgRandy Eckenrode Put of the box, it provides whatever frameworks are in the SDK. SwiftNIO appears to use Network.framework. 18:59:28
@reckenrode:matrix.orgRandy Eckenrode * Out of the box, it provides whatever frameworks are in the SDK. SwiftNIO appears to use Network.framework. 18:59:38
@weethet:catgirl.cloudWeetHethttps://github.com/apple/swift-nio-ssl claims BoringSSL18:59:56
@reckenrode:matrix.orgRandy Eckenrodehttps://github.com/apple/swift-nio-transport-services19:00:01
@reckenrode:matrix.orgRandy EckenrodeIt supports multiple TLS implementations. The latter is the one that does platform integration on Darwin platforms.19:00:52
@weethet:catgirl.cloudWeetHetrustls also supports native keychain via https://lib.rs/crates/rustls-native-certs so even without Secure.framework someone might want to use keychain19:04:07
@weethet:catgirl.cloudWeetHetI'm not sure what sandbox privileges it needs though19:04:21
@weethet:catgirl.cloudWeetHetcom.apple.SecurityServer is seemingly a Secure.framework thing19:07:01
@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

Show newer messages


Back to Room ListRoom Version: 6