Unverified Commit e848cf13 authored by Alex James's avatar Alex James
Browse files

dumbpipe: fix `checkPhase` with `sandbox=relaxed` on Darwin

dumbpipe's tests run the binary, which requires local network access.
dumbpipe 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/e8a260602c719bf35dae63988798e835
parent 67f61c0f
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -19,6 +19,15 @@ rustPlatform.buildRustPackage rec {
  useFetchCargoVendor = true;
  cargoHash = "sha256-uuY0nh4VHzyM7+cbgyycr5I3IjE0OeQ0eg12qVXe4BQ=";

  __darwinAllowLocalNetworking = true;

  # On Darwin, dumbpipe invokes CoreFoundation APIs that read ICU data from the
  # system. Ensure these paths are accessible in the sandbox to avoid segfaults
  # during checkPhase.
  sandboxProfile = ''
    (allow file-read* (subpath "/usr/share/icu"))
  '';

  meta = with lib; {
    description = "Connect A to B - Send Data";
    homepage = "https://www.dumbpipe.dev/";