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 {
|
2018-10-23 15:49:20 +02:00
|
|
|
version = "2.1.403";
|
|
|
|
netCoreVersion = "2.1.5";
|
2017-10-24 08:57:53 +02:00
|
|
|
name = "dotnet-sdk-${version}";
|
|
|
|
|
|
|
|
src = fetchurl {
|
2018-07-29 17:15:16 +02:00
|
|
|
url = "https://dotnetcli.azureedge.net/dotnet/Sdk/${version}/dotnet-sdk-${version}-linux-x64.tar.gz";
|
2018-09-03 22:14:07 +02:00
|
|
|
# use sha512 from the download page
|
2018-10-23 15:49:20 +02:00
|
|
|
sha512 = "903a8a633aea9211ba36232a2decb3b34a59bb62bc145a0e7a90ca46dd37bb6c2da02bcbe2c50c17e08cdff8e48605c0f990786faf1f06be1ea4a4d373beb8a9";
|
2017-10-24 08:57:53 +02:00
|
|
|
};
|
|
|
|
|
2018-09-24 22:38:26 +02:00
|
|
|
unpackPhase = ''
|
|
|
|
mkdir src
|
|
|
|
cd src
|
|
|
|
tar xvzf $src
|
|
|
|
'';
|
2017-10-24 08:57:53 +02:00
|
|
|
|
|
|
|
buildPhase = ''
|
|
|
|
runHook preBuild
|
|
|
|
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" ./dotnet
|
|
|
|
patchelf --set-rpath "${rpath}" ./dotnet
|
|
|
|
find -type f -name "*.so" -exec patchelf --set-rpath "${rpath}" {} \;
|
|
|
|
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;
|
|
|
|
};
|
|
|
|
}
|