2017-10-24 08:57:53 +02:00
|
|
|
{ stdenv
|
|
|
|
, fetchurl
|
|
|
|
, libunwind
|
|
|
|
, openssl
|
|
|
|
, icu
|
|
|
|
, libuuid
|
|
|
|
, zlib
|
|
|
|
, curl
|
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
|
|
|
rpath = stdenv.lib.makeLibraryPath [ stdenv.cc.cc libunwind libuuid icu openssl zlib curl ];
|
|
|
|
in
|
|
|
|
stdenv.mkDerivation rec {
|
2019-06-22 16:13:22 +02:00
|
|
|
version = "2.2.300";
|
|
|
|
netCoreVersion = "2.2.5";
|
2019-04-24 12:51:41 +02:00
|
|
|
pname = "dotnet-sdk";
|
2017-10-24 08:57:53 +02:00
|
|
|
|
|
|
|
src = fetchurl {
|
2019-04-24 12:51:41 +02:00
|
|
|
url = "https://dotnetcli.azureedge.net/dotnet/Sdk/${version}/${pname}-${version}-linux-x64.tar.gz";
|
2018-09-03 22:14:07 +02:00
|
|
|
# use sha512 from the download page
|
2019-06-22 16:13:22 +02:00
|
|
|
sha512 = "1D660A323180DF3DA8C6E0EA3F439D6BBEC29670D498AC884F38BF3CDFFBB041C7AFFF66171CDFD24C82394B845B135B057404DEF1FCE9F206853726382BC42B";
|
2017-10-24 08:57:53 +02:00
|
|
|
};
|
|
|
|
|
2019-04-24 12:51:41 +02:00
|
|
|
sourceRoot = ".";
|
2017-10-24 08:57:53 +02:00
|
|
|
|
|
|
|
buildPhase = ''
|
|
|
|
runHook preBuild
|
2019-04-24 12:51:41 +02:00
|
|
|
patchelf --set-interpreter "${stdenv.cc.bintools.dynamicLinker}" ./dotnet
|
2017-10-24 08:57:53 +02:00
|
|
|
patchelf --set-rpath "${rpath}" ./dotnet
|
2019-07-09 19:32:51 +02:00
|
|
|
find -type f -name "*.so" -exec patchelf --set-rpath '$ORIGIN:${rpath}' {} \;
|
2017-10-24 08:57:53 +02:00
|
|
|
echo -n "dotnet-sdk version: "
|
|
|
|
./dotnet --version
|
|
|
|
runHook postBuild
|
|
|
|
'';
|
|
|
|
|
|
|
|
dontPatchELF = true;
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
mkdir -p $out/bin
|
|
|
|
cp -r ./ $out
|
|
|
|
ln -s $out/dotnet $out/bin/dotnet
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
homepage = https://dotnet.github.io/;
|
2018-09-28 20:02:15 +02:00
|
|
|
description = ".NET Core SDK ${version} with .NET Core ${netCoreVersion}";
|
2017-10-24 08:57:53 +02:00
|
|
|
platforms = [ "x86_64-linux" ];
|
|
|
|
maintainers = with maintainers; [ kuznero ];
|
|
|
|
license = licenses.mit;
|
|
|
|
};
|
|
|
|
}
|