2014-03-08 18:04:01 +01:00
|
|
|
{ stdenv
|
2018-12-23 18:06:58 +01:00
|
|
|
, lib
|
|
|
|
, fetchFromGitHub
|
2014-03-08 18:04:01 +01:00
|
|
|
, groff
|
|
|
|
, cmake
|
2018-12-23 18:06:58 +01:00
|
|
|
, python2
|
|
|
|
, perl
|
2014-03-08 18:04:01 +01:00
|
|
|
, libffi
|
2017-10-30 19:56:34 +01:00
|
|
|
, libbfd
|
2014-03-08 18:04:01 +01:00
|
|
|
, libxml2
|
|
|
|
, valgrind
|
|
|
|
, ncurses
|
|
|
|
, zlib
|
|
|
|
}:
|
|
|
|
|
2019-08-13 23:52:01 +02:00
|
|
|
stdenv.mkDerivation {
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "llvm";
|
2018-12-23 18:06:58 +01:00
|
|
|
version = "3.6-mono-2017-02-15";
|
2014-03-08 18:04:01 +01:00
|
|
|
|
2018-12-23 18:06:58 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "mono";
|
|
|
|
repo = "llvm";
|
|
|
|
rev = "dbb6fdffdeb780d11851a6be77c209bd7ada4bd3";
|
|
|
|
sha256 = "07wd1cs3fdvzb1lv41b655z5zk34f47j8fgd9ljjimi5j9pj71f7";
|
|
|
|
};
|
2014-03-08 18:04:01 +01:00
|
|
|
|
2020-12-31 08:48:55 +01:00
|
|
|
nativeBuildInputs = [ cmake ];
|
|
|
|
buildInputs = [ perl groff libxml2 python2 libffi ] ++ lib.optional stdenv.isLinux valgrind;
|
2014-03-08 18:04:01 +01: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 19:56:34 +01:00
|
|
|
"-DLLVM_BINUTILS_INCDIR=${libbfd.dev}/include"
|
2021-01-22 12:25:31 +01:00
|
|
|
] ++ lib.optional (!isDarwin) "-DBUILD_SHARED_LIBS=ON";
|
2014-03-08 18:04:01 +01:00
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Collection of modular and reusable compiler and toolchain technologies - Mono build";
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "http://llvm.org/";
|
2021-01-22 12:25:31 +01:00
|
|
|
license = lib.licenses.bsd3;
|
|
|
|
maintainers = with lib.maintainers; [ thoughtpolice ];
|
|
|
|
platforms = lib.platforms.all;
|
2014-03-08 18:04:01 +01:00
|
|
|
};
|
|
|
|
}
|