summary refs log tree commit diff
path: root/pkgs/development/ocaml-modules
diff options
context:
space:
mode:
authorVincent Laporte <Vincent.Laporte@gmail.com>2016-07-17 17:26:22 +0200
committerVincent Laporte <Vincent.Laporte@gmail.com>2016-08-19 08:14:36 +0200
commita99d7b1071d9ab31250311065052e3352fb94f14 (patch)
tree9d0c74c8da183d049b6eb6ab8676b12655f055d3 /pkgs/development/ocaml-modules
parent10767521a05bccab5d8a001383ab3ef3e8ec3344 (diff)
downloadnixlib-a99d7b1071d9ab31250311065052e3352fb94f14.tar
nixlib-a99d7b1071d9ab31250311065052e3352fb94f14.tar.gz
nixlib-a99d7b1071d9ab31250311065052e3352fb94f14.tar.bz2
nixlib-a99d7b1071d9ab31250311065052e3352fb94f14.tar.lz
nixlib-a99d7b1071d9ab31250311065052e3352fb94f14.tar.xz
nixlib-a99d7b1071d9ab31250311065052e3352fb94f14.tar.zst
nixlib-a99d7b1071d9ab31250311065052e3352fb94f14.zip
ocaml-topkg: init at 0.7.8
Diffstat (limited to 'pkgs/development/ocaml-modules')
-rw-r--r--pkgs/development/ocaml-modules/topkg/default.nix33
1 files changed, 33 insertions, 0 deletions
diff --git a/pkgs/development/ocaml-modules/topkg/default.nix b/pkgs/development/ocaml-modules/topkg/default.nix
new file mode 100644
index 000000000000..4fd6589cfb58
--- /dev/null
+++ b/pkgs/development/ocaml-modules/topkg/default.nix
@@ -0,0 +1,33 @@
+{ stdenv, fetchurl, ocaml, findlib, result, opam }:
+
+let ocaml-version = stdenv.lib.getVersion ocaml; in
+
+stdenv.mkDerivation rec {
+  name = "ocaml${ocaml-version}-topkg-${version}";
+  version = "0.7.8";
+
+  src = fetchurl {
+    url = "http://erratique.ch/software/topkg/releases/topkg-${version}.tbz";
+    sha256 = "029lbmabczpmcgkj53mc20vmpcn3f7rf7xms4xf0nywswfzsash6";
+  };
+
+  nativeBuildInputs = [ opam ];
+  buildInputs = [ ocaml findlib ];
+  propagatedBuildInputs = [ result ];
+
+  unpackCmd = "tar xjf ${src}";
+  buildPhase = "ocaml -I ${findlib}/lib/ocaml/${ocaml-version}/site-lib/ pkg/pkg.ml build";
+  createFindlibDestdir = true;
+  installPhase = ''
+    opam-installer --script --prefix=$out topkg.install | sh
+    mv $out/lib/topkg $out/lib/ocaml/${ocaml-version}/site-lib/
+  '';
+
+  meta = {
+    homepage = http://erratique.ch/software/topkg;
+    license = stdenv.lib.licenses.isc;
+    maintainers = [ stdenv.lib.maintainers.vbgl ];
+    description = "A packager for distributing OCaml software";
+    inherit (ocaml.meta) platforms;
+  };
+}