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>2017-03-12 18:22:01 +0000
committervbgl <vbgl@users.noreply.github.com>2017-03-13 19:14:11 +0100
commitb2b8a412fb376fccda36530666948bf25170d26e (patch)
tree075ad71d250d9757ac5ec153dffe6c751b45379c /pkgs/development/ocaml-modules/llvm
parentb2c96062ca28a9073b8deeab9855f23352a260f9 (diff)
downloadnixlib-b2b8a412fb376fccda36530666948bf25170d26e.tar
nixlib-b2b8a412fb376fccda36530666948bf25170d26e.tar.gz
nixlib-b2b8a412fb376fccda36530666948bf25170d26e.tar.bz2
nixlib-b2b8a412fb376fccda36530666948bf25170d26e.tar.lz
nixlib-b2b8a412fb376fccda36530666948bf25170d26e.tar.xz
nixlib-b2b8a412fb376fccda36530666948bf25170d26e.tar.zst
nixlib-b2b8a412fb376fccda36530666948bf25170d26e.zip
ocaml-llvm: 3.7.1 -> 3.9.1
Diffstat (limited to 'pkgs/development/ocaml-modules/llvm')
-rw-r--r--pkgs/development/ocaml-modules/llvm/default.nix24
1 files changed, 13 insertions, 11 deletions
diff --git a/pkgs/development/ocaml-modules/llvm/default.nix b/pkgs/development/ocaml-modules/llvm/default.nix
index 351a773a6f7b..3bced92cc3e3 100644
--- a/pkgs/development/ocaml-modules/llvm/default.nix
+++ b/pkgs/development/ocaml-modules/llvm/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, python, llvm, ocaml, findlib, ctypes }:
+{ stdenv, fetchpatch, python, cmake, llvm, ocaml, findlib, ctypes }:
 
 let version = stdenv.lib.getVersion llvm; in
 
@@ -7,21 +7,23 @@ stdenv.mkDerivation {
 
   inherit (llvm) src;
 
-  buildInputs = [ python llvm ocaml findlib ctypes ];
+  buildInputs = [ python cmake 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
-    '';
+  patches = [ (fetchpatch {
+    url = https://raw.githubusercontent.com/ocaml/opam-repository/master/packages/llvm/llvm.3.9/files/cmake.patch;
+    sha256 = "1fcc6ylfiw1npdhx7mrsj7h0dx7cym7i9664kpr76zqazb52ikm9";
+  })];
 
-  enableParallelBuilding = false;
+  cmakeFlags = [ "-DLLVM_OCAML_OUT_OF_TREE=TRUE" ];
 
-  makeFlags = [ "-C bindings" "SYSTEM_LLVM_CONFIG=llvm-config" ];
+  buildFlags = "ocaml_all";
+
+  installFlags = "-C bindings/ocaml";
 
   postInstall = ''
+    mv $out/lib/ocaml $out/ocaml
+    mkdir -p $OCAMLFIND_DESTDIR/
+    mv $out/ocaml $OCAMLFIND_DESTDIR/llvm
     mv $OCAMLFIND_DESTDIR/llvm/META{.llvm,}
   '';