diff options
author | Vincent Laporte <Vincent.Laporte@gmail.com> | 2023-11-23 06:13:44 +0100 |
---|---|---|
committer | Vincent Laporte <vbgl@users.noreply.github.com> | 2023-11-30 05:37:04 +0100 |
commit | 147eabb0f47b6cf6be50ae5a1ffb021f33088526 (patch) | |
tree | a208befad18528d764a453c513db397327221f64 /pkgs/development/ocaml-modules | |
parent | 9d5b3caa27dcc666ee5724692b0185b885086bf7 (diff) |
ocamlPackages.readline: init at 0.1
Diffstat (limited to 'pkgs/development/ocaml-modules')
-rw-r--r-- | pkgs/development/ocaml-modules/readline/default.nix | 34 | ||||
-rw-r--r-- | pkgs/development/ocaml-modules/readline/dune.patch | 16 |
2 files changed, 50 insertions, 0 deletions
diff --git a/pkgs/development/ocaml-modules/readline/default.nix b/pkgs/development/ocaml-modules/readline/default.nix new file mode 100644 index 0000000000000..43763a3116c6f --- /dev/null +++ b/pkgs/development/ocaml-modules/readline/default.nix @@ -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 ]; + }; +} diff --git a/pkgs/development/ocaml-modules/readline/dune.patch b/pkgs/development/ocaml-modules/readline/dune.patch new file mode 100644 index 0000000000000..9b62fb6f9b518 --- /dev/null +++ b/pkgs/development/ocaml-modules/readline/dune.patch @@ -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) |