2018-09-05 18:11:47 +02:00
|
|
|
{ stdenv, fetchFromGitHub, ocaml, dune, findlib, result }:
|
2018-06-05 20:29:00 +02:00
|
|
|
|
|
|
|
if !stdenv.lib.versionAtLeast ocaml.version "4.02"
|
|
|
|
then throw "linenoise is not available for OCaml ${ocaml.version}"
|
|
|
|
else
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "ocaml${ocaml.version}-linenoise-${version}";
|
|
|
|
version = "1.1.0";
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "fxfactorial";
|
|
|
|
repo = "ocaml-linenoise";
|
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "1h6rqfgmhmd7p5z8yhk6zkbrk4yzw1v2fgwas2b7g3hqs6y0xj0q";
|
|
|
|
};
|
|
|
|
|
2018-09-05 18:11:47 +02:00
|
|
|
buildInputs = [ ocaml findlib dune ];
|
2018-06-05 20:29:00 +02:00
|
|
|
propagatedBuildInputs = [ result ];
|
|
|
|
|
2018-09-05 18:11:47 +02:00
|
|
|
inherit (dune) installPhase;
|
2018-06-05 20:29:00 +02:00
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "OCaml bindings to linenoise";
|
|
|
|
license = stdenv.lib.licenses.bsd3;
|
|
|
|
maintainers = [ stdenv.lib.maintainers.vbgl ];
|
|
|
|
inherit (ocaml.meta) platforms;
|
|
|
|
inherit (src.meta) homepage;
|
|
|
|
};
|
|
|
|
}
|