blob: 4e82e80a044fa85699652792971658e693b7f2aa (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
|
{ stdenv
, callPackage
, vmr
}:
let
mkCommon = callPackage ./common.nix {};
inherit (vmr) targetRid releaseManifest;
in {
inherit vmr;
sdk = mkCommon "sdk" rec {
pname = "dotnet-sdk";
version = releaseManifest.sdkVersion;
src = vmr;
dontUnpack = true;
outputs = [ "out" "packages" "artifacts" ];
installPhase = ''
runHook preInstall
cp -r "$src"/dotnet-sdk-${version}-${targetRid} "$out"
chmod +w "$out"
mkdir "$out"/bin
ln -s "$out"/dotnet "$out"/bin/dotnet
mkdir "$packages"
# this roughly corresponds to the {sdk,aspnetcore}_packages in ../update.sh
cp -r "$src"/Private.SourceBuilt.Artifacts.*.${targetRid}/*Microsoft.{NET.ILLink.Tasks,NETCore,DotNet,AspNetCore}.*.nupkg "$packages"
cp -r "$src"/Private.SourceBuilt.Artifacts.*.${targetRid} "$artifacts"
runHook postInstall
'';
passthru = {
inherit (vmr) icu targetRid;
# ilcompiler is currently broken: https://github.com/dotnet/source-build/issues/1215
hasILCompiler = false;
};
meta = vmr.meta // {
mainProgram = "dotnet";
};
};
runtime = mkCommon "runtime" rec {
pname = "dotnet-runtime";
version = releaseManifest.runtimeVersion;
src = vmr;
dontUnpack = true;
outputs = [ "out" ];
installPhase = ''
runHook preInstall
cp -r "$src/dotnet-runtime-${version}-${targetRid}" "$out"
chmod +w "$out"
mkdir "$out"/bin
ln -s "$out"/dotnet "$out"/bin/dotnet
runHook postInstall
'';
meta = vmr.meta // {
mainProgram = "dotnet";
};
};
aspnetcore = mkCommon "aspnetcore" rec {
pname = "dotnet-aspnetcore-runtime";
version = releaseManifest.aspNetCoreVersion or releaseManifest.runtimeVersion;
src = vmr;
dontUnpack = true;
outputs = [ "out" ];
installPhase = ''
runHook preInstall
cp -r "$src/dotnet-runtime-${releaseManifest.runtimeVersion}-${targetRid}" "$out"
chmod +w "$out"
mkdir "$out"/bin
ln -s "$out"/dotnet "$out"/bin/dotnet
chmod +w "$out"/shared
cp -Tr "$src/aspnetcore-runtime-${version}-${targetRid}" "$out"
runHook postInstall
'';
meta = vmr.meta // {
mainProgram = "dotnet";
};
};
}
|