2014-03-08 17:04:01 +00:00
|
|
|
{ stdenv
|
2018-12-23 17:06:58 +00:00
|
|
|
, lib
|
|
|
|
, fetchFromGitHub
|
2014-03-08 17:04:01 +00:00
|
|
|
, groff
|
|
|
|
, cmake
|
2018-12-23 17:06:58 +00:00
|
|
|
, python2
|
|
|
|
, perl
|
2014-03-08 17:04:01 +00:00
|
|
|
, libffi
|
2017-10-30 18:56:34 +00:00
|
|
|
, libbfd
|
2014-03-08 17:04:01 +00:00
|
|
|
, libxml2
|
|
|
|
, valgrind
|
|
|
|
, ncurses
|
|
|
|
, zlib
|
|
|
|
}:
|
|
|
|
|
2019-08-13 22:52:01 +01:00
|
|
|
stdenv.mkDerivation {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "llvm";
|
2018-12-23 17:06:58 +00:00
|
|
|
version = "3.6-mono-2017-02-15";
|
2014-03-08 17:04:01 +00:00
|
|
|
|
2018-12-23 17:06:58 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "mono";
|
|
|
|
repo = "llvm";
|
|
|
|
rev = "dbb6fdffdeb780d11851a6be77c209bd7ada4bd3";
|
|
|
|
sha256 = "07wd1cs3fdvzb1lv41b655z5zk34f47j8fgd9ljjimi5j9pj71f7";
|
|
|
|
};
|
2014-03-08 17:04:01 +00:00
|
|
|
|
2018-12-23 17:06:58 +00:00
|
|
|
buildInputs = [ perl groff cmake libxml2 python2 libffi ] ++ lib.optional stdenv.isLinux valgrind;
|
2014-03-08 17:04:01 +00:00
|
|
|
|
|
|
|
propagatedBuildInputs = [ ncurses zlib ];
|
|
|
|
|
|
|
|
# hacky fix: created binaries need to be run before installation
|
|
|
|
preBuild = ''
|
|
|
|
mkdir -p $out/
|
|
|
|
ln -sv $PWD/lib $out
|
|
|
|
'';
|
|
|
|
postBuild = "rm -fR $out";
|
|
|
|
|
|
|
|
cmakeFlags = with stdenv; [
|
|
|
|
"-DLLVM_ENABLE_FFI=ON"
|
2017-10-30 18:56:34 +00:00
|
|
|
"-DLLVM_BINUTILS_INCDIR=${libbfd.dev}/include"
|
2014-03-08 17:04:01 +00:00
|
|
|
] ++ stdenv.lib.optional (!isDarwin) "-DBUILD_SHARED_LIBS=ON";
|
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Collection of modular and reusable compiler and toolchain technologies - Mono build";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "http://llvm.org/";
|
2014-03-08 17:04:01 +00:00
|
|
|
license = stdenv.lib.licenses.bsd3;
|
|
|
|
maintainers = with stdenv.lib.maintainers; [ thoughtpolice ];
|
|
|
|
platforms = stdenv.lib.platforms.all;
|
|
|
|
};
|
|
|
|
}
|