2016-10-08 08:44:25 +02:00
|
|
|
{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, result, opam }:
|
2016-07-17 17:26:22 +02:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2016-11-23 04:20:51 +01:00
|
|
|
name = "ocaml${ocaml.version}-topkg-${version}";
|
2016-12-04 11:14:13 +01:00
|
|
|
version = "0.8.1";
|
2016-07-17 17:26:22 +02:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "http://erratique.ch/software/topkg/releases/topkg-${version}.tbz";
|
2016-12-04 11:14:13 +01:00
|
|
|
sha256 = "18rrh6fmf708z7dd30amljmcgaypj3kk49jrmrj68r4wnw8004j8";
|
2016-07-17 17:26:22 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ opam ];
|
2016-10-08 08:44:25 +02:00
|
|
|
buildInputs = [ ocaml findlib ocamlbuild ];
|
2016-07-17 17:26:22 +02:00
|
|
|
propagatedBuildInputs = [ result ];
|
|
|
|
|
|
|
|
unpackCmd = "tar xjf ${src}";
|
2016-11-23 04:20:51 +01:00
|
|
|
buildPhase = "ocaml -I ${findlib}/lib/ocaml/${ocaml.version}/site-lib/ pkg/pkg.ml build";
|
2016-07-17 17:26:22 +02:00
|
|
|
createFindlibDestdir = true;
|
2016-11-23 04:20:51 +01:00
|
|
|
installPhase = "opam-installer -i --prefix=$out --libdir=$OCAMLFIND_DESTDIR";
|
2016-07-17 17:26:22 +02:00
|
|
|
|
|
|
|
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;
|
|
|
|
};
|
|
|
|
}
|