mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-24 19:08:30 +00:00
36 lines
854 B
Nix
36 lines
854 B
Nix
{ 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
|
|
../configure --disable-compiler-version-checks --prefix=$out \
|
|
--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;
|
|
platforms = ocaml.meta.platforms or [];
|
|
description = "OCaml bindings distributed with LLVM";
|
|
maintainers = with stdenv.lib.maintainers; [ vbgl ];
|
|
};
|
|
|
|
}
|