The GitHub issue tracker has a report of this: .NET workloads fail to install · Issue #226107 · NixOS/nixpkgs · GitHub
here is nix shell with workaround for workloads and all android dependencies to build a sample dontet-android apps on nixos
It worked like a charm thanks
For folks finding this still, these overrides shouldn’t be necessary anymore. Using dotnetCorePackages.dotnet_X.sdk
will have the userlocal file in the right place to allow workload installs, and dotnetCorePackages.combinePackages
now links the userlocal files together as well:
{ pkgs }:
let
dotnet = (with pkgs.dotnetCorePackages; combinePackages [ dotnet_9.sdk dotnet_8.sdk ]);
in
pkgs.mkShell {
packages = [ dotnet ];
DOTNET_PATH = "${dotnet}/bin/dotnet";
DOTNET_ROOT = "${dotnet}/share/dotnet";
}
$ tree -l $DOTNET_ROOT/metadata
/nix/store/dcb537vbbfs8q3i1gfrc077wm910jkcf-dotnet-wrapped-combined/share/dotnet/metadata
└── workloads
├── 8.0.100 -> /nix/store/2zggnpahim3f5g0jl984vd3z8g4wsc73-dotnet-sdk-wrapped-8.0.114/share/dotnet/metadata/workloads/8.0.100
│ └── userlocal
└── 9.0.100 -> /nix/store/x8pdk25r5g5lv402s3ks03wq4lkjdj14-dotnet-sdk-wrapped-9.0.104/share/dotnet/metadata/workloads/9.0.100
└── userlocal
1 Like