diff options
author | obadz <dav-github@odav.org> | 2015-06-24 12:56:24 +0100 |
---|---|---|
committer | obadz <dav-github@odav.org> | 2015-06-24 15:06:14 +0100 |
commit | 30bd03a3e26b24184c7518515161178aafa2bc72 (patch) | |
tree | 9530339c05fd31615094d262617fe89eea091559 /pkgs/development/compilers | |
parent | e1af50c4c4c0332136283e9231f0a32ac11f2b90 (diff) | |
download | nixlib-30bd03a3e26b24184c7518515161178aafa2bc72.tar nixlib-30bd03a3e26b24184c7518515161178aafa2bc72.tar.gz nixlib-30bd03a3e26b24184c7518515161178aafa2bc72.tar.bz2 nixlib-30bd03a3e26b24184c7518515161178aafa2bc72.tar.lz nixlib-30bd03a3e26b24184c7518515161178aafa2bc72.tar.xz nixlib-30bd03a3e26b24184c7518515161178aafa2bc72.tar.zst nixlib-30bd03a3e26b24184c7518515161178aafa2bc72.zip |
dotnet: package coreclr (from git)
Diffstat (limited to 'pkgs/development/compilers')
-rw-r--r-- | pkgs/development/compilers/coreclr/default.nix | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/pkgs/development/compilers/coreclr/default.nix b/pkgs/development/compilers/coreclr/default.nix new file mode 100644 index 000000000000..094df5b5b631 --- /dev/null +++ b/pkgs/development/compilers/coreclr/default.nix @@ -0,0 +1,67 @@ +{ stdenv +, fetchFromGitHub +, which +, cmake +, clang_35 +, llvmPackages_36 +, libunwind +, gettext +, openssl +}: + +stdenv.mkDerivation rec { + name = "coreclr-${version}"; + version = "git-" + (builtins.substring 0 10 rev); + rev = "8c70800b5e8dc5535c379dec4a6fb32f7ab5e878"; + + src = fetchFromGitHub { + owner = "dotnet"; + repo = "coreclr"; + inherit rev; + sha256 = "1galskbnr9kdjjxpx5qywh49400swchhq5f54i16kxyr9k4mvq1f"; + }; + + buildInputs = [ + which + cmake + clang_35 + llvmPackages_36.llvm + llvmPackages_36.lldb + libunwind + gettext + openssl + ]; + + configurePhase = '' + # Prevent clang-3.5 (rather than just clang) from being selected as the compiler as that's + # not wrapped + substituteInPlace src/pal/tools/gen-buildsys-clang.sh --replace "which \"clang-" "which \"clang-DoNotFindThisOne" + + # Prevent the -nostdinc++ flag to be passed to clang, which causes a compilation error + substituteInPlace src/CMakeLists.txt --replace "if(NOT CLR_CMAKE_PLATFORM_DARWIN)" "if(FALSE)" + + patchShebangs build.sh + patchShebangs src/pal/tools/gen-buildsys-clang.sh + ''; + + buildPhase = "./build.sh"; + + installPhase = '' + pushd bin/Product/Linux.x64.Debug/ + mkdir -v -p $out/bin + cp -v coreconsole corerun crossgen $out/bin + cp -rv lib $out + cp -v *.so $out/lib + cp -rv inc $out/include + cp -rv gcinfo $out/include + popd + ''; + + meta = { + homepage = http://dotnet.github.io/core/; + description = ".NET is a general purpose development platform."; + platforms = with stdenv.lib.platforms; linux; + maintainers = with stdenv.lib.maintainers; [ obadz ]; + license = stdenv.lib.licenses.mit; + }; +} |