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