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