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 21:52:01 +00:00
|
|
|
stdenv.mkDerivation {
|
2019-08-15 12:41:18 +00: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
|
|
|
|
2020-12-31 07:48:55 +00:00
|
|
|
nativeBuildInputs = [ cmake ];
|
|
|
|
buildInputs = [ perl groff 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"
|
2021-01-22 11:25:31 +00:00
|
|
|
] ++ lib.optional (!isDarwin) "-DBUILD_SHARED_LIBS=ON";
|
2014-03-08 17:04:01 +00:00
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Collection of modular and reusable compiler and toolchain technologies - Mono build";
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "http://llvm.org/";
|
2021-01-22 11:25:31 +00:00
|
|
|
license = lib.licenses.bsd3;
|
|
|
|
maintainers = with lib.maintainers; [ thoughtpolice ];
|
|
|
|
platforms = lib.platforms.all;
|
2014-03-08 17:04:01 +00:00
|
|
|
};
|
|
|
|
}
|