Commit 8c8524bc authored by Winter's avatar Winter
Browse files

buildDotnetModule: fix sandboxed builds on darwin

ICU tries to unconditionally load files from /usr/share/icu on Darwin,
which makes builds fail in the sandbox. Thus, let's disable ICU during
the build on Darwin by setting DOTNET_SYSTEM_GLOBALIZATION_INVARIANT [0].

[0]: https://learn.microsoft.com/en-us/dotnet/core/runtime-config/globalization#invariant-mode
parent 9f58b8fe
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -267,4 +267,8 @@ stdenvNoCC.mkDerivation (args // {
  } // args.passthru or { };

  meta = (args.meta or { }) // { inherit platforms; };
})
}
  # ICU tries to unconditionally load files from /usr/share/icu on Darwin, which makes builds fail
  # in the sandbox, so disable ICU on Darwin. This, as far as I know, shouldn't cause any built packages
  # to behave differently, just the dotnet build tool.
  // lib.optionalAttrs stdenvNoCC.isDarwin { DOTNET_SYSTEM_GLOBALIZATION_INVARIANT = 1; })