2015-10-16 12:22:36 +01:00
|
|
|
{ stdenv, python, llvm, ocaml, findlib, ctypes }:
|
|
|
|
|
|
|
|
let version = stdenv.lib.getVersion llvm; in
|
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
name = "ocaml-llvm-${version}";
|
|
|
|
|
|
|
|
inherit (llvm) src;
|
|
|
|
|
|
|
|
buildInputs = [ python llvm ocaml findlib ctypes ];
|
|
|
|
|
|
|
|
configurePhase = ''
|
|
|
|
mkdir build
|
|
|
|
cd build
|
2016-10-03 20:22:06 +01:00
|
|
|
../configure --disable-compiler-version-checks --prefix=$out \
|
2015-10-16 12:22:36 +01:00
|
|
|
--disable-doxygen --disable-docs --with-ocaml-libdir=$OCAMLFIND_DESTDIR/llvm \
|
|
|
|
--enable-static
|
|
|
|
'';
|
|
|
|
|
|
|
|
enableParallelBuilding = false;
|
|
|
|
|
|
|
|
makeFlags = [ "-C bindings" "SYSTEM_LLVM_CONFIG=llvm-config" ];
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
mv $OCAMLFIND_DESTDIR/llvm/META{.llvm,}
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
inherit (llvm.meta) license homepage;
|
2015-12-24 17:49:07 +00:00
|
|
|
platforms = ocaml.meta.platforms or [];
|
2015-10-16 12:22:36 +01:00
|
|
|
description = "OCaml bindings distributed with LLVM";
|
|
|
|
maintainers = with stdenv.lib.maintainers; [ vbgl ];
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|