2 { buildEnv, makeWrapper, lib }:
3 # TODO: Rethink how we determine and/or get the CLI.
4 # Possible options raised in #187118:
5 # 1. A separate argument for the CLI (as suggested by IvarWithoutBones
6 # 2. Use the highest version SDK for the CLI (as suggested by GGG)
8 let cli = builtins.head dotnetPackages;
10 assert lib.assertMsg ((builtins.length dotnetPackages) > 0)
11 ''You must include at least one package, e.g
12 `with dotnetCorePackages; combinePackages [
13 sdk_6_0 aspnetcore_7_0
16 name = "dotnet-core-combined";
17 paths = dotnetPackages;
18 pathsToLink = [ "/host" "/packs" "/sdk" "/sdk-manifests" "/shared" "/templates" ];
19 ignoreCollisions = true;
21 cp -R ${cli}/{dotnet,share,nix-support} $out/
24 ln -s $out/dotnet $out/bin/dotnet
29 versions = lib.catAttrs "version" dotnetPackages;
30 packages = lib.remove null (lib.catAttrs "packages" dotnetPackages);