ocamlPackages.topkg: add some comments

This commit is contained in:
Vincent Laporte 2017-12-15 06:33:56 +00:00
parent 5e4edcc4ec
commit 6328c97a7b
No known key found for this signature in database
GPG Key ID: EBD582ADDDB1F81F

View File

@ -1,3 +1,10 @@
/* Topkg is a packager for distributing OCaml software. This derivation
provides facilities to describe derivations for OCaml libraries
using topkg.
The `buildPhase` and `installPhase` attributes can be reused directly
in many cases. When more fine-grained control on how to run the topkg
build system is required, the attribute `run` can be used.
*/
{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, result, opam }: { stdenv, fetchurl, ocaml, findlib, ocamlbuild, result, opam }:
if !stdenv.lib.versionAtLeast ocaml.version "4.01" if !stdenv.lib.versionAtLeast ocaml.version "4.01"
@ -5,6 +12,11 @@ then throw "topkg is not available for OCaml ${ocaml.version}"
else else
let let
/* This command allows to run the topkg build system.
* It is usually called with `build` or `test` as argument.
* Packages that use `topkg` may call this command as part of
* their `buildPhase` or `checkPhase`.
*/
run = "ocaml -I ${findlib}/lib/ocaml/${ocaml.version}/site-lib/ pkg/pkg.ml"; run = "ocaml -I ${findlib}/lib/ocaml/${ocaml.version}/site-lib/ pkg/pkg.ml";
in in