Skip to content

Commit 0f83f3f

Browse files
committed
sendme: fix checkPhase with sandbox=relaxed on Darwin
sendme's tests run the binary, which requires local network access. sendme also ends up invoking CoreFoundation APIs which require access to system ICU data. [CoreFoundation will segfault if it cannot access the system ICU data][1], so add these paths to the sandbox. [1]: https://gist.github.com/al3xtjames/0897f0d21196276c21d15f5a103f03a0
1 parent c8c2643 commit 0f83f3f

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

pkgs/by-name/se/sendme/package.nix

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,15 @@ rustPlatform.buildRustPackage rec {
1818
useFetchCargoVendor = true;
1919
cargoHash = "sha256-8Ry3rpGTNcvMIA3Q10Cb3uJHOBQin9AhlLNRekaKw/0=";
2020

21+
__darwinAllowLocalNetworking = true;
22+
23+
# On Darwin, sendme invokes CoreFoundation APIs that read ICU data from the
24+
# system. Ensure these paths are accessible in the sandbox to avoid segfaults
25+
# during checkPhase.
26+
sandboxProfile = ''
27+
(allow file-read* (subpath "/usr/share/icu"))
28+
'';
29+
2130
meta = with lib; {
2231
description = "Tool to send files and directories, based on iroh";
2332
homepage = "https://iroh.computer/sendme";

0 commit comments

Comments
 (0)