From 6328c97a7b800e55fd332f0c196c42ecdd2ecd44 Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Fri, 15 Dec 2017 06:33:56 +0000 Subject: [PATCH] ocamlPackages.topkg: add some comments --- pkgs/development/ocaml-modules/topkg/default.nix | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/pkgs/development/ocaml-modules/topkg/default.nix b/pkgs/development/ocaml-modules/topkg/default.nix index 7bcd0cdd115..9a655e05513 100644 --- a/pkgs/development/ocaml-modules/topkg/default.nix +++ b/pkgs/development/ocaml-modules/topkg/default.nix @@ -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 }: if !stdenv.lib.versionAtLeast ocaml.version "4.01" @@ -5,6 +12,11 @@ then throw "topkg is not available for OCaml ${ocaml.version}" else 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"; in