depot/third_party/nixpkgs/pkgs/development/ocaml-modules/curses/default.nix
Default email a5adf1ddd8 Project import generated by Copybara.
GitOrigin-RevId: b3616bd96400ce0252c241d76fcafb64389defc6
2021-01-15 23:18:51 +01:00

34 lines
890 B
Nix

{ lib, stdenv, fetchurl, ocaml, findlib, ncurses }:
stdenv.mkDerivation rec {
pname = "ocaml-curses";
version = "1.0.4";
src = fetchurl {
url = "http://ocaml.phauna.org/distfiles/ocaml-curses-${version}.ogunden1.tar.gz";
sha256 = "08wq1r93lincdfzlriyc5nl2p4q7ca4h6ygzgp1nhkgd93pgk9v2";
};
propagatedBuildInputs = [ ncurses ];
buildInputs = [ ocaml findlib ];
# 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";
meta = with lib; {
description = "OCaml Bindings to curses/ncurses";
homepage = "https://opam.ocaml.org/packages/curses/curses.1.0.4/";
license = licenses.gpl2;
maintainers = [ maintainers.volth ];
platforms = ocaml.meta.platforms or [];
};
}