summary refs log tree commit diff
diff options
context:
space:
mode:
authorVincent Laporte <vbgl@users.noreply.github.com>2018-06-05 20:29:00 +0200
committerxeji <36407913+xeji@users.noreply.github.com>2018-06-05 20:29:00 +0200
commit999871400b97109c78eaf2e88fa61c6e7793e07e (patch)
tree6d38c62cfb6ee62946942a4238de2bcabe9d23c0
parent5467f0ed7add4713f7a3802ef2a2865adeb0e08c (diff)
downloadnixpkgs-999871400b97109c78eaf2e88fa61c6e7793e07e.tar
nixpkgs-999871400b97109c78eaf2e88fa61c6e7793e07e.tar.gz
nixpkgs-999871400b97109c78eaf2e88fa61c6e7793e07e.tar.bz2
nixpkgs-999871400b97109c78eaf2e88fa61c6e7793e07e.tar.lz
nixpkgs-999871400b97109c78eaf2e88fa61c6e7793e07e.tar.xz
nixpkgs-999871400b97109c78eaf2e88fa61c6e7793e07e.tar.zst
nixpkgs-999871400b97109c78eaf2e88fa61c6e7793e07e.zip
ocamlPackages.linenoise: init at 1.1.0 (#41489)
-rw-r--r--pkgs/development/ocaml-modules/linenoise/default.nix29
-rw-r--r--pkgs/top-level/ocaml-packages.nix2
2 files changed, 31 insertions, 0 deletions
diff --git a/pkgs/development/ocaml-modules/linenoise/default.nix b/pkgs/development/ocaml-modules/linenoise/default.nix
new file mode 100644
index 00000000000..53ac918c47e
--- /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;
+  };
+}
diff --git a/pkgs/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix
index ef7e6f4c588..3bb84e7e3a0 100644
--- a/pkgs/top-level/ocaml-packages.nix
+++ b/pkgs/top-level/ocaml-packages.nix
@@ -363,6 +363,8 @@ let
       then callPackage ../development/ocaml-modules/lambda-term { }
       else lambdaTerm-1_6;
 
+    linenoise = callPackage ../development/ocaml-modules/linenoise { };
+
     llvm = callPackage ../development/ocaml-modules/llvm {
       llvm = pkgs.llvm_39;
     };