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