2017-10-24 07:57:53 +01: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-09-28 19:02:15 +01:00
|
|
|
version = "2.1.402";
|
|
|
|
netCoreVersion = "2.1.4";
|
2017-10-24 07:57:53 +01:00
|
|
|
name = "dotnet-sdk-${version}";
|
|
|
|
|
|
|
|
src = fetchurl {
|
2018-07-29 16:15:16 +01:00
|
|
|
url = "https://dotnetcli.azureedge.net/dotnet/Sdk/${version}/dotnet-sdk-${version}-linux-x64.tar.gz";
|
2018-09-03 21:14:07 +01:00
|
|
|
# use sha512 from the download page
|
2018-09-28 19:02:15 +01:00
|
|
|
sha512 = "dd7f15a8202ffa2a435b7289865af4483bb0f642ffcf98a1eb10464cb9c51dd1d771efbb6120f129fe9666f62707ba0b7c476cf1fd3536d3a29329f07456de48";
|
2017-10-24 07:57:53 +01:00
|
|
|
};
|
|
|
|
|
2018-09-24 21:38:26 +01:00
|
|
|
unpackPhase = ''
|
|
|
|
mkdir src
|
|
|
|
cd src
|
|
|
|
tar xvzf $src
|
|
|
|
'';
|
2017-10-24 07:57:53 +01: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 19:02:15 +01:00
|
|
|
description = ".NET Core SDK ${version} with .NET Core ${netCoreVersion}";
|
2017-10-24 07:57:53 +01:00
|
|
|
platforms = [ "x86_64-linux" ];
|
|
|
|
maintainers = with maintainers; [ kuznero ];
|
|
|
|
license = licenses.mit;
|
|
|
|
};
|
|
|
|
}
|