nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
fork

Configure Feed

Select the types of activity you want to include in your feed.

at 22.05-pre 100 lines 2.2 kB view raw
1{ config, lib, stdenv 2, fetchFromGitHub 3, fetchpatch 4, which 5, cmake 6, llvmPackages 7, libunwind 8, gettext 9, openssl 10, python2 11, icu 12, lttng-ust 13, liburcu 14, libuuid 15, libkrb5 16, debug ? config.coreclr.debug or false 17}: 18 19stdenv.mkDerivation rec { 20 pname = "coreclr"; 21 version = "2.0.7"; 22 23 src = fetchFromGitHub { 24 owner = "dotnet"; 25 repo = "coreclr"; 26 rev = "v${version}"; 27 sha256 = "0pzkrfgqywhpijbx7j1v4lxa6270h6whymb64jdkp7yj56ipqh2n"; 28 }; 29 30 patches = [ 31 (fetchpatch { 32 # glibc 2.26 33 url = "https://github.com/dotnet/coreclr/commit/a8f83b615708c529b112898e7d2fbc3f618b26ee.patch"; 34 sha256 = "047ph5gip4z2h7liwdxsmpnlaq0sd3hliaw4nyqjp647m80g3ffq"; 35 }) 36 (fetchpatch { 37 # clang 5 38 url = "https://github.com/dotnet/coreclr/commit/9b22e1a767dee38f351001c5601f56d78766a43e.patch"; 39 sha256 = "1w1lxw5ryvhq8m5m0kv880c4bh6y9xdgypkr76sqbh3v568yghzg"; 40 }) 41 ]; 42 43 nativeBuildInputs = [ 44 which 45 cmake 46 llvmPackages.clang 47 ]; 48 49 buildInputs = [ 50 llvmPackages.llvm 51 llvmPackages.lldb 52 libunwind 53 gettext 54 openssl 55 python2 56 icu 57 lttng-ust 58 liburcu 59 libuuid 60 libkrb5 61 ]; 62 63 configurePhase = '' 64 # override to avoid cmake running 65 patchShebangs . 66 ''; 67 68 BuildArch = if stdenv.is64bit then "x64" else "x86"; 69 BuildType = if debug then "Debug" else "Release"; 70 71 hardeningDisable = [ 72 "strictoverflow" 73 "format" 74 ]; 75 76 buildPhase = '' 77 runHook preBuild 78 # disable -Werror which can potentially breaks with every compiler upgrade 79 ./build.sh $BuildArch $BuildType cmakeargs "-DCLR_CMAKE_WARNINGS_ARE_ERRORS=OFF" 80 runHook postBuild 81 ''; 82 83 installPhase = '' 84 runHook preInstall 85 mkdir -p $out/share/dotnet $out/bin 86 cp -r bin/Product/Linux.$BuildArch.$BuildType/* $out/share/dotnet 87 for cmd in coreconsole corerun createdump crossgen ilasm ildasm mcs superpmi; do 88 ln -s $out/share/dotnet/$cmd $out/bin/$cmd 89 done 90 runHook postInstall 91 ''; 92 93 meta = with lib; { 94 homepage = "https://github.com/dotnet/core/"; 95 description = ".NET is a general purpose development platform"; 96 platforms = [ "x86_64-linux" ]; 97 maintainers = with maintainers; [ kuznero ]; 98 license = licenses.mit; 99 }; 100}