2021-10-08 15:17:17 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, ocaml, findlib, ncurses }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "ocaml-curses";
|
2021-10-08 15:17:17 +00:00
|
|
|
version = "1.0.8";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-10-08 15:17:17 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "mbacarella";
|
|
|
|
repo = "curses";
|
|
|
|
rev = version;
|
|
|
|
sha256 = "0yy3wf8i7jgvzdc40bni7mvpkvclq97cgb5fw265mrjj0iqpkqpd";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [ ncurses ];
|
|
|
|
|
2021-10-08 15:17:17 +00:00
|
|
|
nativeBuildInputs = [ ocaml findlib ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
# Fix build for recent ncurses versions
|
|
|
|
NIX_CFLAGS_COMPILE = "-DNCURSES_INTERNALS=1";
|
|
|
|
|
|
|
|
createFindlibDestdir = true;
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace curses.ml --replace "pp gcc" "pp $CC"
|
|
|
|
'';
|
|
|
|
|
|
|
|
buildPhase = "make all opt";
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "OCaml Bindings to curses/ncurses";
|
2021-10-08 15:17:17 +00:00
|
|
|
homepage = "https://github.com/mbacarella/curses";
|
|
|
|
license = licenses.lgpl21Plus;
|
|
|
|
changelog = "https://github.com/mbacarella/curses/raw/${version}/CHANGES";
|
2020-04-24 23:36:52 +00:00
|
|
|
maintainers = [ maintainers.volth ];
|
2022-05-18 14:49:53 +00:00
|
|
|
inherit (ocaml.meta) platforms;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|