2020-04-24 23:36:52 +00:00
|
|
|
packages:
|
2022-09-09 14:08:57 +00:00
|
|
|
{ buildEnv, makeWrapper, lib }:
|
|
|
|
# TODO: Rethink how we determine and/or get the CLI.
|
|
|
|
# Possible options raised in #187118:
|
|
|
|
# 1. A separate argument for the CLI (as suggested by IvarWithoutBones
|
|
|
|
# 2. Use the highest version SDK for the CLI (as suggested by GGG)
|
|
|
|
# 3. Something else?
|
2020-04-24 23:36:52 +00:00
|
|
|
let cli = builtins.head packages;
|
|
|
|
in
|
2022-09-09 14:08:57 +00:00
|
|
|
assert lib.assertMsg ((builtins.length packages) > 0)
|
2020-04-24 23:36:52 +00:00
|
|
|
''You must include at least one package, e.g
|
2021-03-23 19:22:30 +00:00
|
|
|
`with dotnetCorePackages; combinePackages [
|
2021-10-17 09:34:42 +00:00
|
|
|
sdk_3_1 aspnetcore_5_0
|
2021-03-23 19:22:30 +00:00
|
|
|
];`'' ;
|
2020-04-24 23:36:52 +00:00
|
|
|
buildEnv {
|
|
|
|
name = "dotnet-core-combined";
|
|
|
|
paths = packages;
|
2022-09-09 14:08:57 +00:00
|
|
|
pathsToLink = [ "/host" "/packs" "/sdk" "/sdk-manifests" "/shared" "/templates" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
ignoreCollisions = true;
|
2022-09-09 14:08:57 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
makeWrapper
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
postBuild = ''
|
2022-09-09 14:08:57 +00:00
|
|
|
cp -R ${cli}/{dotnet,LICENSE.txt,nix-support,ThirdPartyNotices.txt} $out/
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
mkdir $out/bin
|
2022-09-09 14:08:57 +00:00
|
|
|
ln -s $out/dotnet $out/bin/dotnet
|
|
|
|
wrapProgram $out/bin/dotnet \
|
|
|
|
--prefix LD_LIBRARY_PATH : ${cli.icu}/lib
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
2022-09-09 14:08:57 +00:00
|
|
|
passthru = {
|
|
|
|
inherit (cli) icu packages;
|
|
|
|
};
|
2020-04-24 23:36:52 +00:00
|
|
|
}
|