From 999871400b97109c78eaf2e88fa61c6e7793e07e Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Tue, 5 Jun 2018 20:29:00 +0200 Subject: ocamlPackages.linenoise: init at 1.1.0 (#41489) --- .../ocaml-modules/linenoise/default.nix | 29 ++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 pkgs/development/ocaml-modules/linenoise/default.nix (limited to 'pkgs/development/ocaml-modules/linenoise/default.nix') diff --git a/pkgs/development/ocaml-modules/linenoise/default.nix b/pkgs/development/ocaml-modules/linenoise/default.nix new file mode 100644 index 000000000000..53ac918c47e6 --- /dev/null +++ b/pkgs/development/ocaml-modules/linenoise/default.nix @@ -0,0 +1,29 @@ +{ stdenv, fetchFromGitHub, ocaml, jbuilder, findlib, result }: + +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"; + }; + + buildInputs = [ ocaml findlib jbuilder ]; + propagatedBuildInputs = [ result ]; + + inherit (jbuilder) installPhase; + + meta = { + description = "OCaml bindings to linenoise"; + license = stdenv.lib.licenses.bsd3; + maintainers = [ stdenv.lib.maintainers.vbgl ]; + inherit (ocaml.meta) platforms; + inherit (src.meta) homepage; + }; +} -- cgit 1.4.1