From 620063af36ff12dd0bf54e0680ef653f0ba9f204 Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Fri, 16 Oct 2015 13:22:36 +0200 Subject: [PATCH] ocaml-llvm: init at 3.7.0 --- .../ocaml-modules/llvm/default.nix | 35 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 4 +++ 2 files changed, 39 insertions(+) create mode 100644 pkgs/development/ocaml-modules/llvm/default.nix diff --git a/pkgs/development/ocaml-modules/llvm/default.nix b/pkgs/development/ocaml-modules/llvm/default.nix new file mode 100644 index 00000000000..57cf9fe4678 --- /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 ]; + }; + +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 8476d3cd37f..8a70dab70d5 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -4467,6 +4467,10 @@ let then callPackage ../development/ocaml-modules/lambda-term { } else lambdaTerm-1_6; + llvm = callPackage ../development/ocaml-modules/llvm { + llvm = pkgs.llvm_37; + }; + macaque = callPackage ../development/ocaml-modules/macaque { }; magic-mime = callPackage ../development/ocaml-modules/magic-mime { };