lol
at 18.09-beta 52 lines 1.3 kB view raw
1{ stdenv 2, fetchurl 3, libunwind 4, openssl 5, icu 6, libuuid 7, zlib 8, curl 9}: 10 11let 12 rpath = stdenv.lib.makeLibraryPath [ stdenv.cc.cc libunwind libuuid icu openssl zlib curl ]; 13in 14 stdenv.mkDerivation rec { 15 version = "2.1.302"; 16 name = "dotnet-sdk-${version}"; 17 18 src = fetchurl { 19 url = "https://dotnetcli.azureedge.net/dotnet/Sdk/${version}/dotnet-sdk-${version}-linux-x64.tar.gz"; 20 sha256 = "1a8z9q69cd9a33j7fr7907abm5z4qiivw5k379cgsjmmvxwyvjia"; 21 }; 22 23 unpackPhase = "tar xvzf $src"; 24 25 buildPhase = '' 26 runHook preBuild 27 patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" ./dotnet 28 patchelf --set-rpath "${rpath}" ./dotnet 29 find -type f -name "*.so" -exec patchelf --set-rpath "${rpath}" {} \; 30 echo -n "dotnet-sdk version: " 31 ./dotnet --version 32 runHook postBuild 33 ''; 34 35 dontPatchELF = true; 36 37 installPhase = '' 38 runHook preInstall 39 mkdir -p $out/bin 40 cp -r ./ $out 41 ln -s $out/dotnet $out/bin/dotnet 42 runHook postInstall 43 ''; 44 45 meta = with stdenv.lib; { 46 homepage = https://dotnet.github.io/; 47 description = ".NET Core SDK 2.0.2 with .NET Core 2.0.0"; 48 platforms = [ "x86_64-linux" ]; 49 maintainers = with maintainers; [ kuznero ]; 50 license = licenses.mit; 51 }; 52 }