nixpkgs/pkgs/development/compilers/coreclr/default.nix

84 lines
1.5 KiB
Nix
Raw Normal View History

2015-06-24 13:56:24 +02:00
{ stdenv
, fetchFromGitHub
, which
, cmake
2017-01-27 20:12:54 +01:00
, clang
, llvmPackages
2015-06-24 13:56:24 +02:00
, libunwind
, gettext
, openssl
2016-10-02 17:43:06 +02:00
, python2
, icu
, lttng-ust
, liburcu
, libuuid
2017-10-05 16:41:27 +02:00
, libkrb5
2016-10-02 17:43:06 +02:00
, debug ? false
2015-06-24 13:56:24 +02:00
}:
stdenv.mkDerivation rec {
name = "coreclr-${version}";
2017-10-05 16:41:27 +02:00
version = "2.0.0";
2015-06-24 13:56:24 +02:00
src = fetchFromGitHub {
2016-10-02 17:43:06 +02:00
owner = "dotnet";
repo = "coreclr";
rev = "v${version}";
2017-10-05 16:41:27 +02:00
sha256 = "16z58ix8kmk8csfy5qsqz8z30czhrap2vb8s8vdflmbcfnq31jcw";
2015-06-24 13:56:24 +02:00
};
buildInputs = [
which
cmake
2017-01-27 20:12:54 +01:00
clang
llvmPackages.llvm
llvmPackages.lldb
2015-06-24 13:56:24 +02:00
libunwind
gettext
openssl
2016-10-02 17:43:06 +02:00
python2
icu
lttng-ust
liburcu
libuuid
2017-10-05 16:41:27 +02:00
libkrb5
2015-06-24 13:56:24 +02:00
];
configurePhase = ''
2017-10-06 15:52:08 +02:00
# override to avoid cmake running
patchShebangs .
2015-06-24 13:56:24 +02:00
'';
2016-10-02 17:43:06 +02:00
BuildArch = if stdenv.is64bit then "x64" else "x86";
BuildType = if debug then "Debug" else "Release";
2015-06-24 13:56:24 +02:00
2017-10-06 15:52:08 +02:00
hardeningDisable = [
"strictoverflow"
"format"
2017-01-27 20:12:54 +01:00
];
2016-10-02 17:43:06 +02:00
buildPhase = ''
2017-10-06 15:52:08 +02:00
runHook preBuild
./build.sh $BuildArch Release
runHook postBuild
2015-06-24 13:56:24 +02:00
'';
2016-10-02 17:43:06 +02:00
installPhase = ''
2017-10-06 15:52:08 +02:00
runHook preInstall
mkdir -p $out/share/dotnet $out/bin
cp -r bin/Product/Linux.$BuildArch.$BuildType/* $out/share/dotnet
for cmd in coreconsole corerun createdump crossgen ilasm ildasm mcs superpmi; do
ln -s $out/share/dotnet/$cmd $out/bin/$cmd
done
runHook postInstall
2016-10-02 17:43:06 +02:00
'';
2017-10-06 15:52:08 +02:00
meta = with stdenv.lib; {
2015-06-24 13:56:24 +02:00
homepage = http://dotnet.github.io/core/;
description = ".NET is a general purpose development platform";
platforms = [ "x86_64-linux" ];
2017-10-06 15:52:08 +02:00
maintainers = with maintainers; [ obadz ];
license = licenses.mit;
2015-06-24 13:56:24 +02:00
};
}