2017-02-04 15:07:45 +00:00
|
|
|
{ stdenv, fetchurl, ocaml, findlib, ncurses }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "ocaml-curses";
|
2018-12-15 06:26:13 +00:00
|
|
|
version = "1.0.4";
|
2017-02-04 15:07:45 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "http://ocaml.phauna.org/distfiles/ocaml-curses-${version}.ogunden1.tar.gz";
|
2018-12-15 06:26:13 +00:00
|
|
|
sha256 = "08wq1r93lincdfzlriyc5nl2p4q7ca4h6ygzgp1nhkgd93pgk9v2";
|
2017-02-04 15:07:45 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [ ncurses ];
|
|
|
|
|
|
|
|
buildInputs = [ ocaml findlib ];
|
|
|
|
|
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";
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "OCaml Bindings to curses/ncurses";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://opam.ocaml.org/packages/curses/curses.1.0.4/";
|
2017-02-04 15:07:45 +00:00
|
|
|
license = licenses.gpl2;
|
|
|
|
maintainers = [ maintainers.volth ];
|
|
|
|
platforms = ocaml.meta.platforms or [];
|
|
|
|
};
|
|
|
|
}
|