nixpkgs/pkgs/development/compilers/dotnet/sdk/default.nix

53 lines
1.3 KiB
Nix
Raw Normal View History

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-07-29 17:15:16 +02:00
version = "2.1.302";
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";
sha256 = "1a8z9q69cd9a33j7fr7907abm5z4qiivw5k379cgsjmmvxwyvjia";
2017-10-24 08:57:53 +02:00
};
unpackPhase = "tar xvzf $src";
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/;
description = ".NET Core SDK 2.0.2 with .NET Core 2.0.0";
platforms = [ "x86_64-linux" ];
maintainers = with maintainers; [ kuznero ];
license = licenses.mit;
};
}