ocamlPackages.readline: init at 0.1

This commit is contained in:
Vincent Laporte 2023-11-23 06:13:44 +01:00 committed by Vincent Laporte
parent 9d5b3caa27
commit 147eabb0f4
3 changed files with 54 additions and 0 deletions

View File

@ -0,0 +1,34 @@
{ lib, buildDunePackage, fetchFromGitLab
, readline
}:
buildDunePackage {
pname = "readline";
version = "0.1";
minimalOCamlVersion = "4.14";
src = fetchFromGitLab {
domain = "gitlab.inria.fr";
owner = "vtourneu";
repo = "readline-ocaml";
rev = "b3f84c8a006439142884d3e0df51b395d963f9fe";
hash = "sha256-h4kGbzwM88rPGj/KkHKgGyfyvkAYHP83ZY1INZzTaIE=";
};
patches = [ ./dune.patch ];
preConfigure = ''
echo "(${lib.getOutput "dev" readline}/include)" > src/iflags.sexp
echo "(-L${lib.getOutput "lib" readline}/lib -lreadline)" > src/lflags.sexp
'';
propagatedBuildInputs = [ readline ];
meta = {
description = "OCaml bindings for GNU Readline";
homepage = "https://vtourneu.gitlabpages.inria.fr/readline-ocaml/readline/index.html";
license = lib.licenses.cecill20;
maintainers = [ lib.maintainers.vbgl ];
};
}

View File

@ -0,0 +1,16 @@
--- a/src/dune 2023-11-23 16:07:10.195742159 +0100
+++ b/src/dune 2023-11-23 16:07:22.055805922 +0100
@@ -1,13 +1,3 @@
-(rule
- (target iflags.sexp)
- (action (run ./discover.sh include))
-)
-
-(rule
- (target lflags.sexp)
- (action (run ./discover.sh lib))
-)
-
(library
(name readline)
(public_name readline)

View File

@ -1579,6 +1579,10 @@ let
reactivedata = callPackage ../development/ocaml-modules/reactivedata {};
readline = callPackage ../development/ocaml-modules/readline {
readline = pkgs.readline;
};
reason = callPackage ../development/compilers/reason { };
reason-native = lib.recurseIntoAttrs (callPackage ../development/ocaml-modules/reason-native { });