about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/ocaml-modules/ocamlmake
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/ocaml-modules/ocamlmake')
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/ocamlmake/default.nix30
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/ocamlmake/setup-hook.sh5
2 files changed, 35 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/ocaml-modules/ocamlmake/default.nix b/nixpkgs/pkgs/development/ocaml-modules/ocamlmake/default.nix
new file mode 100644
index 000000000000..b4ee828fcc42
--- /dev/null
+++ b/nixpkgs/pkgs/development/ocaml-modules/ocamlmake/default.nix
@@ -0,0 +1,30 @@
+{stdenv, fetchurl}:
+
+let
+
+  version = "6.37.0";
+  sha256 = "99ff58080ed154cc4bd70f915fe4760dffb026a1c0447caa0b3bdb982b24b0a8";
+
+in stdenv.mkDerivation {
+  pname = "ocaml-make";
+  inherit version;
+
+  src = fetchurl {
+    url = "https://bitbucket.org/mmottl/ocaml-makefile/downloads/ocaml-makefile-${version}.tar.gz";
+    inherit sha256;
+  };
+
+  installPhase = ''
+    mkdir -p "$out/include/"
+    cp OCamlMakefile "$out/include/"
+  '';
+
+  setupHook = ./setup-hook.sh;
+
+  meta = {
+    homepage = "http://www.ocaml.info/home/ocaml_sources.html";
+    description = "Generic OCaml Makefile for GNU Make";
+    license = "LGPL";
+    platforms = stdenv.lib.platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/ocaml-modules/ocamlmake/setup-hook.sh b/nixpkgs/pkgs/development/ocaml-modules/ocamlmake/setup-hook.sh
new file mode 100644
index 000000000000..6d9504370165
--- /dev/null
+++ b/nixpkgs/pkgs/development/ocaml-modules/ocamlmake/setup-hook.sh
@@ -0,0 +1,5 @@
+addOcamlMakefile () {
+    export OCAMLMAKEFILE="@out@/include/OCamlMakefile"
+}
+
+addEnvHooks "$targetOffset" addOcamlMakefile