nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, opam
2, topkg, result, lwt, cmdliner, fmt }:
3let
4 pname = "logs";
5 webpage = "http://erratique.ch/software/${pname}";
6in
7
8assert stdenv.lib.versionAtLeast ocaml.version "4.01.0";
9
10stdenv.mkDerivation rec {
11 name = "ocaml-${pname}-${version}";
12 version = "0.6.2";
13
14 src = fetchurl {
15 url = "${webpage}/releases/${pname}-${version}.tbz";
16 sha256 = "1khbn7jqpid83zn8rvyh1x1sirls7zc878zj4fz985m5xlsfy853";
17 };
18
19 unpackCmd = "tar xjf $src";
20
21 buildInputs = [ ocaml findlib ocamlbuild opam topkg fmt cmdliner lwt ];
22 propagatedBuildInputs = [ result ];
23
24 buildPhase = ''
25 ocaml -I ${findlib}/lib/ocaml/${ocaml.version}/site-lib/ pkg/pkg.ml build \
26 --with-js_of_ocaml false
27 '';
28
29 inherit (topkg) installPhase;
30
31 createFindlibDestdir = true;
32
33 meta = with stdenv.lib; {
34 description = "Logging infrastructure for OCaml";
35 homepage = "${webpage}";
36 inherit (ocaml.meta) platforms;
37 maintainers = [ maintainers.sternenseemann ];
38 license = licenses.isc;
39 };
40}