54 lines
1.4 KiB
Nix
54 lines
1.4 KiB
Nix
{ 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 {
|
|
version = "2.1.401";
|
|
name = "dotnet-sdk-${version}";
|
|
|
|
src = fetchurl {
|
|
url = "https://dotnetcli.azureedge.net/dotnet/Sdk/${version}/dotnet-sdk-${version}-linux-x64.tar.gz";
|
|
# use sha512 from the download page
|
|
sha512 = "639f9f68f225246d9cce798d72d011f65c7eda0d775914d1394df050bddf93e2886555f5eed85a75d6c72e9063a54d8aa053c64c326c683b94e9e0a0570e5654";
|
|
};
|
|
|
|
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;
|
|
};
|
|
}
|