diff options
author | David McFarland <corngood@gmail.com> | 2024-02-21 13:08:01 -0400 |
---|---|---|
committer | David McFarland <corngood@gmail.com> | 2024-05-04 19:14:39 -0300 |
commit | 26c3d6878a3c30b726fba660bf31d22adef2edcf (patch) | |
tree | dc4fbd92ef05d4136c3ef133db848ce816264170 /pkgs/development/compilers/dotnet/common.nix | |
parent | dd1e778bf69f2741a5cd41f60f6150834f8b0a1b (diff) |
dotnet: fix dotnet executables in darwin sandbox
This fixes: Could not load ICU data. UErrorCode: 2 We're using a hook instead of a wrapper because various things like to reference the unwrapped dotnet executable.
Diffstat (limited to 'pkgs/development/compilers/dotnet/common.nix')
-rw-r--r-- | pkgs/development/compilers/dotnet/common.nix | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/pkgs/development/compilers/dotnet/common.nix b/pkgs/development/compilers/dotnet/common.nix index 49f3e3be4d779..69503147ea073 100644 --- a/pkgs/development/compilers/dotnet/common.nix +++ b/pkgs/development/compilers/dotnet/common.nix @@ -52,7 +52,12 @@ run ? null, }: let - built = runCommand "dotnet-test-${name}" { buildInputs = [ finalAttrs.finalPackage ]; } ('' + sdk = finalAttrs.finalPackage; + built = runCommand "dotnet-test-${name}" { + buildInputs = [ sdk ]; + # make sure ICU works in a sandbox + propagatedSandboxProfile = toString sdk.__propagatedSandboxProfile; + } ('' HOME=$PWD/.home dotnet new nugetconfig dotnet nuget disable source nuget @@ -65,11 +70,13 @@ if run == null then built else - runCommand "${built.name}-run" { src = built; nativeBuildInputs = runInputs; } ( - lib.optionalString (runtime != null) '' - # TODO: use runtime here - export DOTNET_ROOT=${runtime} - '' + run); + runCommand "${built.name}-run" { + src = built; + nativeBuildInputs = [ built ] ++ runInputs; + } (lib.optionalString (runtime != null) '' + # TODO: use runtime here + export DOTNET_ROOT=${runtime} + '' + run); # Setting LANG to something other than 'C' forces the runtime to search # for ICU, which will be required in most user environments. |