about summary refs log tree commit diff
path: root/pkgs/development/ocaml-modules/llvm
diff options
context:
space:
mode:
authorVincent Laporte <Vincent.Laporte@gmail.com>2015-10-16 13:22:36 +0200
committerVincent Laporte <Vincent.Laporte@gmail.com>2015-10-16 13:28:54 +0200
commit620063af36ff12dd0bf54e0680ef653f0ba9f204 (patch)
tree7d9e866942fd816aa3d01e5fd05e47946976e088 /pkgs/development/ocaml-modules/llvm
parenta222473b063d5ea7fb585538767e17ae9cead8d9 (diff)
downloadnixlib-620063af36ff12dd0bf54e0680ef653f0ba9f204.tar
nixlib-620063af36ff12dd0bf54e0680ef653f0ba9f204.tar.gz
nixlib-620063af36ff12dd0bf54e0680ef653f0ba9f204.tar.bz2
nixlib-620063af36ff12dd0bf54e0680ef653f0ba9f204.tar.lz
nixlib-620063af36ff12dd0bf54e0680ef653f0ba9f204.tar.xz
nixlib-620063af36ff12dd0bf54e0680ef653f0ba9f204.tar.zst
nixlib-620063af36ff12dd0bf54e0680ef653f0ba9f204.zip
ocaml-llvm: init at 3.7.0
Diffstat (limited to 'pkgs/development/ocaml-modules/llvm')
-rw-r--r--pkgs/development/ocaml-modules/llvm/default.nix35
1 files changed, 35 insertions, 0 deletions
diff --git a/pkgs/development/ocaml-modules/llvm/default.nix b/pkgs/development/ocaml-modules/llvm/default.nix
new file mode 100644
index 000000000000..57cf9fe4678b
--- /dev/null
+++ b/pkgs/development/ocaml-modules/llvm/default.nix
@@ -0,0 +1,35 @@
+{ 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 CC=gcc CXX=g++ --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;
+    inherit (ocaml.meta) platforms;
+    description = "OCaml bindings distributed with LLVM";
+    maintainers = with stdenv.lib.maintainers; [ vbgl ];
+  };
+
+}