1 { lib, stdenv, fetchFromGitHub, ocaml, findlib, ncurses }:
3 stdenv.mkDerivation rec {
4 pname = "ocaml-curses";
7 src = fetchFromGitHub {
11 sha256 = "0yy3wf8i7jgvzdc40bni7mvpkvclq97cgb5fw265mrjj0iqpkqpd";
16 propagatedBuildInputs = [ ncurses ];
18 nativeBuildInputs = [ ocaml findlib ];
20 # Fix build for recent ncurses versions
21 env.NIX_CFLAGS_COMPILE = "-DNCURSES_INTERNALS=1";
23 createFindlibDestdir = true;
26 substituteInPlace curses.ml --replace "pp gcc" "pp $CC"
29 buildPhase = "make all opt";
32 description = "OCaml Bindings to curses/ncurses";
33 homepage = "https://github.com/mbacarella/curses";
34 license = licenses.lgpl21Plus;
35 changelog = "https://github.com/mbacarella/curses/raw/${version}/CHANGES";
37 inherit (ocaml.meta) platforms;